/* ============================================================
   Supergood Video Portfolio — Base Styles
   ============================================================ */

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

:root {
  --bg:         #0d0d0d;
  --surface:    #151515;
  --surface-2:  #1e1e1e;
  --border:     #2a2a2a;
  --text:       #f0f0f0;
  --text-muted: #888888;
  --accent:     #e8c76a;   /* gold */
  --error:      #e05555;
  --success:    #4caf7d;
  --radius:     10px;
  --font:       'Inter', Arial, sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Auth pages
   ============================================================ */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  background: var(--bg);
}

.auth-shell {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 36px;
}

.auth-logo img {
  height: 36px;
  width: auto;
}

.auth-heading {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.auth-subheading {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

.auth-subheading strong {
  color: var(--text);
}

.auth-error {
  background: rgba(224, 85, 85, 0.12);
  border: 1px solid rgba(224, 85, 85, 0.4);
  color: #f08080;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  text-align: center;
}

.auth-success {
  background: rgba(76, 175, 125, 0.12);
  border: 1px solid rgba(76, 175, 125, 0.4);
  color: #7dd9a8;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.auth-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s;
}

.auth-input::placeholder { color: #444; }

.auth-input:focus {
  border-color: #444;
  box-shadow: 0 0 0 3px rgba(232, 199, 106, 0.08);
}

.auth-btn {
  width: 100%;
  background: var(--accent);
  color: #0d0d0d;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.15s;
}

.auth-btn:hover { opacity: 0.88; }
.auth-btn:active { opacity: 0.75; }

/* OTP digit inputs */
.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 4px 0 4px;
}

.otp-digit {
  width: 48px;
  height: 60px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  font-family: monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  caret-color: transparent;
}

.otp-digit:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 199, 106, 0.15);
}

/* Resend & back links */
.auth-resend {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.resend-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resend-btn:disabled {
  cursor: default;
  opacity: 0.5;
  text-decoration: none;
}

.resend-btn:not(:disabled):hover { color: var(--text); }

.auth-back {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.auth-back:hover { color: var(--text); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 480px) {
  .auth-card { padding: 36px 24px; }
  .otp-digit { width: 40px; height: 52px; font-size: 22px; }
}

/* ============================================================
   Site Navigation
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  gap: 16px;
}

.nav-logo img { display: block; }

.nav-types {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.type-chip {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 4px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.type-chip:hover { color: var(--text); border-color: #444; }

.type-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d0d0d;
  font-weight: 600;
}

.nav-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.nav-email {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

.logout-form { display: inline; }

.logout-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.logout-btn:hover { color: var(--text); border-color: #555; }

/* ============================================================
   Portfolio Main
   ============================================================ */

.portfolio-page { background: var(--bg); }

.portfolio-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 24px 60px; /* 80px = nav height + gap */
}

.portfolio-header {
  padding: 40px 0 32px;
  text-align: center;
}

.portfolio-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.portfolio-subtitle {
  font-size: 16px;
  color: var(--text-muted);
}

/* ── Secondary filters ─────────────────────────────────────── */

.secondary-filters {
  margin-bottom: 16px;
}

.secondary-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.secondary-toggle:hover { color: var(--text); border-color: #444; }

.secondary-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.filter-count-badge {
  background: var(--accent);
  color: #0d0d0d;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.secondary-panel {
  margin-top: 12px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.filter-group { display: flex; flex-direction: column; gap: 8px; }

.filter-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.filter-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 12px;
  padding: 3px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.filter-chip:hover { color: var(--text); border-color: #444; }

.filter-chip.active {
  background: rgba(232,199,106,0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Active filter chips ───────────────────────────────────── */

.active-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.active-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.active-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,199,106,0.12);
  border: 1px solid rgba(232,199,106,0.4);
  border-radius: 16px;
  color: var(--accent);
  font-size: 12px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.active-chip:hover { background: rgba(232,199,106,0.2); }

.clear-all-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.clear-all-btn:hover { color: var(--text); }

/* ── Results bar ───────────────────────────────────────────── */

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.result-count {
  font-size: 13px;
  color: var(--text-muted);
}

.result-count strong { color: var(--text); }

.sort-label {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  padding: 4px 10px;
  cursor: pointer;
  outline: none;
}

/* ── Projects grid ─────────────────────────────────────────── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Project card ──────────────────────────────────────────── */

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: #3a3a3a;
  transform: translateY(-2px);
}

.project-card.is-featured {
  border-color: rgba(232, 199, 106, 0.4);
}

.card-media-link {
  display: block;
  text-decoration: none;
  position: relative;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.card-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.card-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s;
}

.project-card:hover .card-preview { opacity: 1; }
.project-card:hover .card-poster  { opacity: 0; }

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0,0,0,0);
  transition: background 0.2s;
  padding: 16px;
}

.project-card:hover .card-overlay { background: rgba(0,0,0,0.35); }

.play-icon {
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.project-card:hover .play-icon { opacity: 1; }

.card-overlay-text {
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}

.project-card:hover .card-overlay-text {
  opacity: 1;
  transform: translateY(0);
}

.overlay-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.overlay-client {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: #0d0d0d;
  font-size: 11px;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  font-weight: 700;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  flex-wrap: wrap;
}

.type-badge {
  font-size: 11px;
  font-weight: 600;
  background: rgba(232,199,106,0.12);
  color: var(--accent);
  border: 1px solid rgba(232,199,106,0.25);
  border-radius: 12px;
  padding: 2px 10px;
  white-space: nowrap;
}

.card-title-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  flex: 1;
}
.card-title-link:hover { color: var(--accent); }

.card-year {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

/* ── Empty state ───────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-title {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.empty-reset-btn { width: auto; padding: 12px 32px; }

/* ── Nav responsive ────────────────────────────────────────── */

@media (max-width: 900px) {
  .nav-inner {
    grid-template-columns: auto 1fr auto;
  }
  .nav-types { gap: 4px; }
  .type-chip { font-size: 12px; padding: 3px 10px; }
}

@media (max-width: 640px) {
  .nav-inner {
    grid-template-columns: 1fr auto;
    height: auto;
    padding: 10px 16px;
    gap: 10px;
  }
  .nav-types {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
    padding-bottom: 4px;
  }
  .portfolio-main { padding-top: 110px; }
  .nav-email { display: none; }
}

/* ============================================================
   Project Page
   ============================================================ */

.project-page { background: var(--bg); }

.breadcrumb-bar {
  position: fixed;
  top: 60px;
  left: 0; right: 0;
  z-index: 90;
  background: rgba(13,13,13,0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
}

.breadcrumb-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb-link:hover { color: var(--text); }

.project-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 112px 24px 80px; /* nav 60 + breadcrumb ~32 + gap */
}

/* ── Hero ──────────────────────────────────────────────────── */

.project-hero {
  background: var(--bg);
  margin-bottom: 60px;
}

.hero-inner { max-width: 960px; margin: 0 auto; }

.hero-title-block { margin-bottom: 24px; }

.hero-meta-line {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

/* ── Player ───────────────────────────────────────────────── */

.hero-player-wrap { position: relative; }

.video-ratio-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-video,
.video-ratio-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.no-video-placeholder {
  aspect-ratio: 16/9;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Auto-advance overlay ─────────────────────────────────── */

.autoadvance-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
}

.autoadvance-label {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.autoadvance-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 12px 20px;
  text-decoration: none;
  max-width: 380px;
  width: 90%;
  transition: background 0.15s;
}

.autoadvance-card:hover { background: rgba(255,255,255,0.14); }

.autoadvance-card img {
  width: 80px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.autoadvance-info { display: flex; flex-direction: column; gap: 4px; }

.autoadvance-client { font-size: 11px; color: rgba(255,255,255,0.5); }
.autoadvance-title  { font-size: 14px; font-weight: 600; color: #fff; }

.autoadvance-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.autoadvance-dismiss:hover { color: #fff; }

/* ── Meta strip ───────────────────────────────────────────── */

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.meta-item { display: flex; flex-direction: column; gap: 3px; }

.meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.meta-value { font-size: 14px; color: var(--text); }

.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  margin-left: auto;
  transition: color 0.15s, border-color 0.15s;
}
.share-btn:hover { color: var(--text); border-color: #555; }

/* ── Project body ─────────────────────────────────────────── */

.project-body {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ── Case study ───────────────────────────────────────────── */

.case-study {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
}

.case-heading {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.case-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── Section heading ──────────────────────────────────────── */

.section-heading {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ── Deliverables ─────────────────────────────────────────── */

.deliverables-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.deliverable-thumb {
  flex-shrink: 0;
  width: 160px;
  background: none;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s;
  text-align: left;
}

.deliverable-thumb:hover  { border-color: #555; }
.deliverable-thumb.active { border-color: var(--accent); }

.deliverable-thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.thumb-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Collapsible ─────────────────────────────────────────── */

.collapsible-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.collapsible-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.collapsible-toggle:hover { background: var(--surface-2); }

.collapsible-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.collapsible-body { padding: 20px; background: var(--bg); }

.credits-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 20px;
}

.credits-list dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 600;
  padding-top: 1px;
}

.credits-list dd {
  font-size: 14px;
  color: var(--text);
}

/* ── Related work ─────────────────────────────────────────── */

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
  display: block;
}

.related-card:hover { border-color: #3a3a3a; transform: translateY(-2px); }

.related-media { aspect-ratio: 16/9; overflow: hidden; }

.related-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.related-card:hover .related-media img { transform: scale(1.04); }

.related-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  flex-wrap: wrap;
}

.related-client {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  flex: 1;
}

/* ── Toast ────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 20px;
  z-index: 200;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Mobile sticky bar ────────────────────────────────────── */

.mobile-sticky {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(13,13,13,0.95);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  gap: 10px;
  z-index: 100;
  backdrop-filter: blur(8px);
  transition: transform 0.2s;
}

.mobile-sticky.hidden { transform: translateY(100%); }

.mobile-watch-btn,
.mobile-next-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.mobile-watch-btn {
  background: var(--accent);
  color: #0d0d0d;
}

.mobile-next-btn {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .mobile-sticky  { display: flex; }
  .project-main   { padding-bottom: 80px; }
  .case-study     { grid-template-columns: 1fr; gap: 32px; }
  .related-grid   { grid-template-columns: 1fr; }
  .credits-list   { grid-template-columns: 100px 1fr; }
  .meta-strip     { gap: 16px; }
  .share-btn      { margin-left: 0; }
}

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

/* ============================================================
   Video.js skin — dark theme override
   ============================================================ */

.vjs-sg-theme.video-js {
  font-family: var(--font);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Big play button */
.vjs-sg-theme .vjs-big-play-button {
  background: rgba(0,0,0,0.55);
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  line-height: 64px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  transition: background 0.15s, border-color 0.15s;
}

.vjs-sg-theme:hover .vjs-big-play-button,
.vjs-sg-theme .vjs-big-play-button:focus {
  background: rgba(232,199,106,0.8);
  border-color: var(--accent);
}

.vjs-sg-theme .vjs-big-play-button .vjs-icon-placeholder::before {
  font-size: 28px;
  line-height: 64px;
}

/* Control bar */
.vjs-sg-theme .vjs-control-bar {
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  height: 44px;
  padding: 0 8px;
}

/* Progress bar */
.vjs-sg-theme .vjs-play-progress,
.vjs-sg-theme .vjs-volume-level {
  background: var(--accent);
}

.vjs-sg-theme .vjs-slider {
  background: rgba(255,255,255,0.2);
}

.vjs-sg-theme .vjs-load-progress {
  background: rgba(255,255,255,0.15);
}

/* Time display */
.vjs-sg-theme .vjs-current-time,
.vjs-sg-theme .vjs-duration,
.vjs-sg-theme .vjs-time-divider {
  font-size: 12px;
  line-height: 44px;
  display: block;
}

/* Playback rate menu */
.vjs-sg-theme .vjs-menu-item.vjs-selected,
.vjs-sg-theme .vjs-menu-item:hover {
  background: var(--accent);
  color: #0d0d0d;
}

/* Remove outline on focus (we use custom focus styles) */
.vjs-sg-theme .vjs-control:focus { outline: none; }

/* ============================================================
   Review link watermark
   ============================================================ */

.video-watermark {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  color: rgba(255, 255, 255, 0.28);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  white-space: nowrap;
  transition: left 1s ease, top 1s ease;
  user-select: none;
  -webkit-user-select: none;
}

/* Hide breadcrumb & related work on review-mode pages */
.review-mode .related-work { display: none; }

/* ============================================================
   Hover iframe preview (Vimeo / YouTube)
   ============================================================ */

.card-preview-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
   Project modal
   ============================================================ */

.project-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.project-modal-overlay[hidden] { display: none; }

.project-modal-inner {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { background: rgba(255,255,255,0.15); }

.modal-video-wrap {
  width: 100%;
  background: #000;
}

.modal-video-wrap iframe,
.modal-video-wrap video {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
  border: 0;
}

.modal-loading {
  padding: 4rem;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

.modal-meta {
  padding: 1.5rem 2rem 2rem;
  color: #ccc;
}

.modal-meta h1 { font-size: 1.4rem; margin-bottom: 0.5rem; color: #fff; }

.modal-meta .project-meta-row,
.modal-meta .meta-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.modal-meta .meta-label { color: #666; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 0.2rem; }
.modal-meta .meta-value { color: #ccc; }

/* ── Case Study Editorial Layout ──────────────────────────── */

.cs-narrative {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.cs-section {
  margin-bottom: 2.5rem;
}

.cs-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e5342a;
  margin: 0 0 0.75rem;
}

.cs-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #ccc;
  margin: 0 0 1.5rem;
}

.cs-body p { margin: 0 0 1em; }
.cs-body p:last-child { margin-bottom: 0; }

/* Inline photo rows */
.cs-photo-row {
  margin: 1.5rem 0 0;
  display: grid;
  gap: 12px;
}

.cs-photos-1 { grid-template-columns: 1fr; max-width: 900px; margin-left: auto; margin-right: auto; }
.cs-photos-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
.cs-photos-3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.cs-photos-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

.cs-photo-figure {
  margin: 0;
}

.cs-photo-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  object-fit: cover;
}

.cs-photo-caption {
  display: block;
  font-size: 0.78rem;
  font-style: italic;
  color: #666;
  margin-top: 6px;
  line-height: 1.4;
}

/* Bottom gallery strip */
.cs-gallery-section {
  padding: 0 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.cs-gallery-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.cs-gallery-strip::-webkit-scrollbar { display: none; }

.cs-gallery-figure {
  flex: 0 0 auto;
  margin: 0;
  width: 280px;
}

.cs-gallery-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Lightbox */
.cs-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-lightbox[hidden] { display: none; }

.cs-lb-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 2rem;
  box-sizing: border-box;
}

.cs-lb-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.cs-lb-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.cs-lb-close:hover { opacity: 1; }

.cs-lb-prev,
.cs-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  line-height: 1;
  border-radius: 4px;
  transition: background 0.15s;
}
.cs-lb-prev:hover,
.cs-lb-next:hover { background: rgba(255,255,255,0.2); }
.cs-lb-prev { left: 1rem; }
.cs-lb-next { right: 1rem; }

/* Word count badge (admin) */
.wc-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}
.wc-badge.wc-good { color: #4caf50; }
.wc-badge.wc-over { color: #e5342a; }

/* Photo admin cards */
.photo-card {
  display: flex;
  gap: 12px;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 12px;
  width: 360px;
}

.photo-thumb {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #111;
}

.photo-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-meta .admin-input,
.photo-meta select {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.82rem;
  padding: 4px 6px;
}

.photo-pos-select {
  background: #111;
  color: #ccc;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 0.82rem;
}

/* Mobile: editorial layout */
@media (max-width: 600px) {
  .cs-narrative { padding: 2rem 1rem; }
  .cs-photos-2,
  .cs-photos-3,
  .cs-photos-grid { grid-template-columns: 1fr; gap: 8px; }
  .cs-gallery-figure { width: 220px; }
  .cs-gallery-img { height: 140px; }
  .cs-lb-prev { left: 0.25rem; }
  .cs-lb-next { right: 0.25rem; }
}

/* Modal meta overrides */
.modal-meta .modal-meta-line { font-size: 0.8rem; color: #666; margin: 0 0 0.3rem; text-transform: uppercase; letter-spacing: 0.06em; }
.modal-meta .modal-title { font-size: 1.3rem; color: #fff; margin: 0 0 1rem; font-weight: 600; }
