/* ═══════════════════════════════════════════════════════════════
   SMILE VOLATILITY™ — Design System
   Paleta y tipografía tomadas del Manual de Identidad Corporativa.
   Poppins para titulos, Merriweather para cuerpo. Fondo SIEMPRE oscuro.
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700;800&display=swap');

/* Merriweather variable, local. Tipografia de cuerpo oficial. */
@font-face {
  font-family: 'Merriweather';
  src: url('../fonts/Merriweather.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Merriweather';
  src: url('../fonts/Merriweather-Italic.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ── Type scale ── */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl:  clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6.6vw, 7.5rem);

  /* ── Spacing ── */
  --space-1: .25rem;  --space-2: .5rem;   --space-3: .75rem;
  --space-4: 1rem;    --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;    --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;   --space-20: 5rem;   --space-24: 6rem;
  --space-32: 8rem;   --space-40: 10rem;

  /* ═══ PALETA OFICIAL · primarios ═══ */
  --smile-bright: #D7693A;   /* Smile Bright */
  --title-terra:  #D2643A;   /* Title Terra  */
  --smile-core:   #BE5530;   /* Smile Core   */
  --accent-terra: #B95A34;   /* Accent       */

  /* ═══ PALETA OFICIAL · secundarios ═══ */
  --tagline:      #EBD7C3;   /* Tagline — crema luminosa */
  --warm-white:   #FCF8F2;   /* Warm White */
  --muted:        #876450;   /* Muted */
  --whisper:      #5A3728;   /* Whisper — pie de página */
  --bg-dark:      #0A0504;   /* BG Dark — fondo de marca */

  /* ── Superficies derivadas del BG Dark ── */
  --void:      var(--bg-dark);
  --surface-1: #120907;
  --surface-2: #1A0E0A;
  --surface-3: #22140F;
  --hairline:  rgba(252,248,242,.09);
  --hairline-2:rgba(252,248,242,.18);

  /* ── Texto (jerarquía sobre warm white) ── */
  --ink:   var(--warm-white);
  --ink-2: rgba(252,248,242,.74);
  --ink-3: rgba(252,248,242,.48);
  --ink-4: rgba(252,248,242,.28);

  /* ── Acento activo: por defecto la marca madre ── */
  --accent:     var(--title-terra);
  --accent-lit: var(--smile-bright);

  /* ── Colores exclusivos de la línea Young Traders ──
     El manual no define sublíneas cromáticas; estos viven SOLO
     en las caras de la división teens, nunca en la marca madre. ── */
  --teen-dortmund: #FDE100;
  --teen-azul:     #1E5FCC;
  --teen-magenta:  #E8318C;
  --teen-cyan:     #00C8EB;
  --teen-verde:    #00C878;

  /* ── Tipografia: Poppins (titulos) + Merriweather (cuerpo) ── */
  --font-display: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-body:    'Merriweather', Georgia, 'Times New Roman', serif;

  /* ── Motion ── */
  --ease:     cubic-bezier(.22,1,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-el:  cubic-bezier(.34,1.56,.64,1);

  --max: 1440px;
  --gutter: clamp(1.25rem, 4vw, 5rem);
}

/* Tematización por línea. La madre y corporate/legacy usan la paleta
   oficial terracota; young es la única con color ajeno al manual. */
[data-line="madre"]     { --accent: var(--title-terra);  --accent-lit: var(--smile-bright); }
[data-line="young"]     { --accent: var(--teen-dortmund);--accent-lit: #FFF04D; }
[data-line="corporate"] { --accent: var(--tagline);      --accent-lit: var(--warm-white); }
[data-line="legacy"]    { --accent: var(--smile-core);   --accent-lit: var(--accent-terra); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.72;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Poppins Bold, SIEMPRE uppercase, tracking 5–8px según el manual */
h1,h2,h3,h4,h5,h6, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: .98;
  letter-spacing: .045em;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}

/* Merriweather Italic para taglines, sin letter-spacing adicional */
.tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--tagline);
  text-transform: none;
}

p { margin: 0 0 var(--space-4); text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent); color: var(--bg-dark); }

/* ── Utilidades ── */
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* Poppins Light uppercase, tracking 3–5px */
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .24em;
  color: var(--ink-3);
}

.mono-num { font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* Línea de acento del manual: 50px × 2px, terracota, centrada */
.accent-rule {
  width: 50px; height: 2px; background: var(--accent);
  border: 0; margin: var(--space-5) auto;
}

/* Reveal on scroll */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

.reveal-l { opacity: 0; transform: translateX(-34px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal-l.in { opacity: 1; transform: none; }

.reveal-s { opacity: 0; transform: scale(.94);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.reveal-s.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, .reveal-l, .reveal-s { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

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

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb {
  background: var(--surface-3); border-radius: 99px; border: 2px solid var(--void);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
