/* Emoticlass landing — "Plano del colegio": an architect's floor plan on warm
   paper. In dark mode the page becomes a blueprint. Same tokens as the app
   (frontend/tailwind.config.ts). Fonts are self-hosted: no third-party requests. */

@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/fraunces-latin-opsz-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/fraunces-latin-opsz-italic.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2');
}

:root {
  color-scheme: light dark;

  --paper: #f6f1e7;
  --paper-2: #eee7d8;
  --card: #fbf8f1;
  --rule: #ddd3bf;
  --rule-strong: #c3b8a1;
  --muted: #6b6860;
  --text: #323d55;
  --ink: #172137;
  --green: #2e5e40;
  --green-tint: #d6e6da;
  --ochre: #8f6a1d;
  --ochre-line: #b98a2a;
  --ochre-tint: #f7ecd0;
  --pen: #a33b1d;
  --pen-line: #c44a26;
  --pen-tint: #f8dbd1;
  --grid: rgb(23 33 55 / 0.05);
  --sheet-shadow: rgb(23 33 55 / 0.12);
  --btn-bg: #172137;
  --btn-fg: #f6f1e7;

  /* the privacy band and the closing band are always a blueprint */
  --bp-bg: #0e182b;
  --bp-bg-2: #172137;
  --bp-rule: #2a3854;
  --bp-text: #d9d2c2;
  --bp-ink: #f6f1e7;
  --bp-line: #a9c3e6;
  --bp-grid: rgb(169 195 230 / 0.07);

  --display: 'Fraunces Variable', Georgia, Cambria, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible', ui-sans-serif, system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e182b;
    --paper-2: #131e33;
    --card: #172137;
    --rule: #26334d;
    --rule-strong: #3a4a69;
    --muted: #9aa3b5;
    --text: #cfd5e0;
    --ink: #f6f1e7;
    --green: #7dae8c;
    --green-tint: rgb(84 142 103 / 0.22);
    --ochre: #e5c477;
    --ochre-line: #d6a84a;
    --ochre-tint: rgb(214 168 74 / 0.16);
    --pen: #efb39f;
    --pen-line: #e48a6c;
    --pen-tint: rgb(216 100 63 / 0.22);
    --grid: rgb(169 195 230 / 0.06);
    --sheet-shadow: rgb(0 0 0 / 0.35);
    --btn-bg: #f6f1e7;
    --btn-fg: #0e182b;
    --bp-bg: #0a1220;
    --bp-bg-2: #0e182b;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; }

h1, h2 {
  font-family: var(--display);
  font-weight: 560;
  color: var(--ink);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); line-height: 1.04; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.12; max-width: 22ch; }
h3 { font: 700 1.125rem/1.3 var(--sans); color: var(--ink); }
h1 em { font-style: italic; font-weight: 480; color: var(--green); }

:focus-visible { outline: 2px solid var(--pen-line); outline-offset: 3px; border-radius: 1px; }

.wrap { width: min(100% - 40px, 1140px); margin-inline: auto; }
.wrap--narrow { width: min(100% - 40px, 780px); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--btn-bg); color: var(--btn-fg); padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

.eyebrow, .label {
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow { margin-bottom: 14px; color: var(--green); }

/* ── Buttons and links ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 1rem/1.2 var(--sans); text-decoration: none;
  border: 1.5px solid var(--btn-bg); border-radius: 2px;
  box-shadow: 4px 4px 0 0 var(--sheet-shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 0 var(--sheet-shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 var(--sheet-shadow); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; box-shadow: none; }
.btn--sm:hover { box-shadow: 3px 3px 0 0 var(--sheet-shadow); }
.btn--light { background: var(--bp-ink); color: #0e182b; border-color: var(--bp-ink); box-shadow: 4px 4px 0 0 rgb(169 195 230 / 0.25); }
.btn--light:hover { box-shadow: 6px 6px 0 0 rgb(169 195 230 / 0.25); }

.link-plain { font-weight: 700; text-decoration: none; color: var(--ink); padding: 8px 4px; }
.link-plain:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-arrow {
  font-weight: 700; color: var(--ink); text-decoration: underline;
  text-decoration-color: var(--rule-strong); text-underline-offset: 5px; text-decoration-thickness: 1.5px;
  padding: 10px 2px;
}
.link-arrow::after { content: ' →'; }
.link-arrow:hover { text-decoration-color: var(--ink); }

/* ── Header ── */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.top__in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 600 1.3rem/1 var(--display); color: var(--ink); letter-spacing: -0.01em;
}
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { font-size: 0.9375rem; text-decoration: none; color: var(--text); padding: 8px 0; }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.top__cta { display: flex; align-items: center; gap: 14px; }
@media (max-width: 980px) {
  .nav { display: none; }
  .top__cta { margin-left: auto; }
}
@media (max-width: 480px) {
  .top__cta .btn { display: none; }
}

/* ── Hero ── */
.hero {
  padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--rule);
}
.hero__grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
.lead { margin-top: 22px; font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.5; max-width: 34em; }
.lead--note {
  margin-top: 14px; padding-left: 14px; border-left: 3px solid var(--green);
  font-size: 1.0625rem; color: var(--ink);
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 32px; }
.hero__for {
  margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule-strong); max-width: 34em;
  font: 500 0.75rem/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}

/* the drawing sheet */
.sheet {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  box-shadow: 8px 8px 0 0 var(--sheet-shadow);
  min-width: 0;
}
.plan { width: 100%; height: auto; padding: 14px 14px 4px; }
.plan text { font-family: var(--mono); font-weight: 500; }
.room__fill { fill: transparent; transition: fill 0.6s ease; }
.room__hatch { fill: none; opacity: 0; transition: opacity 0.6s ease; }
.room[data-state='calm'] .room__fill { fill: var(--green-tint); }
.room[data-state='attention'] .room__fill { fill: var(--ochre-tint); }
.room[data-state='attention'] .room__hatch { fill: url(#hatch-light); opacity: 1; }
.room[data-state='alert'] .room__fill { fill: var(--pen-tint); }
.room[data-state='alert'] .room__hatch { fill: url(#hatch-heavy); opacity: 1; }
.hatch-l { stroke: var(--ochre-line); stroke-width: 1.5; opacity: 0.45; }
.hatch-h { stroke: var(--pen-line); stroke-width: 1.8; opacity: 0.5; }
.room__name { font-size: 13px; fill: var(--muted); letter-spacing: 0.06em; }
.room__load {
  font-size: 34px; fill: var(--ink); text-anchor: middle;
  paint-order: stroke; stroke: var(--card); stroke-width: 6px; stroke-linejoin: round;
}
.room__state {
  font-size: 11.5px; fill: var(--text); text-anchor: middle; letter-spacing: 0.1em; text-transform: uppercase;
  paint-order: stroke; stroke: var(--card); stroke-width: 5px; stroke-linejoin: round;
}
.room[data-state='alert'] .room__state { fill: var(--pen); }
.room--off .room__fill { fill: transparent; }
.room--off .room__state { fill: var(--muted); stroke: none; }
.plan__label { font-size: 11px; fill: var(--muted); text-anchor: middle; letter-spacing: 0.3em; }
.walls { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: square; }
.doors { fill: none; stroke: var(--ink); stroke-width: 1; opacity: 0.55; }
.dim path { fill: none; stroke: var(--muted); stroke-width: 1; }
.dim text { font-size: 10px; fill: var(--muted); text-anchor: middle; letter-spacing: 0.14em; }

.reading {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0;
  border-top: 1.5px solid var(--ink);
}
.reading > div { padding: 14px 16px; }
.reading__now { border-right: 1px solid var(--rule-strong); }
.reading__value {
  display: flex; align-items: center; gap: 12px; margin-top: 2px;
  font: 500 2.6rem/1.1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums;
}
.reading__unit { font-size: 0.8125rem; color: var(--muted); }
.chip {
  font: 500 0.6875rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 8px; border: 1px solid currentColor; border-radius: 2px; white-space: nowrap;
}
.chip[data-state='calm'] { color: var(--green); background: var(--green-tint); }
.chip[data-state='attention'] { color: var(--ochre); background: var(--ochre-tint); }
.chip[data-state='alert'] { color: var(--pen); background: var(--pen-tint); }
.reading__chart svg { width: 100%; height: 70px; overflow: visible; }
.spark__line { fill: none; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark__th { stroke: var(--pen-line); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.reading__axis {
  display: flex; justify-content: space-between; margin-top: 4px;
  font: 500 0.6875rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.reading__axis span:first-child { color: var(--pen); }
.reading__tip {
  grid-column: 1 / -1; border-top: 1px solid var(--rule-strong);
  border-left: 4px solid var(--green); min-height: 74px;
  transition: border-color 0.4s ease, background-color 0.4s ease;
}
.reading__tip[data-state='attention'] { border-left-color: var(--ochre-line); }
.reading__tip[data-state='alert'] { border-left-color: var(--pen-line); background: var(--pen-tint); }
.reading__tiptext { font-weight: 700; color: var(--ink); font-size: 1.0625rem; }
.sheet figcaption {
  padding: 8px 16px; border-top: 1.5px solid var(--ink);
  font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  text-align: right;
}
@media (max-width: 420px) {
  .reading { grid-template-columns: 1fr; }
  .reading__now { border-right: 0; border-bottom: 1px solid var(--rule-strong); }
}

/* ── Facts ── */
.facts { border-bottom: 1px solid var(--rule); }
.facts__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fact { padding: 26px 18px 26px 0; font-size: 0.9688rem; line-height: 1.45; }
.fact + .fact { padding-left: 18px; border-left: 1px solid var(--rule); }
.fact__n { font: 500 clamp(1.8rem, 3.2vw, 2.5rem)/1.1 var(--mono); color: var(--ink); margin-bottom: 6px; }
@media (max-width: 759px) {
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}
@media (min-width: 760px) {
  .facts__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Sections ── */
.sec { padding: clamp(56px, 8vw, 104px) 0; }
.sec--tint { background: var(--paper-2); border-block: 1px solid var(--rule); }
.sec__lead { margin-top: 18px; font-size: 1.1875rem; max-width: 40em; }

.steps { display: grid; gap: 0; margin-top: 44px; counter-reset: none; }
.steps li { padding: 26px 0; border-top: 1.5px solid var(--ink); }
.steps__n {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  font: 500 0.9375rem/1 var(--mono); color: var(--ink);
}
.steps p { margin-top: 8px; max-width: 34em; }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
}

.roles { display: grid; margin-top: 44px; border: 1.5px solid var(--ink); background: var(--card); border-radius: 2px; }
.roles article { padding: 26px 24px 28px; }
.roles article + article { border-top: 1px solid var(--rule-strong); }
.roles h3 { margin: 10px 0 8px; font-size: 1.1875rem; }
@media (min-width: 860px) {
  .roles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .roles article + article { border-top: 0; border-left: 1px solid var(--rule-strong); }
}

.split { display: grid; gap: 36px; }
.split__head p:not(.eyebrow) { margin-top: 18px; max-width: 34em; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 64px; }
  .split__head { position: sticky; top: 100px; align-self: start; }
}

.legend > div {
  display: grid; gap: 4px 24px; padding: 18px 0; border-top: 1px solid var(--rule-strong);
}
.legend > div:last-child { border-bottom: 1px solid var(--rule-strong); }
.legend dt { font-weight: 700; color: var(--ink); }
@media (min-width: 560px) {
  .legend > div { grid-template-columns: 11.5rem minmax(0, 1fr); }
}

.limits li { padding: 18px 0; border-top: 1px solid var(--rule-strong); }
.limits li:last-child { border-bottom: 1px solid var(--rule-strong); }
.limits strong, .pledges strong { color: var(--ink); }

/* ── Privacy: blueprint band ── */
.blueprint {
  background-color: var(--bp-bg);
  background-image: linear-gradient(var(--bp-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--bp-text);
}
.blueprint h2 { color: var(--bp-ink); }
.blueprint .eyebrow, .blueprint .label { color: var(--bp-line); }
.ledger { display: grid; margin-top: 40px; border: 1.5px solid var(--bp-line); background: var(--bp-bg-2); border-radius: 2px; }
.ledger__col { padding: 24px; }
.ledger__col + .ledger__col { border-top: 1px dashed var(--bp-line); }
.ledger ul { margin-top: 14px; display: grid; gap: 10px; }
.ledger li { position: relative; padding-left: 28px; color: var(--bp-ink); }
.ledger li::before {
  content: ''; position: absolute; left: 0; top: 0.42em; width: 14px; height: 8px;
  border-left: 2px solid #7dae8c; border-bottom: 2px solid #7dae8c; transform: rotate(-45deg) translateY(-2px);
}
.ledger__col--no li::before {
  width: 14px; height: 0; top: 0.78em; border-left: 0; border-bottom: 2px solid #e48a6c; transform: none;
}
@media (min-width: 760px) {
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger__col + .ledger__col { border-top: 0; border-left: 1px dashed var(--bp-line); }
}
.pledges { display: grid; gap: 22px 48px; margin-top: 40px; }
.pledges strong { display: block; color: var(--bp-ink); margin-bottom: 2px; }
@media (min-width: 760px) {
  .pledges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.fineprint { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--bp-rule); font-size: 0.9375rem; color: var(--bp-line); }

/* ── Installation ── */
.modes { display: grid; gap: 20px; margin-top: 44px; }
.mode {
  padding: 26px 24px 28px; background: var(--card);
  border: 1.5px solid var(--ink); border-radius: 2px; box-shadow: 6px 6px 0 0 var(--sheet-shadow);
}
.mode h3 { margin: 10px 0 8px; font: 560 1.5rem/1.2 var(--display); letter-spacing: -0.01em; }
@media (min-width: 760px) {
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}
.needs { display: grid; margin-top: 44px; }
.needs > div { padding: 18px 0; border-top: 1px solid var(--rule-strong); }
.needs dt { font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
@media (min-width: 760px) {
  .needs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
}

/* ── FAQ ── */
.faq { margin-top: 36px; border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule-strong); }
.faq summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 18px 0; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 1.125rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 500 1.25rem/1 var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 20px; max-width: 38em; }

/* ── Closing band ── */
.cta { background: var(--bp-bg-2); color: var(--bp-text); border-top: 1px solid var(--bp-rule); padding: clamp(48px, 7vw, 84px) 0; }
.cta h2 { color: var(--bp-ink); }
.cta p { margin-top: 12px; max-width: 30em; font-size: 1.125rem; }
.cta__in { display: grid; gap: 28px; align-items: center; }
.cta__mail { font-size: 0.9375rem !important; }
.cta__mail a { color: var(--bp-ink); text-underline-offset: 4px; }
@media (min-width: 860px) {
  .cta__in { grid-template-columns: minmax(0, 1fr) auto; gap: 64px; }
}

/* ── Footer ── */
.foot { background: var(--bp-bg); color: var(--bp-text); border-top: 1px solid var(--bp-rule); font-size: 0.9375rem; }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 26px; }
.foot__brand { font: 600 1.125rem/1 var(--display); color: var(--bp-ink); }
.foot__brand span { font: 400 0.9375rem/1 var(--sans); color: var(--bp-text); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a { text-decoration: none; padding: 6px 0; }
.foot nav a:hover { color: var(--bp-ink); text-decoration: underline; text-underline-offset: 4px; }
.foot__copy { margin-left: auto; color: var(--bp-line); }

/* On a phone the plan is too small for the state words: colour, hatching and the
   reading below already say it. */
@media (max-width: 560px) {
  .room__state, .dim text, .plan__label { display: none; }
  .room--off .room__name { font-size: 12px; }
  .plan { padding: 10px 10px 0; }
}
