/* ============================================================
   hive-depth.css
   Shared depth and elevation kit for Hive partner surfaces.
   Palette: product blue #2F80FF, health green #34D399. No gold.

   Usage:
     <section class="hv-d" data-hive-depth> ... </section>
   hive-depth.js injects the sky, star canvas and key light layers.
   Content must sit inside .hv-d-in so it stacks above the layers.
   ============================================================ */

.hv-d{
  --hvd-blue:#2F80FF;
  --hvd-blue-soft:#8ab6ff;
  --hvd-green:#34D399;
  --hvd-line:#1d3352;
  --hvd-star:#eef4ff;
  --hvd-muted:#a9bcd6;
  --hvd-disp:'Michroma',sans-serif;
  --hvd-mono:'IBM Plex Mono',ui-monospace,monospace;
  position:relative;
  isolation:isolate;
  overflow:hidden;
}

/* ---- layer 1, deep sky wash ---- */
.hv-d-sky{
  position:absolute;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(122% 80% at 50% -16%, rgba(47,128,255,.17) 0%, rgba(47,128,255,.055) 34%, transparent 67%),
    radial-gradient(80% 60% at 10% 110%, rgba(150,120,255,.15) 0%, transparent 62%),
    radial-gradient(66% 54% at 93% 90%, rgba(52,211,153,.09) 0%, transparent 60%),
    linear-gradient(180deg,#050a14 0%,#08111f 46%,#050a14 100%);
}
/* ---- layer 2, parallax star canvas with shooting stars ---- */
.hv-d-canvas{position:absolute;inset:0;width:100%;height:100%;max-width:100%;z-index:1;pointer-events:none;opacity:.95}
/* ---- layer 3, volumetric key light from upper left ---- */
.hv-d-key{
  position:absolute;inset:0;z-index:2;pointer-events:none;mix-blend-mode:screen;
  background:radial-gradient(48% 42% at 24% 6%, rgba(138,182,255,.14) 0%, transparent 70%);
}
/* ---- content sits above every layer ---- */
.hv-d-in{position:relative;z-index:3}

/* ============================================================
   Type, with measure control so display copy cannot wrap ragged
   ============================================================ */
.hv-d-eyebrow{
  font-family:var(--hvd-mono);font-size:10.5px;letter-spacing:.22em;
  text-transform:uppercase;color:var(--hvd-blue-soft);opacity:.85;margin:0 0 18px;
}
/* The fix for the ragged hero. Balance the lines and cap the measure. */
.hv-d-h1{
  font-family:var(--hvd-disp);
  font-size:clamp(28px,4.4vw,54px);
  line-height:1.16;letter-spacing:.005em;color:#eef4ff;
  margin:0 auto 22px;max-width:23ch;
  text-wrap:balance;text-box-trim:trim-both;
}
/* Each sentence balances on its own measure, so no single-word last line. */
.hv-d-h1 em{
  display:block;font-style:normal;margin-top:.2em;text-wrap:balance;
  color:var(--hvd-blue);text-shadow:0 0 30px rgba(47,128,255,.5);
}
.hv-d-eyebrow.two{max-width:none;line-height:2.05}
.hv-d-h2{
  font-family:var(--hvd-disp);
  font-size:clamp(20px,2.5vw,30px);
  line-height:1.24;color:#eef4ff;margin:0 0 14px;max-width:26ch;text-wrap:balance;
}
.hv-d-lede{
  max-width:64ch;margin:0 auto 36px;color:var(--hvd-muted);
  font-size:16px;line-height:1.7;text-wrap:pretty;
}
.hv-d-in p{text-wrap:pretty}

/* ============================================================
   Elevated card, with ghost plates behind it for real z depth
   ============================================================ */
.hv-d-stage{position:relative;max-width:960px;margin:0 auto;perspective:1500px}
.hv-d-ghost{
  position:absolute;left:0;right:0;top:0;bottom:0;border-radius:20px;pointer-events:none;
  border:1px solid rgba(29,51,82,.6);background:rgba(8,17,31,.55);
}
.hv-d-ghost.g1{transform:translateY(16px) scale(.972);opacity:.55;filter:blur(.4px)}
.hv-d-ghost.g2{transform:translateY(31px) scale(.944);opacity:.30;filter:blur(1px)}
.hv-d-card{
  position:relative;border-radius:20px;overflow:hidden;text-align:left;
  background:linear-gradient(168deg,#0d1b30 0%,#091528 52%,#061021 100%);
  border:1px solid #22406b;
  box-shadow:
    inset 0 1px 0 rgba(170,205,255,.17),
    inset 0 -30px 60px -50px rgba(47,128,255,.42),
    0 48px 92px -46px rgba(0,0,0,.98),
    0 0 62px -32px rgba(47,128,255,.34);
  transition:transform .5s cubic-bezier(.2,.9,.25,1.08);
  will-change:transform;
}
/* travelling specular sheen, fired by JS on state change */
.hv-d-card::before{
  content:"";position:absolute;top:0;bottom:0;width:36%;z-index:4;pointer-events:none;
  background:linear-gradient(105deg,transparent 0%,rgba(185,215,255,.10) 45%,transparent 100%);
  transform:translateX(-140%);opacity:0;
}
.hv-d-card.sheen::before{animation:hvdSheen .95s cubic-bezier(.3,.7,.3,1) 1}
@keyframes hvdSheen{
  0%{transform:translateX(-140%);opacity:0}
  18%{opacity:1}
  100%{transform:translateX(360%);opacity:0}
}
.hv-d-body{padding:40px 44px 42px}

/* ============================================================
   Lifted plate, the repeating unit for receipts and questions
   ============================================================ */
.hv-d-grid{display:grid;gap:14px}
.hv-d-grid.two{grid-template-columns:repeat(auto-fit,minmax(290px,1fr))}
.hv-d-plate{
  position:relative;padding:20px 22px 20px 25px;border-radius:14px;
  background:linear-gradient(180deg,rgba(13,27,48,.95),rgba(8,17,31,.95));
  border:1px solid var(--hvd-line);
  box-shadow:inset 0 1px 0 rgba(150,190,255,.11), 0 16px 30px -24px rgba(0,0,0,.95);
  transition:transform .32s cubic-bezier(.2,.9,.25,1.1), border-color .32s ease, box-shadow .32s ease;
}
.hv-d-plate::before{
  content:"";position:absolute;left:0;top:16px;bottom:16px;width:2px;border-radius:2px;
  background:linear-gradient(180deg,var(--hvd-blue),rgba(47,128,255,0));
}
.hv-d-plate:hover{
  transform:translateY(-4px);border-color:#2f5f9e;
  box-shadow:inset 0 1px 0 rgba(150,190,255,.16), 0 26px 40px -26px rgba(0,0,0,.98), 0 0 34px -16px rgba(47,128,255,.42);
}
.hv-d-plate h3{
  font-family:var(--hvd-disp);font-size:12.5px;letter-spacing:.03em;
  color:var(--hvd-blue-soft);margin:0 0 9px;line-height:1.5;
}
.hv-d-plate p{color:#c6d6ec;font-size:14.5px;line-height:1.7;margin:0;max-width:none}

/* ---- left rule callout ---- */
.hv-d-beat{
  margin:22px 0;padding:15px 20px;border-left:2px solid var(--hvd-blue);
  background:linear-gradient(90deg,rgba(47,128,255,.11),transparent 78%);
  border-radius:0 12px 12px 0;
}
.hv-d-beat p{margin:0;color:#dfe9f8;font-size:15.5px;line-height:1.7}

/* ---- the payoff line ---- */
.hv-d-hit{
  color:var(--hvd-green);font-family:var(--hvd-disp);font-size:13.5px;
  letter-spacing:.03em;line-height:1.6;margin:24px 0 4px;max-width:none;
  text-shadow:0 0 26px rgba(52,211,153,.5);
}

/* ---- section head ---- */
.hv-d-h{
  font-family:var(--hvd-disp);font-size:15px;letter-spacing:.04em;text-transform:uppercase;
  color:#eef4ff;margin:0 0 16px;display:flex;align-items:center;gap:11px;
}
.hv-d-h i{
  width:7px;height:7px;border-radius:50%;background:var(--hvd-blue);flex:none;
  box-shadow:0 0 14px var(--hvd-blue);
}

/* ---- quiet footnote ---- */
.hv-d-note{
  margin:22px 0 0;font-family:var(--hvd-mono);font-size:10.5px;line-height:1.8;
  letter-spacing:.03em;color:#74879f;max-width:82ch;
}

/* ============================================================
   Tab shelf
   ============================================================ */
.hv-d-tabs{
  position:relative;display:flex;gap:10px;justify-content:center;flex-wrap:wrap;
  margin:0 auto 40px;padding:14px 16px 18px;max-width:960px;border-radius:22px;
  background:linear-gradient(180deg,rgba(11,21,38,.74) 0%,rgba(6,13,25,.5) 100%);
  border:1px solid rgba(29,51,82,.9);
  box-shadow:inset 0 1px 0 rgba(150,190,255,.13), 0 22px 46px -30px rgba(0,0,0,.95);
  backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);perspective:900px;
}
/* Even rows instead of an orphan tab on the second line. */
.hv-d-tabs[data-n="4"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:820px}
.hv-d-tabs[data-n="6"]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:720px){
  .hv-d-tabs[data-n="4"],.hv-d-tabs[data-n="6"]{grid-template-columns:minmax(0,1fr)}
}
.hv-d-tab{
  position:relative;font-family:var(--hvd-disp);font-size:11px;letter-spacing:.06em;
  text-transform:uppercase;color:#93a8c4;
  background:linear-gradient(180deg,#0c1829 0%,#081221 100%);
  border:1.5px solid #1b3355;border-radius:13px;padding:13px 17px;cursor:pointer;line-height:1.35;
  transform-style:preserve-3d;transform:translateZ(0);
  transition:transform .42s cubic-bezier(.2,.9,.25,1.16), box-shadow .42s ease, color .3s ease, border-color .3s ease, background .3s ease;
  box-shadow:0 2px 0 rgba(0,0,0,.45);
}
.hv-d-tab small{
  display:block;font-family:var(--hvd-mono);font-size:9px;letter-spacing:.11em;
  margin-top:5px;color:#63809f;
}
.hv-d-tab:hover{color:var(--hvd-blue-soft);border-color:#2a5a94;transform:translateY(-2px)}
.hv-d-tab:focus-visible{outline:3px solid var(--hvd-blue);outline-offset:3px}
.hv-d-tab.on{
  color:#eef4ff;border-color:var(--hvd-blue);
  background:linear-gradient(180deg,rgba(47,128,255,.22) 0%, rgba(20,70,150,.10) 100%);
  transform:translateY(-7px) scale(1.045);
  box-shadow:0 0 0 1px rgba(47,128,255,.32), 0 0 26px rgba(47,128,255,.36), 0 20px 30px -16px rgba(0,0,0,.95);
}
.hv-d-tab.on::after{
  content:"";position:absolute;left:22%;right:22%;bottom:-13px;height:12px;border-radius:50%;
  background:radial-gradient(60% 100% at 50% 0%, rgba(47,128,255,.44), transparent 72%);filter:blur(4px);
}
.hv-d-panel{display:none}
.hv-d-panel.on{display:block;animation:hvdIn .58s cubic-bezier(.16,.86,.28,1.06) 1}
@keyframes hvdIn{
  from{opacity:0;transform:translateY(16px) scale(.988)}
  to{opacity:1;transform:none}
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:760px){
  .hv-d-body{padding:28px 22px 30px}
  .hv-d-ghost{display:none}
  .hv-d-tabs{padding:12px 10px 15px;gap:8px;border-radius:18px}
  .hv-d-tab{font-size:10px;padding:11px 12px;flex:1 1 44%}
  .hv-d-tab small{display:none}
  .hv-d-h1{max-width:none}
}

@media (prefers-reduced-motion: reduce){
  .hv-d-card,.hv-d-plate,.hv-d-tab{transition:none}
  .hv-d-panel.on{animation:none}
  .hv-d-card.sheen::before{animation:none}
}
