/* ============================================================
   Lipton Ice Tea — Half the Sugar, Double the Sun
   Campaign landing — continuous-scroll stage + sections
   ============================================================ */

:root {
  --brand-primary: #FFD100;
  --brand-secondary: #E30613;
  --brand-accent: #1DB46B;
  --brand-bg: #FFFFFF;
  --brand-text: #111111;
  --brand-dark: #0b0a08;

  --font-display: "Archivo Black", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 32px;
  --space-5: 64px;
  --space-6: 128px;

  --shadow-card: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);
  --radius: 12px;

  --max-width: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--brand-text);
  background: var(--brand-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- top nav ---------- */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  z-index: 50;
  mix-blend-mode: difference;
  color: #fff;
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.campaign-chip {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

/* ============================================================
   SCROLL STAGE — continuous scroll, sticky frame + chapters
   ============================================================ */
.scrollstage {
  position: relative;
  width: 100%;
  height: 600vh;            /* total scroll distance for the experience */
  background: var(--brand-dark);
}
.stage-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}
.hero-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  will-change: contents;
}
.stage-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,.35) 75%, rgba(0,0,0,.78) 100%),
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 65%, rgba(0,0,0,.6) 100%);
}

/* ---------- loading pill ---------- */
.hero-loading {
  position: absolute;
  top: calc(var(--space-4) + var(--space-3));
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: .65rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #fff;
  padding: 6px 14px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  transition: opacity .5s ease;
}
.hero-loading.is-done {
  opacity: 0;
  pointer-events: none;
}

/* ---------- chapters (orchestrated by scroll.js) ---------- */
.chapter {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-5) var(--space-4);
  color: #fff;
  opacity: 0;
  transform: translate3d(0, 60px, 0);
  will-change: opacity, transform;
}
.chapter-kicker,
.chapter-label {
  display: inline-block;
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  margin-bottom: var(--space-3);
  backdrop-filter: blur(6px);
  width: fit-content;
}
.chapter-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.75rem, 9vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-wrap: balance;
  max-width: 15ch;
}
.chapter-headline .accent {
  color: var(--brand-primary);
  display: inline-block;
}
.chapter-sub {
  margin-top: var(--space-3);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  max-width: 640px;
  opacity: 0.92;
  font-weight: 500;
}
.chapter-source {
  margin-top: var(--space-3);
  font-size: .75rem;
  opacity: .55;
  letter-spacing: .05em;
  font-style: italic;
}
.chapter-scrollhint {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  font-size: .65rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .5;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%,100% { transform: translateY(0); opacity: .35; }
  50%     { transform: translateY(6px); opacity: 1; }
}

/* Chapter-specific styles */
.chapter--hero {
  justify-content: flex-end;
}
.chapter--insight {
  justify-content: center;
  align-items: flex-start;
}
.chapter--insight .huge-stat {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(8rem, 22vw, 22rem);
  line-height: 0.78;
  letter-spacing: -0.06em;
  color: var(--brand-primary);
  text-shadow: 0 20px 80px rgba(0,0,0,.55);
}
.chapter--insight .stat-pct {
  font-size: 0.4em;
  vertical-align: top;
  margin-left: 0.05em;
  color: #fff;
}
.chapter--insight .huge-body {
  margin-top: var(--space-3);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  max-width: 640px;
  line-height: 1.3;
  font-weight: 500;
}
.chapter--manifesto {
  justify-content: center;
  align-items: flex-start;
}
.chapter--manifesto .manifesto-text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 1050px;
  text-wrap: balance;
}
.chapter--manifesto .manifesto-text p + p { margin-top: var(--space-3); }
.chapter--manifesto em {
  font-style: normal;
  color: var(--brand-primary);
}
.chapter--manifesto .manifesto-final {
  color: var(--brand-primary);
}
.chapter--transition {
  justify-content: flex-end;
}

/* ============================================================
   SECTIONS (after the sticky stage)
   ============================================================ */
section.executions,
section.kpis {
  padding: var(--space-6) var(--space-4);
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
  text-wrap: balance;
}
.section-sub {
  font-size: 1rem;
  opacity: .7;
  margin-bottom: var(--space-4);
  max-width: 640px;
}

/* ---------- executions ---------- */
.executions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-3);
}
.execution-card {
  position: relative;
  min-height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #0b0a08;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s ease;
  isolation: isolate;
}
.execution-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.execution-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.execution-card:hover .execution-card-img {
  transform: scale(1.04);
}
.execution-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 35%,
    rgba(0,0,0,.55) 65%,
    rgba(0,0,0,.92) 100%
  );
  pointer-events: none;
}
.execution-card-inner {
  position: relative;
  z-index: 2;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.execution-card-label {
  display: inline-block;
  align-self: flex-start;
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  color: #fff;
  width: fit-content;
}
.execution-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #fff;
  text-wrap: balance;
}
.execution-card-body {
  font-size: .9rem;
  line-height: 1.5;
  opacity: .88;
  color: #fff;
  max-width: 40ch;
}
.execution-card-foot {
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  opacity: .65;
  color: #fff;
  border-top: 1px solid rgba(255,255,255,.25);
  padding-top: var(--space-2);
  margin-top: var(--space-2);
}

/* ---------- kpis ---------- */
.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--brand-text);
}
.kpi-card {
  padding: var(--space-4) var(--space-3);
  border-right: 1px solid var(--brand-text);
}
.kpi-card:last-child { border-right: none; }
.kpi-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.8rem, 4.5vw, 4.5rem);
  line-height: 1;
  color: var(--brand-secondary);
  letter-spacing: -0.03em;
}
.kpi-label {
  margin-top: var(--space-2);
  font-size: .8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  opacity: .7;
  line-height: 1.3;
}

/* ---------- credits ---------- */
.credits {
  padding: var(--space-4);
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid rgba(0,0,0,.1);
  font-size: .8rem;
  opacity: .65;
  text-align: center;
}
.credits-line strong { font-weight: 700; }
.credits-disclaimer { margin-top: var(--space-2); font-size: .7rem; opacity: .7; }

/* ---------- reveal-on-scroll (for post-stage sections) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s ease-out, transform .9s cubic-bezier(.2,.8,.2,1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .scrollstage { height: 550vh; }
  .chapter { padding: var(--space-4) var(--space-3); }
  .chapter--insight .huge-stat { font-size: clamp(6rem, 34vw, 12rem); }
  section.executions, section.kpis { padding: var(--space-5) var(--space-3); }
  .kpis-grid { grid-template-columns: 1fr 1fr; }
  .kpi-card { border-right: 1px solid var(--brand-text); border-bottom: 1px solid var(--brand-text); }
  .kpi-card:nth-child(even) { border-right: none; }
  .kpi-card:nth-last-child(-n+2) { border-bottom: none; }
  .top-nav { padding: var(--space-3); }
}
@media (max-width: 480px) {
  .scrollstage { height: 500vh; }
  .kpis-grid { grid-template-columns: 1fr; }
  .kpi-card { border-right: none !important; border-bottom: 1px solid var(--brand-text); }
  .kpi-card:last-child { border-bottom: none; }
  .chapter--manifesto .manifesto-text { font-size: clamp(1.4rem, 6vw, 2.2rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scrollstage { height: auto; }
  .stage-sticky { position: relative; height: 100vh; }
  .chapter { position: relative; inset: auto; opacity: 1 !important; transform: none !important; page-break-after: always; }
  .chapter-scrollhint { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .execution-card { transition: none; }
}
