
/* Layout: Plutarch's film-first frame (full-bleed still, giant thin wordmark, floating credit labels)
   re-cut in Visual Padam's deck language: ink + paper, Courier credit labels, Tamil "padam" as the one local note. */
:root {
  --ink: #0b1011;        /* deck ink #101718, pushed darker for film */
  --ink-2: #141b1d;
  --paper: #f7f7f3;      /* deck paper */
  --fg: #eeefea;
  --muted: #8d9799;      /* deck grey, lifted for dark ground */
  --line: rgba(238, 239, 234, 0.14);
  --paper-ink: #101718;
  --paper-muted: #5f6b6e;
  --paper-line: rgba(16, 23, 24, 0.14);

  --display: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Courier Prime", "Courier New", Courier, monospace;
  --tamil: "Noto Sans Tamil", "Latha", "Tamil Sangam MN", sans-serif;

  --gutter: clamp(16px, 2.2vw, 32px);
  --label: 12.5px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--ink);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--ink);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 1.5px solid var(--fg); outline-offset: 3px; }

.wrap {
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.label {
  font-family: var(--mono);
  font-size: var(--label);
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
h1, h2, h3 { margin: 0; font-weight: 300; text-wrap: balance; }
p { margin: 0; }

/* ---------- fixed chrome ---------- */
.chrome {
  position: fixed; z-index: 20;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  right: max(var(--gutter), env(safe-area-inset-right, 0px));
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  pointer-events: none;
}
.chrome > * { pointer-events: auto; }
.brand-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(20, 27, 29, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 999px; padding: 6px 12px 6px 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .35s, transform .35s, visibility .35s;
  white-space: nowrap;
}
.brand-pill img { width: 22px; height: 22px; }
.scrolled .brand-pill { opacity: 1; visibility: visible; transform: none; }
.menu { display: flex; align-items: center; justify-content: flex-end; margin-left: auto; }
.menu-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.menu-links a {
  background: var(--fg); color: var(--ink);
  border-radius: 999px; padding: 7px 12px 6px;
  transition: background .2s, color .2s, box-shadow .2s;
}
.menu-links a:hover { background: var(--ink); color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto;
  padding-block: calc(env(safe-area-inset-top, 0px) + 14px) 22px;
}
.reel { position: absolute; inset: 0; z-index: -2; background: var(--ink); }
.reel .yt { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.reel .yt iframe { position: absolute; top: 50%; left: 50%; border: 0; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.reel.live .yt iframe.on { opacity: 1; }
.reel .yt video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.reel.live .yt video.on { opacity: 1; }
.reel img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.2s ease, transform 9s linear;
}
.reel img.on { opacity: 1; transform: scale(1); }
.reel.live img.on { opacity: 0; transition: opacity .8s ease; }
/* No colour filter or tint over the films. Text stays readable with a soft shadow instead. */
.hero .wordmark, .hero .hero-sub, .hero .now { text-shadow: 0 1px 2px rgba(0,0,0,.35), 0 0 24px rgba(0,0,0,.25); }
.wordmark {
  font-family: var(--display);
  font-weight: 300;
  text-transform: uppercase;
  font-size: clamp(64px, 13.4vw, 228px);
  line-height: .8;
  letter-spacing: -0.065em;
  margin-left: -0.05em;
}
.wordmark span { display: block; }
.hero-sub {
  display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 22px;
}
.hero-sub .label { color: var(--fg); }

.now {
  justify-self: end; align-self: end; text-align: right;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; max-width: min(560px, 100%);
  opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease;
}
.now.in { opacity: 1; transform: none; }
.now .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.now .c { white-space: nowrap; }
.now:hover .t, .now:focus-visible .t { text-decoration: underline; text-underline-offset: 3px; }
@keyframes fill { to { transform: scaleX(1); } }

/* ---------- section scaffolding ---------- */
section { padding-block: clamp(72px, 10vw, 140px); }
.sec-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: 18px;
  align-items: end; margin-bottom: clamp(36px, 5vw, 64px);
}
.eyebrow { grid-column: 1 / span 3; color: var(--muted); }
.sec-title {
  grid-column: 4 / -1;
  font-size: clamp(36px, 5.6vw, 88px); line-height: .94; letter-spacing: -0.045em; text-transform: uppercase;
}

/* ---------- work index ---------- */
.work-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px;
  border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 26px;
}
.brackets { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.brackets button { color: var(--muted); transition: color .2s; }
.brackets button::before { content: "["; margin-right: 2px; }
.brackets button::after { content: "]"; margin-left: 2px; }
.brackets button sup { font-size: .78em; margin-left: 2px; }
.brackets button[aria-pressed="true"], .brackets button:hover { color: var(--fg); }

.grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 34px 10px; }
.card { display: grid; gap: 10px; align-content: start; min-width: 0; }
.card .frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-2); max-width: 100%; }
.card .frame img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.015);
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}
.card:hover .frame img, .card:focus-visible .frame img { transform: scale(1.05); }
.card .frame .play {
  position: absolute; right: 10px; bottom: 10px;
  background: var(--fg); color: var(--ink); padding: 3px 7px 2px;
  opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s;
}
.card:hover .play, .card:focus-visible .play { opacity: 1; transform: none; }
.card .meta { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card .meta .t { font-weight: 700; }
.card .meta .c { color: var(--muted); margin-left: 1.2ch; }
.type-tile {
  position: absolute; inset: 0; display: grid; align-content: space-between; padding: 14px;
  background: var(--ink-2);
  border: 1px solid var(--line);
}
.type-tile .big { font-size: clamp(22px, 2.4vw, 34px); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; font-weight: 300; }
.type-tile img.logo { width: auto; max-height: 34px; filter: invert(1) brightness(1.1); opacity: .8; transform: none; }
.card:hover .type-tile { background: #1b2426; }

/* list layout */
.grid.list { grid-template-columns: 1fr; gap: 0; }
.grid.list .card {
  grid-template-columns: 3.2em minmax(0, 1.3fr) minmax(0, 1fr) auto;
  align-items: baseline; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: var(--label); text-transform: uppercase; letter-spacing: .04em;
}
.grid.list .card .frame { display: none; }
.grid.list .card .meta { display: contents; }
.grid.list .card .n { display: block; color: var(--muted); }
.grid.list .card .t { font-weight: 700; }
.grid.list .card .c { margin-left: 0; }
.grid.list .card .arrow { display: block; }
.grid.list .card:hover { background: linear-gradient(90deg, transparent, rgba(238,239,234,.05), transparent); }
.card .n, .card .arrow { display: none; }
.peek {
  position: fixed; z-index: 15; width: 300px; aspect-ratio: 16/9; pointer-events: none;
  opacity: 0; transform: translate(-50%, -115%) scale(.94); transition: opacity .2s, transform .25s;
  background: var(--ink-2) center / cover no-repeat;
}
.peek.on { opacity: 1; transform: translate(-50%, -115%) scale(1); }

/* ---------- featured ---------- */
.feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: 36px; align-items: start; }
.feature .still { grid-column: 1 / span 7; position: relative; overflow: hidden; aspect-ratio: 16/9; max-width: 100%; }
.feature .still img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.feature .still:hover img { transform: scale(1.04); }
.feature .copy { grid-column: 9 / -1; display: grid; gap: 22px; min-width: 0; }
.feature h3 { font-size: clamp(44px, 6vw, 96px); line-height: .86; letter-spacing: -0.055em; text-transform: uppercase; }
.feature .synopsis { color: #c9cdca; max-width: 42ch; }
.credits-table { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 22px; margin: 0; }
.credits-table dt { color: var(--muted); }
.credits-table dd { margin: 0; font-weight: 700; }
.btn {
  justify-self: start; display: inline-flex; gap: 10px; align-items: center;
  background: var(--fg); color: var(--ink); padding: 10px 14px 9px; border-radius: 999px;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }

/* ---------- studio ---------- */
.statement {
  font-size: clamp(28px, 3.6vw, 56px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 300;
  max-width: 22ch;
}
.statement em { font-style: normal; color: var(--muted); }
.studio-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: 48px; margin-top: clamp(48px, 6vw, 88px); }
.studio-grid .about { grid-column: 4 / span 5; display: grid; gap: 18px; color: #c9cdca; max-width: 60ch; }
.padam {
  grid-column: 10 / -1; align-self: start;
  display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px;
}
.padam .ta { font-family: var(--tamil); font-weight: 200; font-size: clamp(44px, 4.6vw, 72px); line-height: 1.1; }
.services { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; border-top: 1px solid var(--line); }
.services li { list-style: none; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 500; text-transform: uppercase; font-size: 14px; letter-spacing: .01em; }
.services { padding: 0; margin: 0; }
.steps { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.step { border-left: 1px solid var(--line); padding: 2px 0 6px 14px; display: grid; gap: 10px; align-content: start; }
.step p { color: #c9cdca; font-size: 15px; }
.side-label { grid-column: 1 / span 3; color: var(--muted); }

/* ---------- reach ---------- */
.reach { position: relative; overflow: hidden; }
.reach .num {
  font-family: var(--display); font-weight: 200; text-transform: uppercase;
  font-size: clamp(76px, 17vw, 300px); line-height: .8; letter-spacing: -0.07em; margin-left: -0.05em;
}
.reach .num small { font-size: .32em; letter-spacing: -0.04em; font-weight: 300; margin-left: .1em; }
.reach-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: 28px; margin-top: clamp(28px, 4vw, 52px); }
.reach-grid .lines { grid-column: 1 / span 5; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.08; letter-spacing: -0.03em; text-transform: uppercase; font-weight: 400; }
.reach-grid .copy { grid-column: 7 / span 4; color: #c9cdca; }
.reach-grid .note { grid-column: 11 / -1; color: var(--muted); }
.reach-grid .note .ta { font-family: var(--tamil); text-transform: none; }

/* ---------- director ---------- */
.director { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: 28px; align-items: start; }
.director .name { grid-column: 4 / span 4; font-size: clamp(40px, 5vw, 80px); line-height: .9; letter-spacing: -0.05em; text-transform: uppercase; }
.director .bio { grid-column: 9 / -1; display: grid; gap: 16px; color: #c9cdca; }
.director .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.director .tags span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 3px; color: var(--fg); }

/* ---------- clients ---------- */
/* client logos: one row, --per logos visible, seamless loop */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 34px; }
.mq-track { display: flex; width: max-content; }
.mq-item {
  flex: 0 0 var(--cell, 25vw); display: grid; place-items: center; min-height: 64px;
  padding-inline: calc(var(--gap, 64px) / 2);
}
.mq-item img { filter: invert(1) brightness(1.15); max-width: 100%; height: auto; }
.marquee.moving .mq-track { animation: mq var(--dur, 36s) linear infinite; }
.marquee.moving.rev .mq-track { animation-direction: reverse; }
.marquee.moving.hold:hover .mq-track, .marquee.moving.hold:focus-within .mq-track { animation-play-state: paused; }
.marquee:not(.moving) { overflow-x: auto; scrollbar-width: none; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.filters-wrap { display: grid; gap: 10px; }
.subfilters { font-size: .94em; padding-left: 2px; }
.subfilters button[disabled] { opacity: .45; cursor: default; }
.empty-note { padding: 40px 0; }

/* ---------- contact / footer (paper band) ---------- */
.paper { background: var(--paper); color: var(--paper-ink); }
.paper .muted { color: var(--paper-muted); }
.paper :focus-visible { outline-color: var(--paper-ink); }
.footer { padding-block: clamp(72px, 9vw, 120px) 22px; }
.footer .cta { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: 26px; }
.footer .cta h2 { grid-column: 1 / span 8; font-size: clamp(40px, 6.4vw, 108px); line-height: .9; letter-spacing: -0.05em; text-transform: uppercase; font-weight: 300; }
.footer .cta p { grid-column: 9 / -1; align-self: end; max-width: 42ch; }
.footer .cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 18px; row-gap: 28px; margin-top: clamp(56px, 8vw, 110px); }
.footer .cols > div { display: grid; gap: 4px; align-content: start; }
.footer .cols a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--paper-line); }
.footer .cols a:hover { text-decoration-color: currentColor; }
.clock { font-variant-numeric: tabular-nums; }
.footer { overflow: hidden; }
.giant {
  font-family: var(--display); font-weight: 300; text-transform: uppercase;
  font-size: 14vw; line-height: .76; letter-spacing: -0.07em;
  margin: clamp(48px, 8vw, 110px) 0 0; white-space: nowrap;
}
.giant span { display: inline-block; margin-left: -0.05em; }
.footer .base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--paper-line); padding-top: 12px; margin-top: 18px; }
.paper .mark { width: 34px; height: 34px; filter: invert(1); }


/* ---------- card motion (GIF / looping video) ---------- */
.card .frame .mo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.card .frame .mo.on { opacity: 1; }
.card .frame .badge { position: absolute; left: 10px; top: 10px; background: rgba(11,16,17,.7); color: var(--fg); padding: 3px 7px 2px; }

/* ---------- generic sections (added from admin) ---------- */
.text-sec .body { grid-column: 4 / span 6; display: grid; gap: 16px; color: #c9cdca; max-width: 62ch; }
.media-sec .media { position: relative; overflow: hidden; aspect-ratio: 21 / 9; background: var(--ink-2); max-width: 100%; }
.media-sec .media img, .media-sec .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-sec .cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }

/* ---------- contact email ---------- */
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: clamp(28px, 4vw, 44px); }
.mail-row a.mail { font-size: clamp(22px, 3vw, 40px); letter-spacing: -0.03em; font-weight: 300; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--paper-line); }
.mail-row a.mail:hover { text-decoration-color: currentColor; }
.copy-btn { border: 1px solid var(--paper-line); border-radius: 999px; padding: 6px 12px 5px; }
.copy-btn:hover { border-color: currentColor; }
.socials { display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .sec-head, .feature, .studio-grid, .reach-grid, .director, .footer .cta { grid-template-columns: minmax(0, 1fr); }
  .sec-head > *, .feature > *, .studio-grid > *, .reach-grid > *, .director > *, .footer .cta > * { grid-column: 1 / -1 !important; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { --cols: 2 !important; }
  .grid.list .card { grid-template-columns: 2.4em minmax(0, 1fr) auto; }
  .grid.list .card .c { display: none; }
  .peek { display: none; }
  .text-sec .body { grid-column: 1 / -1; }
  .media-sec .media { aspect-ratio: 16 / 10; }
}
@media (max-width: 900px) {
  #layouts [data-layout="3"] { display: none; }
}
@media (max-width: 560px) {
  .grid { --cols: 1 !important; }
  .footer .cols > div:nth-child(3) { grid-column: 1 / -1; }
  .footer .cols a { overflow-wrap: anywhere; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .hero-sub { gap: 4px 18px; }
  .hero { padding-top: calc(env(safe-area-inset-top, 0px) + 62px); }
  .marquee { padding-block: 24px; }
  .mq-item { min-height: 48px; }
  .brand-pill span { display: none; }
  .brand-pill { padding: 6px; }
  .menu-links { gap: 4px; }
  .menu-links a { padding: 6px 9px 5px; font-size: 11px; }
}
@media (hover: none) { .peek { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .reel img { transition: opacity .01s; transform: none !important; }
  * { transition-duration: .01s !important; }
}


/* =====================================================================
   Single frame: one full screen at a time, no page scroll.
   Each section is a .panel; the menu, the side dots, wheel, keys and swipes move between them.
   ===================================================================== */
.deck {
  position: fixed; inset: 0; overflow: hidden; background: var(--ink);
  --top: calc(env(safe-area-inset-top, 0px) + 74px);
  --bot: 62px;
  touch-action: pinch-zoom;
}
.panel {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; flex-direction: column;
  padding-block: var(--top) var(--bot);
  background: var(--ink);
  opacity: 0; visibility: hidden;
  transform: translate3d(0, calc(var(--from, 1) * 7vh), 0);
  transition: opacity .5s ease, transform .8s cubic-bezier(.2,.7,.2,1), visibility 0s linear .8s;
}
.panel.is-active {
  opacity: 1; visibility: visible; transform: none; z-index: 1;
  transition: opacity .65s ease .1s, transform .85s cubic-bezier(.2,.7,.2,1), visibility 0s;
}
.panel:focus { outline: none; }
.panel > :first-child { margin-top: auto; }
.panel > :last-child { margin-bottom: auto; }
.panel.overflow { overflow-y: auto; scrollbar-width: none; touch-action: pan-y pinch-zoom; }
.panel.overflow::-webkit-scrollbar { display: none; }
.panel.overflow > :first-child { margin-top: 0; }
.panel.paper { background: var(--paper); }
/* a soft reveal of the panel's contents, after the frame lands */
.panel.is-active > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.panel.is-active > :nth-child(2) { animation-delay: .06s; }
.panel.is-active > :nth-child(3) { animation-delay: .12s; }
.panel.is-active > :nth-child(n+4) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.panel.hero.is-active > * { animation: none; }

/* hero keeps its own frame */
.panel.hero {
  display: grid; grid-template-rows: auto 1fr auto; min-height: 0;
  padding-block: calc(env(safe-area-inset-top, 0px) + 14px) 22px;
}
.panel.hero > :first-child, .panel.hero > :last-child { margin: 0; }

/* section heads sized to the screen height as well as its width */
.panel .sec-head { margin-bottom: clamp(16px, 3.4vh, 44px); }
.panel .sec-title { font-size: clamp(30px, min(5.4vw, 8.6vh), 88px); }
.panel .statement { font-size: clamp(24px, min(3.6vw, 5.6vh), 56px); }

/* work: grid takes the room that is left; cards per page are worked out from it */
.work-panel .sec-head { margin-bottom: clamp(12px, 2.4vh, 28px); }
.work-panel .sec-title { font-size: clamp(28px, min(4.6vw, 7vh), 76px); }
.work-panel .work-bar { margin-bottom: clamp(12px, 2.2vh, 22px); }
.work-panel > :last-child { margin-bottom: 0; }
.work-panel .grid { flex: 1 1 0; min-height: 0; align-content: start; overflow: hidden; gap: clamp(14px, 2.6vh, 24px) 10px; }
.work-panel .grid.list { gap: 0; }
.grid.turn > * { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.grid.turn > :nth-child(2) { animation-delay: .03s; } .grid.turn > :nth-child(3) { animation-delay: .06s; }
.grid.turn > :nth-child(4) { animation-delay: .09s; } .grid.turn > :nth-child(n+5) { animation-delay: .12s; }
.pager { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); min-height: 40px; }
.pager[hidden] { display: none; }
.pager .pg-nums { gap: 4px 12px; }
.pager .pg-nums button[aria-current="page"] { color: var(--fg); }
.pager .pg-step { width: 30px; height: 26px; border: 1px solid var(--line); border-radius: 999px; }
.pager .pg-step:hover:not(:disabled) { border-color: var(--fg); }
.pager .pg-step:disabled { opacity: .3; cursor: default; }
.pager .pg-of { margin-left: auto; }

/* featured */
.feature-panel .feature .still { max-height: calc(100svh - var(--top) - var(--bot) - 70px); aspect-ratio: auto; height: min(calc((100vw - 2 * var(--gutter)) * 7 / 12 * 9 / 16), calc(100svh - var(--top) - var(--bot) - 70px)); }
.feature-panel .feature h3 { font-size: clamp(36px, min(6vw, 10vh), 96px); }
.feature-panel .feature .copy { gap: clamp(12px, 2.2vh, 22px); }

/* studio: tabs */
.studio-panel .studio-grid { margin-top: clamp(18px, 4vh, 56px); row-gap: clamp(16px, 3vh, 28px); align-items: start; }
.studio-panel .tabs { grid-column: 4 / -1; }
.brackets button[aria-selected="true"] { color: var(--fg); }
.studio-panel .pane { display: contents; }
.studio-panel .pane[hidden] { display: none !important; }
.studio-panel .pane:not([hidden]) > * { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.studio-panel .about { grid-column: 4 / span 5; }
.studio-panel .padam, .studio-panel .services, .studio-panel .steps { margin-top: 0; }

/* reach + director */
.panel.reach .num { font-size: clamp(64px, min(17vw, 30vh), 300px); }
.director-panel .name { font-size: clamp(36px, min(5vw, 9vh), 80px); }

/* clients */
.clients-panel .marquee { padding-block: clamp(22px, 5vh, 56px); }
.panel:not(.is-active) .mq-track { animation-play-state: paused !important; }

/* media / text */
.media-sec.panel .media { flex: 1 1 0; min-height: 120px; aspect-ratio: auto !important; }
.media-sec.panel > :last-child { margin-bottom: 0; }

/* contact: one screen, wordmark sits at the bottom and shrinks to the room left */
.footer.panel { padding-block: var(--top) 18px; }
.footer.panel .cta h2 { font-size: clamp(34px, min(6.4vw, 10.5vh), 108px); }
.footer.panel .mail-row { margin-top: clamp(14px, 3vh, 44px); }
.footer.panel .cols { margin-top: clamp(18px, 4.4vh, 72px); }
.footer.panel .giant { margin: auto 0 0; padding-top: 12px; }
.footer.panel .giant[hidden] { display: none; }
.footer.panel > :first-child { margin-top: 0; }
.footer.panel > :last-child { margin-bottom: 0; }
.footer .clock-line { margin-top: 6px; }

/* chrome over the paper panel */
.menu-links a[aria-current] { background: var(--ink); color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.on-paper .menu-links a { background: var(--paper-ink); color: var(--paper); }
.on-paper .menu-links a[aria-current], .on-paper .menu-links a:hover { background: var(--paper); color: var(--paper-ink); box-shadow: inset 0 0 0 1px var(--paper-ink); }

/* section counter, bottom left */
.rail {
  position: fixed; z-index: 20; left: max(var(--gutter), env(safe-area-inset-left, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  display: flex; align-items: center; gap: 10px; color: var(--fg);
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.rail button { width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--line); display: grid; place-items: center; line-height: 1; transition: border-color .2s, opacity .2s; }
.rail button:hover:not(:disabled) { border-color: currentColor; }
.rail button:disabled { opacity: .28; cursor: default; }
.rail .count { font-variant-numeric: tabular-nums; }
.rail .count b { font-weight: 700; }
.rail .rl { color: var(--muted); max-width: 26ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.on-paper .rail, .at-end .rail { display: none; }

/* side dots, right edge */
.dots { position: fixed; z-index: 20; right: max(calc(var(--gutter) - 8px), env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); display: grid; gap: 2px; }
.dots button { position: relative; width: 22px; height: 18px; display: grid; place-items: center end; }
.dots button::after { content: ""; width: 10px; height: 1.5px; background: var(--fg); opacity: .4; transition: width .3s, opacity .3s; }
.dots button:hover::after { opacity: .9; }
.dots button[aria-current]::after { width: 20px; opacity: 1; }
.dots .dl { position: absolute; right: 30px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; background: rgba(20,27,29,.82); color: var(--fg); padding: 3px 8px 2px; border-radius: 999px; }
.dots button:hover .dl, .dots button:focus-visible .dl { opacity: 1; transform: translate(0, -50%); }
.on-paper .dots button::after { background: var(--paper-ink); }
/* keep the right edge clear of content on wide screens */
@media (min-width: 901px) { .panel:not(.hero) { padding-right: calc(max(var(--gutter), env(safe-area-inset-right, 0px)) + 26px); } }

@media (max-width: 900px) {
  .studio-panel .tabs, .studio-panel .studio-grid .pane > * { grid-column: 1 / -1 !important; }
  .dots { display: none; }
  .feature-panel .feature .still { height: auto; aspect-ratio: 16 / 9; max-height: 34vh; }
  .feature-panel .feature { row-gap: clamp(14px, 2.6vh, 28px); }
}
@media (max-width: 560px) {
  .deck { --top: calc(env(safe-area-inset-top, 0px) + 60px); --bot: 58px; }
  .footer.panel { padding-bottom: 12px; }
  .panel.hero { padding-top: calc(env(safe-area-inset-top, 0px) + 62px); padding-bottom: 64px; }
  .panel.hero .now { max-width: 100%; }
  .feature-panel .credits-table { display: none; }
  .feature-panel .synopsis { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
  .footer.panel .col-index { display: none; }
  .footer.panel .cols { row-gap: 16px; }
  .footer.panel .col-touch { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .footer.panel .col-touch > p { flex-basis: 100%; }
  .footer.panel .cta p { font-size: 15px; }
  .rail .rl { max-width: 18ch; }
  .pager .pg-of { display: none; }
  .studio-panel .services li { padding: 9px 0; font-size: 13px; }
  .studio-panel .step p { font-size: 14px; }
}
@media (max-width: 560px) and (max-height: 760px) {
  .studio-panel .padam { display: none; }
  .studio-panel .about { gap: 12px; font-size: 15px; line-height: 1.5; }
  .footer.panel .cta p { font-size: 14px; line-height: 1.45; }
  .footer.panel .clock-line, .footer.panel .base .muted { display: none; }
  .feature-panel .synopsis { -webkit-line-clamp: 3; }
}
@media (max-height: 640px) {
  .deck { --top: calc(env(safe-area-inset-top, 0px) + 58px); --bot: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .panel, .panel.is-active { transform: none !important; }
  .panel.is-active > *, .grid.turn > *, .studio-panel .pane > * { animation: none !important; }
}
