:root {
  color-scheme: light;
  --bg: #fffaf0;
  --bg-alt: #fff;
  --surface: #fff;
  --fg: #1a1a1a;
  --muted: #5a5a5a;
  --border: #ece3d1;
  --accent: #f59229;
  --accent-strong: #e07a14;
  --accent-soft: #fff3e0;
  --blue: #2b4d96;
  --blue-soft: #eaf0fb;
  --max: 1080px;
  --prose: 720px;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(20, 14, 5, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent);
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--fg);
  color: #fff;
  z-index: 100;
  border-radius: 8px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 250, 240, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--fg);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--fg); }

.brand__logo {
  display: block;
  height: 40px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--accent-strong);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  margin: -0.5rem;
  cursor: pointer;
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, top 0.2s ease, background 0.15s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after  { top:  7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { top: 0; transform: rotate(-45deg); }

/* Hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1rem;
}

.hero__media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: #fff;
}

.hero__media img {
  width: 100%;
  height: auto;
  display: block;
}

.hero__copy {
  text-align: center;
  margin-top: 2rem;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 1rem;
  color: var(--fg);
}

.hero__tagline {
  max-width: 720px;
  margin: 0 auto 1.75rem;
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Store buttons */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 64px;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.store-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Content */
.content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.prose {
  max-width: var(--prose);
  margin: 0 auto 3.5rem;
  scroll-margin-top: 96px;
}

.prose h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-strong);
  margin: 0 0 1rem;
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--fg);
}

.prose p {
  margin: 0 0 1.1rem;
  color: #2a2a2a;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

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

/* Factbox */
.factbox {
  margin: 2rem 0 0;
  padding: 1.5rem;
  background: var(--accent-soft);
  border: 1px solid #f7d8a8;
  border-radius: var(--radius);
}

.factbox__heading {
  margin: 0 0 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}

.factbox__list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.factbox__list > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #f0c98a;
}

.factbox__list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.factbox__list dt {
  font-weight: 700;
  color: var(--fg);
}

.factbox__list dd {
  margin: 0;
  color: #2a2a2a;
}

/* Mode list */
.mode-list {
  margin: 0 0 1.5rem;
  display: grid;
  gap: 1rem;
}

.mode {
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}

.mode__name {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  color: var(--fg);
}

.mode__sub {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.95rem;
}

.mode dd {
  margin: 0;
  color: #2a2a2a;
}

/* Series list */
.series-list {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.5rem;
}

.series-list li {
  padding-left: 0.25rem;
}

.series-list strong {
  color: var(--accent-strong);
}

/* Figure */
.figure {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.figure img {
  width: 100%;
  height: auto;
  display: block;
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .image-grid {
    grid-template-columns: 1fr 1fr;
  }
  .image-grid .figure {
    margin: 0;
  }
}

/* Download CTA */
.download-cta {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-soft), var(--blue-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.download-cta h2 {
  color: var(--accent-strong);
  margin-bottom: 0.5rem;
}

.download-cta p {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.download-cta .store-buttons {
  justify-content: center;
}

/* Footer */
.site-footer {
  background: #14110b;
  color: #f0e4d2;
  padding: 3rem 1.25rem 2rem;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1.4fr;
  }
}

.site-footer h2 {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.site-footer p {
  margin: 0 0 0.75rem;
  color: #cdbfa6;
  line-height: 1.6;
}

.site-footer a {
  color: #ffd699;
}

.site-footer a:hover {
  color: #fff;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.site-footer__legal {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #2a2418;
  color: #8a7d65;
  font-size: 0.85rem;
}

.site-footer__legal p {
  margin: 0;
  color: #8a7d65;
}

/* Responsive */
@media (max-width: 640px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(20, 14, 5, 0.08);
    font-size: 1rem;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a {
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid var(--border);
    color: var(--fg);
  }
  .site-nav a:last-child {
    border-bottom: 0;
  }
  .hero {
    padding-top: 1.5rem;
  }
  .content {
    padding-top: 2rem;
  }
  .factbox__list > div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store-button { transition: none; }
}
