/* ==========================================================================
   Andri Rivera — Design Tokens
   Navy + Cream two-tone. General Sans only. Pills only. No second accent.
   ========================================================================== */

@font-face {
  font-family: 'General Sans';
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
  src: url('./fonts/GeneralSans-Variable.ttf') format('truetype-variations'),
       url('./fonts/GeneralSans-Variable.ttf') format('truetype');
}
@font-face {
  font-family: 'General Sans';
  font-weight: 200 700;
  font-style: italic;
  font-display: swap;
  src: url('./fonts/GeneralSans-VariableItalic.ttf') format('truetype-variations'),
       url('./fonts/GeneralSans-VariableItalic.ttf') format('truetype');
}
@font-face {
  font-family: 'Clash Display';
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
  src: url('./fonts/ClashDisplay-Variable.ttf') format('truetype-variations'),
       url('./fonts/ClashDisplay-Variable.ttf') format('truetype');
}

:root {
  /* ---------- Color: base ---------- */
  --navy-900:          #1C2540;   /* deeper — footers, shadow wells */
  --navy-800:          #2C365A;   /* PRIMARY. Hero + dark sections */
  --navy-700:          #3A466D;   /* subtle dark surface */
  --cream-100:         #EEE8DF;   /* PRIMARY light. Content sections + cream CTA */
  --cream-200:         #E4DDD0;   /* hover state for cream */
  --cream-300:         #D8D2C9;   /* pressed state for cream */
  --stone-500:         #C4BCB0;   /* muted warm gray — eyebrows, meta, muted on dark */
  --ochre-500:         #C8874A;   /* warm ochre accent — validation, success, secondary CTA (sparingly) */
  --ochre-600:         #B0723A;   /* pressed ochre */
  --ochre-300:         rgba(200, 135, 74, 0.14); /* soft ochre tint */
  --white:             #FFFFFF;   /* pure white for body copy on dark */
  --ink:               #151515;   /* near-black text on light */

  /* ---------- Color: transparent rules + overlays ---------- */
  --rule-on-dark:      rgba(238, 232, 223, 0.12);
  --rule-on-light:     rgba(44, 54, 90, 0.12);
  --grid-on-light:     rgba(44, 54, 90, 0.14);
  --orbit-stroke:      rgba(238, 232, 223, 0.13);
  --orbit-node:        rgba(238, 232, 223, 0.25);
  --fg-on-dark-muted:  rgba(255, 255, 255, 0.60);
  --fg-on-light-muted: rgba(44, 54, 90, 0.55);

  /* ---------- Semantic ---------- */
  --bg-hero:           var(--navy-800);
  --bg-dark:           var(--navy-800);
  --bg-darker:         var(--navy-900);
  --bg-light:          var(--cream-100);

  --fg-on-dark:        var(--white);
  --fg-on-light:       var(--navy-800);
  --fg-eyebrow:        var(--stone-500);

  --cta-bg:            var(--cream-100);
  --cta-bg-press:      var(--cream-300);
  --cta-fg:            var(--navy-800);

  /* ---------- Type ---------- */
  --font-display: 'Clash Display', 'General Sans', system-ui, sans-serif;
  --font-sans: 'General Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', Consolas, ui-monospace, monospace;

  --fw-light:   300;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold:600;
  --fw-bold:    700;
  --fw-xbold:   700;  /* clamped — Clash/General Sans max at 700 */
  --fw-black:   700;  /* clamped — Clash/General Sans max at 700 */

  /* Type scale */
  --t-hero:      clamp(72px, 12vw, 200px);  /* H1 logotype "ANDRI RIVERA" */
  --t-display:   clamp(40px, 5.5vw, 72px);  /* Big section H2 */
  --t-section:   clamp(36px, 4.2vw, 56px);  /* Medium section header */
  --t-stat:      clamp(64px, 8vw, 112px);   /* Numerals */
  --t-h3:        clamp(22px, 2.4vw, 32px);  /* Card title */
  --t-lead:      clamp(20px, 2.2vw, 28px);  /* Subhead */
  --t-body:      18px;                       /* Body copy */
  --t-small:     15px;                       /* Card body / meta */
  --t-xs:        13px;                       /* Caption */
  --t-eyebrow:   11px;                       /* Eyebrow label */

  --lh-tight:    1.02;
  --lh-snug:     1.15;
  --lh-medium:   1.35;
  --lh-body:     1.6;

  --track-hero:      -0.02em;
  --track-display:   -0.02em;
  --track-section:   -0.02em;
  --track-tight:     -0.01em;
  --track-normal:     0;
  --track-button:     0.02em;
  --track-caption:    0.10em;
  --track-eyebrow:    0.22em;

  /* ---------- Spacing (8px base) ---------- */
  --sp-1:   8px;
  --sp-2:   16px;
  --sp-3:   24px;
  --sp-4:   32px;
  --sp-5:   48px;
  --sp-6:   64px;
  --sp-7:   96px;
  --sp-8:   120px;
  --sp-9:   160px;

  --section-pad-y:          var(--sp-8);
  --section-pad-y-mobile:   72px;
  --section-pad-x:          var(--sp-4);

  /* ---------- Layout widths ---------- */
  --w-page:       1240px;
  --w-narrow:     840px;
  --w-prose:      680px;
  --gutter:       32px;

  /* ---------- Radii ---------- */
  --r-none:  0;
  --r-sm:    8px;
  --r-md:    10px;
  --r-lg:    14px;
  --r-pill:  999px;

  /* ---------- Shadows (used sparingly) ---------- */
  --shadow-card-rest:  0 2px 8px rgba(44, 54, 90, 0.06);
  --shadow-card-hover: 0 16px 40px rgba(44, 54, 90, 0.13);
  --shadow-cta:        0 8px 24px rgba(238, 232, 223, 0.20);
  --shadow-deep:       0 20px 60px rgba(0, 0, 0, 0.50);

  /* ---------- Motion ---------- */
  --ease-out:  cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-in:   cubic-bezier(0.4, 0.0, 1, 1);
  --t-fast:    200ms;
  --t-med:     400ms;
  --t-slow:    600ms;
  --t-orbit:   18s;  /* longest orbit period */
}

/* ==========================================================================
   Base element styles
   ========================================================================== */

html, body {
  background: var(--bg-light);
  color: var(--fg-on-light);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  margin: 0;
}

/* ---------- Semantic typographic classes ---------- */

.t-hero {
  font-family: var(--font-display);
  font-size: var(--t-hero);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-hero);
  text-transform: uppercase;
  margin: 0;
}

.t-display {
  font-family: var(--font-display);
  font-size: var(--t-display);
  font-weight: var(--fw-black);
  line-height: 1.04;
  letter-spacing: var(--track-display);
  margin: 0;
}

.t-section {
  font-family: var(--font-display);
  font-size: var(--t-section);
  font-weight: var(--fw-xbold);
  line-height: 1.08;
  letter-spacing: var(--track-section);
  margin: 0;
}

.t-h3 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: var(--fw-xbold);
  line-height: 1.12;
  letter-spacing: var(--track-section);
  margin: 0;
}

.t-stat {
  font-family: var(--font-display);
  font-size: var(--t-stat);
  font-weight: var(--fw-xbold);
  line-height: 0.95;
  letter-spacing: var(--track-display);
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.t-lead {
  font-size: var(--t-lead);
  font-weight: var(--fw-regular);
  line-height: var(--lh-medium);
  letter-spacing: var(--track-tight);
  margin: 0;
}

.t-body {
  font-size: var(--t-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
}

.t-small {
  font-size: var(--t-small);
  font-weight: var(--fw-regular);
  line-height: 1.55;
}

.t-caption {
  font-size: var(--t-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-caption);
  text-transform: uppercase;
  line-height: 1;
}

.t-eyebrow {
  font-size: var(--t-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  line-height: 1;
  color: var(--fg-eyebrow);
}

.t-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-button);
  text-decoration: none;
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out),
              background-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}

.btn-cream {
  background: var(--cta-bg);
  color: var(--cta-fg);
}
.btn-cream:hover  { transform: translateY(-2px); box-shadow: var(--shadow-cta); }
.btn-cream:active { transform: translateY(0);    background: var(--cta-bg-press); }

.btn-ghost-dark {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(238, 232, 223, 0.25);
}
.btn-ghost-dark:hover { background: rgba(238, 232, 223, 0.08); border-color: rgba(238, 232, 223, 0.45); }

.btn-ghost-light {
  background: transparent;
  color: var(--navy-800);
  border: 1px solid rgba(44, 54, 90, 0.20);
}
.btn-ghost-light:hover { background: rgba(44, 54, 90, 0.04); border-color: rgba(44, 54, 90, 0.40); }

.btn-sm { padding: 11px 20px; font-size: 14px; }
.btn-lg { padding: 20px 34px; font-size: 17px; }

/* ---------- Links ---------- */

a.link {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--t-fast) var(--ease-out);
}
a.link:hover { opacity: 0.6; }

a.link-arrow {
  font-size: 14px;
  font-weight: var(--fw-bold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}
a.link-arrow:hover { opacity: 0.6; }

/* ---------- Sections ---------- */

.section {
  padding: var(--section-pad-y) var(--section-pad-x);
}
.section--dark  { background: var(--bg-dark);  color: var(--fg-on-dark); }
.section--darker{ background: var(--bg-darker);color: var(--fg-on-dark); }
.section--light { background: var(--bg-light); color: var(--fg-on-light); }

.wrap,
.container {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Rules ---------- */

.rule-dark  { border: 0; border-top: 1px solid var(--rule-on-dark);  margin: 0; }
.rule-light { border: 0; border-top: 1px solid var(--rule-on-light); margin: 0; }

/* ---------- Graph-paper grid on cream sections ---------- */

.bg-grid {
  background-image:
    linear-gradient(var(--grid-on-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-on-light) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ---------- Reveal primitives ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-med) var(--ease-out),
              transform var(--t-med) var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }

.reveal-left  { opacity: 0; transform: translateX(-28px); transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out); }
.reveal-left.is-in { opacity: 1; transform: none; }

.reveal-right { opacity: 0; transform: translateX(28px);  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out); }
.reveal-right.is-in { opacity: 1; transform: none; }

.reveal-scale { opacity: 0; transform: scale(0.96) translateY(12px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.reveal-scale.is-in { opacity: 1; transform: none; }

/* ---------- Cards ---------- */

.card {
  background: var(--white);
  border: 1px solid rgba(44, 54, 90, 0.09);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card-rest);
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

.card-step {
  background: var(--white);
  border: 1px solid rgba(44, 54, 90, 0.08);
  border-top: 2px solid var(--navy-800);
  border-radius: 12px;
  padding: 36px 32px 40px;
}

/* ---------- Form inputs on dark ---------- */

.input-dark {
  width: 100%;
  padding: 13px 16px;
  background: rgba(238, 232, 223, 0.06);
  border: 1px solid rgba(238, 232, 223, 0.15);
  border-radius: 8px;
  color: var(--white);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 150ms;
}
.input-dark:focus { border-color: rgba(238, 232, 223, 0.45); }
.input-dark::placeholder { color: rgba(255,255,255,0.35); }

@media (max-width: 720px) {
  :root { --section-pad-y: var(--section-pad-y-mobile); }
}
