/* =========================================================================
   Underdog Mixtape — one-page site
   Mobile-first · one variable font · no inline styles (CSP-safe)
   1. Tokens   2. Base   3. Language   4. Hero & logo
   6. Highlights & slider   7. Footer   9. Motion
   ========================================================================= */

/* 1. TOKENS ---------------------------------------------------------------- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
/* Arial resized to Manrope's metrics: no layout jump when the font arrives */
@font-face {
  font-family: "Manrope Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 103%;
  ascent-override: 103%;
  descent-override: 29%;
  line-gap-override: 0%;
}

:root {
  --bg: #0A0908;
  --bg-2: #151310;
  --text: #F5F1E8;
  --text-2: #BDB5A6;          /* 9.8:1 on bg */
  --gold: #B8975F;            /* 7.2:1 on bg */
  --gold-2: #D9BC85;
  --line: rgba(245, 241, 232, 0.14);

  --font: "Manrope", "Manrope Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.5, 1);
}

/* 2. BASE ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--text); color: var(--bg); font-weight: 700; text-decoration: none;
  transform: translateY(-160%); transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

.eyebrow {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
}

/* 3. LANGUAGE -------------------------------------------------------------- */
/* All text exists in both languages; <html lang> decides which is shown. */
html[lang="fr"] [data-lang="en"],
html[lang="en"] [data-lang="fr"] { display: none !important; }

.lang {
  position: fixed; top: 16px; right: 16px; z-index: 40;
  display: flex; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(10, 9, 8, 0.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lang__btn {
  min-width: 44px; min-height: 36px; padding: 0 10px;
  border: 0; border-radius: 999px; background: transparent;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--text-2); cursor: pointer; transition: background-color 0.25s, color 0.25s;
}
.lang__btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.lang__btn:not([aria-pressed="true"]):hover { color: var(--text); }

/* 4. HERO & LOGO ----------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 5rem var(--gutter) 6rem;
  overflow: hidden;
  text-align: center;
}
.hero__media { position: absolute; inset: 0; z-index: -1; background: var(--bg); }
.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(0.85);
}
/* Darken for legibility + fade into the page below */
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(10, 9, 8, 0.6), rgba(10, 9, 8, 0.85)),
    linear-gradient(to bottom, rgba(10, 9, 8, 0.2) 60%, var(--bg) 100%);
}

.hero__content {
  display: grid;
  justify-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  transform: translate3d(0, calc(var(--scroll, 0) * -60px), 0);
  opacity: calc(1 - var(--scroll, 0) * 1.2);
}

.logo-wrap {
  display: block;
  width: clamp(210px, 52vw, 400px);
  perspective: 900px;
}
.logo {
  width: 100%; height: auto; overflow: visible;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease);
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.55));
}
.logo path { transform-box: fill-box; transform-origin: center; }
.logo__shine { mix-blend-mode: screen; }
.logo__shine rect { transform-box: fill-box; transform: translateX(-160%); }

.hero__tagline {
  font-size: clamp(0.8125rem, 0.7rem + 0.6vw, 1.0625rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-2);
  padding-left: 0.22em;          /* balance the trailing letter-spacing */
  text-wrap: balance;
}
@media (min-width: 700px) { .hero__tagline { letter-spacing: 0.32em; padding-left: 0.32em; } }

.social { display: flex; gap: 0.75rem; justify-content: center; }
.social__link {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(10, 9, 8, 0.35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, transform 0.3s var(--spring);
}
.social__link svg { width: 21px; height: 21px; }
.social__link:hover { background: var(--gold); border-color: var(--gold); color: var(--bg); transform: translateY(-3px); }

.hero__cue {
  position: absolute; bottom: 1.5rem; left: 0; right: 0;
  width: max-content; margin-inline: auto;    /* centred without transform (the fade-in uses transform) */
  display: grid; justify-items: center; gap: 0.6rem;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-2); text-decoration: none;
}
.hero__cue-line { position: relative; width: 1px; height: 40px; overflow: hidden; background: var(--line); }
.hero__cue-line::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: translateY(-100%); }

/* 6. HIGHLIGHTS & SLIDER --------------------------------------------------- */
.highlights { padding-block: clamp(4.5rem, 10vw, 8rem); }

.intro {
  display: grid; gap: 1rem;
  max-width: 46rem;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}
.intro__text { color: var(--text-2); text-wrap: pretty; }

.slider { position: relative; max-width: 1200px; margin-inline: auto; }
.slider__track {
  position: relative;
  aspect-ratio: 4 / 3;          /* a bit taller on phones */
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-2);
  touch-action: pan-y;          /* vertical scroll stays native, horizontal = swipe */
}
@media (min-width: 700px) { .slider__track { aspect-ratio: 3 / 2; } }
.slide {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.9s var(--ease), visibility 0s; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.slider__ui {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; margin-top: 1.25rem;
}
.slider__btn {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.slider__btn svg { width: 18px; height: 18px; }
.slider__btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.slider__btn--play { margin-left: 0.5rem; }
.slider__btn--play .i-play { display: none; }
.slider.is-paused .slider__btn--play .i-play { display: block; }
.slider.is-paused .slider__btn--play .i-pause { display: none; }

.slider__dots { display: flex; gap: 0.4rem; padding-inline: 0.5rem; }
.slider__dot {
  position: relative;
  width: 36px; height: 44px;          /* big hit area, thin visible bar */
  border: 0; background: transparent; cursor: pointer;
}
.slider__dot::before, .slider__dot::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 3px; margin-top: -1.5px; border-radius: 3px;
}
.slider__dot::before { background: var(--line); }
.slider__dot::after { background: var(--gold); transform: scaleX(0); transform-origin: left; }
.slider__dot[aria-current="true"]::after { transform: scaleX(1); }

/* 7. FOOTER ---------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 2rem 2.5rem; font-size: 0.875rem; color: var(--text-2); }
.footer__inner { display: grid; gap: 1.25rem; justify-items: center; text-align: center; }
.social--small .social__link { width: 40px; height: 40px; }
.social--small .social__link svg { width: 18px; height: 18px; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.5rem; }
.footer__links a {
  display: inline-flex; align-items: center; min-height: 36px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.footer__links a:hover { color: var(--text); }

@media (min-width: 900px) {
  .footer__inner { grid-template-columns: auto 1fr auto; justify-items: start; text-align: left; }
  .footer__legal { justify-self: center; }
}

/* 9. MOTION ---------------------------------------------------------------- */
@keyframes drop   { from { opacity: 0; transform: translateY(-60px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes pop    { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes rise   { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }
@keyframes fade-up{ from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes shine  { from { transform: translateX(-160%); } to { transform: translateX(300%); } }
@keyframes cue    { 0% { transform: translateY(-100%); } 55% { transform: none; } 100% { transform: translateY(100%); } }
@keyframes bar    { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: no-preference) {
  /* Logo assembles: crown drops, plate pops, letters rise, MIXTAPE fades in */
  .logo__crown path { animation: drop 0.9s var(--spring) both; }
  .logo__crown path:nth-child(1) { animation-delay: 0.15s; }
  .logo__crown path:nth-child(2) { animation-delay: 0.4s; }
  .logo__plate path { animation: pop 0.8s var(--spring) both; }
  .logo__plate path:nth-child(1) { animation-delay: 0.45s; }
  .logo__plate path:nth-child(2) { animation-delay: 0.55s; }
  .logo__l { animation: rise 0.7s var(--ease) both; }
  .logo__l:nth-child(1) { animation-delay: 0.75s; }
  .logo__l:nth-child(2) { animation-delay: 0.80s; }
  .logo__l:nth-child(3) { animation-delay: 0.85s; }
  .logo__l:nth-child(4) { animation-delay: 0.90s; }
  .logo__l:nth-child(5) { animation-delay: 0.95s; }
  .logo__l:nth-child(6) { animation-delay: 1.00s; }
  .logo__l:nth-child(7) { animation-delay: 1.05s; }
  .logo__l:nth-child(8) { animation-delay: 1.10s; }
  .logo__m { animation: fade-up 0.8s var(--ease) both; }
  .logo__m:nth-child(1) { animation-delay: 1.20s; }
  .logo__m:nth-child(2) { animation-delay: 1.25s; }
  .logo__m:nth-child(3) { animation-delay: 1.30s; }
  .logo__m:nth-child(4) { animation-delay: 1.35s; }
  .logo__m:nth-child(5) { animation-delay: 1.40s; }
  .logo__m:nth-child(6) { animation-delay: 1.45s; }
  .logo__m:nth-child(7) { animation-delay: 1.50s; }
  /* Gold shine across the UD plate (replayed every few seconds by main.js) */
  .logo__shine rect { animation: shine 1.4s 1.6s var(--ease) both; }

  .hero__tagline { animation: fade-up 0.9s 1.7s var(--ease) both; }
  .hero .social li { animation: fade-up 0.7s var(--ease) both; }
  .hero .social li:nth-child(1) { animation-delay: 1.9s; }
  .hero .social li:nth-child(2) { animation-delay: 2.0s; }
  .hero .social li:nth-child(3) { animation-delay: 2.1s; }
  .hero__cue { animation: fade-up 0.8s 2.3s var(--ease) both; }
  .hero__cue-line::after { animation: cue 2.2s 2.6s ease-in-out infinite; }
  .hero__video { transition: opacity 1.2s var(--ease); }

  .js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* Slow "Ken Burns" zoom on the visible photo */
  .slide img { transform: scale(1.08); transition: transform 7s linear; }
  .slide.is-active img { transform: scale(1); }

  /* Progress bar fills while a slide is showing (duration set by main.js) */
  .slider:not(.is-paused) .slider__dot[aria-current="true"]::after { animation: bar var(--slide-ms, 5500ms) linear both; }
}

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