:root {
  --paper: #f7f3ef;
  --ink: #17100f;
  --ink-soft: #5d514e;
  --crimson: #d8232a;
  --crimson-deep: #b01b21;
  --display: "Avenir Next", "Futura", "Century Gothic", "Segoe UI", sans-serif;
  --body: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--crimson-deep); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 18px;
}
.nav nav { display: flex; gap: 22px; align-items: center; }
.nav nav a { text-decoration: none; color: var(--ink); font-size: 15px; }
.nav nav a:hover { color: var(--crimson-deep); }
.nav .cta {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 8px 18px;
}
.nav .cta:hover { background: var(--ink); color: var(--paper); }

/* ---------- film ---------- */
.film { position: relative; height: 300vh; }
.film-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
#film-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.card {
  position: absolute;
  z-index: 5;
  max-width: 30rem;
  left: clamp(24px, 7vw, 110px);
  top: 24vh;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.card.on { opacity: 1; transform: none; pointer-events: auto; }

.kicker {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 13px;
  color: var(--crimson-deep);
  margin: 0 0 10px;
}
.card h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.card h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.12;
  margin: 0 0 12px;
  text-wrap: balance;
}
.card p { margin: 0 0 10px; color: var(--ink-soft); max-width: 44ch; }
.link { font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* final card: the finished mark owns the center, so the copy takes the left third */
.card-final {
  left: clamp(24px, 7vw, 110px);
  top: 50%;
  transform: translateY(calc(-50% + 14px));
  max-width: 24rem;
}
.card-final.on { transform: translateY(-50%); }
.card-final .mark { display: none; } /* the film's last frame IS the mark; SVG shown in static mode */
.card-final h2 { font-size: clamp(30px, 3.6vw, 44px); }
.card-final p { max-width: 26ch; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.btn {
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
  background: var(--crimson);
  color: #fff;
  border-radius: 999px;
  padding: 12px 26px;
}
.btn:hover { background: var(--crimson-deep); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn:focus-visible, .nav a:focus-visible, .link:focus-visible {
  outline: 3px solid var(--crimson);
  outline-offset: 3px;
}

.scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  animation: hint 2.4s ease-in-out infinite;
}
@keyframes hint { 0%,100% { opacity: 0.35; } 50% { opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) { .scroll-hint { animation: none; } }

/* ---------- static fallback (no frames extracted / reduced motion) ---------- */
.film-static .film { height: auto; }
.film-static .film-viewport { position: static; height: auto; min-height: 92vh; display: grid; place-items: center; padding: 120px 24px 60px; }
.film-static #film-canvas, .film-static .scroll-hint { display: none; }
.film-static .card { position: static; opacity: 1; transform: none; pointer-events: auto; margin: 0 auto 56px; }
.film-static .card-final { transform: none; }
.film-static .card-final .mark { display: inline-block; margin-bottom: 18px; }

/* ---------- footer ---------- */
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px 28px 40px;
  font-size: 14px;
  color: var(--ink-soft);
}
footer a { color: inherit; }
