/* ---------- Fonts ---------- */
@font-face { font-family: "Redaction"; src: url("../fonts/Redaction35-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Redaction"; src: url("../fonts/Redaction35-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Redaction"; src: url("../fonts/Redaction35-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0c10;
  --bg-2: #12151c;
  --text: #eef2f8;
  --muted: #8a93a4;
  --line: rgba(238, 242, 248, 0.12);
  --accent: #6fa8ff;
  --display: "Redaction", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.display { font-family: var(--display); font-weight: 400; line-height: 1.02; letter-spacing: -0.01em; margin: 0; }
.display em { font-style: italic; color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(10,12,16,.85); backdrop-filter: blur(12px); border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.nav { display: flex; gap: 36px; font-size: 14px; }
.nav a { color: var(--muted); transition: color .2s; position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--text); }
.menu-btn { display: none; width: 40px; height: 40px; position: relative; }
.menu-btn span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease); }
.menu-btn span:first-child { top: 16px; } .menu-btn span:last-child { top: 23px; }
.menu-open .menu-btn span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px; font-size: 28px; font-family: var(--display);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .25s var(--ease);
  }
  .nav a { padding: 10px 0; color: var(--text); }
  .nav a[aria-current="page"]::after { display: none; }
  .menu-open .nav { transform: none; opacity: 1; pointer-events: auto; }
  .menu-open .site-header { background: var(--bg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { border-color: var(--text); }
.btn-solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn .play { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); transition: color .2s, gap .2s; }
.link-arrow:hover { color: var(--text); gap: 12px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media .ph { position: absolute; inset: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,16,.35) 0%, rgba(10,12,16,0) 35%, rgba(10,12,16,.55) 70%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(48px, 9vh, 104px); }
.hero h1 { font-size: clamp(48px, 9vw, 148px); max-width: 12ch; margin: 18px 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-scroll { position: absolute; right: var(--gutter); bottom: clamp(48px, 9vh, 104px); z-index: 1; writing-mode: vertical-rl; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* ---------- Placeholder art (used until real thumbnails are added) ---------- */
.ph {
  --h: 210;
  background:
    radial-gradient(120% 90% at 20% 15%, hsl(var(--h) 55% 38% / .9), transparent 60%),
    radial-gradient(90% 80% at 85% 90%, hsl(calc(var(--h) + 18) 50% 20%), transparent 65%),
    linear-gradient(160deg, hsl(var(--h) 30% 14%), hsl(calc(var(--h) + 20) 25% 7%));
}
.ph::after {
  content: ""; position: absolute; inset: 0; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-media .ph { animation: drift 18s ease-in-out infinite alternate; transform-origin: 30% 30%; }
@keyframes drift { to { transform: scale(1.12) translate(-2%, 1%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 160px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(32px, 5vw, 64px); flex-wrap: wrap; }
.section-head h2 { font-size: clamp(36px, 5.5vw, 80px); }

/* ---------- Work grid (home) ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(32px, 4vw, 56px) clamp(16px, 2.4vw, 32px); }
.work-grid .card:first-child { grid-column: 1 / -1; }
.work-grid .card:first-child .card-media { aspect-ratio: 21 / 9; }
@media (max-width: 760px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-grid .card:first-child .card-media { aspect-ratio: 16 / 9; }
}
.card { display: block; }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.card-media > img, .card-media > video, .card-media > .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), opacity .4s; }
.card-media > video { opacity: 0; }
.card:hover .card-media > img, .card:hover .card-media > .ph { transform: scale(calc(var(--z, 1) * 1.04)); }
.card:hover .card-media > video.ready { opacity: 1; }
.card-tag {
  position: absolute; left: 16px; top: 16px; z-index: 2;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; background: rgba(10,12,16,.55); backdrop-filter: blur(6px);
}
.card-view {
  position: absolute; right: 16px; bottom: 16px; z-index: 2; font-size: 13px;
  padding: 8px 14px; border-radius: 999px; background: var(--text); color: var(--bg);
  opacity: 0; transform: translateY(8px); transition: .35s var(--ease);
}
.card:hover .card-view, .card:focus-visible .card-view { opacity: 1; transform: none; }
.card-info { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding-top: 16px; }
.card-title { font-family: var(--display); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; margin: 0; }
.card-meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.card-summary { color: var(--muted); font-size: 15px; margin: 6px 0 0; max-width: 56ch; }

/* ---------- Commercial / Filmmaking doorways (home) ---------- */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 24px); padding-top: clamp(24px, 4vw, 48px); }
.path { position: relative; display: flex; align-items: flex-end; min-height: clamp(360px, 52vw, 640px); overflow: hidden; border-radius: 4px; background: var(--bg-2); isolation: isolate; }
.path > img, .path > .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.1s var(--ease); }
.path::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,12,16,0) 30%, rgba(10,12,16,.85) 100%); transition: background .4s; }
.path:hover > img, .path:hover > .ph { transform: scale(1.05); }
.path-body { padding: clamp(24px, 3vw, 44px); }
.path h2 { font-size: clamp(44px, 6.5vw, 104px); margin: 10px 0 14px; }
.path p { color: #c3cad6; margin: 0 0 22px; max-width: 40ch; }
.path-go { display: inline-block; font-size: 14px; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(238,242,248,.4); transition: .3s var(--ease); }
.path:hover .path-go { background: var(--text); color: var(--bg); border-color: var(--text); }
@media (max-width: 760px) { .paths { grid-template-columns: 1fr; } .path { min-height: 380px; } }
.preview + .preview { border-top: 1px solid var(--line); }
.empty { color: var(--muted); padding: 64px 0; }

/* ---------- Cross-link between sections ---------- */
.cross { display: block; border-top: 1px solid var(--line); }
.cross .display { font-size: clamp(56px, 11vw, 176px); margin: 14px 0 20px; transition: color .3s; }
.cross .display em { font-style: normal; display: inline-block; transition: transform .4s var(--ease); }
.cross:hover .display { color: var(--accent); }
.cross:hover .display em { transform: translateX(16px); }
.cross p { color: var(--muted); max-width: 52ch; margin: 0; font-size: 17px; }

/* ---------- Services teaser ---------- */
.services-band { border-top: 1px solid var(--line); }
.svc-list { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.svc { padding: 32px 28px 40px 0; border-right: 1px solid var(--line); }
.svc + .svc { padding-left: 28px; }
.svc:last-child { border-right: 0; }
.svc .num { font-size: 13px; color: var(--accent); }
.svc h3 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; margin: 14px 0 12px; }
.svc p { color: var(--muted); margin: 0; font-size: 15px; }
@media (max-width: 820px) {
  .svc-list { grid-template-columns: 1fr; }
  .svc, .svc + .svc { padding: 28px 0; border-right: 0; }
  .svc + .svc { border-top: 1px solid var(--line); }
}

/* ---------- CTA ---------- */
.cta { text-align: center; border-top: 1px solid var(--line); }
.cta h2 { font-size: clamp(44px, 8vw, 128px); margin: 18px auto 36px; max-width: 14ch; }
.cta .mail { font-family: var(--display); font-size: clamp(20px, 2.4vw, 32px); border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color .2s, color .2s; }
.cta .mail:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer .socials { display: flex; gap: 24px; }
.site-footer a:hover { color: var(--text); }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: clamp(140px, 20vw, 220px) 0 clamp(40px, 6vw, 72px); }
.page-head h1 { font-size: clamp(56px, 11vw, 176px); margin-top: 16px; }
.page-head .lede { max-width: 52ch; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); margin: 28px 0 0; }

/* ---------- Work page ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.chip { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); transition: .2s; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { opacity: .55; margin-left: 4px; }

.project {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px);
  padding: clamp(48px, 7vw, 96px) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 72px;
}
.project[hidden] { display: none; }
.project.flash .project-media { outline: 1px solid var(--accent); outline-offset: 8px; }
.project-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: var(--bg-2); cursor: pointer; transition: outline-offset .4s; }
.project-media > img, .project-media > .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.project-media:hover > img, .project-media:hover > .ph { transform: scale(calc(var(--z, 1) * 1.03)); }
.play-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 76px; height: 76px; border-radius: 50%; background: rgba(238,242,248,.92);
  display: grid; place-items: center; transition: transform .3s var(--ease);
}
.play-badge::before { content: ""; margin-left: 5px; border-left: 16px solid var(--bg); border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.project-media:hover .play-badge { transform: translate(-50%, -50%) scale(1.08); }
.project-num { font-size: 13px; color: var(--accent); }
.project h2 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.6vw, 56px); line-height: 1.05; margin: 10px 0 24px; }
.project dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; margin: 0 0 28px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.project dt { color: var(--muted); }
.project dd { margin: 0; }
.project-desc p { color: #c3cad6; margin: 0 0 14px; max-width: 60ch; }
@media (max-width: 900px) { .project { grid-template-columns: 1fr; } }

/* ---------- Services page ---------- */
.svc-rows { border-top: 1px solid var(--line); }
.svc-row { display: grid; grid-template-columns: 80px minmax(0, 5fr) minmax(0, 4fr); gap: clamp(16px, 3vw, 48px); padding: clamp(36px, 5vw, 64px) 0; border-bottom: 1px solid var(--line); }
.svc-row .num { color: var(--accent); font-size: 14px; padding-top: 10px; }
.svc-row h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.4vw, 52px); line-height: 1.05; margin: 0 0 16px; }
.svc-row p { color: var(--muted); margin: 0; max-width: 48ch; font-size: 17px; }
.svc-row ul { list-style: none; margin: 0; padding: 0; }
.svc-row li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.svc-row li:first-child { padding-top: 6px; }
@media (max-width: 760px) { .svc-row { grid-template-columns: 1fr; } .svc-row .num { padding: 0; } }

.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); }
.process h3 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 12px 0 10px; }
.process p { color: var(--muted); margin: 0; }
.process .step { padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .process { grid-template-columns: 1fr; } }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); padding-bottom: clamp(80px, 10vw, 140px); }
.contact-info .eyebrow { display: block; }
.contact-info .big-mail { font-family: var(--display); font-size: clamp(22px, 2.2vw, 32px); display: inline-block; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); margin: 12px 0 40px; transition: color .2s; }
.contact-info .big-mail:hover { color: var(--accent); }
.contact-info ul { list-style: none; padding: 0; margin: 12px 0 40px; }
.contact-info li a { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); transition: color .2s; }
.contact-info li a:hover { color: var(--accent); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 0 12px; border-radius: 0; outline: none; transition: border-color .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 10px) 50%, calc(100% - 5px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--bg-2); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--text); }
.form .btn { justify-self: start; }
.form-note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); margin: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form { grid-template-columns: 1fr; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5,7,10,.94); display: grid; place-items: center; padding: var(--gutter); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-frame { width: min(1200px, 100%); aspect-ratio: 16 / 9; background: #000; position: relative; }
.lightbox-frame iframe, .lightbox-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); }
.lightbox-empty strong { display: block; font-family: var(--display); font-weight: 400; font-size: 32px; color: var(--text); margin-bottom: 6px; }
.lightbox-close { position: absolute; top: 20px; right: var(--gutter); font-size: 14px; color: var(--muted); padding: 10px; }
.lightbox-close:hover { color: var(--text); }
.lightbox-title { position: absolute; left: var(--gutter); top: 28px; font-family: var(--display); font-size: 20px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media .ph { animation: none; }
}

/* ---------- Preview grids with fewer projects ---------- */
/* Two projects: the highlight sits larger on the left, the second beside it. */
.work-grid.n2 { grid-template-columns: 3fr 2fr; align-items: start; }
.work-grid.n2 .card:first-child { grid-column: auto; }
.work-grid.n2 .card:first-child .card-media { aspect-ratio: 4 / 3; }
.work-grid.n2 .card:last-child .card-media { aspect-ratio: 4 / 5; }
@media (max-width: 760px) {
  .work-grid.n2 { grid-template-columns: 1fr; }
  .work-grid.n2 .card .card-media { aspect-ratio: 16 / 9; }
}


/* ---------- YouTube hover preview on home cards ---------- */
/* The player sits underneath the still and is always "visible" to YouTube; hovering fades the still away. */
.card-media > .card-yt {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 0; pointer-events: none;
}
.card-media > .card-yt iframe { width: 100%; height: 100%; max-width: none; border: 0; pointer-events: none; }
.card-media > img, .card-media > .ph { z-index: 1; }
.card:hover .card-media.yt-ready > img { opacity: 0; }

/* Optional per-project zoom on stills (thumbZoom in content.js), anchored on thumbPos. */
.card-media > img, .project-media > img { transform: scale(var(--z, 1)); transform-origin: var(--o, 50% 50%); }

/* Client Work: YouTube thumbnails carry text, so show them whole — two equal 16:9 cards. */
#client .work-grid.n2 { grid-template-columns: 1fr 1fr; }
#client .work-grid.n2 .card .card-media { aspect-ratio: 16 / 9; }
@media (max-width: 760px) { #client .work-grid.n2 { grid-template-columns: 1fr; } }

/* Vertical videos (Instagram reels) in the popup */
.lightbox-frame.vertical { width: min(440px, 100%); aspect-ratio: auto; height: min(86vh, 860px); background: #fff; border-radius: 6px; overflow: hidden; }

/* Vertical projects (reels): a tall 4:5 still in a narrower column, text centred beside it. */
.project.is-vertical { grid-template-columns: minmax(220px, 380px) minmax(0, 1fr); align-items: center; }
.project.is-vertical .project-media { aspect-ratio: 4 / 5; }
@media (max-width: 900px) {
  .project.is-vertical { grid-template-columns: 1fr; }
  .project.is-vertical .project-media { max-width: 420px; }
}

/* Label over a home-page panel's cover image (coverLabel in content.js) */
.path-label {
  position: absolute; top: clamp(16px, 2vw, 28px); left: clamp(16px, 2vw, 28px);
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border-radius: 8px;
  background: rgba(10,12,16,.62); backdrop-filter: blur(8px);
  font-family: var(--display); font-size: clamp(17px, 1.5vw, 22px); line-height: 1.15;
}
.path-label small { font-family: var(--sans); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }

/* ---------- Phone fixes ---------- */
@media (max-width: 760px) {
  /* Keep both cards in a two-project grid at 16:9 (the desktop :last-child 4:5 rule was winning). */
  .work-grid.n2 .card:first-child .card-media,
  .work-grid.n2 .card:last-child .card-media { aspect-ratio: 16 / 9; }
  /* The vertical "Scroll" label crowds the buttons on narrow screens. */
  .hero-scroll { display: none; }
  .hero .eyebrow { letter-spacing: .12em; font-size: 11px; }
  /* Bigger tap targets for small text links. */
  .link-arrow { padding: 10px 0; }
  .site-footer .socials { gap: 8px 20px; flex-wrap: wrap; }
  .site-footer .socials a { display: inline-block; padding: 10px 0; }
  .cta .mail { display: inline-block; padding: 8px 0 4px; }
}

/* ---------- Hero without a background video ---------- */
/* Until media/reel-loop.mp4 exists, the hero is a compact intro; it becomes full-screen once the video loads. */
.hero:not(.has-video) { min-height: 0; padding-top: clamp(150px, 18vw, 230px); }
.hero:not(.has-video) .hero-inner { padding-bottom: clamp(24px, 4vw, 48px); }
@media (max-width: 760px) {
  .hero:not(.has-video) { padding-top: 96px; }
  .hero:not(.has-video) .hero-inner { padding-bottom: 8px; }
  .hero:not(.has-video) h1 { margin: 12px 0 24px; }
}

/* Make the vertical "Scroll" cue easier to see on laptop/desktop. */
@media (min-width: 761px) { .hero-scroll { display: flex; align-items: center; gap: 14px; font-size: 12px; letter-spacing: .24em; color: #c3cad6; }
.hero-scroll::after { content: ""; width: 1px; height: 56px; background: linear-gradient(var(--accent), transparent); } }

/* TikTok videos in the popup */
.lightbox-frame.tiktok, .lightbox-frame.vertical.tiktok { background: #000; }

/* Three home-page panels (Filmmaking, Music Videos, Client Work) side by side on wider screens. */
@media (min-width: 761px) {
  .paths { grid-template-columns: repeat(3, 1fr); }
  .path { min-height: clamp(380px, 42vw, 600px); }
  .path h2 { font-size: clamp(34px, 4vw, 64px); }
  .path p { font-size: 15px; }
}
.path-body { text-shadow: 0 1px 14px rgba(10,12,16,.75), 0 0 2px rgba(10,12,16,.6); }

/* Four services on the home page: 4 across on wide screens, 2 across on tablets. */
@media (min-width: 1101px) { .svc-list { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 821px) and (max-width: 1100px) {
  .svc-list { grid-template-columns: repeat(2, 1fr); }
  .svc:nth-child(2n) { border-right: 0; }
  .svc:nth-child(odd) { padding-left: 0; }
  .svc:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.path::before { background: linear-gradient(180deg, rgba(10,12,16,0) 20%, rgba(10,12,16,.55) 55%, rgba(10,12,16,.92) 100%); }

/* ---------- Thumbnail grid (Music Videos) ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); padding: clamp(32px, 4vw, 56px) 0 clamp(48px, 6vw, 88px); }
.tile[hidden] { display: none; }
.tile { scroll-margin-top: 96px; }
.tile-media { border-radius: 4px; }
.tile-media > img { transition: transform .9s var(--ease), filter .4s var(--ease); }
.tile-info {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  padding: clamp(14px, 1.4vw, 22px);
  background: linear-gradient(180deg, rgba(10,12,16,.15) 0%, rgba(10,12,16,.55) 45%, rgba(10,12,16,.92) 100%);
  opacity: 0; transition: opacity .35s var(--ease);
}
.tile-cat { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.tile-title { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.08; margin: 2px 0 0; }
.tile-meta { margin: 0; font-size: 13px; color: #c3cad6; }
.tile-sum { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: #aab2c0; max-width: 46ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-warn { margin: 4px 0 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #ffb4a8; }
.tile-play { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 13px; padding: 7px 14px; border-radius: 999px; background: var(--text); color: var(--bg); }
.tile-play .play { width: 0; height: 0; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.tile-media:hover .tile-info, .tile-media:focus-visible .tile-info { opacity: 1; }
.tile-media:hover > img { filter: brightness(.9); }
.tile.flash .tile-media { outline: 1px solid var(--accent); outline-offset: 6px; }

/* Touch screens can't hover: show the title and artist on every tile instead. */
@media (hover: none) {
  .tile-info { opacity: 1; background: linear-gradient(180deg, rgba(10,12,16,0) 40%, rgba(10,12,16,.88) 100%); }
  .tile-sum, .tile-play { display: none; }
}
@media (max-width: 1000px) { .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tile-grid { grid-template-columns: 1fr; } }

/* Full-screen video player */
.lightbox:fullscreen { padding: 56px 24px 24px; background: #000; }
.lightbox:fullscreen .lightbox-frame { width: min(100%, calc((100vh - 96px) * 16 / 9)); }
.lightbox:fullscreen .lightbox-frame.vertical { width: min(100%, calc((100vh - 96px) * 9 / 16)); height: calc(100vh - 96px); }
/* Smaller tiles: drop the summary line so the title, details and Play button always fit. */
.tile-media { container-type: inline-size; }
@container (max-width: 380px) {
  .tile-sum { display: none; }
  .tile-play { margin-top: 6px; padding: 6px 12px; }
  .tile-title { font-size: 22px; }
}
.tile-info { text-shadow: 0 1px 10px rgba(10,12,16,.7); }
@media (hover: none) { .tile-info { background: linear-gradient(180deg, rgba(10,12,16,0) 25%, rgba(10,12,16,.6) 55%, rgba(10,12,16,.94) 100%); } }
/* Custom hover clips (preview: in content.js) sit above the still so they can fade in over it. */
.card-media > video { z-index: 2; }
/* Self-hosted videos in the popup: fit the whole frame on black. */
.lightbox-frame video { object-fit: contain; background: #000; }
