/* ============================================================
   ALOUD IS — campaign stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300;0,400;0,500;0,600;1,400;1,500;1,600&family=Inter:wght@300;400;500&display=swap');

:root{
  --black: #0a0a0a;
  --off-black: #141414;
  --white: #faf8f4;
  --bone: #e9e4db;
  --dim: #b9b9b9;
  --accent: #ff4f79;
  --line: rgba(250,248,244,0.16);
  --ease: cubic-bezier(.16,.8,.24,1);
  --display: 'Cormorant', 'Georgia', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

*{ box-sizing: border-box; margin:0; padding:0; }
html{
  scroll-behavior:smooth;
  scroll-snap-type: y mandatory;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
}

body{
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Film-grain + vignette, laid over the entire experience for a shot-on-film campaign feel */
.grain{
  position: fixed;
  inset:0;
  z-index: 9000;
  pointer-events:none;
  background-image: url('/assets/img/grain.webp');
  background-size: 180px 180px;
  opacity: .05;
  mix-blend-mode: overlay;
}
.vignette{
  position: fixed;
  inset:0;
  z-index: 8999;
  pointer-events:none;
  background: radial-gradient(120% 85% at 50% 45%, transparent 55%, rgba(0,0,0,.55) 100%);
}
@media (prefers-reduced-motion: reduce){
  .grain{ opacity:.035; }
}

img, video{ display:block; max-width:100%; }

a{ color:inherit; text-decoration:none; }

::selection{ background: var(--accent); color: var(--white); }

.visually-hidden{
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); white-space:nowrap;
}

/* ---------------- Nav ---------------- */

.nav{
  position: fixed;
  top:0; left:0; right:0;
  z-index: 100;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: clamp(20px,3vw,36px) clamp(20px,4vw,48px);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  pointer-events:none;
  background: linear-gradient(180deg, rgba(10,9,8,.55), transparent);
}
.nav.is-visible{
  opacity:1;
  transform:none;
  pointer-events:auto;
}
.nav__mark{
  display:flex;
  align-items:center;
}
.nav__mark img{
  height: clamp(16px, 1.8vw, 22px);
  width:auto;
  display:block;
}
.nav__links{
  display:flex;
  gap: clamp(18px,2.4vw,36px);
  list-style:none;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav__links a{
  opacity:.75;
  transition: opacity .3s var(--ease), color .3s var(--ease);
}
.nav__links a:hover{ opacity:1; color: var(--accent); }

/* ---------------- Hero ---------------- */

.hero{
  position: relative;
  height: 100svh;
  min-height: 560px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-end;
  text-align:left;
  padding: clamp(28px,6vw,80px);
  overflow:hidden;
  scroll-snap-align:start;
  scroll-snap-stop:always;
}

.hero__bg{
  position:absolute;
  inset:0;
  z-index:0;
}
.hero__bg video, .hero__bg img{
  width:100%; height:100%;
  object-fit:cover;
  opacity: .72;
  filter: contrast(1.04) saturate(1.06) brightness(.9);
  transform: scale(1.035);
  animation: hero-drift 26s ease-in-out infinite alternate;
}
@keyframes hero-drift{
  from{ transform: scale(1.035) translate3d(0,0,0); }
  to{ transform: scale(1.07) translate3d(0,-1%,0); }
}
.hero__bg::after{
  content:'';
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(10,9,8,.22), rgba(10,9,8,.08) 42%, rgba(10,9,8,.84) 100%),
    linear-gradient(90deg, rgba(255,79,121,.035), transparent 45%);
}

.hero__content{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  margin-bottom: 38px;
}

.hero__sentence{
  display:flex;
  flex-direction:row;
  align-items:flex-end;
  gap: .22em;
  font-family: var(--display);
  font-weight: 500;
  line-height: 1;
  font-size: clamp(36px, 7vw, 96px);
  letter-spacing: -0.01em;
  opacity:0;
  transform:translateY(17px);
  transition:opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.hero__lead{
  visibility:hidden;
  white-space:nowrap;
}
.hero__sentence em{
  color:var(--accent);
  font-style:italic;
}
.hero__blank{
  display:inline-block;
  width: 3.2em;
  margin-bottom: .16em;
  border-bottom: 3px solid rgba(250,248,244,.4);
}
.hero.is-ready .hero__sentence{
  opacity:1;
  transform:none;
}
.sequence > .pin .pin__sentence{
  opacity:0;
  animation:pin-fade 1.2s var(--ease) .3s forwards;
}
@keyframes pin-fade{ to{ opacity:1; } }
.hero__row1{
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap: .22em;
  line-height: 1;
}
.hero__row1 > *{ line-height: 1; }
.hero__aloud{
  opacity:0;
  animation: fade-up 1.1s var(--ease) .25s forwards;
}
.hero__is{
  color: var(--accent);
  font-style: italic;
  opacity:0;
  animation: fade-up 1.1s var(--ease) .4s forwards;
}

.hero__word-wrap{
  position: relative;
  display:inline-block;
  min-width: 1ch;
  height: 1em;
  overflow:hidden;
  opacity:0;
  animation: fade-up 1.1s var(--ease) .55s forwards;
}
.hero__word{
  position:absolute;
  left:0; top:0;
  line-height: 1;
  white-space:nowrap;
  filter: blur(0px);
}

.hero__scroll{
  position:absolute;
  right: clamp(28px,6vw,80px);
  bottom: clamp(28px,6vw,80px);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  font-size:10px;
  text-transform:uppercase;
  color: var(--dim);
  z-index:1;
  opacity:0;
  transition:opacity .8s var(--ease), transform .8s var(--ease);
  transform:translateY(10px);
}
.hero.is-ready .hero__scroll{
  opacity:1;
  transform:none;
}
.hero__index{
  position:absolute;
  top: clamp(64px,9vw,96px);
  right: clamp(24px,4vw,48px);
  z-index:2;
  font-size:10px;
  letter-spacing:.2em;
  color:rgba(250,248,244,.54);
}
.hero__scroll-label{
  letter-spacing:.28em;
  margin-right: -.28em;
}
.hero__scroll-line{
  width:1px; height:34px;
  background: linear-gradient(var(--accent), transparent);
  animation: scroll-pulse 2.4s ease-in-out infinite;
}
@keyframes scroll-pulse{
  0%,100%{ opacity:.35; } 50%{ opacity:1; }
}

@keyframes fade-up{
  from{ opacity:0; transform: translateY(14px); }
  to{ opacity:1; transform:none; }
}

/* ---------------- Pinned "ALOUD is ___" (sticky through the manifesto scroll) ---------------- */

.pin{
  position: sticky;
  top: 0;
  height: 100svh;
  margin-bottom: calc(-100svh);
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
  z-index: 5;
  pointer-events:none;
  padding: clamp(28px,6vw,80px);
}
.pin__sentence{
  position:relative;
  display:flex;
  flex-wrap:nowrap;
  align-items:flex-end;
  justify-content:flex-start;
  gap: .22em;
  /* Fallback before JS measures the active section's real sub-line height
     (main.js syncPinReserve) and overrides this inline — keeps "ALOUD is"
     sharing a baseline with each section's own word. */
  margin-bottom: 38px;
  max-width: 1100px;
  font-family: var(--display);
  font-weight: 500;
  line-height: 1;
  font-size: clamp(36px, 7vw, 96px);
  letter-spacing: -0.01em;
  text-align:left;
  text-shadow: 0 2px 30px rgba(10,9,8,.5);
}
.pin__sentence > *{ line-height: 1; }
.pin__is{
  color: var(--accent);
  font-style: italic;
}

/* ---------------- Manifesto sections ---------------- */

.stmt{
  position: relative;
  min-height: 100svh;
  display:flex;
  align-items:flex-end;
  padding: clamp(28px,6vw,80px);
  overflow:hidden;
  scroll-snap-align:start;
  scroll-snap-stop:always;
}
.stmt::before{
  content:'';
  position:absolute; inset:0;
  z-index:2;
  background: var(--black);
  opacity:1;
  pointer-events:none;
  transition: opacity 1s var(--ease);
}
.stmt.is-in::before{
  opacity:0;
}
.stmt__media{
  position:absolute;
  inset: -8% 0;
  z-index:0;
  will-change: transform;
}
.stmt__media img, .stmt__media video{
  width:100%; height:100%;
  object-fit:cover;
  filter: contrast(1.04) saturate(1.06) brightness(1.08);
  transform: scale(1.035) translateY(5%);
  transition: transform 1.8s var(--ease), filter 1.2s ease;
}
.stmt.is-in .stmt__media img,
.stmt.is-in .stmt__media video{
  transform: scale(1) translateY(0);
}
.stmt__media::after{
  content:'';
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(10,9,8,.22) 0%, rgba(10,9,8,.04) 38%, rgba(10,9,8,.82) 100%),
    linear-gradient(90deg, rgba(255,79,121,.035), transparent 45%);
}
.stmt__body{
  position:relative; z-index:1;
  max-width: 1100px;
}
.stmt__line{
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(36px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.01em;
  opacity:0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.stmt__lead{
  visibility:hidden;
  white-space:nowrap;
}
.stmt__word{
  display:inline-block;
  white-space:nowrap;
}
.stmt.is-in .stmt__line{ opacity:1; transform:none; }
.stmt__line em{
  font-style: italic;
  color: var(--accent);
}
.stmt__sub{
  margin-top: 18px;
  max-width: 30ch;
  font-size: clamp(14px,1.4vw,17px);
  color: rgba(250,248,244,.68);
  opacity:0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease) .15s, transform 1s var(--ease) .15s;
}
.closing .stmt__sub{
  max-width: none;
  white-space: nowrap;
}
.stmt.is-in .stmt__sub{ opacity:1; transform:none; }

.stmt__index{
  position:absolute;
  top: clamp(64px,9vw,96px);
  right: clamp(24px,4vw,48px);
  z-index:1;
  font-size:12px;
  letter-spacing:.2em;
  color: rgba(250,248,244,.54);
  font-size:10px;
}

/* ---------------- Open-ended interactive (lives inside the closing section) ---------------- */

.open__eyebrow{
  font-size:11px;
  letter-spacing:.3em;
  margin-right: -.3em;
  text-transform:uppercase;
  color: var(--dim);
}
.open__sentence{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:flex-start;
  gap:.28em;
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 56px);
  line-height:1;
}
.open__sentence > *{ line-height: 1; }
.open__is{ color: var(--accent); font-style: italic; }

.open__field-wrap{
  position:relative;
  display:inline-flex;
  align-items:flex-end;
  justify-content:center;
  max-width: 92vw;
  transition: min-width .3s var(--ease);
}
.open__field{
  position:relative;
  z-index:1;
  background:transparent;
  border:none;
  border-bottom: 2px solid var(--line);
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 56px);
  line-height:1;
  width: clamp(3ch, 40vw, 12ch);
  max-width: 92vw;
  text-align:center;
  padding-bottom: .05em;
  transition: border-color .4s var(--ease);
}
.open__field:focus{
  outline:none;
  border-color: var(--accent);
}
.open__field::placeholder{
  color: var(--dim);
  opacity:.5;
}

.open__cycler{
  position:absolute;
  left:50%;
  bottom: .05em;
  transform: translateX(-50%);
  height: 1em;
  max-width: 90vw;
  overflow:hidden;
  min-width: 1ch;
  pointer-events:none;
}
.open__cycler-word{
  position:absolute; left:50%; top:0;
  line-height: 1;
  transform: translateX(-50%);
  white-space:nowrap;
}

.open__hint{
  font-size:12px;
  color: var(--dim);
  letter-spacing:.05em;
}

/* ---------------- Closing ----------------
   Structurally just another .stmt slide (same box model, same reveal
   system) — .closing only adds the glow background and the rose/link CTA. */

.closing__glow{
  position:absolute; inset:0; z-index:0;
  background:
    radial-gradient(48vw 48vw at 72% 48%, rgba(255,79,121,.17), transparent 68%),
    linear-gradient(180deg, var(--off-black), var(--black));
}
.closing__cta{
  position:absolute;
  z-index:1;
  right: clamp(28px,6vw,80px);
  bottom: clamp(28px,6vw,80px);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 14px;
  opacity:0;
  transition: opacity 1.1s var(--ease);
}
.closing.is-in .closing__cta{
  opacity:1;
}
.closing__rose{
  display:block;
  transition: transform .5s var(--ease), filter .5s var(--ease);
  filter: drop-shadow(0 0 30px rgba(255,79,121,.35)) drop-shadow(0 0 70px rgba(255,79,121,.18));
  animation: rose-breathe 5s ease-in-out infinite;
}
.closing__rose img{
  height: clamp(160px, 24vw, 340px);
  width:auto;
  display:block;
  -webkit-user-drag:none;
  user-select:none;
}
.closing__rose:hover{
  transform: scale(1.05);
  filter: drop-shadow(0 0 40px rgba(255,79,121,.5)) drop-shadow(0 0 90px rgba(255,79,121,.28));
}
@keyframes rose-breathe{
  0%,100%{ transform:scale(1); }
  50%{ transform:scale(1.025); }
}
@media (prefers-reduced-motion: reduce){
  .closing__rose{ animation: none; }
}
.closing__back{
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--dim);
  transition: color .3s var(--ease);
}
.closing__back:hover{ color: var(--accent); }

/* ---------------- Mobile ---------------- */
/* Kept at the end of the file on purpose: several rules here override base
   rules (.closing__rose position, .closing__statement size, etc.) that are
   declared later in the cascade — an earlier placement gets silently lost. */
@media (max-width: 640px){
  .nav{
    padding: 22px 18px;
  }
  .nav__links{
    font-size: 9px;
    letter-spacing: .11em;
  }
  .hero__content{
    transform:none;
  }
  .hero__sentence{
    gap: .12em;
  }
  .hero__scroll{
    opacity:.72;
  }
  .stmt__index{
    letter-spacing:.16em;
  }
  .pin__sentence,
  .stmt__line,
  .hero__sentence{
    font-size: clamp(26px, 8.75vw, 36px);
    white-space:nowrap;
  }
  .closing__cta{
    right: 18px;
    bottom: auto;
    top: 70px;
    gap: 6px;
  }
  .closing__rose img{
    height: clamp(72px, 22vw, 110px);
  }
  .closing__back{
    font-size: 10px;
  }
  .open__sentence,
  .open__field{
    font-size:clamp(27px, 9vw, 36px);
  }
}

/* Keep the finale on the same bottom-baseline system as every manifesto
   slide. Only the artwork/CTA floats above the sentence. */
@media (max-width: 820px){
  .closing__cta{
    left:50%;
    right:auto;
    top:auto;
    bottom:clamp(190px, 27svh, 300px);
    transform:translateX(-50%);
    gap:10px;
  }
  .closing__rose img{
    height:clamp(112px, 26vw, 180px);
  }
  .closing__back{
    font-size:10px;
    text-align:center;
  }
}
