/* ==========================================================================
   SERENGETI STUDIO — Design System
   Tokens drawn directly from the brand mark (plum + gold).
   Display: Fraunces / Body: Karla / Labels+data: Archivo
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Karla:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Archivo:ital,wght@0,500;0,600;0,700;0,800&display=swap');

:root {
  /* ---- Color tokens (from the Serengeti Studio mark) ---- */
  --color-primary: #905078;   /* logo plum */
  --color-surface: #211621;   /* warm charcoal — lifted from near-black for a glossier read */
  --color-accent:  #f0ba12;   /* logo gold */
  --color-text:    #f8f1f5;   /* warm off-white */
  --color-muted:   #c2a7b5;   /* muted mauve, captions/meta */
  --color-border:  #45303f;   /* hairline dividers */

  /* derived, not new hues — tints/shades of the six above */
  --color-surface-raised: #2f2030;
  --color-primary-deep:   #663654;
  --color-text-on-accent: #1a1014;
  --color-overlay: rgba(33, 22, 33, 0.68);
  --color-glass: rgba(47, 32, 48, 0.55);
  --color-glow-plum: rgba(144, 80, 120, 0.35);
  --color-glow-gold: rgba(240, 186, 18, 0.16);

  /* ---- Type ---- */
  --font-display: 'Fraunces', serif;
  --font-body: 'Karla', sans-serif;
  --font-label: 'Archivo', sans-serif;

  --text-display: clamp(2.75rem, 3.2vw + 2rem, 5.75rem);
  --text-h1: clamp(2.1rem, 1.6vw + 1.6rem, 3.25rem);
  --text-h2: clamp(1.6rem, 1vw + 1.3rem, 2.3rem);
  --text-h3: clamp(1.2rem, 0.5vw + 1.05rem, 1.5rem);
  --text-body-lg: 1.1875rem;
  --text-body: 1.0625rem;
  --text-caption: 0.9rem;
  --text-label: 0.78rem;
  --text-hero: clamp(3.4rem, 8.5vw + 1rem, 9rem);

  --leading-tight: 1.08;
  --leading-snug: 1.3;
  --leading-normal: 1.6;

  /* ---- Layout ---- */
  --container-w: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-pad: clamp(4rem, 8vw, 7.5rem);
  --radius: 2px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 900px 600px at 8% 0%, var(--color-glow-plum), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 22%, var(--color-glow-gold), transparent 55%),
    radial-gradient(ellipse 800px 700px at 92% 85%, var(--color-glow-plum), transparent 60%),
    var(--color-surface);
  background-attachment: fixed;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* Visible focus states everywhere — never removed without replacement */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

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

/* ---------------------------------------------------------------------- */
/* Typography                                                              */
/* ---------------------------------------------------------------------- */
.font-display { font-family: var(--font-display); }

.eyebrow {
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 1.6em;
  height: 1px;
  background: var(--color-accent);
  display: inline-block;
}

.display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}
.display em {
  font-style: italic;
  font-weight: 500;
  color: var(--color-accent);
}

h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}
h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: var(--leading-snug);
}
h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: var(--leading-snug);
}
.lede {
  font-size: var(--text-body-lg);
  color: var(--color-text);
  line-height: var(--leading-normal);
  max-width: 62ch;
}
.body-muted { color: var(--color-muted); }
.caption {
  font-family: var(--font-label);
  font-size: var(--text-caption);
  color: var(--color-muted);
}
.label {
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------------- */
/* Layout utilities                                                        */
/* ---------------------------------------------------------------------- */
.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-pad); }
.section-tight { padding-block: calc(var(--section-pad) * 0.55); }
.stack { display: flex; flex-direction: column; }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4.5rem);
}
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 1.6rem;
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  position: relative;
  background: linear-gradient(180deg, #ffce42, var(--color-accent));
  color: var(--color-text-on-accent);
  box-shadow: 0 8px 24px -8px rgba(240,186,18,0.55);
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0 0 55% 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.35), transparent);
  pointer-events: none;
}
.btn-primary:hover { background: linear-gradient(180deg, #ffd046, #ffce42); transform: translateY(-2px); box-shadow: 0 10px 28px -8px rgba(240,186,18,0.7); }
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-2px); }
.btn svg { width: 1.05em; height: 1.05em; }

/* ---------------------------------------------------------------------- */
/* Nav                                                                     */
/* ---------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding-block: 1.4rem;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(26, 16, 20, 0.92);
  backdrop-filter: blur(10px);
  padding-block: 0.9rem;
  border-bottom-color: var(--color-border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-brand img { width: 38px; height: 38px; border-radius: 50%; }
.nav-brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.nav-brand-word span { color: var(--color-accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.2rem);
  font-family: var(--font-label);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.nav-links a { position: relative; padding-block: 0.3rem; color: var(--color-muted); transition: color 0.3s var(--ease); }
.nav-links a:hover, .nav-links a.is-active { color: var(--color-text); }
.nav-links a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--color-accent);
}
.nav-cta {
  background: linear-gradient(180deg, #ffce42, var(--color-accent));
  color: var(--color-text-on-accent);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(240,186,18,0.5);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(240,186,18,0.65); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex;
    width: 42px; height: 42px;
    align-items: center; justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
  }
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.4rem;
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(80vw, 320px);
    background: var(--color-surface-raised);
    padding: 6rem 2rem 2rem;
    border-left: 1px solid var(--color-border);
  }
}

/* ---------------------------------------------------------------------- */
/* The Migration Line — signature element                                  */
/* A thin gold thread that runs between every section, standing in for     */
/* the continuous route this studio carries a project along.              */
/* ---------------------------------------------------------------------- */
.migration-line {
  position: relative;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.migration-line svg { width: 100%; height: 100%; }
.migration-line .path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.5;
  stroke-dasharray: 6 10;
  opacity: 0.55;
  animation: migrate 26s linear infinite;
}
.migration-line .node {
  fill: var(--color-accent);
}
@keyframes migrate {
  to { stroke-dashoffset: -320; }
}

/* Vertical migration line used inside the service constellation */
.thread {
  position: absolute;
  left: 27px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-border) 6%, var(--color-border) 94%, transparent);
}
.thread::before {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  width: 2px; height: 40%;
  background: var(--color-accent);
  transform: translateX(-50%);
  animation: threadflow 7s var(--ease) infinite;
}
@keyframes threadflow {
  0% { top: -40%; }
  100% { top: 100%; }
}
@media (max-width: 720px) {
  .thread { left: 27px; }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(33,22,33,0.36) 0%, rgba(33,22,33,0.4) 40%, var(--color-surface) 97%),
    linear-gradient(90deg, rgba(33,22,33,0.82) 0%, rgba(33,22,33,0.12) 58%);
  z-index: -1;
}
.hero::after {
  /* glossy highlight sweep — static, not animated; the movement budget is spent on the slideshow */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.10) 0%, transparent 22%, transparent 78%, rgba(240,186,18,0.10) 100%);
  mix-blend-mode: overlay;
  z-index: -1;
  pointer-events: none;
}
/* Wordmark block — vertically centred, flush to the container's left edge */
.hero-inner {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(7rem, 15vh, 10.5rem) 2rem;
}
.hero-wordmark {
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  /* Let Fraunces use its optical-size axis at display scale — crisper at 375px, grander at 1440px */
  font-optical-sizing: auto;
  text-wrap: balance;
}
.hero-wordmark-line { display: block; }
.hero-wordmark-accent {
  font-style: italic;
  font-weight: 600;
  color: var(--color-accent);
}
/* Role line — Archivo, wide-tracked caps, middot-separated */
.hero-roles {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.hero-roles span { display: inline-flex; align-items: center; }
.hero-roles span:not(:last-child)::after {
  content: '·';
  margin-inline: 0.75em;
  color: var(--color-accent);
  opacity: 0.75;
}
.hero-lede {
  margin-top: 1.8rem;
  max-width: 34ch;
  font-size: var(--text-body-lg);
  color: var(--color-text);
  line-height: var(--leading-snug);
}

/* Scroll cue — quiet, centred, gentle looping chevron above the rail */
.hero-scroll {
  position: relative;
  z-index: 3;
  align-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0 auto 1.3rem;
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.3s var(--ease);
}
.hero-scroll:hover { color: var(--color-text); }
.hero-scroll svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  animation: heroScrollBob 2.4s ease-in-out infinite;
}
@keyframes heroScrollBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll svg { animation: none; }
}

/* Hero index rail — the signature wayfinding element. Frosted glass bar
   pinned to the hero's bottom edge; five real internal links. */
.hero-rail {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--color-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-border);
}
.hero-rail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 48px;
  padding: 1.15rem clamp(1rem, 2vw, 1.6rem);
  border-left: 1px solid var(--color-border);
  font-family: var(--font-label);
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-rail-item:first-child { border-left: none; }
.hero-rail-item svg {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  color: var(--color-accent);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-rail-item:hover { background: var(--color-surface-raised); }
.hero-rail-item:hover svg { transform: translate(2px, -2px); }
.hero-rail-cta {
  background: linear-gradient(180deg, #ffce42, var(--color-accent));
  color: var(--color-text-on-accent);
}
.hero-rail-cta svg { color: var(--color-text-on-accent); }
.hero-rail-cta:hover { background: linear-gradient(180deg, #ffd046, #ffce42); }

/* Legibility safeguard: where backdrop-filter is unsupported, the frosted rail
   would sit at 0.55 alpha over the brightest video frames. Fall back to a
   near-solid surface tint (same plum-charcoal token) so text stays ≥ 4.5:1. */
@supports not ((backdrop-filter: blur(14px)) or (-webkit-backdrop-filter: blur(14px))) {
  .hero-rail { background: rgba(33, 22, 33, 0.86); }
}

@media (max-width: 640px) {
  .hero-rail { grid-template-columns: 1fr 1fr; }
  .hero-rail-item { border-top: 1px solid var(--color-border); }
  .hero-rail-item:nth-child(odd) { border-left: none; }
  .hero-rail-item:nth-child(1),
  .hero-rail-item:nth-child(2) { border-top: none; }
  .hero-rail-cta {
    grid-column: 1 / -1;
    justify-content: center;
    border-left: none;
  }
}

.page-hero {
  position: relative;
  padding-block: calc(var(--section-pad) + 5rem) var(--section-pad);
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(33,22,33,0.58), var(--color-surface) 93%);
  z-index: -1;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.08) 0%, transparent 24%, transparent 78%, rgba(240,186,18,0.09) 100%);
  mix-blend-mode: overlay;
  z-index: -1;
  pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* Stat strip                                                              */
/* ---------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.stat {
  padding: 2.2rem 1.5rem;
  text-align: center;
  border-left: 1px solid var(--color-border);
}
.stat:first-child { border-left: none; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
  color: var(--color-accent);
  font-weight: 600;
}
.stat-label {
  margin-top: 0.4rem;
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
}

/* ---------------------------------------------------------------------- */
/* Service constellation (NOT a 4-card grid)                               */
/* ---------------------------------------------------------------------- */
.constellation { position: relative; padding-left: 76px; }
.service-node {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3.2rem);
  border-bottom: 1px solid var(--color-border);
}
.service-node:last-child { border-bottom: none; }
.service-node::before {
  content: '';
  position: absolute;
  left: -76px;
  top: clamp(2rem, 4vw, 3.2rem);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
}
.service-node-title { display: flex; align-items: flex-start; gap: 0.9rem; }
.service-node-title svg {
  width: 28px; height: 28px;
  flex-shrink: 0;
  color: var(--color-accent);
  margin-top: 0.2rem;
}
.service-node-links {
  margin-top: 1.1rem;
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.service-node-links a {
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.service-node-links a:hover { color: var(--color-accent); border-color: var(--color-accent); }

@media (max-width: 720px) {
  .service-node { grid-template-columns: 1fr; }
  .constellation { padding-left: 56px; }
  .service-node::before { left: -56px; }
  .thread { left: 20px; }
}

/* ---------------------------------------------------------------------- */
/* Work / portfolio cards — poster-card treatment, no fabricated stills    */
/* ---------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.8rem;
}
.work-card {
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  transition: transform 0.4s var(--ease);
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
}
.work-card:hover { transform: translateY(-6px); }
/* The thumbnail (poster still) — fixed 16:9, no white flash, no fill-in */
.work-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(155deg, var(--card-a, #663654), var(--card-b, #1a1014));
  box-shadow: 0 14px 34px -18px rgba(0,0,0,0.7);
  transition: box-shadow 0.4s var(--ease);
}
.work-card:hover .work-card-thumb { box-shadow: 0 22px 46px -18px rgba(240,186,18,0.4); }
.work-card-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.6s var(--ease);
  z-index: 0;
  border: none;
  outline: none;
  background: transparent;
  pointer-events: none; /* paused <video> is decorative — clicks belong to the card button */
  -webkit-appearance: none;
  appearance: none;
}
video.work-card-poster::-webkit-media-controls { display: none !important; }
.work-card-poster.is-loaded { opacity: 1; }
.work-card:hover .work-card-poster.is-loaded { transform: scale(1.05); }
/* Subtle dark gradient at the bottom of the thumb for depth, not for text */
.work-card-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,12,16,0.35) 0%, transparent 40%);
  z-index: 1;
  pointer-events: none;
}
.work-card-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.work-card-play span {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(20,12,16,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(248,241,245,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.work-card:hover .work-card-play span,
.work-card:focus-visible .work-card-play span {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  border-color: var(--color-accent);
  transform: scale(1.1);
}
.work-card-play svg { width: 24px; height: 24px; margin-left: 3px; }
/* Text block — sits BELOW the thumbnail, clean and readable */
.work-card-text {
  padding: 1.1rem 0.2rem 0;
}
.work-card-year {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  font-weight: 700;
  text-transform: uppercase;
}
.work-card-title {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}
.work-card-desc {
  margin-top: 0.45rem;
  font-size: 0.92rem;
  color: var(--color-muted);
}

/* ---------------------------------------------------------------------- */
/* Generic content cards (creative services sub-blocks etc.)               */
/* ---------------------------------------------------------------------- */
.panel {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  background: var(--color-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 20px 40px -24px rgba(0,0,0,0.5);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.panel:hover { border-color: rgba(240,186,18,0.4); }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.tag {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

/* ---------------------------------------------------------------------- */
/* CTA band                                                                */
/* ---------------------------------------------------------------------- */
.cta-band {
  background: var(--color-primary);
  background-image: radial-gradient(circle at 15% 20%, rgba(240,186,18,0.16), transparent 45%);
}
.cta-band .h2 { color: var(--color-text); }
.cta-band .eyebrow { color: var(--color-text); } /* gold-on-plum fails AA for small text; swap to off-white */

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: 3.5rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-brand img { width: 34px; height: 34px; border-radius: 50%; }
.footer-links a {
  display: block;
  padding-block: 0.35rem;
  color: var(--color-muted);
  font-size: 0.92rem;
  transition: color 0.3s var(--ease);
}
.footer-links a:hover { color: var(--color-accent); }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* ---------------------------------------------------------------------- */
/* Hero slideshow — crossfading stills standing in for video, until real   */
/* footage is loaded in. Each slide gets a slow Ken Burns drift.           */
/* ---------------------------------------------------------------------- */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: var(--color-surface); /* shows while the first image decodes */
}
.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  transition: opacity 2s ease;
  will-change: opacity, transform;
}
.hero-bg-slide.is-active {
  opacity: 1;
  animation: kenburns 9s ease-out forwards;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg-slide.is-active { animation: none; }
}

/* ---------------------------------------------------------------------- */
/* Hero background video — real muted loops, one clip playing at a time,   */
/* crossfading into the next on 'ended'. Falls back to the image          */
/* slideshow above if reduced-motion is set or video fails to load.       */
/* ---------------------------------------------------------------------- */
.hero-bg-video-wrap {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: var(--color-surface);
  overflow: hidden;
}
.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-bg-video.is-visible { opacity: 1; }

.hero-motion-toggle {
  position: absolute;
  z-index: 5;
  right: clamp(1rem, 3vw, 2rem);
  top: clamp(5.5rem, 12vh, 8rem); /* below the fixed nav, clear of the bottom index rail */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(33,22,33,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(248,241,245,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.hero-motion-toggle:hover { background: rgba(33,22,33,0.78); transform: scale(1.06); }
.hero-motion-toggle svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------------- */
/* Client logo wall — monochrome by default (keeps 36 different brand      */
/* colors from turning into visual noise), full color revealed on hover.   */
/* Requires source logos with real alpha transparency to work cleanly.    */
/* ---------------------------------------------------------------------- */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: clamp(1rem, 2vw, 1.4rem);
  align-items: stretch;
}
.logo-wall-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 92px;
  padding: 1.1rem;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 24px -14px rgba(0,0,0,0.6);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.logo-wall-item:hover,
.logo-wall-item:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -14px rgba(240,186,18,0.5);
}
.logo-wall-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---------------------------------------------------------------------- */
/* StoryBoard filmstrip — sequential frames with sprocket-hole styling,    */
/* the sketch-stage counterpart to the finished work below it.            */
/* ---------------------------------------------------------------------- */
.storyboard-strip {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  padding-block: 0.5rem 1rem;
  scroll-snap-type: x proximity;
}
.storyboard-frame {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: min(78vw, 300px);
  border-radius: 6px;
  background: var(--color-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
  cursor: pointer;
  text-align: left;
  padding: 0;
  color: inherit;
  font: inherit;
}
.storyboard-frame:hover { transform: translateY(-6px) scale(1.02); border-color: var(--color-accent); }
.storyboard-frame-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px dashed var(--color-border);
  background:
    radial-gradient(circle 4px at 12px 50%, var(--color-surface) 98%, transparent 100%),
    radial-gradient(circle 4px at calc(100% - 12px) 50%, var(--color-surface) 98%, transparent 100%);
}
.storyboard-frame-num {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  font-weight: 700;
}
.storyboard-frame-year {
  font-family: var(--font-label);
  font-size: 0.72rem;
  color: var(--color-muted);
}
.storyboard-frame-body { padding: 1.4rem; min-height: 132px; }
.storyboard-frame-body h3 { font-size: 1.1rem; }
.storyboard-frame-body p { margin-top: 0.6rem; }

/* ---------------------------------------------------------------------- */
/* Photo Book Covers — a small 3D shelf; hover tilts each cover as if      */
/* being picked up.                                                        */
/* ---------------------------------------------------------------------- */
.book-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: 1rem 1.5rem;
  perspective: 1400px;
}
.book-wrap { display: flex; flex-direction: column; gap: 1rem; max-width: 190px; }
.book {
  width: 190px;
  height: 260px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-18deg);
  transition: transform 0.6s var(--ease);
  cursor: pointer;
}
.book:hover, .book:focus-within { transform: rotateY(-32deg) translateX(-6px); }
.book-cover {
  position: absolute;
  inset: 0;
  border-radius: 2px 6px 6px 2px;
  background-size: cover;
  background-position: center;
  box-shadow: 6px 12px 28px -10px rgba(0,0,0,0.6);
  background-color: var(--book-a, #663654); /* shows while the cover photo loads */
}
.book-spine {
  position: absolute;
  width: 24px;
  height: 100%;
  left: -24px;
  top: 0;
  transform: rotateY(90deg);
  transform-origin: right;
  background: var(--book-spine, #45303f);
  border-radius: 2px 0 0 2px;
}
.book-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.25;
}
.book-caption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---------------------------------------------------------------------- */
/* StoryBoard frame images — real sketches, cropped to a consistent strip  */
/* ---------------------------------------------------------------------- */
.storyboard-frame-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  border-bottom: 1px dashed var(--color-border);
}

/* ---------------------------------------------------------------------- */
/* Horizontal scroller controls — shared by StoryBoard and Book shelf.      */
/* Left/right arrow buttons that scroll the strip, so it never looks like   */
/* content is just cut off at the edge.                                     */
/* ---------------------------------------------------------------------- */
.scroller { position: relative; }
.scroller-track {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-block: 0.5rem 1.2rem;
  scrollbar-width: none;
}
.scroller-track::-webkit-scrollbar { display: none; }
.scroller-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.6);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}
.scroller-btn:hover { transform: translateY(-50%) scale(1.08); background: #ffce42; }
.scroller-btn[disabled] { opacity: 0.25; cursor: default; pointer-events: none; }
.scroller-btn svg { width: 22px; height: 22px; }
.scroller-btn-prev { left: -14px; }
.scroller-btn-next { right: -14px; }
@media (max-width: 720px) {
  .scroller-btn-prev { left: 4px; }
  .scroller-btn-next { right: 4px; }
}

/* ---------------------------------------------------------------------- */
/* Lightbox — shared modal for playing project videos and enlarging book  */
/* covers / storyboard frames. Opens centered, dims the page behind it.    */
/* ---------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(12, 7, 10, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-inner {
  position: relative;
  width: min(1100px, 100%);
  max-height: 90vh;
  transform: scale(0.96);
  transition: transform 0.35s var(--ease);
}
.lightbox.is-open .lightbox-inner { transform: scale(1); }
.lightbox-media {
  width: 100%;
  max-height: 78vh;
  border-radius: 8px;
  background: #000;
  display: block;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
}
.lightbox video.lightbox-media { aspect-ratio: 16 / 9; object-fit: contain; }
.lightbox img.lightbox-media { object-fit: contain; }
.lightbox-caption {
  margin-top: 1rem;
  font-family: var(--font-label);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--color-text);
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px -6px rgba(0,0,0,0.7);
  transition: transform 0.3s var(--ease);
}
.lightbox-close:hover { transform: scale(1.1) rotate(90deg); }
.lightbox-close svg { width: 22px; height: 22px; }
@media (max-width: 600px) {
  .lightbox-close { top: 8px; right: 8px; }
}

/* Book + storyboard become keyboard/mouse-openable buttons */
.book, .storyboard-frame { border: none; }
.storyboard-frame:focus-visible, .book:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* ---------------------------------------------------------------------- */
/* Utility                                                                 */
/* ---------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mx-auto { margin-inline: auto; }
.max-w-prose { max-width: 68ch; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---------------------------------------------------------------------- */
/* Contact page — WhatsApp actions, brief form states                      */
/* ---------------------------------------------------------------------- */
.contact-action { width: 100%; justify-content: space-between; min-height: 48px; }
.contact-action > span { min-width: 0; white-space: normal; }
/* Web3Forms honeypot — visually-hidden wrapper (never display:none on the input) */
.hp-field {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.field-error {
  display: none; margin-top: 0.4rem;
  font-family: var(--font-label); font-size: 0.72rem;
  letter-spacing: 0.03em; color: var(--color-accent);
}
.field-error.is-visible { display: block; }
.form-status { min-height: 1.2rem; margin: 0; }
.form-status[data-state="error"] { color: var(--color-accent); font-weight: 600; }
input.has-error, textarea.has-error, select.has-error {
  border-color: var(--color-accent) !important;
}
.form-success { display: flex; flex-direction: column; align-items: flex-start; gap: 0.8rem; }
.form-success svg { width: 44px; height: 44px; color: var(--color-accent); }

