/* ==========================================================================
   DoClean — Sistema de diseño (tokens)
   Mobile-first. Todo se deriva de estas variables.
   ========================================================================== */

/* --- Tipografía de titulares: Archivo (autoalojada, variable) --------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tipografía de cuerpo: Inter (autoalojada, variable) ------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* --- Color · paleta monocroma (blanco y negro de la marca) -------------
     Dos negros deliberados: tinta (casi puro) y carbón, para que los
     bloques oscuros no se confundan entre sí.                              */
  --c-ink:            #0D0D0D;   /* negro puro: pie, héroe, nodo */
  --c-charcoal:       #1E1E1E;   /* carbón: secciones oscuras de contenido */
  --c-body:           #2A2A2A;   /* texto de párrafo */
  --c-muted:          #6B6B6B;   /* texto secundario, captions */

  --c-brand:          #161616;   /* negro de marca: botones, íconos, acentos */
  --c-brand-dark:     #000000;   /* hover, énfasis */
  --c-brand-light:    #9A9A9A;   /* detalles, bordes activos */

  --c-eco:            #1E1E1E;   /* secciones oscuras (antes verde) = carbón */

  --c-vapor:          #F2F2F0;   /* fondo de página (gris muy claro) */
  --c-cotton:         #FFFFFF;   /* fondo de tarjetas / superficies */
  --c-line:           #E2E2DF;   /* divisores, bordes sutiles */
  --c-hairline:       rgba(255, 255, 255, 0.12); /* filete sobre oscuro */

  --c-on-brand:       #FFFFFF;   /* texto sobre negro */
  --c-focus:          var(--c-accent);   /* anillo de foco de teclado (acento) */

  /* --- Color de acento (único color fuera de la escala de grises) -------
     Verde: resalta igual sobre negro y blanco, transmite limpieza/frescura.
     Uso deliberadamente limitado: botones primarios, bordes activos/foco. */
  --c-accent:         #16B364;
  --c-accent-dark:    #0E8F4F;   /* hover / texto sobre fondos claros */
  --c-accent-tint:    #E3F8EC;   /* fondo suave en hover sobre blanco */

  /* --- Tipografía --------------------------------------------------------
     Titulares: Archivo (grotesca ancha). Cuerpo e interfaz: Inter.
     Ambas autoalojadas y variables.                                         */
  --font-display: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ui:      "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-bold:    800;

  /* Escala fluida: min en móvil (~360px), max en desktop (~1200px). */
  --fs-eyebrow: 0.8125rem;                                    /* 13px fijo */
  --fs-small:   0.9375rem;                                    /* 15px */
  --fs-body:    clamp(1.0625rem, 1.02rem + 0.22vw, 1.1875rem); /* 17 → 19 */
  --fs-lead:    clamp(1.1875rem, 1.09rem + 0.45vw, 1.375rem);  /* 19 → 22 */
  --fs-h3:      clamp(1.25rem, 1.14rem + 0.5vw, 1.5rem);       /* 20 → 24 */
  --fs-h2:      clamp(1.625rem, 1.38rem + 1.2vw, 2.125rem);    /* 26 → 34 */
  --fs-h1:      clamp(1.9375rem, 1.55rem + 1.9vw, 2.75rem);    /* 31 → 44 */
  --fs-display: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);          /* 32 → 52 */

  --lh-tight:  1.12;
  --lh-snug:   1.3;
  --lh-normal: 1.6;

  --ls-tight:   -0.006em;
  --ls-eyebrow:  0.16em;

  /* --- Espaciado (base 4px) --------------------------------------------- */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;

  /* Ritmo vertical de secciones (fluido) */
  --section-y: clamp(3rem, 2rem + 5vw, 6rem);

  /* --- Layout ---------------------------------------------------------- */
  --wrap:      1120px;
  --wrap-text: 68ch;
  --gutter:    clamp(1rem, 0.5rem + 3vw, 2.5rem);

  /* --- Bordes y sombras ---------------------------------------------- */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(20, 20, 20, 0.06);
  --shadow:    0 6px 24px rgba(10, 78, 88, 0.10);

  /* --- Movimiento -------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur:  200ms;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */

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

* { margin: 0; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--c-body);
  background: var(--c-vapor);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }

input, button, textarea, select { font: inherit; color: inherit; }

p, li {
  text-wrap: pretty;
  hyphens: manual;          /* nunca cortar palabras a mitad de línea */
  -webkit-hyphens: manual;
  overflow-wrap: break-word; /* solo parte una palabra si de otro modo se desborda */
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--c-ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }

a { color: var(--c-brand-dark); text-underline-offset: 0.15em; }
a:hover { color: var(--c-brand); }

/* Foco de teclado visible y consistente */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Respeto por reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Utilidades mínimas (se ampliarán en main.css)
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-brand);
  overflow-wrap: break-word;
  hyphens: manual;
}

.lead { font-size: var(--fs-lead); line-height: var(--lh-snug); color: var(--c-body); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
