/* From Lab to Plant — estilos del sitio
   Tokens del Design System "From Lab to Plant". Sin degradados ni sombras.
   Ámbar solo como relleno y una vez por pantalla (círculo mayor del logotipo). */

@font-face {
  font-family: "Fraunces";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400.woff") format("woff");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-700.woff") format("woff");
}
/* OPCIONAL — IBM Plex Sans alojada en tu servidor (ver LEEME.md, paso "Tipografía del cuerpo").
   Descarga los archivos, ponlos en /fonts y descomenta este bloque.
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); }
*/

:root {
  --bg: #F7F4EC;
  --surface: #EAE5D8;
  --border: #CFC8B8;
  --border-strong: #55646B;
  --text: #12222A;
  --muted: #55646B;
  --primary: #0F3D4C;
  --on-primary: #F7F4EC;
  --accent: #E07A2F;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1C22;
    --surface: #15272E;
    --border: #2A3F47;
    --border-strong: #A8B5BA;
    --text: #F3EFE5;
    --muted: #A8B5BA;
    --primary: #7DB5C6;
    --on-primary: #0E1C22;
    --accent: #F0985A;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
  min-width: 0;
}
section[id], header[id] { scroll-margin-top: 16px; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 2px; }
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 10;
  background: var(--primary); color: var(--on-primary);
  padding: 12px 20px; border-radius: 6px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%; max-width: 1120px; margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

/* Logotipo horizontal: escalera 16/24/40/64/96 × --s, círculo mayor en ámbar */
.logo {
  --s: .26;
  display: inline-block; white-space: nowrap; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em;
  font-size: calc(100px * var(--s)); line-height: 1.25; color: var(--primary);
}
.logo i { display: inline-block; border-radius: 50%; background: currentColor; margin-right: calc(16px * var(--s)); }
.logo i:nth-child(1) { width: calc(16px * var(--s)); height: calc(16px * var(--s)); }
.logo i:nth-child(2) { width: calc(24px * var(--s)); height: calc(24px * var(--s)); }
.logo i:nth-child(3) { width: calc(40px * var(--s)); height: calc(40px * var(--s)); }
.logo i:nth-child(4) { width: calc(64px * var(--s)); height: calc(64px * var(--s)); }
.logo i:nth-child(5) { width: calc(96px * var(--s)); height: calc(96px * var(--s)); margin-right: calc(54px * var(--s)); background: var(--accent); }
.logo--mono { color: var(--text); }
.logo--mono i:nth-child(5) { background: currentColor; }
.logo--footer { --s: .22; }

/* Tipografía */
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 400;
  letter-spacing: .5px; text-transform: uppercase; color: var(--muted);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; color: var(--text); text-wrap: balance; }
h1 { font-size: 48px; line-height: 54px; letter-spacing: -0.5px; }
h2 { font-size: 32px; line-height: 38px; letter-spacing: -0.3px; }
h3 { font-size: 22px; line-height: 30px; }
p { margin: 0; }
.lead { font-size: 18px; line-height: 28px; max-width: 540px; }
.mono { font-family: var(--font-mono); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 6px;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn--sm { min-height: 44px; padding: 0 20px; }

/* Cabecera */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { padding-top: 20px; padding-bottom: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 500; padding: 8px 0; }
.site-nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }

/* Secciones */
.section { border-top: 1px solid var(--border); }
.section .wrap { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 32px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px; }
.cols > * { min-width: 0; }

/* Hero */
.hero .wrap { padding-top: 80px; padding-bottom: 64px; align-items: stretch; }
.hero .cols { align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; }
.example { background: var(--primary); color: var(--on-primary); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.example .label { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .5px; text-transform: uppercase; }
.example .big { font-family: var(--font-mono); font-weight: 700; font-size: 56px; line-height: 60px; }
.example p { max-width: 380px; }
.example .src { font-family: var(--font-mono); font-size: 14px; line-height: 22px; }
.ladder { display: flex; align-items: flex-end; gap: 8px; margin-top: 16px; }
.ladder b { display: block; border-radius: 50%; background: var(--on-primary); }
.ladder b:nth-child(1) { width: 8px; height: 8px; }
.ladder b:nth-child(2) { width: 12px; height: 12px; }
.ladder b:nth-child(3) { width: 20px; height: 20px; }
.ladder b:nth-child(4) { width: 32px; height: 32px; }
.ladder b:nth-child(5) { width: 48px; height: 48px; }

/* Reglas */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.card { min-width: 0; background: var(--surface); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card .num { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .5px; color: var(--muted); }

/* Listas */
.rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--border); }
.rows > li { border-top: 1px solid var(--border); }
.resource { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 20px 0; }
.resource h3 { flex: 1 1 320px; min-width: 0; }
.meta { font-family: var(--font-mono); font-size: 14px; line-height: 22px; color: var(--muted); }
.tag {
  display: inline-block; font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .5px; text-transform: uppercase;
  padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: 2px; color: var(--text);
}
.band { background: var(--surface); border-top: 1px solid var(--border); }
.origin-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.origin-row .tag { min-width: 96px; text-align: center; }
.origin-row span:last-child { flex: 1 1 220px; min-width: 0; }
.facts li { padding: 16px 0; }

/* Newsletter */
.news { background: var(--primary); color: var(--on-primary); border-radius: 12px; padding: 48px 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 32px; align-items: center; }
.news > * { min-width: 0; }
.news h2 { color: var(--on-primary); }
.news p { max-width: 460px; }
.news label { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .5px; text-transform: uppercase; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; }
.form-row input {
  flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: 6px;
  border: 1px solid var(--on-primary); background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px;
}
.form-row input::placeholder { color: var(--muted); opacity: 1; }
.form-row button {
  min-height: 48px; padding: 0 24px; border-radius: 6px; border: 1px solid var(--on-primary);
  background: var(--on-primary); color: var(--primary); font-family: var(--font-body); font-size: 16px; font-weight: 600; cursor: pointer;
}
.news :focus-visible { outline-color: var(--on-primary); }
.fine { font-size: 14px; line-height: 22px; }
.fine a { text-underline-offset: 3px; }
.status { min-height: 22px; font-size: 14px; line-height: 22px; font-weight: 600; }

/* Pie */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .wrap { padding-top: 40px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 24px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .5px; text-transform: uppercase; }
.footer-links a { text-decoration: none; padding: 8px 0; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-links .soon { color: var(--muted); }
.small { font-size: 14px; line-height: 22px; color: var(--muted); }

/* Página legal */
.legal .wrap { max-width: 760px; padding-top: 64px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 32px; }
.legal h2 { font-size: 24px; line-height: 32px; margin-top: 16px; }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.legal p + p { margin-top: 12px; }
.legal dl { margin: 0; display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 8px 24px; }
.legal dt { font-family: var(--font-mono); font-size: 12px; line-height: 26px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.legal dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.todo { font-family: var(--font-mono); font-size: 14px; padding: 1px 6px; border: 1px dashed var(--border-strong); border-radius: 2px; }
@media (max-width: 520px) {
  h1 { font-size: 38px; line-height: 44px; }
  h2 { font-size: 28px; line-height: 34px; }
  .hero .wrap { padding-top: 48px; }
  .legal dl { grid-template-columns: 1fr; gap: 0; }
  .legal dd { margin-bottom: 12px; }
  .news { padding: 32px 24px; }
}
