:root {
  --bg: #ffffff;
  --surface: #faf8ff;
  --ink: #170f24;
  --ink-muted: #5c5470;
  --accent: #5529ad;
  --accent-deep: #3f1f86;
  --border: #e6e0f5;
  --code-bg: #f2eefb;
  --brand-purple: #5529ad;
  --brand-purple-deep: #3f1f86;
  --brand-yellow: #f5f504;
  --on-purple: #ffffff;
  --on-yellow: #170f24;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #130c1f;
    --surface: #1c1330;
    --ink: #f4f2fa;
    --ink-muted: #b3a8c9;
    --accent: #b79bf2;
    --accent-deep: #f5f504;
    --border: #362852;
    --code-bg: #241a3a;
    --brand-purple: #7c4fe0;
    --brand-purple-deep: #5529ad;
    --brand-yellow: #f5f504;
    --on-purple: #ffffff;
    --on-yellow: #170f24;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

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

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / nav */
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand .logo-img {
  height: 52px;
  width: auto;
  display: block;
}

nav.site-nav {
  display: flex;
  gap: 24px;
  font-size: 14.5px;
}

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

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

/* Hero */
.hero {
  padding: 64px 0 72px;
  text-align: center;
  background: var(--brand-purple);
  background-image: radial-gradient(circle at 50% -10%, var(--brand-purple-deep), var(--brand-purple) 70%);
  color: var(--on-purple);
}

.hero .logo-hero {
  height: 84px;
  width: auto;
  margin: 0 auto 28px;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

.eyebrow {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-yellow);
  margin: 0 0 16px;
}

h1.hero-title {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 20px;
  text-wrap: balance;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero .hero-title { color: var(--on-purple); }
.hero-title .accent { color: var(--brand-yellow); }

h1.page-title {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 6px;
  text-wrap: balance;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.hero-sub {
  max-width: 60ch;
  margin: 0 auto 34px;
  font-size: 18px;
  color: #e7defa;
}

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

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand-yellow);
  color: var(--on-yellow);
}

.btn-primary:hover { background: #ffff66; }

.btn-ghost {
  background: transparent;
  color: var(--on-purple);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover { border-color: var(--brand-yellow); color: var(--brand-yellow); }

.pill-note {
  margin-top: 18px;
  font-size: 13px;
  color: #cabdf0;
}

/* Cipher strip */
.cipher-strip {
  background: #150c26;
  border-top: 1px solid var(--brand-purple-deep);
  border-bottom: 1px solid var(--brand-purple-deep);
  padding: 22px 0;
  text-align: center;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 15px;
  color: #cabdf0;
  letter-spacing: 0.02em;
}

.cipher-strip strong { color: var(--brand-yellow); }

/* Features */
.section { padding: 72px 0; }

.section-compact { padding: 48px 0 56px; }

.section-compact .section-head { margin-bottom: 32px; }

.section-compact .section-title { font-size: clamp(20px, 3vw, 24px); }

.eyebrow-light {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

.section-compact .feature-card { padding: 20px 18px; }

.section-compact .feature-card .icon {
  width: 32px;
  height: 32px;
  font-size: 15px;
  margin-bottom: 12px;
}

.section-compact .feature-card h3 { font-size: 15px; }

.section-compact .feature-card p { font-size: 13.5px; }

.section-head {
  text-align: center;
  max-width: 56ch;
  margin: 0 auto 46px;
}

h2.section-title {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 600;
  margin: 0 0 12px;
  text-wrap: balance;
}

.section-sub {
  color: var(--ink-muted);
  font-size: 16px;
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 720px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px 22px;
}

.feature-card .icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--code-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--brand-purple);
}

.feature-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin: 0 0 8px;
}

.feature-card p {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin: 0;
}

/* SIID grid */
.siid-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

@media (max-width: 780px) {
  .siid-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}

@media (max-width: 460px) {
  .siid-grid { grid-template-columns: 1fr; }
}

.siid-item {
  text-align: center;
  padding: 8px 6px;
}

.siid-word {
  display: block;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(22px, 3.4vw, 28px);
  font-weight: 700;
  color: var(--brand-purple-deep);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.siid-line {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.5;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.siid-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.siid-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.siid-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

.feature-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.feature-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.feature-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.feature-grid .reveal:nth-child(5) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Trust strip */
.trust {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 0;
  text-align: center;
}

@media (max-width: 720px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

.trust-item .num {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-deep);
  display: block;
  margin-bottom: 4px;
}

.trust-item .label {
  font-size: 13px;
  color: var(--ink-muted);
}

/* Numbers-hint demo */
.demo-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px 28px;
  max-width: 560px;
  margin: 0 auto;
}

.demo-box label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.demo-box input {
  width: 100%;
  font-size: 17px;
  padding: 12px 14px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
}

.demo-box input:focus {
  outline: none;
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(85, 41, 173, 0.15);
}

.demo-output {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  min-height: 64px;
}

.demo-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 34px;
}

.demo-chip .letter {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.demo-chip .code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-weight: 700;
  font-size: 16px;
  color: var(--brand-purple-deep);
}

.demo-chip.space {
  background: transparent;
  border: none;
  min-width: 14px;
}

.demo-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-muted);
}

.demo-box-hero {
  text-align: left;
  margin: 8px auto 32px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

/* Coming soon banner */
.banner {
  text-align: center;
  padding: 56px 0;
}

.banner .box {
  background: var(--brand-purple);
  border: none;
  border-radius: 10px;
  padding: 32px 24px;
  max-width: 560px;
  margin: 0 auto;
  color: var(--on-purple);
}

.banner .box a { color: var(--brand-yellow); }

.banner h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 22px;
  margin: 0 0 10px;
  color: var(--on-purple);
}

.banner p {
  color: #e7defa;
  font-size: 14.5px;
  margin: 0;
}

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

footer.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

footer.site .copyright {
  font-size: 13px;
  color: var(--ink-muted);
}

footer.site .foot-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

footer.site .foot-links a {
  color: var(--ink-muted);
  text-decoration: none;
}

footer.site .foot-links a:hover { color: var(--accent-deep); }

/* Privacy page reuses the sheet layout */
.sheet {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.masthead {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 22px;
  margin-bottom: 30px;
}

.masthead .subtitle {
  font-size: 16px;
  color: var(--ink-muted);
  margin: 0 0 16px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.meta-row strong { color: var(--ink); font-weight: 600; }

nav.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 22px;
  margin-bottom: 38px;
}

nav.toc h2 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 12px;
}

nav.toc ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  columns: 2;
  column-gap: 24px;
}

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

nav.toc li { break-inside: avoid; margin-bottom: 7px; font-size: 14px; }

nav.toc a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
nav.toc a:hover, nav.toc a:focus-visible { border-bottom-color: var(--accent); }

nav.toc .num {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  color: var(--accent-deep);
  margin-right: 8px;
}

section.clause {
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 20px;
}

section.clause:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.clause-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }

.clause-num {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  color: var(--accent-deep);
  flex-shrink: 0;
}

h2.clause-title {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

.clause p, .clause li { max-width: 68ch; font-size: 15.5px; color: var(--ink); }
.clause p { margin: 0 0 14px; }
.clause ul { margin: 0 0 14px; padding-left: 22px; }
.clause li { margin-bottom: 7px; }
.clause li::marker { color: var(--accent-deep); }

.not-collected {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 20px;
  margin: 4px 0 14px;
}

.not-collected p {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.not-collected ul { margin: 0; }

a.inline-link, a.contact-link {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

a.inline-link:hover, a.contact-link:hover { text-decoration-color: var(--accent-deep); }

.contact-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 18px 22px;
}

.contact-block p { margin: 0 0 6px; font-size: 15px; }
.contact-block p:last-child { margin-bottom: 0; }

footer.disclaimer {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.6;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
