/* The 8 Steps Academy 1.9: the "Depth" layer. Switch it off under Appearance → 8 Steps settings → Depth.
   Three depth moments on the home page: the book in space (one centred column: label, headline, the 3D book,
   then the words and buttons), raised path cards, and a 3D staircase. Everything is scoped to body.depth,
   so unticking the setting gives back the 1.8 look exactly. Works with or without the refined look (.lux).
   Without JavaScript the layout is the same, with the flat cover in the book's place. */

.depth{
  --d-navy:#1F2A3A; --d-night:#0E1624; --d-gold:#C99A3E; --d-gold-hi:#E7C27A;
  --slab-a:#FFFFFF; --slab-b:#FBF6EC; --slab-hi:#FFFFFF;
  --slab-e1:#E4D9C3; --slab-e2:#DCCFB5; --slab-e3:#D6C8AB; --slab-e4:#CFC0A1; --slab-shadow:rgba(31,42,58,.42);
  --slab-glare:.6;
  --step-f1:#FFFDF8; --step-f2:#EADFC8; --step-line:#E1D3B6; --step-s1:#D8C7A4; --step-s2:#BBA273; --step-t1:#FFFFFF; --step-t2:#F1E8D6; --step-n:#1F2A3A;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .depth{
  --slab-a:#1D2939; --slab-b:#172131; --slab-hi:rgba(255,255,255,.07);
  --slab-e1:#2B394E; --slab-e2:#273447; --slab-e3:#222E40; --slab-e4:#1D2838; --slab-shadow:rgba(0,0,0,.7);
  --slab-glare:.22;
  --step-f1:#2E3D55; --step-f2:#223047; --step-line:#3A4A63; --step-s1:#1B2638; --step-s2:#131C2A; --step-t1:#3C4D68; --step-t2:#2F3E56; --step-n:#EEF1F5;
}}
:root[data-theme="dark"] .depth{
  --slab-a:#1D2939; --slab-b:#172131; --slab-hi:rgba(255,255,255,.07);
  --slab-e1:#2B394E; --slab-e2:#273447; --slab-e3:#222E40; --slab-e4:#1D2838; --slab-shadow:rgba(0,0,0,.7);
  --slab-glare:.22;
  --step-f1:#2E3D55; --step-f2:#223047; --step-line:#3A4A63; --step-s1:#1B2638; --step-s2:#131C2A; --step-t1:#3C4D68; --step-t2:#2F3E56; --step-n:#EEF1F5;
}

/* ================================================================ 1. The book in space (home page top section) */
.depth .hv-hero{position:relative;overflow:hidden;color:#C9CFD8;background-color:#1F2A3A;background-image:radial-gradient(ellipse 70% 60% at 50% 40%,#24344B 0%,#1F2A3A 45%,#0E1624 100%)}
.depth .hv-hero .d3-stars{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:0}
.depth .hv-hero .lux-line{opacity:.24;z-index:0}
/* One centred column. .hero-copy steps aside (display:contents) so the book can sit between the headline and the words. */
.depth .hv-hero .wrap{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;text-align:center;gap:22px;max-width:calc(860px + 2 * var(--pad));padding-block:clamp(40px,6vw,84px) clamp(52px,7vw,96px)}
.depth .hv-hero .hero-copy{display:contents}
.depth .hv-hero .wrap>*,.depth .hv-hero .hero-copy>*{order:4;min-width:0;max-width:100%}
.depth .hv-hero .wrap .eyebrow{order:1;justify-content:center;color:#E7C27A}
.depth .hv-hero .wrap h1{order:2;color:#FBF7EF}
.depth .hv-hero h1 em,.depth .hv-hero h1 i{color:#E7C27A;font-style:italic}
.depth .hv-hero .wrap .book{order:3}
.depth .hv-hero .lead{color:#C9CFD8;margin-inline:auto;max-width:54ch}
.depth .hv-hero .hv-ctas{justify-content:center}
.depth .hv-hero .hv-assure{justify-content:center;color:#DCE1E8}
.depth .hv-hero .hv-assure svg{color:#8FD3AE}
.depth .hv-hero .hv-bookline{display:none}
.depth .hv-hero .btn-solid{background:#E7C27A;border-color:#E7C27A;color:#0E1624;box-shadow:0 1px 0 rgba(255,255,255,.4) inset,0 -3px 0 #B48A3A inset,0 14px 30px -14px #000}
.depth .hv-hero .btn-solid:hover{background:#F0D293;border-color:#F0D293;color:#0E1624}
.depth .hv-hero .btn-line{background:transparent;color:#F3EEE4;border-color:rgba(243,238,228,.62)}
.depth .hv-hero .btn-line:hover{background:#F3EEE4;border-color:#F3EEE4;color:#1F2A3A}
.depth .hv-hero :focus-visible{outline-color:#E7C27A}

/* The book's stage: a fixed slot, so nothing moves when the 3D book replaces the flat cover. */
.depth .hv-hero .book{
  --bw:clamp(168px,calc(20vw + 56px),250px);
  --bh:calc(var(--bw) * 1.435); --bt:calc(var(--bw) * .065);
  position:relative;display:block;width:100%;flex:none;margin-block:-4px;
  height:calc(var(--bh) + var(--bw) * .16 + 30px);
  perspective:1400px;perspective-origin:50% 40%;
}
/* the glowing ring and the soft shadow under the book */
.depth .hv-hero .book::before{content:"";position:absolute;left:50%;top:calc(var(--bh) + 16px - var(--bw) * .14);width:calc(var(--bw) * 1.32);height:calc(var(--bw) * .28);transform:translateX(-50%);border-radius:50%;border:1px solid rgba(231,194,122,.38);box-shadow:0 0 40px rgba(231,194,122,.14),inset 0 0 24px rgba(231,194,122,.06);pointer-events:none}
.depth .hv-hero .book::after{content:"";position:absolute;left:50%;top:calc(var(--bh) + 8px);width:calc(var(--bw) * 1.15);height:calc(var(--bw) * .17);transform:translateX(-50%);background:radial-gradient(ellipse at center,rgba(0,0,0,.6),rgba(0,0,0,0) 70%);filter:blur(4px);pointer-events:none;animation:d3shadow 6s ease-in-out infinite}
.depth .hv-hero .plinth{display:none}
/* the flat cover, shown until the 3D book is ready (and if JavaScript is off) */
.depth .hv-hero .book>picture,.depth .hv-hero .book>img{position:absolute;left:50%;top:14px;width:var(--bw);margin-left:calc(var(--bw) / -2);z-index:1;transform:rotateX(8deg) rotateY(-28deg);display:block}
.depth .hv-hero .book>picture img,.depth .hv-hero .book>img{width:100%;max-width:none;height:var(--bh);object-fit:cover;aspect-ratio:auto;border-radius:2px 5px 5px 2px;animation:none;box-shadow:-6px 0 0 #C9BFAE,0 30px 50px -20px rgba(0,0,0,.8);transition:none}
.depth .hv-hero .book>picture img:hover,.depth .hv-hero .book>img:hover{transform:none}

/* The 3D book (built by depth.js): front, back, spine, page edges, top and bottom. */
.depth .d3-stage{touch-action:pan-y;cursor:grab;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.depth .d3-stage.d3-grabbing{cursor:grabbing}
.depth .d3-stage.d3-built>picture,.depth .d3-stage.d3-built>img{display:none}
.depth .d3-float{position:absolute;left:50%;top:14px;width:var(--bw);height:var(--bh);margin-left:calc(var(--bw) / -2);z-index:1;transform-style:preserve-3d;animation:d3float 6s ease-in-out infinite;visibility:hidden}
.depth .d3-built .d3-float{visibility:visible}
.depth .d3-book{position:relative;width:var(--bw);height:var(--bh);transform-style:preserve-3d;transform:rotateX(var(--rx,8deg)) rotateY(var(--ry,-28deg))}
.depth .d3-face{position:absolute;left:0;top:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}
.depth .d3-face picture{display:block;width:100%;height:100%}
.depth .d3-face img{display:block;width:100%;height:100%;max-width:none;object-fit:cover;pointer-events:none;-webkit-user-drag:none}
.depth .d3-front{width:var(--bw);height:var(--bh);transform:translateZ(calc(var(--bt) / 2));border-radius:2px 5px 5px 2px;background:#E9E2D2;box-shadow:inset 3px 0 0 rgba(0,0,0,.08)}
.depth .d3-front::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(105deg,rgba(255,255,255,0) 38%,rgba(255,255,255,var(--sheen,.18)) 50%,rgba(255,255,255,0) 62%) var(--sx,50%) 0/300% 100% no-repeat;mix-blend-mode:screen}
.depth .d3-back{width:var(--bw);height:var(--bh);transform:rotateY(180deg) translateZ(calc(var(--bt) / 2));border-radius:5px 2px 2px 5px;background:#1F2A3A}
.depth .d3-spine{width:var(--bt);height:var(--bh);left:calc(50% - var(--bt) / 2);transform:rotateY(-90deg) translateZ(calc(var(--bw) / 2));background:#E9E2D2;box-shadow:inset 0 0 6px rgba(0,0,0,.18)}
.depth .d3-spine img{object-fit:fill}
.depth .d3-pages{width:calc(var(--bt) - 2px);height:calc(var(--bh) - 6px);top:3px;left:calc(50% - var(--bt) / 2 + 1px);transform:rotateY(90deg) translateZ(calc(var(--bw) / 2 - 3px));background:repeating-linear-gradient(90deg,#FFFDF8 0 1px,#E8E1D3 1px 2px)}
.depth .d3-top{width:calc(var(--bw) - 6px);height:calc(var(--bt) - 2px);left:3px;top:calc(50% - var(--bt) / 2 + 1px);transform:rotateX(90deg) translateZ(calc(var(--bh) / 2 - 3px));background:repeating-linear-gradient(0deg,#FFFDF8 0 1px,#E8E1D3 1px 2px)}
.depth .d3-bottom{width:calc(var(--bw) - 6px);height:calc(var(--bt) - 2px);left:3px;top:calc(50% - var(--bt) / 2 + 1px);transform:rotateX(-90deg) translateZ(calc(var(--bh) / 2 - 3px));background:#E3DCCD}
@keyframes d3float{0%,100%{transform:translateY(0)}50%{transform:translateY(-12px)}}
@keyframes d3shadow{0%,100%{opacity:.9;transform:translateX(-50%) scale(1)}50%{opacity:.6;transform:translateX(-50%) scale(.86)}}
.depth .d3-paused .d3-float,.depth .d3-paused .book::after{animation-play-state:paused}

/* The Book page: the same 3D book in the cover's place (no starry sky), over the existing space so nothing moves. */
.depth .d3-bookpage .book.d3-stage{position:relative;--bw:min(330px,66vw);--bh:calc(var(--bw) * 1.435);--bt:calc(var(--bw) * .065);perspective:1400px;perspective-origin:50% 40%}
.depth .d3-bookpage .book.d3-built>picture,.depth .d3-bookpage .book.d3-built>img{display:block;visibility:hidden}
.depth .d3-bookpage .book.d3-built .plinth{visibility:hidden}
.depth .d3-bookpage .d3-float{top:calc(50% - var(--bh) / 2 - 18px)}
.depth .d3-bookpage .book.d3-built::after{content:"";position:absolute;left:50%;top:calc(50% + var(--bh) / 2 - 8px);width:calc(var(--bw) * 1.1);height:calc(var(--bw) * .16);transform:translateX(-50%);background:radial-gradient(ellipse at center,rgba(15,23,34,.42),rgba(15,23,34,0) 70%);filter:blur(4px);pointer-events:none;animation:d3shadow 6s ease-in-out infinite}

/* ================================================================ 2. Raised path cards ("slabs") */
.depth .hv-paths .hv-path-grid{perspective:1100px;align-items:stretch}
.depth .hv-paths .hv-path-grid .hv-path{
  --rx:0deg;--ry:0deg;
  position:relative;transform-style:preserve-3d;
  transform:rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--rise,0px));
  transition:transform .5s cubic-bezier(.2,.7,.2,1),opacity .9s cubic-bezier(.2,.7,.2,1);
  transition-delay:0s;
  background:linear-gradient(160deg,var(--slab-a),var(--slab-b));
  border:0;border-radius:22px;padding:clamp(22px,2.6vw,32px);margin-bottom:10px;
  box-shadow:0 1px 0 var(--slab-hi) inset,0 2px 0 var(--slab-e1),0 4px 0 var(--slab-e1),0 6px 0 var(--slab-e2),0 8px 0 var(--slab-e3),0 10px 0 var(--slab-e4),0 30px 40px -18px var(--slab-shadow);
}
.depth .hv-paths .hv-path-grid .hv-path.rv:not(.in){--rise:16px}
.depth .hv-paths .hv-path-grid .hv-path.d3-tilting{transition:transform .12s linear,opacity .9s}
/* the soft glare that follows the pointer */
.depth .hv-paths .hv-path::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:radial-gradient(circle at var(--gx,50%) var(--gy,0%),rgba(255,255,255,.7),rgba(255,255,255,0) 55%);opacity:var(--slab-glare);mix-blend-mode:soft-light}
/* the words and buttons float just above the surface */
.depth .hv-paths .hv-path>*{position:relative;z-index:1;transform:translateZ(20px)}
.depth .hv-paths .hv-path>.well{transform:translateZ(36px);background:#1F2A3A;border:0;box-shadow:0 10px 18px -8px rgba(14,22,36,.7)}
.depth .hv-paths .hv-path>.well .ico{color:#E7C27A}

/* ================================================================ 3. The 3D staircase (built by depth.js above the list) */
.depth .hv-steps.d3-on{overflow:hidden}
.depth .d3-stairs{
  --W:clamp(28px,calc((100vw - 64px) / 9),84px);--D:var(--W);
  position:relative;display:block;
  height:calc(var(--W) * 4.9 + 16px);margin:0 auto clamp(20px,3vw,36px);
  perspective:1500px;perspective-origin:50% 0%;pointer-events:none;
}
.depth .d3-stair{position:relative;width:calc(var(--W) * 8);height:calc(var(--W) * 3.6);margin:calc(var(--W) * -.4 + 8px) auto 0;transform-style:preserve-3d;transform:translateX(calc(var(--W) * -.25)) rotateX(-16deg) rotateY(-30deg)}
.depth .d3-step{--h:calc((var(--i) + 1) * var(--W) * .45);position:absolute;bottom:0;left:calc(var(--i) * var(--W));width:var(--W);height:var(--h);transform-style:preserve-3d;transform-origin:50% 100%;transform:scaleY(1);transition:transform 1s cubic-bezier(.2,.8,.2,1);transition-delay:calc(var(--i) * 90ms)}
.depth .d3-flat .d3-step{transform:scaleY(.06)}
.depth .d3-step>div{position:absolute;-webkit-backface-visibility:hidden;backface-visibility:hidden}
.depth .d3-f{left:0;top:0;width:var(--W);height:var(--h);transform:translateZ(calc(var(--D) / 2));background:linear-gradient(180deg,var(--step-f1),var(--step-f2));border:1px solid var(--step-line);display:flex;align-items:flex-start;justify-content:center;padding-top:calc(var(--W) * .1);box-sizing:border-box}
.depth .d3-f b{font-family:var(--serif);font-weight:500;font-size:calc(var(--W) * .4);line-height:1;color:var(--step-n);font-variant-numeric:lining-nums}
.depth .d3-s{top:0;left:calc((var(--W) - var(--D)) / 2);width:var(--D);height:var(--h);transform:rotateY(90deg) translateZ(calc(var(--W) / 2));background:linear-gradient(180deg,var(--step-s1),var(--step-s2))}
.depth .d3-t{left:0;top:calc((var(--h) - var(--D)) / 2);width:var(--W);height:var(--D);transform:rotateX(90deg) translateZ(calc(var(--h) / 2));background:linear-gradient(135deg,var(--step-t1),var(--step-t2));border:1px solid var(--step-line);box-sizing:border-box}
.depth .d3-gold .d3-f{background:linear-gradient(180deg,#F3D99A,#D3A54E);border-color:#C99A3E}
.depth .d3-gold .d3-f b{color:#1F2A3A}
.depth .d3-gold .d3-t{background:linear-gradient(135deg,#FBE9BC,#E7C27A);border-color:#D9B266}
.depth .d3-gold .d3-s{background:linear-gradient(180deg,#C99A3E,#9C7428)}
/* the list below becomes a tidy, clickable legend */
.depth .hv-steps.d3-on .hv-stair{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 14px;align-items:stretch}
.depth .hv-steps.d3-on .hv-stair li{margin-top:0}
.depth .hv-steps.d3-on .hv-stair a{min-height:60px;height:100%;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:12px 16px}
.depth .hv-steps.d3-on .hv-stair .hs-n{font-size:26px;min-width:16px}
@media (max-width:600px){
  .depth .hv-steps.d3-on .hv-stair{grid-template-columns:1fr 1fr;gap:8px}
  .depth .hv-steps.d3-on .hv-stair a{min-height:48px;padding:10px 12px;gap:10px}
  .depth .hv-steps.d3-on .hv-stair .hs-n{font-size:22px}
}

/* ================================================================ Calm: nothing moves for visitors who ask for reduced motion */
@media (prefers-reduced-motion:reduce){
  .depth .d3-float,.depth .hv-hero .book::after,.depth .d3-bookpage .book::after{animation:none}
  .depth .hv-paths .hv-path-grid .hv-path{transform:none;transition:none}
  .depth .d3-step{transition:none}
  .depth .d3-flat .d3-step{transform:none}
}

/* Dark mode: the icon wells get a gold rim so they read against the dark slab. */
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .depth .hv-paths .hv-path>.well{background:#0E1624;box-shadow:0 0 0 1px rgba(231,194,122,.32),0 10px 18px -8px #000}}
:root[data-theme="dark"] .depth .hv-paths .hv-path>.well{background:#0E1624;box-shadow:0 0 0 1px rgba(231,194,122,.32),0 10px 18px -8px #000}
