/* Potentate website: shared brand tokens and base styles.
   Values from docs/brand/tokens.json. Light by default, dark follows the visitor's system. */
@import url("https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,500;1,7..72,400&family=Schibsted+Grotesk:wght@400..700&display=swap");

:root {
  --bg: #f2f3f0; --surface: #ffffff; --surface-2: #e6e8e3;
  --ink: #14171a; --muted: #5d646b; --line: rgba(20,23,26,.12);
  --accent: oklch(0.56 0.17 32); --on-accent: #ffffff;
  --accent-text: oklch(0.5 0.17 32); --accent-soft: #c4422c1a;
  --shadow-card: 0 0 0 1px rgba(20,23,26,.12), 0 16px 36px rgba(0,0,0,.08);
  --serif: Literata, Georgia, "Times New Roman", serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1012; --surface: #181b1e; --surface-2: #262a2e;
    --ink: #eef0ec; --muted: #9aa1a8; --line: rgba(238,240,236,.13);
    --accent: oklch(0.7 0.16 35); --on-accent: #170a05;
    --accent-text: oklch(0.76 0.15 35); --accent-soft: #f0745624;
    --shadow-card: 0 0 0 1px rgba(238,240,236,.13), 0 16px 36px rgba(0,0,0,.08);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 680px; margin: 0 auto; padding: 0 20px; }

/* Type */
.wordmark { font: 700 17px/normal var(--sans); letter-spacing: -.01em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.wordmark img { width: 28px; height: 28px; border-radius: 7px; }
.label { font: 600 12px/normal var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.label.red { color: var(--accent-text); }
.title { font: 700 clamp(34px, 5.4vw, 56px)/1.2 var(--sans); letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.h2 { font: 700 clamp(28px, 3.6vw, 36px)/1.2 var(--sans); letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.h3 { font: 700 18px/normal var(--sans); letter-spacing: -.01em; margin: 0; }
.lede { font-size: 19px; line-height: 1.55; color: var(--muted); margin: 0; text-wrap: pretty; }
.small { font-size: 13px; line-height: 1.5; color: var(--muted); }
.ref-hero { font: 500 clamp(40px, 6vw, 54px)/1.2 var(--serif); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.ref-deck { font: 500 38px/1.2 var(--serif); letter-spacing: -.01em; margin: 0; }
.verse { font: 400 23px/1.5 var(--serif); text-wrap: pretty; margin: 0; }
.context-body { font: 400 17px/1.6 var(--serif); margin: 0; }
.rule { width: 44px; height: 3px; background: var(--accent); margin-top: 12px; border: 0; }

/* Buttons: every button is a pill, 44px minimum */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 0 28px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 16px/normal var(--sans); text-decoration: none; border: 0; cursor: pointer; }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.quiet { background: var(--surface-2); color: var(--ink); min-height: 44px; padding: 0 20px; font-size: 14px; }
.textlink { color: var(--accent-text); font-weight: 600; text-decoration: none; }
.textlink:hover { text-decoration: underline; }

/* Header and footer */
header.site { padding: 20px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; }
header.site nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
header.site nav a:not(.btn) { text-decoration: none; color: var(--muted); }
header.site nav a:not(.btn):hover { color: var(--ink); }
footer.site { border-top: 1px solid var(--line); margin-top: 96px; padding: 32px 0 56px; font-size: 14px; color: var(--muted); }
footer.site .wrap { display: grid; gap: 14px; }
footer.site .links { display: flex; gap: 22px; flex-wrap: wrap; }
footer.site a { text-decoration: none; }
footer.site a:hover { color: var(--ink); text-decoration: underline; }

/* Phone frame around a screenshot */
.phone { width: 280px; aspect-ratio: 1170 / 2532; border-radius: 44px; background: #14171a; padding: 8px; box-shadow: 0 0 0 1px rgba(238,240,236,.16), 0 24px 60px rgba(0,0,0,.18); flex: none; }
.phone img { width: 100%; height: 100%; border-radius: 36px; object-fit: cover; }

/* Cards */
.card { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-card); padding: 22px; }
.row { border-top: 1px solid var(--line); padding: 18px 0; }

section { padding: 72px 0 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
