/* ============================================================
   Sean Pak Portfolio — Design System
   Inspired by springsummer.dk layout language (original work)
   ============================================================ */

:root {
  --white: hsl(0 0% 100%);
  --black: hsl(0 0% 0%);
  --grey: hsl(0 0% 21%);
  --beige: hsl(43 49% 90%);
  --accent: hsl(13 88% 56%);

  --bg: var(--beige);
  --fg: var(--black);
  --muted: var(--grey);

  --font-display: "Anton", Impact, Haettenschweiler, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --margin-d: 2.7rem;
  --margin-m: 1rem;
  --gap: 1rem;
  --sidebar-w: 15.5rem;
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }
address { font-style: normal; }

/* ---------- Typography ---------- */
.h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.7rem, 10.5vw, 12.5rem);
  line-height: 0.76;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 0.85;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* Narrow phones: long words ("Classification") overflow at the 3.5rem floor */
@media (max-width: 374px) {
  .h2 { font-size: 15vw; }
}

.h1, .h2, .h3 { overflow-wrap: break-word; }

.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.body-xl {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.body-l {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.4;
  font-weight: 400;
}

.body-m {
  font-size: 1rem;
  line-height: 1.5;
}

.body-s {
  font-size: 0.875rem;
  line-height: 1.45;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

/* ---------- Layout ---------- */
.site-wrap {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.main {
  min-width: 0;
  padding-bottom: 0;
}

.container {
  width: 100%;
  padding-left: var(--margin-m);
  padding-right: var(--margin-m);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
}

@media (min-width: 900px) {
  .site-wrap {
    grid-template-columns: 1fr var(--sidebar-w);
  }

  .container {
    padding-left: var(--margin-d);
    padding-right: var(--margin-d);
  }

  .grid-12 {
    grid-template-columns: repeat(12, 1fr);
  }

  .main {
    padding-right: 0;
  }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  pointer-events: auto;
}

@media (min-width: 900px) {
  .site-header {
    right: var(--sidebar-w);
  }
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--black);
}

.logo span { display: block; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  background: var(--black);
  color: var(--white);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.menu-toggle:hover {
  background: var(--accent);
  color: var(--black);
}

.menu-toggle .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

.menu-toggle[aria-expanded="true"] {
  background: var(--white);
  color: var(--black);
}

/* ---------- Sticky right-rail widgets (SS-style) ---------- */
.sidebar {
  display: none;
}

.rail-anchor {
  height: 1px;
  width: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: absolute;
}

@media (min-width: 900px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-w);
    height: 100vh;
    padding: 1.1rem 0.85rem 1.25rem;
    background: transparent;
    border-left: none;
    z-index: 90;
    pointer-events: none;
  }

  .sidebar-meta,
  .sidebar-widgets,
  .rail-widget {
    pointer-events: auto;
  }

  .sidebar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 0.35rem;
    background: rgba(247, 241, 227, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .sidebar-clock,
  .sidebar-loc {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    writing-mode: horizontal-tb;
    transform: none;
  }

  .sidebar-widgets {
    position: relative;
    flex: 1;
    min-height: 0;
  }

  .rail-widget {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.35rem;
    background: rgba(247, 241, 227, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity 0.5s var(--ease), transform 0.7s var(--ease), visibility 0s linear 0.7s,
      background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    overflow: hidden;
  }

  .rail-widget.is-past {
    transform: translateY(-18px);
  }

  .rail-widget.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    /* the incoming widget waits for the outgoing one to clear */
    transition-delay: 0.12s, 0.12s, 0s, 0s, 0s, 0s;
  }

  .rail-widget-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .rail-index {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    letter-spacing: 0.06em;
    opacity: 0.55;
  }

  /* progress through the current section */
  .rail-widget::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: currentColor;
    opacity: 0.35;
    transform-origin: 0 50%;
    transform: scaleX(var(--rail-p, 0));
  }

  .rail-widget-title {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 500;
  }

  .rail-widget-copy,
  .rail-sub {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    line-height: 1.35;
    letter-spacing: 0.02em;
    opacity: 0.75;
  }

  .rail-widget-link {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    text-decoration: none;
  }

  .rail-widget-link strong {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: background-size 0.45s var(--ease);
  }

  .rail-widget-link:hover strong {
    background-size: 100% 1px;
  }

  .rail-widget-link:hover .rail-icon {
    transform: scale(1.15);
  }

  .rail-icon {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    color: var(--beige);
    font-size: 0.7rem;
    line-height: 1;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
  }

  .rail-newsletter {
    display: flex;
    gap: 0.35rem;
  }

  .rail-newsletter input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, 0.28);
    border-radius: 0.25rem;
    background: transparent;
    padding: 0.45rem 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: inherit;
  }

  .rail-newsletter input::placeholder {
    color: rgba(0, 0, 0, 0.55);
  }

  .rail-newsletter button {
    flex: 0 0 auto;
    width: 1.85rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.28);
    background: var(--black);
    color: var(--beige);
    font-size: 0.85rem;
    line-height: 1;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
  }

  .rail-newsletter button:hover {
    background: var(--accent);
    color: var(--black);
    border-color: var(--accent);
  }

  .rail-widget-note {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    opacity: 0.7;
  }

  /* Invert widgets over dark sections */
  body.is-on-dark .rail-widget,
  body.is-on-dark .sidebar-meta {
    background: rgba(20, 20, 20, 0.72);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--white);
  }

  body.is-on-dark .rail-icon {
    background: var(--white);
    color: var(--black);
  }

  body.is-on-dark .rail-newsletter input,
  body.is-on-dark .rail-newsletter button {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
  }

  body.is-on-dark .rail-newsletter button {
    background: var(--white);
    color: var(--black);
  }
}

/* Mobile: the active widget docks at the bottom and slides up once the hero is passed */
@media (max-width: 899px) {
  .sidebar {
    display: block;
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    pointer-events: none;
    transform: translateY(calc(100% + 1.5rem));
    transition: transform 0.6s var(--ease);
  }

  body.rail-on .sidebar {
    transform: translateY(0);
  }

  .sidebar-meta,
  .rail-widget-copy,
  .rail-index {
    display: none;
  }

  .sidebar-widgets {
    position: relative;
    height: 4.4rem;
  }

  .rail-widget {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    gap: 0.35rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    background: rgba(247, 241, 227, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), visibility 0s linear 0.5s;
    pointer-events: none;
  }

  .rail-widget.is-past {
    transform: translateY(-12px);
  }

  .rail-widget.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0.08s, 0.08s, 0s;
    pointer-events: auto;
  }

  .rail-widget-title {
    font-size: 0.72rem;
    font-weight: 500;
  }

  .rail-widget-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
  }

  .rail-widget-link strong {
    display: block;
    font-size: 0.75rem;
  }

  .rail-sub {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    opacity: 0.7;
  }

  .rail-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    background: var(--black);
    color: var(--beige);
  }

  .rail-newsletter {
    display: flex;
    gap: 0.4rem;
  }

  .rail-newsletter input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, 0.28);
    border-radius: 0.25rem;
    background: transparent;
    padding: 0.4rem 0.5rem;
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  .rail-newsletter button {
    width: 2.2rem;
    border: 0;
    border-radius: 0.25rem;
    background: var(--black);
    color: var(--beige);
  }

  .rail-widget-note {
    font-family: var(--font-mono);
    font-size: 0.55rem;
  }

  body.is-on-dark .rail-widget {
    background: rgba(20, 20, 20, 0.9);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--white);
  }

  body.menu-open .sidebar {
    display: none;
  }

  body {
    padding-bottom: 5.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rail-widget,
  .sidebar {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ---------- Menu Overlay ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--black);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
  overflow-y: auto;
}

.menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.menu-overlay-inner {
  min-height: 100%;
  padding: calc(var(--header-h) + 1.5rem) var(--margin-m) 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .menu-overlay-inner {
    padding: calc(var(--header-h) + 2rem) var(--margin-d) 3rem;
    padding-right: calc(var(--margin-d) + var(--sidebar-w));
  }
}

.menu-close-row {
  display: flex;
  justify-content: flex-end;
}

.menu-close {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  background: var(--white);
  color: var(--black);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-close:hover { background: var(--accent); }

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .menu-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.menu-col h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.25rem;
}

.menu-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.menu-col a {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.menu-col a:hover { color: var(--accent); }

.menu-featured {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.menu-featured .label {
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.75rem;
  display: block;
}

.menu-featured a {
  display: block;
}

.menu-featured img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 0.35rem;
  margin-bottom: 0.65rem;
  filter: grayscale(20%);
  transition: filter 0.3s, transform 0.4s var(--ease);
}

.menu-featured a:hover img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

.menu-featured strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
}

.menu-featured span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--header-h) + 1rem);
  padding-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.hero-city {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.hero-city .pulse {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(240, 95, 55, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 0.5rem rgba(240, 95, 55, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 95, 55, 0); }
}

.hero-bio {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.hero-lead {
  margin-bottom: 0.35rem;
  opacity: 0.55;
  font-weight: 500;
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.hero-rotator {
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  perspective: 900px;
}

.hero-rotator .word {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7.5vw, 8rem);
  line-height: 0.9;
  text-transform: uppercase;
  opacity: 0;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  pointer-events: none;
}

/* Home: fill the fold so only the top ~25% of "Recently" peeks in
   (section padding-top + kicker padding-top + a quarter of its 0.8em line) */
.hero:has(+ .section-invert) {
  min-height: calc(100svh - 3rem - clamp(3rem, 12vw, 9rem) * 0.32);
}

.hero-rotator .word.is-active {
  opacity: 1;
  pointer-events: auto;
}

.capability-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  padding: 0.26rem 0.6rem;
  background: var(--white);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.51rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.chip svg {
  width: 0.675rem;
  height: 0.675rem;
  flex-shrink: 0;
}

/* ---------- Sections ---------- */
.section {
  padding-block: 4.5rem;
}

.section-tight { padding-block: 3rem; }

/* Home: tuck the intro up so the Recently band peeks above the fold */
.hero + .section-tight { padding-block: 1.25rem 1.5rem; }
.hero ~ .section-invert { padding-top: 3rem; }

.section.container {
  padding-inline: 3px;
}

@media (max-width: 899px) {
  .section.container { padding-inline: var(--margin-m); }
}

.section-invert {
  background: var(--black);
  color: var(--white);
}

.section-white {
  background: var(--white);
}

.intro-blurb {
  max-width: 52rem;
}

.intro-blurb p + p { margin-top: 1rem; }

/* ---------- Awards strip ---------- */
.awards-strip .awards-kicker {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 9rem);
  line-height: 0.8;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.awards-copy {
  max-width: 42rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.75);
}

.awards-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.awards-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.awards-links a:hover {
  background: var(--accent);
  color: var(--black);
  border-color: var(--accent);
}

/* ---------- Clients ---------- */
.clients-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
}

.clients-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
}

.client-logo {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 0.25s;
  white-space: nowrap;
}

.client-logo:hover { opacity: 1; }

.client-logo.serif {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0;
}

/* ---------- Featured work ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  background: var(--black);
  color: var(--white);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.btn-pill:hover {
  background: var(--accent);
  color: var(--black);
}

.btn-pill.outline {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}

.btn-pill.outline:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .project-grid .project-card:first-child {
    grid-column: 1 / -1;
  }
}

.project-card {
  display: block;
}

.project-card-media {
  position: relative;
  overflow: hidden;
  border-radius: 0.4rem;
  background: var(--grey);
  aspect-ratio: 16 / 10;
  margin-bottom: 1rem;
}

.project-card:first-child .project-card-media {
  aspect-ratio: 21 / 10;
}

@media (max-width: 899px) {
  .project-card:first-child .project-card-media {
    aspect-ratio: 16 / 10;
  }
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.project-card:hover .project-card-media img {
  transform: scale(1.05);
}

.project-card-meta .label {
  color: var(--muted);
  margin-bottom: 0.35rem;
  display: block;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 0.9;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- About teaser ---------- */
.about-teaser {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .about-teaser {
    grid-template-columns: 5fr 7fr;
    gap: 3rem;
    align-items: start;
  }
}

.about-teaser .stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.stat {
  padding: 1.15rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 0.35rem;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* ---------- Newsletter ---------- */
.newsletter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: end;
}

@media (min-width: 900px) {
  .newsletter {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
}

.newsletter-form input:focus {
  border-color: var(--black);
}

.newsletter-note {
  margin-top: 0.65rem;
  font-size: 0.75rem;
  opacity: 0.55;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 4rem 0 2rem;
  background: var(--black);
  color: var(--white);
}

.footer-cta {
  margin-bottom: 3rem;
}

.footer-cta .h2 {
  margin-bottom: 1.25rem;
}

.footer-cta .h2 > span:not(.split-w) {
  display: block;
  color: rgba(255, 255, 255, 0.4);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.footer-actions a {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.footer-actions a.primary {
  background: var(--accent);
  color: var(--black);
  border-color: var(--accent);
}

.footer-actions a:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 3rem;
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.85rem;
}

.footer-grid a,
.footer-grid p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-grid a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: clamp(4rem, 18vw, 14rem);
  line-height: 0.75;
  text-transform: uppercase;
  text-align: center;
  background: linear-gradient(to bottom, rgba(255,255,255,0.35), rgba(255,255,255,0));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  pointer-events: none;
  margin-top: 1rem;
  overflow: hidden;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- Work page ---------- */
.page-hero {
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 2rem;
}

.page-hero .h1 {
  margin-bottom: 1.5rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2.5rem;
}

.filter-chip {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filter-chip:hover,
.filter-chip.is-active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 4rem;
}

@media (min-width: 900px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1.25rem;
  }
}

.work-grid .project-card[hidden] {
  display: none;
}

/* ---------- Case study ---------- */
.case-hero {
  padding-top: calc(var(--header-h) + 1.5rem);
}

.case-hero-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.4rem;
  background: var(--grey);
  margin-bottom: 2rem;
}

.case-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-hero-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.case-hero-meta > * { min-width: 0; }

@media (min-width: 900px) {
  .case-hero-meta {
    grid-template-columns: 7fr 5fr;
    align-items: end;
  }
}

.case-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.case-services span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
}

.case-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
}

.case-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 900px) {
  .case-body {
    grid-template-columns: 4fr 8fr;
    gap: 3rem;
  }
}

.case-nav-side {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: start;
}

.case-nav-side a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0;
  opacity: 0.45;
  transition: opacity 0.2s;
}

.case-nav-side a:hover,
.case-nav-side a.is-active {
  opacity: 1;
}

/* Mobile: section links wrap into a compact row instead of a tall column */
@media (max-width: 899px) {
  .case-body > * { min-width: 0; }
  .case-nav-side {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.1rem;
  }
}

.case-section {
  margin-bottom: 3rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.case-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 0.9;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.case-section p + p { margin-top: 1rem; }

.case-quote {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--white);
  border-radius: 0.4rem;
  border-left: 4px solid var(--accent);
}

.case-quote blockquote {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.case-quote cite {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-style: normal;
  opacity: 0.55;
}

.video-placeholder {
  aspect-ratio: 16 / 9;
  background: var(--grey);
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.video-placeholder::before {
  content: "";
  position: absolute;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.video-placeholder span {
  position: relative;
  z-index: 1;
  margin-top: 5rem;
}

.award-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.award-chip {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  background: var(--accent);
  color: var(--black);
  border-radius: 999px;
}

.next-project {
  display: block;
  padding: 3rem 0 4rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.next-project .label {
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.5;
}

.next-project .h3 {
  transition: color 0.25s;
}

.next-project:hover .h3 {
  color: var(--grey);
}

.next-project .arrow {
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.3s var(--ease);
}

.next-project:hover .arrow {
  transform: translateX(0.4rem);
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-muted { color: var(--muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* ---------- Media placeholders (until real screens are added) ---------- */
.media-ph {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  background: var(--grey);
  color: var(--white);
  width: 100%;
  height: 100%;
  min-height: 10rem;
  overflow: hidden;
  transition: background 0.4s var(--ease);
}
.project-card:hover .media-ph { background: var(--black); }
.media-ph-kind {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}
.media-ph-name {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--accent);
}
.media-ph-hero { aspect-ratio: 21 / 9; }
.media-ph-wide { aspect-ratio: 16 / 9; border-radius: 0.4rem; margin: 2rem 0; height: auto; }

/* Case study: structured sections (constraints, decisions, figures, reflections) */
.case-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
}
.case-list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 1rem;
  line-height: 1.5;
}
.case-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--fg);
}
.case-subhead {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
  margin: 1.75rem 0 0;
}
.case-northstar {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 0.4rem;
  font-size: 0.95rem;
  line-height: 1.45;
}
.case-northstar strong {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 0.5rem;
}

.decision {
  border-top: 1px solid var(--fg);
  padding: 1.5rem 0 1.75rem;
}
.decision-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  opacity: 0.55;
}
.decision h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1;
  text-transform: uppercase;
  margin: 0.35rem 0 1rem;
}
.decision dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 1.5rem;
}
.decision dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 0.75rem;
}
.decision dd {
  font-size: 1rem;
  line-height: 1.5;
}
@media (min-width: 900px) {
  .decision dl { grid-template-columns: 8.5rem 1fr; }
  .decision dt { margin-top: 0; padding-top: 0.28rem; }
  .decision dd { margin-bottom: 0.6rem; }
}

.case-figure { margin: 2rem 0; }
.case-figure .media-ph-wide { margin: 0; }
.case-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.7;
}

.case-reflect {
  list-style: none;
  counter-reset: reflect;
  padding: 0;
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}
.case-reflect li {
  counter-increment: reflect;
  position: relative;
  padding-left: 2.25rem;
  font-size: 1rem;
  line-height: 1.5;
}
.case-reflect li::before {
  content: counter(reflect, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.55;
}

.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.case-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--fg);
  border-radius: 999px;
}
.case-links a:hover { background: var(--fg); color: var(--bg); }

/* Real photos in case studies */
.media-img { display: block; width: 100%; height: auto; border-radius: 0.4rem; object-fit: cover; }
.media-img-hero { aspect-ratio: 21 / 9; }
.case-figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 900px) { .case-figure-pair { grid-template-columns: 1fr; } }

/* Logo images in the teams & partners row */
.client-logo-img { display: inline-flex; align-items: center; justify-content: center; height: 3rem; opacity: 0.7; filter: grayscale(1); mix-blend-mode: multiply; }
.client-logo-img img { display: block; height: 100%; width: auto; max-width: 11rem; object-fit: contain; }
.client-logo-img:hover { opacity: 1; filter: none; }

/* Case-study extras: phone screenshot strips, tall figures, platform/tech logos */
.case-figure-phones { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 0.75rem; }
.case-figure-phones img { width: auto; height: auto; max-height: 34rem; max-width: calc(50% - 0.5rem); }
.case-figure-phones.is-three img { max-width: calc(33.333% - 0.5rem); }
.case-figure-tall img { width: auto; max-height: 36rem; margin: 0 auto; }
.case-figure-tall.is-narrow img { max-width: 100%; }
@media (max-width: 700px) { .case-figure-phones img, .case-figure-phones.is-three img { max-width: calc(50% - 0.5rem); max-height: 26rem; } }
.platform-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; margin-top: 0.75rem; }
.platform-logos img { display: block; height: 1.5rem; width: auto; opacity: 0.85; }
.tech-logo { display: block; height: 2rem; width: auto; margin-top: 1rem; }
.media-img-hero.is-top { object-position: 50% 38%; }

/* Recently strip: stacked paragraphs; logo links; ISEF board pager */
.awards-copy p + p { margin-top: 0.9rem; }
.pager-frame img { width: auto; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.pager-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; font-family: var(--font-mono); font-size: 0.75rem; }
.pager-controls button:disabled { opacity: 0.35; cursor: default; }
.pager-frame img[hidden] { display: none; }

/* ============================================================
   Motion layer (landing page) — active only under html.motion,
   which <head> sets unless prefers-reduced-motion is on.
   ============================================================ */
:root { --ease-expo: cubic-bezier(0.19, 1, 0.22, 1); }

/* Split-text masks */
.split-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.split-i, .split-c { display: inline-block; }

.motion .split-i {
  transform: translate3d(0, 110%, 0) rotate(4deg);
  transform-origin: 0 100%;
  transition: transform 1s var(--ease-expo);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.motion .is-in .split-i,
.motion.is-loaded .hero-bio .split-i { transform: none; }

/* Hero: chips pop in, then the bio words cascade, then "Built" and the rotator */
.motion .hero-bio .split-i { transition-duration: 0.9s; transition-delay: calc(0.4s + var(--i, 0) * 14ms); }
.motion .hero-bio:not(.is-split) { opacity: 0; }

.motion .hero-lead,
.motion .hero-rotator {
  opacity: 0;
  transform: translate3d(0, 1.5rem, 0);
  transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-expo);
}
.motion .hero-lead { transition-delay: 1s; }
.motion .hero-rotator { transition-delay: 1.1s; clip-path: inset(0 0 100% 0); transition-property: opacity, transform, clip-path; }
.motion.is-loaded .hero-lead { opacity: 0.55; transform: none; }
.motion.is-loaded .hero-rotator { opacity: 1; transform: none; clip-path: inset(0 0 -10% 0); }

.motion .capability-chips .chip {
  opacity: 0;
  transform: translate3d(0, 0.75rem, 0) scale(0.85);
  transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-expo), background 0.25s, color 0.25s;
  transition-delay: calc(0.1s + var(--i, 0) * 60ms);
}
.motion.is-loaded .capability-chips .chip { opacity: 1; transform: none; }
.motion .chip:hover { background: var(--black); color: var(--white); transition-delay: 0s; }
.motion .chip:hover .chip-arrow { transform: translateX(3px); }
.chip-arrow { transition: transform 0.3s var(--ease); }

/* Case cards: image wipes up out of a mask and settles from a zoom */
.motion .project-card.reveal .project-card-media {
  clip-path: inset(100% 0 0 0 round 0.4rem);
  transition: clip-path 1.2s var(--ease-expo);
}
.motion .project-card.reveal.is-visible .project-card-media { clip-path: inset(0 0 0 0 round 0.4rem); }
.motion .project-card-media img {
  scale: 1.25;
  transition: transform 0.9s var(--ease-out), scale 1.6s var(--ease-expo), filter 0.5s var(--ease);
}
.motion .project-card.is-visible .project-card-media img { scale: 1; }
.motion .project-card h3 { transition: transform 0.5s var(--ease-out); }
.motion .project-card:hover h3 { transform: translateX(0.5rem); }
.motion .project-card.has-cursor .project-card-media img { filter: brightness(0.85); }

/* Cursor follower: JS owns the outer transform, the inner pill scales */
.cursor-pill {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  width: 0;
  height: 0;
  pointer-events: none;
}
.cursor-pill-inner {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.45s var(--ease-expo);
}
.cursor-pill.is-on .cursor-pill-inner { transform: translate(-50%, -50%) scale(1); }
.cursor-arrow { display: inline-block; transition: transform 0.4s var(--ease-expo); }
.cursor-pill.is-on .cursor-arrow { transform: rotate(-45deg); }
.motion .project-card.has-cursor { cursor: none; }

/* Teams & partners: infinite marquee, pauses on hover / keyboard focus */
.clients-track.is-marquee {
  flex-wrap: nowrap;
  gap: 0;
  overflow: hidden;
  background: var(--bg); /* backdrop for the logos' multiply blend inside the mask */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-group {
  display: flex;
  flex: none;
  align-items: center;
  gap: 3.5rem;
  padding-right: 3.5rem;
  animation: marquee 40s linear infinite;
}
.clients-track.is-marquee:hover .marquee-group,
.clients-track.is-marquee:focus-within .marquee-group { animation-play-state: paused; }
.marquee-group .client-logo-img { transition: opacity 0.3s, filter 0.3s, transform 0.4s var(--ease-expo); }
.marquee-group .client-logo-img:hover { transform: scale(1.08); }
@keyframes marquee { to { transform: translate3d(-100%, 0, 0); } }

/* Magnetic pills (JS sets `translate`) */
.magnetic {
  transition: translate 0.5s var(--ease-expo), background 0.25s, color 0.25s, border-color 0.25s;
}
.magnetic:hover { transition: translate 0.15s linear, background 0.25s, color 0.25s, border-color 0.25s; }

/* Stats: lift on hover */
.motion .stat { transition: background 0.35s var(--ease), transform 0.5s var(--ease-expo); }
.motion .stat:hover { background: var(--black); color: var(--white); transform: translateY(-4px); }
.stat strong { font-variant-numeric: tabular-nums; }

/* Menu: columns and links rise in when the overlay opens */
.motion .menu-col h3,
.motion .menu-col li {
  opacity: 0;
  transform: translate3d(0, 1.25rem, 0);
  transition: opacity 0.5s var(--ease-out), transform 0.8s var(--ease-expo);
}
.motion .menu-overlay.is-open .menu-col h3,
.motion .menu-overlay.is-open .menu-col li {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.12s + var(--i, 0) * 30ms);
}
.motion .menu-col a { display: inline-block; transition: color 0.2s, transform 0.4s var(--ease-expo); }
.motion .menu-col a:hover { transform: translateX(0.4rem); }

/* Footer wordmark: letters rise with scroll (JS sets each transform) */
.footer-wordmark.is-split { background: none; color: inherit; }
.footer-wordmark .split-c {
  background: linear-gradient(to bottom, rgba(255,255,255,0.35), rgba(255,255,255,0));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-group { animation: none; }
}
