/* ═══════════════════════════════════════════════════════════
   COGEL — Video Editing Studio
   Monochrome editorial system + signature purple accent
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Palette — monochrome base */
  --white: #ffffff;
  --black: #000000;
  --gray-950: #0a0a0a;
  --gray-900: #141414;
  --gray-800: #1f1f1f;
  --gray-600: #4d4d4d;
  --gray-500: #6b6b6b;
  --gray-400: #9a9a9a;
  --gray-300: #c4c4c4;
  --gray-200: #e2e2e2;
  --gray-100: #f0f0f0;
  --gray-50:  #f8f8f8;

  /* Brand — signature purple accent */
  --brand:        #531F6A; /* core mark colour */
  --brand-strong: #431857; /* pressed / hover-darken */
  --brand-soft:   #9c6bc0; /* lighter violet for dark backgrounds */
  --brand-tint:   rgba(83, 31, 106, 0.12); /* faint wash */

  /* Type */
  --font-sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  /* Rhythm */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(56px, 8vh, 96px);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.9s;

  --nav-h: 76px;
  --footer-h: 77px; /* bar 76px + 1px top border */
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
}

/* native smooth scroll only on mobile — desktop scrolling is JS-driven section snap */
@media (max-width: 899px) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--brand); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--brand); /* serif italics carry the brand colour */
}

/* ═══════════════ REVEAL SYSTEM ═══════════════ */

[data-reveal] {
  opacity: 0;
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out),
    clip-path 1.1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal="fade-up"]    { transform: translateY(36px); }
[data-reveal="fade-right"] { transform: translateX(-40px); }
[data-reveal="fade-left"]  { transform: translateX(40px); }
[data-reveal="scale"]      { transform: scale(0.92); }
[data-reveal="clip"]       { clip-path: inset(0 100% 0 0); opacity: 1; transform: none; }
[data-reveal="mask"]       { clip-path: inset(0 0 100% 0); transform: translateY(20px); }

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
}

/* words reveal — spans injected by JS */
[data-reveal="words"] { opacity: 1; transform: none; }
[data-reveal="words"] .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
[data-reveal="words"] .w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out);
  transition-delay: var(--w-delay, 0ms);
}
[data-reveal="words"].is-visible .w > span { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], [data-reveal="words"] .w > span {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  .hero__scroll svg, .marquee__track, #floating-logo { animation: none !important; transition: none !important; }
}

/* ═══════════════ FLOATING LOGO ═══════════════ */

#floating-logo {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  width: 120px;
  opacity: 0;
  pointer-events: auto;
  will-change: transform;
  transform-origin: center;
  transition: opacity 1s var(--ease-soft);
}

#floating-logo.is-ready { opacity: 1; }

#floating-logo img {
  width: 100%;
  filter: brightness(0); /* renders the source PNG as pure black */
  transition: transform 0.55s var(--ease-out), filter 0.6s var(--ease-soft), opacity 0.45s var(--ease-soft);
  user-select: none;
}

#floating-logo:not(.logo--morphed):hover img {
  transform: scale(1.05) rotate(2deg);
}

#floating-logo.logo--inverse img { filter: brightness(0) invert(1); }

/* ── logo ⇄ arrow morph (category carousel "next" control) ── */
.floating-logo__arrow {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 10px 22px -10px rgba(83, 31, 106, 0.6);
  opacity: 0;
  transform: scale(0.3) rotate(-45deg);
  transition: transform 0.55s var(--ease-out), opacity 0.45s var(--ease-soft), background 0.3s var(--ease-soft);
  pointer-events: none;
}

#floating-logo.logo--morphed { cursor: pointer; }
#floating-logo.logo--morphed img { opacity: 0; transform: scale(0.4) rotate(45deg); }
#floating-logo.logo--morphed .floating-logo__arrow { opacity: 1; transform: scale(1) rotate(0); }
#floating-logo.logo--morphed:hover .floating-logo__arrow { transform: scale(1.1); background: var(--brand-strong); }

@media (max-width: 900px) {
  #floating-logo { display: none; }
}

/* ═══════════════ NAVBAR ═══════════════ */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease-soft), background 0.4s var(--ease-soft);
}

.navbar.is-scrolled {
  border-bottom-color: var(--gray-200);
  background: rgba(255, 255, 255, 0.88);
}

.navbar__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.navbar__left { display: flex; justify-content: flex-start; }
.navbar__right { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }

/* Language switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 3px;
}

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  transition: color 0.3s var(--ease-soft), background 0.3s var(--ease-soft);
}

.lang-switch__btn:hover { color: var(--black); }
.lang-switch__btn.is-active { background: var(--black); color: var(--white); }
.lang-switch__divider { width: 1px; height: 14px; background: var(--gray-200); }

/* Center nav */
.navbar__center {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  padding: 6px 2px;
  transition: color 0.3s var(--ease-soft);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}

.nav-link:hover { color: var(--black); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-link.is-active { color: var(--black); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  white-space: nowrap;
  transition:
    background 0.35s var(--ease-soft),
    color 0.35s var(--ease-soft),
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-soft);
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--brand);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--brand-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -12px rgba(83, 31, 106, 0.5);
}

.btn--nav { padding: 10px 22px; font-size: 13px; }

.btn--ghost {
  color: var(--black);
  padding-inline: 10px;
}
.btn--ghost svg { transition: transform 0.35s var(--ease-out); }
.btn--ghost:hover svg { transform: translateX(5px); }

.btn--outline {
  border: 1px solid var(--black);
  color: var(--black);
  background: transparent;
}
.btn--outline:hover {
  background: var(--black);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--inverse {
  background: var(--white);
  color: var(--black);
  padding: 18px 40px;
  font-size: 15px;
}
.btn--inverse:hover {
  transform: translateY(-2px);
  /* symmetric halo (0 offset) so the top edge glows too — kills the "cut" look on black */
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.16);
}

/* Mobile toggle */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}
.navbar__toggle span {
  width: 22px;
  height: 1.6px;
  background: var(--black);
  transition: transform 0.4s var(--ease-out);
}
.navbar__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
.navbar__toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.8px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px var(--gutter) 28px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-200);
}
.mobile-menu__link {
  padding: 12px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
  transition: color 0.3s;
}
.mobile-menu__link:hover, .mobile-menu__link.is-active { color: var(--black); }
.mobile-menu__cta { margin-top: 20px; }

@media (max-width: 900px) {
  .navbar__center, .navbar__right .btn--nav { display: none; }
  .navbar__toggle { display: flex; }
  .navbar__inner { grid-template-columns: auto 1fr; }
  .navbar__right { justify-self: end; }
  .navbar.menu-open .mobile-menu { display: flex; }
}

/* ═══════════════ HERO ═══════════════ */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + 124px); /* reserves the crest zone for the floating logo */
  padding-bottom: 70px; /* marquee band height */
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-block: auto; /* vertically centers the content between crest zone and marquee */
}

/* demo reel looping behind the whole hero */
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__bg::after {
  /* soft cinematic scrim — keeps the reel visible while white copy reads on top */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.46) 100%),
    radial-gradient(92% 72% at 50% 44%, rgba(0, 0, 0, 0.36) 0%, transparent 74%);
}

/* ── Hero copy goes light over the reel (specificity beats base rules) ── */
.hero .hero__eyebrow { color: rgba(255, 255, 255, 0.82); }
.hero .hero__eyebrow::before,
.hero .hero__eyebrow::after { background: rgba(255, 255, 255, 0.6); }

.hero .hero__title { color: var(--white); }
/* lighter violet keeps the serif accents legible over the darkened reel */
.hero .hero__title em { color: var(--brand-soft); }
.hero .hero__sub { color: rgba(255, 255, 255, 0.86); }

.hero .hero__scroll { color: rgba(255, 255, 255, 0.72); }
.hero .hero__scroll:hover { color: var(--white); }

/* buttons flip to read against the darkened reel */
.hero .btn--primary { background: var(--white); color: var(--black); }
.hero .btn--primary:hover {
  background: var(--gray-100);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.55);
}
.hero .btn--ghost { color: var(--white); }

/* black band pinned to the bottom edge of the hero viewport */
.hero .marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}

.hero__eyebrow,
.section-head__eyebrow,
.cta__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.hero__eyebrow::before,
.hero__eyebrow::after,
.section-head__eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--brand); /* brand-tinted accent rule in section headers */
}

.hero__title {
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin-inline: auto;
  margin-bottom: 22px;
}

.hero__title em { font-weight: 400; letter-spacing: -0.01em; }

.hero__sub {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--gray-500);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: 30px;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero__scroll {
  margin-top: clamp(28px, 5vh, 56px);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-400);
  transition: color 0.3s var(--ease-soft);
}
.hero__scroll:hover { color: var(--black); }
.hero__scroll svg { animation: scroll-bounce 2.2s var(--ease-soft) infinite; }

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50%       { transform: translateY(7px); opacity: 0.45; }
}

/* ═══════════════ PLAYER PLACEHOLDER ═══════════════ */

.player {
  border-radius: 14px;
  overflow: hidden;
  background: var(--gray-950);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.35);
}

.player__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 90% at 70% 15%, #262626 0%, #101010 55%, #050505 100%);
}

/* demo reel — looping GIF filling the player screen */
.player__reel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player--reel .player__screen::after {
  /* subtle top scrim so the badge stays legible over the footage */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 64px;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
}

.player--reel .player__badge { z-index: 2; color: rgba(255, 255, 255, 0.85); }

.player__noise {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(90% 90% at 50% 50%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(90% 90% at 50% 50%, #000 30%, transparent 100%);
}

.player__badge {
  position: absolute;
  top: 18px;
  left: 20px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.player__coming {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.4);
}

.player__play {
  position: relative;
  z-index: 2;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.45s var(--ease-out), background 0.35s, border-color 0.35s;
}

.player__play:hover {
  transform: scale(1.08);
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}

.player__play svg { margin-left: 2px; }

/* play / pause icon swap */
.icon-pause { display: none; }
.player.is-playing .icon-play { display: none; }
.player.is-playing .icon-pause { display: block; }
.player.is-playing .player__play svg { margin-left: 0; }

.player__controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--black);
  color: rgba(255, 255, 255, 0.75);
}

.player__ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.3s, background 0.3s;
}
.player__ctrl:hover { color: var(--white); background: rgba(255, 255, 255, 0.1); }

.player__time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
}

.player__progress {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.player__bar {
  width: 0%;
  height: 100%;
  border-radius: 3px;
  background: var(--white);
  transition: width 0.25s linear;
}

/* ═══════════════ MARQUEE ═══════════════ */

.marquee {
  padding-block: 24px;
  overflow: hidden;
  background: var(--black);
}

.marquee__track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-inline: 28px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.marquee__item::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-soft);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ═══════════════ SECTION HEAD ═══════════════ */

.section-head { max-width: 720px; margin-bottom: clamp(28px, 3.5vh, 44px); }

.section-head__title {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-head__title em { font-weight: 400; }

.section-head__sub {
  margin-top: 20px;
  font-size: 17px;
  color: var(--gray-500);
  max-width: 52ch;
}

/* ═══════════════ WORK ═══════════════ */

/* purple gradient + blueprint backdrop, adapted from the studio's social logo art */
.work {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #f5f0f9 0%, #ece1f4 52%, #e2d2ee 100%);
}

.work > .container { position: relative; z-index: 1; }

.work__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* faint construction grid */
.work__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(83, 31, 106, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 31, 106, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(130% 100% at 78% 12%, #000 25%, transparent 82%);
  -webkit-mask-image: radial-gradient(130% 100% at 78% 12%, #000 25%, transparent 82%);
}

/* blueprint guides — dashed frame, diagonals, sparkles */
.work__blueprint {
  position: absolute;
  top: 50%;
  right: clamp(-160px, -6vw, -40px);
  transform: translateY(-50%);
  width: clamp(380px, 42vw, 620px);
  height: auto;
  color: var(--brand);
}
.work__blueprint .bp-ring { stroke: currentColor; stroke-width: 1; opacity: 0.14; }
.work__blueprint .bp-frame { stroke: currentColor; stroke-width: 1; stroke-dasharray: 7 7; opacity: 0.22; }
.work__blueprint .bp-guide { stroke: currentColor; stroke-width: 1; stroke-dasharray: 3 6; opacity: 0.13; }
.work__blueprint .bp-star { fill: currentColor; opacity: 0.5; }
.work__blueprint .bp-star--sm { opacity: 0.32; }

/* oversized logo watermark echoing the reference art */
.work__watermark {
  position: absolute;
  top: 50%;
  right: clamp(-120px, -3vw, -20px);
  transform: translateY(-50%);
  width: clamp(280px, 34vw, 500px);
  opacity: 0.06;
  filter: grayscale(0.2);
}

@media (max-width: 899px) {
  .work__blueprint, .work__watermark { opacity: 0; }
  .work__watermark { opacity: 0.05; right: -80px; }
}

/* arrows flank the chip row in their own slots — never overlapping a chip */
.work__cats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(20px, 2.5vh, 30px);
}

.cats__viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* smooth scroll is driven in JS (rAF) so it works under reduced-motion too */
  /* soft edge fades hint that the row scrolls */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent 100%);
}
.cats__viewport::-webkit-scrollbar { display: none; }

.work__cats.is-scrolled .cats__viewport {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}

.work__filters {
  display: flex;
  gap: 10px;
  width: max-content;
  padding-block: 4px;
}

.cats__arrow {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--brand);
  box-shadow: 0 8px 20px -8px rgba(83, 31, 106, 0.35);
  transition: opacity 0.35s var(--ease-soft), transform 0.35s var(--ease-out),
    background 0.3s var(--ease-soft), color 0.3s var(--ease-soft), border-color 0.3s;
}
.cats__arrow:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}
.cats__arrow--prev { order: -1; }

/* keep the flex slot reserved (opacity, not display) so nothing shifts */
.cats__arrow--prev.is-hidden,
.cats__arrow--next.is-end {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
}

/* on desktop the floating logo IS the next control, so the DOM arrow only
   holds the anchor slot (invisible) — but stays reachable by keyboard */
@media (min-width: 900px) {
  .cats__arrow--next { opacity: 0; }
  .cats__arrow--next:focus-visible { opacity: 1; }
}

.filter {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  transition: all 0.35s var(--ease-soft);
}

.filter:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}

.filter.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 26px);
}

/* 3 columns hold down to the snap threshold so the section fits one screen */
@media (max-width: 899px) { .work__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .work__grid { grid-template-columns: 1fr; } }

/* Card */
.card {
  /* button elements vertically-center their content — that pushed the
     thumbnail down (white gap on top) on cards with shorter titles once the
     grid stretched them. flex-column pins the thumbnail to the top instead. */
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease-out), border-color 0.4s;
  opacity: 0;
  transform: translateY(28px);
  animation: card-in 0.8s var(--ease-out) forwards;
  animation-delay: var(--card-delay, 0ms);
}

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.22);
  border-color: var(--gray-300);
}

.card__thumb {
  display: block; /* spans are inline — without this the aspect-ratio collapses */
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-950);
}

.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* full colour by default; hover just zooms while the overlay darkens in */
  transition: transform 0.7s var(--ease-out);
}

.card:hover .card__img {
  transform: scale(1.05);
}

.card__duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 3px 9px;
  border-radius: 5px;
}

.card__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.45s var(--ease-soft);
}

.card:hover .card__overlay,
.card:focus-visible .card__overlay { opacity: 1; }

.card__overlay svg { transition: transform 0.4s var(--ease-out); }
.card:hover .card__overlay svg { transform: translateX(4px); }

.card__body {
  padding: 15px 20px 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* allow the title/meta column to shrink so long text can truncate
   (keeps card height stable → the "View All" button never drifts down) */
.card__col { min-width: 0; }

.card__title {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  /* cap at two lines so extra-long titles don't grow the card */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__meta {
  margin-top: 6px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* categories stay on one line, ellipsised if there are too many */
.card__cats {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__meta::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--gray-300);
}

.card__year {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.work__more {
  display: flex;
  justify-content: center;
  margin-top: clamp(20px, 2.5vh, 30px);
}

.work__empty {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: var(--gray-400);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
}

/* ── loading skeleton (until the real portfolio loads) ── */
.card--skeleton { cursor: default; animation: none; opacity: 1; transform: none; }
.card--skeleton:hover { transform: none; box-shadow: none; border-color: var(--gray-200); }
.card--skeleton .card__thumb { background: var(--gray-100); }
.card__body--sk { display: block; }

.sk { position: relative; overflow: hidden; background: var(--gray-100); }
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: sk-shimmer 1.4s ease-in-out infinite;
}
@keyframes sk-shimmer { to { transform: translateX(100%); } }

.sk-line { display: block; height: 13px; border-radius: 6px; margin-bottom: 10px; }
.sk-line--short { width: 55%; margin-bottom: 0; }

/* ═══════════════ ABOUT ═══════════════ */

.about { position: relative; overflow: hidden; }

.about__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--gray-100) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray-100) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.5;
  mask-image: radial-gradient(75% 65% at 30% 40%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(75% 65% at 30% 40%, #000 0%, transparent 100%);
  animation: bg-drift 30s linear infinite alternate;
}

@keyframes bg-drift {
  from { background-position: 0 0; }
  to   { background-position: 72px 36px; }
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(44px, 6vw, 88px);
  align-items: start;
  position: relative;
}

.about__media { position: sticky; top: calc(var(--nav-h) + 40px); }

.about__lead {
  font-size: clamp(19px, 1.9vw, 23px);
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--black);
  margin-bottom: 22px;
}

.about__text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-500);
  margin-bottom: 22px;
  max-width: 54ch;
}

.about__sign {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-200);
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.8;
}

.about__sign em {
  display: block;
  font-size: 26px;
  color: var(--brand); /* studio signature in the brand colour */
  margin-top: 6px;
}

.about__points {
  display: flex;
  flex-direction: column;
}

.about-point {
  display: flex;
  gap: 24px;
  padding-block: 24px;
  border-top: 1px solid var(--gray-200);
}

.about-point__num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}

.about-point h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.about-point p {
  font-size: 14px;
  color: var(--gray-500);
}

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media { position: static; }
}

/* ═══════════════ CTA ═══════════════ */

.cta {
  background: var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding-block: clamp(72px, 12vh, 130px) clamp(56px, 8vh, 88px);
}

.cta__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.cta__eyebrow { color: var(--gray-400); justify-content: center; }

.cta__title {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 22px;
}

.cta__sub {
  font-size: 16px;
  color: var(--gray-400);
  margin-bottom: 36px;
}

/* ═══════════════ FOOTER ═══════════════ */

.footer {
  background: var(--black);
  color: var(--gray-400);
  border-top: 1px solid var(--gray-900);
}

/* single centered line: copyright + social icons */
.footer__bar {
  min-height: 76px; /* --footer-h (77px) = this + the footer's 1px top border */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 28px;
  padding-block: 16px;
}

.footer__copy {
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--gray-500);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gray-800);
  color: var(--gray-400);
  transition: all 0.4s var(--ease-out);
}

.social:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
  transform: translateY(-3px);
}

/* ═══════════════ MODALS ═══════════════ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  visibility: hidden;
  pointer-events: none;
}

.modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.5s var(--ease-soft);
}

.modal.is-open .modal__backdrop { opacity: 1; }

.modal__panel {
  position: relative;
  z-index: 2;
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-height: calc(100vh - 48px);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

.modal.is-open .modal__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal__panel--project { max-width: 880px; }
.modal__panel--viewall { max-width: 1080px; }

.modal__close {
  position: sticky;
  top: 16px;
  margin-left: calc(100% - 52px);
  margin-right: 16px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  transition: all 0.35s var(--ease-out);
}

.modal__close:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
  transform: rotate(90deg);
}

.modal__player { padding: 0 clamp(20px, 4vw, 40px); margin-top: -20px; }

.yt-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--black);
}

.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.modal__info { padding: 28px clamp(20px, 4vw, 40px) clamp(28px, 4vw, 40px); }

.modal__title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.modal__desc {
  font-size: 15.5px;
  color: var(--gray-500);
  max-width: 62ch;
  margin-bottom: 28px;
}

.modal__meta {
  display: flex;
  gap: clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--gray-200);
  padding-top: 24px;
  flex-wrap: wrap;
}

.modal__meta dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 5px;
}

.modal__meta dd {
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
}

/* View-all modal */
.modal__head { padding: 0 clamp(20px, 4vw, 40px) 8px; margin-top: -16px; }

.modal__cat {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--gray-500);
}

.modal__count {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 6px;
}

.viewall__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px clamp(20px, 4vw, 40px) clamp(28px, 4vw, 40px);
}

@media (max-width: 900px) { .viewall__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .viewall__grid { grid-template-columns: 1fr; } }

/* ═══════════════ CONTACT POPUP ═══════════════ */

.modal__panel--contact { max-width: 440px; }

.modal__panel--contact .modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  margin: 0;
}

.contact-pop { padding: 34px clamp(22px, 4vw, 34px) clamp(28px, 4vw, 34px); }

.contact-pop__eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.1;
  color: var(--brand);
  margin-bottom: 8px;
}

.contact-pop__sub {
  font-size: 14.5px;
  color: var(--gray-500);
  max-width: 40ch;
  margin-bottom: 24px;
}

.contact-pop__tiles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ctile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  transition: border-color 0.3s var(--ease-soft), transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-soft), background 0.3s var(--ease-soft);
}

.ctile:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -16px rgba(83, 31, 106, 0.5);
}

.ctile__icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-tint);
  color: var(--brand);
  transition: background 0.3s var(--ease-soft), color 0.3s var(--ease-soft);
}

.ctile:hover .ctile__icon { background: var(--brand); color: var(--white); }

.ctile__text { display: flex; flex-direction: column; gap: 2px; }
.ctile__label { font-size: 15px; font-weight: 600; color: var(--black); }
.ctile__sub { font-size: 13px; color: var(--gray-500); }

/* ═══════════════ RESPONSIVE — HERO/GENERAL ═══════════════ */

@media (max-width: 900px) {
  .hero { padding-top: calc(var(--nav-h) + 56px); }
}

@media (max-width: 560px) {
  .hero__actions { gap: 14px; }
  .hero__actions .btn--primary { width: 100%; }
  .modal__meta { gap: 24px; }
}

/* ═══════════════ SECTION SNAP (desktop) ═══════════════ */

/* shorter desktop screens: tighten the rhythm so every section fits one viewport */
@media (min-width: 900px) and (max-height: 1019px) {
  .hero { padding-top: calc(var(--nav-h) + 112px); }
  .hero__eyebrow { margin-bottom: 18px; }
  .hero__title { font-size: clamp(36px, 4.4vw, 56px); margin-bottom: 18px; }
  .hero__sub { margin-bottom: 24px; }
  .hero__scroll { margin-top: 20px; margin-bottom: 12px; }
  .section-head { margin-bottom: 28px; }
  .about__lead { font-size: 19px; margin-bottom: 16px; }
  .about__text { margin-bottom: 16px; }
  .about__sign { margin-top: 22px; padding-top: 20px; }
  .card__body { padding: 12px 18px 14px; }
  .work.section { padding-block: 36px; }
  .work.section .container { max-width: 960px; }
  .work .section-head { margin-bottom: 18px; }
  .work__grid { gap: 14px; }
  .work__cats { margin-bottom: 14px; }
  .work__more { margin-top: 14px; }
  .cta { padding-block: clamp(64px, 10vh, 110px) clamp(48px, 7vh, 80px); }
}

@media (min-width: 900px) {
  .work.section,
  .about.section {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  /* slightly narrower grid keeps the 2×3 work layout inside one screen */
  .work .container { max-width: 1100px; }
  /* contact + footer share one screen — the CTA fills everything above the footer bar */
  .cta.section {
    min-height: calc(100svh - var(--footer-h));
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
