/* ============================================================
   THE CHALLENGE — GEOVANNY · TOKENS COMPILADOS (producción)
   Generado desde tokens/{fonts,colors,typography,spacing,base}.css
   del design system. NO editar a mano: editar el DS y recompilar.
   ============================================================ */

/* ============================================================
   FONTS — Barlow family (racing DNA) + JetBrains Mono (timing)
   Served from Google Fonts CDN. To fully self-host, drop woff2
   files in assets/fonts/ and swap these @import lines for
   @font-face rules. Flagged to user.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600;1,700;1,800&family=Barlow+Condensed:ital,wght@0,500;0,600;0,700;1,600;1,700;1,800&family=Barlow+Semi+Condensed:wght@500;600;700&family=JetBrains+Mono:wght@500;600;700&display=swap');


/* ============================================================
   THE CHALLENGE — GEOVANNY · COLOR TOKENS
   Dark-base racing system. ONE canonical cyan (Pantone 2995 C).
   Racing red leads the CHALLENGE competition line.
   ============================================================ */

:root {
  /* ---- Brand cyan — Pantone 2995 C (THE canonical cyan) ---- */
  /* Faithful to 2995 C for identity; used SPARINGLY in UI (nav/active/focus). */
  --cyan-050: #E3F6FF;
  --cyan-100: #BCEAFF;
  --cyan-200: #82D7FB;
  --cyan-300: #4CC0EE;
  --cyan-400: #16ABE2;
  --cyan-500: #00A2E0;   /* brand anchor — Pantone 2995 C */
  --cyan-600: #0883B4;
  --cyan-700: #0A688C;
  --cyan-800: #0B5172;
  --cyan-900: #0C4058;

  /* ---- Racing red — CARMESÍ PROFUNDO (oxblood). Canonical race accent. ---- */
  /* Deep & desaturated → "carrera" sin "alarma". Replaces the old bright #E4002B. */
  --red-050: #F8E5E9;
  --red-100: #EFC6CD;
  --red-200: #DF98A4;
  --red-300: #D2647A;
  --red-400: #BC3A53;
  --red-500: #9E1B32;   /* carmesí profundo — canonical */
  --red-600: #871528;   /* hover */
  --red-700: #6E0F20;
  --red-800: #520B18;
  --red-900: #370710;

  /* ---- Bone / sand — premium warm neutral (the "hueso" canvas) ---- */
  /* Pairs with the dark base for editorial light/dark rhythm; home of MADE FOR PROS. */
  --bone-050: #FBF9F4;
  --bone-100: #F4EFE5;
  --bone-200: #ECE7DD;   /* canonical bone */
  --bone-300: #DBD3C4;
  --bone-400: #BEB5A2;

  /* ---- Gold sand — Comfort product line + podium 1 (secondary accent only) ---- */
  --gold-300: #E2C887;
  --gold-500: #C8A24B;
  --gold-700: #9A7A32;

  /* ---- Ink — near-black neutral ramp, faint COOL cast (base #080808) ---- */
  --ink-950: #080808;   /* canonical base (brief) */
  --ink-900: #0B0D10;
  --ink-850: #0F1217;
  --ink-800: #14171C;
  --ink-700: #1C2026;
  --ink-600: #262B33;
  --ink-500: #333944;
  --ink-400: #49505C;
  --ink-300: #69707E;
  --ink-200: #98A0AD;
  --ink-100: #C6CCD5;
  --ink-050: #E8EAEE;
  --white:   #FFFFFF;

  /* ---- Status ---- */
  --green-500: #1FB67A;
  --amber-500: #F5A524;
  --blue-500:  #2F7DF6;

  /* ============================================================
     SEMANTIC ALIASES — author UI against these
     ============================================================ */

  /* Surfaces (dark) */
  --surface-base:    var(--ink-950);
  --surface-sunken:  #050608;
  --surface-raised:  var(--ink-850);
  --surface-card:    var(--ink-800);
  --surface-inset:   var(--ink-900);
  --surface-overlay: rgba(6, 7, 9, 0.80);
  --surface-invert:  var(--white);

  /* Bone canvas (light sections / inverse surfaces) */
  --canvas-bone:    var(--bone-200);
  --canvas-bone-sunken: var(--bone-300);
  --text-on-bone:   #16120C;
  --text-on-bone-soft: #5C5343;

  /* Text */
  --text-primary:   var(--ink-050);
  --text-secondary: var(--ink-200);
  --text-muted:     var(--ink-300);
  --text-disabled:  var(--ink-400);
  --text-inverse:   var(--ink-950);
  --text-on-brand:  var(--white);
  --text-on-racing: var(--white);

  /* Brand & accent — cyan is identity; deploy SPARINGLY (1 accent per view) */
  --brand:        var(--cyan-500);
  --brand-strong: var(--cyan-600);
  --brand-soft:   rgba(0, 162, 224, 0.12);
  --brand-line:   rgba(0, 162, 224, 0.30);

  --racing:        var(--red-500);
  --racing-strong: var(--red-600);
  --racing-soft:   rgba(158, 27, 50, 0.16);
  --racing-line:   rgba(158, 27, 50, 0.40);

  /* Borders & dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.26);
  --divider:       rgba(255, 255, 255, 0.06);

  /* Focus ring (AA visible) */
  --focus-ring: var(--cyan-400);

  /* Status semantic */
  --success: var(--green-500);
  --warning: var(--amber-500);
  --danger:  var(--red-500);
  --info:    var(--cyan-500);

  /* Podium / standings accents */
  --podium-1: var(--gold-500);
  --podium-2: #C9CDD4;
  --podium-3: #C77B3C;
}


/* ============================================================
   TYPOGRAPHY TOKENS
   Display = Barlow Condensed, bold, ITALIC, UPPERCASE → racing DNA.
   UI / body = Barlow. Data / timing = JetBrains Mono (tabular).
   ============================================================ */

:root {
  /* Families */
  --font-display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --font-sans:    'Barlow', system-ui, -apple-system, sans-serif;
  --font-semi:    'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Weights */
  --fw-regular: 400; /* @kind other */
  --fw-medium:  500; /* @kind other */
  --fw-semibold: 600; /* @kind other */
  --fw-bold:    700; /* @kind other */
  --fw-extra:   800; /* @kind other */

  /* Fluid type scale (mobile-first; clamps up for larger viewports) */
  --text-2xs: 0.6875rem;  /* 11px — micro labels, bib subtext */
  --text-xs:  0.75rem;    /* 12px */
  --text-sm:  0.875rem;   /* 14px */
  --text-md:  1rem;       /* 16px — base body */
  --text-lg:  1.125rem;   /* 18px */
  --text-xl:  1.375rem;   /* 22px */
  --text-2xl: 1.625rem;   /* ↑ 2.125rem @ md (see base.css) */
  --text-3xl: 2rem;       /* ↑ 3rem @ md */
  --text-4xl: 2.6rem;     /* ↑ 4.5rem @ md */
  --text-5xl: 3.2rem;     /* ↑ 6rem @ md */

  /* Line heights */
  --lh-tight:   1.02; /* @kind other */
  --lh-snug:    1.12; /* @kind other */
  --lh-heading: 1.18; /* @kind other */
  --lh-body:    1.55; /* @kind other */
  --lh-relaxed: 1.7; /* @kind other */

  /* Letter spacing */
  --ls-display: 0.005em; /* @kind other */
  --ls-tight:  -0.01em; /* @kind other */
  --ls-normal: 0; /* @kind other */
  --ls-wide:   0.04em; /* @kind other */
  --ls-label:  0.12em; /* @kind other */
  --ls-mega:   0.18em; /* @kind other */

  /* ---- Semantic roles ---- */
  /* Racing display: condensed, bold, italic, uppercase */
  --role-display-family: var(--font-display);
  --role-display-weight: var(--fw-bold); /* @kind other */
  --role-display-style:  italic; /* @kind other */
  --role-display-transform: uppercase; /* @kind other */

  --role-eyebrow-family: var(--font-semi);
  --role-eyebrow-size:   var(--text-xs);
  --role-eyebrow-weight: var(--fw-bold); /* @kind other */
  --role-eyebrow-spacing: var(--ls-label); /* @kind other */

  --role-body-family: var(--font-sans);
  --role-body-size:   var(--text-md);
  --role-body-line:   var(--lh-body); /* @kind other */

  --role-data-family: var(--font-mono);
  --role-data-feature: 'tnum' 1, 'zero' 1; /* @kind other */
}

/* Optional helper classes consumers may use directly */
.gv-display {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-style: italic;
  text-transform: uppercase;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}
.gv-eyebrow {
  font-family: var(--font-semi);
  font-weight: var(--fw-bold);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  line-height: 1.2;
}
.gv-data {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1, 'zero' 1;
  font-variant-numeric: tabular-nums;
}


/* ============================================================
   SPACING · RADII · SHADOWS · MOTION · LAYOUT
   8pt base grid. Mobile-first; AA touch targets ≥ 44px.
   ============================================================ */

:root {
  /* Spacing scale (8pt grid w/ 4pt halves) */
  --space-0:  0;
  --space-1:  0.25rem;  /* 4 */
  --space-2:  0.5rem;   /* 8 */
  --space-3:  0.75rem;  /* 12 */
  --space-4:  1rem;     /* 16 */
  --space-5:  1.25rem;  /* 20 */
  --space-6:  1.5rem;   /* 24 */
  --space-8:  2rem;     /* 32 */
  --space-10: 2.5rem;   /* 40 */
  --space-12: 3rem;     /* 48 */
  --space-16: 4rem;     /* 64 */
  --space-20: 5rem;     /* 80 */
  --space-24: 6rem;     /* 96 */

  /* Touch / control sizing */
  --control-h-sm: 36px;
  --control-h:    44px;   /* AA minimum hit target */
  --control-h-lg: 52px;
  --tap-min:      44px;

  /* Radii — tight, technical (racing kit, not soft consumer) */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Borders */
  --border-w: 1px;
  --border-w-strong: 2px;

  /* Shadows — restrained on dark; lean on borders + glow accents */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
  --shadow-pop: 0 24px 64px rgba(0, 0, 0, 0.7);
  --glow-brand:  0 0 0 1px var(--brand-line), 0 8px 28px rgba(0, 162, 224, 0.18);
  --glow-racing: 0 0 0 1px var(--racing-line), 0 8px 28px rgba(158, 27, 50, 0.28);

  /* Layout */
  --container-max: 1200px;
  --content-max: 720px;
  --gutter: var(--space-4);
  --gutter-lg: var(--space-8);
  --header-h: 60px;
  --tabbar-h: 64px;

  /* Z-index */
  --z-base: 0; /* @kind other */
  --z-sticky: 100; /* @kind other */
  --z-header: 200; /* @kind other */
  --z-overlay: 800; /* @kind other */
  --z-modal: 900; /* @kind other */
  --z-toast: 1000; /* @kind other */

  /* Motion — quick, mechanical, confident (no playful bounce) */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* @kind other */
  --ease-sharp: cubic-bezier(0.16, 1, 0.3, 1); /* @kind other */
  --dur-fast: 120ms; /* @kind other */
  --dur-base: 200ms; /* @kind other */
  --dur-slow: 320ms; /* @kind other */

  /* Decorative angle — the GEOVANNY forward lean (use sparingly) */
  --skew-italic: -10deg; /* @kind other */
}


/* ============================================================
   BASE — resets + element defaults on the dark racing canvas
   ============================================================ */

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

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

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--fw-bold); line-height: var(--lh-heading); }
p { margin: 0; text-wrap: pretty; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--cyan-400); }

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

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

::selection { background: var(--racing); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Tabular numerals everywhere numbers matter */
.tnum { font-variant-numeric: tabular-nums; }

/* Fluid display sizes scale up past the mobile breakpoint */
@media (min-width: 768px) {
  :root {
    --text-2xl: 2.125rem;
    --text-3xl: 3rem;
    --text-4xl: 4.5rem;
    --text-5xl: 6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
