/* =========================================================
   Julián Forero — Video Editor & Graphic Designer
   ========================================================= */

/* ---------- Theme tokens ---------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0e0e0e;
  --bg-strip: #161616;
  --surface: #171717;
  --surface-2: #1e1e1e;
  --line: rgba(255, 255, 255, 0.08);
  --line-bright: rgba(255, 255, 255, 0.82);

  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.8);
  --text-muted: rgba(255, 255, 255, 0.58);
  --text-dim: #5e5e5e;

  --accent: #ff6b1a;
  --accent-rgb: 255 107 26;
  --accent-text: #ff8a3d;
  --accent-deep: #f0461b;
  --accent-grad: radial-gradient(120% 140% at 0% 0%, #ff7d24 0%, #f4511c 38%, #c42016 70%, #4a0b07 100%);
  --blob: rgba(255, 170, 90, 0.35);

  --hero-fallback: #e9481c;
  --hero-title: #ffffff;
  --hero-hash: #ff8a3d;
  --hero-shade:
    linear-gradient(180deg, rgba(48, 8, 4, 0.3) 0%, rgba(48, 8, 4, 0) 22%),
    linear-gradient(0deg, rgba(26, 5, 3, 0.66) 0%, rgba(26, 5, 3, 0.18) 26%, rgba(26, 5, 3, 0) 44%),
    linear-gradient(90deg, rgba(255, 104, 30, 0.22) 0%, rgba(255, 104, 30, 0) 38%);
  --hero-shade-mobile:
    linear-gradient(180deg, rgba(48, 8, 4, 0.32) 0%, rgba(48, 8, 4, 0) 18%),
    linear-gradient(0deg, rgba(22, 4, 2, 0.88) 0%, rgba(22, 4, 2, 0.55) 32%, rgba(22, 4, 2, 0) 62%);

  --card-shadow: none;
  --strip-shadow: none;
  --tag-bg: rgba(14, 14, 14, 0.4);
  --ghost: rgba(255, 255, 255, 0.06);
  --mark: #1d1d1d;
  --grain-opacity: 0.16;
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #f3f4f7;
  --bg-strip: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --line: rgba(12, 22, 48, 0.09);
  --line-bright: rgba(11, 15, 26, 0.75);

  --text: #0b0f1a;
  --text-soft: rgba(11, 15, 26, 0.78);
  --text-muted: rgba(11, 15, 26, 0.6);
  --text-dim: #868c99;

  --accent: #1d5bff;
  --accent-rgb: 29 91 255;
  --accent-text: #1a4fe0;
  --accent-deep: #0c3bd0;
  --accent-grad: radial-gradient(120% 140% at 0% 0%, #4f8cff 0%, #1f5eff 38%, #1443dc 68%, #0a2689 100%);
  --blob: rgba(205, 228, 255, 0.45);

  --hero-fallback: #1f5eff;
  --hero-title: #071a4d;
  --hero-hash: #d4e4ff;
  --hero-shade:
    linear-gradient(180deg, rgba(6, 34, 130, 0.22) 0%, rgba(6, 34, 130, 0) 20%),
    linear-gradient(0deg, rgba(4, 22, 92, 0.52) 0%, rgba(4, 22, 92, 0.12) 22%, rgba(4, 22, 92, 0) 34%);
  --hero-shade-mobile:
    linear-gradient(180deg, rgba(6, 34, 130, 0.3) 0%, rgba(6, 34, 130, 0) 18%),
    linear-gradient(0deg, rgba(3, 18, 80, 0.92) 0%, rgba(3, 18, 80, 0.66) 42%, rgba(3, 18, 80, 0.32) 64%, rgba(3, 18, 80, 0) 84%);

  --card-shadow: 0 1px 2px rgba(12, 22, 48, 0.04), 0 18px 40px -26px rgba(12, 22, 48, 0.22);
  --strip-shadow: 0 30px 60px -40px rgba(12, 22, 48, 0.25);
  --tag-bg: rgba(255, 255, 255, 0.7);
  --ghost: rgba(12, 22, 48, 0.07);
  --mark: #e1e4ea;
  --grain-opacity: 0.12;
}

:root {
  --font: "Plus Jakarta Sans", "Helvetica Neue", Helvetica, sans-serif;

  --maxw: 1320px;
  --pad: clamp(20px, 3.4vw, 52px);
  --radius-xl: clamp(32px, 5.6vw, 84px);
  --radius-lg: clamp(18px, 1.9vw, 28px);
  --section-gap: clamp(96px, 12vw, 184px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.menu-open { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  transition: background-color 0.5s ease, color 0.5s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 8px; }
.hero :focus-visible, .cta__card :focus-visible, .panel--d :focus-visible { outline-color: #fff; }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--pad) * 2);
  margin-inline: auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Theme / language transitions ---------- */
.theme-reveal::view-transition-old(root),
.theme-reveal::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
.theme-reveal::view-transition-new(root) { z-index: 2; }
/* The reveal shows the finished theme at once — only the toggle icon keeps morphing */
.theme-reveal *:not(.theme-toggle__core, .theme-toggle__cut, .theme-toggle__rays) { transition: none !important; }

/* ---------- Film grain ---------- */
.grain {
  position: absolute;
  inset: -60%;
  z-index: -1;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: grain 1.1s steps(5) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-4%, 3%); }
  40%  { transform: translate(3%, -4%); }
  60%  { transform: translate(-3%, -2%); }
  80%  { transform: translate(4%, 4%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 5px 5px 5px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), background-color 0.4s ease;
}
.btn__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: transform 0.55s var(--ease-out), background-color 0.4s ease, color 0.4s ease;
}
.btn__icon svg { width: 16px; height: 16px; }
.btn:active { transform: scale(0.97); }

.btn--light { background: #fff; color: #111; }
.btn--light .btn__icon { background: var(--accent); color: #fff; }

.btn--accent { background: var(--accent); color: #fff; }
.btn--accent .btn__icon { background: #fff; color: var(--accent); }

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover .btn__icon { transform: rotate(-45deg); }
  .btn--light:hover { box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.45); }
  .btn--accent:hover { box-shadow: 0 16px 40px -14px rgb(var(--accent-rgb) / 0.75); }
}

/* Round glass buttons on top of the photo (theme, menu) */
.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.45s var(--ease-out);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(0.92); }
@media (hover: hover) {
  .icon-btn:hover { background: rgba(255, 255, 255, 0.26); transform: translateY(-2px); }
}
.icon-btn--surface {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}

/* ---------- Theme toggle (sun ⇄ moon) ---------- */
.theme-toggle__svg { overflow: visible; }
.theme-toggle__core,
.theme-toggle__rays { transform-origin: 12px 12px; }
.theme-toggle__core,
.theme-toggle__cut { transition: transform 0.7s var(--ease-out); }
.theme-toggle__rays { transition: transform 0.7s var(--ease-out), opacity 0.4s ease; }

[data-theme="dark"] .theme-toggle__rays { opacity: 0; transform: rotate(-70deg) scale(0.4); }
[data-theme="light"] .theme-toggle__core { transform: scale(0.56); }
[data-theme="light"] .theme-toggle__cut { transform: translate(9px, -9px); }
@media (hover: hover) {
  [data-theme="light"] .theme-toggle:hover .theme-toggle__rays { transform: rotate(45deg); }
  [data-theme="dark"] .theme-toggle:hover .theme-toggle__core { transform: rotate(-18deg); }
}

/* ---------- Language switch ---------- */
.lang-switch {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  flex: none;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.lang-switch::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: #fff;
  transition: transform 0.55s var(--ease-out);
}
html[lang="es"] .lang-switch::before { transform: translateX(100%); }
.lang-switch button {
  min-width: 38px;
  padding: 10px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: color 0.35s ease;
}
html[lang="en"] .lang-switch [data-set-lang="en"],
html[lang="es"] .lang-switch [data-set-lang="es"] { color: #111; }

.lang-switch--surface {
  background: var(--surface-2);
  border-color: var(--line);
}
.lang-switch--surface::before { background: var(--text); }
.lang-switch--surface button { color: var(--text); padding: 12px 14px; }
html[lang="en"] .lang-switch--surface [data-set-lang="en"],
html[lang="es"] .lang-switch--surface [data-set-lang="es"] { color: var(--bg); }

/* ---------- Shared type ---------- */
.label {
  color: var(--accent-text);
  font-size: clamp(17px, 1.6vw, 24px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: clamp(12px, 1.4vw, 20px);
}
.h2 {
  font-size: clamp(34px, 4.7vw, 68px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  max-width: 11.5em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  column-gap: clamp(32px, 5vw, 80px);
  row-gap: 32px;
}
.split--end { align-items: end; }
.num em, .panel__num em, .story__kicker em {
  font-style: normal;
  color: var(--accent-text);
  margin-right: 1px;
}

/* =========================================================
   HERO
   ========================================================= */
.top {
  background: var(--bg-strip);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: var(--strip-shadow);
  transition: background-color 0.5s ease;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  display: flex;
  flex-direction: column;
  min-height: clamp(640px, 100svh, 960px);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: var(--hero-fallback);
  color: #fff;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -3;
  will-change: transform;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 4%;
  transform-origin: 50% 0%;
  /* backwards only: once the intro ends the photo has no transform/filter left, so it renders at full sharpness */
  animation: hero-zoom 2.4s var(--ease-out) backwards;
}
.hero__img--light {
  opacity: 0;
  transition: opacity 0.8s ease;
}
[data-theme="light"] .hero__img--light { opacity: 1; }
@keyframes hero-zoom {
  from { transform: scale(1.12); filter: brightness(0.6); }
  to   { transform: scale(1); filter: brightness(1); }
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-shade);
}
/* Lighter grain over the photo so it doesn't read as noise */
.hero .grain { opacity: calc(var(--grain-opacity) * 0.4); }

/* nav */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: max(clamp(20px, 2.4vw, 36px), env(safe-area-inset-top));
  animation: fade-down 1s var(--ease-out) 0.2s both;
}
.nav__logo {
  flex: none;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 700;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.nav__right {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 16px);
}
.nav__links {
  display: flex;
  gap: clamp(20px, 2.6vw, 40px);
  margin-right: clamp(8px, 1.6vw, 28px);
  font-size: 15px;
  font-weight: 500;
}
.nav__links a {
  position: relative;
  padding-block: 6px;
  opacity: 0.92;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__tools { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; row-gap: 5px; align-content: center; }
.menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.45s var(--ease-out);
}
@media (hover: hover) {
  .menu-btn:hover span:first-child { transform: translateX(-2px); }
  .menu-btn:hover span:last-child { transform: translateX(2px); }
}

/* body */
.hero__body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 27%);
  align-items: center;
  column-gap: 40px;
  row-gap: 24px;
  padding-block: clamp(48px, 6vw, 88px) clamp(32px, 4vw, 56px);
}
.hero__intro { color: var(--hero-title); transition: color 0.6s ease; }
.hero__eyebrow {
  font-size: clamp(18px, 1.9vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: clamp(6px, 1.2vw, 18px);
  animation: fade-up 1s var(--ease-out) 0.35s both;
}
.hero__title {
  font-size: clamp(64px, 9.6vw, 150px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.hero__title .line {
  display: block;
  overflow: hidden;
  overflow: clip;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero__title .line > span {
  display: inline-block;
  white-space: nowrap;
  animation: line-up 1.2s var(--ease-out) 0.45s both;
}
.hero__title .line:nth-child(2) > span { animation-delay: 0.58s; }

.hero__aside {
  margin-top: clamp(0px, 6vw, 96px);
  animation: fade-up 1.1s var(--ease-out) 0.8s both;
}
.hero__tagline {
  font-size: clamp(21px, 2.1vw, 31px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.03em;
  max-width: 11em;
  text-wrap: balance;
}
.hero__lead {
  margin-top: clamp(12px, 1.3vw, 18px);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 23em;
}

/* services row */
.hero__services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: clamp(56px, 7vw, 108px);
}
.hero__services li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  animation: fade-up 1s var(--ease-out) both;
}
.hero__services li:nth-child(1) { animation-delay: 1s; }
.hero__services li:nth-child(2) { animation-delay: 1.08s; }
.hero__services li:nth-child(3) { animation-delay: 1.16s; }
.hero__services li:nth-child(4) { animation-delay: 1.24s; }
.hero__services .num {
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.hero__services .num em { color: var(--hero-hash); }

@keyframes line-up { from { transform: translateY(108%); } to { transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* =========================================================
   MOBILE MENU
   ========================================================= */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  clip-path: circle(0px at calc(100% - 40px) 42px);
  transition: clip-path 0.7s var(--ease-in-out), visibility 0s linear 0.7s;
}
.mobile-menu.is-open {
  visibility: visible;
  clip-path: circle(160vmax at calc(100% - 40px) 42px);
  transition: clip-path 0.7s var(--ease-in-out), visibility 0s;
}
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mobile-menu__links {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 32px;
}
.mobile-menu__links li {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.8s var(--ease-out);
}
.mobile-menu.is-open .mobile-menu__links li { opacity: 1; transform: none; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(1) { transition-delay: 0.2s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(2) { transition-delay: 0.25s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(4) { transition-delay: 0.35s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(5) { transition-delay: 0.4s; }
.mobile-menu__links a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(32px, 9.5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.mobile-menu__links .num {
  flex: none;
  min-width: 30px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}
.mobile-menu__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* =========================================================
   PLATFORM STRIP
   ========================================================= */
.strip {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4.5vw, 72px);
  padding-block: clamp(44px, 6.4vw, 96px);
}
.strip__label {
  flex: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-soft);
}
.marquee {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  overflow: clip;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 72%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 72%, transparent 100%);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
  padding-right: clamp(36px, 5vw, 80px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.brand svg { width: 1.2em; height: 1.2em; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   BEHIND THE EDITS + WORK
   ========================================================= */
.intro { padding-top: var(--section-gap); }

.statement {
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
  max-width: 17em;
}
.intro__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(28px, 3.4vw, 52px);
}
.note {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
}

.work {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
  margin-top: clamp(56px, 8vw, 120px);
}
.work__card {
  position: relative;
  aspect-ratio: 177 / 246;
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow: clip;
  background: #d4d4d4;
  isolation: isolate;
  box-shadow: var(--card-shadow);
}
/* Taller than the card so it can drift (parallax) without showing an edge.
   `translate` = scroll parallax (JS), `scale` = spawn + hover — independent properties */
.work__card img {
  position: absolute;
  left: 0;
  top: -8%;
  width: 100%;
  height: 116%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  translate: 0 var(--py, 0%);
  scale: 1.01;
  transition: scale 1.4s var(--ease-out);
  will-change: translate;
}
.work__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 45%);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.work__meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 7px 7px 18px;
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(calc(100% + 20px));
  transition: transform 0.7s var(--ease-out), opacity 0.4s ease;
}
.work__play {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
}
.work__play svg { width: 14px; height: 14px; }

@media (hover: hover) {
  .work__card:hover img { scale: 1.07; }
  .work__card:hover::after { opacity: 1; }
  .work__card:hover .work__meta { opacity: 1; transform: none; }
}
@media (hover: none) {
  .work__meta { opacity: 1; transform: none; }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about { padding-top: var(--section-gap); }

.stat {
  margin-top: clamp(36px, 4.4vw, 64px);
  padding: clamp(24px, 2.6vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  max-width: 520px;
}
.stat__value {
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat__value em { font-style: normal; color: var(--accent); }
.stat__caption {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 15px;
  max-width: 26em;
}
.stat__platforms {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.stat__platforms li {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.stat__platforms svg { width: 18px; height: 18px; }

.story { padding-top: 6px; }
.story__kicker {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.story p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 34em;
}
.story p + p { margin-top: 20px; }
.story .story__lead {
  font-size: clamp(19px, 1.7vw, 25px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--text);
}

.facts {
  margin-top: clamp(32px, 3.6vw, 52px);
  border-top: 1px solid var(--line);
}
.facts__row {
  position: relative;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding-block: 18px;
  font-size: 15px;
}
/* Divider drawn as its own layer so it can sweep in on reveal */
.facts__row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
  transform-origin: left center;
}
.facts dt { color: var(--text-dim); font-weight: 500; }
.facts dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.pill-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--accent-text);
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
}
.pill-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgb(var(--accent-rgb) / 0.6); }
  80%  { box-shadow: 0 0 0 8px rgb(var(--accent-rgb) / 0); }
  100% { box-shadow: 0 0 0 0 rgb(var(--accent-rgb) / 0); }
}

/* =========================================================
   EXPERTISE
   ========================================================= */
.skills { padding-block: var(--section-gap); }
.skills__head { margin-bottom: clamp(40px, 5vw, 72px); }
.skills__intro {
  color: var(--text-muted);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.65;
  max-width: 28em;
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
}
.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: clamp(22px, 2.6vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  transition: transform 0.6s var(--ease-out), border-color 0.4s ease, box-shadow 0.6s var(--ease-out);
}
.panel--a { grid-column: span 7; }
.panel--b { grid-column: span 5; }
.panel--c { grid-column: span 5; }
.panel--d { grid-column: span 7; }

.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: clamp(24px, 3vw, 44px);
}
.panel__num { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
.panel__count { font-size: 13px; color: var(--text-dim); font-weight: 500; }
.panel__title {
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.panel__text {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 15px;
}
.panel__ghost {
  position: absolute;
  right: -0.04em;
  bottom: -0.2em;
  z-index: -1;
  font-size: clamp(140px, 15vw, 220px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px var(--ghost);
  pointer-events: none;
  transition: transform 0.9s var(--ease-out);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 32px;
}
.tag {
  padding: 9px 15px;
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  background: var(--tag-bg);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.4s var(--ease-out);
}

.panel--d {
  background: var(--accent-grad);
  border-color: transparent;
  color: #fff;
}
.panel--d .panel__num em { color: #fff; }
.panel--d .panel__count,
.panel--d .panel__text { color: rgba(255, 255, 255, 0.8); }
.panel--d .panel__ghost { -webkit-text-stroke-color: rgba(255, 255, 255, 0.22); }
.panel--d .tag { background: rgba(0, 0, 0, 0.12); border-color: rgba(255, 255, 255, 0.85); }

@media (hover: hover) {
  .panel:hover {
    transform: translateY(-4px);
    border-color: rgb(var(--accent-rgb) / 0.35);
    box-shadow: 0 30px 60px -36px rgb(var(--accent-rgb) / 0.45);
  }
  .panel:hover .panel__ghost { transform: translateY(-8px); }
  .panel--d:hover { border-color: transparent; box-shadow: 0 30px 70px -30px rgb(var(--accent-rgb) / 0.7); }
  .tag:hover { background: var(--text); color: var(--bg); transform: translateY(-2px); }
  .panel--d .tag:hover { background: #fff; color: var(--accent-deep); }
}

/* =========================================================
   CONTACT
   ========================================================= */
.cta__card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  padding: clamp(40px, 7vw, 112px) clamp(24px, 6vw, 96px);
  border-radius: var(--radius-xl);
  background: var(--accent-grad);
  color: #fff;
}
.cta__card::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 60%;
  aspect-ratio: 1;
  right: -14%;
  top: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blob), transparent 65%);
  animation: drift 12s var(--ease-in-out) infinite alternate;
}
@keyframes drift { to { transform: translate(-18%, 22%); } }

.cta__eyebrow {
  font-size: clamp(17px, 1.6vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cta__title {
  margin-top: clamp(10px, 1.2vw, 18px);
  font-size: clamp(38px, 6.6vw, 104px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.048em;
  max-width: 11em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.cta__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-top: clamp(32px, 5vw, 72px);
}
.cta__text {
  max-width: 27em;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.socials { display: flex; gap: 10px; }
.social {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.45s var(--ease-out);
}
.social svg { width: 18px; height: 18px; }
@media (hover: hover) {
  .social:hover {
    background: #fff;
    color: var(--accent-deep);
    border-color: #fff;
    transform: translateY(-2px);
  }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  position: relative;
  overflow: hidden;
  overflow: clip;
  padding-top: clamp(56px, 6vw, 88px);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.footer__role { margin-top: 6px; color: var(--text-dim); font-size: 14px; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(18px, 2.4vw, 36px);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}
.footer__links a { transition: color 0.25s ease; }
.footer__links a:hover { color: var(--text); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  font-size: 14px;
  color: var(--text-dim);
}
.footer__top-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.25s ease;
}
.footer__top-link svg {
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
  transition: transform 0.45s var(--ease-out);
}
.footer__top-link:hover { color: var(--text); }
.footer__top-link:hover svg { transform: rotate(-90deg) translateX(3px); }

.footer__mark {
  margin-top: clamp(24px, 3vw, 48px);
  margin-bottom: -0.2em;
  padding-bottom: env(safe-area-inset-bottom);
  text-align: center;
  white-space: nowrap;
  font-size: clamp(48px, 12.5vw, 200px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  background: linear-gradient(180deg, var(--mark) 0%, var(--bg) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}

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

/* =========================================================
   SCROLL REVEAL ("spawns")
   All use fill-mode `backwards`: once finished, nothing lingers,
   so hover transforms keep working.
   ========================================================= */
:root { --spring: cubic-bezier(0.19, 1, 0.22, 1); }

.js [data-reveal]:not(.is-in) { opacity: 0; }
.js [data-reveal].is-in {
  animation: spawn-text 1.15s var(--spring) backwards;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes spawn-text {
  from { opacity: 0; transform: translateY(38px); filter: blur(10px); }
}

/* Headlines rise out of a mask */
.js [data-reveal="title"].is-in { animation-name: spawn-title; animation-duration: 1.4s; }
@keyframes spawn-title {
  from { opacity: 0; transform: translateY(0.55em) skewY(3deg); clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; transform: none; clip-path: inset(-0.2em -0.1em -0.3em -0.1em); }
}

/* Work cards: the frame wipes up while the photo settles from a deep zoom */
.js [data-reveal="card"].is-in {
  animation: spawn-card 1.5s var(--spring) backwards;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes spawn-card {
  from { opacity: 0; transform: translateY(110px) rotate(1.5deg); clip-path: inset(38% 0 0 0 round var(--radius-lg)); }
  35%  { opacity: 1; }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round var(--radius-lg)); }
}
.js [data-reveal="card"].is-in img {
  animation: spawn-photo 2s var(--spring) backwards;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes spawn-photo {
  from { scale: 1.5; filter: grayscale(1) contrast(1.06) brightness(1.35); }
}
@media (hover: none) {
  .js [data-reveal="card"].is-in .work__meta {
    animation: spawn-meta 1s var(--spring) backwards;
    animation-delay: calc(var(--reveal-delay, 0ms) + 650ms);
  }
}
@keyframes spawn-meta {
  from { opacity: 0; transform: translateY(24px) scale(0.92); }
}

/* Panels (bento + stat): tilt up from below, then their tags cascade in */
.js [data-reveal="panel"].is-in {
  animation: spawn-panel 1.4s var(--spring) backwards;
  animation-delay: var(--reveal-delay, 0ms);
  transform-origin: 50% 0%;
}
@keyframes spawn-panel {
  from { opacity: 0; transform: perspective(1400px) translateY(90px) rotateX(16deg) scale(0.94); }
}
.js [data-reveal="panel"].is-in .tag,
.js [data-reveal="panel"].is-in .stat__platforms li {
  animation: spawn-chip 0.8s var(--spring) backwards;
  animation-delay: calc(var(--reveal-delay, 0ms) + 380ms + var(--i, 0) * 60ms);
}
@keyframes spawn-chip {
  from { opacity: 0; transform: translateY(16px) scale(0.86); }
}
.js [data-reveal="panel"].is-in .panel__ghost {
  animation: spawn-ghost 1.8s var(--spring) backwards;
  animation-delay: calc(var(--reveal-delay, 0ms) + 200ms);
}
@keyframes spawn-ghost {
  from { opacity: 0; transform: translateY(45%); }
}

/* Facts: rows fade in while their dividers sweep across */
.js [data-reveal="facts"].is-in { animation-name: spawn-fade; }
@keyframes spawn-fade { from { opacity: 0; } }
.js [data-reveal="facts"].is-in .facts__row > * {
  animation: spawn-text 1s var(--spring) backwards;
  animation-delay: calc(var(--reveal-delay, 0ms) + var(--i, 0) * 110ms);
}
.js [data-reveal="facts"].is-in .facts__row::after {
  animation: spawn-line 1.3s var(--spring) backwards;
  animation-delay: calc(var(--reveal-delay, 0ms) + var(--i, 0) * 110ms);
}
@keyframes spawn-line { from { transform: scaleX(0); } }

/* Contact card: opens out from a smaller frame, then its content follows */
.js [data-reveal="cta"].is-in {
  animation: spawn-cta 1.6s var(--spring) backwards;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes spawn-cta {
  from { opacity: 0; transform: translateY(70px); clip-path: inset(12% 9% 12% 9% round var(--radius-xl)); }
  30%  { opacity: 1; }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round var(--radius-xl)); }
}
.js [data-reveal="cta"].is-in > :not(.grain) {
  animation: spawn-text 1.2s var(--spring) backwards;
  animation-delay: calc(var(--reveal-delay, 0ms) + 350ms + var(--i, 0) * 120ms);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 901px) {
  .mobile-menu { display: none; }
}

@media (max-width: 1080px) {
  .hero__body { grid-template-columns: minmax(0, 1fr) minmax(240px, 32%); }
  .panel--a, .panel--b, .panel--c, .panel--d { grid-column: span 6; }
}

@media (max-width: 900px) {
  .nav__links,
  .nav__cta { display: none; }
  .menu-btn { display: grid; }
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .intro__cta { justify-content: flex-start; gap: 32px; }
  .stat { max-width: none; }
}

/* Phones and portrait tablets: the photo is cropped tall, so the copy stacks at the bottom */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  [data-theme] { --hero-title: #fff; }

  .hero { min-height: max(660px, min(100svh, 1180px)); }
  .hero__img { object-position: 37% 0%; }
  .hero__shade { background: var(--hero-shade-mobile); }
  .hero__body {
    grid-template-columns: 1fr;
    align-content: end;
    padding-bottom: 28px;
  }
  .hero__eyebrow, .hero__aside { text-shadow: 0 2px 24px rgba(0, 8, 30, 0.4); }
  .hero__aside { margin-top: 0; }
  .hero__tagline { max-width: 14em; }
}

@media (max-width: 760px) {
  .hero__title { font-size: clamp(52px, 18vw, 110px); }
  .hero__services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
    padding-bottom: 56px;
  }

  .strip { flex-direction: column; align-items: flex-start; gap: 22px; }
  .strip__label br { display: none; }
  .marquee { width: 100%; }

  .work {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 76%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad) * -1);
    padding-inline: var(--pad);
    scroll-padding-inline: var(--pad);
    scrollbar-width: none;
  }
  .work::-webkit-scrollbar { display: none; }
  .work__card { scroll-snap-align: start; }

  .panel--a, .panel--b, .panel--c, .panel--d { grid-column: 1 / -1; }
  .panel { min-height: 0; }
  .tag { font-size: 14px; padding: 8px 13px; }

  .facts__row { grid-template-columns: 1fr; gap: 6px; }
  .cta__actions { width: 100%; }
  .footer__bottom { flex-direction: column; }
}

@media (max-width: 420px) {
  .nav__logo { font-size: 17px; }
  .nav__tools { gap: 6px; }
  .intro__cta { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero__services li { font-size: 13.5px; }
  .stat__value { font-size: clamp(34px, 12vw, 48px); }
}

@media (max-width: 360px) {
  .nav .lang-switch { display: none; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: 560px; }
  .mobile-menu__links { justify-content: flex-start; padding-block: 16px; }
  .mobile-menu__links a { font-size: 28px; padding-block: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee__track { animation: none; }
}
