/* ==========================================================================
   Fixed Swiss Editorial HUD Chrome, Vertical Rails & Kinetic Role Stage
   ========================================================================== */

/* Top & Bottom Fixed Corner Telemetry Frame (Echo Habitat layout) */
.hud-chrome {
  position: fixed;
  inset: 0;
  z-index: var(--z-hud);
  pointer-events: none;
  padding: var(--hud-pad-y) var(--hud-pad-x);
}

.hud-interactive {
  pointer-events: auto;
}

/* Top Bar — Editorial Corner Numerals + Center Identity */
.hud-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
}

.hud-corner-num {
  font-family: var(--font-sans);
  font-size: clamp(1.9rem, 2.8vw, 2.65rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
  transition: transform 0.45s var(--ease-mechanical), opacity 0.35s var(--ease-mechanical);
}

.hud-top-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.hud-coord-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--ink-primary);
}

.hud-coord-readout {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hud-coord-tick {
  width: 1px;
  height: 12px;
  background: var(--ink-primary);
  margin-left: 3px;
  opacity: 0.65;
}

.hud-plus {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--ink-primary);
  opacity: 0.72;
  user-select: none;
}

/* Top Center Identity + Micro Navigation */
.hud-top-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding-top: 3px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: clamp(0.88rem, 1.15vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-primary);
  text-decoration: none;
}

.brand-sub-dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.brand-sub-dots span {
  display: block;
  border-radius: 50%;
  background: var(--ink-primary);
}

.brand-sub-dots span:nth-child(1) { width: 4.5px; height: 4.5px; }
.brand-sub-dots span:nth-child(2) { width: 2.5px; height: 2.5px; opacity: 0.6; }
.brand-sub-dots span:nth-child(3) { width: 1.5px; height: 1.5px; opacity: 0.35; }

.hud-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 2px;
}

.hud-nav-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  padding: 3px 6px;
  border: 1px solid transparent;
  transition: color 0.25s var(--ease-mechanical), border-color 0.25s var(--ease-mechanical), background 0.25s var(--ease-mechanical);
}

.hud-nav-btn:hover {
  color: var(--ink-primary);
  border-color: var(--ink-hairline);
  background: rgba(245, 242, 236, 0.55);
}

/* Top Right Counter + Registration Crosses */
.hud-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.hud-counter-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.hud-counter-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-secondary);
  text-transform: uppercase;
}

.hud-reg-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-right: 4px;
}

.hud-dotted-v {
  width: 1px;
  height: 52px;
  background-image: linear-gradient(to bottom, var(--ink-primary) 1.5px, transparent 1.5px);
  background-size: 1px 7px;
  opacity: 0.45;
}

/* Vertical Side Rails (Exact Echo Habitat writing-mode: vertical-rl) */
.hud-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  z-index: var(--z-hud);
  pointer-events: none;
}

.hud-rail--left {
  left: var(--hud-pad-x);
}

.hud-rail--right {
  right: var(--hud-pad-x);
}

.rail-text {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-primary);
  opacity: 0.85;
  white-space: nowrap;
  transition: opacity 0.35s var(--ease-mechanical);
}

.hud-rail--left .rail-text {
  transform: rotate(180deg);
}

/* Micro 4x5 dot matrix from Echo Habitat left margin */
.hud-dot-matrix {
  display: grid;
  grid-template-columns: repeat(4, 3px);
  gap: 6px;
  opacity: 0.65;
}

.hud-dot-matrix span {
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: var(--ink-primary);
}

/* Bottom Left & Bottom Right Telemetry Corners */
.hud-bottom-left {
  position: fixed;
  left: var(--hud-pad-x);
  bottom: var(--hud-pad-y);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: var(--z-hud);
}

.hud-module-code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  color: var(--ink-primary);
  text-transform: uppercase;
}

.hud-module-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--ink-secondary);
  text-transform: uppercase;
}

.hud-progress-dots {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  pointer-events: auto;
}

.hud-pdot {
  width: 6px;
  height: 6px;
  padding: 0;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.24);
  transition: transform 0.3s var(--ease-mechanical), background 0.3s var(--ease-mechanical);
  position: relative;
}

.hud-pdot::after {
  content: '';
  position: absolute;
  inset: -6px;
}

.hud-pdot:hover {
  background: rgba(26, 26, 26, 0.65);
  transform: scale(1.25);
}

.hud-pdot.is-active {
  background: var(--ink-primary);
  transform: scale(1.45);
}

.hud-bottom-right {
  position: fixed;
  right: var(--hud-pad-x);
  bottom: var(--hud-pad-y);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: var(--z-hud);
}

.hud-vector-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.hud-calibration-bars {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4.5px;
  margin-top: 4px;
}

.hud-calibration-bars span {
  display: block;
  width: 24px;
  height: 1px;
  background: rgba(26, 26, 26, 0.38);
}

/* ==========================================================================
   Full-Viewport Infinite Asymmetric Swiss Editorial Stage
   ========================================================================== */

.scroll-experience {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.editorial-stage {
  position: relative;
  height: 100%;
  width: 100%;
  z-index: var(--z-stage);
  display: grid;
  grid-template-columns: minmax(320px, 44%) minmax(360px, 56%);
  align-items: center;
  padding:
    clamp(88px, 11vh, 126px)
    calc(var(--hud-pad-x) + var(--rail-width))
    clamp(76px, 9.5vh, 110px)
    calc(var(--hud-pad-x) + var(--rail-width));
  gap: clamp(20px, 3vw, 48px);
  overflow: visible;
}

/* ==========================================================================
   Left Column: Kinetic Vernier Role Headline Drum
   ========================================================================== */

.role-column {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 2.4vh, 28px);
  max-width: 520px;
  min-width: 0;
  z-index: 12;
  padding-right: 12px;
}

.role-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.role-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--prussian);
  box-shadow: 0 0 0 3px rgba(15, 56, 90, 0.14);
}

/* Vernier Role Drum — Smoothly rolling infinite changing headline */
.role-drum-viewport {
  position: relative;
  height: 224px;
  overflow: hidden;
  /* Soft vertical fade mask at top and bottom of the drum */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 18%,
    rgba(0, 0, 0, 1) 40%,
    rgba(0, 0, 0, 1) 60%,
    rgba(0, 0, 0, 0.35) 82%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 18%,
    rgba(0, 0, 0, 1) 40%,
    rgba(0, 0, 0, 1) 60%,
    rgba(0, 0, 0, 0.35) 82%,
    transparent 100%
  );
}

/* Hairline focal reticle framing the active headline slot */
.role-focal-bracket {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 76px;
  transform: translateY(-50%);
  border-top: 1px solid var(--ink-hairline);
  border-bottom: 1px solid var(--ink-hairline);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.28s var(--ease-mechanical);
}

.role-focal-bracket.is-snapped {
  border-top-color: rgba(15, 56, 90, 0.56);
  border-bottom-color: rgba(15, 56, 90, 0.56);
}

.role-focal-bracket::before,
.role-focal-bracket::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-primary);
  opacity: 0.55;
  position: absolute;
  top: -7px;
  transition: color 0.28s var(--ease-mechanical), opacity 0.28s var(--ease-mechanical);
}

.role-focal-bracket.is-snapped::before,
.role-focal-bracket.is-snapped::after {
  color: var(--prussian);
  opacity: 0.95;
}

.role-focal-bracket::before { left: -1px; }
.role-focal-bracket::after { right: 0; }

.role-drum-track {
  position: relative;
  height: 100%;
  width: 100%;
}

.role-drum-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  opacity: var(--drum-opacity, 0.24);
  transform-origin: left center;
  will-change: transform, opacity;
}

.role-drum-item:hover {
  opacity: max(var(--drum-opacity, 0.24), 0.72);
}

.role-drum-item.is-active {
  opacity: 1;
}

.role-drum-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-secondary);
  width: 26px;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-mechanical), color 0.3s var(--ease-mechanical);
}

.role-drum-item.is-active .role-drum-num {
  color: var(--prussian);
  transform: translateX(3px);
}

.role-drum-title {
  font-family: var(--font-sans);
  font-size: clamp(2.05rem, 3.8vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink-primary);
  white-space: nowrap;
}

/* Role Narrative Description */
.role-meta-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 76px;
}

.role-description {
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 1.62;
  color: var(--ink-secondary);
  max-width: 44ch;
  font-weight: 400;
  transition: opacity 0.32s var(--ease-mechanical), transform 0.45s var(--ease-mechanical);
}

.role-description.is-switching {
  opacity: 0;
  transform: translateY(6px);
}

/* Editorial mono link (used in About dossier) */
.colophon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-primary);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease-mechanical), transform 0.25s var(--ease-mechanical);
}

.colophon-link:hover {
  border-bottom-color: var(--ink-primary);
  transform: translateX(3px);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 1024px) {
  .editorial-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-content: start;
    padding:
      102px
      20px
      28px
      20px;
    gap: 12px;
  }

  .hud-rail,
  .hud-reg-stack,
  .hud-coord-block,
  .hud-bottom-left,
  .hud-bottom-right {
    display: none;
  }

  .role-column {
    max-width: 100%;
    width: 100%;
    gap: 8px;
    padding-right: 0;
  }

  .role-drum-viewport {
    height: 92px;
  }

  .role-focal-bracket {
    height: 50px;
  }

  .role-drum-item {
    height: 50px;
  }

  .role-drum-title {
    font-size: clamp(1.7rem, 7vw, 2.5rem);
  }

  .role-meta-panel {
    min-height: auto;
    gap: 8px;
  }

  .role-description {
    font-size: 0.86rem;
    line-height: 1.48;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .hud-chrome {
    padding: 14px 16px;
  }
  .hud-top-center .hud-nav-links {
    gap: 6px;
  }
}
