/* ══════════════════════════════════════════════════════════════════════
   MADISON · Luminous Lab / Radiant Workshop
   The "Eureka" — a scattered thought crystallizing into a brilliant story.
   Electric Gold · warm living neutrals · soft ambient depth · no hard lines.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  /* ─── SURFACE HIERARCHY · physical layers, no borders ──────────────── */
  --surface:                 #f9f9f7;   /* page base                      */
  --surface-container-low:   #f4f4f2;   /* in-page sections               */
  --surface-container:       #eeeeec;   /* active interaction areas       */
  --surface-container-high:  #e8e8e6;   /* derived mid step               */
  --surface-container-highest:#e2e3e1;  /* footer / deep panels           */
  --surface-container-lowest:#ffffff;   /* elevated cards / nav           */
  --surface-variant:         #ece6da;   /* warm tinted glass base         */
  --surface-ink:             #1c1a16;   /* dark "studio" surface (hero)   */
  --surface-ink-2:           #262219;   /* dark elevated                  */

  /* ─── PRIMARY · Electric Gold (the filament) ───────────────────────── */
  --primary:                 #7c5800;   /* deep gold (text-on-light, edges)*/
  --primary-container:       #ffbe38;   /* ELECTRIC GOLD — the accent      */
  --primary-fixed:           #ffdea8;   /* soft glow halo                  */
  --primary-fixed-dim:       #f2c869;   /* dim gold                        */
  --on-primary:              #ffffff;
  --on-primary-container:    #261a00;   /* ink on gold                     */
  --gold-grad:               linear-gradient(135deg, #7c5800 0%, #ffbe38 100%);
  --gold-grad-soft:          linear-gradient(135deg, #b88500 0%, #ffd06b 100%);
  --gold-glow:               0 0 0 1px rgba(124,88,0,.10), 0 18px 50px -12px rgba(255,190,56,.55);

  /* ─── INK & TEXT · warm, never pure black ──────────────────────────── */
  --on-surface:              #1a1c1b;   /* primary text                    */
  --on-surface-strong:       #100f0c;
  --on-surface-variant:      #514c41;   /* secondary text, warm grey       */
  --on-secondary-container:  #646464;   /* tertiary / muted                */
  --on-surface-faint:        #9a9388;   /* captions, meta                  */
  --on-ink:                  #f6f1e6;   /* text on dark studio surface     */
  --on-ink-variant:          #c9c1b0;

  /* ─── OUTLINE · only ever low-opacity, never solid sections ────────── */
  --outline:                 #827660;
  --outline-variant:         #d4c5ab;
  --ghost-border:            rgba(212,197,171,.45);

  /* ─── TYPE · Editorial Geometry ────────────────────────────────────── */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-hero:      clamp(2.9rem, 6.4vw, 5.4rem);   /* hero display            */
  --fs-display:   clamp(2.4rem, 4.6vw, 3.5rem);   /* display-lg 3.5rem       */
  --fs-headline:  clamp(1.9rem, 3.1vw, 2.6rem);   /* section headlines       */
  --fs-title-lg:  1.5rem;
  --fs-title:     1.25rem;
  --fs-body-lg:   1.175rem;
  --fs-body:      1.0625rem;
  --fs-label:     0.9375rem;
  --fs-eyebrow:   0.8125rem;
  --fs-micro:     0.75rem;

  --lh-tight: 1.04;
  --lh-snug:  1.18;
  --lh-body:  1.62;

  --tracking-display: -0.022em;
  --tracking-tight:   -0.012em;
  --tracking-eyebrow: 0.16em;

  /* ─── SPACING · 4px base + section rhythm ──────────────────────────── */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-14: 56px;
  --sp-16: 64px; --sp-20: 80px; --sp-24: 96px; --sp-28: 112px; --sp-32: 128px;
  --section-y: clamp(72px, 9vw, 132px);

  /* ─── RADII · never below md ───────────────────────────────────────── */
  --r-md:  0.75rem;   /* 12px — minimum                                    */
  --r-lg:  1rem;      /* 16px                                             */
  --r-xl:  1.5rem;    /* 24px — buttons, inputs, cards                    */
  --r-2xl: 2rem;      /* 32px — large glass panels                        */
  --r-3xl: 2.75rem;
  --r-pill: 999px;

  /* ─── ELEVATION · ambient, soft, ≤4-8% ─────────────────────────────── */
  --shadow-ambient: 0 24px 48px -18px rgba(26,28,27,.10), 0 4px 12px -6px rgba(26,28,27,.05);
  --shadow-card:    0 18px 40px -20px rgba(26,28,27,.16), 0 2px 6px -2px rgba(26,28,27,.05);
  --shadow-float:   0 32px 70px -24px rgba(26,28,27,.22), 0 6px 16px -8px rgba(26,28,27,.08);
  --shadow-glass:   0 24px 60px -22px rgba(26,28,27,.20);

  /* ─── MOTION ───────────────────────────────────────────────────────── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io:  cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 140ms; --dur-2: 280ms; --dur-3: 520ms; --dur-4: 820ms;

  --container:      1180px;
  --container-wide: 1320px;
  --gutter: clamp(20px, 5vw, 64px);
}

/* ══════════════════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--primary-fixed); color: var(--on-primary-container); }
img, svg, video { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-tight);
  color: var(--on-surface-strong);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ─── Eyebrow / kicker ─────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--gold-grad);
  border-radius: 2px;
}
.eyebrow--plain::before { display: none; }

/* ─── Display gradient accent word ─────────────────────────────────── */
.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* When a gold word wraps (e.g. "Madison makes the ad."), the default
     box-decoration-break:slice paints one 135deg gradient across the whole
     multi-line box, so the first line only gets the dark end and looks
     off-hue. clone paints the full gradient on each line fragment (and applies
     padding per-fragment, so a wrapped word's trailing stroke isn't clipped). */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.italic-accent {
  font-style: italic; font-weight: 600;
  /* Italic gold words lean past their advance width, so background-clip:text
     paints only up to the box and clips the trailing stroke (e.g. the "e" in
     "share", the "y" in "originality"). A small right padding extends the
     gradient paint box over that overhang; the equal negative margin cancels
     it so spacing is byte-for-byte unchanged (verified: following word does
     not move, so a trailing comma like "share," stays tight). Stays inline —
     multi-word accents like "in four steps." keep wrapping. The hero overrides
     this with a larger, inline-block variant. */
  padding-right: 0.2em; margin-right: -0.2em;
}
/* "originality" needs special care: it ends in an italic "y" whose tail
   overhangs further than the base 0.2em paint box, so background-clip:text
   clipped it; and it sits mid-line before another word, so the lean otherwise
   crams it against "becomes". Use a wider paint box (0.4em) to cover the "y",
   with a margin that leaves ~0.08em of breathing room (net positive). */
.method__intro .italic-accent { padding-right: 0.4em; margin-right: -0.32em; }

.lede {
  font-size: var(--fs-body-lg);
  line-height: 1.55;
  color: var(--on-surface-variant);
  font-weight: 450;
}

/* ══════════════════════════════════════════════════════════════════════
   BUTTONS — "The Illuminators"
   ══════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 650;
  font-size: var(--fs-label);
  letter-spacing: -0.005em;
  padding: 0.95rem 1.6rem;
  border-radius: var(--r-xl);
  border: 0;
  transition: transform var(--dur-1) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              filter var(--dur-2) var(--ease-out);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }

.btn--primary {
  position: relative;
  color: var(--on-primary);
  background: var(--gold-grad);
  box-shadow: 0 12px 28px -10px rgba(124,88,0,.50), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -12px rgba(255,190,56,.62), inset 0 1px 0 rgba(255,255,255,.34);
  filter: saturate(1.06);
}
.btn--primary:active { transform: translateY(0); }

.btn--secondary {
  background: var(--surface-container-highest);
  color: var(--on-surface);
}
.btn--secondary:hover { background: var(--surface-container-high); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--primary);
  padding: 0.95rem 1.1rem;
}
.btn--ghost:hover { color: var(--on-primary-container); }

.btn--on-ink {
  background: rgba(255,255,255,.06);
  color: var(--on-ink);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(246,241,230,.16);
}
.btn--on-ink:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }

.btn--lg { padding: 1.1rem 2rem; font-size: 1.0625rem; }

/* ══════════════════════════════════════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  * { animation-duration: 0.001ms !important; }
}

/* ─── floating glass card ──────────────────────────────────────────── */
.glass {
  background: rgba(252,251,248,.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--shadow-glass);
  border-radius: var(--r-2xl);
}

/* ─── paper grain texture overlay (very subtle) ────────────────────── */
.grain::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
