/*
 * ============================================================
 *  SARTHAK CHEEMA — PORTFOLIO
 *  Cinematic minimal aesthetic inspired by house-post.com
 *  Font: Funnel Display (Google Fonts)
 * ============================================================
 */

/* ── Google Fonts: Funnel Display variable ───────────────── */
@import url('https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300..800&display=swap');

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  --bg:        #0a0a0a;
  --fg:        #f0f0f0;
  --fg-mid:    rgba(240, 240, 240, 0.55);
  --fg-dim:    rgba(240, 240, 240, 0.35);
  --fg-faint:  rgba(240, 240, 240, 0.12);
  --border:    rgba(240, 240, 240, 0.07);

  --pad-x:     40px;
  --pad-y:     40px;
  --nav-h:     88px; /* approx nav height for padding */
  --accent:    #f0f0f0;  /* white — active/hover states */
}

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

/* ── Base ─────────────────────────────────────────────────── */
html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Funnel Display', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Default: no scroll (home page is a full-frame experience) */
  overflow: hidden;
  height: 100vh;
  /* Page transitions */
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

body.page-visible {
  opacity: 1;
}

/* Pages that scroll override this */
body.scrollable {
  overflow-y: auto;
  height: auto;
  min-height: 100vh;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* ── Navigation (shared across all pages) ─────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 32px var(--pad-x);
  border-bottom: 1px solid rgba(240, 240, 240, 0.10);
  /* Pointer events: none on the wrapper so it doesn't block hero clicks */
  pointer-events: none;
}

.nav > * {
  pointer-events: auto;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.65;
}

/* PNG logo mark — white on transparent, renders on dark bg */
.nav-logo-img {
  display: block;
  height: 22px;
  width: auto;
}


.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-mid);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

/* ── Hero — Home Page ─────────────────────────────────────── */
.hero {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* Loading state layer — solid black, sits beneath video layers */
.hero-thumb {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-symbol {
  height: 44px;   /* 2× the nav logo (22px) */
  width: auto;
  opacity: 0.3;
  transition: opacity 0.4s ease;
  pointer-events: none;
  user-select: none;
  display: block;
}

.loading-symbol.hidden {
  opacity: 0;
}

/* Two video layers for smooth crossfade between projects */
.video-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: opacity 0.36s ease;
  will-change: opacity;
}

/*
 * The iframe must be larger than the viewport to fill it at 16:9.
 * Formula: at least 100vw wide AND at least 100vh tall.
 * — width: 100vw → height would be 56.25vw (16:9)
 * — height: 100vh → width would be 177.78vh (16:9)
 * We use whichever is bigger via min-width / min-height.
 * Centred with transform translate(-50%, -50%).
 */
.video-layer iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;           /* 100vw × 9/16 */
  min-height: 100vh;
  min-width: 177.78vh;       /* 100vh × 16/9 */
  transform: translate(-50%, -50%);
  border: 0;
  /* Prevent user from clicking through to the player controls */
  pointer-events: none;
}

/* Subtle dark wash to improve text legibility on bright images */
.hero-vignette {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: 4;
}

/* Top gradient — keeps the nav readable */
.hero-top-grad {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 4;
}

/* Bottom gradient — lifts the text overlay */
.hero-bottom-grad {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.96) 0%,
    rgba(0, 0, 0, 0.72) 38%,
    rgba(0, 0, 0, 0.28) 68%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 4;
}

/* ── Bottom Overlay — Home Page ───────────────────────────── */
.bottom-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;

  display: grid;
  /* Badge+Counter | Title block | Role + Nav */
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 28px;
  padding: 0 var(--pad-x) var(--pad-y);
}

/* --- Counter (bottom-left) --- */
.bottom-counter {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  /* Monospace/tabular numerals for clean alignment */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  /* Align baseline with title block */
  padding-bottom: 6px;
  white-space: nowrap;
}

/* --- Center-left: title + meta --- */
.bottom-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Wrap title in an anchor for "Watch" behaviour */
.bottom-title-link {
  display: inline-block;
  cursor: pointer;
}

.bottom-title {
  font-size: clamp(20px, 3.2vw, 50px);
  font-weight: 600;
  letter-spacing: 0.02em;   /* tight tracking on large display text */
  text-transform: uppercase;
  color: var(--fg);
  line-height: 1.05;
  transition: opacity 0.2s ease;
}

.bottom-title-link:hover .bottom-title {
  opacity: 0.72;
}

.bottom-meta {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* --- Right: role + nav controls --- */
.bottom-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  padding-bottom: 2px;
}

.bottom-role {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.bottom-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.hero-nav-btn {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mid);
  transition: color 0.2s ease;
  line-height: 1;
  padding: 4px 0; /* larger hit target */
}

.hero-nav-btn:hover {
  color: var(--fg);
}

/*
 * Mute / Unmute toggle button.
 * Sits between the role label and the Prev/Next controls.
 * Styled identically to the nav buttons for visual consistency.
 * Hidden (via hidden attribute) when the project has no embeddable video.
 */
.mute-btn {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mid);
  transition: color 0.2s ease;
  padding: 4px 0;
  line-height: 1;
  /* Subtle left border to visually separate from role above */
  border-left: 1px solid rgba(240, 240, 240, 0.15);
  padding-left: 10px;
  margin-left: 2px;
}

.mute-btn:hover {
  color: var(--fg);
}

/* When aria-pressed="true" (unmuted), show slightly brighter */
.mute-btn[aria-pressed="true"] {
  color: rgba(240, 240, 240, 0.85);
}

/* ── Work Page ────────────────────────────────────────────── */
.work-container {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 48px;
  padding: calc(var(--nav-h) + 24px) var(--pad-x) 80px;
}

/* ── Filter Index (left sidebar) ─────────────────────────── */
.work-filter-heading {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 20px;
}

.work-filter-nav {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 2px;
}

.work-filter-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-dim);
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease, opacity 0.2s ease;
  line-height: 1.5;
}

.work-filter-btn:hover {
  color: var(--fg);
}

.work-filter-btn.active {
  color: var(--fg);
}

/* Dimmed project rows — non-matching filter */
.work-row.is-dimmed {
  opacity: 0.15;
  pointer-events: none;
}

.work-section {
  margin-bottom: 0;
}

.work-section + .work-section {
  margin-top: 72px;
  padding-top: 72px;
  border-top: 1px solid var(--border);
}

.work-section-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 40px;
}

.work-list {
  list-style: none;
}

.work-row {
  display: grid;
  /* Number | Title | Type | Year */
  grid-template-columns: 52px 1fr auto 48px;
  align-items: center;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.15s ease;
  /* No anchor tag — JS handles click */
}

.work-row:first-child {
  border-top: 1px solid var(--border);
}

.work-row:hover {
  opacity: 0.55;
}

.work-row-num {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
}

.work-row-title {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.03em;   /* tight tracking for uppercase list items */
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-row-type {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;  /* consistent with rest of the type system */
  color: var(--fg-dim);
  text-align: right;
  white-space: nowrap;
}

.work-row-year {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: right;
  white-space: nowrap;
}

/* Mobile inline thumbnail (hidden on desktop) */
.work-row-thumb {
  display: none;
}

/* ── Floating Thumbnail Preview (Work Page) ───────────────── */
.thumb-preview {
  position: fixed;
  right: var(--pad-x);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(200px, 33vw, 580px);
  aspect-ratio: 16 / 9;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  overflow: hidden;
}

.thumb-preview.visible {
  opacity: 1;
}

/* Both images stacked; transitions driven entirely by JS inline styles */
.thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

/* ── Info Page ────────────────────────────────────────────── */
/* ── About page — full-viewport split layout ─────────────── */

.info-page {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 40vw 1fr;
}

/* LEFT: photo fills its column edge-to-edge */
.info-photo-link {
  display: block;
  height: 100%;
  overflow: hidden;
}

.info-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: grayscale(15%);
  transition: filter 0.4s ease;
}

.info-photo-link:hover .info-photo {
  filter: grayscale(0%);
}

/* RIGHT: bio at top, footer pinned to bottom */
.info-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px 72px 52px 72px;
  overflow-y: auto;
}

.info-bio {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.9;
  color: rgba(240, 240, 240, 0.72);
  letter-spacing: 0.01em;
  max-width: 520px;
}

.info-bio p + p {
  margin-top: 1.4em;
}

/* Footer row: email CTA + instagram side by side */
.info-footer {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

/* Highlighted enquiry email */
.info-email-cta {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  border: 1px solid rgba(240, 240, 240, 0.2);
  padding: 12px 22px;
  display: inline-block;
  transition: background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  pointer-events: auto;
}

.info-email-cta:hover {
  background: rgba(240, 240, 240, 0.07);
  border-color: rgba(240, 240, 240, 0.4);
}

.info-ext-link {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-mid);
  transition: color 0.2s ease;
  cursor: pointer;
  pointer-events: auto;
}

.info-ext-link:hover {
  color: var(--fg);
}

/* ── Mobile Responsive ────────────────────────────────────── */

@media (max-width: 768px) {
  :root {
    --pad-x: 20px;
    --pad-y: 28px;
    --nav-h: 72px;
  }

  /* Nav */
  .nav {
    padding: 24px var(--pad-x);
  }

  .nav-links {
    gap: 22px;
  }

  /* Home — bottom overlay: single column stack */
  .bottom-overlay {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 28px;
  }

  /* Hide counter on mobile to save vertical space */
  .bottom-counter {
    display: none;
  }

  /* Role + Nav become a horizontal row */
  .bottom-right {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  /* Work page */
  .work-container {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-h) + 16px);
    padding-bottom: 60px;
  }

  .work-filter-nav {
    position: static;
    flex-direction: column;
    gap: 0;
    margin-bottom: 32px;
    padding-bottom: 0;
    border-bottom: none;
  }

  .work-filter-heading {
    margin-bottom: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }

  .work-filter-btn {
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }

  .work-row {
    /* 3-col grid: num | title | year
       thumb spans all 3 cols on row 1, text on row 2 */
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 10px;
    padding: 16px 0;
  }

  .work-row-thumb {
    display: block;
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }

  .work-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .work-row-num  { grid-column: 1; grid-row: 2; }
  .work-row-title { grid-column: 2; grid-row: 2; }
  .work-row-year  { grid-column: 3; grid-row: 2; }

  .work-row-type {
    display: none;
  }

  /* Hide floating thumbnail on mobile */
  .thumb-preview {
    display: none;
  }

  /* About page — full-height column on mobile */
  .info-page {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
  }

  /* Photo: fixed slice at top, crop to face */
  .info-photo-link {
    display: block;
    flex-shrink: 0;
    height: 42vh;
  }

  .info-photo {
    object-position: center 35%;
  }

  /* Bio: scrolls internally, footer always pinned */
  .info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px var(--pad-x) 32px;
    overflow: hidden;
    gap: 0;
    min-height: 0;
  }

  .info-bio {
    font-size: 13px;
    max-width: none;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-bottom: 24px;
  }

  .info-footer {
    flex-shrink: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .bottom-title {
    font-size: 18px;
  }

  .work-section-label {
    margin-bottom: 28px;
  }
}

/* ══════════════════════════════════════════════
   SELECTED WORK BADGE + COUNTER WRAP
══════════════════════════════════════════════ */
.bottom-counter-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 68px;
}

.selected-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--bg);
  padding: 3px 7px;
  /* Sharp corners — no border-radius */
  white-space: nowrap;
}

/* ══════════════════════════════════════════════
   CUSTOM CURSOR — Homepage only
══════════════════════════════════════════════ */

/* Homepage body keeps the native cursor */
body:not(.scrollable) {
  cursor: auto;
}

/* Restore full native cursor across the entire top nav and bottom overlay */
body:not(.scrollable) .nav,
body:not(.scrollable) .bottom-overlay {
  cursor: auto;
}
body:not(.scrollable) .nav a,
body:not(.scrollable) .nav button,
body:not(.scrollable) .bottom-overlay a,
body:not(.scrollable) .bottom-overlay button {
  cursor: pointer;
}

/* Seek bar keeps col-resize */
body:not(.scrollable) #seek-bar {
  cursor: col-resize;
}

/* Custom cursor disabled — using native browser cursor */
#custom-cursor {
  display: none !important;
}

/* Mobile: native cursor (same as desktop now) */
@media (max-width: 768px) {
  body:not(.scrollable),
  body:not(.scrollable) a,
  body:not(.scrollable) button { cursor: auto; }
}

/* ══════════════════════════════════════════════
   CREDITS HINT — tiny label in the counter wrap
══════════════════════════════════════════════ */
.credits-hint {
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 240, 240, 0.45);
  transition: color 0.25s ease, opacity 0.25s ease;
  cursor: default;
  user-select: none;
}

.credits-hint.credits-open {
  color: var(--fg);
}

/* ══════════════════════════════════════════════
   CREDITS PANEL — Homepage only
   Sits below the bottom-overlay (z-index 99) and
   slides up on scroll to reveal per-project credits.
   Dark gradient provides backdrop; credits items
   appear above the bottom-overlay's text area.
══════════════════════════════════════════════ */
#credits-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99; /* below bottom-overlay (100) */
  padding: 52px var(--pad-x) 158px;
  /*
   * Tall gradient so the fade-in looks cinematic.
   * 158px bottom padding keeps the credits clear
   * of the bottom-overlay's text content.
   */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.96) 0%,
    rgba(0, 0, 0, 0.82) 42%,
    transparent 100%
  );
  transform: translateY(100%);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

#credits-panel.credits-open {
  transform: translateY(0);
}

/* Credit items row */
.credits-items {
  display: flex;
  align-items: flex-end;
  gap: 44px;
  flex-wrap: wrap;
}

.credits-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.credits-item-label {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.credits-item-value {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg);
}

@media (max-width: 768px) {
  /* Credits panel: keep bottom:0 so translateY(100%) fully hides it.
     padding-bottom uses --overlay-h (set by JS after each project change)
     + 10px gap, so the credits content always clears the overlay by the
     same amount regardless of how tall the overlay is for that project. */
  #credits-panel {
    padding: 40px var(--pad-x) calc(var(--overlay-h, 120px) + 10px);
  }
  .credits-items {
    gap: 20px;
  }
  .credits-item-label {
    font-size: 7px;
    letter-spacing: 0.22em;
  }
  .credits-item-value {
    font-size: 9px;
    letter-spacing: 0.07em;
  }
}

/* ══════════════════════════════════════════════
   SEEK BAR — vertical playhead  (edit.church style)
   · 1px #010fc5 blue line, full viewport height,
     gradient fade at both ends.
   · Solid #010fc5 34px circle at top: 43%.
   · MM.SS timecode at top: 54%, flush to line.
   · Third icon (← →) during drag.
   · Whole assembly moves left 0→100% as video plays.
   Desktop only — @media rule hides on mobile.
══════════════════════════════════════════════ */
#seek-bar {
  position: fixed;
  top: var(--sb-top, 88px);           /* = nav border-bottom edge (set by JS) */
  bottom: var(--sb-bot-inset, 120px); /* = 100vh − bottom-overlay top (set by JS) */
  left: 0%;              /* driven by JS: 0–100 of viewport width */
  width: 44px;           /* hit zone — line is centred inside it */
  z-index: 300;
  transform: translateX(-50%);
  opacity: 0;
  /* left transitions smoothly during playback; disabled during drag */
  transition: opacity 0.25s ease, left 0.25s linear;
  pointer-events: none;
  cursor: ew-resize;
}

#seek-bar.sb-visible {
  opacity: 1;
  pointer-events: auto;
}

/* No left-transition while the user is scrubbing */
#seek-bar.sb-dragging-active {
  transition: opacity 0.25s ease;
}

/* ── The visible 1px line ───────────────────────────────── */
#seek-track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  /* Fade out at both ends so the line dissolves into the
     frame above and the project-title overlay below */
  background: linear-gradient(
    to bottom,
    transparent  0%,
    #010fc5     10%,
    #010fc5     90%,
    transparent 100%
  );
  pointer-events: none;
}

/* ── Handle — play/pause circle, sits at 43% from top ──────
   Solid accent-blue circle matching edit.church reference    */
#seek-handle {
  position: absolute;
  top: 43%;
  left: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #010fc5;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 200ms ease,
              transform 200ms ease;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  z-index: 1;
}

#seek-bar.sb-visible #seek-handle {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Hovering the circle: pointer cursor, gentle scale */
#seek-handle:hover:not(.sb-dragging) {
  transform: translate(-50%, -50%) scale(1.08);
  cursor: pointer;
}

/* While dragging */
#seek-handle.sb-dragging {
  transform: translate(-50%, -50%) scale(1.05) !important;
  cursor: ew-resize !important;
}

/* ── Handle icons ───────────────────────────────────────── */
.sb-pause-icon {
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 150ms ease;
}

.sb-bar {
  display: block;
  width: 2px;
  height: 11px;
  background: #ffffff;
  flex-shrink: 0;
}

.sb-play-icon {
  position: absolute;
  transition: opacity 150ms ease;
  opacity: 0;
  margin-left: 1px;
}

/* Drag-arrows icon — horizontal ← → */
.sb-drag-icon {
  position: absolute;
  transition: opacity 150ms ease;
  opacity: 0;
}

/* State: playing → pause bars visible */
#seek-handle.sb-paused .sb-pause-icon { opacity: 0; }
#seek-handle.sb-paused .sb-play-icon  { opacity: 1; }

/* State: seeking → drag arrows visible, play/pause hidden */
#seek-handle.sb-seeking .sb-pause-icon { opacity: 0; }
#seek-handle.sb-seeking .sb-play-icon  { opacity: 0; }
#seek-handle.sb-seeking .sb-drag-icon  { opacity: 1; }

/* ── Buffering spinner ──────────────────────────────────── */
/*
 * Morphing-arc loader: two animations run in sync on the SVG
 *   sb-spin  → rotates the whole SVG (arc starts at 12 o'clock)
 *   sb-dash  → stroke-dashoffset breathes short ↔ long (morphing arc)
 * Combined effect: a growing/shrinking arc sweeping continuously.
 * circumference of r=10 ≈ 62.83 — dasharray set to 63.
 */
.sb-loader {
  position: absolute;
  width: 24px;
  height: 24px;
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
  animation: sb-spin 1.2s linear infinite;
}

.sb-loader-arc {
  stroke-dasharray: 63;
  stroke-dashoffset: 57;   /* short arc at rest: ~6 px visible */
  animation: sb-dash 1.2s ease-in-out infinite;
  transform-origin: center;
}

@keyframes sb-spin {
  0%   { transform: rotate(-90deg); }   /* start at 12 o'clock */
  100% { transform: rotate(270deg);  }
}

@keyframes sb-dash {
  0%   { stroke-dashoffset: 57; }       /* ~6 px arc  */
  50%  { stroke-dashoffset: 15; }       /* ~48 px arc */
  100% { stroke-dashoffset: 57; }
}

/* State: buffering → spinner visible, all other icons hidden.
   Overrides sb-seeking so spinner shows even mid-drag. */
#seek-handle.sb-buffering .sb-pause-icon { opacity: 0; }
#seek-handle.sb-buffering .sb-play-icon  { opacity: 0; }
#seek-handle.sb-buffering .sb-drag-icon  { opacity: 0; }
#seek-handle.sb-buffering .sb-loader     { opacity: 1; }

/* ── Timecode ───────────────────────────────────────────── */
/* Attached to the line at ~54% from top.
   Text hugs the right side of the line (left: calc(50% + 3px)).
   Flips to left side near the right edge of the viewport
   (JS adds .sb-tc-flip when left% > 85). MM.SS format.       */
#seek-timecode {
  position: absolute;
  top: 54%;
  left: calc(50% + 3px);   /* just right of the 1px line */
  white-space: nowrap;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.10em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  color: #ffffff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
}

#seek-bar.sb-visible #seek-timecode { opacity: 1; }
#seek-bar.sb-dragging-active #seek-timecode { opacity: 1 !important; transition: none; }

/* Flip timecode to left side when near right edge */
#seek-bar.sb-tc-flip #seek-timecode {
  left: auto;
  right: calc(50% + 3px);
  text-align: right;
}

/* ══════════════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════════════ */
.contact-container {
  padding: calc(var(--nav-h) + 72px) var(--pad-x) 80px;
  max-width: 680px;
}

.contact-heading {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
  line-height: 1.05;
  margin-bottom: 40px;
}

/* Form layout */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.contact-field:first-of-type {
  border-top: 1px solid var(--border);
}

.contact-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.contact-input,
.contact-textarea {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 4px 0;
  width: 100%;
  caret-color: var(--accent);
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: var(--fg-dim);
}

.contact-input:focus,
.contact-textarea:focus {
  outline: none;
  /* Thin accent underline on focus */
  box-shadow: 0 1px 0 0 var(--accent);
}

.contact-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}

/* Date picker field */
.contact-date-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 4px 0;
  width: 100%;
  cursor: pointer;
  caret-color: var(--accent);
}

.contact-date-input::placeholder {
  color: var(--fg-dim);
}

.contact-date-input:focus {
  outline: none;
  box-shadow: 0 1px 0 0 var(--accent);
}

/* Submit button */
.contact-submit {
  margin-top: 40px;
  height: 48px;
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  /* Sharp corners */
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-submit:hover {
  background: rgba(240, 240, 240, 0.75);
}

.contact-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Success message */
.contact-success {
  display: none;
  padding: 24px 0;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-dim);
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.contact-success.visible {
  display: block;
}

/* ── Flatpickr dark theme overrides ──────────────────────── */
.flatpickr-calendar {
  background: #111111 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 0 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
  font-family: inherit !important;
}

.flatpickr-month,
.flatpickr-weekdays,
.flatpickr-days {
  background: #111111 !important;
}

.flatpickr-current-month,
.flatpickr-monthDropdown-months,
.numInput {
  color: #f0f0f0 !important;
  font-family: inherit !important;
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

.flatpickr-weekday {
  color: rgba(240,240,240,0.4) !important;
  font-size: 9px !important;
  letter-spacing: 0.1em !important;
}

.flatpickr-day {
  color: rgba(240,240,240,0.7) !important;
  border-radius: 0 !important;
  font-size: 12px !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
  background: rgba(1, 15, 197, 0.25) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #0a0a0a !important;
}

.flatpickr-day.inRange {
  background: rgba(240, 240, 240, 0.15) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: rgba(240,240,240,0.2) !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  color: rgba(240,240,240,0.5) !important;
  fill: rgba(240,240,240,0.5) !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  color: #ffffff !important;
  fill: #ffffff !important;
}

@media (max-width: 768px) {
  .contact-container {
    padding-top: calc(var(--nav-h) + 32px);
  }
  #seek-bar {
    display: none; /* Seek bar desktop-only */
  }
  /* On mobile keep the wrap alive so credits-hint stays visible.
     Hide only the badge (.bottom-counter is already hidden above). */
  .bottom-counter-wrap {
    min-width: 0;
  }
  .bottom-counter-wrap .selected-badge {
    display: none;
  }
}
