/* =========================================================================
   THEME LAYER — the aesthetic pass. Loaded last, so it restyles without
   touching the design system (styles.css) or the interaction layer (fx.css).

   Applied from the ui-ux-pro-max style database:
     #53 Bento Grids ............ modular varied-span cards, 24px radius
     #46 Dimensional Layering ... 4-level elevation, deliberate stacking
     #47 Exaggerated Minimalism . oversized display type, tight tracking
     #66 Editorial Grid ......... drop caps, pull quotes
     #65 Gradient Mesh / Aurora . AMBIENT ONLY — the database explicitly
                                  says not for text-heavy or conservative
                                  brands, so it never sits behind body copy
     #14 Liquid Glass ........... surfaces only on dark bands; no chromatic
                                  aberration, which the database flags as an
                                  accessibility risk

   Nothing here may lower a contrast ratio or remove a focus ring.
   ========================================================================= */

/* =========================================================================
   BRAND LOGO
   Built in CSS rather than shipped as an image: sharp on every screen and
   at every size, a few hundred bytes, and it recolours with the theme.
   ========================================================================= */
.logo{display:flex; align-items:center; gap:.7rem; text-decoration:none; min-height:var(--tap)}

/* the LM tile */
.logo__mark{
  flex:none; width:44px; height:44px; border-radius:13px;
  background:linear-gradient(160deg,#161616,#050505);
  border:1px solid rgba(184,135,59,.42);
  display:grid; place-items:center;
  box-shadow:0 2px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
}
.logo__mark span{
  font-family:var(--sans); font-weight:800; font-size:1.02rem; letter-spacing:-.055em;
  background:linear-gradient(150deg,#F0D9A4 8%,#D9AC5D 42%,#B8873B 90%);
  -webkit-background-clip:text; background-clip:text;
  color:transparent; -webkit-text-fill-color:transparent;
}

/* the wordmark */
.logo__text{display:flex; flex-direction:column; line-height:1.05}
.logo__word{font-family:var(--sans); font-weight:800; font-size:1.16rem; letter-spacing:-.032em; color:var(--ink)}
.logo__word em{
  font-style:normal;
  background:linear-gradient(150deg,#E8C77A,#B8873B);
  -webkit-background-clip:text; background-clip:text;
  color:transparent; -webkit-text-fill-color:transparent;
}
.logo__tag{
  font-family:var(--sans); font-size:.53rem; font-weight:700;
  letter-spacing:.34em; text-transform:uppercase; color:var(--gold-text);
  margin-top:.18rem;
}

/* on dark surfaces the "Linked" half flips to white */
.foot .logo__word, .funnel__brand .logo__word{color:#fff}
.foot .logo__tag{color:var(--gold-2)}

@media (max-width:460px){
  .logo__mark{width:38px;height:38px;border-radius:11px}
  .logo__mark span{font-size:.88rem}
  .logo__word{font-size:1rem}
  .logo__tag{font-size:.48rem; letter-spacing:.28em}
}

/* ---------------------------------------------------------------- type */
/* #47: oversized display type with tight tracking. Restricted to display
   headings — the database says don't use this for forms or data-heavy UI. */
h1{
  font-size:clamp(2.6rem, 6.4vw, 5.1rem);
  font-weight:700;
  letter-spacing:-.035em;
  line-height:1.02;
}
h2{
  font-size:clamp(1.95rem, 3.6vw, 3.1rem);
  letter-spacing:-.028em;
  line-height:1.06;
}
.sec-head h2{margin-bottom:.6rem}
.lede{font-size:1.16rem; line-height:1.62}

/* Optical alignment: big serif headings hang slightly left of the grid */
.hero h1,.sec-head h2{margin-left:-.02em}

/* ------------------------------------------------------------- surface */
/* The film grain used to be a FIXED, full-viewport layer with
   mix-blend-mode: overlay. That forces the compositor to re-blend the entire
   screen against everything beneath it on every single scroll frame — by far
   the biggest cause of scroll jank on this page.

   Same texture, no blend mode, and it scrolls with the page instead of being
   pinned to the viewport, so it rasterises once instead of every frame. */
body{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  background-attachment:scroll;
}

/* ------------------------------------------------------- aurora ambient */
/* #65, disciplined: slow mesh behind DARK bands only, always under a solid
   scrim, never behind body text on light surfaces. */
@keyframes auroraDrift{
  0%   {transform:translate3d(0,0,0)      rotate(0deg)   scale(1)}
  33%  {transform:translate3d(4%,-3%,0)   rotate(6deg)   scale(1.08)}
  66%  {transform:translate3d(-3%,4%,0)   rotate(-5deg)  scale(1.04)}
  100% {transform:translate3d(0,0,0)      rotate(0deg)   scale(1)}
}
/* Aurora, made affordable.
   Was: inset:-25% (so it grew with the section — one instance was
   2281×2707px), blur(46px), animating always, with will-change forcing a
   ~24MB GPU texture. Now height-capped, blur halved, and the animation only
   runs while the section is actually on screen (see fx.js). */
.scene::before,
.results::before,
.finalcta::before{
  content:''; position:absolute; left:-10%; right:-10%; top:-10%;
  height:min(120%, 780px);              /* capped — no longer scales with the section */
  pointer-events:none; z-index:0;
  background:
    radial-gradient(38% 44% at 22% 28%, rgba(217,172,93,.26), transparent 62%),
    radial-gradient(34% 40% at 78% 22%, rgba(64,116,190,.26), transparent 64%),
    radial-gradient(42% 48% at 62% 82%, rgba(140,96,196,.20), transparent 66%);
  filter:blur(24px) saturate(120%);
  animation:auroraDrift 34s ease-in-out infinite;
  animation-play-state:paused;          /* fx.js plays it only when visible */
  transform:translateZ(0);
  contain:paint;
}
.is-onscreen::before{animation-play-state:running}
.results,.finalcta{position:relative; overflow:hidden}
.results .wrap,.finalcta .wrap{position:relative; z-index:2}
/* keep the existing scene gradient stack on top of the aurora */
.scene .wrap{z-index:2}

/* ------------------------------------------------------- liquid glass */
/* #14, surfaces only. Guarded by @supports so browsers without
   backdrop-filter get a solid fallback rather than unreadable text. */
.scene__card,.quote,.moneycard--hero,.calc__result,.minical{
  border-radius:var(--radius-xl);
}
/* Dark-tinted glass, not white-tinted. White glass over the aurora lifts the
   backdrop luminance unpredictably — worst case put the 3D-band bullets at
   3.68:1. A dark base pins the backdrop at ~0.019 luminance wherever the
   aurora happens to be bright, so light text stays above 6:1 everywhere,
   while backdrop-filter still shows the aurora blurred through. */
/* backdrop-filter re-samples everything behind the element on every frame.
   One large card can afford it; SIX testimonial cards cannot — that was six
   live re-samples per scroll frame. The quotes now use a solid tint that
   looks near-identical over the aurora. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)){
  .scene__card{
    -webkit-backdrop-filter:blur(14px) saturate(140%);
            backdrop-filter:blur(14px) saturate(140%);
    background:rgba(10,18,30,.58);
  }
}
.quote{background:rgba(12,21,34,.72)}
/* Top inner highlight — reads as a light source, the detail that separates
   glass from a flat translucent panel */
.scene__card::after,.quote::before,.moneycard--hero::after,.calc__result::after{
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.14), transparent 34%);
  z-index:1;
}
.moneycard--hero,.calc__result{position:relative; overflow:hidden}
.moneycard--hero > *,.calc__result > *{position:relative; z-index:2}

/* ---------------------------------------------------------- bento grid */
/* #53: varied spans, 24px radius, soft page ground. */
.market{background:#F5F5F7}
.stats{
  grid-template-columns:repeat(6,1fr);
  gap:14px;
}
.stat{
  border-radius:var(--radius-card);
  border-color:rgba(14,27,44,.07);
  box-shadow:var(--elev-1);
  transition:transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
  grid-column:span 2;
}
.stat:hover{transform:translateY(-3px) scale(1.012); box-shadow:var(--elev-3)}
/* the bento rhythm: wide, narrow, narrow / narrow, narrow, wide */
.stat:nth-child(1){grid-column:span 4}
.stat:nth-child(2){grid-column:span 2}
.stat:nth-child(3){grid-column:span 2}
.stat:nth-child(4){grid-column:span 2}
.stat:nth-child(5){grid-column:span 2}
.stat:nth-child(6){grid-column:span 4}
.stat:nth-child(1) .stat__num{font-size:clamp(2.6rem,5vw,3.6rem)}
.stat:nth-child(1) h3{font-size:1.15rem}

/* the CTA tile that closes the grid */
.stat--cta{
  grid-column:span 2;
  background:linear-gradient(150deg,var(--ink),#22364F);
  border-color:transparent; color:#D7E1EE;
  display:flex; flex-direction:column; justify-content:center; gap:.5rem;
}
.stat--cta h3{color:#fff; font-size:1.12rem; margin:0}
.stat--cta p{color:#A9BACE; font-size:.9rem; margin:0}
.stat--cta .btn{margin-top:.4rem; align-self:flex-start}

/* areas inherit the same modular feel */
.areas__grid{gap:14px}
.area{border-radius:var(--radius-card); box-shadow:var(--elev-1)}
.area:hover{box-shadow:var(--elev-2)}
.pathcard{border-radius:var(--radius-xl)}
.moneycard,.costcol,.timeline,.calc,.marketnote,.faq details{border-radius:var(--radius-card)}

/* ------------------------------------------------------------ editorial */
/* #66: drop cap and pull quote, used once each so they stay special. */
.marketnote--lead > p:first-of-type::first-letter{
  float:left; font-family:var(--serif); font-weight:600;
  font-size:3.4em; line-height:.82; padding:.06em .12em 0 0;
  color:var(--gold-text);
}
.pullquote{
  margin:1.6rem 0 0; padding:1.2rem 0 0; border-top:2px solid var(--gold);
  font-family:var(--serif); font-size:clamp(1.15rem,2vw,1.45rem);
  line-height:1.36; color:var(--ink); letter-spacing:-.015em;
}
.pullquote cite{display:block; margin-top:.6rem; font:500 .8rem/1.4 var(--sans);
  font-style:normal; letter-spacing:.1em; text-transform:uppercase; color:var(--muted)}

/* --------------------------------------------------------------- polish */
.hero__bg{
  background:
    radial-gradient(58% 48% at 78% 6%, rgba(184,135,59,.20), transparent 62%),
    radial-gradient(46% 42% at 6% 92%, rgba(47,86,138,.16), transparent 62%),
    radial-gradient(40% 36% at 92% 78%, rgba(140,96,196,.10), transparent 64%),
    linear-gradient(180deg,#FCFAF6,#F3EEE6);
}
.eyebrow__pill{
  background:rgba(255,255,255,.92); border-color:rgba(14,27,44,.08);
  box-shadow:var(--elev-1);
}
.hero__card{border-radius:var(--radius-xl); box-shadow:var(--elev-4)}

/* Framing for a square source photo.
   The hero slot is landscape (~1.59:1), so a square image overflows 37%
   vertically. A centred crop would clip the top of the head — biasing the
   window to 30% keeps the whole face and hair inside it. The about slot is
   4:5 portrait, so the square only crops horizontally and centre is right. */
.hero__photo.has-photo{background-position:center 30%; height:330px}
.about__photo.has-photo{background-position:center center}
/* The portrait is a dark studio shot on black; a faint inner edge stops it
   dissolving into the card on dark-mode screens. */
.hero__photo.has-photo,.about__photo.has-photo{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
/* The nav is the one element on screen during every scroll frame, so a
   backdrop-filter here is the most expensive place to put one. At 94% opacity
   the blur was barely perceptible anyway — a near-solid bar looks the same
   and costs nothing. */
.nav{-webkit-backdrop-filter:none !important; backdrop-filter:none !important}
.nav.is-stuck{background:rgba(255,255,255,.94)}
.btn{border-radius:999px; font-weight:600; letter-spacing:-.012em}
.btn--primary{background:linear-gradient(160deg,#16283E,var(--ink)); box-shadow:var(--elev-2)}
.btn--primary:hover{box-shadow:var(--elev-3)}
.funnel__panel{border-radius:var(--radius-xl)}
.choice,.slot,.daybtn,.mtype__btn,.field input,.field select,.calc select,.calc input[type=number]{
  border-radius:var(--radius);
}
.stat cite,.moneycard > cite{letter-spacing:.02em}

/* Cards lift on press as well as hover (MD: scale-feedback) */
.pathcard:active,.area:active,.stat:active{transform:scale(.988)}

/* --------------------------------------------------------- responsive */
@media (max-width:1020px){
  .stats{grid-template-columns:repeat(4,1fr)}
  .stat,.stat:nth-child(n){grid-column:span 2}
  .stat:nth-child(1){grid-column:span 4}
}
@media (max-width:760px){
  .stats{grid-template-columns:1fr; gap:12px}
  .stat,.stat:nth-child(n){grid-column:span 1}
  h1{font-size:clamp(2.2rem,9vw,3rem); letter-spacing:-.03em}
  .marketnote--lead > p:first-of-type::first-letter{font-size:2.8em}
}

/* ----------------------------------------------------- reduced motion */
@media (prefers-reduced-motion:reduce){
  .scene::before,.results::before,.finalcta::before{animation:none}
  .stat:hover{transform:none}
  .pathcard:active,.area:active,.stat:active{transform:none}
}
