/* ============================================================
   RIVER CITY, 2025 — styles
   Atmosphere: deep black, red bleed, soft teal cool.
   Type: Sora (title), Special Elite (tagline, typewriter).
   ============================================================ */

:root {
  --bg: #040405;
  --ink: #f3eee9;
  --ink-dim: rgba(243, 238, 233, 0.78);
  --ink-faint: rgba(243, 238, 233, 0.40);
  --red: #b8242a;
  --red-bright: #d62a31;
  --red-glow: rgba(184, 36, 42, 0.55);
  --red-deep: rgba(120, 18, 22, 0.85);
  --teal: #6f9a9d;
  --teal-soft: rgba(111, 154, 157, 0.35);

  --font-title: "DIN Alternate", "din", "Helvetica Neue", Arial, sans-serif;
  --font-display: "brandon-grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "din", "Helvetica Neue", Arial, sans-serif;

  --max: 64rem;
  --pad-x: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html { scroll-behavior: smooth; }
body { min-height: 100svh; overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

/* ---------- SECTION (shared across all 3 viewport-height blocks) ---------- */

.section {
  position: relative;
  min-height: 100svh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(3rem, 8vh, 6rem) var(--pad-x);
}

/* ---------- HERO (Section 1 specific) ---------- */

.hero {
  /* inherits from .section above */
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -4;
  background: #000;
  filter: contrast(1.02) saturate(0.98);
}

/* Fallback when the loop can't autoplay (iOS Low Power Mode, data saver, etc.)
   Show the hero image as a static background so we don't display the native
   play-button overlay over the page. */
.hero--static::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  background: #000 url("assets/hero.jpg") center/cover no-repeat;
  filter: contrast(1.02) saturate(0.98);
}

/* Soft scrim — just enough top/bottom darkening for type legibility */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.30) 0%,
      rgba(0, 0, 0, 0.08) 20%,
      rgba(0, 0, 0, 0.00) 45%,
      rgba(0, 0, 0, 0.18) 75%,
      rgba(0, 0, 0, 0.50) 100%
    );
}

/* Light corner vignette — keeps focus centered without crushing the image */
.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at center,
      transparent 55%,
      rgba(0, 0, 0, 0.25) 92%,
      rgba(0, 0, 0, 0.50) 100%
    );
}

/* Animated film grain */
.hero__grain {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  animation: grain 1.6s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  16%  { transform: translate(-3%, 2%); }
  33%  { transform: translate(2%, -2%); }
  50%  { transform: translate(-2%, -3%); }
  66%  { transform: translate(3%, 1%); }
  83%  { transform: translate(-1%, 2%); }
  100% { transform: translate(0, 0); }
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 3.5vh, 2.5rem);
}

/* ---------- TITLE ---------- */

.title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2rem, 6.5vw, 5.5rem);
  letter-spacing: 0.02em;
  line-height: 0.98;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  /* Subtle chromatic split — reads "title card", not glitch */
  text-shadow:
    1.2px 0 0 rgba(184, 36, 42, 0.55),
   -1.2px 0 0 rgba(111, 154, 157, 0.18),
    0 2px 30px rgba(0, 0, 0, 0.6);
  animation: title-flicker 9s ease-in-out infinite;
}

/* Almost imperceptible flicker — A24 style restraint */
@keyframes title-flicker {
  0%, 100%      { opacity: 1; }
  47%           { opacity: 1; }
  48%           { opacity: 0.86; }
  49%           { opacity: 1; }
  62%           { opacity: 1; }
  63%           { opacity: 0.93; }
  64%           { opacity: 1; }
}

/* ---------- TAGLINE ---------- */

.tagline {
  margin: 0;
  max-width: 38ch;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--ink-dim);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}

/* ---------- PRIMARY CTA: PLAY-BUTTON HERO ---------- */

/* The whole title + tagline + button block is one giant click target.
   Fitts's Law: bigger click area = higher conversion. */
.play-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vh, 2rem);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: clamp(0.5rem, 2vh, 1.25rem) 0;
  /* Subtle interactive feedback for the entire hover region */
  transition: transform 280ms ease;
}

.play-area:hover { transform: translateY(-2px); }

.play-area:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 12px;
}

/* The play button itself: red, with a slow attention-grabbing pulse. */
.play-button {
  width: clamp(84px, 14vw, 128px);
  height: clamp(84px, 14vw, 128px);
  border-radius: 50%;
  border: 2px solid var(--red);
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 260ms ease,
    border-color 260ms ease,
    transform 260ms ease,
    box-shadow 260ms ease;
  animation: play-pulse 2.6s ease-in-out infinite;
  position: relative;
  margin-top: clamp(0.25rem, 1.5vh, 0.75rem);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.play-button svg {
  width: 42%;
  height: 42%;
  color: var(--ink);
  /* Optical centering: the play triangle is right-heavy, nudge it left */
  transform: translateX(6%);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* Slow breath + soft red ring outward. Restrained, not flashing. */
@keyframes play-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(184, 36, 42, 0.55);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 22px rgba(184, 36, 42, 0);
  }
}

/* Hover state: brighter red, slight zoom, glow */
.play-area:hover .play-button,
.play-area:focus-visible .play-button {
  background: var(--red-bright);
  border-color: var(--red-bright);
  transform: scale(1.08);
  animation: none;
  box-shadow:
    0 14px 56px var(--red-glow),
    0 0 0 0 transparent;
}

/* Microcopy under the play button — sets expectation + invites action */
.play-caption {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
  transition: color 220ms ease;
}

.play-area:hover .play-caption,
.play-area:focus-visible .play-caption { color: var(--ink); }

/* Disabled state for any unwired link (config URL still placeholder) */
[data-link][aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  animation: none;
}

/* ---------- SCROLL CUE (bottom of section, breathes downward) ---------- */

.scroll-cue {
  position: absolute;
  bottom: clamp(1.25rem, 3vh, 2.25rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: 0.40em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  z-index: 4;
  transition: color 220ms ease;
}

.scroll-cue:hover { color: var(--ink); }

.scroll-cue__line {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, rgba(243, 238, 233, 0.55) 0%, rgba(243, 238, 233, 0) 100%);
  animation: scroll-line 2.4s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scroll-line {
  0%, 100% { transform: scaleY(0.6); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* ---------- SECTIONS 2 & 3 SHARED ---------- */

.section--follow,
.section--score {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(184, 36, 42, 0.08) 0%, rgba(0, 0, 0, 0) 55%),
    linear-gradient(180deg, #060608 0%, #040405 100%);
}

.section--score {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(184, 36, 42, 0.10) 0%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, #07060a 0%, #0a0507 100%);
}

/* Lightweight grain layer for the non-hero sections */
.section__grain {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.10;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  animation: grain 1.6s steps(6) infinite;
}

.section__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 2.5vh, 1.5rem);
}

.section__eyebrow {
  margin: 0 0 clamp(0.75rem, 2vh, 1.5rem);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.40em;
  text-transform: uppercase;
  color: var(--red-bright);
}

.section__title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2.2rem, 6.5vw, 5rem);
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow:
    1px 0 0 rgba(184, 36, 42, 0.45),
   -1px 0 0 rgba(111, 154, 157, 0.15);
}

.section__lede {
  margin: 0 0 clamp(1.5rem, 4vh, 2.5rem);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 38ch;
}

/* ---------- BIG CTA (Section 2 and 3) ---------- */

.big-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  transition: transform 280ms ease;
}

.big-cta:hover { transform: translateY(-2px); }

.big-cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 12px;
}

.big-cta__handle {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--ink);
  transition: color 240ms ease;
}

.big-cta:hover .big-cta__handle { color: var(--red-bright); }

.big-cta__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(243, 238, 233, 0.25);
  transition: color 220ms ease, border-color 220ms ease;
}

.big-cta:hover .big-cta__label,
.big-cta:focus-visible .big-cta__label {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.big-cta__label--solo {
  font-size: 0.78rem;
  padding-bottom: 0.5rem;
}

/* ---------- ALBUM ART (Section 3) ---------- */

.album-art {
  width: clamp(220px, 32vw, 340px);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(243, 238, 233, 0.06);
  margin: 0 0 clamp(1.5rem, 4vh, 2.5rem);
}

/* ---------- CREDITS ---------- */

.credits {
  margin-top: clamp(1rem, 3vh, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.credits__line {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.credits__name { color: var(--ink-dim); }
.credits__line--sub { color: var(--ink-faint); }

/* ---------- MOBILE ---------- */

@media (max-width: 720px) {
  .hero { padding: clamp(2.5rem, 7vh, 4rem) var(--pad-x); }

  .hero__content { gap: clamp(1.25rem, 3vh, 1.75rem); }

  .title {
    letter-spacing: 0.01em;
    text-shadow:
      0.6px 0 0 rgba(184, 36, 42, 0.45),
     -0.6px 0 0 rgba(111, 154, 157, 0.16),
      0 2px 20px rgba(0, 0, 0, 0.6);
  }

  .tagline { max-width: 28ch; }

  /* On phones, give the play button presence without overpowering the frame */
  .play-button { width: 96px; height: 96px; }
  .play-caption { font-size: 0.72rem; letter-spacing: 0.30em; }

  /* Sections 2 & 3 mobile tuning */
  .section__title { font-size: clamp(2rem, 11vw, 3.2rem); }
  .section__lede { max-width: 30ch; font-size: 0.95rem; }
  .big-cta__handle { font-size: clamp(1.6rem, 9vw, 2.6rem); }
  .big-cta__label { font-size: 0.66rem; letter-spacing: 0.28em; }
  .album-art { width: 220px; }
  .scroll-cue { font-size: 0.54rem; letter-spacing: 0.36em; }
  .scroll-cue__line { height: 30px; }
}

/* Very narrow phones — let the title wrap if needed */
@media (max-width: 380px) {
  .title { white-space: normal; line-height: 1.05; }
}

/* Short landscape — reduce vertical breathing so content fits */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { padding: 1.5rem var(--pad-x); }
  .hero__content { gap: 0.9rem; }
  .credits { margin-top: 0.5rem; }
}

/* Lighter grain on low-end devices to keep it smooth */
@media (max-width: 480px) {
  .hero__grain { opacity: 0.12; }
}

/* Respect reduced motion: pause grain, flicker, pulse, video */
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
  .hero__grain { animation: none; }
  .title { animation: none; }
  .play-button { animation: none; }
  .hero {
    background:
      linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.85)),
      url("assets/hero.jpg") center/cover no-repeat;
  }
}
