/* =========================================================
   Graddly , shared styles
   Palette
     paper      #F4EFE6
     muted      #EBE3D4
     ink        #1A1830
     ink-deep   #0F0E1A
     accent     #D4FF3D
   Type
     Fraunces       , display
     Geist          , UI body
     JetBrains Mono , eyebrows / labels (uppercase)
   ========================================================= */

:root {
  --paper: #F4EFE6;
  --muted: #EBE3D4;
  --muted-2: #E2D8C5;
  --ink: #1A1830;
  --ink-2: #3a3756;
  --ink-3: #6f6c8a;
  --ink-deep: #0F0E1A;
  --accent: #D4FF3D;
  --accent-deep: #b8e123;
  --rule: rgba(15, 14, 26, 0.12);
  --rule-soft: rgba(15, 14, 26, 0.06);

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Layout primitives ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(56px, 9vw, 120px);
}
.section--tight {
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* ---------- Type ---------- */
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
  vertical-align: middle; margin-right: 8px; margin-bottom: 2px;
}

.display {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  color: var(--ink-deep);
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.display .accent {
  background: linear-gradient(180deg, transparent 56%, var(--accent) 56%, var(--accent) 96%, transparent 96%);
  color: var(--ink-deep);
  padding: 0 0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

h1.display { font-size: clamp(44px, 7.2vw, 96px); }
h2.display { font-size: clamp(34px, 4.6vw, 60px); }
h3.display { font-size: clamp(24px, 2.6vw, 34px); }

.lede {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 52ch;
  text-wrap: pretty;
}

.body-prose { max-width: 64ch; }
.body-prose p { margin: 0 0 1.05em; color: var(--ink-2); }
.body-prose p:last-child { margin-bottom: 0; }
.body-prose h2.display { margin: 2.4em 0 0.5em; font-size: clamp(24px, 2.4vw, 32px); }
.body-prose h3 {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-deep);
  margin: 2em 0 0.5em;
}
.body-prose ul {
  padding-left: 0;
  list-style: none;
  margin: 0.6em 0 1.2em;
}
.body-prose ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 0.5em;
  color: var(--ink-2);
}
.body-prose ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.62em;
  width: 8px; height: 1px;
  background: var(--ink-deep);
}
.body-prose strong { color: var(--ink-deep); font-weight: 600; }
.body-prose a { border-bottom: 1px solid var(--ink-3); }
.body-prose a:hover { color: var(--ink-deep); border-bottom-color: var(--ink-deep); }

/* ---------- Brand mark ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  color: var(--ink-deep);
  font-size: 26px;
  line-height: 1;
  font-weight: 500;
  font-style: italic;
  padding-bottom: 4px;
  letter-spacing: -0.02em;
}
.brand-icon--lg {
  width: 56px; height: 56px;
  border-radius: 14px;
  font-size: 40px;
}
.brand-word {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: var(--ink-deep);
}

/* ---------- Header / Footer ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink-deep); background: var(--muted); }
.nav a.is-current { color: var(--ink-deep); }
.nav .nav-divider { width: 1px; height: 18px; background: var(--rule); margin: 0 6px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: 'Geist', sans-serif;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s, color .15s, border-color .15s;
}
.btn--primary {
  background: var(--ink-deep);
  color: var(--paper);
}
.btn--primary:hover { background: var(--ink); }
.btn--accent {
  background: var(--accent);
  color: var(--ink-deep);
}
.btn--accent:hover { background: var(--accent-deep); }
.btn--ghost {
  background: transparent;
  color: var(--ink-deep);
  border-color: var(--ink-deep);
}
.btn--ghost:hover { background: var(--ink-deep); color: var(--paper); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn .arrow { font-family: 'Fraunces', serif; font-size: 17px; line-height: 1; transform: translateY(-1px); }

/* Mobile menu (very simple) */
@media (max-width: 760px) {
  .nav .nav-link-extra { display: none; }
  .nav .nav-divider { display: none; }
  .site-header .wrap { height: 64px; }
  .brand-word { font-size: 22px; }
  .brand-icon { width: 32px; height: 32px; font-size: 22px; border-radius: 8px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--paper);
  padding: 80px 0 40px;
  margin-top: 80px;
}
.site-footer .wrap { display: grid; gap: 56px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer-tag {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3.4vw, 44px);
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 14ch;
  color: var(--paper);
}
.footer-tag .accent {
  background: var(--accent);
  color: var(--ink-deep);
  padding: 0.02em 0.12em;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.footer-col h4 {
  font: 500 11.5px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.55);
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(244, 239, 230, 0.85);
  font-size: 14.5px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(244, 239, 230, 0.12);
  font-size: 13px;
  color: rgba(244, 239, 230, 0.55);
}
.footer-bottom .brand-word { color: var(--paper); }
.footer-bottom .brand-icon { width: 28px; height: 28px; font-size: 20px; border-radius: 7px; }

@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer-tag { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ---------- Card / Surface ---------- */
.surface {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
}
.surface--muted { background: var(--muted); border-color: transparent; }

/* ---------- Store badges ---------- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 14px;
  background: var(--ink-deep);
  color: var(--paper);
  border-radius: 12px;
  transition: transform .15s;
  min-height: 56px;
}
.store-badge:hover { transform: translateY(-1px); }
.store-badge .glyph {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: var(--paper);
}
.store-badge .glyph svg { width: 24px; height: 24px; fill: currentColor; }
.store-badge .small {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.65);
  margin-bottom: 1px;
}
.store-badge .big {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* ---------- Page hero (legal/policy pages) ---------- */
.page-hero {
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--rule);
}
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero h1 { margin: 0; }
.page-hero .meta {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--ink-3);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.page-hero .meta span::before {
  content: "·";
  margin-right: 14px;
  color: var(--ink-3);
}
.page-hero .meta span:first-child::before { content: none; }

/* ---------- Doc layout (policies) ---------- */
.doc {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(56px, 8vw, 96px);
  align-items: start;
}
.toc {
  position: sticky;
  top: 96px;
  font-size: 13.5px;
}
.toc h4 {
  font: 500 11.5px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li {
  counter-increment: toc;
  margin-bottom: 8px;
  color: var(--ink-2);
  position: relative;
  padding-left: 28px;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
}
.toc a:hover { color: var(--ink-deep); }
@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; }
}

/* ---------- Reusable: image slot ---------- */
.img-slot {
  background:
    repeating-linear-gradient(135deg,
      rgba(15, 14, 26, 0.04) 0,
      rgba(15, 14, 26, 0.04) 1px,
      transparent 1px,
      transparent 10px),
    var(--muted);
  border: 1px solid var(--rule);
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 24px;
  text-align: center;
}

/* ---------- Tag pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--muted);
  color: var(--ink-2);
}
.pill--ink { background: var(--ink-deep); color: var(--paper); }
.pill--accent { background: var(--accent); color: var(--ink-deep); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input,
.field textarea,
.field select {
  font: 16px/1.4 'Geist', sans-serif;
  color: var(--ink-deep);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color .15s, background .15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--ink-deep);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 140px; }

/* ---------- Selection ---------- */
::selection { background: var(--accent); color: var(--ink-deep); }
