:root {
  --bg: #0a0a0a;
  --bg-raised: #141414;
  --ink: #f4f4f3;
  --ink-80: #f4f4f3cc;
  --ink-60: #f4f4f399;
  --ink-40: #f4f4f366;
  --ink-20: #f4f4f333;
  --hairline: #f4f4f326;
  --film: #000;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-variation-settings: "opsz" 14, "SOFT" 100, "WONK" 0;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ── Topbar ────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  z-index: 20;
  pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.wordmark {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--ink);
}

.topnav {
  display: flex;
  gap: 28px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topnav a {
  text-decoration: none;
  color: var(--ink-80);
  transition: color 200ms ease;
}

.topnav a:hover { color: var(--ink); }

/* ── Hero (full-bleed film) ───────────────────────────────────────────── */
.hero-film {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--film);
}

.hero-film__media {
  position: absolute;
  inset: 0;
}

.hero-film__canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-film__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0) 22%,
    rgba(0,0,0,0) 48%,
    rgba(0,0,0,0.65) 100%
  );
}

.hero-film__copy {
  position: absolute;
  left: clamp(28px, 6vw, 88px);
  bottom: clamp(44px, 7vh, 88px);
  max-width: 44ch;
  z-index: 2;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin: 0 0 24px;
}

.display {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 96, "SOFT" 100, "WONK" 0;
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin: 0 0 24px;
  color: var(--ink);
}

.display em {
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 100, "WONK" 1;
}

.lede {
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.55;
  max-width: 40ch;
  color: var(--ink-80);
  margin: 0;
}

.hero-film__meta {
  position: absolute;
  right: clamp(28px, 6vw, 88px);
  bottom: clamp(44px, 7vh, 88px);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-40);
  text-align: right;
  z-index: 2;
  line-height: 1.8;
}

.hero-film__meta .dot { color: var(--ink-20); margin: 0 6px; }

code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  background: var(--bg-raised);
  padding: 1px 6px;
  border-radius: 2px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}

/* ── Features ─────────────────────────────────────────────────────────── */
.features {
  padding: 120px clamp(28px, 6vw, 88px);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 104px;
}

/* All features now stack full width; the modifier is a no-op but kept for
 * backwards compat with the existing template markup. */
.feature--wide { /* no-op */ }

.feature {
  text-align: center;
  max-width: 44ch;
}

.feature__num {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-60);
  margin: 0 0 20px;
}

.feature h2 {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 72, "SOFT" 80, "WONK" 0;
  font-weight: 400;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.012em;
  margin: 0 auto 18px;
  max-width: 18ch;
  color: var(--ink);
}

.feature p:last-child {
  color: var(--ink-80);
  line-height: 1.62;
  max-width: 44ch;
  margin: 0 auto;
  font-size: 17px;
}

/* ── Library catalog ──────────────────────────────────────────────────── */
.library {
  padding: 120px clamp(28px, 6vw, 88px);
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
}

.catalog {
  list-style: none;
  padding: 0;
  margin: 28px auto 0;
  border-top: 1px solid var(--hairline);
  max-width: 560px;
}

.catalog li {
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
}

.catalog__title {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 0;
  font-size: 24px;
  line-height: 1.1;
  color: var(--ink);
}

/* ── Download CTA ─────────────────────────────────────────────────────── */
.download {
  padding: 140px clamp(28px, 6vw, 88px);
  border-top: 1px solid var(--hairline);
  text-align: center;
  max-width: 1440px;
  margin: 0 auto;
}

.download .display {
  max-width: none;
  margin: 20px auto 48px;
  font-size: clamp(40px, 5.4vw, 80px);
}

.download__stores {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 28px;
  border: 1px solid var(--ink);
  text-decoration: none;
  background: transparent;
  color: var(--ink);
  transition: background 180ms ease, color 180ms ease, transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
  min-width: 200px;
}

.store:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
}

.store__small {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.72;
}

.store__big {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 36, "SOFT" 80, "WONK" 0;
  font-size: 21px;
  line-height: 1.1;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer {
  padding: 96px clamp(28px, 6vw, 88px) 56px;
  border-top: 1px solid var(--hairline);
  max-width: 1440px;
  margin: 0 auto;
}

.footer__langs ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 40px;
}

.footer__langs a {
  text-decoration: none;
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 24, "SOFT" 100, "WONK" 0;
  font-size: 19px;
  color: var(--ink-80);
  padding: 6px 0;
  display: inline-block;
  transition: color 200ms ease, padding-left 260ms ease;
}

.footer__langs a[aria-current="page"] {
  color: var(--ink);
  font-style: italic;
  font-variation-settings: "opsz" 24, "SOFT" 100, "WONK" 1;
}

.footer__langs a:hover {
  color: var(--ink);
  padding-left: 10px;
}

.footer__legal {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-60);
  gap: 20px;
  flex-wrap: wrap;
}

.footer__legal nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__legal nav a {
  color: var(--ink-60);
  text-decoration: none;
  transition: color 180ms ease;
}

.footer__legal nav a:hover { color: var(--ink); }

.wordmark--small { font-size: 11px; margin: 0; }
.copyright { margin: 0; }

/* ── Prose (policy pages) ─────────────────────────────────────────────── */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 160px clamp(28px, 6vw, 48px) 96px;
}

.prose .display {
  margin-top: 12px;
  margin-bottom: 48px;
  font-size: clamp(40px, 5vw, 64px);
}

.prose h2 {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 36, "SOFT" 80, "WONK" 0;
  font-weight: 400;
  font-size: 26px;
  margin: 48px 0 12px;
  color: var(--ink);
}

.prose h3 {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 24, "SOFT" 80, "WONK" 0;
  font-weight: 400;
  font-size: 20px;
  margin: 32px 0 8px;
  color: var(--ink);
}

.prose p {
  color: var(--ink-80);
  line-height: 1.7;
  margin: 0 0 16px;
}

.prose ul {
  color: var(--ink-80);
  line-height: 1.7;
  margin: 0 0 16px;
  padding-left: 20px;
}

.prose li { margin: 4px 0; }

.prose strong { color: var(--ink); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .topbar { padding: 14px 20px; flex-wrap: wrap; gap: 12px; }
  .topnav { gap: 16px; }
  .hero-film__copy {
    left: 24px;
    right: 24px;
    max-width: none;
    bottom: 36px;
  }
  .hero-film__meta { display: none; }
  .library, .features, .download, .footer, .prose {
    padding-left: 24px;
    padding-right: 24px;
  }
  .features { gap: 72px; padding-top: 88px; padding-bottom: 88px; }
  .library { padding-top: 88px; padding-bottom: 88px; }
  .download { padding-top: 96px; padding-bottom: 96px; }
  .catalog li { grid-template-columns: 1fr; gap: 4px; padding: 20px 0; }
  .footer__langs ul { grid-template-columns: 1fr 1fr; }
  .footer__legal {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-film__copy .eyebrow,
  .hero-film__copy .display,
  .hero-film__copy .lede {
    opacity: 0;
    animation: rise 1000ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  }
  .hero-film__copy .eyebrow { animation-delay: 160ms; }
  .hero-film__copy .display { animation-delay: 320ms; }
  .hero-film__copy .lede { animation-delay: 500ms; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
