:root {
  --purple-hi: #a834fb;
  --purple: #8c22e8;
  --purple-lo: #6513bd;
  --purple-ink: #4a0f8f;
  --ink: #1c1a22;
  --ink-soft: #55515f;
  --line: #e7e3ee;
  --paper: #ffffff;
  --paper-soft: #f7f4fb;
  --footer: #0d0d0f;
  --footer-text: #9a97a3;
  --radius: 14px;
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.purple-bg {
  background:
    radial-gradient(ellipse 70% 80% at 50% 42%, var(--purple-hi) 0%, var(--purple) 45%, var(--purple-lo) 100%);
  color: #fff;
}

/* ---------- Home hero ---------- */

.hero {
  flex: 1;
  min-height: 70vh;
  min-height: 70svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 48px);
  padding: 64px 16px;
  text-align: center;
}

.hero-logo {
  width: clamp(220px, 36vw, 500px);
  height: auto;
  filter: drop-shadow(0 14px 18px rgba(55, 0, 110, 0.45));
  animation: float 6s ease-in-out infinite;
}

.hero h1 {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; }
  html { scroll-behavior: auto; }
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  height: 52px;
  padding: 0 18px 0 14px;
  border-radius: 10px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(30, 0, 70, 0.35); }
.store-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.store-btn svg { width: 26px; height: 26px; flex: none; fill: currentColor; }

.store-btn span { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.store-btn small { font-size: 10px; letter-spacing: 0.02em; opacity: 0.9; }
.store-btn strong { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer);
  color: var(--footer-text);
  padding: 56px 16px 32px;
  font-size: 14px;
}

.footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-logo { width: 120px; height: auto; margin-bottom: 18px; }

.footer-about { max-width: 250px; margin: 0; }

.site-footer h2 {
  margin: 4px 0 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.site-footer a { color: #d9d6e0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
  max-width: 1040px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid #222128;
  font-size: 13px;
}

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- Document pages ---------- */

.topbar {
  padding: 18px 16px;
}

.topbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-logo img { width: 104px; height: auto; filter: drop-shadow(0 4px 6px rgba(55, 0, 110, 0.4)); }

.topbar nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; font-weight: 700; }
.topbar nav a { text-decoration: none; opacity: 0.85; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.page-head {
  padding: 40px 16px 56px;
  text-align: center;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 48px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.page-head p { margin: 10px 0 0; opacity: 0.85; }

.doc {
  flex: 1;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 16px 72px;
  font-size: 16px;
}

.doc h2 {
  margin: 48px 0 12px;
  font-size: 22px;
  font-weight: 900;
  color: var(--purple-ink);
  line-height: 1.3;
  scroll-margin-top: 16px;
}

.doc h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 800; }

.doc p, .doc li { color: var(--ink-soft); }
.doc strong { color: var(--ink); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--purple); font-weight: 700; }

.doc .lead { font-size: 17px; color: var(--ink); }

.toc {
  margin: 28px 0 8px;
  padding: 20px 24px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toc h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { font-weight: 600; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

@media (max-width: 600px) { .toc ol { columns: 1; } }

@media (max-width: 520px) {
  .store-row { flex-direction: column; align-items: center; }
  .store-btn { width: 220px; }
  .topbar-logo img { width: 84px; }
  .topbar nav { flex-wrap: nowrap; gap: 14px; font-size: 13px; }
}

.table-wrap { overflow-x: auto; margin: 16px 0; }

.doc table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.doc th { color: var(--ink); background: var(--paper-soft); font-weight: 800; }

.callout {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--purple);
  background: var(--paper-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout p { margin: 0; }

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 20px;
  margin: 12px 0;
  background: var(--paper);
}

.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 800;
  color: var(--ink);
  list-style-position: outside;
}

.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }

.contact-card {
  margin: 24px 0;
  padding: 28px;
  border-radius: var(--radius);
  text-align: center;
}

.contact-card p { color: rgba(255, 255, 255, 0.9); margin: 0 0 16px; }

.contact-card a.button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: #fff;
  color: var(--purple-ink);
  font-weight: 900;
  text-decoration: none;
}

.not-found { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 64px 16px; text-align: center; }
.not-found h1 { margin: 0; font-size: clamp(34px, 7vw, 56px); font-weight: 900; }
.not-found a { font-weight: 800; }
