/* Cinematic dark theme — oklch color system */

@property --border-alpha {
  syntax: '<number>';
  initial-value: 0.08;
  inherits: false;
}

@property --glow-intensity {
  syntax: '<number>';
  initial-value: 0;
  inherits: false;
}

:root {
  /* Core palette — oklch for perceptual uniformity */
  --ink: oklch(0.97 0.01 270);
  --ink-soft: oklch(0.92 0.02 270);
  --muted: oklch(0.67 0.01 250);
  --white: oklch(1 0 0);
  --cardA: oklch(0.1 0.005 270);
  --cardB: oklch(0.11 0.005 270);

  /* Dynamic borders via color-mix */
  --border: color-mix(in oklch, white 8%, transparent);
  --border-hover: color-mix(in oklch, white 18%, transparent);
  --border-focus: color-mix(in oklch, white 30%, transparent);

  /* Accent surfaces */
  --accent-subtle: color-mix(in oklch, white 6%, transparent);
  --accent-subtle-strong: color-mix(in oklch, white 10%, transparent);

  /* Easing — mechanical vs organic vs spring */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-smooth: cubic-bezier(0.25, 1, 0.3, 1);
  --ease-out-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring: linear(
    0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%,
    0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%,
    1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 83.6%, 1
  );

  /* Duration tokens — snappy, modern */
  --duration-fast: 120ms;
  --duration-moderate: 200ms;
  --duration-slow: 350ms;
  --duration-fast-responsive: 120ms;
  --duration-moderate-responsive: 200ms;
  --duration-slow-responsive: 350ms;
}

@media (max-width: 768px) {
  :root {
    --duration-fast-responsive: 100ms;
    --duration-moderate-responsive: 160ms;
    --duration-slow-responsive: 280ms;
  }
}

@media (min-width: 900px) {
  :root {
    --duration-fast-responsive: 120ms;
    --duration-moderate-responsive: 200ms;
    --duration-slow-responsive: 350ms;
  }
}

/* Hover flicker — staggered blink on interactive elements */
@keyframes flicker-blink {
  0%, 20%, 60%, 100% { opacity: 1; }
  40%, 80% { opacity: 0.5; }
}

/* Hero flicker — rapid blink in first 8% of a 4.5s cycle (~350ms active + ~4s idle) */
@keyframes hero-flicker {
  0%, 2%, 5%, 8%, 100% { opacity: 1; }
  3.5%, 6.5% { opacity: 0.4; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
  background: #000;
  color: var(--ink);
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .resources-table tbody tr {
    opacity: 1;
    transform: none;
  }

}

body {
  margin: 0;
  font-family: "Rubik", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  position: relative;
  overflow-x: hidden;
}


/* Global static splotched background + vignette */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background:
    radial-gradient(1200px 800px at 12% 20%, #0e0e10 0%, transparent 60%),
    radial-gradient(1000px 700px at 80% 28%, #0a0a0a 0%, transparent 55%),
    radial-gradient(1000px 800px at 42% 74%, #121214 0%, transparent 62%),
    radial-gradient(800px 600px at 60% 60%, #0c0c0e 0%, transparent 55%),
    linear-gradient(180deg, #000 0%, #0b0b0b 100%);
  filter: blur(2px);
  opacity: 0.98;
}

body::after {
  background:
    radial-gradient(1400px 900px at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.22) 82%),
    radial-gradient(2200px 1400px at 50% 50%, transparent 62%, rgba(0, 0, 0, 0.28) 100%);
  z-index: -1;
}

/* Premiere / RSVP: own hero layers — skip global vignette pseudo-backgrounds */
body.page-standalone::before,
body.page-standalone::after {
  content: none;
  display: none;
}

/* Layout primitives */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(clamp(20px, 4vw, 24px), env(safe-area-inset-left));
  padding-right: max(clamp(20px, 4vw, 24px), env(safe-area-inset-right));
  position: relative;
}

.row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.spread {
  justify-content: space-between;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 28px;
  isolation: isolate; /* Create stacking context to prevent overlap */
}

/* Team cards in grid-2 */
.grid-2 .card {
  position: relative;
  z-index: 1;
  transition:
    transform var(--duration-moderate) var(--ease-spring),
    border-color var(--duration-moderate) var(--ease-out-smooth);
}

@media (hover: hover) and (pointer: fine) {
  .grid-2 .card:hover,
  .grid-2 .card:focus-visible {
    z-index: 10;
    transform: translateY(-3px);
  }
}

.grid-2 .card:focus-visible {
  z-index: 10;
  transform: translateY(-3px);
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 3px;
}

.grid-2 .card:active {
  transform: translateY(-1px) scale(0.98);
}

@media (max-width: 768px) {
  .grid-2 .card:hover,
  .grid-2 .card:focus-visible {
    transform: translateY(-2px);
  }
}

/* Compact team cards on desktop */
@media (min-width: 769px) {
  #team .grid-2 {
    max-width: 820px;
    margin-inline: auto;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    row-gap: 12px;
  }
  #team .grid-2 .card {
    padding: 14px 24px;
  }
  #team .grid-2 .card .avatar {
    aspect-ratio: 2.8 / 1;
    border-radius: 10px;
    margin-bottom: 10px;
  }
  #team .grid-2 .card .h3 {
    font-size: 19px;
    margin: 6px 0;
  }
  #team .grid-2 .card .p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
  }
  #team .grid-3 {
    max-width: 820px;
    margin-inline: auto;
  }
}

.narrow {
  max-width: 870px;
}


.mini-cards-spacing {
  margin-top: 24px;
}

.team-description {
  margin-top: 20px;
}

/* Sections */
.section {
  padding: clamp(72px, 12vw, 128px) 0;
  min-height: 100vh;
}

.section:first-of-type {
  padding-top: 72px;
}

/* Hero */
.hero {
  position: relative;
  background: transparent;
  overflow: visible;
}

.section.hero {
  padding-top: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  overflow: visible !important;
  position: relative;
  z-index: 1;
}

.hero-inner {
  padding: 92vh 0 1vh;
  overflow: visible;
  min-height: 0;
}

.hero .hero-inner {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 769px) {
  .hero .hero-inner {
    max-width: none;
    margin-left: 0;
    padding-left: 24px;
  }
}

/* Tighten hero spacing on mobile */
@media (max-width: 768px) {
  .hero.section {
    min-height: 66vh !important;
    max-height: 100vh !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: visible !important;
  }

  .hero-inner {
    padding-top: 0 !important;
    padding-bottom: clamp(8px, 2vh, 16px) !important;
    /* Horizontal padding comes from .container class (24px) */
    width: 100%;
    overflow: visible;
    max-width: 100%;
  }
  
  .display {
    margin: 0 0 16px;
    line-height: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: clamp(40px, 8vw, 108px) !important;
    letter-spacing: -0.03em;
  }
  
  .display .line {
    display: block;
    overflow: visible;
  }
  
  .lede {
    margin: 8px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: clamp(18px, 2.2vw, 24px) !important;
    word-spacing: 0.05em;
  }

  .hero .lede br {
    display: none;
  }

  .hero .lede-indent {
    margin-left: 0;
  }

  .hero-lockup {
    overflow: visible;
  }

  .hero .display {
    font-size: clamp(28px, 7vw, 60px) !important;
    margin: 0 0 10px;
    line-height: 1;
    letter-spacing: -0.03em;
  }

  .hero .lede {
    font-size: clamp(13px, 2vw, 18px) !important;
    margin: 0 0 16px 0;
  }
}

.display {
  font-family: 'Bebas Neue', sans-serif !important;
  font-weight: 400 !important;
  font-style: normal;
  font-optical-sizing: auto;
  font-size: clamp(40px, 8vw, 108px);
  line-height: .9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin: 10px 0 12px;
  text-shadow: 0 2px 0 #000, 0 0 16px rgba(255, 255, 255, .12);
  -webkit-text-stroke: 1px currentColor;
  text-wrap: balance;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  overflow: visible;
  max-width: 100%;
}

.display .line {
  display: block;
  overflow: visible;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.display-accent {
  font-family: 'Bebas Neue', sans-serif !important;
  font-weight: 400;
  -webkit-text-stroke: 0;
  letter-spacing: -0.02em;
  text-shadow:
    -2px 0 0 currentColor,
     2px 0 0 currentColor,
     0 -2px 0 currentColor,
     0  2px 0 currentColor,
    -1.5px -1.5px 0 currentColor,
     1.5px -1.5px 0 currentColor,
    -1.5px  1.5px 0 currentColor,
     1.5px  1.5px 0 currentColor;
}

.kicker {
  font-family: 'Roboto Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  font-family: 'Rubik', sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size: clamp(18px, 2.2vw, 24px);
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  max-width: 820px;
  text-align: left;
  text-wrap: pretty;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: visible;
  hyphens: auto;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #0f0f12aa;
  color: var(--ink);
  border: 1px solid var(--border);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.scroll-cue .chevron {
  font-size: 24px;
  line-height: 1;
}

.scroll-cue:hover {
  filter: brightness(1.06);
}

.hero-watermark {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: clamp(56px, 12vw, 120px);
  opacity: .08;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .5));
}

/* Typography */
.h2 {
  font-family: 'Roboto Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(26px, 5vw, 54px);
  letter-spacing: -0.035em;
  margin: 0 0 12px;
  text-wrap: balance;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.h3 {
  font-family: 'Roboto Mono', ui-monospace, monospace;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 8px 0;
}

.h3.inline-name {
  display: inline;
  margin: 0;
  color: var(--ink);
}

.p {
  font-family: "Rubik", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 1.7;
  color: #e8ebffde;
  text-wrap: pretty;
}

.mute {
  color: var(--muted);
}

.small {
  font-size: 13px;
  color: var(--muted);
}

/* Inline text links inside body copy (e.g., social links in Story) */
.inline-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition:
    color var(--duration-fast) var(--ease-out-smooth),
    text-decoration-color var(--duration-fast) var(--ease-out-smooth);
}

.inline-link:hover,
.inline-link:focus-visible {
  color: var(--ink-soft);
  text-decoration-color: rgba(255, 255, 255, 0.6);
  outline: none;
}

/* Section headings */
.bar {
  position: relative;
  padding-top: 10px;
}

.team-heading {
  margin-bottom: 0 !important;
  align-self: end;
}

.team-social {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  align-self: end;
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .team-social {
    justify-content: flex-start;
    margin-bottom: 0;
  }

  #team .cards.grid-2 {
    grid-template-columns: auto 1fr;
    row-gap: 12px;
    column-gap: 8px;
  }

  #team .cards.grid-2 > .card + .card {
    margin-top: 12px;
  }

  #team .team-heading {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  #team .team-social {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    align-self: end;
  }

  #team .cards.grid-2 > .card {
    grid-column: 1 / -1;
  }
}

/* Section heading text */
.h2.bar.animate-on-scroll.is-visible {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}


/* Cards */
.cards {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}


/* Base card */
.card {
  background: color-mix(in oklch, white 2%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition:
    transform var(--duration-moderate) var(--ease-spring),
    border-color var(--duration-moderate) var(--ease-out-smooth);
  position: relative;
}

/* Default card hover (not interview/mini) - desktop */
@media (hover: hover) and (pointer: fine) {
  .card:not(.card--interview):not(.card--mini):hover,
  .card:not(.card--interview):not(.card--mini):focus-visible {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    outline: none;
  }
}

.card:not(.card--interview):not(.card--mini):focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 3px;
}

/* Card touch feedback */
.card:not(.card--interview):not(.card--mini):active {
  transform: translateY(-1px) scale(0.98);
}

/* Mobile: reduced card hover intensity */
@media (max-width: 768px) {
  .card:not(.card--interview):not(.card--mini):hover,
  .card:not(.card--interview):not(.card--mini):focus-visible {
    transform: translateY(-2px);
  }

  .card:not(.card--interview):not(.card--mini):active {
    transform: scale(0.98);
  }

  #team .grid-2 .card {
    padding: 20px 24px;
  }
  #team .grid-2 .card .p {
    text-align: left;
  }
  #team .grid-2 .card:last-of-type .p {
    text-align: right;
  }
}

.focusable {
  outline: none;
}

/* Interviews grid */
.cards.interviews {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 16px;
}

@media (min-width: 900px) {
  .cards.interviews {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 20px;
  }
}

/* Card variant: interview (link-style, sleeker) */
.card--interview,
.cards.interviews .card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 100px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .015));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, .3),
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 0 0 0 rgba(255, 255, 255, 0);
  transition:
    transform var(--duration-fast) var(--ease-out-smooth),
    box-shadow var(--duration-fast) var(--ease-out-smooth),
    border-color var(--duration-fast) var(--ease-out-smooth),
    background var(--duration-fast) var(--ease-out-smooth);
  position: relative;
  overflow: hidden;
}

.card--interview::before,
.cards.interviews .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out-smooth);
}

.card--interview:hover,
.card--interview:focus-visible,
.cards.interviews .card:hover,
.cards.interviews .card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .15);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  box-shadow:
    0 8px 32px rgba(0, 0, 0, .4),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 0 20px rgba(255, 255, 255, .03);
  outline: none;
}

.card--interview:hover::before,
.cards.interviews .card:hover::before {
  opacity: 1;
}

/* Interview and mini card touch feedback */
.card--interview:active,
.cards.interviews .card:active,
.card--mini:active,
.mini-cards .card:active {
  transform: translateY(0) scale(0.98);
}

@media (max-width: 768px) {
  .card--interview:hover,
  .card--interview:focus-visible,
  .cards.interviews .card:hover,
  .cards.interviews .card:focus-visible {
    transform: translateY(-1px);
  }
}

.card--interview .h3,
.cards.interviews .card .h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.card--interview .p,
.cards.interviews .card .p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  opacity: 0.9;
}

.card--interview .interview-place {
  margin-top: auto;
  font-size: 12px;
  opacity: 0.55;
}

.interviews-label {
  margin-top: 20px;
  margin-bottom: 0;
  max-width: 820px;
  margin-inline: auto;
  text-align: left;
  font-size: clamp(22px, 4vw, 42px);
}

/* Interviews heading row: heading left, contact box right */
.interviews-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  max-width: 820px;
  margin-inline: auto;
  margin-top: 24px;
  margin-bottom: 0;
}

.interviews-header .interviews-label {
  margin-top: 0;
  margin-bottom: 0;
  margin-inline: 0;
  max-width: none;
}

/* Compact contact box — width matches one card column above */
.contact-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: color-mix(in oklch, white 2%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  flex-shrink: 0;
  width: calc((820px - 20px) / 2);
}

.contact-box .btn.btn-glow.contact-btn {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  padding: 0.95rem 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: #fff;
  text-decoration: none;
  box-shadow: none;
  transition:
    border-color var(--duration-moderate) var(--ease-out-smooth),
    background var(--duration-moderate) var(--ease-out-smooth),
    transform var(--duration-moderate) var(--ease-out-smooth);
  cursor: pointer;
}

.contact-box .contact-btn:hover,
.contact-box .contact-btn:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  background: var(--accent-subtle);
  outline: none;
}

.contact-box .contact-btn:active {
  transform: translateY(0) scale(0.95);
}

.contact-box .email-line {
  text-align: center;
  font-size: 14px;
  margin: 0;
  padding: 0;
  color: var(--ink-soft);
  white-space: nowrap;
}

.contact-box .email-line a {
  text-decoration: underline;
  color: inherit;
}

.contact-box .email-link {
  font-size: inherit;
  font-weight: 500;
  transition: color 0.2s ease;
}

.contact-box .email-link:hover,
.contact-box .email-link:focus-visible {
  color: var(--muted);
}

@media (max-width: 768px) {
  .interviews-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .contact-box {
    order: -1;
    width: 100%;
    max-width: 100%;
    padding: 14px 18px;
  }

  .contact-box .contact-btn {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    padding: 12px 20px;
    min-height: 48px;
  }
}

/* === Interviews rolling carousel === */
.interviews-carousel-wrap {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: 15px;
  z-index: 2;
  overflow: hidden;
}

.interviews-carousel-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 160px;
  background: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.6) 30%, rgba(0, 0, 0, 0.25) 60%, transparent 100%);
  pointer-events: none;
  z-index: 3;
}

.interviews-carousel-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 160px;
  background: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.6) 30%, rgba(0, 0, 0, 0.25) 60%, transparent 100%);
  pointer-events: none;
  z-index: 3;
}

.interviews-carousel {
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: 12px 0;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.interviews-carousel::-webkit-scrollbar {
  display: none;
}

.interviews-marquee {
  display: flex;
  width: max-content;
  will-change: transform;
}

.interviews-track {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 0 8px;
  flex-shrink: 0;
  width: max-content;
}

.interviews-track .card--interview {
  width: auto;
  min-height: 90px;
  flex-shrink: 0;
  white-space: nowrap;
}

.interviews-track .card--interview .h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.interviews-track .card--interview .p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .interviews-carousel-wrap {
    margin-top: 0;
  }

  .interviews-carousel {
    padding: 6px 0;
    margin-top: 0;
  }

  .interviews-carousel-wrap::before,
  .interviews-carousel-wrap::after {
    width: 60px;
  }

  .interviews-track {
    gap: 12px;
    padding: 0 6px;
  }

  .interviews-track .card--interview {
    width: auto;
    min-height: 80px;
    padding: 16px;
  }

  .interviews-track .card--interview .h3 {
    font-size: 16px;
  }

  .interviews-track .card--interview .p {
    font-size: 12px;
  }
}

/* Carousel scrolls at reduced speed for prefers-reduced-motion (handled in JS) */

/* Resources section */
.resources-category {
  margin-top: 56px;
}

.resources-category:first-of-type {
  margin-top: 40px;
}

.resources-category-title {
  margin-bottom: 28px;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.7;
  font-family: 'Roboto Mono', ui-monospace, monospace;
  font-weight: 500;
}

/* Resources table wrapper */
.resources-table-wrapper {
  overflow-x: auto;
  margin-top: 0;
}

/* Resources table styling - cleaner, more minimal */
.resources-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  position: relative;
}

.resources-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  border-left: 2px solid transparent;
  transition:
    background var(--duration-fast) var(--ease-out-smooth),
    border-color var(--duration-fast) var(--ease-out-smooth),
    transform var(--duration-moderate) var(--ease-out-smooth);
  position: relative;
}

.resources-table tbody tr:last-child {
  border-bottom: none;
}

@media (hover: hover) and (pointer: fine) {
  .resources-table tbody tr:hover,
  .resources-table tbody tr:focus-within {
    background: rgba(255, 255, 255, .015);
    border-bottom-color: rgba(255, 255, 255, .1);
    border-left-color: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
  }
}

.resources-table tbody tr:focus-within {
  background: rgba(255, 255, 255, .015);
  border-bottom-color: rgba(255, 255, 255, .1);
}

.resources-table tbody tr:active {
  background: rgba(255, 255, 255, .02);
}

.resources-table td {
  padding: 22px 0;
  vertical-align: middle;
}

.resources-td-publication {
  font-family: 'Roboto Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.65;
  padding-right: 32px;
  width: 28%;
  min-width: 140px;
  vertical-align: top;
  padding-top: 24px;
  transition: opacity var(--duration-fast) var(--ease-out-smooth);
}

@media (hover: hover) and (pointer: fine) {
  .resources-table tbody tr:hover .resources-td-publication,
  .resources-table tbody tr:focus-within .resources-td-publication {
    opacity: 0.85;
  }
}

.resources-publication {
  display: block;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-transform: uppercase;
  font-size: 11px;
}

.resources-td-title {
  font-size: 17px;
  line-height: 1.65;
  width: 72%;
  padding-top: 24px;
}

.resources-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 400;
  font-family: "Rubik", serif;
  transition:
    color var(--duration-fast) var(--ease-out-smooth),
    opacity var(--duration-fast) var(--ease-out-smooth);
  display: inline;
  position: relative;
  opacity: 1;
  touch-action: manipulation;
}

.resources-link:hover,
.resources-link:focus-visible {
  color: var(--ink-soft);
  opacity: 0.9;
  outline: none;
}

.resources-link::after {
  content: '↗';
  display: inline-block;
  margin-left: 8px;
  opacity: 0.35;
  font-size: 12px;
  font-weight: 300;
  transition:
    opacity var(--duration-fast) var(--ease-out-smooth),
    transform var(--duration-fast) var(--ease-out-smooth);
  transform: translate(0, -1px) rotate(0deg);
  vertical-align: baseline;
}

.resources-link:hover::after,
.resources-link:focus-visible::after {
  opacity: 0.55;
  transform: translate(1px, -2px) rotate(15deg);
}

/* Staggered row reveal when table is in view */
.resources-table.rows-visible tbody tr {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

.resources-table tbody tr {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.4s var(--ease-out-smooth),
    transform 0.4s var(--ease-out-smooth),
    background var(--duration-fast) var(--ease-out-smooth),
    border-color var(--duration-fast) var(--ease-out-smooth);
}

.resources-table.rows-visible tbody tr:nth-child(1) { transition-delay: 0ms; }
.resources-table.rows-visible tbody tr:nth-child(2) { transition-delay: 40ms; }
.resources-table.rows-visible tbody tr:nth-child(3) { transition-delay: 80ms; }
.resources-table.rows-visible tbody tr:nth-child(4) { transition-delay: 120ms; }
.resources-table.rows-visible tbody tr:nth-child(5) { transition-delay: 160ms; }
.resources-table.rows-visible tbody tr:nth-child(6) { transition-delay: 200ms; }
.resources-table.rows-visible tbody tr:nth-child(7) { transition-delay: 240ms; }
.resources-table.rows-visible tbody tr:nth-child(8) { transition-delay: 280ms; }
.resources-table.rows-visible tbody tr:nth-child(9) { transition-delay: 320ms; }
.resources-table.rows-visible tbody tr:nth-child(10) { transition-delay: 360ms; }
.resources-table.rows-visible tbody tr:nth-child(n+11) { transition-delay: 400ms; }

/* Resources section background */
#resources .section-bg {
  opacity: 0.20;
  filter: blur(1.5px);
}

@media (max-width: 768px) {
  .resources-table tbody tr:hover,
  .resources-table tbody tr:focus-within {
    transform: translateX(2px);
  }

  .resources-link:hover::after,
  .resources-link:focus-visible::after {
    transform: translate(1px, -2px) rotate(10deg);
  }
}

@media (max-width: 768px) {
  #resources .section-bg {
    opacity: 0.30;
    filter: blur(2px);
    background-size: auto 100%;
    background-position: center center;
    background-repeat: no-repeat;
  }
  
  .resources-category {
    margin-top: 36px;
  }
  
  .resources-category:first-of-type {
    margin-top: 24px;
  }
  
  .resources-category-title {
    font-size: 14px;
    margin-bottom: 24px;
    letter-spacing: 0.06em;
  }
  
  .resources-table td {
    padding: 18px 0;
    display: block;
  }
  
  .resources-td-publication {
    width: 100%;
    padding-right: 0;
    padding-top: 18px;
    padding-bottom: 8px;
    min-width: auto;
  }
  
  .resources-publication {
    font-size: 10px;
    letter-spacing: 0.03em;
  }
  
  .resources-td-title {
    width: 100%;
    padding-top: 0;
    font-size: 16px;
    line-height: 1.6;
  }
  
  .resources-link {
    font-size: 16px;
  }
  
  .resources-link::after {
    display: none;
  }
}

/* Lists + CTA */
.list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.list.tight li {
  margin: 6px 0;
}

.list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, .16);
}

.actions {
  margin-top: 16px;
}

/* Base button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--white);
  color: #000;
  font-family: 'Roboto Mono', ui-monospace, monospace;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition:
    border-color 150ms var(--ease-out-smooth),
    transform 150ms var(--ease-out-smooth);
  touch-action: manipulation;
}

.btn.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: none;
}

.btn.btn-ghost:hover,
.btn.btn-ghost:focus-visible {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 1px var(--accent-subtle);
  outline: none;
}

.btn.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--ink);
  box-shadow: none;
}

.btn.btn-outline:hover,
.btn.btn-outline:focus-visible {
  border-color: rgba(255, 255, 255, 0.5);
  background: var(--accent-subtle);
  outline: none;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 3px;
}

/* Mobile: larger touch targets for base buttons */
@media (max-width: 768px) {
  .btn:not(.btn-glow):not(.glow):not(.contact-btn) {
    min-height: 44px;
    padding: 14px 20px;
  }
}

/* Footer */
.site-footer {
  padding: 28px 0;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}


/* Shared social icon chip styles */
.social-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  transition:
    border-color var(--duration-fast) var(--ease-out-smooth),
    background var(--duration-fast) var(--ease-out-smooth),
    color var(--duration-fast) var(--ease-out-smooth),
    box-shadow var(--duration-fast) var(--ease-out-smooth),
    transform var(--duration-fast) var(--ease-out-smooth);
}

.social-chip:hover,
.social-chip:focus-visible {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow:
    0 0 12px rgba(255, 255, 255, 0.25),
    0 4px 16px rgba(0, 0, 0, 0.7);
  transform: translateY(-1px);
  outline: none;
}

.social-icon {
  width: 18px;
  height: 18px;
  display: block;
}

#story .h2 {
  max-width: 830px;
  margin-inline: auto;
  transform: translateX(-28px);
}

.story-window {
  background: color-mix(in oklch, white 2%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  max-width: 830px;
  margin-inline: auto;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.story-window .p {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 14px;
  text-align: justify;
}

.story-window .p:last-of-type {
  margin-bottom: 0;
}

/* Hero glass window — matches story-window glass effect */
.hero-window {
  background: color-mix(in oklch, white 2%, transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  width: fit-content;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-top: 24px;
}

.hero-window .hero-lockup {
  margin-bottom: 12px;
}

.hero-window .display {
  margin-top: 2px;
}

.hero-window .lede:last-child {
  margin-bottom: 2px;
}

@media (max-width: 768px) {
  .hero-window {
    padding: 10px;
    border-radius: 10px;
  }
}

@media (max-width: 768px) {
  #story .h2 {
    transform: none;
    text-align: center;
  }

  .story-window {
    padding: 14px;
    margin-inline: 6px;
    border-radius: 14px;
  }

  .story-window .p {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 26px;
    text-align: left;
    text-wrap: pretty;
  }
}

.story-social {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.story-social-label {
  margin: 0;
}

/* About section social icon links */
.about-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.about-social-label {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.about-social-link {
  /* inherits from .social-chip */
}




/* Visually hidden text (for SVG-only social buttons) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero text — static shadow, no breathing */
.hero .display,
.hero .lede {
  text-shadow: 0 2px 0 #000, 0 0 20px rgba(255, 255, 255, 0.08);
}

.hero .display {
  color: rgba(255, 255, 255, 0.4);
  text-shadow: none;
  -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.3);
  font-size: clamp(32px, 5.5vw, 76px);
  margin: 6px 0 8px;
}

.hero .display-accent {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: none;
  -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.5);
}

.hero .lede {
  color: rgba(255, 255, 255, 0.45);
  text-shadow: none;
  font-size: clamp(14px, 1.6vw, 19px);
  margin: 0 0 20px 0;
}

.hero .lede-indent {
  margin-left: 1.6em;
}

/* Accessibility focus — animated ring */
:focus-visible {
  outline: 2px solid color-mix(in oklch, white 50%, transparent);
  outline-offset: 4px;
  transition: outline-offset 150ms var(--ease-spring);
}

@starting-style {
  :focus-visible {
    outline-offset: 8px;
  }
}


/* === Hero lockup: headline + right-aligned square logo === */
.hero-lockup {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  margin: 0;
  text-align: left;
  overflow: visible;
  box-sizing: border-box;
}

.hero-logo {
  width: clamp(96px, 16vw, 160px);
  height: auto;
  opacity: 0;
  transform: translateY(6px);
  animation: fadeUp 600ms ease-out 200ms forwards;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .5));
}

@keyframes fadeUp {
  to {
    opacity: 0.9;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .hero-lockup {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-logo {
    width: clamp(96px, 28vw, 140px);
    opacity: 0.9;
  }
}


/* === Intro Zoom-Through Overlay === */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #000;
  overflow: hidden;
  /* contain removed — blocks transform compositing on mobile */
}

#intro-overlay .intro-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

#zoom-triangle {
  width: clamp(100px, 20vw, 180px);
  height: auto;
  position: relative;
  z-index: 1;
  transform-origin: 50% 56%;
  margin-top: -2vh;
  opacity: 0;
}

#intro-white {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

/* Triangle fade-in from blur */
@keyframes triangleAppear {
  from { opacity: 0; filter: blur(8px); }
  to   { opacity: 1; filter: blur(0); }
}

/* Smooth exponential zoom — cubic-bezier ease-in gives continuous acceleration */
@keyframes zoomThrough {
  from { transform: scale(1); }
  to   { transform: scale(120); }
}

/* White flash synced with zoom — appears at 70% to mask extreme scale */
@keyframes whiteFlash {
  0%, 70% { opacity: 0; }
  88%     { opacity: 0.9; }
  100%    { opacity: 1; }
}

#zoom-triangle.zooming {
  animation:
    triangleAppear 0.4s ease-out forwards,
    zoomThrough 3.4s cubic-bezier(0.55, 0, 1, 0.25) 0.4s forwards;
}

#intro-white.flashing {
  animation: whiteFlash 3.4s linear 0.4s forwards;
}

/* Intro animation is JS-driven (Web Animations API) — no reduced-motion override needed */


/* === Linked interview cards === */
a.card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: block;
}

a.card:hover,
a.card:focus-visible {
  text-decoration: none;
}

/* Interview / link cards: text hover state */
.cards.interviews a.card,
a.card.card--interview {
  text-decoration: none;
  color: inherit;
}

.cards.interviews a.card:hover .h3,
.cards.interviews a.card:focus-visible .h3,
a.card.card--interview:hover .h3,
a.card.card--interview:focus-visible .h3 {
  color: var(--ink);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.12);
}

.cards.interviews a.card:hover .p,
.cards.interviews a.card:focus-visible .p,
a.card.card--interview:hover .p,
a.card.card--interview:focus-visible .p {
  opacity: 1;
  color: var(--ink-soft);
}



/* === Avatar images (Cam & Milo) === */
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(20%);
  transition: filter 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* Team portraits (rectangular, consistent height; tone-normalized) - Optimized */
.card .avatar {
  width: 100%;
  height: auto;
  aspect-ratio: 2/1;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  filter: grayscale(18%) brightness(1.05) contrast(1.15) saturate(0.9);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  /* GPU-accelerated transitions only - removed filter and box-shadow from transition */
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.3, 1);
  margin-bottom: 12px;
  backface-visibility: hidden; /* GPU acceleration */
  transform: translateZ(0); /* Force GPU layer */
}

.card:hover .avatar,
.card:focus-visible .avatar {
  /* Filter changes are instant (no transition) for performance */
  filter: grayscale(0%) brightness(1.06) contrast(1.12) saturate(1.0);
  transform: translate3d(0, -2px, 0) scale(1.02); /* GPU-accelerated 3D transform + subtle zoom */
  will-change: transform; /* Hint browser to optimize */
  /* Box-shadow changes are instant (no transition) for performance */
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}

@media (max-width: 768px) {
  .card:hover .avatar,
  .card:focus-visible .avatar {
    transform: translate3d(0, -1px, 0) scale(1.01);
  }
}

/* Lock scroll briefly on page load (body class toggled by JS) */
body.lock-scroll {
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
}


/* === v18: Cinematic hero background behind text === */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 600ms ease-out;
  pointer-events: none;
  user-select: none;
  /* Blur fade at top and bottom */
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* Visual treatment without touching the GIF frames */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: none;
  /* Darken and add soft vignette - reduced opacity for web to show more of the GIF */
  background:
    radial-gradient(1600px 800px at 70% -10%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.40), rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.70) 100%);
}

/* Hero logo overlays - positioned on headphones */
.hero-logo-triangle,
.hero-logo-wordmark {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.hero-logo-triangle {
  top: 6%;
  left: 4%;
  height: clamp(280px, 35vw, 450px);
  transform: rotate(-45deg);
  opacity: 0.01;
}

.hero-logo-wordmark {
  top: 18%;
  right: 12%;
  height: clamp(80px, 12vw, 140px);
  transform: rotate(30deg);
  opacity: 0.02;
}

@media (max-width: 768px) {
  .hero-logo-triangle {
    top: 5%;
    left: 2%;
    height: clamp(220px, 38vw, 350px);
  }
  
  .hero-logo-wordmark {
    top: 16%;
    right: 8%;
    height: clamp(60px, 15vw, 100px);
  }
}

/* Ensure all hero content sits above section blur overlays */
.hero>*:not(.hero-bg):not(.hero-logo-triangle):not(.hero-logo-wordmark) {
  position: relative;
  z-index: 3;
}

@media (max-width: 700px) {
  /* Visual treatment without touching the GIF frames - mobile variant */
  .hero-bg::after {
    background:
      radial-gradient(1600px 800px at 70% -10%, rgba(255, 255, 255, 0.06), transparent 60%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.72) 40%, rgba(0, 0, 0, 0.85) 100%);
  }
}

/* Fine-tune Milo crop slightly lower within the fixed-height frame */
.avatar-milo {
  object-position: 50% 60%;
}



#team .grid-2 .card:last-of-type .p {
  text-align: right;
}

/* y>50 moves the content down a touch */


/* CTA styles */
.cta-card {
  margin: 40px auto;
  max-width: 820px;
  text-align: center;
  padding: clamp(20px, 4vw, 36px);
  background: radial-gradient(120% 120% at 70% -10%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02) 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.cta-title {
  font-size: clamp(22px, 3.2vw, 28px);
  margin: 0 0 6px 0;
}

.cta-sub {
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 18px 0;
}

.cta-actions {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.cta-actions.dual {
  grid-auto-flow: column;
  gap: 14px;
  justify-content: center;
}

@media (max-width: 720px) {
  .cta-actions.dual {
    grid-auto-flow: row;
  }
}

.btn.lg {
  font-size: clamp(18px, 2.2vw, 20px);
  padding: 14px 22px;
  border-radius: 10px;
}

.btn.lg.alt {
  background: transparent;
  color: var(--fg, #fff);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn.xl {
  font-size: clamp(18px, 2.4vw, 22px);
  padding: 16px 26px;
  border-radius: 12px;
}

.cta-alt {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.cta-alt a {
  color: inherit;
  text-decoration: underline;
}

/* Section background layers (always visible, subtle overlay) */
.section {
  position: relative;
  overflow: hidden;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.48) 100%);
  z-index: 1;
  pointer-events: none;
}

.section .section-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition:
    opacity 1.2s var(--ease-out-smooth),
    transform var(--duration-slow) var(--ease-out-smooth);
  z-index: 0;
  /* Smooth out transitions between sections */
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.section .section-bg.parallax {
  transform: translateY(0);
}



/* Trailer bottom: cinematic blur + fade */
#trailer::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #000);
  z-index: 4;
  pointer-events: none;
}

@media (min-width: 769px) {
  #trailer::after {
    height: 150px;
    background: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.3) 40%,
      rgba(0, 0, 0, 0.75) 75%,
      #000 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mask-image: linear-gradient(to bottom, transparent 0%, black 60%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 60%);
    z-index: 2;
  }
}

/* Hero bottom edge fade */
#hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #000);
  z-index: 2;
  pointer-events: none;
}

/* Shift team section background to the right on mobile */
@media (max-width: 768px) {
  #team .section-bg {
    background-size: contain;
    background-position: center top;
  }
}

/* Shift story section background to the right on mobile */
@media (max-width: 768px) {
  #story .section-bg {
    background-position: right center;
  }
}

/* Mobile: rotate bg 90° for story/team */
@media (max-width: 1024px) {
  #story .section-bg,
  #team .section-bg {
    background-size: cover;
    background-position: center;
    transform: scaleY(-1);
    transition-property: opacity;
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  }
}

.section .container,
.section .cards,
.section .content {
  position: relative;
  z-index: 2;
}

/* === Hero Reveal Animation (smooth, non-jumpy) === */
.hero.scroll-reveal {
  /* Longer fade-in / fade-out for a cinematic feel */
  --hero-fade-in-duration: 1.8s;
  --hero-fade-out-duration: 1.2s;
}

/* Background GIF: starts soft and slowly resolves */
.hero.scroll-reveal .hero-bg-img {
  opacity: 0;
  filter: blur(3px);
  will-change: opacity, filter;
  transition:
    opacity var(--hero-fade-out-duration) cubic-bezier(0.33, 0, 0.2, 1),
    filter var(--hero-fade-in-duration) cubic-bezier(0.33, 0, 0.2, 1);
  /* Blur fade at top and bottom */
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* Reverse image: same styling, absolutely positioned on top */
.hero.scroll-reveal .hero-bg-reverse {
  transition:
    opacity 400ms ease-out;
}

.hero.scroll-reveal.hero-visible .hero-bg-img {
  opacity: 1;
  filter: blur(0);
  transition:
    opacity var(--hero-fade-in-duration) cubic-bezier(0.33, 0, 0.2, 1),
    filter var(--hero-fade-in-duration) cubic-bezier(0.33, 0, 0.2, 1);
}

/* === Hero Text Fade Animation (sync with background) === */
.hero.scroll-reveal .hero-window,
.hero.scroll-reveal .hero-logo-triangle,
.hero.scroll-reveal .hero-logo-wordmark {
  opacity: 0;
  will-change: opacity;
  transition: opacity var(--hero-fade-out-duration) cubic-bezier(0.33, 0, 0.2, 1);
  pointer-events: none;
}

.hero.scroll-reveal.hero-visible .hero-window {
  opacity: 1;
  pointer-events: auto;
  transition: opacity var(--hero-fade-in-duration) cubic-bezier(0.33, 0, 0.2, 1);
  animation: hero-flicker 4.5s 0.6s linear infinite;
}

.hero.scroll-reveal.hero-visible .hero-logo-triangle {
  opacity: 0.01;
  pointer-events: auto;
  transition: opacity var(--hero-fade-in-duration) cubic-bezier(0.33, 0, 0.2, 1);
}

.hero.scroll-reveal.hero-visible .hero-logo-wordmark {
  opacity: 0.02;
  pointer-events: auto;
  transition: opacity var(--hero-fade-in-duration) cubic-bezier(0.33, 0, 0.2, 1);
}

/* Ensure lazy-hero works with our custom JS reveal - only fade in when both loaded and visible */
.hero.scroll-reveal .hero-bg-img.lazy-hero {
  opacity: 0;
  transform: scale(1.02);
  filter: blur(3px);
  /* Fast fade-out transition (base state) */
  transition:
    opacity var(--hero-fade-out-duration) cubic-bezier(0.33, 0, 0.2, 1),
    transform var(--hero-fade-out-duration) cubic-bezier(0.33, 0, 0.2, 1),
    filter var(--hero-fade-out-duration) cubic-bezier(0.33, 0, 0.2, 1);
  /* Blur fade at top and bottom */
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.hero.scroll-reveal.hero-visible .hero-bg-img.lazy-hero.is-loaded {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  /* Slow, subtle fade-in transition (when visible) */
  transition:
    opacity var(--hero-fade-in-duration) cubic-bezier(0.33, 0, 0.2, 1),
    transform var(--hero-fade-in-duration) cubic-bezier(0.33, 0, 0.2, 1),
    filter var(--hero-fade-in-duration) cubic-bezier(0.33, 0, 0.2, 1);
}

/* === Section Scroll Fade (story + team) === */
.section.section-revealed {
  will-change: opacity;
  --section-fade-in: 1.8s;
  --section-fade-out: 1.2s;
}

.section.section-revealed:not(.section-visible) {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--section-fade-out) cubic-bezier(0.33, 0, 0.2, 1);
}

.section.section-revealed.section-visible {
  opacity: 1;
  pointer-events: auto;
  transition: opacity var(--section-fade-in) cubic-bezier(0.33, 0, 0.2, 1);
}

@media (max-width: 768px) {
  .section.section-revealed:not(.section-visible) {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section.section-revealed {
    transition-duration: 0.01s !important;
  }
}

/* Desktop: wider top fade on hero bg for smoother trailer-to-hero transition */
@media (min-width: 769px) {
  .hero.scroll-reveal .hero-bg-img,
  .hero.scroll-reveal .hero-bg-img.lazy-hero {
    mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 85%, transparent 100%);
  }
}

/* Mobile: boost background visibility + reduce section heights */
@media (max-width: 768px) {
  .section .section-bg {
    opacity: 0.45;
    background-position: 50% 40%;
  }

  .section {
    min-height: auto;
    padding: clamp(48px, 10vw, 80px) 0;
  }

  .section:first-of-type {
    padding-top: 48px;
  }
}

/* === Trailer section === */
.trailer-section {
  position: relative;
  width: 100%;
  height: max(100vh, 56.25vw);
  padding: 0 !important;
  overflow-x: hidden;
  overflow-y: visible;
  background: #000;
}

.trailer-section::before {
  display: none;
}

.trailer-section iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 2;
  pointer-events: none;
}

.trailer-touch {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  appearance: none;
}

/* --- Trailer overlay bars --- */
.trailer-bar {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  color: var(--ink);
  opacity: 1;
  transition: opacity 1.2s var(--ease-out-smooth);
}

.trailer-bar.is-hidden {
  opacity: 0;
}

/* Top bar: date + countdown */
.trailer-bar--top {
  top: 0;
  align-items: flex-end;
  padding-top: 18px;
  padding-bottom: 8px;
  background: #000;
  line-height: 1;
}

.trailer-bar__date {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 0.12em;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.trailer-bar__countdown {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Bottom bar: press quotes */
.trailer-bar--bottom {
  bottom: 0;
  align-items: stretch;
  padding-top: 10px;
  padding-bottom: 18px;
  background: #000;
  gap: clamp(20px, 4vw, 48px);
}

.trailer-bar__quote {
  margin: 0;
  padding: 0;
  border: 0;
  flex: 1 1 0;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.trailer-bar__quote:last-child {
  text-align: right;
}

.trailer-bar__quote p {
  margin: 0;
  font-family: 'DM Serif Display', 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(13px, 1.4vw, 17px);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  text-wrap: pretty;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.trailer-bar__quote cite {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(14px, 1.4vw, 18px);
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.trailer-bar__role {
  display: inline;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0.05em;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-left: 0.5em;
}

/* Mobile: trailer stacked layout (bars above/below video, no overlay) */
@media (max-width: 768px) {
  .trailer-section {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .trailer-touch {
    display: none;
  }

  .trailer-section iframe {
    position: static;
    flex: 0 0 auto;
    height: 56.25vw;
    width: 100%;
    pointer-events: auto;
  }

  .trailer-bar {
    position: static;
    flex-shrink: 0;
  }

  .trailer-bar.is-hidden {
    opacity: 1;
  }

  .trailer-bar--top {
    order: -1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .trailer-bar__date {
    font-size: clamp(20px, 5vw, 28px);
  }

  .trailer-bar__countdown {
    font-size: clamp(22px, 5.5vw, 30px);
    letter-spacing: 0.08em;
  }

  .trailer-bar--bottom {
    order: 1;
    position: relative;
    z-index: 5;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 110px;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    padding-top: 28px;
  }

  .trailer-bar__quote {
    flex: 0 0 auto;
    max-width: 100%;
    padding-top: 0;
    text-align: left;
  }

  .trailer-bar__quote:last-child {
    text-align: right;
  }

  .trailer-bar__quote p {
    font-size: clamp(16px, 4vw, 22px);
    line-height: 1.4;
    text-wrap: balance;
  }

  .trailer-bar__quote cite {
    margin-top: 6px;
    font-size: clamp(16px, 4vw, 20px);
  }

  .trailer-bar__role {
    font-size: clamp(12px, 3vw, 15px);
    margin-top: 1px;
  }

}


/* Prevent horizontal scroll on mobile due to nav width */
html,
body {
  overflow-x: hidden;
}

.site-nav,
nav,
.menu {
  max-width: 100vw;
  overflow-x: hidden;
}

@media (max-width: 840px) {

  .menu,
  .nav-list {
    flex-wrap: wrap;
  }

  .menu>li,
  .nav-list>li {
    margin-right: clamp(8px, 2vw, 12px);
  }
}

/* Scroll arrow positioning */
.scroll-arrow,
.scroll-indicator,
.hero .scroll {
  position: absolute !important;
  bottom: 9vh !important;
  transform: translateY(0) !important;
  z-index: 3 !important;
}

@media (max-width: 820px),
(max-aspect-ratio: 10/16) {
  .scroll-arrow,
  .scroll-indicator,
  .hero .scroll {
    bottom: 11vh !important;
  }
}

/* Mailto link styling */
a[href^="mailto:amifilm@outlook.com"] {
  color: #fff !important;
  transition: color 0.2s ease;
}

a[href^="mailto:amifilm@outlook.com"]:hover,
a[href^="mailto:amifilm@outlook.com"]:focus-visible {
  color: var(--muted) !important;
}

/* Mini card trio for producers */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 700px) {
  .grid-3 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Mobile: keep producer mini-cards side by side */
@media (max-width: 699px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Card variant: mini (producer trio) */
.card--mini,
.mini-cards .card {
  padding: 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .015), rgba(255, 255, 255, .008));
  border-radius: 14px;
}

.mini-cards .h3,
.card--mini .h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.mini-cards .p,
.card--mini .p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* === Glow button variant: flat, transparent === */
.btn.btn-glow,
.btn.glow {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  font-size: 5.2rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  padding: 3.6rem 8rem;
  min-height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  box-shadow: none;
  transition:
    border-color var(--duration-moderate) var(--ease-out-smooth),
    background var(--duration-moderate) var(--ease-out-smooth),
    transform var(--duration-moderate) var(--ease-out-smooth);
  transform: translateY(0);
}

@media (max-width: 768px) {
  .btn.btn-glow,
  .btn.glow {
    min-height: 120px;
    padding-top: 3.6rem;
    padding-bottom: 3.6rem;
    padding-left: 4rem;
    padding-right: 4rem;
    width: 100%;
    max-width: 100%;
  }
}

.btn.btn-glow:hover,
.btn.btn-glow:focus-visible,
.btn.glow:hover,
.btn.glow:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  background: var(--accent-subtle);
  outline: none;
}

.btn.btn-glow:active,
.btn.glow:active {
  transform: translateY(0) scale(0.95);
}

@media (max-width: 768px) {
  .btn.btn-glow:hover,
  .btn.glow:hover,
  .btn.btn-glow:focus-visible,
  .btn.glow:focus-visible {
    transform: translateY(-1px);
  }
  .btn.btn-glow:active,
  .btn.glow:active {
    transform: translateY(0) scale(0.95);
  }
}

/* Compact glow CTAs (premiere, RSVP) — same look as hero buttons, smaller footprint */
.btn.btn-glow.btn-glow--compact,
.btn.glow.btn-glow--compact {
  font-size: clamp(1.15rem, 3.2vw, 1.75rem);
  padding: 0.95rem 2.25rem;
  min-height: 0;
  letter-spacing: 0.1em;
  width: auto;
  max-width: none;
  display: inline-flex;
}

.btn.btn-glow.btn-glow--compact.btn-glow--block,
.btn.glow.btn-glow--compact.btn-glow--block {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 768px) {
  .btn.btn-glow.btn-glow--compact,
  .btn.glow.btn-glow--compact {
    min-height: 48px;
    padding: 14px 22px;
    font-size: clamp(1rem, 4vw, 1.35rem);
  }

  .btn.btn-glow.btn-glow--compact.btn-glow--block,
  .btn.glow.btn-glow--compact.btn-glow--block {
    width: 100%;
    max-width: 100%;
  }
}


/* Cover the viewport without letterboxing, keep proper stacking */

/* Lazy-play: hero GIF fades in when loaded */
.lazy-hero {
  opacity: 0;
}

.lazy-hero.is-loaded {
  opacity: 1;
  transition: opacity 600ms ease-out;
}



/* === Scroll Animations === */
.animate-on-scroll {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(16px);
  transition:
    opacity 0.8s var(--ease-out-expo),
    filter 1s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
  will-change: opacity, filter, transform;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

/* Anime.js scroll reveal: initial state before animation runs */
[data-animate].anime-reveal-pending[data-animate="block"] {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(3px);
}

[data-animate="card"].anime-reveal-pending .card {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(3px);
}

[data-animate].anime-reveal-done .card,
[data-animate].anime-reveal-done {
  opacity: 1;
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-animate].anime-reveal-pending[data-animate="block"],
  [data-animate="card"].anime-reveal-pending .card {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* Mobile: skip expensive filter:blur() repaints — keep opacity + transform only */
@media (max-width: 768px) {
  .animate-on-scroll {
    filter: none;
  }
  .animate-on-scroll.is-visible {
    filter: none;
  }
  [data-animate].anime-reveal-pending[data-animate="block"],
  [data-animate="card"].anime-reveal-pending .card {
    filter: none;
  }
  .hero.scroll-reveal .hero-bg-img {
    filter: none;
    will-change: opacity;
  }
  .hero.scroll-reveal.hero-visible .hero-bg-img {
    filter: none;
  }
}

/* Headings: subtle letter-spacing expansion */
h2.animate-on-scroll {
  transform: translateY(12px);
  letter-spacing: -0.06em;
  transition:
    opacity 0.8s var(--ease-out-expo),
    filter 1s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo),
    letter-spacing 1.2s var(--ease-out-smooth);
}

h2.animate-on-scroll.is-visible {
  letter-spacing: -0.035em;
  /* Matches original .h2 style */
}

/* Stagger delays */
.delay-100 {
  transition-delay: 150ms;
}

.delay-200 {
  transition-delay: 300ms;
}

.delay-300 {
  transition-delay: 450ms;
}

.delay-400 {
  transition-delay: 600ms;
}

/* === Line-by-line text reveal === */
.line-reveal {
  overflow: visible; /* Allow lines to overflow for reveal effect */
}

.line-reveal .line {
  display: block;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.78s var(--ease-out-smooth),
    transform 0.78s var(--ease-out-smooth);
  transition-delay: calc(var(--line-index, 0) * 65ms);
  will-change: opacity, transform;
  min-height: 1.4em; /* Prevent layout shift */
}

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

/* Override default animate-on-scroll for line-reveal paragraphs */
.line-reveal.animate-on-scroll {
  opacity: 1; /* Parent stays visible, lines animate individually */
  filter: none;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .line-reveal .line {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 768px) {
  .line-reveal .line {
    transition-delay: calc(var(--line-index, 0) * 45ms);
    min-height: 1.3em;
  }
}

/* === Clock-flip / domino card reveal === */
/* Perspective container for 3D flips */
[data-reveal="flip"].cards {
  perspective: 1200px;
  perspective-origin: center top;
  transform-style: preserve-3d;
}

/* Card initial state: flipped up (hidden) - override anime.js pending state */
[data-reveal="flip"] .card {
  transform-origin: top center;
  opacity: 0 !important;
  transform: rotateX(-88deg) !important;
  filter: none !important;
  transition:
    opacity var(--duration-slow-responsive) var(--ease-out-expo),
    transform var(--duration-slow-responsive) var(--ease-out-expo);
  backface-visibility: hidden;
  will-change: transform, opacity;
}

/* Card revealed state: flipped down (visible) */
[data-reveal="flip"].cards-flip-visible .card {
  opacity: 1 !important;
  transform: rotateX(0deg) !important;
  filter: none !important;
}

/* Staggered delays for domino effect (desktop: 78ms per card) */
[data-reveal="flip"].cards-flip-visible .card:nth-child(1) { transition-delay: 0ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(2) { transition-delay: 78ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(3) { transition-delay: 156ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(4) { transition-delay: 234ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(5) { transition-delay: 312ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(6) { transition-delay: 390ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(7) { transition-delay: 468ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(8) { transition-delay: 546ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(9) { transition-delay: 624ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(10) { transition-delay: 702ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(11) { transition-delay: 780ms; }
[data-reveal="flip"].cards-flip-visible .card:nth-child(n+12) { transition-delay: 858ms; }

/* Reduced motion: instant reveal */
@media (prefers-reduced-motion: reduce) {
  [data-reveal="flip"] .card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Mobile: 50ms stagger, lower perspective */
@media (max-width: 768px) {
  [data-reveal="flip"].cards {
    perspective: 800px;
  }

  [data-reveal="flip"].cards-flip-visible .card:nth-child(1) { transition-delay: 0ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(2) { transition-delay: 50ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(3) { transition-delay: 100ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(4) { transition-delay: 150ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(5) { transition-delay: 200ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(6) { transition-delay: 250ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(7) { transition-delay: 300ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(8) { transition-delay: 350ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(9) { transition-delay: 400ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(10) { transition-delay: 450ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(11) { transition-delay: 500ms; }
  [data-reveal="flip"].cards-flip-visible .card:nth-child(n+12) { transition-delay: 550ms; }
}

/* Ensure hover states work with flip (additive transforms) */
@media (hover: hover) and (pointer: fine) {
  [data-reveal="flip"].cards-flip-visible .card:hover,
  [data-reveal="flip"].cards-flip-visible .card:focus-visible {
    transform: rotateX(0deg) translateY(-4px);
  }

  [data-reveal="flip"].cards-flip-visible .grid-2 .card:hover,
  [data-reveal="flip"].cards-flip-visible .grid-2 .card:focus-visible {
    transform: rotateX(0deg) translateY(-3px);
  }

  [data-reveal="flip"].cards-flip-visible .card--interview:hover,
  [data-reveal="flip"].cards-flip-visible .card--interview:focus-visible {
    transform: rotateX(0deg) translateY(-2px);
  }
}

/* Scroll progress indicator — pure CSS */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: color-mix(in oklch, white 40%, transparent);
  z-index: 10000;
  transform-origin: left;
  transform: scaleX(0);
}

@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: scrollProgress linear;
    animation-timeline: scroll();
  }

  @keyframes scrollProgress {
    to { transform: scaleX(1); }
  }
}


/* === Scroll-driven reveal (progressive enhancement) === */
@supports (animation-timeline: view()) {
  .animate-on-scroll {
    animation: scrollReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

  @keyframes scrollReveal {
    from {
      opacity: 0;
      filter: blur(4px);
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      filter: blur(0);
      transform: translateY(0);
    }
  }
}


/* Smooth reveal for sections */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.25, 1, 0.3, 1);
}

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

/* ─── Hover flicker ─── */
.btn:hover,
.btn:focus-visible,
.social-chip:hover,
.social-chip:focus-visible,
.inline-link:hover,
.inline-link:focus-visible,
.contact-box .email-link:hover,
.contact-box .email-link:focus-visible,
a[href^="mailto:amifilm@outlook.com"]:hover,
a[href^="mailto:amifilm@outlook.com"]:focus-visible,
.card--interview:hover,
.card--interview:focus-visible,
.cards.interviews .card:hover,
.cards.interviews .card:focus-visible,
.scroll-cue:hover,
a.card:hover,
a.card:focus-visible {
  animation: flicker-blink 300ms 60ms linear forwards;
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:focus-visible,
  .social-chip:hover, .social-chip:focus-visible,
  .inline-link:hover, .inline-link:focus-visible,
  .contact-box .email-link:hover, .contact-box .email-link:focus-visible,
  a[href^="mailto:amifilm@outlook.com"]:hover, a[href^="mailto:amifilm@outlook.com"]:focus-visible,
  .card--interview:hover, .card--interview:focus-visible,
  .cards.interviews .card:hover, .cards.interviews .card:focus-visible,
  .scroll-cue:hover,
  a.card:hover, a.card:focus-visible {
    animation: none;
  }
}

/* Interactive text selection highlight */
::selection {
  background: rgba(255, 255, 255, 0.2);
  color: var(--ink);
}


/* Enhanced avatar interactions - Optimized (only applies if not overridden by .card .avatar) */
.avatar:not(.card .avatar) {
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.3, 1);
  backface-visibility: hidden;
  transform: translateZ(0);
}

.card:hover .avatar:not(.card .avatar) {
  transform: translate3d(0, -3px, 0) scale(1.02);
  will-change: transform;
}

/* Parallax container */
.parallax-container {
  will-change: transform;
}

/* Smooth scroll snap (optional, can be disabled) */
@media (min-width: 1024px) {
  html {
    scroll-snap-type: y proximity;
  }
  
  .section {
    scroll-snap-align: start;
  }
}