/* ═══ How Domotz works — scroll-driven explainer (how-it-works.php) ═══
   Motion is driven from assets/js/how-it-works.js: every animated
   element gets --k (0 to 1) on each frame. Colours come from the 2026
   tokens (domotz-tokens.css), so light and dark themes follow the site.
   The brand orange (#FE5F41) is used only for "blocked" and "alert". */

/* ── Hero ─────────────────────────────────────────────────────────── */
.hdw-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  margin: 0 0 1rem;
}

/* Same offset under the fixed header as the other 2026 pages (what-is-rmm, contact-us). */
#main-content { padding-top: 4rem; }

/* The 2026 layout does not load Bootstrap, so the page sets its own gutters (no .container).
   Width and gutters match .dz-container, the header's container, so the page
   content lines up under the logo: 1280px, sides 1rem / 1.5rem / 2rem. */
.hdw-container,
.hdw-journey__inner {
  box-sizing: border-box;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .hdw-container,
  .hdw-journey__inner { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .hdw-container,
  .hdw-journey__inner { padding: 0 2rem; }
}

/* Hero: faded grid like the other 2026 heroes, but no band colour or bottom
   border, so it flows straight into the journey without a visible step. */
.hdw-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 3rem;
}

@media (min-width: 768px) {
  .hdw-hero { padding: 5rem 0 4rem; }
}

.hdw-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(hsl(var(--border) / 0.5) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--border) / 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
  pointer-events: none;
}

.hdw-hero .hdw-container { position: relative; }

.hdw-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18ch;
  color: hsl(var(--foreground));
  margin: 0 0 1.25rem;
}

.hdw-hero__accent {
  background-image: var(--gradient-accent);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.hdw-hero__lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  max-width: 40rem;
  color: hsl(var(--muted-foreground));
  margin: 0 0 2rem;
}

.hdw-hero__cue {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.hdw-hero__cue-arrow {
  display: inline-block;
  width: 1px;
  height: 36px;
  background: linear-gradient(hsl(var(--accent)), transparent);
  animation: hdw-cue 2.2s ease-in-out infinite;
}

@keyframes hdw-cue {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Journey layout: pinned stage on the left, chapters on the right ── */
.hdw-journey {
  position: relative;
  padding-bottom: 2rem;
  /* Tags and cards anchored to devices can sit past the screen edge while the
     camera is zoomed in. Clip them here so the page never scrolls sideways.
     (clip, not hidden: hidden would make this a scroll container and break
     the pinned stage.) */
  overflow-x: clip;
}

.hdw-journey__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  column-gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

/* The stage stays hidden without JavaScript; the steps still read in full. */
.hdw-stage {
  display: none;
}

/* The fixed site header (announcement bar + nav) sits over the top ~9.5rem. */
.hdw-journey.is-live .hdw-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
  padding: 9.5rem 0 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hdw-journey.is-static .hdw-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

/* Fit the scene in both directions: full width up to 680px, and never taller than the space under the header. */
.hdw-stage__frame {
  position: relative;
  width: min(100%, 680px, calc((100vh - 14rem) * 1.15));
  aspect-ratio: 3 / 2;
  container-type: inline-size;
}

.hdw-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ── Chapter steps ─────────────────────────────────────────────────── */
.hdw-steps {
  padding-bottom: 4rem;
}

.hdw-step {
  opacity: 1;
  padding: 3rem 0;
}

/* Live: each chapter is a tall article. Its text is pinned at the stickline
   (50% of the viewport height; 78% on mobile, see the media query) for the
   whole time its part of the scene plays. The script uses the same line. */
.hdw-journey.is-live .hdw-step {
  min-height: 120vh;
  padding: 0;
}

/* The pinned text is centred on the stickline (translateY(-50%)), so the
   first chapter needs room above it, or it rides up into the hero. */
.hdw-journey.is-live .hdw-steps {
  padding-top: 18rem;
}

.hdw-journey.is-live .hdw-step__body {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.25;
  transition: opacity 0.5s ease;
}

.hdw-journey.is-live .hdw-step.is-active .hdw-step__body {
  opacity: 1;
}

.hdw-step__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  margin: 0 0 0.75rem;
}

.hdw-step__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  color: hsl(var(--foreground));
  margin: 0 0 1rem;
}

.hdw-step__text {
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 46ch;
  color: hsl(var(--muted-foreground));
  margin: 0 0 1.25rem;
}

.hdw-step__points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  max-width: 46ch;
}

.hdw-step__points li {
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.55;
  color: hsl(var(--foreground));
}

.hdw-step__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.6rem;
  height: 2px;
  background: hsl(var(--accent));
}

/* ── Stage HUD: chapter progress under the scene ───────────────────── */
.hdw-hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.5rem;
}

.hdw-hud__item {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  border-top: 2px solid hsl(var(--border));
  padding-top: 0.5rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.hdw-hud__item span {
  opacity: 0.7;
  margin-right: 0.4em;
}

.hdw-hud__item.is-active {
  color: hsl(var(--foreground));
  border-top-color: hsl(var(--accent));
}

/* ── Scene: floor, zone, links and flows ───────────────────────────── */
.hdw-floor {
  opacity: var(--k, 0);
}

.hdw-grid {
  fill: none;
  stroke: hsl(var(--border));
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
  opacity: 0.55;
}

/* Draw-in paths: pathLength="1" plus a dash whose offset is set by --k. */
.hdw-draw {
  fill: none;
  stroke: hsl(var(--muted-foreground));
  stroke-width: 1.2;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--k, 0));
}

.hdw-zone {
  stroke: hsl(var(--border));
  stroke-width: 1.4;
}

.hdw-draw--alert {
  stroke: #FE5F41;
  stroke-width: 1.6;
}

.hdw-draw--uplink {
  stroke: hsl(var(--accent));
  stroke-width: 1.8;
}

.hdw-link {
  fill: none;
  stroke: hsl(var(--border));
  stroke-width: 1.8;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--k, 0));
}

/* Light travelling along a link. --flow is the scroll position; no scroll, no motion. */
.hdw-flow {
  fill: none;
  stroke: hsl(var(--accent));
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 0.05 0.95;
  stroke-dashoffset: calc(var(--flow, 0) * -1);
  opacity: var(--k, 0);
}

/* ── Scene: devices ────────────────────────────────────────────────── */
.hdw-node {
  opacity: var(--k, 0);
  transform: translateY(calc((1 - var(--k, 0)) * 10px));
}

.hdw-face {
  stroke: hsl(var(--border));
  stroke-width: 0.9;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.hdw-top {
  fill: hsl(var(--muted));
}

.hdw-left {
  fill: hsl(var(--card));
}

.hdw-right {
  fill: hsl(var(--secondary));
}

.hdw-glow {
  fill: hsl(var(--accent));
  stroke: none;
  opacity: calc(var(--k, 0) * 0.28);
}

.hdw-glow--alert {
  fill: #FE5F41;
  opacity: calc(var(--k, 0) * 0.4);
}

.hdw-node--collector .hdw-top {
  fill: hsl(var(--primary));
}

.hdw-node--collector .hdw-left {
  fill: hsl(var(--primary) / 0.55);
}

.hdw-node--collector .hdw-right {
  fill: hsl(var(--primary) / 0.8);
}

.hdw-led {
  fill: #40F29A;
  animation: hdw-blink 2.4s ease-in-out infinite;
}

@keyframes hdw-blink {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.hdw-ring {
  fill: none;
  stroke: hsl(var(--accent));
  stroke-width: 1.2;
  opacity: calc(4 * var(--k, 0) * (1 - var(--k, 0)));
  transform: scale(calc(0.25 + var(--k, 0) * 1.2));
  transform-box: fill-box;
  transform-origin: center;
}

.hdw-label {
  font-family: var(--font-mono);
  font-size: var(--lbl, 9.5px);
  letter-spacing: 0.04em;
  fill: hsl(var(--muted-foreground));
  opacity: var(--k, 0);
}

.hdw-label--alert {
  fill: #FE5F41;
}

/* ── Scene: internet, blocked inbound path, cloud slab, uplink ─────── */
.hdw-internet {
  opacity: var(--k, 0);
}

.hdw-globe {
  fill: none;
  stroke: hsl(var(--muted-foreground));
  stroke-width: 1.2;
}

.hdw-x {
  fill: none;
  stroke: #FE5F41;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: var(--k, 0);
}

.hdw-cloud {
  opacity: var(--k, 0);
  transform: translateY(calc((1 - var(--k, 0)) * 26px));
}

.hdw-cloud .hdw-top {
  fill: hsl(var(--primary) / 0.18);
  stroke: hsl(var(--primary) / 0.7);
  stroke-width: 1;
}

.hdw-cloud .hdw-left {
  fill: hsl(var(--primary) / 0.08);
  stroke: hsl(var(--primary) / 0.45);
}

.hdw-cloud .hdw-right {
  fill: hsl(var(--primary) / 0.12);
  stroke: hsl(var(--primary) / 0.45);
}

/* ── Overlay cards and tags (HTML, anchored by the script) ─────────── */
.hdw-tag {
  position: absolute;
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.9cqi, 12px);
  white-space: nowrap;
  color: hsl(var(--foreground));
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 4px;
  padding: 0.15em 0.45em;
  opacity: var(--k, 0);
  transform: translate(-50%, calc(-150% - (1 - var(--k, 0)) * 6px));
  pointer-events: none;
}

.hdw-card {
  position: absolute;
  width: max-content;
  min-width: 12em;
  max-width: 18em;
  padding: 0.75em 0.9em;
  font-size: clamp(9px, 1.9cqi, 13px);
  color: hsl(var(--foreground));
  background: hsl(var(--card) / 0.94);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 12px 40px -12px hsl(var(--primary) / 0.35);
  opacity: var(--k, 0);
  transform: translate(-50%, -50%) scale(calc(0.96 + var(--k, 0) * 0.04));
  pointer-events: none;
}

.hdw-card__title {
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 600;
  color: hsl(var(--accent));
  margin: 0 0 0.5em;
}

.hdw-card__rows {
  display: grid;
  gap: 0.35em;
  margin: 0;
}

.hdw-card__rows > div {
  display: flex;
  justify-content: space-between;
  gap: 1em;
}

.hdw-card__rows dt {
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.hdw-card__rows dd {
  margin: 0;
  text-align: right;
  font-family: var(--font-mono);
  color: hsl(var(--foreground));
}

/* The camera's IP swaps in place: both values share one grid cell. */
.hdw-ip {
  display: inline-grid;
  justify-items: end;
}

.hdw-ip-old,
.hdw-ip-new {
  grid-area: 1 / 1;
}

.hdw-card__badge {
  display: inline-block;
  margin: 0.6em 0 0;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  font-size: 0.9em;
  color: hsl(var(--accent));
  background: hsl(var(--accent) / 0.14);
  opacity: var(--k, 0);
}

.hdw-spark {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.6em;
  overflow: visible;
}

.hdw-spark__threshold {
  stroke: #FE5F41;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.7;
}

.hdw-spark__line {
  fill: none;
  stroke: hsl(var(--accent));
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--k, 0));
}

.hdw-loss {
  font-variant-numeric: tabular-nums;
}

.hdw-card__alert {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: 0.6em 0 0;
  font-weight: 600;
  color: #FE5F41;
  opacity: var(--k, 0);
  transform: translateY(calc((1 - var(--k, 0)) * 6px));
}

.hdw-card__alert-dot {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: #FE5F41;
  animation: hdw-ping 1.8s ease-out infinite;
}

@keyframes hdw-ping {
  0% { box-shadow: 0 0 0 0 rgba(254, 95, 65, 0.6); }
  100% { box-shadow: 0 0 0 0.9em rgba(254, 95, 65, 0); }
}

.hdw-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.hdw-chip {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.25em 0.6em;
  border-radius: 4px;
  color: hsl(var(--foreground));
  background: hsl(var(--accent) / 0.08);
  border: 1px solid hsl(var(--accent) / 0.45);
  opacity: var(--k, 0);
  transform: translateY(calc((1 - var(--k, 0)) * 6px));
}

.hdw-chip--no {
  color: #FE5F41;
  background: transparent;
  border-color: #FE5F41;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

/* ── Closing section ───────────────────────────────────────────────── */
.hdw-close {
  padding: 4rem 0 5rem;
  background: var(--gradient-subtle);
  border-top: 1px solid hsl(var(--border));
  text-align: center;
}

.hdw-close__title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: hsl(var(--foreground));
  margin: 0 0 1rem;
}

.hdw-close__lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 46rem;
  color: hsl(var(--muted-foreground));
  margin: 0 auto 2.5rem;
}

.hdw-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 0;
  text-align: left;
}

.hdw-shot {
  margin: 0;
  background: var(--gradient-card);
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  overflow: hidden;
}

.hdw-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.hdw-shot figcaption {
  padding: 0.9rem 1rem;
  font-size: 0.9375rem;
  color: hsl(var(--foreground));
  border-top: 1px solid hsl(var(--border));
}

/* ── Responsive: stage pinned at the top, chapters flow below ──────── */
@media (max-width: 991.98px) {
  .hdw-journey__inner {
    display: block;
  }

  /* Stage pinned across the top, below the header. It stays compact (about
     half the screen on a phone) so the chapter text has room to be read. */
  .hdw-journey.is-live .hdw-stage {
    height: auto;
    top: 0;
    padding: 5.75rem 0 3.25rem;           /* bottom: room for the chapter bar (.hdw-hud) */
    background: hsl(var(--background));
    box-shadow: 0 1px 0 hsl(var(--border));
    z-index: 2;
  }

  .hdw-stage__frame {
    max-width: none;
    width: min(100%, 340px, 45vh);
    width: min(100%, 340px, 45svh);
  }

  /* The chapter text is not pinned on mobile: it scrolls under the stage like
     a normal page, and the scene follows its progress (see stickLine in the script). */
  .hdw-journey.is-live .hdw-step {
    min-height: 0;
    padding: 2rem 0 30vh;
  }

  .hdw-journey.is-live .hdw-step__body {
    position: relative;
    top: auto;
    transform: none;
  }

  .hdw-journey.is-live .hdw-steps {
    padding-top: 0;
  }

  .hdw-hud {
    margin-top: 1rem;
  }

  .hdw-hud__item {
    font-size: 0.6rem;
  }
}

/* ── Reduced motion: no pinning (set by the script), no looping motion ── */
@media (prefers-reduced-motion: reduce) {
  .hdw-hero__cue-arrow,
  .hdw-led,
  .hdw-card__alert-dot {
    animation: none;
  }

  .hdw-journey.is-live .hdw-step {
    transition: none;
  }
}

/* Static mode shows the finished scene: skip the hidden-before-you-get-there states. */
.hdw-journey.is-static .hdw-ip-old {
  display: none;
}

/* Reduced motion ("is-static"): the scene is shown finished and still. The
   per-chapter overlays (tags, cards, chapter bar) belong to moments of the
   animation, so together they would pile up; hide them and keep the network. */
.hdw-journey.is-static .hdw-tag,
.hdw-journey.is-static .hdw-card,
.hdw-journey.is-static .hdw-hud {
  display: none;
}

@media (min-width: 992px) {
  .hdw-journey.is-static .hdw-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    box-sizing: border-box;
    padding: 9.5rem 0 4rem;
  }
}

/* ── Zoom notes: the chapter text cross-fades into a note as the camera zooms in ── */
/* Chapters with a note are taller, so the note has room to be read while the camera holds. */
.hdw-journey.is-live .hdw-step--zoom {
  min-height: 200vh;
}

/* Main and note share one grid cell, so the body is as tall as the taller of the two. */
.hdw-journey.is-live .hdw-step__body {
  display: grid;
}

.hdw-journey.is-live .hdw-step__main,
.hdw-journey.is-live .hdw-step__note {
  grid-area: 1 / 1;
}

.hdw-journey.is-live .hdw-step__main {
  opacity: calc(1 - var(--z, 0));
}

.hdw-journey.is-live .hdw-step__note {
  opacity: var(--z, 0);
}

/* Without the live layout, the note follows the main text. */
.hdw-journey:not(.is-live) .hdw-step__note {
  margin-top: 1.75rem;
}

.hdw-step__note {
  max-width: 46ch;
  padding-left: 1.1rem;
  border-left: 2px solid hsl(var(--accent));
}

.hdw-note__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  margin: 0 0 0.6rem;
}

.hdw-note__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
  color: hsl(var(--foreground));
  margin: 0 0 0.75rem;
}

.hdw-note__text {
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  margin: 0 0 0.75rem;
}

/* Mobile: the zoom note follows the chapter text instead of cross-fading over it. */
@media (max-width: 991.98px) {
  .hdw-journey.is-live .hdw-step--zoom {
    min-height: 0;
  }

  .hdw-journey.is-live .hdw-step__body {
    display: block;
  }

  .hdw-journey.is-live .hdw-step__main,
  .hdw-journey.is-live .hdw-step__note {
    opacity: 1;
  }

  .hdw-journey.is-live .hdw-step__note {
    margin-top: 1.75rem;
  }
}

/* ── Sessions: the collector reaches a device over SNMP or SSH, and the answer comes back ── */
.hdw-flow--session {
  stroke: hsl(var(--accent));
}

.hdw-flow--reply {
  stroke: #40F29A;
}

.hdw-card--session {
  min-width: 14em;
  border-color: hsl(var(--accent) / 0.45);
}

.hdw-session__line {
  margin: 0.35em 0 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  color: hsl(var(--muted-foreground));
  opacity: var(--k, 0);
  transform: translateX(calc((1 - var(--k, 0)) * -8px));
}

.hdw-session__line--out {
  color: #40F29A;
}

/* ── Performance ───────────────────────────────────────────────────── */
/* Looping accents pause while the journey is off screen (class set by the script). */
.hdw-journey.is-offscreen .hdw-led,
.hdw-journey.is-offscreen .hdw-card__alert-dot {
  animation-play-state: paused;
}

/* ── Screenshot zoom (lightbox) ────────────────────────────────────── */
.hdw-shot__zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.hdw-shot__zoom img {
  transition: transform 0.3s ease;
}

.hdw-shot__zoom:hover img,
.hdw-shot__zoom:focus-visible img {
  transform: scale(1.02);
}

.hdw-shot__zoom:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: -2px;
}

.hdw-shot { position: relative; }
.hdw-shot__zoom { overflow: hidden; }

.hdw-shot__hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(10, 12, 16, 0.65);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hdw-shot__zoom:hover .hdw-shot__hint,
.hdw-shot__zoom:focus-visible .hdw-shot__hint {
  opacity: 1;
}

/* Touch screens have no hover: keep the hint visible so the zoom is discoverable. */
@media (hover: none) {
  .hdw-shot__hint { opacity: 1; }
}

.hdw-lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 3.5rem 4.5rem;
  border: 0;
  background: transparent;
  color: #fff;
  box-sizing: border-box;
}

.hdw-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hdw-lightbox::backdrop {
  background: rgba(5, 7, 10, 0.88);
}

.hdw-lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hdw-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  max-height: calc(100dvh - 9rem);
  width: auto;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  background: #fff;
}

.hdw-lightbox__caption {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.hdw-lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s ease;
}

.hdw-lightbox__btn:hover,
.hdw-lightbox__btn:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.hdw-lightbox__btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

.hdw-lightbox__close { top: 1rem; right: 1rem; }
.hdw-lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.hdw-lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* Phones: the image uses the full width; arrows move under it. */
@media (max-width: 767.98px) {
  .hdw-lightbox { padding: 4rem 0.75rem 5.5rem; }
  .hdw-lightbox__img { max-height: calc(100dvh - 11rem); }
  .hdw-lightbox__prev,
  .hdw-lightbox__next { top: auto; bottom: 1.25rem; transform: none; }
  .hdw-lightbox__prev { left: calc(50% - 3.5rem); }
  .hdw-lightbox__next { right: calc(50% - 3.5rem); }
}
