/* ============================================================
   OBSIDIAN REI — gold-motion.css  (PREVIEW)
   Palette: obsidian black + brand gold + one deep sapphire.
   - Top hero of each page: moving light (drawn by js/gold-motion.js)
     with the gold constellation stars kept on top.
   - Every other section: its own still background. Dark sections
     alternate obsidian / deep sapphire and fade into each other.
   - Gold sheen across accent text, headings rise in word by word,
     light sweeps on buttons.
   Turn it all off on a page by removing the two lines that link
   this file and gold-motion.js.
   ============================================================ */
:root{
  --sapphire-deep:#0c111c;   /* sapphire section base: mostly black, a hint of blue */
  --sapphire:#16284a;        /* sapphire glow */
  --sapphire-l:#8fb0e0;      /* light sapphire (fine lines only) */
}

@property --ang{syntax:'<angle>';inherits:false;initial-value:0deg}

@keyframes gm-sheen{to{background-position:-220% 0}}
@keyframes gm-rise{from{opacity:0;transform:translateY(26px);filter:blur(6px)}to{opacity:1;transform:none;filter:blur(0)}}
@keyframes gm-word{from{opacity:0;transform:translateY(.55em) rotate(2deg);filter:blur(8px)}to{opacity:1;transform:none;filter:blur(0)}}
@keyframes gm-card{from{opacity:0;transform:translateY(30px) scale(.97)}to{opacity:1;transform:none}}
@keyframes gm-sweep{0%,58%{transform:translateX(-130%) skewX(-18deg)}82%,100%{transform:translateX(230%) skewX(-18deg)}}
@keyframes gm-rot{to{--ang:360deg}}
@keyframes gm-strip{to{background-position:300% 0}}
@keyframes gm-glint{0%,100%{opacity:.35;transform:rotate(45deg) scale(.85)}50%{opacity:1;transform:rotate(45deg) scale(1.15)}}

/* ---------- top hero: moving light underneath, stars on top ---------- */
#gm-field{position:absolute;inset:0;width:100%;height:100%;z-index:0;display:block;pointer-events:none}
.gm-hero .stars-wrap{z-index:1}
.gm-hero::after{content:"";position:absolute;left:0;right:0;bottom:0;height:120px;z-index:1;pointer-events:none;
  background:linear-gradient(180deg,transparent,var(--gm-next,var(--obsidian)))}
/* a soft veil behind the headline keeps the text crisp over the light */
.gm-hero::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(90deg,rgba(10,10,12,.55) 0%,rgba(10,10,12,.25) 55%,transparent 100%)}

/* ---------- still section backgrounds that flow ---------- */
/* obsidian sections: black with a faint gold warmth in one corner */
.gm-ob{background:radial-gradient(900px 460px at 85% 0%,rgba(201,164,76,.07),transparent 65%),var(--obsidian)}
/* sapphire sections: fade in from black, deep sapphire through the middle, fade back out */
.gm-sa{background:
  radial-gradient(1000px 520px at 15% 30%,color-mix(in srgb,var(--sapphire) 30%,transparent),transparent 70%),
  radial-gradient(800px 420px at 90% 85%,rgba(201,164,76,.07),transparent 70%),
  linear-gradient(180deg,var(--obsidian) 0%,var(--sapphire-deep) 22%,var(--sapphire-deep) 78%,var(--obsidian) 100%)}
.gm-sa .sit,.gm-sa .val,.gm-sa .review-card,.gm-sa .step-card,.gm-sa .cond{background:rgba(17,20,28,.75);border-color:rgba(143,176,224,.09)}
/* the trust strip and CTA band are the two places sapphire is strongest */
.trust{background:linear-gradient(90deg,var(--panel),var(--sapphire-deep) 50%,var(--panel))}
.cta-band{background:
  radial-gradient(820px 420px at 50% 120%,rgba(201,164,76,.22),transparent 65%),
  radial-gradient(900px 500px at 50% -20%,color-mix(in srgb,var(--sapphire) 38%,transparent),transparent 70%),
  var(--obsidian)}

/* ---------- gold that catches the light ---------- */
h1 em,h2 em,h3 em,h1 .gold,h2 .gold,.gm-split em .gm-w,.gm-split .gold .gm-w{
  background:linear-gradient(100deg,var(--gold) 0%,var(--gold-bright) 20%,#fff6dc 30%,var(--gold-bright) 40%,var(--gold) 62%,var(--gold-bright) 82%,var(--gold) 100%);
  background-size:220% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
h1 em,h2 em,h3 em,h1 .gold,h2 .gold{animation:gm-sheen 7s linear infinite;padding:0 .06em;filter:drop-shadow(0 0 18px rgba(236,208,138,.18))}
.light h1 em,.light h2 em,.light h3 em,.light h2 .gold,.light .gm-split em .gm-w{
  background-image:linear-gradient(100deg,var(--gold-deep) 0%,var(--gold) 30%,#b88f35 45%,var(--gold-deep) 60%,var(--gold) 85%,var(--gold-deep) 100%);filter:none}
.eyebrow,.hero-badge,.topbar b,.brand-name small,.trust-item b,.footer h2,.review-card .who small,.sit .more,.aside-card .phone{
  background:linear-gradient(100deg,var(--gold) 0%,var(--gold) 38%,#fff6dc 50%,var(--gold) 62%,var(--gold) 100%);
  background-size:260% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;
  animation:gm-sheen 6s linear infinite}
.hero-badge,.trust-item b,.aside-card .phone{background-image:linear-gradient(100deg,var(--gold-bright) 0%,var(--gold-bright) 38%,#fffaf0 50%,var(--gold-bright) 62%,var(--gold-bright) 100%)}
.light .eyebrow{background-image:linear-gradient(100deg,var(--gold-deep) 0%,var(--gold-deep) 38%,var(--gold) 50%,var(--gold-deep) 62%,var(--gold-deep) 100%)}
.trust-item:nth-child(2) b{animation-delay:-1.5s}.trust-item:nth-child(3) b{animation-delay:-3s}.trust-item:nth-child(4) b{animation-delay:-4.5s}
.ticker span{background:linear-gradient(100deg,var(--muted) 0%,var(--muted) 36%,var(--gold-bright) 50%,var(--muted) 64%,var(--muted) 100%);
  background-size:260% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;animation:gm-sheen 5s linear infinite}
.gem-rule span{animation:gm-glint 3.2s ease-in-out infinite}

/* ---------- hero entrance (home hero and the inner-page heroes) ---------- */
.hero .hero-badge,.page-hero .eyebrow{animation:gm-rise .9s cubic-bezier(.22,.7,.2,1) .05s both,gm-sheen 6s linear 1s infinite}
.page-hero .crumbs{animation:gm-rise .9s cubic-bezier(.22,.7,.2,1) 0s both}
.hero .lead,.page-hero .lead{animation:gm-rise .9s cubic-bezier(.22,.7,.2,1) .75s both}
.hero .hero-actions,.page-hero .hero-actions{animation:gm-rise .9s cubic-bezier(.22,.7,.2,1) .9s both}
.hero .hero-points li{animation:gm-rise .8s cubic-bezier(.22,.7,.2,1) both}
.hero .hero-points li:nth-child(1){animation-delay:1.05s}.hero .hero-points li:nth-child(2){animation-delay:1.13s}
.hero .hero-points li:nth-child(3){animation-delay:1.21s}.hero .hero-points li:nth-child(4){animation-delay:1.29s}
.hero .offer-card{animation:gm-card 1.1s cubic-bezier(.22,.7,.2,1) .35s both,gm-rot 9s linear infinite}
.offer-card{animation:gm-rot 9s linear infinite}
.gm-w{display:inline-block}
.gm-split .gm-w{opacity:0}
.gm-split.gm-go .gm-w{animation:gm-word .9s cubic-bezier(.22,.7,.2,1) both;animation-delay:calc(var(--i) * 70ms + var(--d,0ms))}
/* in a split heading the gold moves from the em onto each of its words,
   because a clipped gradient cannot reach children that animate on their own layer */
.gm-split em,.gm-split .gold,.light .gm-split em,.light .gm-split .gold{background:none;animation:none;filter:none;padding:0}
.gm-split em .gm-w,.gm-split .gold .gm-w{padding:0 .04em}
.gm-split.gm-go em .gm-w,.gm-split.gm-go .gold .gm-w{animation:gm-word .9s cubic-bezier(.22,.7,.2,1) both,gm-sheen 7s linear infinite;animation-delay:calc(var(--i) * 70ms + var(--d,0ms)),calc(var(--i) * -400ms)}

/* ---------- offer + aside cards: gold light runs around the edge ---------- */
.offer-card{
  background:linear-gradient(165deg,var(--panel-2),var(--panel)) padding-box,
    conic-gradient(from var(--ang),rgba(201,164,76,.14) 0deg,var(--gold-bright) 40deg,#fff6dc 55deg,var(--gold) 75deg,rgba(201,164,76,.14) 120deg,rgba(201,164,76,.14) 180deg,var(--gold) 230deg,var(--gold-bright) 250deg,rgba(201,164,76,.14) 300deg) border-box;
  box-shadow:0 40px 90px -30px rgba(0,0,0,.85),0 0 60px -20px rgba(201,164,76,.25)}
.aside-card{
  background:linear-gradient(165deg,var(--panel-2),var(--obsidian)) padding-box,
    conic-gradient(from var(--ang),rgba(201,164,76,.12) 0deg,var(--gold-bright) 45deg,#fff6dc 60deg,rgba(201,164,76,.12) 130deg,rgba(201,164,76,.12) 200deg,var(--gold) 240deg,rgba(201,164,76,.12) 300deg) border-box;
  animation:gm-rot 11s linear infinite}

/* ---------- buttons: a sweep of light ---------- */
.btn{position:relative;overflow:hidden;isolation:isolate}
.btn::after{content:"";position:absolute;top:-20%;bottom:-20%;left:0;width:45%;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(255,250,235,.55),transparent);transform:translateX(-130%) skewX(-18deg);transition:transform .9s cubic-bezier(.22,.7,.2,1)}
.btn:hover::after{transform:translateX(230%) skewX(-18deg)}
.btn-ghost::after{background:linear-gradient(90deg,transparent,rgba(236,208,138,.22),transparent)}
.hero .btn-gold::after,.page-hero .btn-gold::after,.cta-band .btn-gold::after,.callbar .btn-gold::after{animation:gm-sweep 5.5s ease-in-out 2s infinite}
.btn-gold{box-shadow:0 10px 30px -14px rgba(201,164,76,.55)}

/* ---------- cards: a gold spotlight follows the cursor ---------- */
.gm-spot{position:relative}
.gm-spot::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .35s ease;z-index:0;
  background:radial-gradient(280px circle at var(--mx,50%) var(--my,50%),rgba(236,208,138,.16),transparent 70%)}
.gm-spot:hover::after{opacity:1}
.light .gm-spot::after{background:radial-gradient(280px circle at var(--mx,50%) var(--my,50%),rgba(201,164,76,.16),transparent 70%)}

/* ---------- gold rule that flows: header progress + trust strip edge ---------- */
.header::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;pointer-events:none;
  background:linear-gradient(90deg,var(--gold-deep),var(--gold-bright),#fff6dc,var(--gold-bright),var(--gold-deep));background-size:300% 100%;
  transform:scaleX(var(--p,0));transform-origin:left;animation:gm-strip 6s linear infinite;box-shadow:0 0 12px rgba(236,208,138,.6)}
.trust{position:relative}
.trust::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;
  background:linear-gradient(90deg,transparent,var(--gold),var(--gold-bright),var(--gold),transparent);background-size:300% 100%;animation:gm-strip 10s linear infinite}

/* ---------- reduced motion: keep the colour, drop the movement ---------- */
@media (prefers-reduced-motion:reduce){
  h1 em,h2 em,h3 em,h1 .gold,h2 .gold,.eyebrow,.hero-badge,.topbar b,.brand-name small,.trust-item b,.footer h2,.review-card .who small,.sit .more,.aside-card .phone,
  .ticker span,.gem-rule span,.hero .lead,.hero .hero-actions,.hero .hero-points li,.hero .offer-card,.offer-card,.aside-card,
  .page-hero .eyebrow,.page-hero .crumbs,.page-hero .lead,.page-hero .hero-actions,.gm-split .gm-w,.header::after,.trust::before{animation:none!important;opacity:1!important;filter:none!important}
  .btn::after{display:none}
}
