/* ==========================================================================
   YVES & VALÉRIE — HERO
   Owner: UI-1. The full-viewport splash. Fixed markup (index.html):
     #hero > .hero__media + .hero__scrim + .hero__grain + .hero__inner + .hero__scroll-cue
   Inside .hero__inner: .hero__eyebrow, h1.hero__title (.hero__name × 2 with
   .hero__amp between), .hero__date, .hero__meta, .hero__actions.

   Hero copy sits on a photograph, not on the page surface, so it uses the
   theme-INVARIANT "cinema" tokens from tokens.css (--color-scrim-*,
   --color-ink*) rather than --color-text-primary / --color-accent — see the
   note in tokens.css §10. Everything else here consumes the shared scale.

   Contents
     1. Hero shell & layers (media / scrim / grain)
     2. Content (eyebrow, title, name, amp, date, meta, actions)
     3. Scroll cue
     4. Motion — Ken Burns, entrance choreography, scroll-line flow
     5. Responsive — 48rem / 64rem / 90rem
     6. Short landscape phones
     7. prefers-contrast
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. HERO SHELL & LAYERS
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block-start: max(var(--space-fluid-xl), var(--header-h));
  padding-block-end: var(--space-fluid-lg);
  background-color: var(--color-ink);
  text-align: center;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: var(--z-media);
  background-color: var(--color-ink);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1) translate3d(0, 0, 0);
  transform-origin: center;
  will-change: transform;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: var(--z-scrim);
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 35%, rgb(var(--color-ink-rgb) / 0) 0%, rgb(var(--color-ink-rgb) / 0.4) 100%),
    linear-gradient(
      to bottom,
      rgb(var(--color-ink-rgb) / 0.55) 0%,
      rgb(var(--color-ink-rgb) / 0.12) 24%,
      rgb(var(--color-ink-rgb) / 0.08) 46%,
      rgb(var(--color-ink-rgb) / 0.5) 70%,
      rgb(var(--color-ink-rgb) / 0.8) 90%,
      var(--color-surface) 100%
    );
}

/* Fine film grain — inline SVG feTurbulence from tokens.css, no external
   file. Constant across themes: it textures the photograph, not the page. */
.hero__grain {
  position: absolute;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: var(--texture-grain);
  background-size: 180px 180px;
  background-repeat: repeat;
}


/* --------------------------------------------------------------------------
   2. CONTENT
   -------------------------------------------------------------------------- */
.hero__inner {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  padding-inline: var(--space-fluid-sm);
  color: var(--color-scrim-text);
}

.hero__eyebrow {
  margin-bottom: var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-scrim-text-muted);
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.hero__name {
  font-family: var(--font-serif);
  font-weight: var(--weight-medium);
  font-size: var(--text-6xl);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tight);
  color: var(--color-scrim-text);
}

/* The ampersand: oversized, script face, a distinct flourish colour */
.hero__amp {
  display: inline-block;
  padding-inline: 0.05em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: calc(var(--text-6xl) * 1.15);
  line-height: 1;
  color: var(--color-scrim-accent);
}

.hero__date {
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-5);
  border-top: 1px solid var(--color-scrim-border);
  border-bottom: 1px solid var(--color-scrim-border);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-widest);
  font-variant-numeric: tabular-nums;
  color: var(--color-scrim-text);
}

.hero__meta {
  margin-top: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  color: var(--color-scrim-text-muted);
}

.hero__meta span {
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--color-scrim-text);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* .btn--ghost's default colours come from --color-text-primary /
   --color-border-strong (base.css), which flip with the site theme. Inside
   the hero those sit on a photograph, not the page surface, so pin them to
   the constant on-photo tokens instead. */
.hero__actions .btn--ghost {
  color: var(--color-scrim-text);
  border-color: var(--color-scrim-border);
}
.hero__actions .btn--ghost:hover {
  border-color: var(--color-scrim-accent);
  color: var(--color-scrim-accent);
  background-color: rgb(var(--color-scrim-text-rgb) / 0.08);
}
.hero__actions .btn--ghost:active {
  background-color: rgb(var(--color-scrim-text-rgb) / 0.14);
}

/* base.css's focus ring uses --color-surface as its gap colour, which can
   be paper-light in the light theme — invisible against a dark photo.
   Pin the hero's ring to the constant ink/scrim pair instead. */
.hero :focus-visible {
  box-shadow: 0 0 0 3px var(--color-ink), 0 0 0 6px var(--color-scrim-text);
}


/* --------------------------------------------------------------------------
   3. SCROLL CUE
   -------------------------------------------------------------------------- */
.hero__scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--space-6);
  z-index: var(--z-scrollcue);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  transform: translateX(-50%);
  transition: transform var(--dur-base) var(--ease-spring-soft);
}
.hero__scroll-cue:hover {
  transform: translateX(-50%) translateY(0.2rem);
}

.hero__scroll-line {
  position: relative;
  width: 1px;
  height: 2.75rem;
  overflow: hidden;
  background-color: var(--color-scrim-border);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.hero__scroll-cue:hover .hero__scroll-line {
  background-color: rgb(var(--color-scrim-text-rgb) / 0.6);
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 40%;
  background-color: var(--color-scrim-text);
}


/* --------------------------------------------------------------------------
   4. MOTION
   Every animation here is additive, gated behind
   prefers-reduced-motion: no-preference. Default (or reduced-motion) state
   is always the final, fully visible, non-transformed frame — nothing in
   this file depends on JS or the media query firing to look correct.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {

  /* Slow breathing drift on the splash photo */
  .hero__media {
    animation: hero-kenburns var(--dur-kenburns) var(--ease-in-out) infinite alternate;
  }

  /* Entrance choreography — staggered rise, ~1s total */
  .hero__eyebrow,
  .hero__name,
  .hero__amp,
  .hero__date,
  .hero__meta,
  .hero__actions {
    animation-duration: var(--dur-slow);
    animation-timing-function: var(--ease-out-expo);
    animation-fill-mode: both;
  }
  .hero__eyebrow {
    animation-name: hero-rise;
    animation-delay: 0ms;
  }
  .hero__name:first-child {
    animation-name: hero-rise;
    animation-delay: 120ms;
  }
  .hero__amp {
    animation-name: hero-rise-amp;
    animation-delay: 240ms;
    animation-timing-function: var(--ease-spring);
  }
  .hero__name:last-child {
    animation-name: hero-rise;
    animation-delay: 200ms;
  }
  .hero__date {
    animation-name: hero-rise;
    animation-delay: 340ms;
  }
  .hero__meta {
    animation-name: hero-rise;
    animation-delay: 420ms;
  }
  .hero__actions {
    animation-name: hero-rise;
    animation-delay: 500ms;
  }

  /* The descending line/dot — the one persistent bit of motion */
  .hero__scroll-line::after {
    animation: hero-scrollline var(--dur-ambient) var(--ease-in-out) infinite;
  }
}

@keyframes hero-kenburns {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.5%, -1.5%, 0);
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-rise-amp {
  from {
    opacity: 0;
    transform: translateY(1.1rem) rotate(-8deg) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@keyframes hero-scrollline {
  0% {
    top: -40%;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}


/* --------------------------------------------------------------------------
   5. RESPONSIVE
   Names stack on mobile/tablet; from desktop (64rem) up they sit on one
   baseline with the ampersand between them, per brief.
   -------------------------------------------------------------------------- */
@media (min-width: 48rem) {
  .hero__inner {
    max-width: 44rem;
  }
}

@media (min-width: 64rem) {
  .hero__inner {
    max-width: 72rem;
  }
  .hero__title {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-7);
  }
  .hero__amp {
    transform: translateY(-0.06em);
  }
  .hero__actions {
    margin-top: var(--space-9);
  }
}

@media (min-width: 90rem) {
  .hero__inner {
    max-width: 84rem;
  }
}


/* --------------------------------------------------------------------------
   6. SHORT LANDSCAPE PHONES
   -------------------------------------------------------------------------- */
@media (max-height: 32rem) and (orientation: landscape) {
  .hero {
    padding-block: var(--space-5);
  }
  .hero__eyebrow {
    margin-bottom: var(--space-2);
  }
  .hero__name {
    font-size: var(--text-4xl);
  }
  .hero__amp {
    font-size: calc(var(--text-4xl) * 1.15);
  }
  .hero__date {
    margin-top: var(--space-3);
  }
  .hero__meta {
    margin-top: var(--space-2);
  }
  .hero__actions {
    margin-top: var(--space-5);
  }
  .hero__scroll-cue {
    bottom: var(--space-3);
  }
  .hero__scroll-line {
    height: 1.75rem;
  }
}


/* --------------------------------------------------------------------------
   7. PREFERS-CONTRAST
   -------------------------------------------------------------------------- */
@media (prefers-contrast: more) {
  .hero__scrim {
    background:
      radial-gradient(120% 90% at 50% 35%, rgb(var(--color-ink-rgb) / 0.1) 0%, rgb(var(--color-ink-rgb) / 0.55) 100%),
      linear-gradient(
        to bottom,
        rgb(var(--color-ink-rgb) / 0.7) 0%,
        rgb(var(--color-ink-rgb) / 0.28) 24%,
        rgb(var(--color-ink-rgb) / 0.22) 46%,
        rgb(var(--color-ink-rgb) / 0.65) 70%,
        rgb(var(--color-ink-rgb) / 0.9) 90%,
        var(--color-surface) 100%
      );
  }
  .hero__name,
  .hero__date,
  .hero__eyebrow {
    text-shadow: 0 1px 12px rgb(var(--color-ink-rgb) / 0.6);
  }
}
