﻿/* Portfolio: category navigation, supplied work and honest empty galleries. */
.pf-categories { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; grid-auto-rows: 1fr; }
.pf-category { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr auto; align-content: start; gap: 18px 14px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 3px 16px rgba(10,25,49,.03); transition: border-color .2s, box-shadow .2s, transform .2s; }
.pf-category:hover { border-color: var(--current); box-shadow: var(--shadow-2); transform: translateY(-3px); }
.pf-category__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--deep); background: var(--foam); border: 1px solid var(--line); }
.pf-category__icon .i { width: 25px; height: 25px; }
.pf-category__status { align-self: center; justify-self: end; font-size: 12px; font-weight: 650; color: var(--ink-3); text-align: right; }
.pf-category h3 { grid-column: 1/-1; font: 750 23px/1.2 var(--display); letter-spacing: -.025em; }
.pf-category p { grid-column: 1/-1; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.pf-category__link { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 750; color: var(--deep); padding-top: 4px; }
.pf-nav { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 36px; }
.pf-nav .pill { display: inline-flex; align-items: center; text-decoration: none; }
.pf-nav [aria-current="page"] { background: var(--abyss); color: #fff; border-color: var(--abyss); }
.pf-empty { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 32px; align-items: start; max-width: 960px; margin: 18px auto; padding: clamp(24px,4vw,52px); border: 1px solid var(--line); background: var(--foam); border-radius: 28px; }
.pf-empty__icon { display: grid; place-items: center; width: 100px; height: 100px; background: #fff; color: var(--deep); border: 1px solid var(--line); border-radius: 25px; }
.pf-empty__icon .i { width: 42px; height: 42px; }
.pf-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--current); margin-bottom: 12px; }
.pf-empty h2, .pf-next h2 { font: 750 clamp(25px,3vw,36px)/1.15 var(--display); letter-spacing: -.03em; margin-bottom: 16px; }
.pf-empty p:not(.pf-eyebrow), .pf-next p:not(.pf-eyebrow) { color: var(--ink-2); max-width: 65ch; line-height: 1.7; }
.pf-focus { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 22px 0 26px; }
.pf-focus li { border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; background: #fff; color: var(--ink-2); font-size: 13px; }
.pf-results { margin-top: 40px; }
.pf-next { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.pf-next .btn { flex: 0 0 auto; }
.pf-projects { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.pf-project { border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: #fff; }
.pf-project > img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--foam); }
.pf-project__body { padding: 24px; }
.pf-project__body h3 { font: 750 24px/1.2 var(--display); margin: 8px 0 12px; }
.pf-project__body h3 a { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.pf-project__body p { font-size: 15px; color: var(--ink-2); line-height: 1.65; }
.pf-project__body .pf-project__category { font-size: 12px; color: var(--current); font-weight: 750; }
.pf-project__client { margin-bottom: 10px; }
@media (max-width: 1000px) { .pf-categories { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) { .pf-categories, .pf-projects { grid-template-columns: 1fr; } .pf-category { padding: 23px; } .pf-empty { grid-template-columns: 1fr; gap: 22px; } .pf-empty__icon { width: 72px; height: 72px; border-radius: 20px; } .pf-empty__icon .i { width: 34px; height: 34px; } .pf-next { flex-direction: column; align-items: start; } .pf-nav .pill { font-size: 12px; padding: 8px 12px; } }
@media (prefers-reduced-motion: reduce) { .pf-category { transition: none; } .pf-category:hover { transform: none; } }

/* Motion studio: a dark screening room. Every frame plays its film, cropped to fill the frame,
   with a quiet title in the corner and the whole frame opening the film with sound. */
.motion-media { position: absolute; inset: 0; overflow: hidden; background: var(--abyss-2); container-type: size; }
.motion-media__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); }
/* The player covers the frame like object-fit: cover, slightly overscaled so no edge of YouTube's frame shows. */
.motion-media__player { position: absolute; left: 50%; top: 50%; width: max(100%, 177.778cqh); height: max(100%, 56.25cqw); transform: translate(-50%, -50%) scale(calc(1.06 * var(--zoom, 1))); opacity: 0; transition: opacity .9s var(--ease); pointer-events: none; }
.motion-media__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.motion-media.is-playing .motion-media__player { opacity: 1; }
.motion-media__error { display: none; position: absolute; inset: auto 20px 20px; padding: 12px; color: #fff; background: rgba(10,25,49,.85); border-radius: 8px; font-size: 14px; }
.has-video-error .motion-media__error { display: block; }

/* Hero: the studio showreel fills the first screen. */
.motion-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: max(560px, calc(100svh - 117px)); background: var(--abyss); color: #fff; overflow: hidden; }
.motion-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(7,18,38,.82) 0%, rgba(7,18,38,.5) 42%, rgba(7,18,38,.08) 75%), linear-gradient(0deg, rgba(7,18,38,.75) 0%, transparent 45%); }
.motion-hero .motion-media { z-index: -2; }
.motion-hero__content { padding-block: 40px clamp(56px, 7vw, 96px); }
.motion-hero .crumbs { color: var(--on-dark-2); margin-bottom: clamp(28px, 5vh, 56px); }
.motion-hero h1 { font: 750 clamp(52px, 7.4vw, 112px)/.95 var(--display); letter-spacing: -.035em; }
.motion-hero h1 em { color: var(--sonar); font-style: normal; }
.motion-hero__lead { margin-top: 26px; max-width: 46ch; font-size: clamp(17px, 1.25vw, 19.5px); line-height: 1.6; color: var(--on-dark-2); }
.motion-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* The work: dark ground, wider container, 12-column editorial grid. */
.sec--motion-work > .container { max-width: 1480px; }
.sec--motion-work .shead { margin-bottom: clamp(32px, 4vw, 52px); }
.sec--motion-work .pf-nav { margin-bottom: clamp(40px, 5vw, 64px); }
.sec--motion-work .pf-nav .pill { background: transparent; border-color: var(--line-dark); color: var(--on-dark-2); }
.sec--motion-work .pf-nav .pill:hover { border-color: rgba(179,207,229,.5); color: #fff; }
.sec--motion-work .pf-nav [aria-current="page"] { background: var(--sonar); border-color: var(--sonar); color: var(--abyss); }
.motion-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 1.4vw, 22px); }
.motion-project { position: relative; isolation: isolate; grid-column: span 12; min-height: 260px; color: #fff; }
.motion-project--wide { grid-column: span 12; aspect-ratio: 21 / 9; }
.motion-project--major { grid-column: span 7; aspect-ratio: 16 / 10; }
.motion-project--minor { grid-column: span 5; }
.motion-project--half { grid-column: span 6; aspect-ratio: 16 / 10; }
.motion-project__frame { position: absolute; inset: 0; overflow: hidden; border-radius: 14px; background: var(--abyss-2); box-shadow: 0 0 0 1px rgba(179,207,229,.08); }
.motion-project__frame .motion-media { transition: transform 1.1s var(--ease); }
.motion-project__frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(5,13,28,.78) 0%, rgba(5,13,28,.25) 26%, transparent 44%); }
.motion-project__caption { position: absolute; z-index: 1; inset: auto clamp(18px, 2vw, 30px) clamp(16px, 1.8vw, 26px); display: flex; gap: 16px; align-items: baseline; pointer-events: none; }
.motion-project__number { font: 600 12px/1 var(--text); color: var(--sonar); font-variant-numeric: tabular-nums; }
.motion-project h3 { font: 700 clamp(22px, 2.2vw, 34px)/1.08 var(--display); letter-spacing: -.02em; }
.motion-project--wide h3 { font-size: clamp(28px, 3.2vw, 48px); }
.motion-project__caption p { margin-top: 6px; font-size: 13.5px; color: var(--on-dark-2); }
.motion-project__expand { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border: 0; border-radius: 14px; background: transparent; cursor: pointer; }
.motion-project__expand > span { position: absolute; right: clamp(16px, 1.6vw, 24px); top: clamp(16px, 1.6vw, 24px); display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--abyss); font: 700 13.5px/1 var(--text); opacity: 0; transform: translateY(-4px); transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s; }
.motion-project__expand .i { width: 16px; height: 16px; fill: currentColor; }
.motion-project__expand:focus-visible { outline: 3px solid var(--sonar); outline-offset: 3px; }
.motion-project__expand:focus-visible > span { opacity: 1; transform: none; }
@media (hover: hover) {
  .motion-project:hover .motion-project__frame .motion-media { transform: scale(1.025); }
  .motion-project:hover .motion-project__expand > span { opacity: 1; transform: none; }
  .motion-project__expand:hover > span { background: var(--sonar); }
}
@media (hover: none) { .motion-project__expand > span { opacity: 1; transform: none; } }

/* Dialog: the film with sound and controls. */
.motion-dialog { position: fixed; inset: 0; margin: auto; padding: 0; width: min(1180px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line-dark); border-radius: 16px; color: #fff; background: var(--abyss-2); box-shadow: 0 30px 100px rgba(0,0,0,.45); }
.motion-dialog::backdrop { background: rgba(3,10,23,.9); backdrop-filter: blur(8px); }
.motion-dialog__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px 12px 22px; }
.motion-dialog__top h2 { font: 650 19px/1.25 var(--display); }
.motion-dialog__top button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-dark); border-radius: 50%; color: #fff; background: transparent; transition: background .2s, color .2s; }
.motion-dialog__top button:hover { background: var(--sonar); color: var(--abyss); }
.motion-dialog__stage { position: relative; aspect-ratio: 16/9; max-height: calc(100dvh - 120px); }
.motion-media--dialog .motion-media__player { width: 100%; height: 100%; transform: translate(-50%, -50%); transition-duration: .3s; }
.motion-media--dialog .motion-media__player, .motion-media--dialog .motion-media__player iframe { pointer-events: auto; }
.motion-dialog-open { overflow: hidden; }

@media (max-width: 900px) {
  .motion-project--major, .motion-project--minor, .motion-project--half { grid-column: span 12; aspect-ratio: 16 / 10; }
  .motion-project--wide { aspect-ratio: 16 / 10; }
}
@media (max-width: 680px) {
  /* One swipeable row of categories instead of a screen of pills. */
  .pf-nav { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; scrollbar-width: none; }
  .pf-nav::-webkit-scrollbar { display: none; }
  .pf-nav .pill { flex: none; height: 44px; }
  .motion-hero { min-height: max(520px, calc(100svh - 77px)); }
  .motion-hero::after { background: linear-gradient(0deg, rgba(7,18,38,.92) 0%, rgba(7,18,38,.55) 55%, rgba(7,18,38,.25) 100%); }
  .motion-hero__ctas .btn { width: 100%; }
  .motion-project, .motion-project--wide { aspect-ratio: 4 / 3; min-height: 0; }
  .motion-project__caption { gap: 12px; }
  .motion-project__caption p { font-size: 12.5px; }
  .motion-dialog { width: calc(100vw - 20px); }
  .motion-dialog__top h2 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-media__player, .motion-project__frame .motion-media, .motion-project__expand > span { transition: none; }
  .motion-project:hover .motion-project__frame .motion-media { transform: none; }
}

/* Own preview loops (src/video/motion/<id>.mp4): shown the moment frames play. */
.motion-media__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.motion-media.is-playing .motion-media__video { opacity: 1; }

/* ---------- Film wheel: every film at a glance, turning by itself ----------
   The ring's centre sits far below the section; the cards stand on its rim, each turned to follow the arc.
   The radius follows the number of cards so neighbours never touch. */
.sec--films { padding-bottom: 0; }
.sec--films .shead { margin-bottom: clamp(24px, 3vw, 36px); }
.sec--films .pf-nav { justify-content: center; margin-bottom: 0; }
@media (max-width: 680px) { .sec--films .pf-nav { justify-content: flex-start; } }
.film-wheel {
  --card: clamp(220px, 30vw, 440px); --card-h: calc(var(--card) * .625); --gap: clamp(28px, 3vw, 56px);
  --R: calc(var(--slots) * (var(--card) + var(--gap)) / 6.2832);
  position: relative; height: calc(var(--card-h) + var(--R) * .17 + 40px); margin-top: clamp(28px, 4vw, 56px); overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 66%, transparent); mask-image: linear-gradient(180deg, #000 66%, transparent);
}
.film-wheel__ring { position: absolute; left: 50%; top: calc(28px + var(--card-h) / 2 + var(--R)); width: 0; height: 0; animation: filmWheel calc(var(--slots) * 7s) linear infinite; }
@keyframes filmWheel { to { transform: rotate(-360deg); } }
.film-wheel:hover .film-wheel__ring, .film-wheel:focus-within .film-wheel__ring, .film-wheel.is-paused .film-wheel__ring, .film-wheel.is-away .film-wheel__ring { animation-play-state: paused; }
.film-wheel__card { position: absolute; left: 0; top: 0; width: var(--card); height: var(--card-h); transform: translate(-50%, -50%) rotate(calc(var(--i) * 360deg / var(--slots))) translateY(calc(var(--R) * -1)); }
.film-wheel__frame { position: absolute; inset: 0; overflow: hidden; border-radius: 14px; background: var(--abyss-2); box-shadow: 0 0 0 1px rgba(179,207,229,.12), 0 30px 60px -30px rgba(0,0,0,.8); }
.film-wheel__frame .motion-media { transition: transform .8s var(--ease); }
.film-wheel__open { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border-radius: 14px; background: transparent; cursor: pointer; }
.film-wheel__open:focus-visible { outline: 3px solid var(--sonar); outline-offset: 3px; }
.film-wheel__label { position: absolute; inset: auto 0 0; display: grid; gap: 4px; padding: 44px 18px 16px; border-radius: 0 0 14px 14px; text-align: left; font-size: 13px; color: var(--on-dark-2); background: linear-gradient(0deg, rgba(5,13,28,.88), transparent); opacity: 0; transition: opacity .3s var(--ease); }
.film-wheel__label b { font: 700 clamp(16px, 1.4vw, 20px)/1.15 var(--display); color: #fff; }
.film-wheel__card:hover .film-wheel__label, .film-wheel__open:focus-visible .film-wheel__label { opacity: 1; }
.film-wheel__card:hover .film-wheel__frame .motion-media { transform: scale(1.03); }
@media (hover: none) { .film-wheel__label { opacity: 1; } }
.film-wheel__pause { position: absolute; z-index: 5; top: 0; right: max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))); width: 44px; height: 44px; }
.film-wheel__pause .i { width: 18px; height: 18px; }
.film-wheel__pause[aria-pressed="false"] .i:last-child, .film-wheel__pause[aria-pressed="true"] .i:first-child { display: none; }
@media (prefers-reduced-motion: reduce) {
  .film-wheel__ring { animation: none; }
  .film-wheel__pause { display: none; }
  .film-wheel__frame .motion-media, .film-wheel__label { transition: none; }
}

/* ---------- Website showcase: the scroll drum ----------
   At rest (no script, reduced motion, under 900px wide) each mockup stands beside its words, one under another.
   Live, the stage is pinned: the heading and list on the left, the drum of mockups in the middle (all in one
   grid cell, turned by the script), the current project's words on the right (all panels in one cell). */
.web-sec { padding-bottom: clamp(48px, 6vw, 88px); }
.web-sec .pf-nav { margin-bottom: clamp(28px, 4vw, 48px); }
.web-show__intro { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.web-show__title { font-size: clamp(2rem, 1.25rem + 2.5vw, 3.3rem); line-height: 1.06; letter-spacing: -.026em; }
.web-show__lead { margin-top: 18px; max-width: 46ch; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.web-show__list { display: grid; gap: 2px; margin: 26px 0 30px; padding: 0; list-style: none; }
.web-show__list button { display: flex; align-items: baseline; gap: 14px; min-height: 44px; padding: 6px 0; font: 600 15px/1.2 var(--text); letter-spacing: .01em; color: var(--ink-3); transition: color .25s; }
.web-show__list button span { font-size: 13px; font-variant-numeric: tabular-nums; }
.web-show__list button:hover, .web-show__list button.is-current { color: var(--ink); }
.web-show__list button.is-current span { color: var(--current); }
.web-show__item { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.web-show__item + .web-show__item { margin-top: clamp(40px, 6vw, 80px); }
.web-show__shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 16px; background: var(--tint); box-shadow: 0 30px 60px -36px rgba(10,25,49,.45); }
.web-show__shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.web-show__num { display: flex; align-items: center; gap: 10px; font: 600 14px/1 var(--text); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.web-show__num i { width: 11px; height: 11px; border-radius: 2px; background: var(--abyss); }
.web-show__panel h3 { margin-top: 18px; font: 700 clamp(30px, 3.4vw, 54px)/1 var(--display); letter-spacing: -.03em; }
.web-show__kind { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--current); }
.web-show__text { margin-top: 18px; max-width: 40ch; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }

.web-show.is-live { height: calc((var(--n) - 1) * 75svh + 100svh - var(--hdr)); }
.web-show.is-live .web-show__stage { position: sticky; top: var(--hdr); height: calc(100svh - var(--hdr)); overflow: hidden; }
.web-show.is-live .web-show__grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 2fr) minmax(0, .95fr); grid-template-rows: minmax(0, 1fr); column-gap: clamp(24px, 3vw, 48px); max-width: 1480px; height: 100%; perspective: 1600px; }
.web-show.is-live .web-show__intro { grid-area: 1 / 1; align-self: center; margin: 0; }
.web-show.is-live .web-show__title { font-size: clamp(1.8rem, 1rem + 1.8vw, 2.6rem); }
.web-show.is-live .web-show__item { display: contents; }
.web-show.is-live .web-show__shot { grid-area: 1 / 2; align-self: center; width: 100%; transform-origin: 50% 50%; backface-visibility: hidden; will-change: transform; filter: brightness(calc(1 - .2 * var(--away, 0))); }
.web-show.is-live .web-show__panel { grid-area: 1 / 3; align-self: stretch; display: flex; flex-direction: column; padding-block: clamp(40px, 10vh, 120px); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.web-show.is-live .web-show__text { margin-top: auto; }
.web-show.is-live .web-show__item.is-current .web-show__panel { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 680px) {
  .web-show__item { grid-template-columns: 1fr; gap: 20px; }
  .web-show__panel h3 { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .web-show__panel, .web-show__list button { transition: none; } }
