/* ============================================================
   AME CONSULTING — V10
   Award-grade custom styles. Tailwind handles utilities; this
   file owns the cinematic layer: type, motion, cursor, texture.
   ============================================================ */

:root {
  /* RGB triplets are the single source of truth so Tailwind opacity
     modifiers (bg-onyx/40 etc.) work. Palette: "Porcelain" — brand
     off-white + burgundy, chosen by Aileen 2026-07.
     Brand hexes: #F2F2F2 #E8E8E8 #8B2346 #A63A5F #675470 #554A5B
     #2D2D2D #DCD1DF */
  --c-obsidian: 242 242 242;   /* page background  #F2F2F2 */
  --c-onyx: 255 255 255;       /* cards / section bands (white) */
  --c-graphite: 232 232 232;   /* glass panels, form fields  #E8E8E8 */
  --c-gold: 139 35 70;         /* primary accent  #8B2346 burgundy */
  --c-gold-light: 166 58 95;   /* accent hover  #A63A5F */
  --c-purple: 103 84 112;      /* decorative gradients + hero shader  #675470 */
  --c-purple-light: 85 74 91;  /* #554A5B */
  --c-cream: 45 45 45;         /* primary text  #2D2D2D */
  --c-cream-dark: 35 35 35;
  --c-silver: 85 74 91;        /* secondary text  #554A5B */
  --c-ash: 103 84 112;         /* muted text  #675470 */
  --c-plum: 220 209 223;       /* hero shader mid-tone  #DCD1DF */
  --c-line: 45 45 45;          /* hairline borders (incl. Tailwind `white`) */
  --c-nav: 242 242 242;        /* solid nav bar background */
  --c-on-accent: 242 242 242;  /* text sitting on the accent color */
  --hero-purple-a: 0.18;       /* hero fallback glow strengths (light bg) */
  --hero-gold-a: 0.10;

  --obsidian: rgb(var(--c-obsidian));
  --onyx: rgb(var(--c-onyx));
  --graphite: rgb(var(--c-graphite));
  --gold: rgb(var(--c-gold));
  --gold-light: rgb(var(--c-gold-light));
  --purple: rgb(var(--c-purple));
  --purple-light: rgb(var(--c-purple-light));
  --cream: rgb(var(--c-cream));
  --cream-dark: rgb(var(--c-cream-dark));
  --silver: rgb(var(--c-silver));
  --ash: rgb(var(--c-ash));
  --plum: rgb(var(--c-plum));
  --on-accent: rgb(var(--c-on-accent));
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ---------- Base ---------- */
* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html { scroll-behavior: auto; } /* Lenis owns scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--obsidian);
  color: var(--cream);
  overflow-x: hidden;
}
/* Only hide the native cursor once JS has the custom one running */
body.cursor-custom { cursor: none; }
body.cursor-custom a, body.cursor-custom button { cursor: none; }
@media (hover: none) { body.cursor-custom { cursor: auto; } }

::selection { background: var(--gold); color: var(--on-accent); }

/* Fluid display type */
.font-display { font-family: 'Fraunces', Georgia, serif; }
.font-body { font-family: 'Sora', system-ui, sans-serif; }

.display-xl {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
  font-size: clamp(2.6rem, 7vw, 6.5rem);
}
.display-lg {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.015em;
  font-size: clamp(2rem, 4.5vw, 4rem);
}
.eyebrow {
  font-family: 'Sora', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold);
}

/* ---------- Film grain + vignette ---------- */
.grain::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9998;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: var(--gold); }
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid rgb(var(--c-gold) / 0.5);
  transition: width .35s var(--ease-out-expo), height .35s var(--ease-out-expo),
              background-color .35s, border-color .35s;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  background: rgb(var(--c-gold) / 0.10);
  border-color: rgb(var(--c-gold) / 0.9);
}
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--obsidian);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.preloader__count {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 12vw, 9rem);
  color: var(--cream); line-height: 1;
}
.preloader__bar {
  margin-top: 1.5rem; width: min(46vw, 360px); height: 1px;
  background: rgb(var(--c-line) / 0.15); position: relative; overflow: hidden;
}
.preloader__bar i { position: absolute; inset: 0; width: 0%; background: var(--gold); }

/* ---------- Nav ---------- */
.nav-shell {
  transition: background-color .5s var(--ease-out-expo),
              backdrop-filter .5s, border-color .5s, padding .4s;
  border-bottom: 1px solid transparent;
}
.nav-shell.is-solid {
  background: rgb(var(--c-nav) / 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: rgb(var(--c-gold) / 0.14);
}
.nav-link { position: relative; color: var(--silver); transition: color .35s; }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--gold); transition: width .4s var(--ease-out-expo);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: .6rem;
  font-family: 'Sora', sans-serif; font-weight: 500; font-size: .9rem;
  letter-spacing: .01em; padding: 1rem 2rem; border-radius: 999px;
  overflow: hidden; isolation: isolate; transition: color .4s, border-color .4s;
  will-change: transform;
}
.btn span { position: relative; z-index: 2; }
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit;
  transform: translateY(101%); transition: transform .5s var(--ease-out-expo);
}
.btn:hover::before { transform: translateY(0); }

.btn-gold { background: var(--gold); color: var(--on-accent); }
.btn-gold::before { background: var(--gold-light); }
.btn-gold:hover { color: var(--on-accent); }

.btn-ghost { border: 1px solid rgb(var(--c-cream) / 0.22); color: var(--cream); }
.btn-ghost::before { background: var(--cream); }
.btn-ghost:hover { color: var(--obsidian); border-color: var(--cream); }

.btn-purple { background: var(--purple); color: var(--cream); }
.btn-purple::before { background: var(--purple-light); }

.btn-arrow { transition: transform .4s var(--ease-out-expo); }
.btn:hover .btn-arrow { transform: translateX(5px); }

/* magnetic wrapper keeps transforms isolated */
.magnetic { display: inline-block; will-change: transform; }

/* ---------- Links with underline sweep ---------- */
.link-sweep {
  position: relative; color: var(--gold); display: inline-flex; gap: .5rem; align-items: center;
}
.link-sweep::after {
  content: ''; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: currentColor; transform-origin: right; transform: scaleX(0);
  transition: transform .5s var(--ease-out-expo);
}
.link-sweep:hover::after { transform-origin: left; transform: scaleX(1); }

/* ---------- Reveal primitives (used when reduced-motion OFF) ---------- */
.reveal { opacity: 0; transform: translateY(34px); }
.reveal-up { opacity: 0; transform: translateY(60px); }
.line-mask { overflow: hidden; }
.line-mask > * { display: block; }

/* word/char split helpers */
.split-word, .split-char { display: inline-block; will-change: transform; }

/* ---------- Marquee ---------- */
.marquee { display: flex; width: max-content; will-change: transform; }
.marquee__item {
  display: inline-flex; align-items: center; gap: 1.2rem;
  padding: 0 2.4rem; white-space: nowrap;
  font-family: 'Fraunces', serif; font-size: clamp(1.4rem, 3vw, 2.6rem);
  color: var(--silver);
}
.marquee__item::after { content: '✦'; color: var(--gold); font-size: .7em; }

/* ---------- Cards ---------- */
.tilt-card {
  position: relative; background: var(--onyx);
  border: 1px solid rgb(var(--c-line) / 0.07); border-radius: 18px;
  transition: border-color .5s, transform .5s var(--ease-out-expo);
  transform-style: preserve-3d; will-change: transform;
  overflow: hidden;
}
.tilt-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), rgb(var(--c-gold) / 0.10), transparent 60%);
  opacity: 0; transition: opacity .5s; pointer-events: none;
}
.tilt-card:hover { border-color: rgb(var(--c-gold) / 0.30); }
.tilt-card:hover::before { opacity: 1; }
.tilt-card__top { height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }

.glass {
  background: linear-gradient(160deg, rgb(var(--c-graphite) / 0.6), rgb(var(--c-onyx) / 0.4));
  border: 1px solid rgb(var(--c-line) / 0.08);
  backdrop-filter: blur(10px);
}

/* ---------- Stats ---------- */
.stat-number {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1;
  color: var(--cream); letter-spacing: -0.02em;
}
.gold-text { color: var(--gold); }
.gradient-gold {
  background: linear-gradient(120deg, var(--gold-light), var(--gold) 40%, var(--purple-light));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Pull quote ---------- */
.pull-quote {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 400;
  line-height: 1.15; letter-spacing: -0.01em;
  font-size: clamp(1.8rem, 4.4vw, 3.6rem);
}

/* ---------- Section framing ---------- */
.hairline { height: 1px; background: linear-gradient(90deg, transparent, rgb(var(--c-gold) / 0.35), transparent); }
.eyebrow-rule { display:inline-flex; align-items:center; gap:.9rem; }
.eyebrow-rule::before { content:''; width:42px; height:1px; background: var(--gold); }

.section-index {
  font-family: 'Sora', sans-serif; font-size: .75rem; letter-spacing: .3em;
  color: var(--ash); text-transform: uppercase;
}

/* ---------- Forms ---------- */
.form-input {
  width: 100%; background: rgb(var(--c-graphite) / 0.4);
  border: 1px solid rgb(var(--c-line) / 0.12); border-radius: 12px;
  padding: 1rem 1.1rem; color: var(--cream); font-family: 'Sora', sans-serif;
  font-size: .95rem; transition: border-color .35s, background-color .35s;
}
.form-input::placeholder { color: var(--ash); }
.form-input:focus { outline: none; border-color: var(--gold); background: rgb(var(--c-graphite) / 0.7); }
.form-input option { background: var(--onyx); }

/* ---------- Pricing ---------- */
.price-card {
  position: relative; background: var(--onyx);
  border: 1px solid rgb(var(--c-line) / 0.08); border-radius: 20px;
  padding: 2.4rem 2rem; transition: transform .5s var(--ease-out-expo), border-color .5s;
}
.price-card.is-featured {
  border-color: rgb(var(--c-gold) / 0.5);
  background: linear-gradient(180deg, rgb(var(--c-graphite) / 0.9), var(--onyx));
  box-shadow: 0 30px 80px -40px rgb(var(--c-gold) / 0.4);
}
.price-card:hover { transform: translateY(-8px); }
.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--on-accent); font-size: .65rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; padding: .4rem 1rem; border-radius: 999px;
}
.price-amount { font-family: 'Fraunces', serif; font-size: clamp(2.4rem,5vw,3.4rem); line-height:1; }

/* ---------- Mobile nav ---------- */
.mobile-nav { transform: translateX(100%); transition: transform .6s var(--ease-in-out-quart); }
.mobile-nav.is-open { transform: translateX(0); }

/* ---------- Scroll cue ---------- */
.scroll-cue { width: 24px; height: 38px; border: 1px solid rgb(var(--c-line) / 0.3); border-radius: 14px; position: relative; }
.scroll-cue::after {
  content:''; position:absolute; left:50%; top:7px; width:3px; height:8px; border-radius:2px;
  background: var(--gold); transform: translateX(-50%); animation: cue 1.8s var(--ease-in-out-quart) infinite;
}
@keyframes cue { 0%{opacity:0; transform:translate(-50%,0)} 30%{opacity:1} 60%{opacity:1; transform:translate(-50%,12px)} 100%{opacity:0; transform:translate(-50%,16px)} }

/* ---------- Hero canvas ---------- */
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-fallback {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1200px 600px at 70% 20%, rgb(var(--c-purple) / var(--hero-purple-a, 0.35)), transparent 60%),
    radial-gradient(900px 500px at 20% 80%, rgb(var(--c-gold) / var(--hero-gold-a, 0.18)), transparent 60%),
    var(--obsidian);
}

/* ---------- Reduced motion: show everything, kill transforms ---------- */
@media (prefers-reduced-motion: reduce) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
  .reveal, .reveal-up, .split-word, .split-char,
  .line-mask > * { opacity: 1 !important; transform: none !important; }
  .scroll-cue::after, .marquee { animation: none !important; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Utility ---------- */
.container-x { max-width: 80rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
@media (min-width: 1024px){ .container-x { padding-left: 2rem; padding-right: 2rem; } }
.text-balance { text-wrap: balance; }
.divider-y { width: 1px; background: linear-gradient(180deg, transparent, rgb(var(--c-gold) / 0.3), transparent); }
.noise-edge { box-shadow: inset 0 -120px 120px -90px rgb(var(--c-obsidian) / 0.95); }
.img-duotone { filter: grayscale(0.2) contrast(1.05); }
