/* Fleck VFX: page CSS on top of the taste-skill kit (system.css, layout.css).
   The client's brand (blue #014BAA, cream #F8F3F0, the F logo), two themes (dark by default), an animated
   gradient ground, glass surfaces, the drawn visuals and their loops, and a 96px rhythm between sections. */

/* ------------------------------------------------------------------ type and brand */
:root {
  --font-display: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-accent: "Instrument Serif", Georgia, serif;
  --display-weight: 500;
  --display-tracking: -0.035em;
  --display-tracking-xl: -0.045em;
  --blue: #014baa;
  --blue-deep: #013c88;
  --cream: #f8f3f0;
  --screen: #0b0e15;          /* a video screen in the drawn visuals: dark in both themes */
  --chip: #12161f;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --rhythm: 96px;
}
h1, h2 { font-weight: var(--display-weight); text-wrap: balance; }
body { font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; }

/* ------------------------------------------------------------------ the two themes */
:root[data-theme="dark"] {
  color-scheme: dark;
  --p-bg: #06080d; --p-surface: #10141d; --p-ink: #f4f1ee; --p-muted: #b6bdca;
  --p-accent: #8db8ff; --p-accent-ink: #06080d; --p-action: #f8f3f0; --p-action-ink: #06080d;
  --glass: rgba(34, 44, 66, .42); --glass-strong: rgba(10, 14, 22, .7); --glass-line: rgba(248, 243, 240, .14);
  --glass-hi: rgba(255, 255, 255, .07); --shadow: rgba(0, 0, 0, .45);
  --logo: #f8f3f0;
  --blob-1: rgba(1, 75, 170, .9); --blob-2: rgba(6, 64, 150, .7); --blob-3: rgba(40, 120, 235, .35);
}
:root[data-theme="light"] {
  color-scheme: light;
  --p-bg: #f8f3f0; --p-surface: #ece6e2; --p-ink: #12161f; --p-muted: #4a4e57;
  --p-accent: #014baa; --p-accent-ink: #f8f3f0; --p-action: #014baa; --p-action-ink: #f8f3f0;
  --glass: rgba(255, 255, 255, .5); --glass-strong: rgba(250, 247, 245, .72); --glass-line: rgba(18, 22, 31, .1);
  --glass-hi: rgba(255, 255, 255, .8); --shadow: rgba(1, 40, 100, .14);
  --logo: #014baa;
  --blob-1: rgba(1, 75, 170, .30); --blob-2: rgba(120, 170, 235, .55); --blob-3: rgba(1, 75, 170, .16);
}
/* a switch of theme eases the colours across (site.js adds the class for 650ms) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .5s ease, color .5s ease, border-color .5s ease, fill .5s ease !important;
}

/* browser surfaces in the palette */
::selection { background: var(--blue); color: var(--cream); }
html { accent-color: var(--blue); caret-color: var(--p-accent); scrollbar-color: color-mix(in oklab, var(--ink) 30%, transparent) transparent; }
a { text-underline-offset: 0.2em; }

/* ------------------------------------------------------------------ the animated gradient ground
   Black to the brand blue (dark), cream to the brand blue (light): three soft radial lights drift
   behind the page. Only transforms move (composited, no repaint); still under reduced motion. */
body { background: var(--bg); }
.bg-anim { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.bg-anim > span { position: absolute; border-radius: 50%; will-change: transform; }
.bg-anim > span:nth-child(1) { width: 95vmax; height: 95vmax; left: -35vmax; top: -40vmax;
  background: radial-gradient(closest-side, var(--blob-1), transparent); animation: drift-a 26s ease-in-out infinite alternate; }
.bg-anim > span:nth-child(2) { width: 85vmax; height: 85vmax; right: -35vmax; bottom: -45vmax;
  background: radial-gradient(closest-side, var(--blob-2), transparent); animation: drift-b 32s ease-in-out infinite alternate; }
.bg-anim > span:nth-child(3) { width: 60vmax; height: 60vmax; left: 30vw; top: 25vh;
  background: radial-gradient(closest-side, var(--blob-3), transparent); animation: drift-c 22s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(22vw, 18vh, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-26vw, -14vh, 0) scale(1.18); } }
@keyframes drift-c { 0% { transform: translate3d(-18vw, -10vh, 0) scale(.9); } 100% { transform: translate3d(14vw, 22vh, 0) scale(1.15); } }

/* ------------------------------------------------------------------ glass */
header.nav { background: var(--glass-strong); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--glass-line); }
.glass, .fv, .form-panel, .tools-panel {
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 60px -28px var(--shadow);
}
footer.closing { background: transparent; border-top: 0; }
.field :is(input, select, textarea) { background: var(--glass-strong); border-color: var(--glass-line); border-radius: var(--r-sm); }
.field :is(input, select, textarea):focus-visible { border-color: var(--p-accent); }

/* ------------------------------------------------------------------ rounded everywhere */
:root[data-radius] { --r-sm: 12px; --r-md: 18px; --r-lg: 28px; }
.nav__toggle { border-radius: 14px; }

/* ------------------------------------------------------------------ the logo and the theme switch */
.logo-mark { display: inline-block; width: auto; height: 1.35em; flex: none; color: var(--logo); }
.nav__logo { gap: 10px; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; }

.nav__actions { gap: var(--s-3); }
.theme-switch {
  position: relative; display: inline-flex; align-items: center; justify-content: space-between; flex: none;
  width: 80px; height: 44px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  color: var(--muted); background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.theme-switch svg { position: relative; z-index: 1; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: color .35s ease; }
.theme-switch__moon { fill: currentColor; stroke: none; }
.theme-switch__knob { position: absolute; top: 4px; left: 4px; width: 34px; height: 34px; border-radius: 50%; background: var(--action);
  box-shadow: 0 4px 14px -4px var(--shadow); transition: transform .5s var(--ease-out); }
:root[data-theme="dark"] .theme-switch__knob { transform: translateX(36px); }
:root[data-theme="dark"] .theme-switch__moon, :root[data-theme="light"] .theme-switch__sun { color: var(--action-ink); }
.theme-switch:hover .theme-switch__knob { box-shadow: 0 0 0 4px color-mix(in oklab, var(--action) 18%, transparent), 0 4px 14px -4px var(--shadow); }

/* ------------------------------------------------------------------ hero: the F logo
   the F assembles from its three parts on load, then floats */
.logo-mark--parts .mk { transform-box: fill-box; }
:root.is-ready .logo-mark--parts { animation: float 6s ease-in-out 1.6s infinite; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.is-ready) .logo-mark--parts .mk { opacity: 0; transform: translate(-28px, 22px); }
  :root.is-ready .logo-mark--parts .mk { animation: mk-in 1s var(--ease-out) both; }
  :root.is-ready .logo-mark--parts .mk-2 { animation-delay: .14s; }
  :root.is-ready .logo-mark--parts .mk-3 { animation-delay: .28s; }
}
@keyframes mk-in { from { opacity: 0; transform: translate(-28px, 22px); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ------------------------------------------------------------------ the 96px rhythm
   Every section is as tall as its content and 96px apart at every width (the client's request, over
   the kit's one-section-per-screen boxes): 96 on top of each section, 96 under the last before the
   footer, 96 inside the footer. */
main > .section:not(.hero) { height: auto; min-height: 0; display: block; padding: var(--rhythm) 0 0; }
main > .section:not(.hero) > .wrap { height: auto; }
main { padding-bottom: 0; }
footer.closing { height: auto; min-height: 0; display: block; padding: var(--rhythm) 0 var(--s-6); }
footer.closing > .wrap { height: auto; row-gap: var(--rhythm); }
main > .hero { height: auto; min-height: 0; padding: calc(var(--nav) + var(--rhythm)) 0 0; }
main > .hero > .wrap { height: auto; }
.hero--split .hero__media { height: clamp(420px, calc(100svh - var(--nav) - 2 * var(--rhythm)), 640px); }

/* ------------------------------------------------------------------ heroes */
.hero--split .hero__text > h1 { font-size: clamp(38px, 1.7vw + 30px, 64px); letter-spacing: -0.04em; }
/* home: the words on seven columns, the headline 104px on three lines, one button */
.hero--home .hero__text > h1 { font-size: clamp(44px, 7.2vw, 104px); line-height: 1; letter-spacing: -0.05em; }
.hero--home h1 em { font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -0.015em; color: var(--p-accent); padding-right: .04em; white-space: nowrap; }
.hero--home .hero__text > .hero__lead { margin-top: var(--s-6); max-width: 34ch; font-size: clamp(18px, 0.4vw + 15px, 21px); line-height: 1.5; color: var(--muted); }
.hero--home .hero__text > .btn-row { margin-top: var(--s-7); }
.hero--home .hero__media { align-self: start; }

/* ------------------------------------------------------------------ drawn visuals and their loops */
.fv { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; container-type: inline-size; }
.fv--card { margin: 0; border-radius: var(--r-lg); align-self: start; }
.fv__screen { background: var(--screen); border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 10px 24px -12px rgba(0, 0, 0, .5); }
/* 1. short-form: three phones; the middle one's caption lights word by word, its progress bar runs */
.fv--reels { grid-auto-flow: column; justify-content: center; gap: clamp(10px, 2.4%, 20px); }
.fv--reels .fv__screen { position: relative; height: 64%; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; }
.fv--reels .fv__screen:nth-child(2) { background: linear-gradient(170deg, #0a5bd0, var(--blue-deep)); }
.fv__cap { position: absolute; left: 8%; right: 8%; top: 62%; text-align: center; font: 600 clamp(10px, 2.7cqi, 16px)/1.25 var(--font-display); color: var(--cream); letter-spacing: -0.01em; }
.fv__cap > span { display: inline-block; margin-inline: .08em; }
.is-playing .fv__cap > span { animation: cap-word 3.2s ease-in-out infinite; }
.is-playing .fv__cap > span:nth-child(2) { animation-delay: .4s; }
.is-playing .fv__cap > span:nth-child(3) { animation-delay: .8s; }
.is-playing .fv__cap > span:nth-child(4) { animation-delay: 1.2s; }
@keyframes cap-word { 0%, 8% { color: var(--cream); transform: none; } 14%, 30% { color: #ffd84a; transform: translateY(-1px); } 40%, 100% { color: var(--cream); transform: none; } }
.fv__bar { position: absolute; left: 10%; right: 10%; bottom: 7%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.fv__bar::after { content: ""; position: absolute; inset: 0; background: var(--cream); transform-origin: left; transform: scaleX(.35); }
.is-playing .fv__bar::after { animation: progress 3.2s linear infinite; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* 2. long-form: a 16:9 viewer over a three-track timeline; the playhead runs across */
.fv--long { align-content: center; gap: 6%; padding: 0 9%; }
.fv--long .fv__screen { width: 100%; aspect-ratio: 16 / 9; }
.fv__timeline { position: relative; width: 100%; display: grid; gap: 6px; }
.fv__track { display: flex; gap: 4px; height: 14px; }
.fv__track span { border-radius: 4px; background: var(--blue); }
.fv__track:nth-child(2) span { background: color-mix(in oklab, var(--blue) 50%, #9fbde6); }
.fv__track:nth-child(3) span { background: color-mix(in oklab, var(--ink) 28%, transparent); }
.fv__head { position: absolute; top: -8px; bottom: -8px; left: 38%; width: 2px; background: var(--ink); }
.fv__head::before { content: ""; position: absolute; top: 0; left: -5px; width: 12px; height: 8px; border-radius: 3px; background: var(--ink); }
.is-playing .fv__head { animation: playhead 4s linear infinite; }
@keyframes playhead { from { left: 2%; } to { left: 98%; } }
/* 3. motion graphics: the title lines rise, the lower third wipes in, holds and wipes out */
.fv--motion { padding: 0 9%; }
.fv--motion .fv__screen { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.fv__third { position: absolute; left: 6%; bottom: 12%; display: grid; gap: 0; }
.fv__third-name { display: flex; align-items: center; gap: 8px; background: var(--blue); color: var(--cream); padding: clamp(5px, 1.3cqi, 8px) clamp(8px, 2.2cqi, 14px); font: 600 clamp(10px, 2.9cqi, 18px)/1.1 var(--font-display); letter-spacing: -0.02em; border-radius: 6px 6px 6px 0; }
.fv__third-name .logo-mark { height: 1.1em; color: var(--cream); }
.fv__third-role { justify-self: start; background: var(--cream); color: var(--chip); padding: clamp(4px, 1cqi, 6px) clamp(8px, 2.2cqi, 14px); font: 500 clamp(9px, 2.1cqi, 13px)/1.1 var(--font-text); border-radius: 0 0 6px 6px; }
.fv__title { position: absolute; top: 14%; left: 6%; right: 6%; color: var(--cream); font: 600 clamp(16px, 6cqi, 38px)/1.02 var(--font-display); letter-spacing: -0.045em; }
.fv__title span { color: #7fb2ff; font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.is-playing .fv__third-name { animation: wipe 4s var(--ease-out) infinite; }
.is-playing .fv__third-role { animation: wipe 4s var(--ease-out) .12s infinite; }
.is-playing .fv__title { animation: title-in 4s var(--ease-out) infinite; }
@keyframes wipe { 0% { clip-path: inset(0 100% 0 0); } 18%, 78% { clip-path: inset(0 0 0 0); } 92%, 100% { clip-path: inset(0 0 0 100%); } }
@keyframes title-in { 0% { opacity: 0; transform: translateY(10px); } 14%, 82% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(-6px); } }

/* ------------------------------------------------------------------ benefits: three drawn pictures over their words */
.benefits { row-gap: var(--s-8); }
.benefit { display: grid; align-content: start; gap: var(--s-3); }
.benefit > .fv { margin: 0 0 var(--s-3); transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out); }
.benefit:hover > .fv { transform: translateY(-6px); box-shadow: inset 0 1px 0 var(--glass-hi), 0 34px 70px -28px var(--shadow); }
.benefit > h3 { font: 500 var(--t-lead)/1.3 var(--font-text); letter-spacing: -0.015em; }
.benefit > p { max-width: 40ch; color: var(--muted); }
@media (min-width: 640px) and (max-width: 1023px) { .benefit { grid-column: span 12; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gutter); } .benefit > .fv { grid-row: 1 / span 2; margin: 0; } }

/* ------------------------------------------------------------------ about: the two tools */
.tools-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: var(--gutter); padding: 12%; border-radius: 32px; }
.tool-tile { display: grid; justify-items: center; gap: var(--s-5); padding: var(--s-8) var(--s-4); border-radius: var(--r-md);
  background: var(--glass-strong); border: 1px solid var(--glass-line); transition: transform .5s var(--ease-out); }
.tool-tile:hover { transform: translateY(-4px); }
.tool-tile img { width: 96px; height: 94px; }
.tool-tile span:last-child { font: 500 16px/1.3 var(--font-text); text-align: center; }

/* ------------------------------------------------------------------ lists, form, footer */
.rows__name small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-body); line-height: 1.5; }
#work .rows > li { transition: padding-left .4s var(--ease-out); }
#work .rows > li:hover { padding-left: 8px; }
.form-panel { align-self: start; border-radius: var(--r-lg); padding: var(--s-7); }
.form-panel .form { row-gap: var(--s-5); }
.socials a { display: inline-grid; place-items: center; width: 44px; height: 44px; color: inherit; }
.socials svg { width: 20px; height: 20px; }
.link--ig { display: inline-flex; align-items: center; gap: var(--s-2); }
.link--ig svg { width: 18px; height: 18px; }
/* the kit's statement moment: the accent word in the accent colour */
.mo-wh__text strong { font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* ------------------------------------------------------------------ tablet and phone */
@media (max-width: 1023px) {
  .tools-panel { padding: 8%; }
  .hero--split .hero__media { height: clamp(280px, 52vw, 480px); flex: none; margin-top: var(--s-7); }
  .hero--home .hero__media { align-self: stretch; width: 100%; }
  /* the theme switch stays in the bar beside the main button (the kit hides the bar's other actions) */
  .nav:not(.is-open) .nav__actions > .theme-switch { display: inline-flex; }
}
@media (max-width: 639px) {
  main > .hero { padding-top: calc(var(--nav) + var(--s-7)); }
  .hero--home .hero__text > h1 { font-size: clamp(36px, 11.3vw, 48px); }
  .hero--split .hero__media { height: 280px; margin-top: var(--s-7); }
  /* the bar: the logo, the theme switch and the menu button; the main button is in the hero right under
     it and in the menu sheet, so it leaves the bar (it crowded the logo at 320px) */
  .nav:not(.is-open) .nav__actions > .btn { display: none; }
  .nav:not(.is-open) .nav__actions { margin-left: auto; }
  .nav:not(.is-open) .nav__actions + .nav__toggle { margin-left: 0; }
  .theme-switch { width: 72px; padding: 0 11px; }
  :root[data-theme="dark"] .theme-switch__knob { transform: translateX(28px); }
  #work .rows > li { grid-template-columns: minmax(0, 1fr); padding-block: var(--s-2); row-gap: 2px; }
  #work .section-head { margin-bottom: var(--s-6); }
  #work .rows__value { grid-column: 1; grid-row: auto; justify-self: start; text-align: left; font-size: var(--t-small); }
  #work .section-head > p { display: none; }
  .tool-tile { padding: var(--s-5) var(--s-2); }
  .tool-tile img { width: 56px; height: 55px; }
  .tool-tile span:last-child { font-size: 14px; }
  .form-panel { padding: var(--s-5); }
  .form-panel .form { grid-template-columns: minmax(0, 1fr); }
  .form-panel .field { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ reduced motion: everything rests */
@media (prefers-reduced-motion: reduce) {
  .bg-anim > span, .logo-mark--parts,
  .fv__cap > span, .fv__bar::after, .fv__head, .fv__third-name, .fv__third-role, .fv__title { animation: none !important; }
}

/* ------------------------------------------------------------------ home hero: the logo on its own
   No panel: the F alone, in a blue gradient, turned 8 degrees. On load it swings into its angle while its
   three bars slide in one after another; then it floats and sways a little. Still under reduced motion. */
:root[data-theme="dark"]  { --logo-a: #014baa; --logo-b: #7fb4ff; --logo-glow: rgba(1, 75, 170, .55); }
:root[data-theme="light"] { --logo-a: #012f70; --logo-b: #1f6fe0; --logo-glow: rgba(1, 75, 170, .22); }
.hero-logo { display: grid; place-items: center; align-self: center; height: clamp(420px, calc(100svh - var(--nav) - 2 * var(--rhythm)), 640px); }
.hero-logo__turn { height: 82%; aspect-ratio: 259 / 380; transform: rotate(8deg); }
.hero-logo .logo-mark { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 40px 60px var(--logo-glow)); }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.is-ready) .hero-logo__turn { opacity: 0; transform: rotate(-14deg) scale(.86); }
  :root.is-ready .hero-logo__turn { animation: logo-turn 1.5s var(--ease-out) both, logo-sway 9s ease-in-out 1.6s infinite; }
  :root.is-ready .hero-logo .logo-mark--parts { animation: float 6s ease-in-out 1.6s infinite; }
  :root:not(.is-ready) .hero-logo .mk { opacity: 0; transform: translate(-60px, 44px); }
  :root.is-ready .hero-logo .mk { animation: mk-in-far 1.1s var(--ease-out) .15s both; }
  :root.is-ready .hero-logo .mk-2 { animation-delay: .3s; }
  :root.is-ready .hero-logo .mk-3 { animation-delay: .45s; }
}
@keyframes logo-turn { from { opacity: 0; transform: rotate(-14deg) scale(.86); } to { opacity: 1; transform: rotate(8deg) scale(1); } }
@keyframes logo-sway { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(5deg); } }
@keyframes mk-in-far { from { opacity: 0; transform: translate(-60px, 44px); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-12px); } }
@media (max-width: 1023px) { .hero-logo { height: clamp(260px, 48vw, 420px); margin-top: var(--s-7); } }
@media (max-width: 639px)  { .hero-logo { height: 240px; } }
@media (prefers-reduced-motion: reduce) { .hero-logo__turn, .hero-logo .logo-mark--parts, .hero-logo .mk { animation: none !important; } }

/* ================================================================== v5: work page, contacts, reveals, transitions */

/* the home headline: "for content creators" is longer, so 96px keeps it to three lines */
.hero--home .hero__text > h1 { font-size: clamp(44px, 6.65vw, 96px); }
@media (max-width: 639px) { .hero--home .hero__text > h1 { font-size: clamp(36px, 10.3vw, 44px); } }

/* ------------------------------------------------------------------ contact links (WhatsApp, email, Instagram) */
.contact-links { display: grid; justify-items: start; gap: var(--s-3); margin-top: var(--s-6); }
.hero__text .contact-links { margin-top: var(--s-7); }
.link--ig svg { flex: none; }
.work-more { margin-top: var(--s-6); }
.socials { display: flex; gap: var(--s-1); }

/* ------------------------------------------------------------------ work page: the head and the mosaic of black video slots */
.work-head { max-width: 980px; }
.hero--work h1 { font-size: clamp(40px, 5.6vw, 84px); line-height: 1; letter-spacing: -0.05em; }
.hero--work h1 em { font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -0.015em; color: var(--p-accent); white-space: nowrap; }
.hero--work .hero__lead { margin-top: var(--s-6); max-width: 46ch; font-size: clamp(18px, 0.4vw + 15px, 21px); line-height: 1.5; color: var(--muted); }
.mosaic { display: grid; gap: 10px; margin-top: var(--s-8); }
.mosaic__row { display: grid; gap: 10px; }
.mosaic__row--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mosaic__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* a slot: black until the client's video is in it; a quiet play mark, a ring and a lift on hover */
.tile { position: relative; overflow: hidden; aspect-ratio: 9 / 16; border-radius: 18px; background: #000;
  border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .7);
  transition: translate .6s var(--ease-out), box-shadow .6s var(--ease-out), border-color .4s ease; }
.mosaic__row--3 .tile { aspect-ratio: 3 / 4; }
.tile::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: rgba(255, 255, 255, .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7.5v9l7.5-4.5z' fill='%23f8f3f0'/%3E%3C/svg%3E") center / 22px no-repeat;
  opacity: .35; transform: scale(.9); transition: opacity .4s ease, transform .5s var(--ease-out); }
.tile:hover { translate: 0 -4px; border-color: rgba(127, 180, 255, .45); box-shadow: 0 0 0 1px rgba(127, 180, 255, .25), 0 30px 60px -24px rgba(0, 0, 0, .65); }
.tile:hover::after { opacity: .9; transform: scale(1); }

/* ------------------------------------------------------------------ work page: the showcases (a title, a line, a fanning deck) */
.showcase__title { font-size: clamp(44px, 4.6vw, 72px); line-height: .98; letter-spacing: -0.05em; }
.showcase__text p { margin-top: var(--s-5); max-width: 40ch; color: var(--muted); font-size: var(--t-lead); line-height: 1.5; }
/* the deck: three black cards that fan out, hold, and gather into one, like a reel being picked */
.deck { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; }
.deck__card { position: absolute; height: 90%; aspect-ratio: 9 / 16; border-radius: 22px; background: #000;
  border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 34px 70px -26px rgba(0, 0, 0, .75); }
.deck__card:nth-child(1) { z-index: 1; } .deck__card:nth-child(2) { z-index: 3; } .deck__card:nth-child(3) { z-index: 2; }
.deck__card:nth-child(2)::after { content: ""; position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(255, 255, 255, .1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7.5v9l7.5-4.5z' fill='%23f8f3f0'/%3E%3C/svg%3E") center / 26px no-repeat; opacity: .5; }
.deck--wide .deck__card { height: auto; width: 74%; aspect-ratio: 16 / 9; }
.is-playing .deck__card:nth-child(1) { animation: fan-l 6.4s var(--ease-out) infinite; }
.is-playing .deck__card:nth-child(2) { animation: fan-c 6.4s var(--ease-out) infinite; }
.is-playing .deck__card:nth-child(3) { animation: fan-r 6.4s var(--ease-out) infinite; }
.is-playing.deck--wide .deck__card:nth-child(1) { animation-name: fan-wl; }
.is-playing.deck--wide .deck__card:nth-child(3) { animation-name: fan-wr; }
@keyframes fan-l { 0%, 10% { transform: none; } 28%, 66% { transform: translateX(-62%) rotate(-8deg) scale(.88); } 84%, 100% { transform: none; } }
@keyframes fan-r { 0%, 10% { transform: none; } 28%, 66% { transform: translateX(62%) rotate(8deg) scale(.88); } 84%, 100% { transform: none; } }
@keyframes fan-c { 0%, 10% { transform: none; } 28%, 66% { transform: translateY(-3%) scale(1.03); } 84%, 100% { transform: none; } }
@keyframes fan-wl { 0%, 10% { transform: none; } 28%, 66% { transform: translate(-16%, -26%) rotate(-5deg) scale(.86); } 84%, 100% { transform: none; } }
@keyframes fan-wr { 0%, 10% { transform: none; } 28%, 66% { transform: translate(16%, 26%) rotate(5deg) scale(.86); } 84%, 100% { transform: none; } }

/* ------------------------------------------------------------------ a soft light that follows the pointer over cards (site.js sets --mx, --my) */
.form-panel, .tool-tile { position: relative; }
:is(.fv, .tile, .tool-tile, .form-panel)::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, -999px) var(--my, -999px), rgba(255, 255, 255, .11), transparent 60%);
  opacity: 0; transition: opacity .35s ease; }
:is(.fv, .tile, .tool-tile, .form-panel):hover::before { opacity: 1; }
.tool-tile:hover { transform: none; translate: 0 -4px; }
.tool-tile { transition: translate .5s var(--ease-out); }

/* ------------------------------------------------------------------ scroll reveals: blocks rise into place, a little out of focus first,
   one after another in a group (site.js tags them only when motion is allowed, so nothing is ever hidden without it) */
.rv-on .rv { opacity: 0; transform: translateY(28px); filter: blur(8px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out);
  transition-delay: calc(var(--rv-i, 0) * 80ms); }
.rv-on .rv.rv-in { opacity: 1; transform: none; filter: none; }

/* ------------------------------------------------------------------ page transitions: the page leaves soft and rises in
   (cross-document view transitions; the nav stays put; browsers without them simply load the page) */
@view-transition { navigation: auto; }
header.nav { view-transition-name: site-nav; }
::view-transition-old(root) { animation: vt-out .3s ease-in both; }
::view-transition-new(root) { animation: vt-in .65s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); filter: blur(6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } }

/* ------------------------------------------------------------------ tablet and phone */
@media (max-width: 1023px) {
  .showcase .wrap > .span-6 { margin-top: var(--s-7); }
}
@media (max-width: 639px) {
  .mosaic, .mosaic__row { gap: 6px; }
  .tile { border-radius: 10px; }
  .tile::after { width: 30px; height: 30px; margin: -15px 0 0 -15px; background-size: 16px; }
  .mosaic__row--5 .tile::after { display: none; }
  .deck__card { border-radius: 14px; }
  .is-playing .deck__card:nth-child(1) { animation-name: fan-l-sm; }
  .is-playing .deck__card:nth-child(3) { animation-name: fan-r-sm; }
}
@keyframes fan-l-sm { 0%, 10% { transform: none; } 28%, 66% { transform: translateX(-52%) rotate(-7deg) scale(.86); } 84%, 100% { transform: none; } }
@keyframes fan-r-sm { 0%, 10% { transform: none; } 28%, 66% { transform: translateX(52%) rotate(7deg) scale(.86); } 84%, 100% { transform: none; } }

/* ------------------------------------------------------------------ reduced motion: the decks rest fanned, nothing reveals or transitions */
@media (prefers-reduced-motion: reduce) {
  .deck__card { animation: none !important; }
  .deck__card:nth-child(1) { transform: translateX(-62%) rotate(-8deg) scale(.88); }
  .deck__card:nth-child(3) { transform: translateX(62%) rotate(8deg) scale(.88); }
  .deck--wide .deck__card:nth-child(1) { transform: translate(-16%, -26%) rotate(-5deg) scale(.86); }
  .deck--wide .deck__card:nth-child(3) { transform: translate(16%, 26%) rotate(5deg) scale(.86); }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ================================================================== v6: one page */

/* the nav scrolls to each section: smooth (unless reduced motion), landing under the fixed bar */
/* a section's top lands under the bar so its heading sits 48px below it (the section's own 96px top padding less 48) */
html { scroll-padding-top: calc(var(--nav) - 48px); }
/* the phone menu: a frosted header (backdrop-filter) becomes the box its fixed sheet is laid out in, which squeezed
   the full-screen sheet into the 56px bar; while the menu is open the bar is solid and the sheet takes the screen */
header.nav.is-open { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* the word of the section on screen carries the kit's bar (site.js sets aria-current="location") */
.nav__link { position: relative; transition: color .3s ease; }
.nav__link[aria-current="location"]::after { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: -2px; height: 2px; border-radius: 2px; background: currentColor;
  animation: nav-bar .45s var(--ease-out) both; }
@keyframes nav-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.nav.is-open .nav__link[aria-current="location"]::after { left: 0; right: auto; width: 24px; bottom: 10px; }
.nav__links .nav__link:not([aria-current]) { color: color-mix(in oklab, var(--ink) 78%, transparent); }
.nav__links .nav__link:hover { color: var(--ink); }

/* the work section's head, now a section rather than a page hero */
.work-title { font-size: clamp(40px, 5.2vw, 76px); line-height: 1; letter-spacing: -0.05em; }
.work-title em { font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -0.015em; color: var(--p-accent); white-space: nowrap; }
.work-lead { margin-top: var(--s-5); max-width: 46ch; font-size: clamp(18px, 0.4vw + 15px, 21px); line-height: 1.5; color: var(--muted); }
#work .mosaic { margin-top: var(--s-8); }

/* the process sits beside the services list */
#services-list .section-head h3 { font: 500 var(--t-lead)/1.3 var(--font-text); letter-spacing: -0.015em; }
/* the about section's tools panel stands as its picture */
#about .tools-panel { aspect-ratio: 4 / 3; align-self: start; }

/* the footer holds only the links now */
footer.closing { padding-top: var(--rhythm); }
footer.closing > .wrap { row-gap: 0; }

@media (max-width: 1023px) {
  #services-list .wrap > .span-6, #clients .wrap > .rows, #about .tools-panel, #contact .form-panel, #questions .faq { margin-top: var(--s-7); }
}
@media (max-width: 639px) {
  #about .tools-panel { aspect-ratio: auto; }
  #clients .rows > li { grid-template-columns: minmax(0, 1fr); padding-block: var(--s-2); row-gap: 2px; }
  #clients .rows__value { grid-column: 1; grid-row: auto; justify-self: start; text-align: left; font-size: var(--t-small); }
}

/* a heading block that ends its column keeps no bottom margin (it would add 48px under a short section) */
.wrap > [class*="span-"] > .section-head:last-child { margin-bottom: 0; }

/* ================================================================== v7: the client's videos and the player */

/* every frame that plays a video is a button: no button look, the loop fills it, a click opens the whole video */
:is(.tile, .deck__card, .fv__screen)[data-play] { appearance: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; overflow: hidden; }
.fv__screen[data-play] { position: relative; display: block; border: 0; }
.vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #000; pointer-events: none; }
:is(.tile, .deck__card, .fv__screen)[data-play]:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 3px; }

/* the play mark: quiet on the loop, clear on hover and focus */
.deck__card::after, .tile::after, .fv__screen[data-play]::after { content: ""; position: absolute; left: 50%; top: 50%; z-index: 3; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(8, 11, 18, .45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7.5v9l7.5-4.5z' fill='%23f8f3f0'/%3E%3C/svg%3E") center / 26px no-repeat;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .22);
  opacity: 0; transform: scale(.85); transition: opacity .35s ease, transform .5s var(--ease-out); pointer-events: none; }
:is(.tile, .deck__card, .fv__screen)[data-play]:is(:hover, :focus-visible)::after { opacity: 1; transform: none; }
.deck__card:nth-child(2)::after { opacity: .85; transform: none; }
.fv__screen[data-play]::after { width: 40px; height: 40px; margin: -20px 0 0 -20px; background-size: 20px; }

/* the mosaic: 5 vertical, 2 wide, 5 vertical, 2 wide, each in its own shape */
.mosaic__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile--v { aspect-ratio: 9 / 16; }
.tile--h { aspect-ratio: 16 / 9; }
.tile .vid { transition: scale .8s var(--ease-out); }
.tile:hover .vid { scale: 1.04; }

/* the decks: the cards play their loops */
.deck__card { overflow: hidden; padding: 0; }
.deck__card .vid { border-radius: inherit; }

/* the services cards: the clips sit in the drawn frames; the lower third rides over the motion clip */
.fv--motion .fv__third { z-index: 2; pointer-events: none; }
.fv--reels .fv__screen .fv__bar { z-index: 2; }

/* about: three tools */
#about .tools-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8%; }
#about .tool-tile img { width: 72px; height: 72px; object-fit: contain; }

/* ------------------------------------------------------------------ the player: the whole video, with sound, over a blurred page */
.player { padding: 0; margin: 0; border: 0; background: transparent; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; overflow: hidden; }
.player[open] { display: grid; place-items: center; }
.player::backdrop { background: rgba(3, 5, 10, .78); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.player__video { display: block; background: #000; border-radius: 22px; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .1);
  width: min(92vw, 1280px, calc(86dvh * 16 / 9)); aspect-ratio: 16 / 9; }
.player[data-orient="v"] .player__video { width: min(92vw, calc(88dvh * 9 / 16)); aspect-ratio: 9 / 16; }
.player__close { position: fixed; top: 20px; right: 20px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #f8f3f0; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: background .3s ease, transform .4s var(--ease-out); }
.player__close:hover { background: rgba(255, 255, 255, .2); transform: rotate(90deg); }
.player__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
html:has(.player[open]) { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .player[open] .player__video { animation: player-in .55s var(--ease-out) both; }
  .player[open]::backdrop { animation: backdrop-in .4s ease both; }
}
@keyframes player-in { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes backdrop-in { from { opacity: 0; } }

@media (max-width: 639px) {
  #about .tools-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 5%; gap: 8px; }
  #about .tool-tile img { width: 44px; height: 44px; }
  .deck__card::after, .tile::after { width: 36px; height: 36px; margin: -18px 0 0 -18px; background-size: 18px; }
  .mosaic__row--5 .tile::after { display: none; }
  .player__video { border-radius: 14px; }
  .player__close { top: 12px; right: 12px; }
}

/* ================================================================== v8: client posts (the clients' own edits, with sound on a click) */
.client-posts { row-gap: var(--gutter); }
.client-post { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6); align-items: center; padding: var(--s-5);
  border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 60px -28px var(--shadow); }
.client-post__video { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-md); border: 0; background: #000; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.client-post__video::after { content: ""; position: absolute; left: 50%; top: 50%; z-index: 3; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: rgba(8, 11, 18, .45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7.5v9l7.5-4.5z' fill='%23f8f3f0'/%3E%3C/svg%3E") center / 28px no-repeat;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .25);
  opacity: .9; transition: transform .5s var(--ease-out); pointer-events: none; }
.client-post__video:hover::after, .client-post__video:focus-visible::after { transform: scale(1.08); }
.client-post__video:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 3px; }
.client-post__text { display: grid; gap: var(--s-4); align-content: center; }
.client-post__caption { font: 400 clamp(20px, 0.8vw + 14px, 26px)/1.3 var(--font-accent); font-style: italic; letter-spacing: -0.005em; color: var(--ink); }
.client-post__who { color: var(--muted); font-size: var(--t-body); line-height: 1.5; }
.client-post__name { display: block; color: var(--ink); font-weight: 500; }
.client-post .link { justify-self: start; }
.client-more { margin-top: var(--s-6); color: var(--muted); }

@media (max-width: 1023px) {
  .client-post { grid-column: span 12; }
}
@media (max-width: 639px) {
  .client-post { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: var(--s-4); padding: var(--s-3); }
  .client-post__caption { font-size: 18px; }
  .client-post__who { font-size: var(--t-small); }
  .client-post__video::after { width: 40px; height: 40px; margin: -20px 0 0 -20px; background-size: 20px; }
}

.sm-only { display: none; }
@media (max-width: 639px) { .client-post .lg-only { display: none; } .client-post .sm-only { display: inline; } }

/* the client posts: the video keeps the frame's rounded corners */
.client-post__video { overflow: hidden; padding: 0; }
.client-post__video .vid { border-radius: inherit; }
