/* ═══════════════════════════════════════════════════════════════════════
   HOME HERO v7 — "Compliance Desk"
   Own class namespace (.hx-*) on purpose: the v6 hero (.qhp-hero / .ph-*) is
   styled across mythos-home.css, home-light.css, home-gold-align.css and
   theme-light.css, each overriding the last. Nothing here inherits from
   that stack, so nothing there can reach in.

   Palette: the canon only (brand #E31937 / #C11430 text, navy #0A132B,
   paper #FBFAF7, card #FFFFFF, nested #F6F1E7, border #E7E1D6). No shadows —
   depth comes from borders and layered surfaces; no-shadow.css would strip
   them anyway. Fonts: Fraunces (display) + DM Sans (text), already loaded.
   Motion: everything is gated on html.tc-ready (set when the page loader
   clears) and switched off under prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════════ */

.hx{position:relative;overflow:hidden;background:#FBFAF7;color:#0A132B;padding:56px 0 64px;isolation:isolate}
.hx *{box-sizing:border-box}

/* ── Backdrop: warm aurora in the brand + a tricolour whisper, over a dot grid ── */
.hx-bg{position:absolute;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(52% 46% at 12% 18%, rgba(227,25,55,.11) 0%, rgba(227,25,55,0) 62%),
    radial-gradient(44% 40% at 88% 12%, rgba(10,19,43,.09) 0%, rgba(10,19,43,0) 60%),
    radial-gradient(36% 34% at 78% 92%, rgba(19,136,8,.07) 0%, rgba(19,136,8,0) 62%),
    radial-gradient(30% 30% at 22% 96%, rgba(255,153,51,.08) 0%, rgba(255,153,51,0) 60%)}
.hx-dots{position:absolute;inset:0;z-index:0;pointer-events:none;
  background-image:radial-gradient(rgba(10,19,43,.13) 1px,transparent 1.2px);
  background-size:22px 22px;
  -webkit-mask-image:radial-gradient(70% 70% at 50% 40%,#000 20%,transparent 75%);
          mask-image:radial-gradient(70% 70% at 50% 40%,#000 20%,transparent 75%)}
/* a slow drift so the backdrop breathes — cheap: one transform */
.tc-ready .hx-bg{animation:hxDrift 26s ease-in-out infinite alternate}
@keyframes hxDrift{from{transform:translate3d(-1.5%,0,0) scale(1.02)}to{transform:translate3d(1.5%,1%,0) scale(1.04)}}

.hx-wrap{position:relative;z-index:1;max-width:1240px;margin:0 auto;padding:0 32px}
.hx-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);gap:56px;align-items:center}

/* ── Copy column ── */
.hx-copy{min-width:0}
.hx-live{display:inline-flex;align-items:center;gap:8px;padding:7px 14px 7px 10px;border-radius:999px;
  border:1px solid #E7E1D6;background:#FFFFFF;font:600 12.5px/1 'DM Sans',system-ui,sans-serif;color:#0A132B;letter-spacing:.01em}
.hx-live-dot{width:8px;height:8px;border-radius:50%;background:#067647;position:relative;flex:0 0 8px}
.hx-live-dot::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:1.5px solid #067647;opacity:0}
.tc-ready .hx-live-dot::after{animation:hxPing 2.2s ease-out infinite}
@keyframes hxPing{0%{transform:scale(.6);opacity:.9}70%{transform:scale(1.6);opacity:0}100%{opacity:0}}
.hx-live.is-closed .hx-live-dot{background:#B45309}
.hx-live.is-closed .hx-live-dot::after{border-color:#B45309;animation:none}
.hx-live-sep{width:1px;height:12px;background:#E7E1D6}
.hx-live small{font-weight:500;color:#5B6478}

.hx-h1{font-family:'Fraunces',Georgia,serif;font-weight:500;font-size:clamp(38px,4.7vw,66px);line-height:1.04;letter-spacing:-.022em;margin:22px 0 0;color:#0A132B;text-wrap:balance}
.hx-h1 em{font-style:italic;color:#C11430}
/* rotating word — the active word stays in flow so the line is exactly as wide
   as that word (a fixed cell sized to the longest word left "business   down."
   with a hole); the others sit on top of it, invisible, waiting their turn */
.hx-rot{display:inline-block;position:relative;vertical-align:baseline;text-align:left;white-space:nowrap}
.hx-rot > span{position:absolute;left:0;top:0;opacity:0;transform:translateY(.55em) rotateX(-40deg);transform-origin:50% 100%;transition:opacity .45s cubic-bezier(.2,.7,.2,1),transform .55s cubic-bezier(.2,.7,.2,1)}
.hx-rot > span.is-on{position:relative;opacity:1;transform:none}
.hx-rot > span.is-out{opacity:0;transform:translateY(-.5em) rotateX(40deg)}
/* Until the runtime takes over (it adds .is-live) the first word is simply
   shown — so with JS off, or the script failing, the headline still reads.
   Keyed on .is-live and NOT on html.tc-loading: that class is never removed,
   and keying on it left the first word in flow beside every rotated one
   ("businessstartup down."). */
.hx-rot:not(.is-live) > span:first-child{position:relative;opacity:1;transform:none}

.hx-tri{width:68px;height:3px;border-radius:2px;margin:22px 0 18px;
  background:linear-gradient(90deg,#FF9933 0 33%,#E7E1D6 33% 66%,#138808 66%)}
.hx-sub{font:400 17.5px/1.65 'DM Sans',system-ui,sans-serif;color:#3F4756;max-width:560px;margin:0}
.hx-sub b{color:#0A132B;font-weight:600}

.hx-ctas{display:flex;flex-wrap:wrap;gap:12px;margin-top:30px}
.hx-btn{display:inline-flex;align-items:center;gap:9px;padding:15px 24px;border-radius:14px;border:1.5px solid transparent;
  font:700 15px/1 'DM Sans',system-ui,sans-serif;text-decoration:none;cursor:pointer;
  transition:transform .2s cubic-bezier(.2,.7,.2,1),background .2s,border-color .2s,color .2s}
.hx-btn:active{transform:translateY(1px)}
.hx-btn svg{width:17px;height:17px;flex:0 0 17px}
.hx-btn-primary{background:#E31937;border-color:#E31937;color:#FFFFFF!important}
.hx-btn-primary:hover{background:#C11430;border-color:#C11430;transform:translateY(-2px)}
.hx-btn-ghost{background:#FFFFFF;border-color:#E7E1D6;color:#0A132B!important}
.hx-btn-ghost:hover{border-color:#0A132B;transform:translateY(-2px)}
.hx-btn-wa{color:#0A132B!important}
.hx-btn-wa svg{color:#128C4A}
.hx-btn-veda .hx-vdot{width:9px;height:9px;border-radius:50%;background:#E31937;flex:0 0 9px}
.tc-ready .hx-btn-veda .hx-vdot{animation:hxPulse 1.8s ease-in-out infinite}
@keyframes hxPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.35);opacity:.55}}

.hx-proof{display:flex;flex-wrap:wrap;gap:10px 36px;margin-top:38px;padding-top:26px;border-top:1px solid #E7E1D6}
.hx-stat{min-width:104px}
.hx-stat-n{font-family:'Fraunces',Georgia,serif;font-weight:600;font-size:30px;line-height:1;color:#0A132B;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.hx-stat-n i{font-style:normal;color:#E31937}
.hx-stat-l{margin-top:6px;font:600 11.5px/1 'DM Sans',system-ui,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:#6B7280}

/* ── Compliance Desk panel ── */
.hx-desk-wrap{position:relative;perspective:1400px}
.hx-desk-ghost{position:absolute;inset:14px -12px -14px 12px;border:1px solid #E7E1D6;border-radius:24px;background:#F6F1E7;transform:rotate(-2.2deg);z-index:0}
.hx-desk{position:relative;z-index:1;border:1px solid #E7E1D6;border-radius:22px;background:#FFFFFF;overflow:hidden;
  transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transform-style:preserve-3d;transition:transform .35s cubic-bezier(.2,.7,.2,1);will-change:transform}
.hx-desk-hd{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;background:#0A132B;color:#FFFFFF}
.hx-desk-t{font:700 13px/1.2 'DM Sans',system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;display:flex;align-items:center;gap:9px}
.hx-desk-t i{width:8px;height:8px;border-radius:50%;background:#F5405E;display:inline-block}
.hx-desk-d{font:500 12.5px/1.2 'DM Sans',system-ui,sans-serif;color:rgba(255,255,255,.72)}
.hx-rows{margin:0;padding:6px 8px;list-style:none}
.hx-row{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:14px;padding:12px 12px;border-radius:14px;border:1px solid transparent}
.hx-row + .hx-row{margin-top:2px}
.hx-row.is-next{background:#FBFAF7;border-color:#E7E1D6}
.hx-ring{width:44px;height:44px;display:block}
.hx-ring circle{fill:none;stroke-width:3.4}
.hx-ring .hx-ring-bg{stroke:#F6F1E7}
.hx-ring .hx-ring-fg{stroke:#0A132B;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:calc(1 - var(--p,0));transform:rotate(-90deg);transform-origin:50% 50%}
/* the dials sweep up to their value once the page is ready */
.tc-ready .hx-ring .hx-ring-fg{animation:hxRing 1.3s cubic-bezier(.2,.7,.2,1) .55s both}
@keyframes hxRing{from{stroke-dashoffset:1}to{stroke-dashoffset:calc(1 - var(--p,0))}}
.hx-row.is-hot .hx-ring .hx-ring-fg{stroke:#E31937}
.hx-row.is-warm .hx-ring .hx-ring-fg{stroke:#B45309}
.hx-ring text{font:700 11px 'DM Sans',system-ui,sans-serif;fill:#0A132B;text-anchor:middle;dominant-baseline:central}
.hx-row-n{font:600 14.5px/1.25 'DM Sans',system-ui,sans-serif;color:#0A132B}
.hx-row-n em{font-style:normal;font-weight:500;color:#6B7280;margin-left:6px;font-size:12.5px}
.hx-row-s{margin-top:3px;font:400 12.5px/1.3 'DM Sans',system-ui,sans-serif;color:#5B6478}
.hx-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid #E7E1D6;background:#FFFFFF;
  font:600 12px/1 'DM Sans',system-ui,sans-serif;color:#0A132B;white-space:nowrap;font-variant-numeric:tabular-nums}
.hx-chip b{font-weight:400;color:#6B7280}
.hx-row.is-hot .hx-chip{border-color:rgba(227,25,55,.35);color:#C11430;background:rgba(227,25,55,.06)}
.hx-row.is-warm .hx-chip{border-color:rgba(180,83,9,.35);color:#B45309;background:rgba(180,83,9,.06)}
.hx-desk-ft{display:flex;align-items:center;gap:12px;padding:14px 16px 16px;border-top:1px solid #E7E1D6;background:#FBFAF7}
.hx-veda-av{width:34px;height:34px;border-radius:50%;flex:0 0 34px;display:grid;place-items:center;background:#0A132B;color:#FFFFFF;font:700 12px/1 'DM Sans',system-ui,sans-serif;letter-spacing:.04em}
.hx-veda-q{flex:1;min-width:0;font:400 13.5px/1.4 'DM Sans',system-ui,sans-serif;color:#3F4756}
.hx-veda-q b{display:block;font-weight:600;color:#0A132B;font-size:12px;letter-spacing:.06em;text-transform:uppercase;margin-bottom:3px}
.hx-veda-typed{border-right:2px solid #E31937;padding-right:2px}
.hx-veda-go{display:inline-flex;align-items:center;gap:6px;padding:9px 14px;border-radius:10px;border:1.5px solid #0A132B;background:#0A132B;color:#FFFFFF!important;font:700 12.5px/1 'DM Sans',system-ui,sans-serif;text-decoration:none;cursor:pointer;white-space:nowrap}
.hx-veda-go:hover{background:#E31937;border-color:#E31937}
.hx-note{position:relative;z-index:1;margin:26px 6px 0;font:400 11.5px/1.5 'DM Sans',system-ui,sans-serif;color:#6B7280;text-align:right}

/* ── Entrance choreography (runs once the loader has cleared) ──
   The hidden start state is keyed on html.tc-loading, which only the loader's
   head script sets — so with JS off, a script error, or a repeat visit the hero
   is simply visible. Nothing here can leave the page blank. */
.tc-loading .hx-in{opacity:0;transform:translateY(18px)}
.tc-ready .hx-in{animation:hxIn .8s cubic-bezier(.2,.7,.2,1) forwards}
.tc-ready .hx-in:nth-child(1){animation-delay:.05s}
.tc-ready .hx-in:nth-child(2){animation-delay:.14s}
.tc-ready .hx-in:nth-child(3){animation-delay:.22s}
.tc-ready .hx-in:nth-child(4){animation-delay:.3s}
.tc-ready .hx-in:nth-child(5){animation-delay:.38s}
.tc-ready .hx-in:nth-child(6){animation-delay:.46s}
.tc-ready .hx-desk-wrap.hx-in{animation-delay:.32s}
@keyframes hxIn{to{opacity:1;transform:none}}
.tc-ready .hx-desk-ghost{animation:hxGhost 1.1s cubic-bezier(.2,.7,.2,1) .5s both}
@keyframes hxGhost{from{transform:rotate(0) translateY(10px);opacity:0}to{transform:rotate(-2.2deg) translateY(0);opacity:1}}

/* ── Responsive ── */
@media (max-width:1024px){
  .hx-grid{grid-template-columns:1fr;gap:40px}
  .hx-desk-wrap{max-width:560px}
  .hx-h1{font-size:clamp(36px,6.4vw,54px)}
}
@media (max-width:640px){
  .hx{padding:34px 0 44px}
  .hx-wrap{padding:0 18px}
  .hx-h1{font-size:clamp(32px,9vw,42px)}
  .hx-sub{font-size:16px}
  .hx-ctas{flex-direction:column}
  .hx-btn{width:100%;justify-content:center}
  .hx-proof{gap:18px 22px}
  .hx-stat{min-width:calc(50% - 11px)}
  .hx-stat-n{font-size:26px}
  .hx-row{grid-template-columns:40px 1fr auto;gap:10px;padding:11px 8px}
  .hx-ring{width:40px;height:40px}
  .hx-desk-ghost{inset:10px -6px -10px 6px}
  .hx-note{text-align:left}
}

/* ── Reduced motion: everything visible, nothing moves ── */
@media (prefers-reduced-motion:reduce){
  .hx-in,.tc-ready .hx-in{opacity:1;transform:none;animation:none}
  .tc-ready .hx-bg,.tc-ready .hx-live-dot::after,.tc-ready .hx-btn-veda .hx-vdot,.tc-ready .hx-desk-ghost{animation:none}
  .hx-rot > span{transition:none}
  .hx-ring .hx-ring-fg{transition:none}
  .hx-desk{transform:none!important;transition:none}
  .hx-veda-typed{border-right:0}
}
