/* ============================================================
   base.css
   Tokens de marca + escala tipográfica + utilitarios base.
   Toda la paleta, tipografía y espaciado vive aquí.
   Para repaletar la web: cambiar las variables de :root y nada más.
============================================================ */

:root {
  /* ── Color palette ───────────────────────────────────────── */
  --bg:               #0A0A0A;        /* Fondo único de la web */
  --bg-elev:          #0E0E0E;        /* Variación hover sutil   */
  --bg-card:          #111111;        /* Cards opacos (no usado tras glassmorphism global) */
  --line:             #1C1C1C;        /* Hairlines internas      */
  --line-strong:      #262626;        /* Bordes con peso         */

  --fg:               #FFFFFF;        /* Texto principal         */
  --fg-muted:         #C8C8C8;        /* Texto secundario        */
  --fg-dim:           #8A8A8A;        /* Microcopy / disabled    */

  --accent:           #5BE9F5;        /* Cian holográfico        */
  --accent-dim:       oklch(0.72 0.14 205);
  --accent-glow:      oklch(0.86 0.15 200 / 0.35);

  /* ── Glass tokens ────────────────────────────────────────── */
  --glass-bg:           rgba(255, 255, 255, 0.025);
  --glass-bg-hover:     rgba(255, 255, 255, 0.045);
  --glass-border:       rgba(255, 255, 255, 0.07);
  --glass-border-hover: rgba(255, 255, 255, 0.14);

  /* ── Layout ──────────────────────────────────────────────── */
  --max:    1280px;
  --pad:    clamp(20px, 4vw, 56px);

  /* ── Radii ───────────────────────────────────────────────── */
  --r-sm:   6px;
  --r:      10px;
  --r-lg:   16px;
  --r-pill: 999px;

  /* ── Typography ──────────────────────────────────────────── */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ── Motion ──────────────────────────────────────────────── */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --t-fast:  140ms;
  --t-base:  220ms;
  --t-slow:  420ms;

  /* ── Z-index scale ───────────────────────────────────────── */
  --z-canvas:  0;
  --z-content: 2;
  --z-sticky:  90;
  --z-header:  100;
  --z-overlay: 200;
}

/* ── Base body ─────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-feature-settings: 'ss01', 'cv11';
}

::selection { background: var(--accent); color: #001216; }

/* ── Typographic scale ─────────────────────────────────────── */
.h-display {
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 500;
  margin: 0;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.5);
}
.h1 {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.5);
}
.h2 {
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}
.h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0;
}
.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  color: var(--fg);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.muted { color: var(--fg-muted); }
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.mono-accent { color: var(--accent); }

/* ── Layout primitives ─────────────────────────────────────── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section {
  padding: clamp(120px, 16vh, 200px) 0;
  position: relative;
}
.section.no-border { border-top: none; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(40px, 6vh, 72px);
  flex-wrap: wrap;
}
.section-head .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

/* ── Page enter transition (used by router on swap) ────────── */
.page { animation: pageIn 320ms var(--ease-out); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ── Body grain — subtle ambient on top of the canvas ─────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-canvas);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(91, 233, 245, 0.04), transparent 60%);
}

/* All real content sits above the canvas */
.header, .wrap, .section, main, footer {
  position: relative;
  z-index: var(--z-content);
}
