/* ============================================================
   Yair Bronstein — portfolio
   Warm Graphite / Lavender highlight. Built to the Claude Design boards:
   Syne display, Manrope body, JetBrains Mono for nav and timecode.
   ============================================================ */

:root {
  --soot:      #0B0A09;   /* page ground */
  --graphite:  #161513;   /* cards */
  --umber:     #1F1D1A;   /* media wells */
  --line:      #232120;
  --hair:      rgba(245,242,236,.16);

  --aqua:      #C8B6FF;
  --aqua-ink:  #17131F;

  --bone:      #F5F2EC;
  --sand:      #D8CDBB;
  --nav:       #D8D2C8;
  --lede:      #C9C2B7;
  --body:      #B6AEA2;
  --muted:     #8C857A;

  --f-display: "Syne", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-body:    "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(20px, 3.9vw, 56px);
  --shell:  1440px;
  --ease:   cubic-bezier(.22, 1, .36, 1);
}
html[data-theme="light"] {
  --soot: #EEEAE2;
  --graphite: #E3DED4;
  --umber: #DAD4C9;
  --line: rgba(17,17,17,.14);
  --hair: rgba(17,17,17,.14);
  --aqua: #7658B8;
  --aqua-ink: #17131F;
  --bone: #111111;
  --sand: #5A5752;
  --nav: #1D1B19;
  --lede: #4F4C47;
  --body: #5B5852;
  --muted: #77736C;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--soot);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
body::before {
  content: "";
  position: fixed;
  inset: -3%;
  z-index: 0;
  pointer-events: none;
  background: url("/media/background-waves.png") center top / cover no-repeat;
  opacity: .10;
  transform-origin: center;
  animation: wave-breathe 15s cubic-bezier(.45,0,.55,1) infinite alternate;
  will-change: transform;
}
html[data-theme="light"] body::before { filter: invert(1) grayscale(1) contrast(.86); mix-blend-mode: multiply; opacity: .078; }
body > * { position: relative; z-index: 1; }

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--bone); color: var(--soot); padding: 12px 18px; font-family: var(--f-mono); font-size: 12px; }
.skip:focus { left: 12px; top: 12px; }

.shell { max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }

.label {
  font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0;
}

.pill {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--aqua); color: var(--aqua-ink);
  border: 0; border-radius: 999px; padding: 15px 22px;
  font-family: var(--f-body); font-weight: 700; font-size: 15px; line-height: 1;
  cursor: pointer; transition: transform .4s var(--ease), filter .3s var(--ease);
}
.pill:hover { transform: translateY(-2px); filter: brightness(1.07); }
.pill--ghost { background: transparent; color: var(--bone); border: 1px solid rgba(245,242,236,.24); font-weight: 500; font-size: 13px; padding: 11px 16px; }
.pill--ghost:hover { border-color: var(--aqua); color: var(--aqua); }
.play-tri { width: 0; height: 0; border-left: 12px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }

/* The wave texture is repeated inside sections with their own solid media or surface. */
.home-canvas::after,
.pagehead::after,
.toolband::after {
  content: "";
  position: absolute;
  inset: -3%;
  z-index: 1;
  pointer-events: none;
  background: url("/media/background-waves.png") center / cover no-repeat;
  opacity: .10;
  transform-origin: center;
  animation: wave-breathe 17s cubic-bezier(.45,0,.55,1) -5s infinite alternate;
  will-change: transform;
}
html[data-theme="light"] .home-canvas::after,
html[data-theme="light"] .pagehead::after,
html[data-theme="light"] .toolband::after {
  filter: invert(1) grayscale(1) contrast(.86);
  mix-blend-mode: multiply;
  opacity: .072;
}
.pagehead,
.toolband { position: relative; overflow: hidden; }
.pagehead > *,
.toolband > *,
.client-marquee > * { position: relative; z-index: 2; }
/* ---------------------------------------------------------- Topbar */

.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 30px var(--gutter);
  max-width: var(--shell); margin: 0 auto;
}
.topbar--solid { position: relative; border-bottom: 1px solid var(--line); padding-block: 24px; }

.mark { display: flex; align-items: center; gap: 18px; }
.mark__initials { font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: .02em; line-height: 1; }
.mark__rule { width: 34px; height: 1px; background: rgba(245,242,236,.4); }
.mark__name { font-family: var(--f-mono); font-weight: 500; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--nav); }

.topnav { display: flex; align-items: center; gap: clamp(16px, 1.95vw, 28px); flex-wrap: wrap; justify-content: flex-end; }
.topnav a {
  font-family: var(--f-mono); font-weight: 500; font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--nav); transition: color .3s var(--ease);
}
.topnav a:hover, .topnav a.is-active { color: var(--aqua); }
.topnav__sep { width: 1px; height: 14px; background: rgba(245,242,236,.24); }
html[data-theme="light"] .topnav__sep { background: var(--hair); }

@media (max-width: 900px) {
  .mark__name { display: none; }
  .mark { gap: 12px; } .mark__rule { width: 20px; }
  .topnav { gap: 12px; }
  .topnav a { font-size: 9.5px; letter-spacing: .1em; }
  .topnav__sep { display: none; }
}

/* ---------------------------------------------------------- Hero */

.home-canvas { position: relative; isolation: isolate; overflow: hidden; background: var(--umber); }
.home-canvas__media { position: absolute; inset: 0; z-index: 0; }
.home-canvas__media video, .home-canvas__media img { width: 100%; height: 100%; object-fit: cover; }
.home-canvas__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(80% 60% at 72% 26%, rgba(232,163,61,.20) 0%, rgba(11,10,9,0) 62%),
    linear-gradient(to bottom, rgba(11,10,9,.72) 0%, rgba(11,10,9,.42) 38%, rgba(11,10,9,.92) 100%);
}
.home-canvas::after { z-index: 2; }
.home-canvas > section { position: relative; z-index: 3; }
.hero {
  position: relative;
  min-height: clamp(660px, 80svh, 800px);
  display: flex;
  flex-direction: column;
  padding: clamp(132px, 17svh, 170px) 0 clamp(18px, 2.5svh, 28px);
  overflow: hidden;
  background: transparent;
}
.hero__inner { position: relative; z-index: 2; width: 100%; flex: 1; display: flex; flex-direction: column; gap: clamp(18px, 2.5svh, 26px); }

.hero__eyebrow { display: flex; align-items: center; gap: 18px; }
.hero__eyebrow .tick { width: 56px; height: 1px; background: var(--aqua); flex: none; }
.hero__eyebrow .label { color: var(--sand); letter-spacing: .22em; }

.hero__name {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(46px, 9.2vw, 132px); line-height: .86; letter-spacing: -.05em;
  color: var(--bone); margin: 0; max-width: 1100px;
}

.hero__nav { margin-top: 0; min-height: 42px; justify-content: flex-start; flex-wrap: wrap; row-gap: 10px; }
.hero__nav a { font-family: var(--f-mono); font-weight: 700; font-size: clamp(15px, 1.2vw, 18px); letter-spacing: .08em; }
.hero__foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: clamp(22px, 3vw, 48px);
  margin-top: clamp(42px, 6svh, 60px); border-top: 1px solid var(--hair); padding-top: 24px;
}
.hero__right { display: flex; flex-direction: column; align-items: flex-end; gap: 20px; }
.mode-switch { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mode-switch .label { width: 100%; color: var(--lede); text-align: center; }
.mode-switch__options { position: relative; display: inline-flex; padding: 3px; overflow: hidden; border: 1px solid var(--hair); border-radius: 999px; background: rgba(11,10,9,.24); backdrop-filter: blur(12px); transition: background-color .65s var(--ease), border-color .65s var(--ease); }
.mode-switch__options::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--aqua); box-shadow: 0 5px 18px rgba(200,182,255,.18); transform: translate3d(0,0,0); transition: transform .62s var(--ease), background-color .65s var(--ease), box-shadow .65s var(--ease); }
.mode-switch__options.is-light::before { transform: translate3d(100%,0,0); }
.mode-switch__options button { position: relative; z-index: 1; min-width: 70px; border: 0; border-radius: 999px; padding: 9px 14px; background: transparent; color: var(--lede); cursor: pointer; font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; transition: color .48s var(--ease), transform .32s var(--ease); }
.mode-switch__options button:active { transform: scale(.96); }
.mode-switch__options button[aria-pressed="true"] { color: var(--aqua-ink); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .72s; animation-timing-function: var(--ease); }
html[data-theme="light"] .home-canvas { background: var(--soot); }
html[data-theme="light"] .home-canvas__media video { opacity: .24; filter: saturate(.46) contrast(.78) brightness(1.14); }
html[data-theme="light"] .home-canvas__scrim { background: radial-gradient(72% 54% at 72% 24%, rgba(118,88,184,.055) 0%, rgba(238,234,226,0) 66%), linear-gradient(to bottom, rgba(238,234,226,.74) 0%, rgba(238,234,226,.61) 40%, rgba(238,234,226,.94) 100%); }
html[data-theme="light"] .mode-switch__options { background: rgba(238,234,226,.82); }
html[data-theme="light"] .mode-switch__options button:not([aria-pressed="true"]) { color: var(--muted); }
html[data-theme="light"] .mark__rule { background: rgba(17,17,17,.28); }
@media (max-width: 720px) { .hero { min-height: 100svh; padding-top: 118px; padding-bottom: 24px; } .hero__foot { grid-template-columns: 1fr; gap: 18px; margin-top: clamp(28px, 6svh, 44px); } .hero__right { width: 100%; align-items: flex-start; } .mode-switch { align-items: flex-start; } .mode-switch__options button { min-width: 64px; } .hero__nav { min-height: auto; margin-top: 0; } .hero__nav a { font-size: 13px; } }

@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------------------------------------------------------- Bands */

.band { padding-block: clamp(52px, 5.9vw, 84px) clamp(56px, 6.1vw, 88px); }

.band__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px;
}
.band__count { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------------------------------------------------------- Category cards */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: stretch; }
@media (max-width: 1100px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .cards { grid-template-columns: minmax(0, 1fr); } }
/* ---------------------------------------------------------- Clients */

.client-marquee {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 22px 0;
  border: none;
  background: transparent;
  box-shadow: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}
.client-marquee__track { display: flex; align-items: center; width: max-content; animation: client-marquee 60s linear infinite; will-change: transform; backface-visibility: hidden; transform: translate3d(0,0,0); }
.client-marquee__group { display: flex; align-items: center; gap: 50px; padding-right: 50px; }
.client-marquee__logo { width: auto; height: 82px; display: grid; place-items: center; flex: none; }
.client-marquee__logo img,
.client-marquee__logo[class*="client-marquee__logo--"] img { display: block; width: auto; height: auto; max-width: 150px; max-height: 45px; object-fit: contain; opacity: .60; filter: invert(1); transform: translateZ(0); }
html[data-theme="light"] .client-marquee__logo img { filter: grayscale(1) contrast(1.05); opacity: .76; }
.client-marquee__logo--cli_real_02 img { max-width: 118px; max-height: 59px; }
.client-marquee__logo--cli_real_06 img { max-width: 120px; max-height: 53px; }
.client-marquee__logo--cli_real_07 img { max-width: 92px; max-height: 82px; }
.client-marquee__logo--cli_real_08 img { max-width: 118px; max-height: 55px; }
.client-marquee__logo--cli_real_09 img { max-width: 94px; max-height: 70px; }
.client-marquee__logo--cli_real_10 img { max-width: 96px; max-height: 65px; }
.client-marquee__logo--cli_real_12 img { max-width: 84px; max-height: 65px; }
.client-marquee__logo--cli_real_13 img { max-width: 102px; max-height: 65px; }
.client-marquee__logo--cli_real_14 img { max-width: 98px; max-height: 63px; }
@keyframes client-marquee { to { transform: translate3d(-50%,0,0); } }
@media (max-width: 991px) {
  .client-marquee { padding-block: 18px; }
  .client-marquee__group { gap: 20px; padding-right: 20px; }
  .client-marquee__logo { height: 68px; }
  .client-marquee__logo img,
  .client-marquee__logo[class*="client-marquee__logo--"] img { max-width: 126px; max-height: 58px; }
  .client-marquee__logo--cli_real_07 img { max-width: 72px; max-height: 64px; }
  .client-marquee__logo--cli_real_09 img { max-width: 78px; max-height: 58px; }
  .client-marquee__logo--cli_real_10 img { max-width: 80px; max-height: 54px; }
  .client-marquee__logo--cli_real_12 img { max-width: 72px; max-height: 56px; }
  .client-marquee__logo--cli_real_13 img { max-width: 86px; max-height: 54px; }
  .client-marquee__logo--cli_real_14 img { max-width: 84px; max-height: 54px; }
}
/* ---------------------------------------------------------- Contact */

.contact { padding-block: clamp(56px, 5.9vw, 84px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 3.9vw, 56px); align-items: center; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact__head { font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 3.9vw, 56px); line-height: .98; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.contact__side { display: flex; flex-direction: column; gap: 20px; }
.contact__side p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--body); }
.contact__row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.contact__row a.link { font-weight: 500; font-size: 15px; color: var(--aqua); }

.footbar { border-top: 1px solid var(--line); padding: 20px 0; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }

/* ---------------------------------------------------------- Page header */

.pagehead { padding-block: clamp(44px, 4.7vw, 68px) clamp(36px, 3.6vw, 52px); border-bottom: 1px solid var(--line); background: var(--graphite); }
html[data-theme="light"] .pagehead { background: var(--soot); }
.pagehead__grid { display: grid; grid-template-columns: 1fr 440px; gap: clamp(24px, 4.2vw, 60px); align-items: end; }
@media (max-width: 940px) { .pagehead__grid { grid-template-columns: 1fr; } }
.pagehead__left { display: flex; flex-direction: column; gap: 18px; }
.pagehead__eyebrow { color: var(--aqua); letter-spacing: .14em; }
.pagehead__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(40px, 5.7vw, 82px); line-height: .92; letter-spacing: -.04em; margin: 0; }
.pagehead__right { display: flex; flex-direction: column; gap: 16px; }
.pagehead__blurb { margin: 0; font-size: 17px; line-height: 1.65; color: var(--body); }
.pagehead__meta { display: flex; gap: 26px; font-family: var(--f-mono); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.category-nav { direction: ltr; }
.category-nav .hero__foot { margin-top: clamp(36px, 4.2vw, 56px); }

/* ---------------------------------------------------------- Work list */

.works { padding-block: clamp(40px, 4.2vw, 60px) clamp(56px, 5.6vw, 80px); display: flex; flex-direction: column; gap: 26px; }
.works__empty { color: var(--muted); font-family: var(--f-mono); font-size: 13px; }
.works__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: stretch; }
.content-group + .content-group { margin-top: clamp(54px, 7vw, 96px); }
.content-group__title { margin: 0 0 clamp(20px, 2.5vw, 32px); color: var(--ink); font: 750 clamp(20px, 2.45vw, 33px)/1 Syne, sans-serif; letter-spacing: -.035em; }
.content-group--ungrouped:first-child { margin-top: 0; }
@media (max-width: 1100px) { .works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .works__grid { grid-template-columns: minmax(0, 1fr); } }

.wk { min-width: 0; height: 100%; border: 1px solid var(--line); border-radius: 15px; background: var(--graphite); display: flex; flex-direction: column; overflow: hidden; transform: translateY(0) scale(1); transform-origin: center center; backface-visibility: hidden; will-change: transform; box-shadow: 0 0 0 rgba(0,0,0,0); transition: transform 340ms cubic-bezier(.16,1,.3,1), box-shadow 340ms cubic-bezier(.16,1,.3,1), border-color 320ms ease; }
.wk:hover { transform: translateY(-7px) scale(1.015); box-shadow: 0 16px 40px rgba(0,0,0,.18); }
html[data-theme="light"] .wk:hover { border-color: rgba(17,17,17,.16); box-shadow: 0 16px 40px rgba(17,17,17,.08); }
.wk__media { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--umber); overflow: hidden; cursor: pointer; color: inherit; font: inherit; }
.wk__frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.wk__frame img, .wk__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: var(--media-fit, cover); object-position: var(--media-x, 50%) var(--media-y, 50%); transform: scale(1); transition: opacity .36s var(--ease); }
.wk__frame video { opacity: 0; }
.wk__frame .wk__cover-video { opacity: 1; }
.wk.is-playing .wk__frame video { opacity: 1; }
.wk.is-playing .wk__frame .wk__cover-video { opacity: 0; }


.wk__play { position: absolute; inset: 0; margin: auto; width: 50px; height: 50px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.07); color: rgba(255,255,255,.78); display: grid; place-items: center; opacity: .48; backdrop-filter: blur(5px); transition: transform .42s var(--ease), opacity .3s var(--ease), background-color .65s var(--ease), color .65s var(--ease), border-color .65s var(--ease); }
.wk__media:hover .wk__play { opacity: .68; }
.wk.is-playing .wk__play { opacity: .22; }
.wk__play .play-tri { border-left-width: 13px; border-top-width: 8px; border-bottom-width: 8px; margin-left: 3px; }
html[data-theme="light"] .wk__play { background: rgba(0,0,0,.06); color: rgba(0,0,0,.74); border-color: rgba(0,0,0,.20); }

.wk__text { flex: 1; padding: 24px 24px 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.wk__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(23px, 2vw, 30px); line-height: 1.05; letter-spacing: -.02em; margin: 0; }
.wk__blurb { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); opacity: .88; }


.works__foot { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.works__note { font-family: var(--f-mono); font-size: 13px; color: var(--muted); margin: 0; }

/* Any category can opt into the curated vertical gallery. Homepage cards and
   landscape category pages remain on the established 16:9 system. */
.works--vertical .works__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.works--vertical .wk__frame { aspect-ratio: 9 / 16; }
.works--vertical .wk__frame img,
.works--vertical .wk__frame video { object-fit: cover; }
.works--vertical .wk__text { padding: 19px 18px 22px; gap: 8px; }
.works--vertical .wk__title { font-size: clamp(19px, 1.55vw, 23px); line-height: 1.08; overflow-wrap: anywhere; }
.works--vertical .wk__blurb { font-size: 13px; line-height: 1.5; }
@media (max-width: 1100px) { .works--vertical .works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .works--vertical .works__grid { grid-template-columns: minmax(0, 1fr); } }
/* Mixed galleries use capped, orientation-aware card widths. Flex wrapping keeps
   source order, reflows after content changes and intentionally leaves editorial
   negative space instead of stretching sparse rows into featured cards. */
.works--mixed .works__grid {
  --mixed-gap: clamp(22px, 2.35vw, 34px);
  --mixed-third-gap: clamp(14.667px, 1.567vw, 22.667px);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--mixed-gap);
}
.works--mixed .wk { height: auto; }
.works--mixed .wk--mixed-landscape {
  flex: 0 1 clamp(360px, 36vw, 460px);
  width: clamp(360px, 36vw, 460px);
  max-width: 460px;
}
/* Three or more consecutive landscape projects form a compact three-up row.
   The class is assigned from project order, so Studio drag-and-drop controls it. */
@media (min-width: 1240px) {
  .works--mixed .wk--mixed-landscape-trio {
    flex-basis: calc(33.333333% - var(--mixed-third-gap));
    width: calc(33.333333% - var(--mixed-third-gap));
    max-width: 460px;
  }
}
.works--mixed .wk--mixed-vertical {
  flex: 0 1 clamp(170px, 15vw, 190px);
  width: clamp(170px, 15vw, 190px);
  max-width: 190px;
}
.works--mixed .wk--mixed-landscape .wk__frame { aspect-ratio: 16 / 9; }
/* In a mixed row, both text panels begin on the landscape card's 16:9
   media baseline. The card widths and stretched outer height stay unchanged. */
.works--mixed .wk--mixed-vertical .wk__frame {
  aspect-ratio: auto;
  height: clamp(201.375px, calc(20.25vw - 1.125px), 257.625px);
}
.works--mixed .wk--mixed-vertical .wk__frame img,
.works--mixed .wk--mixed-vertical .wk__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--media-x, 50%) var(--media-y, 50%);
}
.works--mixed .wk--mixed-vertical .wk__text { padding: 19px 18px 22px; gap: 8px; }
.works--mixed .wk--mixed-vertical .wk__title { font-size: clamp(19px, 1.55vw, 23px); line-height: 1.08; overflow-wrap: anywhere; }
.works--mixed .wk--mixed-vertical .wk__blurb { font-size: 13px; line-height: 1.5; }
@media (max-width: 1000px) {
  .works--mixed .wk--mixed-landscape {
    flex-basis: clamp(330px, 54vw, 400px);
    width: clamp(330px, 54vw, 400px);
    max-width: 400px;
  }
  .works--mixed .wk--mixed-vertical {
    flex-basis: clamp(165px, 25vw, 185px);
    width: clamp(165px, 25vw, 185px);
    max-width: 185px;
  }
  .works--mixed .wk--mixed-vertical .wk__frame {
    height: clamp(184.5px, calc(30.375vw - 1.125px), 223.875px);
  }
}
@media (max-width: 700px) {
  .works--mixed .works__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
  .works--mixed .wk--mixed-landscape {
    width: 100%;
    max-width: 100%;
  }
  .works--mixed .wk--mixed-vertical {
    width: min(76vw, 320px);
    max-width: 320px;
    justify-self: center;
  }
  .works--mixed .wk--mixed-vertical .wk__frame { aspect-ratio: 9 / 16; }
}
/* ---------------------------------------------------------- About */

.about { padding-block: clamp(48px, 5.3vw, 76px) clamp(44px, 4.7vw, 68px); display: grid; grid-template-columns: 500px 1fr; gap: clamp(28px, 4.4vw, 64px); align-items: start; }
@media (max-width: 1000px) { .about { grid-template-columns: 1fr; } }
.about__portrait { position: relative; aspect-ratio: 4 / 5; background: var(--umber); border: 1px solid var(--line); overflow: hidden; }
.about__portrait img { width: 100%; height: 100%; object-fit: cover; }
.about__portrait .stamp { position: absolute; left: 18px; bottom: 16px; font-family: var(--f-mono); font-weight: 500; font-size: 11px; color: var(--muted); }
.about__copy { display: flex; flex-direction: column; gap: 26px; }
.about__head { font-family: var(--f-display); font-weight: 800; font-size: clamp(32px, 4.4vw, 64px); line-height: .94; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.about__body { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.about__body p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--body); }
.about-skills { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(20px, 2.1vw, 32px) clamp(18px, 2vw, 30px); width: 100%; max-width: 640px; padding-top: 4px; }
.about-skill { flex: 0 1 calc(25% - 23px); min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink); text-align: center; }
.about-skill__icon { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--graphite); color: var(--bone); }
.about-skill__icon svg { width: 38px; height: 34px; overflow: visible; }
.about-skill__icon svg text { fill: currentColor; font: 800 25px/1 var(--f-display); letter-spacing: -.04em; }
.about-skill__icon svg path, .about-skill__icon svg rect, .about-skill__icon svg circle { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.about-skill__icon svg path:first-child:not(:last-child) { stroke-width: 3; }
.about-skill__mark { width: 38px; height: 34px; display: block; }
.about-skill__mark--mask { background: currentColor; -webkit-mask-image: var(--skill-mask); mask-image: var(--skill-mask); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.about-skill > span:last-child:not(.about-skill__icon) { font-family: var(--f-mono); font-size: 11px; line-height: 1.35; letter-spacing: .035em; color: var(--body); }
@media (max-width: 1180px) and (min-width: 1001px) { .about-skill { flex-basis: calc(33.333% - 20px); } }
@media (max-width: 680px) { .about-skills { gap: 22px 16px; } .about-skill { flex-basis: calc(50% - 10px); min-width: 0; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 0; padding: 0; }
.stats div { border: 1px solid var(--line); background: var(--graphite); padding: 20px; }
.stats dt { font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--aqua); margin: 0; }
.stats dd { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }

.toolband { background: var(--graphite); border-block: 1px solid var(--line); }
html[data-theme="light"] .toolband { background: rgba(227,222,212,.72); }
.toolband__grid { padding-block: clamp(34px, 3.9vw, 56px); display: grid; grid-template-columns: 300px 1fr; gap: clamp(26px, 3.9vw, 56px); }
@media (max-width: 900px) { .toolband__grid { grid-template-columns: 1fr; } }
.toolband__intro { display: flex; flex-direction: column; gap: 10px; }
.toolband__intro .label { color: var(--aqua); letter-spacing: .14em; }
.toolband__intro p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }
.toolgroups { display: flex; flex-direction: column; gap: 26px; }
.toolgroup { display: flex; flex-direction: column; gap: 12px; }
.toolgroup .label { font-size: 11px; letter-spacing: .12em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { border: 1px solid #3A3531; padding: 10px 14px; border-radius: 999px; font-weight: 500; font-size: 14px; }
html[data-theme="light"] .chips li { border-color: var(--line); }
.chips--filled li { background: var(--aqua); color: var(--aqua-ink); border-color: var(--aqua); font-weight: 600; }

.closer { padding-block: clamp(44px, 4.7vw, 68px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.closer h2 { font-family: var(--f-display); font-weight: 800; font-size: clamp(28px, 3.5vw, 50px); line-height: 1; letter-spacing: -.03em; margin: 0; }

/* Safe, reusable page blocks. Existing About and Contact keep their original classes above. */
.managed-section { padding-block: clamp(48px, 7vw, 104px); max-width: 920px; }
.managed-section h2,.managed-split h2 { font-family: var(--f-display); font-size: clamp(34px, 5vw, 72px); line-height: .98; letter-spacing: -.04em; margin: 0 0 24px; }
.managed-section>p,.managed-split>div>p { color: var(--muted); font-size: clamp(16px, 1.4vw, 20px); line-height: 1.65; margin: 0 0 16px; }
.managed-section__lead { color: var(--ink)!important; }
.managed-split { padding-block: clamp(48px, 7vw, 104px); display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.8fr); gap: clamp(32px,7vw,110px); align-items: center; }
.managed-split figure { margin: 0; }
.managed-split img,.managed-cards img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.managed-split figcaption { margin-top: 10px; color: var(--muted); font: 500 10px var(--f-mono); letter-spacing: .08em; }
.managed-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.managed-cards article { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--umber); }
.managed-cards h3 { font-family: var(--f-display); font-size: 24px; margin: 16px 0 8px; }
.managed-cards p { color: var(--muted); line-height: 1.55; }
.managed-cards a { color: var(--aqua); }
.managed-divider { height: 1px; background: var(--line); }
@media(max-width:800px){.managed-split{grid-template-columns:1fr}.managed-cards{grid-template-columns:1fr}}

/* ---------------------------------------------------------- Player */

/* The page stays visible and blurred behind the video, so the clip reads as
   lifting off the page rather than replacing it. */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(11, 10, 9, .78);
  backdrop-filter: blur(26px) saturate(.85);
  -webkit-backdrop-filter: blur(26px) saturate(.85);
  opacity: 0; transition: opacity .5s var(--ease);
}
.lightbox:focus-visible { outline: none; }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

/* Geometry is set from JS so the stage always matches the clip's own ratio —
   a 9:16 social piece becomes a tall frame, never a letterboxed wide one. */
.lightbox__stage {
  position: fixed; margin: 0; overflow: hidden;
  background: #000;
  box-shadow: 0 40px 120px rgba(0,0,0,.7), 0 0 0 1px rgba(245,242,236,.08);
  will-change: transform, opacity;
}
.lightbox__video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }

.lightbox__meta {
  position: absolute; left: clamp(18px, 2.8vw, 40px); top: clamp(18px, 2.4vw, 34px);
  display: flex; flex-direction: column; gap: 10px; max-width: min(680px, 46vw); z-index: 2;
  text-shadow: 0 2px 28px rgba(11,10,9,.95); pointer-events: none;
  transition: opacity .4s var(--ease);
}
.lightbox__meta .label { color: var(--aqua); letter-spacing: .18em; }
.lightbox__meta h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(22px, 2.4vw, 36px); line-height: 1.02; letter-spacing: -.03em; margin: 0; }
.lightbox__blurb { margin: 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.5; color: var(--lede); }
html[data-theme="light"] .lightbox { background: rgba(17,17,17,.76); }
html[data-theme="light"] .lightbox__meta h2 { color: #F5F3EE; }
html[data-theme="light"] .lightbox__blurb { color: rgba(245,243,238,.72); }
html[data-theme="light"] .lightbox .pill--ghost { color: #F5F3EE; border-color: rgba(245,243,238,.22); }
html[data-theme="light"] .lightbox__close { color: #F5F3EE; background: rgba(245,243,238,.14); }

.lightbox__tools { position: absolute; top: clamp(18px, 2.4vw, 34px); right: clamp(18px, 2.8vw, 40px); display: flex; align-items: center; gap: 12px; z-index: 3; }
.lightbox__close { width: 42px; height: 42px; border-radius: 999px; border: 0; background: rgba(245,242,236,.14); color: var(--bone); display: grid; place-items: center; cursor: pointer; font-size: 18px; transition: background-color .3s var(--ease), color .3s var(--ease); }
.lightbox__close:hover { background: var(--aqua); color: var(--aqua-ink); }
.lightbox__next { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The titles rise in over the tail of the flight rather than snapping on at
   the end — the arrival should feel continuous, not like a second event. */
.lightbox__meta,
.lightbox__tools {
  opacity: 0; transform: translateY(10px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.lightbox.is-ready .lightbox__meta { opacity: 1; transform: none; transition-delay: .06s; }
.lightbox.is-ready .lightbox__tools { opacity: 1; transform: none; transition-delay: .14s; }
.lightbox:not(.is-ready) .lightbox__tools { pointer-events: none; }

@media (max-width: 900px) {
  .lightbox__meta { max-width: 56vw; }
  .lightbox__blurb { display: none; }
  .lightbox__next { display: none; }
}

@keyframes wave-breathe {
  0% { transform: translate3d(-1.2%, 0.7%, 0) scale(1.018); }
  50% { transform: translate3d(0.8%, -0.9%, 0) scale(1.038); }
  100% { transform: translate3d(1.35%, 0.9%, 0) scale(1.055); }
}
/* ---------------------------------------------------------- Motion */

[data-reveal] { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

.hero__inner > * { animation: rise 1.05s var(--ease) both; }
.hero__inner > *:nth-child(2) { animation-delay: .08s; }
.hero__inner > *:nth-child(3) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 26px, 0); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .client-marquee__track { animation: none; transform: none; }
}
