/* Shared geometry for the sections copied from the reference showcase. */
.reel, .feature, .web { position: relative; padding: var(--section) var(--gutter); }
:is(.reel, .feature, .web) :is(h2, h3) { font-family: var(--sans); font-weight: 490; line-height: 1.06; letter-spacing: -.033em; text-wrap: balance; }
:is(.reel, .feature, .web) h2 { font-size: var(--fs-h2); }
:is(.reel, .feature, .web) p { text-wrap: pretty; }
:is(.reel, .feature, .web) .lede { max-width: var(--measure, 62ch); color: var(--silver); }
:is(.reel, .feature, .web) .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px;
  color: var(--paper); background: transparent; border: 1px solid var(--hair-strong); border-radius: 24px;
  font: 500 var(--fs-small)/1.2 var(--sans); text-decoration: none;
}
:is(.reel, .feature, .web) .btn--light { color: var(--ground); background: var(--paper); border-color: var(--paper); }
:is(.reel, .feature, .web) .btn:hover { border-color: currentColor; }
:is(.reel, .feature, .web) a { text-decoration: none; }

/* =====================================================================
   SHORT-FORM REEL Â· a film strip; vertical scroll runs it sideways
   Without JS (or with reduced motion) it is a plain horizontal scroller.
   ===================================================================== */
.reel { padding-left: 0; padding-right: 0; }
.reel__pin { position: relative; }
.reel__viewport {
  min-inline-size: 0; width: 100%;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.reel__viewport::-webkit-scrollbar { display: none; }
.reel__rail { display: flex; align-items: center; gap: clamp(2rem, 5vw, 5rem); width: max-content; padding: 0 var(--gutter); }
.reel__head { width: min(31rem, 78vw); flex: none; display: grid; gap: var(--s5); scroll-snap-align: start; }
.reel__head h2 { font-size: clamp(2.75rem, 1.4rem + 4.4vw, 5.75rem); }
.reel__head .lede { max-width: 36ch; }

.reel .reel__track { /* beats the list reset's specificity */
  --clip-h: min(62svh, 600px);
  position: relative; display: flex; align-items: flex-start; gap: clamp(1.25rem, 2.6vw, 2.75rem);
  padding: 2.4rem 0 3.4rem;
  margin: 0; list-style: none;
}
/* Sprocket holes along both edges of the strip */
.reel__track::before, .reel__track::after {
  content: ""; position: absolute; left: -1.5rem; right: -1.5rem; height: 9px;
  background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(255, 255, 255, 0.12) 9px 23px, transparent 23px 32px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
/* Sprockets run along both edges of the strip, clear of the edge print and the captions */
.reel__track::before { top: 0.7rem; }
.reel__track::after { bottom: 0.9rem; }

.reel .clip { flex: none; width: calc(var(--clip-h) * 9 / 16); display: flex; flex-direction: column; scroll-snap-align: center; }
.clip__edge { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em; color: var(--fog); margin-bottom: var(--s2); }
.clip__frame {
  --g: 1; --b: 0.6; --sc: 0.94;
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16;
  border: 1px solid var(--hair); border-radius: 6px; overflow: hidden; background: #000;
  cursor: pointer; isolation: isolate;
  transform: scale(var(--sc));
  filter: grayscale(var(--g)) brightness(var(--b));
  transition: filter 0.8s var(--ease-out), transform 0.8s var(--ease-out), border-color 0.8s var(--ease-out), box-shadow 0.8s var(--ease-out);
}
.clip__frame img, .clip__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip__frame video { opacity: 0; transition: opacity 0.6s var(--ease-out); }
.clip.is-playing .clip__frame video { opacity: 1; }
/* The frame in focus is the only thing in colour */
.clip.is-focus .clip__frame, .clip__frame:hover, .clip__frame:focus-visible {
  --g: 0; --b: 1; --sc: 1;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 70px rgba(255, 255, 255, 0.07);
}
/* Play affordance */
.clip__frame::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; translate: -50% -50%;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l8.5-5.5z' fill='white'/%3E%3C/svg%3E") center / 26px no-repeat;
  opacity: 0; scale: 0.85; transition: opacity var(--mid) var(--ease-out), scale var(--mid) var(--ease-out);
}
.clip__frame:hover::after, .clip__frame:focus-visible::after { opacity: 1; scale: 1; }
.clip__title { margin-top: var(--s4); font-size: clamp(1.35rem, 1rem + 1vw, 1.9rem); transition: color 0.8s var(--ease-out); }
.reel.is-pinned .clip:not(.is-focus) .clip__title { color: var(--fog); }
.clip__meta { margin-top: var(--s2); display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-small); color: var(--silver); }
.clip__dur { font-family: var(--mono); color: var(--fog); font-variant-numeric: tabular-nums; }
.reel .clip--end { width: min(24rem, 74vw); align-self: center; gap: var(--s5); justify-content: center; }
.clip__end-text { font-family: var(--display); font-size: clamp(1.9rem, 1.2rem + 2vw, 3rem); line-height: 1.05; }
.clip--end .btn { align-self: flex-start; }
.reel__count {
  position: absolute; right: var(--gutter); bottom: clamp(1.25rem, 4vh, 2.5rem);
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.08em; color: var(--silver);
  font-variant-numeric: tabular-nums;
}

/* Pinned mode (JS): the section is tall, the strip is sticky and moves with the scroll */
.reel.is-pinned { padding-top: 0; padding-bottom: 0; height: var(--reel-h, auto); }
.reel.is-pinned .reel__pin {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; align-items: center;
  padding-top: var(--bar-h);
}
.reel.is-pinned .reel__viewport { overflow: visible; }
.reel.is-pinned .reel__rail { padding-inline-start: calc(var(--gutter) + var(--reel-start, 0px)); transform: translate3d(calc(var(--rx, 0) * -1px), 0, 0); will-change: transform; }

/* =====================================================================
   FEATURE Â· SONORA grows from an inset frame to the full screen
   ===================================================================== */
.feature { padding-bottom: 0; }
/* Title card: the product name owns a full row, the copy sits under its right half */
.feature__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem) var(--s8); }
.feature__head h2 { grid-column: 1 / -1; font-size: clamp(3.75rem, 10.8vw, 11.25rem); line-height: .94; letter-spacing: -.035em; }
.feature__copy { grid-column: 2; display: grid; gap: var(--s4); justify-items: start; max-width: 40ch; }
.feature__kind { color: var(--paper); font-weight: 500; }
.feature__stage { height: 230svh; margin-top: clamp(2rem, 5vw, 4rem); }
.feature__pin { position: sticky; top: 0; width: 100%; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.feature__frame {
  --fp: 0;
  position: relative; width: min(100%, calc(100svh * 16 / 9)); aspect-ratio: 16 / 9;
  transform: scale(calc(0.64 + var(--fp) * 0.36));
  border-radius: calc((1 - var(--fp)) * 14px);
  overflow: hidden; background: #000;
  box-shadow: 0 50px 140px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
  /* The world is black and white; the work blooms into colour as it fills the screen */
  filter: grayscale(max(0, calc(1 - var(--fp) * 1.6)));
}
.feature__video { width: 100%; height: 100%; object-fit: cover; }
.feature__play {
  position: absolute; right: clamp(0.75rem, 2vw, 1.5rem); bottom: clamp(0.75rem, 2vw, 1.5rem);
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4) 0 var(--s3);
  border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px;
  background: rgba(0, 0, 0, 0.55); color: var(--paper);
  font-size: var(--fs-small); font-weight: 500;
  transition: background-color var(--fast) var(--ease-out), border-color var(--fast) var(--ease-out);
}
.feature__play svg { width: 20px; height: 20px; }
.feature__play:hover { background: rgba(0, 0, 0, 0.75); border-color: #fff; }

/* =====================================================================
   WEB WORK Â· browser frames that slide in from alternating sides
   ===================================================================== */
/* Frames waiting to slide in sit outside the section; clip them so the page never scrolls sideways */
.web { display: grid; gap: clamp(4rem, 9vw, 9rem); overflow-x: clip; overflow-clip-margin: 2rem; }
.web__head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: var(--s5) var(--s8); }
.web__head .lede { justify-self: end; max-width: 40ch; }

.site { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center; gap: clamp(1.75rem, 4.5vw, 5rem); }
.site--flip .site__media { order: 2; }
.site__copy { display: grid; gap: var(--s3); justify-items: start; }
.site__name { font-size: clamp(2.2rem, 1.3rem + 3vw, 4rem); }
.site__kind { color: var(--paper); font-weight: 500; font-size: var(--fs-small); }
.site__text { color: var(--silver); max-width: 42ch; }
.site__actions { margin-top: var(--s3); display: flex; flex-wrap: wrap; gap: var(--s3); }
.web .btn.walkthrough-play {
  gap: 9px;
  color: #101010;
  background: #fafaf8;
  border-color: #fafaf8;
  box-shadow: 0 2px 16px rgb(255 255 255 / 13%);
  transition: background-color .2s ease, box-shadow .2s ease;
}
.walkthrough-play svg { display: block; width: 15px; height: 15px; flex: none; }
.web .btn.walkthrough-play:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 3px 20px rgb(255 255 255 / 23%);
}
.web .btn.walkthrough-play:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.browser {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0c0c0c;
  box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.browser__bar {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 var(--s4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #181818, #111);
}
.browser__dot { position: absolute; left: var(--s4); width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); box-shadow: 13px 0 0 rgba(255, 255, 255, 0.18), 26px 0 0 rgba(255, 255, 255, 0.1); }
.browser__url {
  max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.06);
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--silver);
}
.browser__screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.browser__screen video, .browser__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* Live demo: the real page, rendered at desktop width and scaled down, scrolling itself */
.browser__frame {
  position: absolute; left: 0; top: 0; width: 1280px; height: calc(100% / var(--fs, 0.5));
  border: 0; transform: scale(var(--fs, 0.5)); transform-origin: 0 0;
  pointer-events: none; opacity: 0; transition: opacity 0.8s var(--ease-out);
}
.browser__frame.is-ready { opacity: 1; }

/* Entrances: frames slide in from their own side, copy follows */
.js .site .site__media { opacity: 0; transform: translateX(-9vw) rotate(-1.5deg); }
.js .site--flip .site__media { transform: translateX(9vw) rotate(1.5deg); }
.js .site .site__copy { opacity: 0; transform: translateY(24px); }
.site .site__media, .site .site__copy { transition: opacity 1.2s var(--ease-out), transform 1.4s var(--ease-out); }
.site .site__copy { transition-delay: 0.2s; }
.js .site.is-in .site__media, .js .site.is-in .site__copy { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .web__head { grid-template-columns: 1fr; }
  .web__head .lede { justify-self: start; }
  .site { grid-template-columns: 1fr; }
  .site--flip .site__media { order: 0; }
}

@media (max-width: 760px) {
  .feature__head { grid-template-columns: 1fr; }
  .feature__copy { grid-column: 1; }
  .reel .reel__track { --clip-h: min(54svh, 460px); }
  /* Phones: a 16:9 film is small on a tall screen, so it starts larger, sits near the top and needs less scroll */
  .feature__stage { height: 150svh; margin-top: var(--s5); }
  .feature__pin { place-items: start center; padding-top: calc(var(--bar-h) + 1.5rem); }
  .feature__frame { transform: scale(calc(0.84 + var(--fp) * 0.16)); transform-origin: 50% 0; }
}

/* Native horizontal scrolling and static feature composition with motion disabled. */
:is(html:not(.js), html[data-motion="off"]) .feature__stage { height: auto; }
:is(html:not(.js), html[data-motion="off"]) .feature__pin { position: static; height: auto; padding: 0; }
:is(html:not(.js), html[data-motion="off"]) .feature__frame { transform: none; filter: none; }
html[data-motion="off"] .site .site__media, html[data-motion="off"] .site .site__copy { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .feature__stage, .feature__pin { height: auto; }
  .feature__pin { position: static; padding: 0; }
  .feature__frame { transform: none; filter: none; }
  .js .site .site__media, .js .site .site__copy { opacity: 1; transform: none; }
}
