/* Nunya: shared foundation for every page.
   Tokens, header, buttons, chips, dark bands and footer.
   Homepage-only layout lives in home.css; document pages in documents.css. */

:root {
  color-scheme: light;
  --paper: #fafaf7;
  --card: #ffffff;
  --ink: #1b1c27;
  --muted: #5d5f6e;
  --line: #e4e3dc;
  --accent: #5146e0;          /* from the app icon */
  --accent-hover: #3f35c4;
  --wash: #f1f0f7;

  --night: #0a0b18;
  --night-2: #12142b;
  --night-line: #262945;
  --night-ink: #f4f4fa;
  --night-muted: #a6a9c4;

  --plate: linear-gradient(110deg, #a9cdf3 0%, #c9b8f4 45%, #f2bbdd 100%);
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box }
html { scroll-padding-top: 88px; scroll-behavior: smooth }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }
body { margin: 0; background: var(--paper); -webkit-font-smoothing: antialiased }
a { color: inherit; text-underline-offset: 4px }
button, input { font: inherit }
img { max-width: 100% }
h1, h2, h3 { text-wrap: balance; margin: 0 }
p { text-wrap: pretty }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px }
::selection { background: #dcd8ff; color: var(--ink) }

.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto }
.visually-hidden, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.skip { position: absolute; left: 16px; top: -80px; background: #fff; padding: 12px; z-index: 50 }
.skip:focus { top: 8px }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; font-weight: 700; letter-spacing: -.02em }
.brand img { border-radius: 7px }
.site-header nav { display: flex; align-items: center; gap: 6px; font-size: 14px }
.site-header nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 999px; text-decoration: none; color: var(--muted) }
.site-header nav a:hover { color: var(--ink); background: var(--wash) }
.site-header nav a[aria-current] { color: var(--ink) }
.site-header nav .nav-cta { color: #fff; background: var(--accent); font-weight: 600; margin-left: 6px; padding: 0 18px }
.site-header nav .nav-cta:hover { background: var(--accent-hover); color: #fff }

/* ---------- Buttons ---------- */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s }
.btn:active { transform: translateY(1px) }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px #0000001f }
.btn-primary:hover { background: var(--accent-hover) }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); background: var(--card) }
.btn-ghost:hover { border-color: var(--ink) }
/* A matched pair: the dark capsule on light ground, the light capsule on dark. */
.btn-dark { background: var(--ink); color: var(--paper) }
.btn-dark:hover { background: #000 }
.btn-light { background: var(--night-ink); color: var(--night) }
.btn-light:hover { background: #fff }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px }
.text-link { font-weight: 600; color: var(--accent); text-decoration: none }
.text-link:hover { text-decoration: underline }

/* ---------- Chips and the "Nunya built in" badge ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 6px 12px; border-radius: 999px; white-space: nowrap }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor }
.chip-live { color: #1f7a45; background: #e3f4ea }
.chip-review { color: #8a5a00; background: #fbf0d6 }
.chip-review::before { animation: pulse 1.8s ease-in-out infinite }
@keyframes pulse { 50% { opacity: .3 } }
@media (prefers-reduced-motion: reduce) { .chip-review::before { animation: none } }

.built-in {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 6px; border-radius: 999px;
  background: var(--plate); color: #23233a;
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  box-shadow: inset 0 0 0 1px #ffffff90, 0 1px 2px #1b1c2720;
  white-space: nowrap;
}
.built-in img { border-radius: 5px }
.built-in-lg { font-size: 13px; padding: 6px 14px 6px 7px; margin-bottom: 20px }

/* ---------- Dark bands ---------- */
.band-dark {
  color: var(--night-ink);
  background:
    radial-gradient(900px 480px at 15% 0%, #2a1f5c55, transparent 70%),
    radial-gradient(800px 500px at 90% 100%, #1d3a8a40, transparent 70%),
    var(--night);
}
.band-dark p { color: var(--night-muted) }
.band-dark a:not(.btn) { color: var(--night-ink) }
.band-dark .eyebrow { color: #b3a9ff }

/* ---------- Footer ---------- */
.site-footer { padding: 96px 0 0 }
.site-footer.compact { padding-top: 8px }
.site-footer.compact .footer-row { border-top: 0 }
.closing { display: flex; flex-direction: column; align-items: center; gap: 28px; padding-bottom: 88px; text-align: center }
.closing h2 { font-size: clamp(36px, 5vw, 60px); letter-spacing: -.04em; font-weight: 700 }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px 0 36px; border-top: 1px solid var(--night-line); font-size: 15px; color: var(--night-muted) }
.footer-row p { margin: 0; color: inherit }
.footer-row .legal { margin-top: 6px; font-size: 13px }
.footer-row nav { align-items: center }
.footer-row a.social { display: inline-grid; place-items: center; width: 40px; height: 40px; margin: -10px -10px -10px 0; border-radius: 50%; color: var(--night-ink) !important; text-decoration: none }
.footer-row a.social:hover { background: #ffffff14 }
.footer-row nav { display: flex; gap: 28px; flex-wrap: wrap }
.footer-row a { color: #9fb2ff !important; text-decoration: underline; text-decoration-color: #9fb2ff60 }
.footer-row a:hover, .footer-row a[aria-current] { text-decoration-color: currentColor }

@media (max-width: 820px) {
  .site-header nav a:not(.nav-cta) { display: none }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 32px) }
  .footer-row { flex-direction: column; align-items: flex-start }
}
