/* ============================================================
   Mahda Motion — Portfolio
   Tokens mirror the design handoff (Gallery.dc.html) exactly.
   ============================================================ */
:root {
  --bg:        #F6F4EF;
  --ink:       #1A1815;
  --panel:     #E9E5DC;
  --panel-2:   #EDE9E0;
  --accent:    oklch(0.62 0.13 50);   /* warm orange  */
  --accent-2:  oklch(0.62 0.13 250);  /* blue         */
  --accent-3:  oklch(0.62 0.13 130);  /* green        */
  --accent-red:oklch(0.55 0.20 25);
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #1a1815; color: #fff; }
img { display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
.mono { font-family: var(--mono); }

/* Cap the site width on large screens; paper background fills the sides */
main, .detail { max-width: 1920px; margin-inline: auto; }


/* Media that fills its (positioned, overflow-hidden) parent frame */
.anim-fill { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.anim-fill.cover { object-fit: cover; }
.anim-white { background: #fff; box-sizing: border-box; }

/* ----------------------------------------------------------------
   Keyframes (verbatim from the handoff)
---------------------------------------------------------------- */
@keyframes floatA   { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(48px,-34px) scale(1.18)} }
@keyframes floatB   { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-56px,42px) scale(1.12)} }
@keyframes scanline { 0%{top:-12%} 100%{top:112%} }
@keyframes blink    { 0%,48%{opacity:1} 50%,100%{opacity:.2} }
@keyframes marquee  { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
@keyframes morphR   { 0%,100%{border-radius:48% 52% 55% 45%/52% 48% 52% 48%} 33%{border-radius:62% 38% 50% 50%/55% 45% 55% 45%} 66%{border-radius:38% 62% 45% 55%/50% 62% 38% 50%} }
@keyframes lottieDot{ 0%,100%{transform:scale(.45);opacity:.3} 50%{transform:scale(1.25);opacity:1} }
@keyframes spinSlow { from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes riveBob  { 0%,100%{transform:translateY(0) rotate(-4deg)} 50%{transform:translateY(-12px) rotate(4deg)} }

/* ----------------------------------------------------------------
   Brand pill (centered → docked top-left on scroll)
---------------------------------------------------------------- */
#top-sentinel {
  position: absolute; top: 0; left: 0;
  width: 1px; height: 80px; pointer-events: none;
}
.brand-pill {
  position: fixed; left: 50%; top: clamp(16px, 3vw, 26px);
  transform: translateX(-50%) scale(2);
  transform-origin: top center;
  transition: left .5s cubic-bezier(.4,0,.2,1), transform .5s cubic-bezier(.4,0,.2,1);
  z-index: 40;
  display: flex; align-items: center;
  text-decoration: none; color: var(--ink);
  background: rgba(246,244,239,.55);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 8px 24px -8px rgba(40,30,15,.25), inset 0 1px 0 rgba(255,255,255,.8);
  padding: 9px 16px; border-radius: 999px;
}
.brand-pill.is-docked {
  /* Sit at the capped frame's left edge once the viewport exceeds 1920px */
  left: max(clamp(16px, 4vw, 32px), calc(50% - 960px + clamp(16px, 4vw, 32px)));
  transform: translateX(0) scale(1);
}
.brand-wordmark { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand-logo { height: 22px; width: auto; max-width: 160px; object-fit: contain; }

/* ----------------------------------------------------------------
   Dock
---------------------------------------------------------------- */
.dock {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) scale(1.25);
  transform-origin: bottom center;
  transition: transform .4s cubic-bezier(.2,.9,.3,1.2);
  z-index: 40;
  display: flex; align-items: center; gap: clamp(5px,.8vw,8px);
  padding: 8px; border-radius: 999px;
  background: rgba(246,244,239,.5);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 16px 48px -10px rgba(40,30,15,.38),
              inset 0 1px 0 rgba(255,255,255,.85),
              inset 0 -1px 0 rgba(40,30,15,.06);
}
/* Docks sit at 125% at the top / when scrolling up, shrink to original
   size when scrolling down. Applies at all widths (main + detail dock). */
.dock.is-compact { transform: translateX(-50%) scale(1); }

.dock-item {
  display: flex; align-items: center; justify-content: center;
  height: clamp(38px,4.4vw,44px);
  padding: 0 clamp(14px,1.8vw,20px);
  border-radius: 999px; text-decoration: none;
  font-size: clamp(13px,1.4vw,15px); font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; color: var(--ink);
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 2px 8px rgba(40,30,15,.1), inset 0 1px 0 rgba(255,255,255,.8);
  transition: transform .26s cubic-bezier(.2,.9,.3,1.2), box-shadow .26s;
  transform-origin: center bottom;
}
.dock-item:hover {
  transform: translateY(-6px) scale(1.2);
  box-shadow: 0 12px 24px -8px rgba(40,30,15,.28);
}
.dock-item--home {
  background: var(--ink);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 4px 12px rgba(40,30,15,.28), inset 0 1px 0 rgba(255,255,255,.12);
}
.dock-item--home:hover {
  transform: translateY(-6px) scale(1.2);
  box-shadow: 0 14px 26px -10px rgba(40,30,15,.4);
}
.dock-home-label { color: var(--bg); }
.dock-logo { height: 18px; width: auto; max-width: 120px; object-fit: contain; filter: brightness(0) invert(1); }
.dock-item--cta {
  color: #fff; padding: 0 clamp(16px,2vw,22px);
  background: var(--accent);
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 4px 14px -2px oklch(0.62 0.13 50 / .5), inset 0 1px 0 rgba(255,255,255,.4);
}
.dock-item--cta:hover {
  transform: translateY(-6px) scale(1.2);
  box-shadow: 0 14px 26px -8px oklch(0.62 0.13 50 / .6);
}
.dock-divider { width: 1px; height: 22px; background: rgba(40,30,15,.14); margin: 0 3px; }

/* Social icon buttons (icon-only at all sizes) */
.dock-social {
  padding: 0; width: clamp(38px,4.4vw,44px);
  color: #fff; border: 1px solid rgba(255,255,255,.3);
}
.dock-social svg { width: 19px; height: 19px; flex: 0 0 auto; display: block; }
/* Compact home circle — shown only on small screens (where the Home pill
   is hidden); dark like the Home pill, white house icon. */
.dock-show-sm { display: none !important; }
@media (max-width: 840px) { .dock-show-sm { display: flex !important; } }
.dock-home-mini {
  background: var(--ink); border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 4px 12px rgba(40,30,15,.28), inset 0 1px 0 rgba(255,255,255,.12);
}
.dock-home-mini img { width: 22px; height: 22px; display: block; }
.dock-social--wa {
  background: #25D366;
  box-shadow: 0 4px 14px -2px rgba(37,211,102,.5), inset 0 1px 0 rgba(255,255,255,.4);
}
.dock-social--wa:hover { box-shadow: 0 14px 26px -8px rgba(37,211,102,.6); }
.dock-social--tg {
  background: #29A9EB;
  box-shadow: 0 4px 14px -2px rgba(41,169,235,.5), inset 0 1px 0 rgba(255,255,255,.4);
}
.dock-social--tg:hover { box-shadow: 0 14px 26px -8px rgba(41,169,235,.6); }

/* Touch devices: :hover sticks after a tap, leaving a pill popped up.
   Neutralize the hover-lift and use :active instead, so the pill pops
   while pressed and springs back to its place on release. */
@media (hover: none) {
  .dock-item:hover,
  .dock-item--home:hover,
  .dock-item--cta:hover { transform: none; }
  .dock-item:active,
  .dock-item--home:active,
  .dock-item--cta:active { transform: translateY(-6px) scale(1.2); }
}

/* ----------------------------------------------------------------
   Hero showreel
---------------------------------------------------------------- */
.hero { padding: 100px clamp(24px,5vw,72px) 8px; }
.hero-frame {
  position: relative; width: 100%; aspect-ratio: 16/9;
  border-radius: 4px; overflow: hidden; background: var(--panel);
}
.hero-frame video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; cursor: pointer;
}
/* Ambient showreel: fill the 16:9 hero frame itself (not the viewport),
   so the video follows the capped container width. A slight over-scale
   center-crops any thin YouTube chrome (the frame clips the overflow). */
.reel-yt-frame {
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%) scale(1.04);
  border: 0; pointer-events: none;
}
.reel-watch {
  position: absolute; right: 24px; bottom: 22px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  color: #fff; text-decoration: none;
  background: rgba(0,0,0,.55); padding: 7px 13px; border-radius: 3px;
  backdrop-filter: blur(4px); z-index: 2;
}
.reel-watch:hover { background: rgba(0,0,0,.72); }
.reel-fs {
  position: absolute; right: 24px; top: 22px;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  color: #fff; background: rgba(0,0,0,.55); border: none; border-radius: 3px;
  cursor: pointer; backdrop-filter: blur(4px); z-index: 2;
}
.reel-fs svg { width: 17px; height: 17px; }
.reel-fs:hover { background: rgba(0,0,0,.72); }
/* Poster shown instantly (LCP); fades out once the ambient embed loads */
.reel-poster { z-index: 1; transition: opacity .6s ease; }
.reel-poster.is-hidden { opacity: 0; pointer-events: none; }
/* Showreel frame in fullscreen: fill the screen, drop the 16:9 cap */
/* Showreel iframe in fullscreen: fill the screen, drop the cover-crop transform */
.hero-frame:fullscreen, .hero-frame:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; background: #000; }
.reel-yt-frame:fullscreen, .reel-yt-frame:-webkit-full-screen {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  transform: none; pointer-events: auto; background: #000;
}
.reel-placeholder { position: absolute; inset: 0; }
.reel-hatch { position: absolute; inset: 0; background: repeating-linear-gradient(135deg,#E4DFD4 0 2px,transparent 2px 13px); }
.reel-blob { position: absolute; border-radius: 50%; }
.reel-blob--a { width: 46%; height: 70%; left: 8%; top: 10%; background: var(--accent);   filter: blur(60px); opacity: .5;  animation: floatA 11s ease-in-out infinite; }
.reel-blob--b { width: 40%; height: 60%; right: 6%; bottom: 6%; background: var(--accent-2); filter: blur(70px); opacity: .32; animation: floatB 14s ease-in-out infinite; }
.reel-scanline { position: absolute; left: 0; right: 0; height: 2px; background: rgba(0,0,0,.12); animation: scanline 6s linear infinite; }
.reel-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px;
}
.reel-play {
  width: 96px; height: 96px; border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s, background .3s;
}
.reel-center:hover .reel-play { transform: scale(1.08); background: rgba(255,255,255,.4); }
.reel-triangle {
  width: 0; height: 0; margin-left: 5px;
  border-left: 20px solid var(--ink);
  border-top: 13px solid transparent; border-bottom: 13px solid transparent;
}
.reel-caption { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.reel-status {
  position: absolute; left: 24px; bottom: 22px;
  font-family: var(--mono); font-size: 12px;
  display: flex; align-items: center; gap: 10px;
}
.reel-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-red); animation: blink 1.4s steps(1) infinite; }

/* ----------------------------------------------------------------
   Statement
---------------------------------------------------------------- */
.statement { padding: clamp(56px,9vw,120px) clamp(24px,5vw,72px) clamp(40px,6vw,80px); max-width: 1200px; }
.statement-title { font-size: clamp(38px,6.2vw,92px); line-height: 1.02; letter-spacing: -.03em; font-weight: 700; margin: 0; text-wrap: balance; }
.statement-body { font-size: clamp(16px,1.5vw,21px); line-height: 1.55; max-width: 560px; margin: 34px 0 0; opacity: .72; }

/* ----------------------------------------------------------------
   Section heads + Work grid
---------------------------------------------------------------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,.15); padding-top: 20px; margin-bottom: 48px;
}
.section-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.section-count { font-size: 12px; opacity: .5; }
.work { padding: clamp(40px,5vw,72px) clamp(24px,5vw,72px) clamp(60px,8vw,110px); }
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,300px),1fr)); gap: clamp(28px,4vw,64px); }
.work-card { display: block; text-decoration: none; color: inherit; }

.card-media {
  position: relative; aspect-ratio: 4/3; border-radius: 3px; overflow: hidden;
  background: var(--panel); cursor: pointer; transition: transform .4s ease;
}
.card-media:hover { transform: translateY(-6px); }
.card-media img, .card-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-hatch { position: absolute; inset: 0; background: repeating-linear-gradient(135deg,#E3DED3 0 2px,transparent 2px 14px); }
.card-type {
  position: absolute; left: 14px; top: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  background: rgba(246,244,239,.85); padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(3px);
}
.card-view {
  position: absolute; right: 12px; bottom: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  background: rgba(26,24,21,.85); color: #fff; padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(3px);
}
.card-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 16px; }
.card-title { font-size: clamp(18px,1.7vw,24px); font-weight: 500; letter-spacing: -.01em; }
.card-year  { font-family: var(--mono); font-size: 12px; opacity: .5; }

/* ----------------------------------------------------------------
   About (dark) + Rive
---------------------------------------------------------------- */
.about { padding: clamp(60px,8vw,110px) clamp(24px,5vw,72px); background: var(--ink); color: var(--bg); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,300px),1fr)); gap: clamp(40px,6vw,90px); align-items: center; }
.about-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .5; }
.about-lead { font-size: clamp(24px,3.4vw,46px); line-height: 1.2; letter-spacing: -.02em; font-weight: 500; margin: 22px 0 0; text-wrap: balance; }
.about-sub  { font-size: 16px; line-height: 1.6; max-width: 520px; margin: 28px 0 0; opacity: .65; }
.about-rig  { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.rive-stage { position: relative; width: 260px; height: 260px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.rive-stage canvas { width: 260px; height: 260px; }
.rive-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.rive-morph { position: absolute; width: 150px; height: 150px; background: var(--accent); animation: morphR 7s ease-in-out infinite, spinSlow 22s linear infinite; }
.rive-chip  { position: absolute; width: 78px; height: 78px; background: var(--bg); border-radius: 14px; animation: riveBob 4.5s ease-in-out infinite; }
.rive-note  { font-size: 13px; line-height: 1.55; opacity: .55; max-width: 280px; text-align: center; margin: 6px 0 0; }

/* ----------------------------------------------------------------
   Services
---------------------------------------------------------------- */
.services { padding: clamp(56px,7vw,100px) clamp(24px,5vw,72px); }
.services-head { border-top: 1px solid rgba(0,0,0,.15); padding-top: 20px; margin-bottom: 44px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,190px),1fr)); gap: clamp(24px,3vw,48px); }
.service { border-top: 1px solid rgba(0,0,0,.5); padding-top: 18px; }
.service-no    { font-family: var(--mono); font-size: 12px; opacity: .5; }
.service-title { font-size: clamp(18px,1.5vw,22px); font-weight: 500; margin: 12px 0 10px; letter-spacing: -.01em; }
.service-desc  { font-size: 14px; line-height: 1.55; opacity: .62; margin: 0; }

/* ----------------------------------------------------------------
   Lottie band
---------------------------------------------------------------- */
.lottie-band { padding: clamp(56px,7vw,100px) clamp(24px,5vw,72px); background: var(--panel-2); }
.lottie-inner { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.lottie-copy { text-align: center; max-width: 560px; }
.lottie-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .5; }
.lottie-title { font-size: clamp(24px,3vw,38px); line-height: 1.12; letter-spacing: -.02em; font-weight: 600; margin: 16px 0 0; text-wrap: balance; }
.lottie-body { font-size: 15px; line-height: 1.6; opacity: .65; margin: 16px auto 0; max-width: 480px; }
.lottie-stage { display: flex; align-items: center; justify-content: center; min-height: 120px; }
.lottie-stage > div[id], .lottie-render { height: 240px; }
.lottie-placeholder { display: flex; align-items: center; gap: 18px; }
.lottie-dot { width: 26px; height: 26px; border-radius: 50%; }
.lottie-dot--1 { background: var(--accent);   animation: lottieDot 1.6s ease-in-out infinite; }
.lottie-dot--2 { background: var(--accent-3); animation: lottieDot 1.6s ease-in-out infinite .26s; }
.lottie-dot--3 { background: var(--accent-2); animation: lottieDot 1.6s ease-in-out infinite .52s; }
.lottie-square { width: 44px; height: 44px; margin-left: 8px; background: var(--ink); animation: morphR 5s ease-in-out infinite; }

/* ----------------------------------------------------------------
   Clients marquee
---------------------------------------------------------------- */
.clients { padding: clamp(40px,5vw,64px) 0; border-top: 1px solid rgba(0,0,0,.12); border-bottom: 1px solid rgba(0,0,0,.12); overflow: hidden; }
.clients-eyebrow { text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .45; margin-bottom: clamp(28px,4vw,44px); }
.marquee { display: flex; width: max-content; }
.marquee-track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: clamp(48px,6vw,96px); padding-right: clamp(48px,6vw,96px); }
.client-logo { height: clamp(24px,3vw,40px); width: auto; object-fit: contain; filter: brightness(0); opacity: .5; }

/* ----------------------------------------------------------------
   Reviews
---------------------------------------------------------------- */
.reviews-section { padding: clamp(40px,5vw,72px) clamp(24px,5vw,72px) clamp(56px,7vw,90px); }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,300px),1fr)); gap: clamp(20px,3vw,32px); }
.review {
  display: flex; flex-direction: column; gap: 14px;
  border: 1px solid rgba(0,0,0,.12); border-radius: 6px;
  padding: clamp(20px,2.4vw,28px); background: rgba(255,255,255,.4);
}
.review-rating { display: inline-flex; align-items: center; gap: 8px; }
.review-stars { position: relative; display: inline-block; font-size: 15px; line-height: 1; letter-spacing: 1px; color: rgba(0,0,0,.18); }
.review-stars::before { content: "★★★★★"; }
.review-stars::after { content: "★★★★★"; position: absolute; inset: 0; width: var(--pct, 100%); overflow: hidden; white-space: nowrap; color: var(--accent); }
.review-score { font-weight: 700; font-size: 13px; }
.review-text { font-size: 15px; line-height: 1.6; margin: 0; opacity: .82; text-wrap: pretty; }
.review-author { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.review-namerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-name { font-weight: 600; font-size: 14px; letter-spacing: -.01em; }
.review-repeat { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent); padding: 2px 7px; border-radius: 999px; }
.review-meta { font-size: 11px; opacity: .5; letter-spacing: .04em; }

/* ----------------------------------------------------------------
   Contact
---------------------------------------------------------------- */
.contact { padding: clamp(70px,10vw,150px) clamp(24px,5vw,72px) clamp(130px,14vw,170px); }
.contact-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .5; }
.contact-title { font-size: clamp(40px,8vw,120px); line-height: .98; letter-spacing: -.035em; font-weight: 700; margin: 24px 0 0; }
.contact-row { display: flex; flex-wrap: wrap; gap: 40px; align-items: baseline; margin-top: 44px; }
.contact-email { font-size: clamp(20px,2.4vw,32px); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 3px; }
.contact-socials { display: flex; gap: 24px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.contact-socials a { color: var(--ink); text-decoration: none; opacity: .7; }
.contact-socials a:hover { opacity: 1; }
.contact-footer { display: flex; justify-content: space-between; margin-top: 80px; font-size: 11px; opacity: .45; }

/* ----------------------------------------------------------------
   Project Detail overlay
---------------------------------------------------------------- */
.detail { position: fixed; inset: 0; z-index: 50; background: var(--bg); color: var(--ink); overflow: auto; }
.detail-bar {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px,5vw,72px);
  background: rgba(246,244,239,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.detail-back, .detail-nav button, .detail-nav a {
  background: none; border: none; cursor: pointer; color: var(--ink); text-decoration: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}
.detail-back { display: flex; align-items: center; gap: 9px; padding: 0; }
.detail-nav { display: flex; align-items: center; gap: 16px; letter-spacing: .06em; }
.detail-nav button, .detail-nav a { opacity: .65; padding: 0; }
.detail-nav button:hover, .detail-nav a:hover { opacity: 1; }
.detail-slash { opacity: .3; }
/* Reserve header space so the JS-filled title/desc don't shift the cover (CLS) */
.detail-head { padding: clamp(28px,5vw,72px) clamp(20px,5vw,72px) 0; max-width: 1200px; min-height: clamp(190px, 30vw, 300px); box-sizing: border-box; }
.detail-meta { font-size: 12px; letter-spacing: .1em; opacity: .5; }
.detail-title { font-size: clamp(34px,5.5vw,80px); line-height: 1.02; letter-spacing: -.03em; font-weight: 700; margin: 16px 0 0; max-width: 16ch; text-wrap: balance; }
.detail-desc { font-size: clamp(16px,1.5vw,20px); line-height: 1.55; max-width: 620px; margin: 24px 0 0; opacity: .72; }

.detail-cover-wrap { padding: clamp(28px,4vw,56px) clamp(20px,5vw,72px) 0; }
.detail-cover {
  position: relative; width: 100%; aspect-ratio: 16/9;
  border-radius: 4px; overflow: hidden; background: var(--panel);
}
.detail-cover img, .detail-cover video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.detail-gallery-wrap { padding: clamp(28px,4vw,56px) clamp(20px,5vw,72px) 0; }
.detail-gallery-head { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; border-top: 1px solid rgba(0,0,0,.15); padding-top: 20px; margin-bottom: 32px; }
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,300px),1fr)); gap: clamp(16px,2vw,28px); }
.detail-slot { position: relative; aspect-ratio: 4/3; border-radius: 3px; overflow: hidden; background: var(--panel); transition: transform .35s ease; }
.detail-gallery.ratio-16x9 .detail-slot { aspect-ratio: 16/9; }
.detail-slot:hover { transform: translateY(-4px); }
.detail-slot img, .detail-slot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Click-to-play video facade (gallery videos) */
.yt-facade { cursor: pointer; }
.yt-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26,24,21,.62); color: #fff; backdrop-filter: blur(4px);
  transition: transform .25s, background .25s; z-index: 2;
}
.yt-facade:hover .yt-play { transform: translate(-50%,-50%) scale(1.08); background: var(--accent); }
.yt-play svg { width: 24px; height: 24px; margin-left: 3px; }
.yt-facade.is-loaded .yt-play, .yt-facade.is-loaded > img { display: none; }

.detail-next-wrap { padding: 0 clamp(20px,5vw,72px) clamp(120px,16vw,160px); }
.detail-next-link {
  width: 100%; margin-top: clamp(48px,6vw,90px);
  border: none; border-top: 1px solid rgba(0,0,0,.15); background: none; cursor: pointer;
  color: var(--ink); text-decoration: none;
  padding: 28px 0 0; display: flex; align-items: baseline; justify-content: space-between;
}
.detail-next-link .mono { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .5; }
.detail-next-title { font-size: clamp(22px,3vw,40px); font-weight: 600; letter-spacing: -.02em; }

/* Detail dock — buttons reuse the dock pill styling */
.detail-dock button.dock-item { font: inherit; font-size: clamp(13px,1.4vw,15px); font-weight: 600; letter-spacing: -.01em; }

/* Lock scroll behind the overlay */
body.detail-open { overflow: hidden; }

/* ----------------------------------------------------------------
   Mobile refinements
---------------------------------------------------------------- */
/* Below 840px the dock drops Home/About to stay compact with the
   two social buttons (matches the design). */
@media (max-width: 840px) {
  .dock-hide-sm { display: none !important; }
}

@media (max-width: 560px) {
  /* Tighten so the dock still fits at its 110% (top) size, with margin;
     keep overflow visible so a tapped pill lifts cleanly outside the dock. */
  .dock { gap: 2px; padding: 4px; }
  .dock-item { padding: 0 9px; font-size: 12px; flex: 0 0 auto; }
  .dock-item--cta { padding: 0 10px; }
  /* keep social pills perfectly round (width must match the item height) */
  .dock-divider { margin: 0 1px; }

  /* Showreel placeholder: shrink the play stack so the centered
     caption can't collide with the SHOWREEL_2026 badge. */
  .reel-play { width: 64px; height: 64px; }
  .reel-center { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}
