/* ============================================================
   Signal Atlas — Demo section · Option D (full-width stacked)
   Unified demo theater: dominant video and four synced cards in one frame.
   Premium light B2B SaaS, blue accents. Same video behavior.
   ============================================================ */
.dzd {
  --font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --font-text: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --bg: #FBFBF9;
  --surface: #FFFFFF;
  --fg: #16181C;
  --fg-dim: #4C5159;
  --fg-faint: #7A7F87;
  --bd: #E7E6E0;
  --bd-soft: #EEEDE7;
  --accent: oklch(0.55 0.15 252);
  --accent-ink: oklch(0.47 0.16 254);
  --accent-soft: oklch(0.55 0.15 252 / 0.09);
  --accent-line: oklch(0.55 0.15 252 / 0.22);
  --green: oklch(0.52 0.12 156);
  --muted: #9A9EA6;
  --muted-bg: #F2F1EC;
  --dzd-theater-pad: clamp(14px, 1.25vw, 20px);
  --dzd-theater-pad-block: clamp(28px, 2.5vw, 40px);
  --dzd-theater-gap: clamp(12px, 1.1vw, 16px);
  --dzd-video-chrome-h: 38px;
  --dzd-theater-viewport-offset: clamp(24px, 4svh, 56px);
  --dzd-theater-max-h: min(900px, calc(100svh - var(--dzd-theater-viewport-offset)));
  --dzd-card-area-h: clamp(160px, 17svh, 178px);
  --dzd-video-h: clamp(500px, calc(var(--dzd-theater-max-h) - var(--dzd-card-area-h) - var(--dzd-theater-gap) - var(--dzd-theater-pad-block) - var(--dzd-video-chrome-h)), 660px);
  position: relative; width: 100%;
  background:
    radial-gradient(1120px 540px at calc(50% + 440px) 35%, oklch(0.55 0.15 252 / .055), transparent 70%),
    radial-gradient(760px 420px at calc(50% - 520px) 82%, rgba(255,255,255,.72), transparent 72%),
    linear-gradient(180deg, #F8F9FB 0%, #F7F8FA 64%, #F7F8FA 100%);
  color: var(--fg);
  font-family: var(--font-text); box-sizing: border-box;
  padding: var(--sa-section-y) 0 clamp(72px, 6vw, 96px);
  overflow: hidden;
}
.dzd *, .dzd *::before, .dzd *::after { box-sizing: border-box; }
.dzd::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(46, 63, 92, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 63, 92, .032) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(88% 72% at 50% 34%, #000 8%, transparent 76%);
}

/* header left-aligned, shares the video container width so edges align */
.dzd-head { position: relative; z-index: 1; width: var(--sa-container-w); margin: 0 auto 24px; text-align: left; }
.dzd-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  font-family: var(--font-mono); font-size: var(--sa-eyebrow-size); font-weight: 500;
  letter-spacing: var(--sa-eyebrow-track); text-transform: uppercase; color: var(--accent-ink);
}
.dzd-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dzd-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 2.8vw, 42px); letter-spacing: -0.025em; line-height: 1.07; margin: 14px 0 0; text-wrap: balance; }
.dzd-sub { font-size: 16.5px; line-height: 1.55; color: var(--fg-dim); margin: 13px 0 0; max-width: 640px; text-wrap: pretty; }

/* ---- unified theater: height-aware so video + cards read as one module ---- */
.dzd-theater {
  position: relative; z-index: 1;
  width: var(--sa-container-w); margin: 0 auto;
  display: flex; flex-direction: column; gap: var(--dzd-theater-gap);
  padding: var(--dzd-theater-pad);
  border-radius: calc(var(--sa-card-radius-lg) + 8px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78)),
    radial-gradient(760px 320px at 80% 0%, oklch(0.55 0.15 252 / .12), transparent 72%);
  border: 1px solid rgba(205, 210, 220, .72);
  box-shadow: 0 34px 70px -50px rgba(20,30,55,.55), inset 0 1px 0 rgba(255,255,255,.9);
}
.dzd-theater::before {
  content: "";
  position: absolute; inset: var(--dzd-theater-pad);
  border-radius: var(--sa-card-radius-lg);
  border: 1px solid rgba(255,255,255,.58);
  pointer-events: none;
}
.dzd-stage { position: relative; z-index: 1; width: 100%; margin: 0; }
.dzd-frame {
  position: relative; width: 100%;
  border-radius: var(--sa-card-radius-lg); overflow: hidden;
  background: #0E1424; border: 1px solid rgba(12, 20, 36, .22);
  box-shadow: 0 22px 48px -34px rgba(10,16,28,.82);
}
/* app chrome bar */
.dzd-chrome {
  position: relative; z-index: 5; display: flex; align-items: center; gap: 14px;
  height: var(--dzd-video-chrome-h); padding: 0 14px;
  background: linear-gradient(180deg, #131C30, #0E1424);
  border-bottom: 1px solid rgba(150,180,230,.14);
}
.dzd-dots { display: flex; gap: 6px; }
.dzd-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(180,200,235,.22); }
.dzd-urlbar {
  flex: 1; max-width: 380px; margin: 0 auto; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: -0.01em; color: #9DB0CC;
  background: rgba(10,16,28,.65); border: 1px solid rgba(150,180,230,.14);
  border-radius: 7px; padding: 5px 12px;
}
.dzd-urlbar svg { width: 11px; height: 11px; color: oklch(0.74 0.16 236); }
.dzd-chrome-spacer { width: 44px; }

.dzd-screen { position: relative; width: 100%; height: var(--dzd-video-h); }
.dzd-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #0E1424; cursor: pointer; }

/* progress seam under chrome */
.dzd-seam { position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: rgba(255,255,255,.1); z-index: 4; }
.dzd-seam > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), oklch(0.8 0.13 228)); transition: width .25s linear; box-shadow: 0 0 10px oklch(0.7 0.14 235 / .7); }

/* bottom legibility gradient */
.dzd-screen::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 86px; z-index: 2;
  background: linear-gradient(0deg, rgba(8,12,22,.5), transparent); pointer-events: none;
}
/* caption pill */
.dzd-caption {
  position: absolute; left: 16px; bottom: 16px; z-index: 4;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-text); font-size: 13.5px; font-weight: 500; color: #fff;
  max-width: calc(100% - 150px); transition: opacity .35s ease;
}
.dzd-caption .cdot { width: 7px; height: 7px; border-radius: 50%; background: oklch(0.8 0.13 228); flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(120,180,255,.3), 0 0 10px oklch(0.7 0.14 235 / .8); }
.dzd-caption .ctxt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 8px rgba(0,0,0,.5); }

/* play affordance (integrated pill) */
.dzd-play {
  position: absolute; left: 16px; bottom: 16px; z-index: 6; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-text); font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: #0E1424;
  background: rgba(255,255,255,.95); border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px; padding: 9px 16px 9px 11px;
  box-shadow: 0 10px 28px -10px rgba(0,0,0,.5); transition: transform .15s ease, box-shadow .2s ease;
}
.dzd-play:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(0,0,0,.6); }
.dzd-play:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px oklch(0.8 0.13 228 / .38), 0 14px 32px -10px rgba(0,0,0,.6);
}
.dzd-play .pic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; flex: 0 0 auto; }
.dzd-play .pic svg { width: 11px; height: 11px; margin-left: 1px; }

/* mute */
.dzd-mute {
  position: absolute; right: 16px; bottom: 16px; z-index: 6;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  color: #fff; background: rgba(16,20,30,.5); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.18); box-shadow: 0 8px 20px -10px rgba(0,0,0,.6);
  transition: background .2s ease, transform .15s ease;
}
.dzd-mute:hover { background: rgba(16,20,30,.78); transform: translateY(-1px); }
.dzd-mute svg { width: 16px; height: 16px; }

/* end overlay */
.dzd-end {
  position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 40px;
  background: radial-gradient(85% 110% at 50% 16%, oklch(0.4 0.12 252 / .42), transparent 62%), linear-gradient(180deg, rgba(12,16,26,.78), rgba(10,14,24,.86));
  backdrop-filter: blur(7px); opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s ease;
}
.dzd-end.show { opacity: 1; visibility: visible; }
.dzd-end .ei { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 4px; background: oklch(0.55 0.15 252 / .18); border: 1px solid oklch(0.7 0.14 240 / .4); color: oklch(0.85 0.1 232); box-shadow: 0 0 0 5px rgba(80,140,240,.1); }
.dzd-end .ei svg { width: 23px; height: 23px; }
.dzd-end .es { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: oklch(0.82 0.08 230); }
.dzd-end .em { font-family: var(--font-display); font-weight: 600; font-size: 27px; letter-spacing: -0.02em; color: #fff; line-height: 1.22; max-width: 460px; text-wrap: balance; margin: 2px 0 16px; }
.dzd-end .ebtns { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; justify-content: center; }
.dzd-btn { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; white-space: nowrap; font-family: var(--font-text); font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; border-radius: 11px; padding: 12px 20px; border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.dzd-btn svg { width: 16px; height: 16px; }
.dzd-btn.primary { color: oklch(0.2 0.02 256); background: #fff; box-shadow: 0 14px 32px -12px rgba(0,0,0,.5); }
.dzd-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -12px rgba(0,0,0,.6); }
.dzd-btn.ghost { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); }
.dzd-btn.ghost:hover { transform: translateY(-2px); background: rgba(255,255,255,.16); }
.dzd-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px oklch(0.8 0.13 228 / .38), 0 20px 40px -12px rgba(0,0,0,.6);
}

/* ---- step cards row below the video ---- */
.dzd-rail {
  position: relative; z-index: 1;
  width: 100%; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--dzd-theater-gap);
}
.dzd-step {
  position: relative; display: flex; flex-direction: column;
  min-height: var(--dzd-card-area-h);
  border-radius: var(--sa-card-radius); padding: 15px 16px 14px;
  background: rgba(255,255,255,.9); border: 1px solid rgba(218, 221, 228, .9);
  box-shadow: 0 14px 30px -26px rgba(20,30,55,.4), inset 0 1px 0 rgba(255,255,255,.88);
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease, transform .3s ease;
}
.dzd-step .st-top { display: flex; align-items: center; gap: 9px; }
.dzd-step .marker {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; flex: 0 0 auto;
  background: var(--muted-bg); color: var(--muted); border: 1px solid var(--bd); transition: all .3s ease;
}
.dzd-step .marker svg { width: 14px; height: 14px; }
.dzd-step .marker .mdot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transition: all .3s ease; }
.dzd-step .st-label { font-family: var(--font-mono); font-size: var(--sa-label-size); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-faint); white-space: nowrap; }
.dzd-step .st-title { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; letter-spacing: -0.015em; color: var(--fg); margin: 10px 0 0; transition: color .3s ease; }
.dzd-step .st-body { font-size: 12.75px; line-height: 1.42; color: var(--fg-dim); margin: 5px 0 0; }
/* per-step progress (active only) */
.dzd-step .st-prog { height: 3px; border-radius: 3px; background: var(--bd); margin-top: auto; overflow: hidden; opacity: 0; transition: opacity .3s ease; }
.dzd-step .st-prog > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), oklch(0.7 0.14 240)); border-radius: 3px; transition: width .25s linear; }

.dzd-step[data-state="upcoming"] .st-title { color: var(--fg-dim); }
.dzd-step[data-state="done"] .marker { background: oklch(0.52 0.12 156 / .12); color: var(--green); border-color: oklch(0.52 0.12 156 / .3); }
.dzd-step[data-state="active"] {
  background: linear-gradient(180deg, var(--surface), var(--accent-soft));
  border-color: var(--accent-line);
  box-shadow: 0 20px 44px -28px oklch(0.55 0.15 252 / .58), inset 0 1px 0 #fff;
  transform: translateY(-3px);
}
.dzd-step[data-state="active"] .marker { background: #0E1424; color: oklch(0.82 0.11 234); border-color: transparent; box-shadow: 0 0 0 4px var(--accent-soft); }
.dzd-step[data-state="active"] .marker .mdot { background: oklch(0.82 0.11 234); box-shadow: 0 0 8px oklch(0.7 0.14 235 / .9); }
.dzd-step[data-state="active"] .st-label { color: var(--accent-ink); }
.dzd-step[data-state="active"] .st-prog { opacity: 1; }

/* tablet: 2x2 */
@media (max-width: 980px) {
  .dzd { padding: clamp(68px, 8vw, 82px) 0; }
  .dzd-h2 { font-size: 31px; }
  .dzd-theater {
    --dzd-theater-pad: clamp(12px, 2.8vw, 16px);
    --dzd-theater-pad-block: clamp(24px, 5.6vw, 32px);
    --dzd-theater-gap: 12px;
  }
  .dzd-screen { height: auto; aspect-ratio: 1926 / 1080; }
  .dzd-screen video { object-fit: cover; }
  .dzd-rail { grid-template-columns: repeat(2, 1fr); }
  .dzd-step { min-height: 0; }
}
@media (min-width: 1600px) {
  .dzd-head { margin-bottom: 28px; }
  .dzd-rail { gap: var(--dzd-theater-gap); }
}
@media (max-height: 700px) and (min-width: 981px) {
  .dzd {
    --dzd-theater-pad: 12px;
    --dzd-theater-pad-block: 24px;
    --dzd-theater-gap: 12px;
    --dzd-card-area-h: 150px;
    --dzd-video-h: clamp(440px, calc(var(--dzd-theater-max-h) - var(--dzd-card-area-h) - var(--dzd-theater-gap) - var(--dzd-theater-pad-block) - var(--dzd-video-chrome-h)), 560px);
  }
  .dzd-step { padding: 13px 14px 12px; }
  .dzd-step .st-title { font-size: 15px; margin-top: 8px; }
  .dzd-step .st-body { font-size: 12.25px; line-height: 1.36; }
}
/* mobile: stack */
@media (max-width: 560px) {
  .dzd-theater {
    --dzd-theater-pad: 8px;
    --dzd-theater-pad-block: 16px;
    width: calc(100% - 24px);
    border-radius: var(--sa-card-radius-lg);
  }
  .dzd-rail { grid-template-columns: 1fr; }
  .dzd-step { padding: 14px; }
  .dzd-urlbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dzd-step, .dzd-caption, .dzd-seam > i, .dzd-step .st-prog > i { transition: none !important; }
}
