/* ============================================================
   GLOBAL STYLES — chloefrerichs.com
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Base ── */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-bg-base);
  line-height: var(--leading-normal);
  transition: background 400ms var(--ease-out), color 400ms var(--ease-out);
  overflow-x: hidden;
  cursor: none;
}

/* ── Skip link (accessibility) ── */
.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-4);
  z-index: 10000;
  padding: var(--space-2) var(--space-5);
  background: var(--color-bg-invert);
  color: var(--color-text-on-invert);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transition: top 150ms ease;
}
.skip-link:focus { top: var(--space-4); }

/* ── Focus styles ── */
:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ══════════════════════════════════════════════════════════
   CUSTOM CURSOR
   ══════════════════════════════════════════════════════════ */

.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  will-change: transform;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--color-cursor);
  border-radius: 50%;
  transition:
    width 220ms var(--ease-spring),
    height 220ms var(--ease-spring),
    border-color 400ms ease,
    opacity 200ms ease;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--color-cursor);
  border-radius: 50%;
  transition:
    background 400ms ease,
    opacity 200ms ease;
}

body.cursor-hover .cursor-ring {
  width: 54px;
  height: 54px;
  border-color: var(--color-accent);
}

body.cursor-hover .cursor-dot {
  background: var(--color-accent);
}

body.cursor-hidden .cursor-ring,
body.cursor-hidden .cursor-dot { opacity: 0; }

/* Suppress system cursor on all elements — custom cursor replaces it */
*, *::before, *::after { cursor: none !important; }


/* ══════════════════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-12);
  height: 64px;
  transition: background 250ms ease, box-shadow 250ms ease;
}

.nav.scrolled {
  background: color-mix(in srgb, var(--color-bg-base) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--color-border-subtle);
}

.nav-name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: 0.01em;
  transition: color 400ms ease;
}

.nav-links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-link);
  transition: color 150ms ease;
}

.nav-links a:hover { color: var(--color-text-link-hover); }

.nav-end {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-email {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: border-color 400ms ease, color 150ms ease;
}

.nav-email:hover {
  border-color: var(--color-accent);
  color: var(--color-text-primary);
}


/* ── Theme switcher button ── */
.theme-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.theme-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.24);
}

.theme-btn-dots {
  position: relative;
  width: 20px;
  height: 20px;
}

.theme-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
}

/* Pentagon: 5 dots at 72° intervals, radius 7px, starting from top (-90°) */
.theme-dot:nth-child(1) { background: #3B8EC3; transform: translate(-50%, -50%) translate(0px,     -7px);    } /* sky   — top         */
.theme-dot:nth-child(2) { background: #564868; transform: translate(-50%, -50%) translate(6.66px,  -2.16px); } /* dusk  — upper right */
.theme-dot:nth-child(3) { background: #C4546C; transform: translate(-50%, -50%) translate(4.11px,  5.66px);  } /* bloom — lower right */
.theme-dot:nth-child(4) { background: #CDA52E; transform: translate(-50%, -50%) translate(-4.11px, 5.66px);  } /* sand  — lower left  */
.theme-dot:nth-child(5) { background: #79B829; transform: translate(-50%, -50%) translate(-6.66px, -2.16px); } /* grove — upper left  */

.theme-btn.spinning .theme-btn-dots {
  animation: theme-spin 500ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes theme-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


/* ── Video play overlay (for audio-enabled demos) ── */
.cs-video-player {
  position: relative;
}

.cs-video-play-prompt {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: rgba(0, 0, 0, 0.38);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 200ms ease;
  z-index: 2;
}

.cs-video-play-prompt.hidden {
  opacity: 0;
  pointer-events: none;
}

.cs-play-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 150ms ease;
}

.cs-video-play-prompt:hover .cs-play-circle {
  transform: scale(1.08);
}

.cs-play-circle::after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #1a1a2e;
  margin-left: 4px;
}

.cs-play-label {
  color: rgba(255,255,255,0.9);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ══════════════════════════════════════════════════════════
   TILE STRIP
   ══════════════════════════════════════════════════════════ */

.tile-strip {
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--color-tile-primary)   0px,
    var(--color-tile-primary)   8px,
    var(--color-tile-secondary) 8px,
    var(--color-tile-secondary) 16px,
    var(--color-tile-bg)        16px,
    var(--color-tile-bg)        24px
  );
  transition: background 400ms ease;
}


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

/* Wraps hero + work section in a single continuous gradient */
.gradient-zone {
  background: linear-gradient(
    to bottom,
    var(--color-scene-gradient-1)  0%,
    var(--color-scene-gradient-2) 12%,
    var(--color-scene-gradient-3) 27%,
    var(--color-scene-gradient-4) 48%,
    var(--color-scene-gradient-5) 63%,
    #ffffff 100%
  );
  transition: background 400ms ease;
}

/* Work section inside gradient-zone is transparent, sits above palm scene */
#work.section { background: transparent; position: relative; z-index: 1; }

.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  background: transparent;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 var(--space-8);
}

/* ── Scene layer (palms + wires, aria-hidden) ── */
.hero-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Palm wrappers — JS targets these for parallax.
   mix-blend-mode + filter live here (not on hero-scene) so each palm's
   compositing layer is sized to its full height, not clipped to 100vh. */
.palm {
  position: absolute;
  mix-blend-mode: multiply;
  filter: saturate(0);
}

/* Width-based sizing: keeps fronds at the same visual size as before.
   top values match old (100vh - height) so fronds stay at the same vertical position.
   Trunks extend below 100vh and are clipped by .hero overflow:hidden. */
.palm-1 { left: -70px; top: 12vh; width: 66vh; min-width: 390px; }
.palm-2 { right: 50px;  top: 28vh; width: 54vh; min-width: 315px; }
.palm-3 { right: -40px; top: 48vh; width: 46vh; min-width: 265px; }

/* Sway layer — rotates the whole palm group (illustration + shading) */
.palm-sway {
  height: auto;
  transform-origin: 65% 100%;
  animation: frond-sway 7s ease-in-out infinite;
}

.palm-2 .palm-sway { animation-delay: -2.5s; }
.palm-3 .palm-sway { animation-delay: -4.8s; }

@keyframes frond-sway {
  0%, 100% { transform: rotate(0deg); }
  35%       { transform: rotate(1.8deg); }
  70%       { transform: rotate(-1.3deg); }
}

/* Flip layer — horizontal mirror for left-side palm */
.palm-flip {
  position: relative;
  height: auto;
}
.palm-1 .palm-flip { transform: scaleX(-1); }

/* Base illustration */
.palm-illustration {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  opacity: 0.65;
}

/* Shading layers — crossfade between 1 and 2 to suggest leaf movement */
.palm-shading,
.palm-shading-2 {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: auto;
  max-width: none;
}

.palm-shading   { animation: leaf-a 3s ease-in-out infinite; }
.palm-shading-2 { animation: leaf-b 3s ease-in-out infinite; opacity: 0; }

.palm-2 .palm-shading,
.palm-2 .palm-shading-2 { animation-delay: -1.5s; }
.palm-3 .palm-shading,
.palm-3 .palm-shading-2 { animation-delay: -3.1s; }

@keyframes leaf-a {
  0%, 35%  { opacity: 0.3; }
  50%, 85% { opacity: 0; }
  100%     { opacity: 0.3; }
}
@keyframes leaf-b {
  0%, 35%  { opacity: 0; }
  50%, 85% { opacity: 0.3; }
  100%     { opacity: 0; }
}

/* Wires layer — JS targets .powerline-svg for parallax */
.wires-layer {
  position: absolute;
  top: 520px;
  left: 0; right: 0;
  height: 200px;
  pointer-events: none;
}

.wires-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0.55;
}

/* Bird wrappers — positioned along top wire */
.bird-wrap {
  position: absolute;
  height: 84px;
  transition:
    transform 1400ms var(--ease-spring),
    opacity   700ms ease;
}

/* Slow settling transition when birds return to perch */
.bird-wrap.returning {
  transition:
    transform 2200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity   900ms ease;
}

.bird-1 { left: 28%; top: 44px; }
.bird-2 { left: 42%; top: 52px; }
.bird-3 { left: 58%; top: 55px; }
.bird-4 { left: 71%; top: 52px; }
.bird-5 { left: 83%; top: 46px; }

.bird-wrap img {
  height: 100%;
  width: auto;
  display: block;
  max-width: none;
}

/* Flying frame states */
.bird-fly-1,
.bird-fly-2 {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
}

.bird-wrap.flying .bird-perch { opacity: 0; }
.bird-wrap.flying .bird-fly-1 { animation: wing-a 0.22s steps(1, end) infinite; }
.bird-wrap.flying .bird-fly-2 { animation: wing-b 0.22s steps(1, end) infinite; }

@keyframes wing-a {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes wing-b {
  0%, 49%   { opacity: 0; }
  50%, 100% { opacity: 1; }
}

/* ── Hero text ── */
.hero-content {
  position: relative;
  z-index: 2;
  width: min(700px, calc(100vw - var(--space-16)));
  padding-top: calc(64px + var(--space-16));
  text-align: left;
}

.hero-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  transition: color 400ms ease;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 6.8vw, 6.75rem);
  font-weight: var(--weight-bold);
  line-height: 1.0;
  color: var(--color-text-primary);
  letter-spacing: -0.045em;
  margin-bottom: var(--space-6);
  transition: color 400ms ease;
}

.hero-sub {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-10);
  max-width: 460px;
  transition: color 400ms ease;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent);
  color: var(--color-accent-on-fill);
  border-radius: var(--radius-full);
  letter-spacing: 0.01em;
  transition:
    background 200ms ease,
    color 200ms ease,
    transform 180ms var(--ease-spring);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}


/* ══════════════════════════════════════════════════════════
   SECTION LAYOUT
   ══════════════════════════════════════════════════════════ */

.section {
  padding: var(--space-24) var(--space-12);
  background: var(--color-bg-base);
  transition: background 400ms ease;
}

.section-label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  transition: color 400ms ease;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
  transition: color 400ms ease;
}


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

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.work-card {
  display: block;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition:
    border-color 200ms ease,
    background   300ms ease,
    transform    250ms var(--ease-spring),
    box-shadow   250ms ease;
}

.work-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(61, 61, 61, 0.1);
}

/* Card image + video area */
.card-media {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: var(--color-bg-accent);
  transition: background 400ms ease;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 350ms ease, transform 400ms ease;
}

.work-card:hover .card-img { transform: scale(1.02); }

.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 400ms ease;
}

/* Video swaps in once JS marks the card ready */
.work-card.video-ready:hover .card-video { opacity: 1; }
.work-card.video-ready:hover .card-img   { opacity: 0; transform: none; }

/* Placeholder label shown when no image is loaded yet */
.card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-placeholder-label {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

/* Card body */
.card-body { padding: var(--space-6) var(--space-6) var(--space-8); }

.card-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.tag {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  padding: 4px 10px;
  background: transparent;
  color: var(--color-tag-text);
  border: 1px solid var(--color-tag-bg);
  border-radius: var(--radius-full);
  transition: background 300ms ease, color 300ms ease, border-color 300ms ease;
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-1);
  transition: color 400ms ease;
}

.card-meta {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  transition: color 400ms ease;
}

.card-hook {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
  transition: color 400ms ease;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-link);
  transition: gap 150ms var(--ease-spring), color 150ms ease;
}

.card-link:hover { gap: 10px; color: var(--color-text-link-hover); }


/* ══════════════════════════════════════════════════════════
   QUOTES — EDITORIAL PANELS
   ══════════════════════════════════════════════════════════ */

.quote-panel {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Background layer — swap .background-image for a real photo URL */
.quote-panel-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Quote panel backgrounds — theme-aware gradient: darkest → lighter → approaching play section bg */
.quote-bg-1 { background: var(--color-bg-invert); }
.quote-bg-2 { background: color-mix(in srgb, var(--color-bg-invert) 72%, var(--color-bg-base)); }
.quote-bg-3 { background: color-mix(in srgb, var(--color-bg-invert) 44%, var(--color-bg-base)); }

.quote-panel-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--space-24) var(--space-12);
  max-width: 1100px;
}

.quote-section-label {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-10);
}

/* Main quote text */
.quote-cascade-text {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.2vw, 5.5rem);
  font-weight: var(--weight-bold);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text-on-invert);
  font-style: italic;
  margin-bottom: var(--space-8);
}

/* Short quote — very large */
.quote-panel:nth-child(2) .quote-cascade-text {
  font-size: clamp(4rem, 9vw, 13rem);
  line-height: 1.05;
}

/* Stat number */
.quote-stat-number {
  font-family: var(--font-heading);
  font-size: clamp(7rem, 20vw, 22rem);
  font-weight: var(--weight-bold);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--color-text-on-invert);
  margin-bottom: var(--space-6);
}

.quote-text-sm {
  font-size: clamp(1.8rem, 3.2vw, 4rem) !important;
  font-style: normal !important;
  line-height: 1.35 !important;
}

.quote-cite {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: normal;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-10);
}

.quote-panel-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  transition: color 150ms ease, gap 150ms var(--ease-spring);
}

.quote-panel-link:hover {
  color: var(--color-text-on-invert);
  gap: var(--space-3);
}


/* ══════════════════════════════════════════════════════════
   PLAY SECTION
   ══════════════════════════════════════════════════════════ */

.play-section {
  padding: var(--space-20) var(--space-12);
  background: var(--color-bg-base);
  transition: background 400ms ease;
}

.play-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.play-card {
  display: block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-surface);
  transition:
    border-color 200ms ease,
    background   300ms ease,
    transform    200ms var(--ease-spring),
    box-shadow   200ms ease;
}

.play-card:hover {
  border-color: var(--color-border-default);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(61, 61, 61, 0.07);
}

.play-card-image {
  height: 160px;
  background: linear-gradient(135deg, var(--color-accent-muted), var(--color-bg-accent));
  overflow: hidden;
  transition: background 400ms ease;
}

.play-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-card-body { padding: var(--space-4) var(--space-5) var(--space-5); }

.play-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
  letter-spacing: -0.01em;
  transition: color 400ms ease;
}

.play-card-desc {
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  color: var(--color-text-secondary);
  transition: color 400ms ease;
}


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

.cta-section {
  padding: var(--space-24) var(--space-12);
  background: var(--color-bg-invert);
  transition: background 400ms ease;
}

.cta-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-4);
}

.cta-headline {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-on-invert);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-5);
  max-width: 580px;
}

.cta-body {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.6);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-10);
  max-width: 480px;
}

.cta-contact {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.cta-email {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-on-invert);
  transition: opacity 150ms ease;
}
.cta-email:hover { opacity: 0.75; }

.cta-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
}

.cta-phone {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.55);
}

.cta-looking {
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.cta-looking-label {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.cta-looking-items {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.cta-looking-item {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
}


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

.footer-tile-strip {
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--color-tile-primary)   0px,
    var(--color-tile-primary)   6px,
    var(--color-tile-secondary) 6px,
    var(--color-tile-secondary) 12px,
    var(--color-tile-bg)        12px,
    var(--color-tile-bg)        18px
  );
  opacity: 0.55;
  transition: background 400ms ease;
}

.footer {
  background: var(--color-bg-invert);
  padding: var(--space-6) var(--space-12);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.55);
}

.footer-copy {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.25);
}


/* ══════════════════════════════════════════════════════════
   CASE STUDY
   ══════════════════════════════════════════════════════════ */

body.cs-page {
  background: var(--color-bg-cs);
  transition: background 400ms var(--ease-out);
}

/* Nav on dark cs-header */
body.cs-page .nav:not(.scrolled) {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.cs-page .nav:not(.scrolled) .nav-name,
body.cs-page .nav:not(.scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.85);
}

body.cs-page .nav:not(.scrolled) .nav-email {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.65);
}

/* Header */
.cs-header {
  background: var(--color-bg-invert);
  padding: calc(64px + var(--space-16)) var(--space-12) var(--space-20);
  transition: background 400ms ease;
}

.cs-header-inner {
  max-width: 960px;
  margin: 0 auto;
}

.cs-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

.cs-back {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
  transition: color 150ms ease;
  white-space: nowrap;
}
.cs-back:hover { color: var(--color-text-on-invert); }

.cs-header-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.tag-light {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
}

.cs-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: var(--weight-bold);
  color: var(--color-text-on-invert);
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: var(--space-3);
}

.cs-company {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-6);
}

.cs-lead {
  font-size: clamp(var(--text-base), 1.4vw, var(--text-xl));
  color: rgba(255, 255, 255, 0.65);
  line-height: var(--leading-relaxed);
  max-width: 680px;
  margin-bottom: var(--space-16);
}

.cs-header-stats {
  display: flex;
  gap: var(--space-12);
  flex-wrap: wrap;
  align-items: flex-start;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-stat-num {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: var(--weight-bold);
  color: var(--color-text-on-invert);
  letter-spacing: -0.03em;
  line-height: 1.0;
}

.cs-stat-label {
  display: block;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  margin-top: var(--space-1);
  max-width: 160px;
  line-height: var(--leading-snug);
}

/* Layout: sticky sidebar + scrolling content */
.cs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  max-width: 1160px;
  margin: 0 auto;
  padding: var(--space-20) var(--space-12);
  gap: var(--space-16);
  align-items: start;
}

/* Sidebar */
.cs-nav-wrap {
  position: sticky;
  top: calc(64px + var(--space-8));
}

.cs-nav-label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  transition: color 400ms ease;
}

.cs-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cs-nav-link {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
  border-left: 2px solid transparent;
  line-height: var(--leading-snug);
  transition: color 150ms ease, border-color 150ms ease;
}

.cs-nav-link:hover { color: var(--color-text-primary); }

.cs-nav-link.active {
  color: var(--color-text-primary);
  border-left-color: var(--color-accent);
  font-weight: var(--weight-medium);
}

/* Content */
.cs-content {
  min-width: 0;
  max-width: 780px;
}

.cs-section {
  padding-bottom: var(--space-20);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
  scroll-margin-top: calc(64px + var(--space-8));
}

.cs-section:last-child { border-bottom: none; }

.cs-section-label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
  transition: color 400ms ease;
}

.cs-h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.2vw, 2.75rem);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-8);
  transition: color 400ms ease;
}

.cs-h3-lead {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  transition: color 400ms ease;
}

.cs-body-text {
  font-size: var(--text-base);
  color: var(--color-text-primary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
  transition: color 400ms ease;
}

.cs-body-text strong { font-weight: var(--weight-semibold); }
.cs-body-text em { font-style: italic; }

/* Pain / detail list */
.cs-pain-list {
  list-style: none;
  margin: var(--space-5) 0 var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cs-pain-list li {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  padding-left: var(--space-5);
  position: relative;
  transition: color 400ms ease;
}

.cs-pain-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-border-default);
}

/* Phase overview table */
.cs-phase-table {
  margin: var(--space-8) 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color 400ms ease;
}

.cs-phase-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--color-border-subtle);
  background: var(--color-bg-surface);
  transition: background 300ms ease, border-color 400ms ease;
}

.cs-phase-row:last-child { border-bottom: none; }

.cs-phase-num {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-border-strong);
  line-height: 1;
  min-width: 36px;
  padding-top: 2px;
  letter-spacing: -0.02em;
  transition: color 400ms ease;
}

.cs-phase-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
  transition: color 400ms ease;
}

.cs-phase-year {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  transition: color 400ms ease;
}

.cs-phase-problem {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-snug);
  transition: color 400ms ease;
}

/* Team meta */
.cs-team-meta {
  margin-top: var(--space-8);
  display: flex;
  gap: var(--space-10);
  flex-wrap: wrap;
}

.cs-team-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cs-team-label {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  transition: color 400ms ease;
}

.cs-team-value {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  transition: color 400ms ease;
}

/* Figures + images */
.cs-figure {
  margin: var(--space-8) 0;
}

/* Images placed directly in a figure (no container box) */
.cs-figure > img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

.cs-asset-full {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-bg-accent);
  border: 1px solid var(--color-border-subtle);
  transition: background 400ms ease, border-color 400ms ease;
}

.cs-asset-full img,
.cs-asset-full video {
  width: 100%;
  height: auto;
  display: block;
}

.cs-caption {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: var(--leading-snug);
  margin-top: var(--space-3);
  padding-left: 2px;
  transition: color 400ms ease;
}

/* Before/after comparison */
.cs-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.cs-comparison-item {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-accent);
  transition: border-color 400ms ease, background 400ms ease;
}

.cs-comparison-item img {
  width: 100%;
  height: auto;
  display: block;
}

.cs-comparison-label {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

/* Video placeholders */
.cs-video-placeholder {
  border-radius: var(--radius-xl);
  border: 1px dashed var(--color-border-default);
  background: var(--color-bg-surface);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 400ms ease, border-color 400ms ease;
}

.cs-video-placeholder-inner {
  text-align: center;
  padding: var(--space-10);
}

.cs-video-label {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  transition: color 400ms ease;
}

.cs-video-filename {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  font-family: monospace;
  margin-bottom: var(--space-2);
  transition: color 400ms ease;
}

.cs-video-note {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  transition: color 400ms ease;
}

/* Research pull quotes */
.cs-research-quotes {
  margin: var(--space-6) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cs-research-quote {
  border-left: 3px solid var(--color-accent-on-invert);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-invert);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: background 400ms ease;
}

.cs-research-quote p {
  font-style: italic;
  color: var(--color-text-on-invert);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  transition: color 400ms ease;
}

/* Pull quotes */
.cs-pull-quote {
  margin: var(--space-12) 0;
  padding: var(--space-8) var(--space-10);
  background: var(--color-bg-accent);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-border-subtle);
  transition: background 400ms ease, border-color 400ms ease;
}

.cs-pull-quote p {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: var(--weight-bold);
  font-style: italic;
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  transition: color 400ms ease;
}

.cs-pull-quote cite {
  display: block;
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  transition: color 400ms ease;
}

/* Results block */
.cs-results {
  margin: var(--space-10) 0;
  padding: var(--space-8);
  background: var(--color-bg-invert);
  border-radius: var(--radius-2xl);
  transition: background 400ms ease;
}

.cs-results-label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-6);
}

.cs-results-grid {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.cs-result-item {
  flex: 1;
  min-width: 120px;
}

.cs-result-num {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.75rem);
  font-weight: var(--weight-bold);
  color: var(--color-text-on-invert);
  letter-spacing: -0.035em;
  line-height: 1.0;
  margin-bottom: var(--space-2);
}

.cs-result-desc {
  display: block;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.65);
  line-height: var(--leading-snug);
  max-width: 180px;
}

/* Award block */
.cs-award-block {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: var(--space-8) 0;
  padding: 0;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: background 300ms ease, border-color 400ms ease;
}

.cs-award-block > div {
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cs-award-img {
  width: 160px;
  align-self: stretch;
  object-fit: cover;
  flex-shrink: 0;
}

/* Dashboard iframe embed */
.cs-dashboard-embed {
  margin: var(--space-6) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border-default);
  transition: border-color 400ms ease;
}

.cs-dashboard-embed iframe {
  display: block;
  width: 100%;
  border: none;
}

.cs-award-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
  transition: color 400ms ease;
}

.cs-award-sub {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color 400ms ease;
}

/* Principles (through-line) */
.cs-principles {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.cs-principle {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
}

.cs-principle-num {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  min-width: 36px;
  line-height: 1;
  padding-top: 2px;
  transition: color 400ms ease;
}

.cs-principle-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  transition: color 400ms ease;
}

.cs-principle-body {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  transition: color 400ms ease;
}

/* Responsive: collapse sidebar below 900px */
@media (max-width: 900px) {
  .cs-layout {
    grid-template-columns: 1fr;
    gap: var(--space-10);
    padding: var(--space-12) var(--space-6);
  }

  .cs-nav-wrap {
    position: static;
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .cs-nav-list { flex-direction: row; flex-wrap: wrap; gap: var(--space-2); }
  .cs-nav-link { border-left: none; padding-left: 0; border-bottom: 2px solid transparent; padding-bottom: var(--space-1); }
  .cs-nav-link.active { border-left-color: transparent; border-bottom-color: var(--color-accent); }

  .cs-content { max-width: 100%; }
  .cs-comparison { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .cs-header { padding: calc(64px + var(--space-10)) var(--space-6) var(--space-12); }
  .cs-header-stats { gap: var(--space-8); }
  .cs-results-grid { flex-direction: column; gap: var(--space-6); }
  .cs-pull-quote { padding: var(--space-6); }
}


/* ══════════════════════════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity   500ms var(--ease-out),
    transform 500ms var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Stagger children inside .reveal-group */
.reveal-group .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-group .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-group .reveal:nth-child(3) { transition-delay: 160ms; }


/* ══════════════════════════════════════════════════════════
   SLIDESHOW REVEAL COMPONENT
   ══════════════════════════════════════════════════════════ */

.cs-slideshow {
  margin: var(--space-8) 0;
}

.cs-slideshow-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1180 / 544;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  user-select: none;
}

.cs-slideshow-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  /* no transition — instant swap prevents any background flash */
}

.cs-slideshow-frame img.ss-active {
  opacity: 1;
}

.cs-slideshow-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 500ms ease;
  pointer-events: none;
}

.cs-slideshow.revealed .cs-slideshow-overlay {
  opacity: 1;
}

.cs-slideshow-winner-label {
  color: #ffffff;
  font-family: var(--font-body);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  padding: var(--space-8);
  margin: 0;
}

/* Reset X button — inside overlay, top-right corner */
.cs-slideshow-reset {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease 400ms, background 150ms ease;
}

.cs-slideshow.revealed .cs-slideshow-reset {
  pointer-events: all;
  opacity: 1;
}

.cs-slideshow-reset:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Hover hint — invisible by default, appears on hover */
.cs-slideshow-hint {
  margin-top: var(--space-3);
  font-size: 13px;
  color: var(--color-text-secondary);
  font-style: italic;
  opacity: 0;
  transition: opacity 250ms ease;
  pointer-events: none;
}

.cs-slideshow:hover:not(.revealed) .cs-slideshow-hint {
  opacity: 1;
}

.cs-slideshow.revealed .cs-slideshow-hint {
  opacity: 0;
}
.reveal-group .reveal:nth-child(4) { transition-delay: 240ms; }


/* ══════════════════════════════════════════════════════════
   PLAY PAGE — mosaic grid, hover captions, lightbox
   ══════════════════════════════════════════════════════════ */

.play-header {
  padding: calc(64px + 200px) var(--space-8) var(--space-6);
  max-width: 100%;
}

.play-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: right;
  color: var(--color-text-on-invert);
  margin: 0;
  white-space: nowrap;
}

/* Nav on dark play page */
body.play-page {
  background: var(--color-bg-invert);
  transition: background 400ms ease;
}
body.play-page .nav:not(.scrolled) {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.play-page .nav:not(.scrolled) .nav-name,
body.play-page .nav:not(.scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.85);
}
body.play-page .nav:not(.scrolled) .nav-email {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.65);
}

.play-accent {
  color: var(--color-accent-on-invert);
}

.play-word {
  display: inline-block;
  cursor: pointer;
  user-select: none;
  transform-origin: center bottom;
}

@keyframes word-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes word-jump {
  0%   { transform: translateY(0); }
  35%  { transform: translateY(-22px); }
  60%  { transform: translateY(-6px); }
  80%  { transform: translateY(-14px); }
  100% { transform: translateY(0); }
}
@keyframes word-grow {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.play-word.anim-spin  { animation: word-spin  0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.play-word.anim-jump  { animation: word-jump  0.6s  cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.play-word.anim-grow  { animation: word-grow  0.5s  cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

/* ── Mosaic grid ── */
.play-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 var(--space-8) var(--space-16);
  align-items: start;
}

.play-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--color-bg-accent);
  transition: background 400ms ease;
  aspect-ratio: 3 / 4;
}

/* Two-column span — aspect-ratio kept proportional so row heights match */
.play-item.w-2col { grid-column: span 2; aspect-ratio: 3 / 2; }

/* Full-width span */
.play-item.w-full { grid-column: span 3; aspect-ratio: 16 / 6; }

.play-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 500ms var(--ease-spring);
}

.play-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 500ms var(--ease-spring);
}

.play-item:hover img,
.play-item:hover video {
  transform: scale(1.03);
}

/* ── Hover caption ── */
.play-item-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: var(--space-5);
  background: linear-gradient(to top, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.18) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}

.play-item:hover .play-item-caption {
  opacity: 1;
}

.play-item-caption p {
  color: #ffffff;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--leading-snug);
  margin: 0;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-media {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  display: block;
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-caption {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-align: center;
  white-space: nowrap;
}

/* ── Homepage play preview ── */
.play-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-8);
}

.play-preview-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  flex-grow: 1;
  flex-basis: 200px;
  height: 260px;
  background: var(--color-bg-accent);
  transition: background 400ms ease;
  cursor: pointer;
}

.play-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 500ms var(--ease-spring);
}

.play-preview-item:hover img {
  transform: scale(1.04);
}

.play-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 280ms ease;
}

.play-preview-item:hover .play-preview-overlay {
  background: rgba(0,0,0,0.15);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .play-mosaic { grid-template-columns: repeat(2, 1fr); }
  .play-item.w-full { grid-column: span 2; }
  .play-header h1 { font-size: clamp(2.5rem, 10vw, 6rem); white-space: normal; }
  .play-preview-item { height: 200px; }
}

@media (max-width: 600px) {
  .play-mosaic { grid-template-columns: 1fr; padding: 0 var(--space-4) var(--space-10); }
  .play-item.w-2col, .play-item.w-full { grid-column: span 1; }
  .play-header h1 { font-size: clamp(2rem, 12vw, 4rem); white-space: normal; }
  .play-preview-grid { gap: 5px; }
  .play-preview-item { flex-basis: calc(50% - 3px); height: 180px; }
}


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

body.about-page {
  background: var(--color-bg-cs);
  transition: background 400ms ease;
}

/* Nav on dark about-hero */
body.about-page .nav:not(.scrolled) {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.about-page .nav:not(.scrolled) .nav-name,
body.about-page .nav:not(.scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.85);
}
body.about-page .nav:not(.scrolled) .nav-email {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.65);
}

/* ── Hero ── */
.about-hero {
  background: var(--color-bg-invert);
  padding: calc(64px + var(--space-16)) var(--space-12) var(--space-24);
  transition: background 400ms ease;
}

.about-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-20);
}

.about-text {
  flex: 1;
  min-width: 0;
}

.about-headline {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 7vw, 7.5rem);
  font-weight: var(--weight-bold);
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--color-text-on-invert);
  margin-bottom: var(--space-4);
}

.about-name {
  color: var(--color-accent-on-invert);
}

.about-subhead {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-8);
}

.about-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.about-bullets li {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.78);
  padding-left: var(--space-5);
  position: relative;
  line-height: 1.5;
}

.about-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.28);
}

.about-portrait {
  flex-shrink: 0;
  order: -1;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.12);
  transform-origin: center top;
}

/* ── Experience timeline ── */
.about-experience,
.about-skills {
  padding: var(--space-20) var(--space-12);
  transition: border-color 400ms ease;
}

.about-experience {
  border-top: 1px solid var(--color-border-subtle);
}

.about-skills {
  border-top: 1px solid var(--color-border-subtle);
}

.about-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.about-section-inner > .section-label {
  margin-bottom: var(--space-10);
}

.about-timeline {
  display: flex;
  flex-direction: column;
}

.about-timeline-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-10);
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: border-color 400ms ease;
}

.about-timeline-item:first-child {
  border-top: 1px solid var(--color-border-subtle);
  transition: border-color 400ms ease;
}

.about-timeline-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-top: 3px;
}

.about-timeline-date {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.about-timeline-company {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.about-timeline-role {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.about-timeline-content p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.75;
  max-width: 620px;
}

/* ── Skills ── */
.about-skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-12);
  margin-top: 0;
}

.about-skills-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.about-skills-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.about-skills-list li {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* ── CTA ── */
.about-cta {
  padding: var(--space-24) var(--space-12);
  background: var(--color-bg-invert);
  text-align: center;
  transition: background 400ms ease;
}

.about-cta .section-label {
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: var(--space-4);
}

.about-cta-heading {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  color: var(--color-text-on-invert);
  margin-bottom: var(--space-8);
  line-height: 1.05;
}

.about-cta-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.about-cta-email,
.about-cta-linkedin {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.65);
  transition: color 150ms ease;
  letter-spacing: 0.01em;
}

.about-cta-email:hover,
.about-cta-linkedin:hover {
  color: var(--color-text-on-invert);
}

.about-cta-divider {
  color: rgba(255, 255, 255, 0.25);
  font-size: var(--text-lg);
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .about-hero-inner {
    flex-direction: column;
    gap: var(--space-8);
    text-align: left;
  }
  .about-portrait {
    order: 0;
    width: 160px;
    height: 160px;
  }
  .about-timeline-item {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .about-timeline-meta {
    flex-direction: row;
    gap: var(--space-4);
    align-items: baseline;
  }
  .about-skills-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 540px) {
  .about-hero { padding-left: var(--space-6); padding-right: var(--space-6); }
  .about-experience, .about-skills { padding-left: var(--space-6); padding-right: var(--space-6); }
  .about-cta { padding-left: var(--space-6); padding-right: var(--space-6); }
  .about-skills-grid { grid-template-columns: 1fr; }
}


/* ══════════════════════════════════════════════════════════
   GLOBAL RESPONSIVE — homepage + shared nav/hero
   ══════════════════════════════════════════════════════════ */

/* Work cards → single column when window is narrow (mobile + resized desktop) */
@media (max-width: 700px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* Mobile: hide email pill + theme button, tighten gutters, stack hero */
@media (max-width: 640px) {
  .nav-end { display: none; }

  /* Tighten side gutters on sections */
  .section { padding-left: var(--space-5); padding-right: var(--space-5); }

  /* Hero: auto height, text above, scene pinned to bottom */
  .hero {
    height: auto;
    min-height: unset;
    padding: 0;
    overflow: hidden;
  }

  /* Text sits at the top, padding-bottom = scene height + small gap */
  .hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: calc(64px + var(--space-8)) var(--space-5) 300px;
  }

  .hero-headline { margin-bottom: var(--space-10); }

  /* Scene stays absolute but breaks free of inset:0 — pins to bottom only */
  .hero-scene {
    top: auto;
    bottom: 0;
    height: 280px;
    mix-blend-mode: normal;
  }

  /* Wires are hardcoded at top:520px for desktop — reposition for the 280px mobile scene */
  .wires-layer {
    top: 40px;
  }

  /* Palms: switch from vh-based to px-based for the fixed 280px mobile scene */
  .palm-1 { top: 0; width: 105px; }
  .palm-2 { top: 0; width: 86px; }
  .palm-3 { top: 40px; width: 62px; }
}
