/* =====================================================================================================
   DEPTH — the 3D motion layer (js/components/depth.js). Loaded last.
   A hero that is a real 3D stage (score report, floating satellites, a glass cube, an orbit ring, a warp
   starfield and a moving grid floor), spring-driven card tilt with glare, 3D scroll reveals, 3D tab swaps,
   3D page entrances and a light that follows the pointer. Exam screens (body.in-test) are left untouched.
   ===================================================================================================== */
@property --d3a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
:root { --spring: cubic-bezier(.34, 1.56, .64, 1); --expo: cubic-bezier(.16, 1, .3, 1); }

/* ---------- hero backdrop: warp stars + a grid floor running towards you ---------- */
.cd-hero { min-height: min(820px, calc(100svh - var(--topbar-h, 72px))); display: flex; align-items: center; }
.cd-hero > .container { position: relative; z-index: 1; width: 100%; }
.d3-stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.d3-floor { position: absolute; left: -30%; right: -30%; bottom: -6%; height: 58%; z-index: -1; pointer-events: none; opacity: .55;
  background:
    linear-gradient(rgba(196, 149, 99, .35) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(196, 149, 99, .28) 1px, transparent 1px) 0 0 / 64px 64px;
  transform-origin: 50% 100%; transform: perspective(520px) rotateX(64deg) translateX(calc(var(--px, 0) * -60px));
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(80, 50, 20, .25) 35%, transparent 80%); mask-image: linear-gradient(to top, #000 0%, rgba(80, 50, 20, .25) 35%, transparent 80%); }
.d3-floor::after { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 60% at 60% 100%, rgba(176, 122, 71, .35), transparent 70%); }
.cd-hero::before { translate: calc(var(--px, 0) * -50px) calc(var(--py, 0) * -40px); }
.cd-hero::after { translate: calc(var(--px, 0) * 70px) calc(var(--py, 0) * 50px); }

/* ---------- hero text ---------- */
.d3-pill { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 7px 14px 7px 10px; border-radius: 99px; font-size: .82rem; font-weight: 600; color: rgba(255, 255, 255, .82);
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 30px -12px rgba(160, 106, 58, .6); backdrop-filter: blur(10px); }
.d3-pill i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 12px #34d399; }
.d3-pill i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #34d399; animation: d3Ping 2s var(--expo) infinite; }
@keyframes d3Ping { from { transform: scale(.5); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

.cd-hero h1 { perspective: 900px; }
.cd-hero h1 em { background: linear-gradient(100deg, #8a5a2b 0%, #c49563 25%, #fb923c 45%, #c49563 65%, #c49563 85%, #8a5a2b 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd-hero .wow-word { transform: translate3d(0, .5em, -60px) rotateX(-88deg); transform-origin: 50% 100% -.4em; filter: blur(8px);
  animation: d3Word 1.15s var(--expo) forwards; animation-delay: calc(var(--i) * 85ms + 150ms); }
.cd-hero h1 em.wow-word { animation: d3Word 1.15s var(--expo) forwards, wowShimmer 7s linear infinite; animation-delay: calc(var(--i) * 85ms + 150ms), 1.4s; }
@keyframes d3Word { to { opacity: 1; transform: none; filter: none; } }

.d3-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 0; margin: 40px 0 0; padding: 0; }
.d3-stats li { padding: 0 26px; border-left: 1px solid rgba(255, 255, 255, .12); }
.d3-stats li:first-child { padding-left: 0; border-left: 0; }
.d3-stats b { display: block; font: 700 1.9rem/1 var(--font-display); letter-spacing: -.03em; background: linear-gradient(180deg, #fff, #8a5a2b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.d3-stats span { display: block; margin-top: 6px; font-size: .8rem; color: rgba(255, 255, 255, .55); }

/* ---------- the 3D stage ---------- */
.d3-stage { position: relative; perspective: 1300px; perspective-origin: 50% 40%; display: grid; place-items: center; min-height: 470px; }
.d3-rig { position: relative; width: 100%; max-width: 430px; transform-style: preserve-3d;
  transform: translateZ(calc(var(--sc, 0) * -260px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); will-change: transform; }
.d3-rig .cd-report, .d3-rig .cd-report:hover { position: relative; transform: rotateY(-14deg) rotateX(7deg) rotateZ(-1.5deg); transform-style: preserve-3d; transition: none; }
.d3-rig .cd-report::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .13) 45%, transparent 60%) no-repeat; background-size: 250% 100%; background-position: 150% 0; }
.d3-rig .cd-report-title, .d3-rig .cd-report-top { transform: translateZ(18px); }
.d3-rig .cd-report-rows li { transform: translateZ(26px); }
.d3-rig .cd-report-foot div { transform: translateZ(60px); }
.d3-rig .cd-band { display: inline-block; transform: translateZ(14px); }

/* orbit ring with three glowing moons */
.d3-orbit { position: absolute; inset: -22% -24%; border-radius: 50%; transform-style: preserve-3d; pointer-events: none;
  border: 1px solid rgba(196, 149, 99, .28); box-shadow: 0 0 40px -10px rgba(196, 149, 99, .5), inset 0 0 40px -10px rgba(176, 122, 71, .4);
  transform: rotateX(76deg) rotateZ(var(--d3a)); }
.d3-orbit::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 1px dashed rgba(232, 200, 160, .2); }
.d3-orbit i { position: absolute; width: 12px; height: 12px; margin: -6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #7a4b24 30%, #c49563 60%, #7a4b24); box-shadow: 0 0 18px 4px rgba(196, 149, 99, .8); }
.d3-orbit i:nth-child(1) { left: 50%; top: 0; }
.d3-orbit i:nth-child(2) { left: 7%; top: 75%; width: 8px; height: 8px; margin: -4px; background: radial-gradient(circle at 35% 30%, #fff, #f3e4d0 40%, #b07a47); box-shadow: 0 0 14px 3px rgba(176, 122, 71, .8); }
.d3-orbit i:nth-child(3) { left: 93%; top: 75%; width: 6px; height: 6px; margin: -3px; background: #fdba74; box-shadow: 0 0 12px 3px rgba(251, 146, 60, .8); }

/* glass cube */
.d3-cube { position: absolute; right: -4%; top: -15%; width: 70px; height: 70px; transform-style: preserve-3d; transform: translateZ(120px); pointer-events: none; }
.d3-cube-spin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.d3-cube i { position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.2rem/1 var(--font-display); font-style: normal; color: #fff; text-shadow: 0 0 12px rgba(232, 200, 160, .8);
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, .35); backface-visibility: visible;
  background: linear-gradient(140deg, rgba(222, 196, 164, .55), rgba(160, 106, 58, .35) 50%, rgba(138, 90, 43, .45)); box-shadow: inset 0 0 22px rgba(255, 255, 255, .25); }
.d3-cube i:nth-child(1) { transform: translateZ(35px); }
.d3-cube i:nth-child(2) { transform: rotateY(90deg) translateZ(35px); }
.d3-cube i:nth-child(3) { transform: rotateY(180deg) translateZ(35px); }
.d3-cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(35px); }
.d3-cube i:nth-child(5) { transform: rotateX(90deg) translateZ(35px); }
.d3-cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(35px); }

/* satellites floating in front of the report */
.d3-sat { position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 16px; color: #fff; white-space: nowrap; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04)), rgba(255, 251, 245, .9); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 24px 50px -18px rgba(80, 50, 20, .38), 0 0 40px -16px rgba(196, 149, 99, .7); backdrop-filter: blur(12px); }
.d3-sat small { display: block; font-size: .7rem; font-weight: 600; color: rgba(255, 255, 255, .55); }
.d3-sat b { font: 700 .98rem/1.2 var(--font-display); }
.d3-sat > svg { width: 34px; height: 34px; padding: 8px; border-radius: 10px; flex: none; color: #fff; background: linear-gradient(160deg, #34d399, #059669); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 18px -8px #10b981; }
.d3-sat-c > svg { background: linear-gradient(160deg, #c49563, #7a4b24); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 18px -8px #b07a47; }
.d3-sat .ring { --tone: #b07a47; }
.d3-sat .ring::before { inset: 6px; background: #fffaf3; }
.d3-sat .ring strong { font-size: .95rem; }
.d3-sat .lp-caret { background: #c49563; animation: d3Blink 1s steps(1) infinite; }
@keyframes d3Blink { 50% { opacity: 0; } }
.d3-sat-a { left: -16%; top: 4%; transform: translateZ(140px); --k: 0; }
.d3-sat-b { right: -14%; top: 44%; transform: translateZ(190px); --k: 1; }
.d3-sat-c { left: -8%; bottom: -6%; transform: translateZ(100px); --k: 2; }
.d3-shadow { position: absolute; left: 6%; right: 6%; bottom: -90px; height: 60px; border-radius: 50%; pointer-events: none; transform: translateZ(-120px);
  background: radial-gradient(closest-side, rgba(160, 106, 58, .55), rgba(176, 122, 71, .15) 60%, transparent); filter: blur(8px); }

/* ---------- motion (only for visitors who are fine with it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  body:not(.in-test) .view-root { animation: d3PageIn .85s var(--expo) both; transform-origin: 50% 0; }
  @keyframes d3PageIn { from { opacity: 0; transform: perspective(1600px) translate3d(0, 34px, -140px) rotateX(7deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

  .d3-floor { animation: d3Grid 2.4s linear infinite; }
  @keyframes d3Grid { to { background-position: 0 64px, 0 64px; } }
  .d3-pill { animation: d3Up .9s var(--expo) .05s both; }
  .d3-in { animation: d3Up 1s var(--expo) var(--d, 0s) both; }
  @keyframes d3Up { from { opacity: 0; transform: translate3d(0, 26px, 0); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

  .d3-stage { animation: d3StageIn 1.8s var(--expo) .25s both; }
  @keyframes d3StageIn { from { opacity: 0; transform: translate3d(0, 60px, 0) scale(.86); } to { opacity: 1; transform: none; } }
  .d3-rig .cd-report { animation: d3ReportIn 1.6s var(--expo) .35s both; }
  @keyframes d3ReportIn { from { transform: rotateY(-70deg) rotateX(24deg) rotateZ(-8deg) translateZ(-200px); } }
  .d3-rig .cd-report::after { animation: d3Sheen 7s ease-in-out 2.2s infinite; }
  @keyframes d3Sheen { 0%, 70% { background-position: 150% 0; } 100% { background-position: -60% 0; } }
  .d3-rig .cd-report-rows li { animation: d3Row 1s var(--expo) calc(1s + var(--i) * .13s) both; }
  @keyframes d3Row { from { opacity: 0; transform: translate3d(40px, 0, 160px) rotateY(24deg); } }
  .d3-rig .cd-report-foot div { animation: d3Pop 1.1s var(--spring) 1.55s both; }
  @keyframes d3Pop { from { opacity: 0; transform: translateZ(200px) scale(.4); } }

  .d3-orbit { animation: d3Orbit 22s linear infinite, d3Fade 1.4s ease .9s both; }
  @keyframes d3Orbit { to { --d3a: 360deg; } }
  @keyframes d3Fade { from { opacity: 0; } }
  .d3-cube-spin { animation: d3Cube 16s linear infinite; }
  @keyframes d3Cube { from { transform: rotateX(-20deg) rotateY(0); } 50% { transform: rotateX(25deg) rotateY(180deg); } to { transform: rotateX(-20deg) rotateY(360deg); } }
  .d3-cube { animation: d3Fade 1s ease 1.3s both; }
  .d3-sat { animation: d3SatIn 1s var(--spring) calc(1.35s + var(--k) * .18s) both, d3Bob 6s ease-in-out calc(var(--k) * -2s) infinite; }
  @keyframes d3SatIn { from { opacity: 0; scale: .3; } }
  @keyframes d3Bob { 50% { translate: 0 -14px; } }
  .d3-shadow { animation: d3Breathe 6s ease-in-out infinite; }
  @keyframes d3Breathe { 50% { opacity: .6; scale: .9; } }

  /* 3D scroll reveal: sections rise out of the depth and straighten up */
  .d3-on .reveal { opacity: 0; transform: perspective(1200px) translate3d(0, 80px, -180px) rotateX(26deg); filter: blur(8px); transform-origin: 50% 0; }
  .d3-on .reveal.in { opacity: 1; transform: none; filter: none;
    transition: opacity .8s ease var(--d, 0ms), transform 1.25s var(--expo) var(--d, 0ms), filter .9s ease var(--d, 0ms) !important; }

  /* tabs: the new panel turns in from the side it was picked on */
  .cd-panel.d3-swap { animation: d3Swap .9s var(--expo); }
  .cd-panel.d3-swap .cd-panel-text > * { animation: d3Up .8s var(--expo) both; }
  .cd-panel.d3-swap .cd-panel-text > :nth-child(2) { animation-delay: .06s; }
  .cd-panel.d3-swap .cd-panel-text > :nth-child(3) { animation-delay: .12s; }
  .cd-panel.d3-swap .cd-panel-text > :nth-child(4) { animation-delay: .18s; }
  .cd-panel.d3-swap .cd-panel-text > :nth-child(5) { animation-delay: .24s; }
  .cd-panel.d3-swap .cd-panel-visual { animation: d3Window 1.1s var(--expo) .08s both; }
  @keyframes d3Swap { from { opacity: 0; transform: perspective(1600px) translate3d(calc(var(--dir, 1) * 90px), 0, -220px) rotateY(calc(var(--dir, 1) * -24deg)); filter: blur(6px); } }
  @keyframes d3Window { from { opacity: 0; transform: translate3d(calc(var(--dir, 1) * 120px), 30px, -300px) rotateY(calc(var(--dir, 1) * -40deg)); } }

  /* FAQ answers unfold downwards */
  .cd-faq details[open] > p { animation: d3Fold .6s var(--expo); transform-origin: 50% 0; }
  @keyframes d3Fold { from { opacity: 0; transform: perspective(800px) rotateX(-70deg); } }

  /* animated light running round the edge of the key cards */
  .cd-final::before, .cd-plan-pro::before { animation: d3Orbit 6s linear infinite; }
}

/* ---------- tabs: lift in 3D ---------- */
.cd-tabs { perspective: 900px; }
.cd-tab { transition: transform .55s var(--spring), box-shadow .35s, background .35s, border-color .35s; transform-origin: 50% 100%; }
.cd-tab:hover:not(.on) { transform: translateY(-4px) rotateX(10deg); }
.cd-tab.on { transform: translateY(-4px) translateZ(20px); }

/* ---------- exam previews turn as they pass the middle of the screen (--turn: 1 below, 0 centred, -1 above) ---------- */
.cd-panel-visual, .cd-bigcard-visual { position: relative; perspective: 1400px; isolation: isolate; }
.cd-panel-visual::before, .cd-bigcard-visual::before { content: ""; position: absolute; inset: 8% 4%; z-index: -1; border-radius: 30px; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 50%, rgba(160, 106, 58, .55), rgba(176, 122, 71, .2) 50%, transparent 75%); filter: blur(30px); opacity: calc(1 - max(var(--turn, 0), calc(var(--turn, 0) * -1)) * .6); }
.d3-on .cd-panel-visual .lp-window, .d3-on .cd-bigcard-visual .lp-window,
.d3-on .cd-panel:hover .lp-window, .d3-on .cd-bigcard:hover .lp-window {
  --at: max(var(--turn, 0), calc(var(--turn, 0) * -1));
  transform: translateZ(calc(var(--at) * -90px)) rotateX(calc(var(--turn, 0) * 18deg)) rotateY(calc(-5deg - var(--at) * 16deg)); transition: box-shadow .4s; will-change: transform; }

/* ---------- spring tilt with glare (depth.js) ---------- */
.cd-plan, .tc, .card-link, .cd-final, .pm-plan, .d3-tilt { position: relative; }
.d3-tilting { transition-property: box-shadow, border-color, background-color !important; transform-style: preserve-3d; will-change: transform; z-index: 2; }
.d3-tilting::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, calc(var(--glare, 0) * .11)), rgba(167, 139, 250, calc(var(--glare, 0) * .08)) 30%, transparent 60%); }
.card-link.d3-tilting, .tc.d3-tilting, .cd-plan.d3-tilting { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 50px 80px -40px rgba(80, 50, 20, .4), 0 30px 70px -40px rgba(160, 106, 58, .7); border-color: rgba(196, 149, 99, .35); }
.d3-tilting .tc-tile, .d3-tilting .cd-plan-price, .d3-tilting .icon-tile, .d3-tilting .cd-final h2 { translate: 0 0 calc(var(--glare, 0) * 40px); }
.d3-tilting .tc-start, .d3-tilting .btn { translate: 0 0 calc(var(--glare, 0) * 26px); }

/* ---------- the edge light on the key cards ---------- */
.cd-final, .cd-plan-pro { isolation: isolate; }
.cd-final::before, .cd-plan-pro::before { content: ""; position: absolute; inset: -1px; z-index: 0; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--d3a), transparent 0 62%, rgba(196, 149, 99, .9) 74%, #c49563 82%, #fb923c 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.cd-final > *, .cd-plan-pro > * { position: relative; z-index: 1; }

/* ---------- buttons: a light sweep and a spring ---------- */
.cd-btn-main, .btn-primary, .cd-btn-white, .cd-btn-dark, .cd-btn-glass { isolation: isolate; }
.cd-btn-main::after, .btn-primary::after, .cd-btn-white::after, .cd-btn-dark::after, .cd-btn-glass::after { content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 55%; z-index: -1; pointer-events: none;
  transform: skewX(-22deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transition: left .8s var(--expo); }
.cd-btn-white::after, .cd-btn-dark::after { background: linear-gradient(90deg, transparent, rgba(196, 149, 99, .35), transparent); }
.cd-btn-main:hover::after, .btn-primary:hover:not(:disabled)::after, .cd-btn-white:hover::after, .cd-btn-dark:hover::after, .cd-btn-glass:hover::after { left: 135%; }
.cd-hero [data-magnetic] { transition: transform .5s var(--spring), box-shadow .3s, filter .3s; }

/* ---------- the light that follows the pointer ---------- */
.d3-light { position: fixed; left: -320px; top: -320px; width: 640px; height: 640px; z-index: 0; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .8s;
  background: radial-gradient(closest-side, rgba(160, 106, 58, .16), rgba(176, 122, 71, .06) 50%, transparent); mix-blend-mode: screen; }
.d3-light.on { opacity: 1; }
body.in-test .d3-light { display: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 1280px) { .d3-rig { max-width: 390px; } .d3-sat-b { right: 3%; } .d3-cube { right: 10%; top: -20%; width: 56px; height: 56px; } .d3-cube i { font-size: 1rem; } .d3-cube i:nth-child(1) { transform: translateZ(28px); } .d3-cube i:nth-child(2) { transform: rotateY(90deg) translateZ(28px); } .d3-cube i:nth-child(3) { transform: rotateY(180deg) translateZ(28px); } .d3-cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(28px); } .d3-cube i:nth-child(5) { transform: rotateX(90deg) translateZ(28px); } .d3-cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(28px); } }
@media (max-width: 960px) {
  .cd-hero { min-height: 0; }
  .d3-stage { min-height: 420px; margin-top: 56px; }
  .d3-rig { max-width: 400px; }
  .d3-sat-a { left: -4%; top: -6%; }
  .d3-sat-b { right: -4%; }
  .d3-orbit { inset: -14% -10%; }
}
@media (max-width: 560px) {
  .d3-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .d3-stats li { padding: 0 10px; }
  .d3-stats b { font-size: 1.45rem; }
  .d3-stats span { font-size: .72rem; }
  .d3-stage { min-height: 380px; }
  .d3-sat { padding: 8px 12px 8px 8px; gap: 8px; }
  .d3-sat b { font-size: .82rem; }
  .d3-sat > svg { width: 28px; height: 28px; padding: 6px; }
  .d3-sat .ring { --size: 44px !important; }
  .d3-sat-a { left: -2%; top: -4%; }
  .d3-sat-b { right: 4%; top: 54%; }
  .d3-sat-c, .d3-cube { display: none; }
  .d3-floor { height: 40%; }
}

@media (prefers-reduced-motion: reduce) {
  .d3-stars { display: none; }
  .d3-light { display: none; }
}

/* ---------- scroll progress and press ripple, in the violet palette ---------- */
.wow-progress { background: linear-gradient(90deg, #a06a3a, #b07a47, #fb923c) !important; box-shadow: 0 0 14px rgba(176, 122, 71, .8); }
body.in-test .wow-progress { display: none; }
.wow-ripple { background: #fff; opacity: .3; }

/* =====================================================================================================
   DEPTH, ROUND 2 — cursor ring, glass header, gliding tab light, word-by-word headings, crossing ribbons,
   glass shapes in banners, hero text that drifts away on scroll.
   ===================================================================================================== */

/* ---------- cursor ring: follows with a spring, stretches with speed, grows over things you can press ---------- */
.d3-cursor { position: fixed; left: -18px; top: -18px; width: 36px; height: 36px; z-index: 9999; border-radius: 50%; pointer-events: none; opacity: 0;
  border: 1.5px solid rgba(222, 196, 164, .75); box-shadow: 0 0 18px -4px rgba(196, 149, 99, .8), inset 0 0 12px -6px rgba(232, 200, 160, .8);
  transition: opacity .3s, width .45s var(--spring), height .45s var(--spring), left .45s var(--spring), top .45s var(--spring), background .3s, border-color .3s; mix-blend-mode: screen; }
.d3-cursor.on { opacity: 1; }
.d3-cursor.hot { width: 64px; height: 64px; left: -32px; top: -32px; background: rgba(196, 149, 99, .12); border-color: rgba(232, 200, 160, .9); }
.d3-cursor.down { width: 26px; height: 26px; left: -13px; top: -13px; background: rgba(232, 200, 160, .25); }
.d3-cursor.text { opacity: 0; }
body.in-test .d3-cursor { display: none; }

/* ---------- header: glass that thickens once the page moves ---------- */
.topbar { transition: background .5s, box-shadow .5s, border-color .5s, backdrop-filter .5s; }
body.d3-scrolled .topbar { background: rgba(255, 250, 243, .86); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom-color: rgba(196, 149, 99, .16); box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 20px 40px -24px rgba(80, 50, 20, .38), 0 1px 30px -10px rgba(160, 106, 58, .35); }
.brand img, .brand-logo { transition: transform .6s var(--spring); }
.brand:hover img, .brand:hover .brand-logo { transform: rotateY(180deg) scale(1.05); }
.nav a { transition: color .25s; }
.nav a:not(.active)::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad-accent); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s var(--expo); }
.nav a:not(.active):hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav a { position: relative; }

/* ---------- tabs: a light under the chosen tab that glides between them ---------- */
.cd-tabs { position: relative; }
.cd-tab { position: relative; z-index: 1; }
.d3-tabglow { position: absolute; left: 0; top: 0; z-index: 0; width: var(--w, 0); height: var(--h, 0); border-radius: 18px; pointer-events: none;
  transform: translate3d(var(--x, 0), var(--y, 0), 0); transition: transform .8s var(--spring), width .8s var(--spring), height .5s var(--expo);
  background: radial-gradient(60% 70% at 50% 100%, rgba(176, 122, 71, .85), rgba(160, 106, 58, .5) 50%, transparent 75%); filter: blur(22px); opacity: .9; }

/* ---------- headings: words turn up out of the page ---------- */
.d3-words { perspective: 700px; }
.d3-w { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .d3-words .d3-w { opacity: 0; transform: translate3d(0, .45em, -40px) rotateX(-80deg); transform-origin: 50% 100% -.3em; filter: blur(6px); }
  .d3-words-in .d3-w { opacity: 1; transform: none; filter: none;
    transition: opacity .7s ease calc(var(--i) * 55ms), transform 1.1s var(--expo) calc(var(--i) * 55ms), filter .7s ease calc(var(--i) * 55ms); }
  .cd-panel.d3-swap .d3-w { opacity: 1; transform: none; filter: none; }
}

/* ---------- hero text drifts up and fades as the stage turns away ---------- */
.cd-hero-text { transform: translate3d(0, calc(var(--hs, 0) * -90px), 0); opacity: calc(1 - var(--hs, 0) * 1.3); will-change: transform, opacity; }
.d3-floor { opacity: calc(.55 - var(--hs, 0) * .4); }

/* ---------- numbers that count up keep their width ---------- */
[data-to] { font-variant-numeric: tabular-nums; }

/* ---------- crossing ribbons between the hero and the format section ---------- */
.d3-ribbons { position: relative; z-index: 2; height: 150px; margin: -70px 0 -10px; overflow: hidden; pointer-events: none; perspective: 900px; }
.d3-ribbon { position: absolute; left: -6%; right: -6%; top: 50%; display: flex; overflow: hidden; padding: 14px 0; white-space: nowrap;
  transform-origin: 50% 50%; transition: transform .6s var(--expo); }
.d3-ribbon-a { z-index: 2; margin-top: -30px; transform: rotate(-3.2deg) skewX(var(--skew, 0deg));
  background: linear-gradient(90deg, #8a5a2b, #7a4b24 45%, #b07a47 75%, #ea580c); box-shadow: 0 20px 50px -18px rgba(138, 90, 43, .8), inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .3); }
.d3-ribbon-b { z-index: 1; margin-top: -24px; transform: rotate(2.6deg) translateZ(-60px) skewX(calc(var(--skew, 0deg) * -1));
  background: rgba(255, 250, 243, .95); border-block: 1px solid rgba(196, 149, 99, .25); box-shadow: 0 20px 40px -20px rgba(80, 50, 20, .38); }
.d3-track { display: flex; align-items: center; gap: 22px; padding-right: 22px; will-change: transform; }
.d3-track span { font: 700 1.25rem/1 var(--font-display); letter-spacing: -.01em; text-transform: uppercase; color: #fff; }
.d3-ribbon-b .d3-track span { color: transparent; -webkit-text-stroke: 1px rgba(222, 196, 164, .7); }
.d3-track i { font-style: normal; font-size: .9rem; color: rgba(255, 255, 255, .7); }
.d3-ribbon-b .d3-track i { color: #c49563; }

/* ---------- banners: glass shapes floating behind the content ---------- */
.d3-host { position: relative; overflow: hidden; isolation: isolate; }
.d3-host > :not(.d3-deco) { position: relative; z-index: 1; }
.d3-deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; perspective: 600px; }
.d3-deco i { position: absolute; display: block; transition: translate 1.2s var(--expo); }
.d3-orb { right: 8%; top: -30px; width: 120px; height: 120px; border-radius: 50%; translate: calc(var(--px, 0) * -40px) calc(var(--py, 0) * -30px);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .6), rgba(222, 196, 164, .35) 18%, rgba(160, 106, 58, .45) 42%, rgba(94, 59, 31, .55) 70%, transparent 100%);
  box-shadow: inset -10px -14px 30px rgba(70, 42, 18, .7), 0 20px 50px -20px rgba(160, 106, 58, .6); opacity: .8; }
.d3-hoop { right: 26%; bottom: -46px; width: 110px; height: 110px; border-radius: 50%; border: 10px solid transparent; translate: calc(var(--px, 0) * 50px) calc(var(--py, 0) * 36px);
  background: linear-gradient(#0000, #0000) padding-box, linear-gradient(140deg, rgba(232, 200, 160, .7), rgba(160, 106, 58, .2), rgba(251, 146, 60, .6)) border-box;
  transform: rotateX(62deg) rotateZ(var(--d3a)); opacity: .7; }
.d3-gem { right: 3%; bottom: 14%; width: 38px; height: 38px; transform-style: preserve-3d; translate: calc(var(--px, 0) * 70px) calc(var(--py, 0) * 50px); }
.d3-gem b { position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, .35); background: linear-gradient(140deg, rgba(222, 196, 164, .5), rgba(138, 90, 43, .35)); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.d3-gem b:nth-child(2) { transform: rotateY(45deg); }
.d3-gem b:nth-child(3) { transform: rotateY(90deg); }
.d3-gem b:nth-child(4) { transform: rotateY(135deg); }
.d3-dot { left: 46%; top: 18%; width: 8px; height: 8px; border-radius: 50%; background: #fdba74; box-shadow: 0 0 14px 4px rgba(251, 146, 60, .7); translate: calc(var(--px, 0) * 90px) calc(var(--py, 0) * 60px); }
.cd-final .d3-orb { right: auto; left: -40px; top: auto; bottom: -50px; width: 180px; height: 180px; }
.cd-final .d3-hoop { right: 6%; bottom: auto; top: -40px; width: 160px; height: 160px; }
.page-head .d3-orb { width: 90px; height: 90px; top: -24px; }
@media (prefers-reduced-motion: no-preference) {
  .d3-hoop { animation: d3Orbit 14s linear infinite; }
  .d3-gem { animation: d3GemSpin 9s linear infinite; }
  @keyframes d3GemSpin { from { transform: rotateX(15deg) rotateY(0); } to { transform: rotateX(15deg) rotateY(360deg); } }
  .d3-orb { animation: cdFloat 8s ease-in-out infinite; }
  .d3-dot { animation: d3Twinkle 3s ease-in-out infinite; }
  @keyframes d3Twinkle { 50% { opacity: .3; transform: scale(.6); } }
}

/* ---------- test cards: the number tile turns towards you ---------- */
.tc-tile { transition: transform .7s var(--spring); }
.tc:hover .tc-tile { transform: rotateY(-22deg) rotateX(8deg) scale(1.04); }

/* ---------- arrows nudge forward on hover ---------- */
.btn > svg:last-child:not(:first-child), .tc-start svg, .pf-go svg { transition: translate .45s var(--spring); }
.btn:hover > svg:last-child:not(:first-child), .tc:hover .tc-start svg, .pf-test:hover .pf-go svg { translate: 4px 0; }

@media (max-width: 560px) {
  .d3-ribbons { height: 116px; margin-top: -40px; }
  .d3-track span { font-size: .95rem; }
  .d3-orb { width: 80px; height: 80px; }
  .d3-hoop, .d3-dot { display: none; }
}
@media (prefers-reduced-motion: reduce) { .d3-cursor { display: none; } }

/* .page's padding shorthand wiped the container's side gutter, so pages touched the screen edge below the
   container width. Keep the gutter. */
.container.page { padding-left: 24px; padding-right: 24px; }
@media (max-width: 640px) { .container.page { padding-left: 16px; padding-right: 16px; } }

/* =====================================================================================================
   DEPTH, ROUND 3 — WebGL liquid shape, inertial-scroll skew, 3D page curtain.
   ===================================================================================================== */
.d3-gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.6s ease .4s; }
.d3-has-gl .d3-gl { opacity: 1; }
/* with the liquid shape behind it, the report turns to frosted glass so the colour shows through */
.d3-has-gl .d3-rig .cd-report { background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 45%), rgba(255, 250, 243, .72); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); }
.cd-hero.d3-has-gl::before, .cd-hero.d3-has-gl::after { opacity: .5; }

/* sections lean with the scroll speed (depth.js sets skewY inline); keep the lean smooth */
.cd-section, .pf-tests, .d3-ribbons { transform-origin: 50% 50%; will-change: transform; }

/* labels being decoded keep a steady width */
.cd-eyebrow, .cd-final-k, .tc-kicker { font-variant-numeric: tabular-nums; }

/* ---------- the curtain between pages ---------- */
.d3-curtain { position: fixed; inset: 0; z-index: 9000; pointer-events: none; visibility: hidden; perspective: 1200px; }
.d3-curtain.go { visibility: visible; }
.d3-curtain i, .d3-curtain b { position: absolute; left: -10%; right: -10%; top: 0; height: 120%; transform: translate3d(0, 110%, 0) skewY(-6deg); transform-origin: 0 0; }
.d3-curtain i:nth-child(1) { background: linear-gradient(100deg, #8a5a2b, #8a5a2b); }
.d3-curtain i:nth-child(2) { background: linear-gradient(100deg, #b07a47, #f97316); }
.d3-curtain i:nth-child(3) { background: #fbf7f1; }
.d3-curtain b { height: 4px; top: auto; bottom: 0; background: linear-gradient(90deg, transparent, #c49563, transparent); box-shadow: 0 0 30px 6px rgba(232, 200, 160, .6); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .d3-curtain.go i { animation: d3Curtain .95s cubic-bezier(.77, 0, .18, 1) both; }
  .d3-curtain.go i:nth-child(2) { animation-delay: .06s; }
  .d3-curtain.go i:nth-child(3) { animation-delay: .12s; }
  .d3-curtain.go b { animation: d3CurtainLine .95s ease .1s both; }
  @keyframes d3Curtain {
    0% { transform: translate3d(0, 110%, 0) skewY(-6deg) rotateX(-30deg); }
    45%, 52% { transform: translate3d(0, -10%, 0) skewY(0) rotateX(0); }
    100% { transform: translate3d(0, -130%, 0) skewY(6deg) rotateX(25deg); }
  }
  @keyframes d3CurtainLine { 0%, 30% { opacity: 0; transform: translateY(0); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-110vh); } }
  /* the new page arrives as the curtain lifts */
  body:has(.d3-curtain.go) .view-root { animation-delay: .38s; }
}
@media (prefers-reduced-motion: reduce) { .d3-curtain { display: none; } }

/* Card contents sit flat on the card. (Old translateZ values on the title and the top row, with a perspective on
   the list, threw them out of their cards.) They only lift towards you while the card is tilted. */
.pf-test .pf-test-top, .pf-test h3, .lp-section-card h3 { transform: none; }
.card-link:not(.d3-tilting), .pf-test:not(.d3-tilting), .pm-plan:not(.d3-tilting), .kpi, .pf-auth-card, .lp-why .card { transform-style: flat; }
.d3-tilting.pf-test .pf-test-top { translate: 0 0 calc(var(--glare, 0) * 30px); }
.d3-tilting.pf-test h3 { translate: 0 0 calc(var(--glare, 0) * 22px); }

/* =====================================================================================================
   WARM LIGHT for the 3D layer: the hero is cream, so its glass pieces turn light with dark brown text.
   ===================================================================================================== */
.cd-hero h1 em { background-image: linear-gradient(100deg, #c69563 0%, #8a5a2b 25%, #d4a373 45%, #8a5a2b 65%, #5e3b1f 85%, #c69563 100%); }
.d3-pill { color: var(--text-2); background: linear-gradient(180deg, #fff, #fbf4ea); border-color: rgba(138, 90, 43, .2); box-shadow: inset 0 1px 0 #fff, 0 10px 30px -14px rgba(138, 90, 43, .4); }
.d3-stats b { background-image: linear-gradient(180deg, #5e3b1f, #a77446); }
.d3-stats span { color: var(--muted); }
.d3-sat { color: var(--text); background: linear-gradient(160deg, #fff, #fbf4ea); border-color: rgba(138, 90, 43, .18); box-shadow: 0 24px 44px -20px rgba(90, 55, 25, .4), inset 0 1px 0 #fff; }
.d3-sat small { color: var(--muted); }
.d3-sat .ring::before { background: #fffaf3; }
.d3-cube i { color: #fff; text-shadow: 0 1px 8px rgba(90, 55, 25, .45); border-color: rgba(255, 255, 255, .6); }
.d3-ribbon-a { background: linear-gradient(90deg, #5e3b1f, #8a5a2b 40%, #b07a47 75%, #d4a373); box-shadow: 0 20px 50px -18px rgba(110, 68, 32, .55), inset 0 1px 0 rgba(255, 255, 255, .3); }
.d3-ribbon-b { background: rgba(255, 250, 243, .96); border-block-color: rgba(138, 90, 43, .25); box-shadow: 0 20px 40px -22px rgba(90, 55, 25, .35); }
.d3-ribbon-b .d3-track span { -webkit-text-stroke: 1px rgba(138, 90, 43, .65); }
.d3-ribbon-b .d3-track i { color: #b07a47; }
.d3-light { mix-blend-mode: multiply; opacity: .5; }
.card-link.d3-tilting, .tc.d3-tilting, .cd-plan.d3-tilting { box-shadow: 0 1px 2px rgba(80, 50, 20, .06), 0 50px 80px -40px rgba(80, 50, 20, .45), 0 30px 70px -40px rgba(196, 149, 99, .55); }
body.d3-scrolled .topbar { background: rgba(255, 250, 243, .86); border-bottom-color: rgba(138, 90, 43, .16); box-shadow: 0 20px 40px -28px rgba(80, 50, 20, .35); }
.wow-progress { background: linear-gradient(90deg, #6e4420, #a06a3a, #d4a373) !important; box-shadow: 0 0 12px rgba(196, 149, 99, .7); }
.d3-curtain i:nth-child(1) { background: linear-gradient(100deg, #6e4420, #9a6535); }
.d3-curtain i:nth-child(2) { background: linear-gradient(100deg, #c08b58, #f3e4d0); }
/* on the brown bands the main button is white, so it stands out */
.cd-plan-pro .btn-primary, .cd-plan-pro .cd-btn-main, .pm-plan-pro .btn-primary, .pm-hero .btn-primary, .pf-banner .btn-primary, .cd-final .btn-primary {
  color: #4a2b14; background: linear-gradient(180deg, #ffffff, #f3e7d8); box-shadow: inset 0 -2px 0 rgba(90, 55, 25, .12), 0 4px 0 #c9ad8c, 0 18px 36px -16px rgba(40, 22, 8, .6); }
.cd-plan-pro .btn-primary:hover, .cd-plan-pro .cd-btn-main:hover, .pm-plan-pro .btn-primary:hover:not(:disabled), .pm-hero .btn-primary:hover:not(:disabled), .pf-banner .btn-primary:hover:not(:disabled), .cd-final .btn-primary:hover:not(:disabled) {
  color: #4a2b14; background: linear-gradient(180deg, #ffffff, #f3e7d8); }
