/* ============================================================
   NUTCOM — Editorial system · Black + Blue · Light & Dark
   ============================================================ */

:root {
  /* Brand (shared across themes) */
  --blue:         #5468E5;
  --blue-bright:  #7C8AFF;
  --blue-deep:    #3A45B5;
  --blue-glow:    #9D8FE8;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* Fonts are self-hosted through next/font (see src/app/layout.tsx), which
     exposes --font-fraunces / --font-inter / --font-space-mono on <html>. */
  --font-display: var(--font-fraunces, Fraunces, 'Times New Roman', serif);
  --font-sans:    var(--font-inter, Inter, system-ui, sans-serif);
  --font-mono:    var(--font-space-mono, 'Space Mono', ui-monospace, monospace);
  --font-brand:   var(--font-inter, Inter, system-ui, sans-serif);

  /* Dark theme (default) */
  --bg:          #0A0A14;
  --bg-2:        #13131F;
  --bg-3:        #1C1C2A;
  --line:        #22223A;
  --text:        #F5F1EA;
  --text-muted:  #B0B0BD;
  --text-soft:   #6F6F82;
  --invert-fg:   #0A0A14;
  --invert-bg:   #F5F1EA;
  --grain-opacity: 0.05;
  --glow-opacity: 0.18;
}

[data-theme="light"] {
  --bg:          #F5F4F0;
  --bg-2:        #FFFFFF;
  --bg-3:        #EDECE5;
  --line:        #DCD9CF;
  --text:        #0A0A14;
  --text-muted:  #4B4B5A;
  --text-soft:   #8B8A95;
  --invert-fg:   #F5F4F0;
  --invert-bg:   #0A0A14;
  --grain-opacity: 0.03;
  --glow-opacity: 0.12;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans), system-ui, sans-serif;
  font-feature-settings: "ss01", "ss02", "cv11";
  overflow-x: hidden;
  transition: background-color 0.6s var(--ease-out-quart), color 0.6s var(--ease-out-quart);
}

body { min-height: 100vh; cursor: default; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ----------------------------------------------------------
   Typography
   ---------------------------------------------------------- */

.font-display {
  font-family: var(--font-display), 'Times New Roman', serif;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  letter-spacing: -0.02em;
  line-height: 0.92;
  font-weight: 400;
}

.font-display-italic {
  font-family: var(--font-display), serif;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  letter-spacing: -0.015em;
  font-weight: 300;
}

.font-mono {
  font-family: var(--font-mono), ui-monospace, monospace;
  letter-spacing: 0.04em;
}

.font-brand {
  font-family: var(--font-brand), var(--font-sans), sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.eyebrow {
  font-family: var(--font-mono), monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow-blue { color: var(--blue-bright); }

.display-xl {
  font-size: clamp(3rem, 14vw, 13rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
}

.display-lg {
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
}

.display-md {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.text-blue { color: var(--blue-bright); }
.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.bg-surface { background: var(--bg-2); }
.bg-surface-2 { background: var(--bg-3); }
.border-line { border-color: var(--line); }

/* ----------------------------------------------------------
   Grain
   ---------------------------------------------------------- */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain 6s steps(6) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-1%, -2%); }
  20% { transform: translate(-2%, 1%); }
  30% { transform: translate(1%, -3%); }
  40% { transform: translate(-1%, 3%); }
  50% { transform: translate(-3%, 1%); }
  60% { transform: translate(2%, 0%); }
  70% { transform: translate(0%, 2%); }
  80% { transform: translate(-2%, -1%); }
  90% { transform: translate(2%, 1%); }
}

/* ----------------------------------------------------------
   Glows
   ---------------------------------------------------------- */

.vignette::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 100%, transparent 50%, rgba(0,0,0,0.30) 100%);
  pointer-events: none;
}
[data-theme="light"] .vignette::after {
  background: radial-gradient(120% 90% at 50% 100%, transparent 50%, rgba(10,10,20,0.06) 100%);
}

.blue-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  background: radial-gradient(circle, rgba(84,104,229,var(--glow-opacity)) 0%, rgba(84,104,229,0) 60%);
  pointer-events: none;
}
.violet-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  background: radial-gradient(circle, rgba(157,143,232,var(--glow-opacity)) 0%, rgba(157,143,232,0) 60%);
  pointer-events: none;
}

/* ----------------------------------------------------------
   Cursor
   ---------------------------------------------------------- */

/* Custom cursor — removed */
.cursor-dot,
.cursor-ring {
  display: none !important;
}

.magnetic { display: inline-block; will-change: transform; }
.magnetic-inner { display: inline-block; will-change: transform; }

/* ----------------------------------------------------------
   Link underline
   ---------------------------------------------------------- */

.link-line {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
.link-line::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out-expo);
}
.link-line:hover::after,
.link-line.active::after,
.link-line[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ----------------------------------------------------------
   Logo wordmark (in nav)
   ---------------------------------------------------------- */

.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-brand), var(--font-sans), sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.045em;
  color: var(--blue);
  line-height: 1;
  text-decoration: none;
  transition: transform 0.4s var(--ease-out-expo);
}
.logo-mark:hover { transform: scale(1.02); }
.logo-mark .logo-planet {
  width: 0.95em;
  height: 0.95em;
  margin: 0 -0.04em;
  vertical-align: middle;
  display: inline-flex;
}
.logo-mark .logo-planet svg { width: 100%; height: 100%; display: block; }

/* Spin the planet on hover */
.logo-mark:hover .logo-planet svg { animation: planet-spin 6s linear infinite; }
@keyframes planet-spin {
  to { transform: rotate(360deg); }
}

/* Larger logo (hero) */
.logo-mark-lg { font-size: clamp(2.5rem, 8vw, 5rem); }
.logo-mark-xl { font-size: clamp(4rem, 16vw, 12rem); }

/* Site loader — balanced scale (between nav and hero xl) */
.logo-mark-loader {
  font-size: clamp(2.875rem, 9vw, 4.5rem);
  letter-spacing: -0.045em;
}
.logo-mark-loader .logo-planet {
  width: 0.94em;
  height: 0.94em;
  margin: 0 -0.04em;
}

/* Footer — nav-scale wordmark, no oversized serifs */
.logo-mark-footer {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  letter-spacing: -0.04em;
}
.logo-mark-footer .logo-planet {
  width: 0.88em;
  height: 0.88em;
  margin: 0 -0.03em;
}

/* ----------------------------------------------------------
   Nav
   ---------------------------------------------------------- */

.nav {
  position: fixed;
  top: 1.25rem; left: 1.25rem; right: 1.25rem;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 65%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: 999px;
  transition: border-color 0.4s, background 0.4s;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-color: color-mix(in srgb, var(--text) 16%, transparent);
}

.nav-link {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: color 0.3s;
  cursor: pointer;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); }
.nav-link[aria-current="page"] { color: var(--blue-bright); }

/* Lang toggle */
.lang-pill {
  display: inline-flex;
  font-family: var(--font-mono), monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-pill button {
  padding: 6px 12px;
  color: var(--text-soft);
  transition: color 0.3s, background 0.3s;
  background: transparent;
  cursor: pointer;
}
.lang-pill button.active {
  background: var(--text);
  color: var(--bg);
}

/* Theme toggle */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, transform 0.4s var(--ease-out-expo);
}
.theme-toggle:hover {
  color: var(--blue-bright);
  border-color: var(--blue-bright);
  transform: rotate(15deg);
}
.theme-toggle svg { width: 14px; height: 14px; }
.theme-toggle .sun, .theme-toggle .moon { transition: opacity 0.3s; }
[data-theme="dark"] .theme-toggle .sun,
:root:not([data-theme="light"]) .theme-toggle .sun { opacity: 0; position: absolute; }
[data-theme="dark"] .theme-toggle .moon,
:root:not([data-theme="light"]) .theme-toggle .moon { opacity: 1; }
[data-theme="light"] .theme-toggle .sun { opacity: 1; }
[data-theme="light"] .theme-toggle .moon { opacity: 0; position: absolute; }

/* Mobile menu trigger (visible < md) */
.menu-trigger {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-trigger svg { width: 16px; height: 16px; }

/* Drawer — mobile navigation */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: #0A0A14;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.45s var(--ease-out-expo),
    visibility 0.45s var(--ease-out-expo);
}
.drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}
.drawer-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100dvh;
  padding:
    max(1.25rem, env(safe-area-inset-top))
    max(1.25rem, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
}
.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.drawer-eyebrow {
  font-family: var(--font-mono), monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-bright);
}
.drawer-close {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #13131F;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.drawer-close:hover {
  border-color: var(--blue-bright);
  color: var(--blue-bright);
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-brand), var(--font-sans), system-ui, sans-serif;
  font-size: clamp(1.125rem, 4.8vw, 1.375rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  transition: color 0.3s, padding-left 0.35s var(--ease-out-expo);
}
.drawer-link:first-child {
  border-top: 1px solid var(--line);
}
.drawer-link:hover,
.drawer-link:focus-visible {
  color: var(--blue-bright);
  padding-left: 0.35rem;
}
.drawer-link-num {
  flex-shrink: 0;
  width: 1.75rem;
  font-family: var(--font-mono), monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  transition: color 0.3s;
}
.drawer-link-label {
  flex: 1;
}
.drawer-link[aria-current="page"] {
  color: var(--blue-bright);
}
.drawer-link[aria-current="page"] .drawer-link-num {
  color: var(--blue-bright);
}
.drawer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.drawer-lang {
  align-self: flex-start;
}
.drawer-cta {
  width: 100%;
  justify-content: center;
}
.drawer-meta {
  font-family: var(--font-mono), monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  text-align: center;
}

body.drawer-open {
  overflow: hidden;
}

body.drawer-open .cursor-dot,
body.drawer-open .cursor-ring {
  opacity: 0 !important;
}

/* ----------------------------------------------------------
   Char/word reveal
   ---------------------------------------------------------- */

.split-char, .split-word { display: inline-block; overflow: hidden; }
.split-char > span, .split-word > span {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}
.split-word { white-space: nowrap; }

/* ----------------------------------------------------------
   Hero video background — autoplays, loops, mutes,
   fades in once the first frame is decodable.
   ---------------------------------------------------------- */

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.6s var(--ease-out-expo);
  /* mix-blend-mode: screen brightens the dark indigo bg with the cobalt
     glow of the video, keeping editorial type readable on top. */
  mix-blend-mode: screen;
}
.hero-video.is-ready { opacity: 0.55; }

[data-theme="light"] .hero-video {
  mix-blend-mode: multiply;
}
[data-theme="light"] .hero-video.is-ready { opacity: 0.45; }

/* If we have a video, soften the gradient-art so the video can breathe. */
.has-hero-video .hero-art { opacity: 0.55; }

/* Reduced motion: pause and rely on the static gradient. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

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

.hero-art {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(84,104,229,0.20) 0%, rgba(84,104,229,0) 60%),
    radial-gradient(50% 50% at 0% 100%, rgba(157,143,232,0.12) 0%, rgba(157,143,232,0) 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  z-index: 0;
}
[data-theme="light"] .hero-art {
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(84,104,229,0.16) 0%, rgba(84,104,229,0) 60%),
    radial-gradient(50% 50% at 0% 100%, rgba(157,143,232,0.10) 0%, rgba(157,143,232,0) 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-3) 100%);
}

.hero-marquee-bg {
  position: absolute;
  bottom: -10vh; left: 0; right: 0;
  font-family: var(--font-display), serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(8rem, 22vw, 24rem);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--blue) 28%, transparent);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.6;
}

/* Marquee */
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  white-space: nowrap;
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  gap: 4rem;
  align-items: center;
  white-space: nowrap;
  animation: marqueeScroll 40s linear infinite;
  padding-right: 4rem;
  will-change: transform;
}
.marquee-track > span {
  flex-shrink: 0;
  white-space: nowrap;
}
.marquee:hover .marquee-track:not(.is-js-driven) { animation-play-state: paused; }
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ----------------------------------------------------------
   Service row
   ---------------------------------------------------------- */

.service-row {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  transition: padding 0.5s var(--ease-out-expo);
  cursor: pointer;
}
.service-row:last-child { border-bottom: 1px solid var(--line); }

.service-row .num {
  font-family: var(--font-mono), monospace;
  font-size: 12px; letter-spacing: 0.1em;
  color: var(--text-soft);
  padding-top: 0.65rem;
  transition: color 0.5s;
}

.service-title {
  font-family: var(--font-display), serif;
  font-variation-settings: "opsz" 144;
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color 0.5s, transform 0.5s var(--ease-out-expo);
}

.service-desc {
  margin-top: 1rem;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.6s var(--ease-out-expo), opacity 0.4s 0.1s, margin-top 0.5s;
}

.service-row:hover .service-title,
.service-row.active .service-title { color: var(--blue-bright); }
.service-row:hover .num,
.service-row.active .num { color: var(--blue); }
.service-row.active .service-desc { max-height: 16rem; opacity: 1; }

.service-arrow {
  width: 24px; height: 24px;
  margin-top: 0.5rem;
  color: var(--text-soft);
  transform: rotate(-45deg);
  transition: transform 0.5s var(--ease-out-expo), color 0.4s;
}
.service-row:hover .service-arrow,
.service-row.active .service-arrow {
  transform: rotate(0deg);
  color: var(--blue-bright);
}

/* ----------------------------------------------------------
   Work cards
   ---------------------------------------------------------- */

.work-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  border-radius: 2px;
}
.work-card .work-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  max-height: min(52vh, 420px);
  background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
}
.work-card .work-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease-out-expo), filter 0.8s;
  filter: grayscale(60%) brightness(0.92);
  will-change: transform;
}
.work-card .work-media--wide {
  aspect-ratio: 21 / 9;
  max-height: min(44vh, 360px);
}
.work-card:hover .work-media img { transform: scale(1.07); filter: grayscale(0%) brightness(1); }
.work-card .work-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--bg) 80%, transparent) 100%);
  pointer-events: none;
}
.work-meta {
  display: flex; justify-content: space-between;
  padding: 1rem 0.25rem 0;
}
.work-card .work-title {
  font-family: var(--font-display), serif;
  font-variation-settings: "opsz" 144;
  font-size: 22px; letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
}
.work-card .work-meta .cat {
  font-family: var(--font-mono), monospace;
  font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.work-card .corner-num {
  position: absolute;
  top: 16px; left: 16px;
  font-family: var(--font-mono), monospace;
  font-size: 11px; letter-spacing: 0.15em;
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  backdrop-filter: blur(6px);
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  z-index: 2;
}

/* ----------------------------------------------------------
   Work orbit — 3D reel gallery (React / R3F)
   ---------------------------------------------------------- */

.work-orbit-stage canvas {
  touch-action: pan-y;
}

.work-orbit-stage {
  position: relative;
  height: min(68vh, 640px);
  min-height: 420px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: radial-gradient(
    circle at 50% 40%,
    color-mix(in srgb, var(--blue) 8%, var(--bg)) 0%,
    var(--bg) 70%
  );
}

.work-orbit-panel {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 4;
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  max-width: min(92%, 380px);
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.work-orbit-video-wrap {
  position: relative;
  flex-shrink: 0;
  width: 124px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  background: var(--bg-2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.work-orbit-video-hit {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.work-orbit-video-wrap:hover .work-orbit-video-hit {
  transform: scale(1.01);
}

.work-orbit-video-wrap:hover {
  border-color: color-mix(in srgb, var(--blue-bright) 55%, transparent);
}

.work-orbit-sound {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  z-index: 3;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.88);
}

.work-orbit-sound:hover {
  border-color: color-mix(in srgb, var(--blue-bright) 45%, transparent);
  color: var(--blue-bright);
}

.work-orbit-open {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.work-orbit-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.work-orbit-video-hit:hover .work-orbit-video-play {
  opacity: 1;
}

.work-orbit-video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.work-orbit-video-badge {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.work-orbit-video-cat {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid color-mix(in srgb, var(--blue-bright) 45%, transparent);
  font-family: var(--font-mono), monospace;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--blue-bright);
}

.reel-orbit-cat-pill {
  display: inline-block;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid color-mix(in srgb, var(--blue-bright) 50%, transparent);
  font-family: var(--font-mono), monospace;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-bright);
  white-space: nowrap;
  line-height: 1.2;
}

.work-orbit-meta {
  min-width: 0;
  padding-bottom: 0.15rem;
}

.work-orbit-meta .work-title {
  font-family: var(--font-display), serif;
  font-variation-settings: "opsz" 144;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text);
}

.work-orbit-meta .cat {
  font-family: var(--font-mono), monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
}

.work-orbit-strip {
  display: none;
}

@media (max-width: 767px) {
  .work-orbit-stage {
    display: none;
  }

  .work-orbit-panel {
    position: relative;
    right: auto;
    bottom: auto;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .work-orbit-video-wrap {
    width: min(62vw, 240px);
  }

  .work-orbit-video-play {
    opacity: 1;
    background: rgba(0, 0, 0, 0.18);
  }

  .work-orbit-sound {
    width: 2.75rem;
    height: 2.75rem;
  }

  .work-orbit-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.9rem;
    text-align: center;
  }

  .work-orbit-meta .work-title {
    font-size: 1.35rem;
  }

  .work-orbit-strip {
    display: flex;
    gap: 0.65rem;
    margin-top: 1.25rem;
    padding: 0.15rem 0.15rem 0.4rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .work-orbit-strip button {
    flex: 0 0 auto;
    width: 4.25rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
    scroll-snap-align: center;
    cursor: pointer;
  }

  .work-orbit-strip button.is-active {
    border-color: var(--blue-bright);
  }

  .work-orbit-strip img {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
  }
}

/* Reel full-screen viewer */
.reel-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 4, 8, 0.88);
  backdrop-filter: blur(20px);
}

.reel-viewer-card {
  width: min(100%, 400px);
  max-height: calc(100svh - 2rem);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--surface, #0e0e18) 94%, transparent);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

@media (min-width: 768px) {
  .reel-viewer-card {
    width: min(92vw, 440px);
  }
}

.reel-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.reel-viewer-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 52%, transparent);
}

.reel-viewer-eyebrow span:first-child {
  color: var(--blue-bright);
}

.reel-viewer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--text) 70%, transparent);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.reel-viewer-close:hover {
  border-color: color-mix(in srgb, var(--blue-bright) 40%, transparent);
  color: var(--text);
  background: color-mix(in srgb, var(--text) 4%, transparent);
}

.reel-viewer-media {
  position: relative;
  background: #000;
}

.reel-viewer-video {
  display: block;
  width: 100%;
  max-height: min(72svh, 780px);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  cursor: pointer;
  background: #000;
}

.reel-viewer-media-shade {
  pointer-events: none;
  position: absolute;
  inset: auto 0 0 0;
  height: 5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
}

.reel-player-bar {
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 2;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 8, 14, 0.72);
  backdrop-filter: blur(12px);
}

.reel-player-btn,
.reel-sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.reel-player-btn:hover,
.reel-sound-toggle:hover {
  color: var(--blue-bright);
  background: rgba(255, 255, 255, 0.06);
}

.reel-player-time {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  min-width: 1.75rem;
}

.reel-player-time--end {
  text-align: right;
}

.reel-player-progress {
  width: 100%;
  height: 2px;
  appearance: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  accent-color: var(--blue-bright);
  cursor: pointer;
}

.reel-player-progress::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--blue-bright);
  border: 0;
}

.reel-viewer-footer {
  padding: 0.9rem 1rem 1rem;
}

.reel-viewer-title {
  margin: 0;
  font-family: var(--font-display, serif);
  font-size: clamp(1.2rem, 3.5vw, 1.45rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--text);
}

.reel-viewer-credit {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 42%, transparent);
}

/* ----------------------------------------------------------
   Atelier — sticky scroll-driven 3D card stack
   (vanilla port of the React/Framer-Motion stacked-cards
    component; same math, runs on GSAP ScrollTrigger)
   ---------------------------------------------------------- */

.team-stack-track {
  position: relative;
  /* Track must be tall enough to give every card scroll room. With 6
     cards × ~55svh per card (rest + fly-off) we land near 360svh. */
  min-height: 360svh;
}

.team-stack-sticky {
  /* No CSS sticky — ScrollTrigger.pin handles the pinning so it stays
     correctly aligned even under Lenis smooth scroll. */
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.team-stack-cards {
  position: relative;
  width: 360px;
  height: 460px;
  perspective: 1200px;
}

.team-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.75rem;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--blue-bright) 18%, var(--line));
  /* Solid bg with a subtle blue→violet gradient so each card is
     visibly distinct from the page bg and from each other. */
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--blue) 12%, var(--bg-2)) 0%,
      var(--bg-2) 35%,
      color-mix(in srgb, var(--blue-glow) 8%, var(--bg-2)) 100%);
  will-change: transform, filter;
  backface-visibility: hidden;
  box-shadow:
    0 28px 70px -22px rgba(0, 0, 0, 0.65),
    0 1px 0 0 color-mix(in srgb, var(--text) 6%, transparent) inset;
}

[data-theme="light"] .team-card {
  background: #FFFFFF;
  border: 1.5px solid color-mix(in srgb, var(--blue) 35%, transparent);
  box-shadow:
    0 24px 60px -16px rgba(74, 91, 229, 0.32),
    0 8px 18px -8px rgba(10, 10, 20, 0.10),
    0 1px 0 0 rgba(255, 255, 255, 0.9) inset;
}

.team-card .corner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono), monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.team-card .corner-row .num {
  color: var(--blue-bright);
}

.team-card .ident {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.team-card-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-bright) 0%, var(--blue) 50%, var(--blue-glow) 100%);
  font-family: var(--font-display), serif;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: #fff;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 12px -4px rgba(84, 104, 229, 0.4);
}

.team-card-name {
  font-family: var(--font-display), serif;
  font-variation-settings: "opsz" 144;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
}

.team-card-role {
  margin-top: 4px;
  font-family: var(--font-mono), monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-bright);
}

.team-card-quote {
  font-family: var(--font-display), serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-muted);
  flex: 1;
}

.team-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-card-tags .tag {
  font-size: 9px;
  padding: 4px 9px;
  border-color: color-mix(in srgb, var(--blue-bright) 30%, transparent);
}

@media (max-width: 640px) {
  .team-stack-cards { width: 88vw; max-width: 320px; height: 440px; }
  .team-card { padding: 1.5rem; gap: 1rem; }
  .team-card-name { font-size: 22px; }
  .team-card-quote { font-size: 14px; }
}

/* Reduced motion / no JS fallback: flatten the deck into a grid. */
@media (prefers-reduced-motion: reduce) {
  .team-stack-track { min-height: 0; }
  .team-stack-sticky { position: static; height: auto; padding: 2rem 0; perspective: none; }
  .team-stack-cards {
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    perspective: none;
  }
  .team-card { position: relative; transform: none !important; box-shadow: none; }
}

/* ----------------------------------------------------------
   Atelier
   ---------------------------------------------------------- */

.atelier-card {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1.5rem;
  transition: padding 0.5s;
  cursor: pointer;
}
.atelier-card:last-child { border-bottom: 1px solid var(--line); }
.atelier-name {
  font-family: var(--font-display), serif;
  font-variation-settings: "opsz" 144;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  transition: color 0.4s, transform 0.5s var(--ease-out-expo);
}
.atelier-card:hover .atelier-name {
  color: var(--blue-bright);
  transform: translateX(8px);
}
.atelier-role {
  font-family: var(--font-mono), monospace;
  font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* ----------------------------------------------------------
   Approach
   ---------------------------------------------------------- */

.step {
  position: relative;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 80px 1fr 2fr;
  gap: 2rem;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num {
  font-family: var(--font-mono), monospace;
  font-size: 12px; letter-spacing: 0.1em;
  color: var(--blue-bright);
}
.step-title {
  font-family: var(--font-display), serif;
  font-variation-settings: "opsz" 144;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}
.step-desc {
  color: var(--text-muted);
  font-size: 15px; line-height: 1.7;
  max-width: 32rem;
}

/* ----------------------------------------------------------
   Studio card
   ---------------------------------------------------------- */

.studio-card {
  position: relative;
  padding: 2rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.5s, transform 0.6s var(--ease-out-expo);
}
.studio-card:hover {
  border-color: color-mix(in srgb, var(--blue) 50%, transparent);
  transform: translateY(-4px);
}
.studio-city {
  font-family: var(--font-display), serif;
  font-variation-settings: "opsz" 144;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--text);
}
.studio-coords {
  font-family: var(--font-mono), monospace;
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--text-soft);
}
.studio-map {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
}

/* ----------------------------------------------------------
   Form
   ---------------------------------------------------------- */

.form-field {
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.25rem;
  align-items: baseline;
}
.form-field label {
  font-family: var(--font-mono), monospace;
  font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.form-field input,
.form-field textarea,
.form-field select {
  background: transparent;
  border: none; outline: none;
  font-family: var(--font-display), serif;
  font-variation-settings: "opsz" 100;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  letter-spacing: -0.01em;
  color: var(--text);
  width: 100%;
  caret-color: var(--blue-bright);
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-soft);
  font-style: italic;
}
.form-field textarea {
  resize: none;
  line-height: 1.3;
  min-height: 3rem;
}
.form-field select option { background: var(--bg); color: var(--text); }

@media (max-width: 768px) {
  .form-field { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.4s, color 0.4s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--blue);
  color: #fff;
}
.btn-primary svg { transition: transform 0.5s var(--ease-out-expo); }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: border-color 0.4s, color 0.4s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--blue-bright); color: var(--blue-bright); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-brief { display: none; }
@media (min-width: 768px) {
  .nav-actions { gap: 0.75rem; }
}
@media (min-width: 1024px) {
  .nav-brief { display: inline-flex; }
}

.btn-blue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.4s, transform 0.4s;
  cursor: pointer;
}
.btn-blue:hover { background: var(--blue-bright); }

/* ----------------------------------------------------------
   Stats
   ---------------------------------------------------------- */

.stat-num {
  font-family: var(--font-display), serif;
  font-variation-settings: "opsz" 144;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  letter-spacing: -0.035em;
  line-height: 0.9;
  color: var(--text);
}
.stat-num .plus { color: var(--blue-bright); }
.stat-label {
  font-family: var(--font-mono), monospace;
  font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 0.85rem;
}

/* ----------------------------------------------------------
   Tag
   ---------------------------------------------------------- */

.tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono), monospace;
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.tag:hover, .tag.active {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

/* ----------------------------------------------------------
   Loader
   ---------------------------------------------------------- */

.loader {
  position: fixed; inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}
.loader.is-leaving {
  transform: translate3d(0, -101%, 0);
  transition: transform 0.5s var(--ease-out-expo);
}
.loader-stage {
  position: relative;
  z-index: 1;
}
.loader.is-dismissed {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

html[data-booted="1"] .loader:not(.is-leaving) {
  display: none !important;
}
.loader-bar {
  position: absolute;
  bottom: 2.5rem; left: 2.5rem; right: 2.5rem;
  height: 1px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: var(--blue);
  width: 0%;
  transition: width 0.4s var(--ease-out-expo);
}
.loader-text {
  font-family: var(--font-brand), sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -0.04em;
  color: var(--blue);
}
.loader-mark {
  position: absolute;
  top: 2.5rem; left: 2.5rem;
  font-family: var(--font-mono), monospace;
  font-size: 11px; letter-spacing: 0.15em;
  color: var(--text-soft);
}

.approach-parallax-section {
  overflow: visible !important;
}

.approach-cards-track {
  position: relative;
  width: 100%;
  /* ~70svh scroll room per card — ScrollTrigger pin handles the viewport */
  min-height: calc(var(--approach-count, 4) * 70svh);
}

.approach-cards-pin {
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.approach-cards-stack {
  position: relative;
  width: min(700px, 100%);
  height: clamp(300px, 52svh, 400px);
  margin-inline: auto;
}

.approach-card-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: opacity, transform;
  pointer-events: none;
}

.approach-card-layer:first-child {
  opacity: 1;
}

.approach-parallax-section .reveal-up.is-in {
  transform: none;
}

/* ----------------------------------------------------------
   Reveal helpers
   ---------------------------------------------------------- */

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
.reveal-up.is-in { opacity: 1; transform: translateY(0); }

.reveal-img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.4s var(--ease-out-expo);
}
.reveal-img.is-in { clip-path: inset(0 0 0 0); }

/* ----------------------------------------------------------
   Reduced motion
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .marquee-track { animation: none; }
  .reveal-up { opacity: 1; transform: none; transition: none; }
  .reveal-img { clip-path: none; transition: none; }
  .split-char > span, .split-word > span { transform: none !important; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

::selection { background: var(--blue); color: #fff; }

/* ----------------------------------------------------------
   Section frame
   ---------------------------------------------------------- */

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono), monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--blue-bright);
}

/* ----------------------------------------------------------
   Page hero (sub-pages)
   ---------------------------------------------------------- */

.page-hero {
  position: relative;
  padding: 9rem 1.5rem 4rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) {
  .page-hero { padding: 12rem 3rem 6rem; }
}

/* ----------------------------------------------------------
   Mobile tweaks
   ---------------------------------------------------------- */

@media (max-width: 768px) {
  .nav {
    padding: 0.4rem 0.45rem 0.4rem 0.85rem;
    top: 0.65rem;
    left: 0.65rem;
    right: 0.65rem;
    gap: 0.4rem;
  }
  .nav .logo-mark {
    font-size: 1.15rem;
    flex-shrink: 0;
  }
  .nav .lang-pill {
    flex-shrink: 0;
  }
  .nav .lang-pill button {
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0 0.55rem;
  }
  .nav .menu-trigger {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    flex-shrink: 0;
  }
  .service-row { grid-template-columns: 60px 1fr; padding: 1.75rem 0; gap: 1rem; }
  .step { grid-template-columns: 1fr; gap: 1rem; padding: 1.75rem 0; }
  .step-num { font-size: 10px; }
  .hero-marquee-bg { font-size: clamp(5rem, 16vw, 9rem); }
  .loader-mark, .loader-bar { left: 1.25rem; right: 1.25rem; }
  .loader-mark { top: 1.25rem; }
  .loader-bar { bottom: 1.25rem; }
  .atelier-card { grid-template-columns: 1fr; gap: 0.5rem; padding: 1.5rem 0; }
  .team-stack-cards {
    width: min(92vw, 360px);
    height: min(68vh, 460px);
  }
  .contact-gaming-form {
    max-width: 100%;
    padding-inline: max(0.5rem, env(safe-area-inset-left)) max(0.5rem, env(safe-area-inset-right));
  }
  .contact-page-content {
    overflow-x: clip;
  }
  .drawer-link {
    padding: 1.15rem 0;
    font-size: 1.2rem;
  }
  .drawer-close,
  .drawer .lang-pill button {
    min-width: 44px;
    min-height: 44px;
  }
  .client-marquee-item {
    gap: 0.65rem;
    padding-inline: 0.45rem;
  }

  .client-marquee-name {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }
  .paper-shader-hero h1.display-lg,
  .page-hero h1 {
    font-size: clamp(2.25rem, 10vw, 4rem);
  }
}

/* Dark mode only */
html {
  color-scheme: dark;
}

body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .client-marquee-track {
    animation: none !important;
  }
  .reveal-up,
  .reveal-img {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Phone country dropdown — strong black panel only */
.phone-country-panel {
  isolation: isolate;
  background: #000 !important;
}

.phone-country-panel .phone-country-search {
  background: #0a0a0a !important;
}

body.phone-country-open .cursor-dot,
body.phone-country-open .cursor-ring {
  opacity: 0 !important;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
}
button:focus, a:focus { outline: none; }
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
}
