/* ==========================================================================
   APERTURE DEPARTURE (@aperture.departure)
   Option 2: The Film Strip / Horizontal Cinema + Contact Sheet Archive
   ========================================================================== */

:root {
  /* Matte Obsidian Darkroom (Primary) */
  --bg: #070708;
  --bg-elevated: #0d0d10;
  --bg-carrier: #121216;
  --bg-glass: rgba(11, 11, 14, 0.88);
  --ink: #f2f0ec;
  --ink-secondary: #c8c3b8;
  --ink-muted: #7d7970;
  --tungsten: #e6d5b8;
  --kodak: #e59a28;
  --kodak-soft: rgba(229, 154, 40, 0.14);
  --grease-red: #d94e34;
  --rule: rgba(230, 213, 184, 0.11);
  --rule-strong: rgba(230, 213, 184, 0.26);

  /* Typography */
  --font-display: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Dimensions */
  --header-h: 58px;
  --hud-h: 92px;
  --sprocket-h: 26px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme='light'] {
  /* Daylight Archival Proof Sheet */
  --bg: #f4f1ea;
  --bg-elevated: #ebe6dc;
  --bg-carrier: #e2dcd0;
  --bg-glass: rgba(244, 241, 234, 0.92);
  --ink: #141413;
  --ink-secondary: #3d3b37;
  --ink-muted: #757067;
  --tungsten: #2b2925;
  --kodak: #b85d19;
  --kodak-soft: rgba(184, 93, 25, 0.12);
  --grease-red: #b8321a;
  --rule: rgba(20, 20, 19, 0.12);
  --rule-strong: rgba(20, 20, 19, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  selection-background-color: var(--kodak);
}

::selection {
  background: var(--kodak);
  color: #070708;
}

/* Lock vertical scroll on desktop when in horizontal Reel View */
html[data-view='reel'] body {
  overflow: hidden;
}

html[data-view='sheet'] body,
html[data-view='notes'] body {
  overflow-y: auto;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  background: var(--kodak);
  color: #070708;
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}
.skip-link:focus {
  top: 0.75rem;
}

/* ==========================================================================
   TOP FILM-GATE HEADER
   ========================================================================== */

.gate-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.gate-brand-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.gate-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.gate-iris {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tungsten);
  transition: transform 0.45s var(--ease-out);
}

.gate-brand:hover .gate-iris {
  transform: rotate(60deg);
}

.gate-divider {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.gate-roll-code {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kodak);
  box-shadow: 0 0 8px var(--kodak);
}

/* Motif Filter Rail */
.motif-rail {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.motif-rail::-webkit-scrollbar {
  display: none;
}

.motif-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  border: 1px solid transparent;
  transition: all 0.18s var(--ease-out);
  white-space: nowrap;
}

.motif-pill:hover {
  color: var(--ink);
  border-color: var(--rule);
}

.motif-pill.active {
  color: var(--ink);
  background: var(--kodak-soft);
  border-color: var(--kodak);
}

.motif-count {
  font-size: 0.62rem;
  color: var(--kodak);
  opacity: 0.9;
}

/* Right Header Controls */
.gate-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.view-switcher {
  display: inline-flex;
  border: 1px solid var(--rule-strong);
  background: var(--bg-elevated);
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  border-right: 1px solid var(--rule);
  transition: all 0.18s var(--ease-out);
}
.view-tab:last-child {
  border-right: none;
}

.view-tab:hover {
  color: var(--ink);
}

.view-tab.active {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.tab-code {
  color: var(--kodak);
}
.view-tab.active .tab-code {
  color: var(--kodak);
}

.icon-btn {
  padding: 0.34rem 0.6rem;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
  transition: border-color 0.18s ease, color 0.18s ease;
}
.icon-btn:hover {
  border-color: var(--kodak);
  color: var(--ink);
}

html[data-theme='dark'] .theme-label-light {
  display: none;
}
html[data-theme='light'] .theme-label-dark {
  display: none;
}

.ig-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.34rem 0.65rem;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--tungsten);
  transition: all 0.18s ease;
}
.ig-badge-link:hover {
  background: var(--kodak);
  border-color: var(--kodak);
  color: #070708;
}

/* ==========================================================================
   MAIN STAGE & SPROCKET RAIL
   ========================================================================== */

.main-stage {
  padding-top: var(--header-h);
  min-height: 100vh;
}

.kodak-code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--kodak);
  text-transform: uppercase;
}

.sprocket-strip {
  height: var(--sprocket-h);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 1.25rem;
}

.sprocket-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ==========================================================================
   VIEW 1: HORIZONTAL FILM STRIP / CINEMA REEL
   ========================================================================== */

.view-reel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-h));
  position: relative;
}

.view-reel[hidden] {
  display: none !important;
}

.reel-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1.25rem 6vw;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  outline: none;
}
.reel-viewport::-webkit-scrollbar {
  display: none;
}

/* Roll Leader Card (00A) */
.reel-leader-card {
  flex: 0 0 430px;
  height: min(68vh, 580px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-strong);
  scroll-snap-align: center;
  position: relative;
}

.leader-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.leader-handle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-secondary);
}

.leader-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: auto 0;
}

.leader-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

.leader-headline {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.leader-headline em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.14em;
  color: var(--tungsten);
}

.leader-description {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.leader-telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 0;
  margin-top: 0.25rem;
}

.telemetry-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.telemetry-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.telemetry-lbl {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.leader-footer {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.start-reel-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--kodak);
  color: #070708;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: filter 0.18s ease, transform 0.18s ease;
}
.start-reel-btn:hover {
  filter: brightness(1.08);
  transform: translateX(2px);
}

.leader-hints {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

/* Film Frames Track */
.reel-frames-track {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  height: 100%;
}

.film-frame-card {
  flex: 0 0 auto;
  height: min(68vh, 600px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-carrier);
  border: 1px solid var(--rule);
  padding: 0.65rem 0.85rem;
  scroll-snap-align: center;
  transition:
    opacity 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
  opacity: 0.52;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.film-frame-card:hover {
  opacity: 0.88;
  border-color: var(--rule-strong);
}

.film-frame-card.is-active {
  opacity: 1;
  border-color: var(--kodak);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.frame-rebate-top,
.frame-rebate-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  height: 22px;
}

.frame-rebate-top {
  color: var(--kodak);
  padding-bottom: 0.35rem;
}

.frame-rebate-bottom {
  color: var(--ink-muted);
  padding-top: 0.35rem;
}

.frame-window {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #030304;
  overflow: hidden;
  position: relative;
}

.frame-window img {
  height: 100%;
  width: auto;
  max-width: 78vw;
  object-fit: contain;
  display: block;
  transition: transform 0.5s var(--ease-out);
}

.film-frame-card:hover .frame-window img {
  transform: scale(1.012);
}

.frame-loupe-hint {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  padding: 0.24rem 0.5rem;
  background: rgba(7, 7, 8, 0.82);
  border: 1px solid var(--rule-strong);
  color: var(--tungsten);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.film-frame-card:hover .frame-loupe-hint,
.film-frame-card.is-active .frame-loupe-hint {
  opacity: 1;
}

/* Roll Tail Card */
.reel-tail-card {
  flex: 0 0 360px;
  height: min(68vh, 580px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-strong);
  scroll-snap-align: center;
}

.tail-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.2;
}

.tail-sub {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.tail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tail-btn-primary,
.tail-btn-secondary {
  padding: 0.65rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-align: center;
  border: 1px solid var(--rule-strong);
  transition: all 0.18s ease;
}

.tail-btn-primary {
  background: var(--kodak);
  border-color: var(--kodak);
  color: #070708;
  font-weight: 600;
}

.tail-btn-secondary:hover {
  border-color: var(--kodak);
  color: var(--kodak);
}

/* ==========================================================================
   BOTTOM FILM-LEADER HUD & SCRUBBER
   ========================================================================== */

.reel-hud {
  height: var(--hud-h);
  background: var(--bg-elevated);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 0.35rem 1.5rem;
  padding: 0.55rem 1.25rem 0.45rem;
  z-index: 150;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hud-transport {
  display: inline-flex;
  border: 1px solid var(--rule-strong);
}

.hud-nav-btn {
  width: 34px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  border-right: 1px solid var(--rule);
  transition: background 0.15s ease, color 0.15s ease;
}
.hud-nav-btn:last-child {
  border-right: none;
}
.hud-nav-btn:hover {
  background: var(--kodak);
  color: #070708;
}

.hud-frame-counter {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hud-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--kodak);
}

.hud-stock {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.hud-center {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hud-caption {
  font-size: 0.84rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-tags {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
}

.hud-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-muted);
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hud-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-secondary);
}

.hud-action-btn,
.hud-ig-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.65rem;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  transition: all 0.18s ease;
}

.hud-action-btn kbd {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  padding: 0.08rem 0.3rem;
  background: var(--bg-carrier);
  border: 1px solid var(--rule);
  color: var(--kodak);
}

.hud-action-btn:hover,
.hud-ig-btn:hover {
  border-color: var(--kodak);
  color: var(--kodak);
}

/* Interactive Scrubber Ticks */
.hud-scrubber {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 14px;
  width: 100%;
}

.scrub-tick {
  flex: 1;
  height: 6px;
  background: var(--rule-strong);
  transition: all 0.15s ease;
  position: relative;
}

.scrub-tick:hover {
  height: 12px;
  background: var(--tungsten);
}

.scrub-tick.is-active {
  height: 12px;
  background: var(--kodak);
}

/* ==========================================================================
   VIEW 2: CONTACT SHEET ARCHIVE (MAGNUM PROOF LEDGER)
   ========================================================================== */

.view-sheet {
  padding: 2rem 1.5rem 5rem;
  max-width: 1600px;
  margin: 0 auto;
}

.view-sheet[hidden] {
  display: none !important;
}

.sheet-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule-strong);
}

.sheet-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  margin: 0.25rem 0 0.35rem;
}

.sheet-sub {
  font-size: 0.86rem;
  color: var(--ink-secondary);
}

.sheet-density-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.density-label {
  color: var(--ink-muted);
  margin-right: 0.25rem;
}

.density-btn {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--rule);
  color: var(--ink-muted);
  transition: all 0.16s ease;
}

.density-btn.active,
.density-btn:hover {
  border-color: var(--kodak);
  color: var(--ink);
  background: var(--kodak-soft);
}

.contact-sheet-grid {
  display: grid;
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}

.contact-sheet-grid.density-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.contact-sheet-grid.density-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.proof-cell {
  background: var(--bg);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease;
}

.proof-cell:hover {
  background: var(--bg-elevated);
}

/* Grease-pencil inspection mark on hover */
.proof-cell::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1.5px solid var(--grease-red);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.proof-cell:hover::after {
  opacity: 1;
}

.proof-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--kodak);
}

.proof-motif {
  color: var(--ink-muted);
  text-transform: uppercase;
}

.proof-thumb-box {
  aspect-ratio: 4 / 3;
  background: #030304;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.25rem;
}

.proof-thumb-box img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.35s var(--ease-out);
}

.proof-cell:hover .proof-thumb-box img {
  transform: scale(1.03);
}

.proof-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-muted);
}

.proof-caption-snip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-secondary);
}

/* ==========================================================================
   VIEW 3: ROLL NOTES & ARTIST STATEMENT
   ========================================================================== */

.view-notes {
  padding: 3rem 1.5rem 5rem;
  max-width: 1240px;
  margin: 0 auto;
}

.view-notes[hidden] {
  display: none !important;
}

.notes-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.notes-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.1;
  margin: 0.5rem 0 1rem;
}

.notes-title em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  color: var(--tungsten);
}

.notes-lead {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-style: italic;
  color: var(--ink-secondary);
  margin-bottom: 1.5rem;
}

.notes-prose {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--ink-secondary);
  margin-bottom: 2.5rem;
}

.notes-prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--kodak);
}

.notes-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.spec-card {
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.spec-code {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--kodak);
  letter-spacing: 0.08em;
}

.spec-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
}

.spec-card p {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.dispatch-card {
  padding: 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-strong);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dispatch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.dispatch-status {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-muted);
}

.dispatch-handle {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--ink);
}

.dispatch-bio {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.dispatch-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.dispatch-stats dt {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-muted);
}

.dispatch-stats dd {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.dispatch-cta {
  padding: 0.8rem 1rem;
  background: var(--kodak);
  color: #070708;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   DARKROOM LOUPE MODAL
   ========================================================================== */

.loupe-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.loupe-modal[hidden] {
  display: none !important;
}

.loupe-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 6, 0.96);
  backdrop-filter: blur(16px);
}

.loupe-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid rgba(230, 213, 184, 0.14);
  color: #f2f0ec;
}

.loupe-meta-left,
.loupe-controls-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.loupe-stock-badge,
.loupe-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #c8c3b8;
}

.loupe-btn,
.loupe-close-btn {
  padding: 0.36rem 0.75rem;
  border: 1px solid rgba(230, 213, 184, 0.25);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #f2f0ec;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.loupe-btn:hover,
.loupe-close-btn:hover {
  border-color: var(--kodak);
  color: var(--kodak);
}

.loupe-close-btn kbd {
  font-size: 0.58rem;
  color: var(--kodak);
}

.loupe-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 4.5rem;
}

.loupe-figure {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.loupe-img-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.loupe-img-wrap img {
  max-height: 78vh;
  max-width: 88vw;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(230, 213, 184, 0.2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
}

.loupe-caption-bar {
  text-align: center;
  max-width: 720px;
  color: #f2f0ec;
}

.loupe-caption-text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.3rem;
}

.loupe-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--kodak);
}

.loupe-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(230, 213, 184, 0.25);
  background: rgba(12, 12, 15, 0.8);
  color: #f2f0ec;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.loupe-arrow:hover {
  border-color: var(--kodak);
  background: var(--kodak);
  color: #070708;
}

.loupe-prev {
  left: 1.25rem;
}
.loupe-next {
  right: 1.25rem;
}

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

@media (max-width: 1100px) {
  .contact-sheet-grid.density-6 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .notes-layout {
    grid-template-columns: 1fr;
  }
  .notes-specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .gate-header {
    height: auto;
    flex-wrap: wrap;
    padding: 0.6rem 0.9rem;
    gap: 0.5rem;
  }

  .motif-rail {
    order: 3;
    width: 100%;
    padding-top: 0.35rem;
    border-top: 1px solid var(--rule);
  }

  .main-stage {
    padding-top: 94px;
  }

  .view-reel {
    height: calc(100vh - 94px);
  }

  .reel-leader-card {
    flex: 0 0 84vw;
    height: 60vh;
    padding: 1.25rem;
  }

  .film-frame-card {
    height: 60vh;
  }

  .reel-hud {
    grid-template-columns: 1fr auto;
    height: auto;
    padding: 0.5rem 0.9rem;
  }

  .hud-center {
    display: none;
  }

  .contact-sheet-grid.density-6,
  .contact-sheet-grid.density-4,
  .contact-sheet-grid.density-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .loupe-stage {
    padding: 0.5rem 1rem;
  }

  .loupe-arrow {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
}
