/* =============================================================================
   BLACK FORGE // COMPONENTS & LAYOUTS STYLESHEET
   Hero stage, home split exhibition index, unified 16:9 / vertical media frames,
   hairline grids, spec tables, CTA bands, and technical manual styling.
   ============================================================================= */

/* =============================================================================
   HERO GALLERY STAGE
   ============================================================================= */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 0;
}

.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 52% 40%, rgba(10, 11, 14, 0.04) 0%, rgba(10, 11, 14, 0.56) 72%, rgba(10, 11, 14, 0.88) 100%);
  pointer-events: none;
  z-index: 1;
}

@keyframes opticalRackFocus {
  0% {
    opacity: 0.16;
    filter: blur(16px);
    transform: translate3d(0, 14px, 0) scale(1.045, 1.03);
  }
  45% {
    opacity: 0.86;
    filter: blur(3.5px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes heroSoftFocus {
  0% {
    opacity: 0.22;
    filter: blur(6px);
    transform: translate3d(0, 10px, 0);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
  }
}

.line-mask {
  display: block;
  overflow: visible;
}

.line-mask > span {
  display: inline-block;
  transform-origin: left center;
  will-change: transform, opacity, filter;
  animation: opticalRackFocus 1.45s cubic-bezier(0.16, 1, 0.3, 1) 0s both;
}

.line-mask:nth-child(2) > span {
  animation-delay: 0.24s;
}

.line-mask:nth-child(3) > span {
  animation-delay: 0.46s;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-bottom: clamp(3rem, 6vw, 5.25rem);
}

.hero-inner--tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
}

.hero-crest-box {
  width: 112px;
  height: 112px;
  border: 1px solid var(--hairline-strong);
  background-color: var(--bg-plinth);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}

.hero-crest-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.25));
}

.hero-title {
  font-size: clamp(3rem, 7.6vw, 6.35rem);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.044em;
  max-width: 15ch;
  margin: 1.25rem 0 1.4rem;
  color: var(--ink-primary);
}

.hero-title--wide {
  max-width: 18ch;
}

.hero-title .text-muted {
  color: var(--ink-secondary);
  font-size: 0.8em;
  line-height: 1.08;
}

.hero-lead {
  font-size: clamp(1.06rem, 1.75vw, 1.26rem);
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 48ch;
  margin-bottom: 2.15rem;
  animation: heroSoftFocus 1.15s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: heroSoftFocus 1.05s cubic-bezier(0.16, 1, 0.3, 1) 0.44s both;
}

/* Bottom Architectural Spec Rail in Hero */
.spec-rail {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--hairline);
  background-color: rgba(6, 7, 9, 0.58);
  backdrop-filter: blur(8px);
}

.spec-rail__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.spec-rail__inner strong {
  color: var(--ink-primary);
  font-weight: 500;
}

/* =============================================================================
   HOME SPLIT EXHIBITION INDEX (1-B GALLERY)
   ============================================================================= */

.exhibit-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background-color: var(--bg-gallery);
}

.exhibit-index {
  display: flex;
  flex-direction: column;
}

.exhibit-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1.75rem, 3.2vw, 2.6rem) clamp(1.25rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  transition: background-color 0.28s ease, opacity 0.28s ease;
  text-align: left;
  background-color: transparent;
}

.exhibit-row:last-child {
  border-bottom: none;
}

.exhibit-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--accent);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.35s var(--ease-museum);
}

.exhibit-row.is-active {
  background-color: var(--bg-plinth);
}

.exhibit-row.is-active::before {
  transform: scaleY(1);
}

.exhibit-row:not(.is-active) {
  opacity: 0.46;
}

.exhibit-row:not(.is-active):hover {
  opacity: 0.88;
  background-color: rgba(16, 18, 23, 0.45);
}

.exhibit-row__main {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.exhibit-row__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.exhibit-row__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.3vw, 2.85rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink-primary);
}

.exhibit-row__line {
  font-size: 0.96rem;
  color: var(--ink-secondary);
  max-width: 38ch;
  margin-top: 0.2rem;
}

.exhibit-row__go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hairline);
  color: var(--ink-primary);
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s var(--ease-museum);
}

.exhibit-row.is-active .exhibit-row__go {
  border-color: rgba(var(--accent-rgb), 0.65);
  background-color: rgba(var(--accent-rgb), 0.12);
}

.exhibit-row__go:hover {
  transform: translateX(3px);
  background-color: var(--ink-primary);
  color: var(--bg-void);
}

/* Right Exhibition Stage */
.exhibit-stage {
  position: relative;
  border-left: 1px solid var(--hairline);
  background-color: var(--bg-void);
  display: grid;
  min-height: 520px;
}

.exhibit-canvas {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.42s var(--ease-museum), clip-path 0.52s var(--ease-museum);
}

.exhibit-canvas.is-active {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
  z-index: 2;
}

.exhibit-stage__viewport {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 3.5vw, 3rem);
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(var(--accent-rgb), 0.08) 0%, transparent 65%);
}

/* Cohesive 16:9 Archival Exhibit Frame on Home Stage */
.exhibit-plinth-16x9 {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hairline-strong);
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.12), transparent 62%),
    var(--bg-plinth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.1rem, 2.2vw, 1.65rem);
  overflow: hidden;
  transition: transform 0.55s var(--ease-museum), border-color 0.3s ease;
}

.exhibit-canvas:not(.is-active) .exhibit-plinth-16x9 {
  transform: scale(1.03);
}

.exhibit-canvas.is-active .exhibit-plinth-16x9 {
  transform: scale(1);
}

.exhibit-plinth-16x9__watermark {
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 210px;
  height: auto;
  opacity: 0.08;
  pointer-events: none;
}

.exhibit-plinth-16x9__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.exhibit-plinth-16x9__center {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.exhibit-plinth-16x9__crest {
  width: 56px;
  height: 56px;
  border: 1px solid var(--hairline-strong);
  background-color: var(--bg-void);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exhibit-plinth-16x9__crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.exhibit-plinth-16x9__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 800;
  line-height: 1.05;
}

.exhibit-plinth-16x9__sub {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-top: 0.25rem;
}

.exhibit-plinth-16x9__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  padding-top: 0.85rem;
  border-top: 1px solid var(--hairline);
}

.placard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid var(--hairline);
  background-color: var(--bg-plinth);
}

.placard__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.placard__code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.placard__text {
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

/* =============================================================================
   UNIFIED ARCHITECTURAL MEDIA GALLERY (16:9 + VERTICAL PLACEHOLDERS)
   ============================================================================= */

.media-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.media-grid--secondary {
  display: grid;
  grid-template-columns: minmax(0, 1.46fr) minmax(0, 0.54fr);
  gap: 1.5rem;
  align-items: stretch;
}

.media-frame {
  position: relative;
  width: 100%;
  background:
    radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.11), transparent 62%),
    var(--bg-void);
  border: 1px solid var(--hairline-strong);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.media-frame:hover {
  border-color: rgba(var(--accent-rgb), 0.6);
}

.media-frame--16x9 {
  aspect-ratio: 16 / 9;
}

.media-frame--vertical {
  aspect-ratio: 2 / 3;
}

/* Subtle diagonal optical glass sheen sweep on hover */
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(var(--accent-rgb), 0.07) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform 0.85s var(--ease-museum);
  pointer-events: none;
  z-index: 2;
}

.media-frame:hover::after {
  transform: translateX(110%);
}

/* Subtle centered museum reticle cross inside empty frame */
.media-frame__cross {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.16;
  z-index: 1;
}

.media-frame__cross::before,
.media-frame__cross::after {
  content: "";
  position: absolute;
  background-color: var(--ink-primary);
}

.media-frame__cross::before {
  top: 11px;
  left: 0;
  width: 24px;
  height: 1px;
}

.media-frame__cross::after {
  top: 0;
  left: 11px;
  width: 1px;
  height: 24px;
}

.media-frame__watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(170px, 34%);
  height: auto;
  opacity: 0.055;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.55s var(--ease-museum);
  z-index: 1;
}

.media-frame:hover .media-frame__watermark {
  opacity: 0.11;
  transform: translate(-50%, -50%) scale(1.04);
}

.media-frame__top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.media-frame__ratio {
  padding: 0.16rem 0.45rem;
  border: 1px solid var(--hairline);
  color: var(--accent-soft);
}

.media-frame__bottom {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.media-frame__caption {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.media-frame__sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* Future-ready slot for dropping real <img> or <video> edge-to-edge */
.media-frame__slot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* =============================================================================
   BEFORE / AFTER OPTICAL COMPARE OVERLAY FRAME (FIG. 01)
   ============================================================================= */

.media-frame--compare {
  cursor: pointer;
  user-select: none;
}

.media-compare__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--bg-void);
}

.media-compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.media-compare__after-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 100% 0 0);
  opacity: 0.92;
  transition: clip-path 1.05s var(--ease-museum), opacity 0.65s ease;
  will-change: clip-path;
}

.media-frame--compare[data-state="after"] .media-compare__after-wrap {
  clip-path: inset(0 0% 0 0);
  opacity: 1;
}

.media-compare__scanline {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(var(--accent-rgb), 0.95) 18%,
    rgba(255, 255, 255, 0.96) 50%,
    rgba(var(--accent-rgb), 0.95) 82%,
    transparent 100%
  );
  box-shadow:
    0 0 18px 2px rgba(var(--accent-rgb), 0.55),
    0 0 42px rgba(var(--accent-rgb), 0.28);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: left 1.05s var(--ease-museum), opacity 0.35s ease;
}

.media-frame--compare[data-state="after"] .media-compare__scanline {
  left: 100%;
}

.media-frame--compare.is-transitioning .media-compare__scanline {
  opacity: 1;
}

/* Edge gradient scrim so museum overlay typography & frame marks read clearly */
.media-frame__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(6, 7, 9, 0.78) 0%,
      rgba(6, 7, 9, 0.14) 24%,
      rgba(6, 7, 9, 0.08) 50%,
      rgba(6, 7, 9, 0.16) 74%,
      rgba(6, 7, 9, 0.86) 100%
    ),
    radial-gradient(
      520px circle at var(--mx, 50%) var(--my, 50%),
      rgba(var(--accent-rgb), 0.1),
      transparent 60%
    );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Keep center reticle cross, crest watermark, and frame chrome above the images */
:is(.media-frame--compare, .media-frame--overlay) .media-frame__cross {
  z-index: 3;
  opacity: 0.34;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.85));
}

:is(.media-frame--compare, .media-frame--overlay) .media-frame__watermark {
  z-index: 3;
  opacity: 0.16;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.78));
}

:is(.media-frame--compare, .media-frame--overlay):hover .media-frame__watermark {
  opacity: 0.28;
}

.media-frame--compare.is-transitioning .media-frame__watermark {
  opacity: 0.36;
}

:is(.media-frame--compare, .media-frame--overlay) .media-frame__top {
  z-index: 6;
  color: var(--ink-primary);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

:is(.media-frame--compare, .media-frame--overlay) .media-frame__top > span:first-child {
  padding: 0.16rem 0.48rem;
  background-color: rgba(6, 7, 9, 0.68);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

:is(.media-frame--compare, .media-frame--overlay) .media-frame__ratio {
  background-color: rgba(6, 7, 9, 0.65);
  border-color: var(--hairline-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

:is(.media-frame--compare, .media-frame--overlay) .media-frame__bottom {
  z-index: 6;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

:is(.media-frame--compare, .media-frame--overlay) .media-frame__sub {
  color: var(--ink-secondary);
}

.media-compare__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.media-compare__state-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.media-compare__controls {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  background-color: rgba(6, 7, 9, 0.74);
  border: 1px solid var(--hairline-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.media-compare__btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
  white-space: nowrap;
}

.media-compare__btn:hover {
  color: var(--ink-primary);
}

.media-compare__btn.is-active {
  background-color: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.58);
  color: var(--ink-primary);
}

/* =============================================================================
   ARCHITECTURAL HAIRLINE GRIDS
   ============================================================================= */

.hairline-grid {
  display: grid;
  gap: 1px;
  background-color: var(--hairline);
  border: 1px solid var(--hairline);
}

.hairline-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hairline-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cell {
  position: relative;
  min-width: 0;
  overflow-wrap: break-word;
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--accent-rgb), 0.065), transparent 62%),
    var(--bg-gallery);
  padding: clamp(1.65rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background-color 0.25s ease;
}

.grid-cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-museum);
}

.grid-cell:hover {
  background-color: var(--bg-plinth);
}

.grid-cell:hover::before {
  transform: scaleX(1);
}

.grid-cell__index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.grid-cell__title {
  font-size: 1.32rem;
  font-weight: 700;
}

.grid-cell__desc {
  font-size: 0.94rem;
  color: var(--ink-secondary);
  line-height: 1.58;
}

/* =============================================================================
   SPEC TABLES, TAGS & GUIDE TECHNICAL REFERENCE
   ============================================================================= */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  border: 1px solid var(--hairline);
  color: var(--ink-secondary);
  white-space: nowrap;
}

.tag--ok {
  border-color: rgba(var(--ok-rgb), 0.45);
  color: var(--ok);
  background-color: rgba(var(--ok-rgb), 0.08);
}

.tag--warn {
  border-color: rgba(var(--warn-rgb), 0.45);
  color: var(--warn);
  background-color: rgba(var(--warn-rgb), 0.08);
}

.tag--err {
  border-color: rgba(var(--err-rgb), 0.45);
  color: var(--err);
  background-color: rgba(var(--err-rgb), 0.08);
}

.matrix-wrap {
  border: 1px solid var(--hairline);
  background-color: var(--bg-gallery);
  overflow-x: auto;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.matrix-table th {
  padding: 0.95rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--hairline);
  background-color: var(--bg-plinth);
  white-space: nowrap;
}

.matrix-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-secondary);
  vertical-align: middle;
}

.matrix-table td strong {
  color: var(--ink-primary);
  font-weight: 600;
}

.matrix-table tr:last-child td {
  border-bottom: none;
}

.matrix-table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.code-inline,
.code-token,
.code-regex {
  font-family: var(--font-mono);
  font-size: 0.84em;
  padding: 0.14rem 0.42rem;
  border-radius: 2px;
}

.code-inline {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  color: var(--ink-primary);
}

.code-token {
  background-color: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  color: var(--accent-soft);
}

.code-regex {
  background-color: rgba(var(--warn-rgb), 0.1);
  border: 1px solid rgba(var(--warn-rgb), 0.32);
  color: var(--warn);
}

.clean-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.clean-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.clean-list li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  line-height: 1.55;
}

.clean-list .code-inline {
  overflow-wrap: anywhere;
}

/* Guide Sticky Jump Strip */
.guide-jump-bar {
  position: sticky;
  top: 76px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  padding: 0.4rem 0.55rem;
  margin-bottom: 2.75rem;
  background-color: rgba(10, 11, 14, 0.9);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(16px);
  overflow-x: auto;
  scrollbar-width: none;
}

.guide-jump-bar::-webkit-scrollbar {
  display: none;
}

.guide-jump-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 0.38rem 0.7rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.guide-jump-pill:hover {
  background-color: rgba(var(--accent-rgb), 0.14);
  color: #ffffff;
}

.guide-module {
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  scroll-margin-top: 136px;
}

.guide-module__title {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  margin-bottom: 0.75rem;
}

.guide-module__sub {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.85rem;
}

.callout {
  padding: 1.15rem 1.35rem;
  background-color: var(--bg-plinth);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--accent);
  margin: 1.25rem 0;
}

.callout--warn {
  border-left-color: var(--warn);
}

.callout__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
}

.callout__body {
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.copy-inline-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-snippet-copy {
  padding: 0.16rem 0.5rem;
  border-radius: 2px;
  border: 1px solid var(--hairline);
  background-color: var(--bg-gallery);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--ink-secondary);
  cursor: pointer;
}

.btn-snippet-copy:hover {
  border-color: var(--accent);
  color: #ffffff;
}

.btn-snippet-copy.is-copied {
  border-color: var(--ok);
  color: var(--ok);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--ink-primary);
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 0.14rem 0.42rem;
  border-radius: 2px;
  background-color: var(--bg-plinth);
  border: 1px solid var(--hairline-strong);
}

/* =============================================================================
   CALL TO ACTION BAND
   ============================================================================= */

.cta-band {
  border: 1px solid var(--hairline);
  background-color: var(--bg-void);
  padding: clamp(2.5rem, 5.5vw, 4.25rem) clamp(1.5rem, 4vw, 3.25rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.cta-band__copy {
  max-width: 540px;
}

.cta-band__title {
  font-size: clamp(1.75rem, 3.6vw, 2.65rem);
  line-height: 1.05;
  margin: 0.65rem 0 0.75rem;
}

.cta-band__desc {
  color: var(--ink-secondary);
  font-size: 1rem;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* =============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================= */

@media (max-width: 960px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-pill {
    padding: 0 0.5rem 0 0.9rem;
  }

  .exhibit-split {
    grid-template-columns: 1fr;
  }

  .exhibit-stage {
    border-left: none;
    border-top: 1px solid var(--hairline);
    min-height: 400px;
  }

  .hairline-grid--3 {
    grid-template-columns: 1fr;
  }

  .hero-inner--tool {
    grid-template-columns: 1fr;
  }

  .hero-crest-box {
    width: 84px;
    height: 84px;
    padding: 14px;
  }
}

@media (max-width: 860px) {
  .media-grid--secondary {
    grid-template-columns: 1fr;
  }

  .media-frame--vertical {
    max-width: 380px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .hairline-grid--2 {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .cta-band__actions {
    width: 100%;
    flex-direction: column;
  }

  .hero-actions .btn,
  .cta-band__actions .btn {
    width: 100%;
  }

  .matrix-table th,
  .matrix-table td {
    padding: 0.85rem 0.95rem;
    font-size: 0.84rem;
  }

  .spec-rail__inner {
    font-size: 0.68rem;
    gap: 0.45rem 1.15rem;
  }

  .media-frame--compare {
    aspect-ratio: 16 / 10;
    min-height: 250px;
  }

  .media-frame--compare .media-frame__top {
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .media-frame--compare .media-frame__ratio {
    display: none;
  }

  .media-compare__btn {
    font-size: 0.6rem;
    padding: 0.22rem 0.52rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .exhibit-row {
    padding: 1.35rem 1rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .media-frame--compare {
    aspect-ratio: 4 / 3;
    padding: 0.85rem;
  }

  .media-frame--compare .media-frame__sub {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .line-mask > span,
  .hero-lead,
  .hero-actions {
    animation: none !important;
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .js-anim-ready [data-reveal],
  .js-anim-ready [data-reveal] .section-title {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }

  .exhibit-canvas,
  .exhibit-plinth-16x9,
  .media-frame::after,
  .media-frame__watermark,
  .media-compare__after-wrap,
  .media-compare__scanline,
  .reg-tick,
  .btn {
    transition: none !important;
  }

  .optical-cursor {
    display: none !important;
  }
}
