/* SHARED COMPONENTS: navigation, timecode, rail and footer. */
.scroll-rail {
  position: fixed;
  left: 22px;
  top: 118px;
  bottom: auto;
  width: 3px;
  height: calc(100vh - 142px);
  z-index: 1;
  background: rgba(237, 234, 227, 0.045);
  border-radius: 2px;
  overflow: visible;
  pointer-events: none;
  opacity: .82;
}

.scroll-rail::before,
.scroll-rail::after {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 1px;
  background: rgba(237, 234, 227, 0.10);
}

.scroll-rail::before {
  top: 0;
}

.scroll-rail::after {
  bottom: 0;
}

.scroll-rail-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(237, 234, 227, 0.90) 0%, rgba(154, 194, 255, 0.80) 46%, rgba(91, 157, 255, 0.74) 100%);
  background-size: 100% 140%;
  background-position: 0 0%;
  box-shadow: 0 0 8px rgba(91, 157, 255, 0.16);
  border-radius: 2px;
  transition: background-position .08s linear;
}

@media (max-width:900px) {
  .scroll-rail {
    left: 14px;
  }

}

@media (max-width:640px) {
  .scroll-rail {
    left: 8px;
    width: 2px;
    opacity: .68;
  }

}

/* Position and length are updated directly from scroll so the rail never lags behind the section. */
.scroll-rail {
  transition: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  isolation: isolate;
  background: transparent;
  transition: background-color 0.35s ease, backdrop-filter 0.35s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 11, .88) 0%, rgba(5, 7, 11, .72) 72%, rgba(5, 7, 11, 0) 100%);
}

body.scrolled .site-header {
  background: rgba(11, 12, 14, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
}

.nav-mark {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--paper);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.nav-right a {
  text-decoration: none;
  opacity: 0.85;
  color: var(--paper);
}

.nav-right a:hover {
  opacity: 1;
}

.nav-loc {
  opacity: 0.6;
  display: none;
  color: var(--paper);
}

@media (min-width:640px) {
  .nav-loc {
    display: inline;
  }

}

@media (min-width:760px) {
  nav {
    padding: 20px 32px 12px;
  }

  .nav-right {
    gap: 28px;
  }

}

@media (max-width:400px) {
  nav {
    padding: 16px 14px 10px;
  }

  .nav-right {
    gap: 10px;
    font-size: 10px;
  }

  .nav-mark {
    font-size: 17px;
  }

}

/* ---------- TIMECODE SCRUBBER (signature) ---------- */
.scrubber {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 0 20px 14px;
}

.scrubber-tc {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
  flex: 0 0 auto;
}

.scrubber-tc span {
  color: var(--graphite);
}

.scrubber-track {
  position: relative;
  flex: 2 1 20px;
  min-width: 20px;
  max-width: 320px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.scrubber-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
}

.scrubber-scene {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--paper);
  opacity: 0.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width:760px) {
  .scrubber {
    padding: 0 32px 16px;
    gap: 16px;
  }

  .scrubber-scene {
    font-size: 11px;
  }

}

footer {
  padding: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--graphite);
}

/* ---------- SHARED LAYOUT AND ACCESSIBILITY ---------- */
:root {
  --header-height: 100px;
  --page-gutter: clamp(24px, 4vw, 48px);
}

html {
  scroll-padding-top: calc(var(--header-height) + 24px);
}

.wrap {
  padding-inline: var(--page-gutter);
}

button,
summary {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  opacity: .4;
  cursor: default;
}

a[aria-current="page"] {
  color: var(--accent);
  opacity: 1;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 400;
  padding: 14px 20px;
  background: var(--paper);
  color: var(--bg);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.scrubber-fill {
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
}

.scroll-rail {
  opacity: .82;
}

.hero {
  isolation: isolate;
}

.hero-bg {
  z-index: -1;
}

.equip-teaser-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  width: 100%;
}

.contact-email,
.booking-email {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.spec-row {
  gap: 20px;
}

.spec-row span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.text-link {
  display: inline-block;
  color: var(--accent);
  line-height: 1.5;
  text-underline-offset: 5px;
  padding-block: 12px;
}

.reveal {
  opacity: 1;
  transform: none;
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.reveal-pending {
  opacity: 0;
  transform: translateY(24px);
}

@media (prefers-reduced-motion: reduce) {
  .reveal.reveal-pending {
    opacity: 1;
    transform: none;
  }

  .disc-gallery {
    scroll-behavior: auto;
  }

}

/* ---------- GALLERY CONTROLS AND STATIONARY EDGE FADES ---------- */
.gallery-shell {
  position: relative;
}

.gallery-shell::before,
.gallery-shell::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 16px;
  width: 24px;
  z-index: 5;
  pointer-events: none;
}

.gallery-shell::before {
  left: 64px;
  background: linear-gradient(90deg, #05070b, transparent);
}

.gallery-shell::after {
  right: 0;
  background: linear-gradient(270deg, #05070b, transparent);
}

.gallery-open {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.gallery-open:focus-visible {
  outline-offset: -5px;
}

.disc-gallery figcaption {
  pointer-events: none;
}

.gallery-expand {
  font-size: 22px;
  color: var(--paper);
}

.gallery-open:focus-visible .gallery-expand {
  opacity: 1;
  transform: none;
}

.gallery-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 24px 0 64px;
}

.gallery-controls button,
.dialog-heading button {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

.gallery-controls button:hover,
.dialog-heading button:hover {
  border-color: var(--accent);
}

.gallery-count {
  min-width: 72px;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 900px) {
  .gallery-shell::before {
    left: 40px;
  }

  .gallery-controls {
    margin-left: 40px;
  }

}

@media (max-width: 640px) {
  .gallery-shell::before {
    left: 26px;
  }

  .gallery-controls {
    margin-left: 26px;
  }

  .gallery-expand {
    opacity: 1;
    transform: none;
  }

}

/* ---------- EQUIPMENT: RESPONSIVE CARDS AND SCANNABLE PRICING ---------- */
.category-nav {
  justify-content: flex-start;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-block: 0;
}

.category-nav a {
  padding-block: 12px;
  font: 12px 'IBM Plex Mono', monospace;
  text-underline-offset: 5px;
  color: var(--accent);
}

.gear-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.crew-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.gear-top {
  flex-wrap: wrap;
}

.gear-name {
  line-height: 1.3;
}

.gear-top>div {
  flex: 1 1 200px;
  min-width: 0;
}

.gear-qty {
  align-self: flex-start;
}

.daily-price {
  font-family: 'Oswald', sans-serif;
  font-size: 32px;
  color: var(--accent);
}

.daily-price span {
  font: 12px 'IBM Plex Mono', monospace;
  color: var(--graphite);
}

.rate-row dt {
  color: var(--graphite);
}

.rate-row dd {
  color: var(--paper);
  margin: 0;
}

.gear-accessories summary {
  cursor: pointer;
  min-height: 44px;
  display: list-item;
  padding-block: 12px;
  color: var(--paper);
}

.gear-accessories ul {
  padding-left: 18px;
}

.inventory-note,
.quote-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--graphite);
}

.kit-inquiry {
  margin-top: auto;
}

@media (max-width: 400px) {

  .gear-card,
  .crew-card {
    padding: 22px;
  }

}

/* ---------- NATIVE MEDIA DIALOGS ---------- */
.media-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(16px, 4vw, 48px);
  border: 0;
  color: var(--paper);
  background: transparent;
  overflow: auto;
}

.media-dialog[open] {
  display: flex;
  align-items: safe center;
  justify-content: center;
}

.media-dialog::backdrop {
  background: rgba(0, 0, 0, .94);
}

.dialog-panel {
  width: min(100%, 1100px);
}

.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.dialog-heading h2 {
  font-size: clamp(18px, 3vw, 28px);
}

.media-dialog video {
  display: block;
  width: 100%;
  max-height: 72dvh;
  aspect-ratio: 16 / 9;
  background: #000;
}

.media-dialog figure {
  margin: 0;
}

.media-dialog figure img {
  width: 100%;
  max-height: 72dvh;
  object-fit: contain;
}

.media-dialog figcaption {
  text-align: center;
  font-size: 12px;
  margin-top: 16px;
  line-height: 1.5;
}

.media-help,
.media-status {
  font-size: 13px;
  line-height: 1.6;
  margin-top: 12px;
  color: var(--graphite);
}

/* ---------- FIRST-ENTRANCE HEADER FLICKER ---------- */
/* Two short opacity dips over 0.56s, then steady text. No positional jitter. */
.reveal.reveal-header {
  transition: none;
  transform: none;
}

@keyframes headingFlicker {
  0% {
    opacity: 1;
  }

  16% {
    opacity: .22;
  }

  28% {
    opacity: 1;
  }

  46% {
    opacity: .4;
  }

  60%,
  100% {
    opacity: 1;
  }
}

.first-flicker {
  animation: headingFlicker .56s steps(1, end) 1;
}

@media (prefers-reduced-motion: reduce) {
  .first-flicker {
    animation: none;
  }
}