/* Reusable Dvani step journey. All selectors are scoped to .dhi. */
.dhi {
  --dhi-bg: var(--bg, #020617);
  --dhi-surface: var(--surface, #0f172a);
  --dhi-surface-2: var(--surface-2, #16203a);
  --dhi-ink: var(--text-primary, #f1f5f9);
  --dhi-muted: var(--text-secondary, #94a3b8);
  --dhi-accent: var(--accent, #f97316);
  --dhi-line: var(--border, #1e293b);
  --dhi-heading: var(--font-heading, 'DM Sans', system-ui, sans-serif);
  --dhi-body: var(--font-body, 'Inter', system-ui, sans-serif);
  --dhi-mono: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  position: relative;
  isolation: isolate;
  color: var(--dhi-ink);
  background: radial-gradient(ellipse 50% 40% at 8% 38%, rgba(249,115,22,.09), transparent 75%),
    radial-gradient(ellipse 43% 45% at 93% 68%, rgba(96,165,250,.08), transparent 75%), var(--dhi-bg);
  font-family: var(--dhi-body);
  overflow: clip;
}
.dhi *, .dhi *::before, .dhi *::after { box-sizing: border-box; }
.dhi button { font: inherit; }
.dhi button:focus-visible { outline: 2px solid var(--dhi-accent); outline-offset: 4px; }
.dhi__stage {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(40px, 6vh, 76px) clamp(18px, 4vw, 48px);
}
.dhi__inner { width: min(100%, 1200px); margin-inline: auto; }
.dhi__top { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.dhi__eyebrow {
  display: block; margin-bottom: 9px;
  color: var(--dhi-accent); font: 600 12px/1.4 var(--dhi-mono);
  letter-spacing: .16em; text-transform: uppercase;
}
.dhi__heading { margin: 0; color: var(--dhi-ink); font: 700 clamp(30px, 3.6vw, 46px)/1.06 var(--dhi-heading); letter-spacing: -.035em; }
.dhi__lede { margin: 9px 0 0; color: var(--dhi-muted); font-size: clamp(14px, 1.2vw, 17px); line-height: 1.5; }
.dhi__arrows { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.dhi__arrow {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--dhi-surface); color: var(--dhi-ink);
  border: 1px solid #334155; border-radius: 999px; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.dhi__arrow:not(:disabled):hover { background: var(--dhi-surface-2); border-color: var(--dhi-accent); transform: translateY(-2px); }
.dhi__arrow:disabled { opacity: .35; cursor: not-allowed; }
.dhi__arrow svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.dhi__rail-wrap { position: relative; margin-bottom: 26px; }
.dhi__rail-line { position: absolute; height: 2px; top: 20px; left: 3%; right: 3%; background: #334155; }
.dhi__rail-fill { display: block; height: 100%; width: 0; background: var(--dhi-accent); transition: width .35s ease; }
.dhi__steps { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 10px; }
.dhi__step {
  min-width: 72px; flex: 0 1 160px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 0 4px; background: none; border: 0; color: var(--dhi-muted);
  cursor: pointer; text-align: center;
}
.dhi__step-dot {
  width: 42px; height: 42px; display: grid; place-items: center;
  color: var(--dhi-muted); background: var(--dhi-surface); border: 1px solid #475569;
  border-radius: 50%; font: 600 12px/1 var(--dhi-mono);
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s;
}
.dhi__step-label { font: 600 11px/1.35 var(--dhi-mono); letter-spacing: .09em; text-transform: uppercase; }
.dhi__step:hover .dhi__step-dot { border-color: var(--dhi-accent); }
.dhi__step[aria-current="step"] { color: var(--dhi-ink); }
.dhi__step[aria-current="step"] .dhi__step-dot {
  background: var(--dhi-accent); border-color: var(--dhi-accent); color: #1c0701;
  box-shadow: 0 0 0 5px rgba(249,115,22,.13), 0 0 28px rgba(249,115,22,.2);
  animation: dhi-dot-pop .55s cubic-bezier(.16,1,.3,1) both;
}
.dhi__panel, .dhi__mobile-card {
  min-height: 455px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.08fr);
  gap: clamp(24px, 4vw, 54px); align-items: stretch;
  background: linear-gradient(130deg, rgba(22,32,58,.96), rgba(15,23,42,.96));
  border: 1px solid #334155; border-radius: 22px; padding: clamp(16px, 2.2vw, 28px);
  box-shadow: 0 22px 80px rgba(0,0,0,.22);
}
.dhi__panel { position: relative; overflow: hidden; }
.dhi__mobile-list { display: none; }
.dhi__copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: clamp(8px, 2vw, 24px); }
.dhi__phase { color: var(--dhi-accent); font: 600 12px/1.4 var(--dhi-mono); letter-spacing: .12em; text-transform: uppercase; }
.dhi__title { margin: 18px 0 8px; color: var(--dhi-ink); font: 700 clamp(27px, 3vw, 40px)/1.12 var(--dhi-heading); letter-spacing: -.035em; text-wrap: balance; }
.dhi__summary { margin: 0 0 15px; color: #cbd5e1; font: 500 clamp(16px, 1.4vw, 19px)/1.42 var(--dhi-heading); }
.dhi__description { margin: 0; max-width: 52ch; color: var(--dhi-muted); font: 400 15px/1.65 var(--dhi-body); }
.dhi__bullets { margin: 23px 0 0; padding: 18px 0 0; border-top: 1px solid #334155; list-style: none; display: grid; gap: 8px; }
.dhi__bullets li { display: flex; align-items: start; gap: 10px; color: #cbd5e1; font-size: 14px; line-height: 1.45; }
.dhi__bullets li::before { content: '✓'; width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; border: 1px solid var(--dhi-accent); border-radius: 50%; color: var(--dhi-accent); font: 700 11px/1 var(--dhi-body); }
.dhi__counter { margin-top: 20px; color: var(--dhi-muted); font: 600 11px/1.4 var(--dhi-mono); letter-spacing: .08em; text-transform: uppercase; }
.dhi__counter strong { color: var(--dhi-accent); }
.dhi__media {
  position: relative; min-height: 395px; overflow: hidden; border-radius: 15px;
  background: radial-gradient(circle at 50% 30%, #1e293b, #020617 70%);
  border: 1px solid rgba(148,163,184,.16);
}
.dhi__media img, .dhi__media video, .dhi__media > picture { width: 100%; height: 100%; display: block; }
.dhi__media img, .dhi__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--dhi-image-position, center); }
.dhi__media::after { content: ''; position: absolute; inset: 40% 0 0; pointer-events: none; background: linear-gradient(transparent, rgba(2,6,23,.83)); }
.dhi__media-caption { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 23px; }
.dhi__media-kicker { color: #fed7aa; font: 600 11px/1.4 var(--dhi-mono); letter-spacing: .11em; text-transform: uppercase; }
.dhi__media-title { display: block; margin-top: 5px; color: white; font: 700 clamp(20px, 2vw, 28px)/1.1 var(--dhi-heading); }
.dhi__media-subtitle { display: block; margin-top: 4px; color: #cbd5e1; font-size: 13px; }
.dhi__footer { margin-top: 13px; display: flex; justify-content: space-between; gap: 20px; color: var(--dhi-muted); font: 500 11px/1.45 var(--dhi-mono); letter-spacing: .06em; text-transform: uppercase; }
.dhi__scroll-space { height: calc((var(--dhi-count) - 1) * 68svh); pointer-events: none; }
.dhi__panel.dhi--exit .dhi__copy { animation: dhi-exit .18s ease-in both; }
.dhi__panel.dhi--exit .dhi__media { animation: dhi-exit .18s ease-in both; animation-delay: .025s; }
.dhi__panel.dhi--enter .dhi__copy { animation: dhi-enter .55s cubic-bezier(.16,1,.3,1) both; }
.dhi__panel.dhi--enter .dhi__media { animation: dhi-enter-media .65s cubic-bezier(.16,1,.3,1) both; animation-delay: .055s; }
.dhi__panel.dhi--enter::after {
  content: ''; position: absolute; z-index: 3; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, rgba(249,115,22,.12) 49%, transparent 64%);
  animation: dhi-light-sweep .68s ease-out both;
}
.dhi__panel.dhi--enter .dhi__media img { animation: dhi-ken-burns 5s ease-out both; }
@keyframes dhi-exit { to { opacity: 0; transform: translateX(calc(var(--dhi-direction, 1) * -26px)) scale(.985); } }
@keyframes dhi-enter { from { opacity: 0; transform: translateX(calc(var(--dhi-direction, 1) * 38px)) translateY(8px); } to { opacity: 1; transform: translateX(0) translateY(0); } }
@keyframes dhi-enter-media { from { opacity: .08; transform: translateX(calc(var(--dhi-direction, 1) * 60px)) scale(1.045); filter: blur(7px); } to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); } }
@keyframes dhi-light-sweep { from { transform: translateX(-130%); opacity: 0; } 30% { opacity: 1; } to { transform: translateX(130%); opacity: 0; } }
@keyframes dhi-ken-burns { from { transform: scale(1.055); } to { transform: scale(1); } }
@keyframes dhi-dot-pop { from { transform: scale(.74); } 68% { transform: scale(1.1); } to { transform: scale(1); } }
@keyframes dhi-mobile-copy { from { opacity: .52; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dhi-mobile-media { from { opacity: .58; transform: translateY(35px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes dhi-mobile-slide { from { opacity: .35; transform: translateY(calc(var(--dhi-mobile-direction, 1) * 38px)); } to { opacity: 1; transform: translateY(0); } }
/* Mobile keeps the SAME pinned scroll-through-steps experience — the stage
   stays sticky (inherited) and the panel stacks: visual on top, copy below,
   sized to one phone screen. The old card-list path is left hidden. */
/* Mobile: the pinned stepper fills the WHOLE viewport, each step a full screen.
   The inner is a flex column; the panel grows to fill the height with the
   visual as a big hero (1fr) and the copy pinned below it. */
@media (max-width: 899px) {
  /* Pin below the site nav and fill the rest of the viewport, so the whole
     stepper (heading + steps + visual) sits in view without hiding under the nav. */
  .dhi__stage { place-items: stretch; top: var(--nav-h, 72px); min-height: calc(100svh - var(--nav-h, 72px)); padding: clamp(10px,2vh,18px) clamp(14px,4vw,22px) clamp(12px,2vh,20px); }
  .dhi__inner { display: flex; flex-direction: column; min-height: 0; }
  .dhi__top { flex: 0 0 auto; flex-direction: column; align-items: start; gap: 6px; margin-bottom: 10px; }
  .dhi__arrows { display: none; }                 /* scroll + numbered steps navigate; no overlap */
  .dhi__lede { display: none; }
  .dhi__rail-wrap { flex: 0 0 auto; }
  .dhi__mobile-list { display: none; }
  .dhi__panel { flex: 1 1 auto; grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) auto; grid-template-areas: 'media' 'copy'; min-height: 0; gap: 12px; }
  .dhi__media { grid-area: media; aspect-ratio: auto; height: auto; min-height: 0; max-height: none; }
  .dhi__copy { grid-area: copy; justify-content: flex-start; padding: 2px 6px 4px; }
  .dhi__description, .dhi__counter { display: none; }
  .dhi__footer { flex: 0 0 auto; margin-top: 10px; }
  .dhi__footer span:first-child { display: none; }
}
@media (max-width: 600px) {
  .dhi__heading { font-size: 27px; }
  .dhi__rail-wrap { margin-bottom: 14px; overflow-x: auto; padding-bottom: 8px; }
  .dhi__steps { min-width: max-content; justify-content: flex-start; gap: 7px; }
  .dhi__step { width: 70px; min-width: 70px; flex: none; }
  .dhi__step-dot { width: 34px; height: 34px; }
  .dhi__rail-line { display: none; }
  .dhi__step-label { font-size: 9px; }
  .dhi__media-caption { left: 16px; bottom: 14px; right: 16px; }
  .dhi__media-title { font-size: 20px; }
  .dhi__media-subtitle { font-size: 11px; }
  .dhi__title { font-size: 24px; margin-top: 9px; }
  .dhi__summary { font-size: 15px; margin-bottom: 0; }
  .dhi__bullets { display: none; }
  .dhi__footer { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .dhi *, .dhi *::before, .dhi *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
