/* Knaizen sites — shared styles. Dark + mint, Fraunces (display) + Hanken Grotesk (text),
   both self-hosted (SIL OFL, licences in /fonts). No external requests, no JS. */
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #0a0a0b; --surface: #131316; --surface2: #1c1c21; --surface3: #26262d;
  --border: #2a2a31; --border-soft: #1f1f25;
  --fg: #f4f4f5; --text2: #a1a1aa; --text3: #8b8b94;
  --accent: #6ee7b7; --accent-ink: #052e20; --accent-soft: #6ee7b71a; --accent-line: #6ee7b740;
  --radius: 22px; --radius-sm: 14px;
  --gutter: 16px; --max: 1120px;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --text: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 17px/1.6 var(--text); font-feature-settings: "ss01";
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { /* faint mint glow + dot grid, purely decorative */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 10% -10%, #6ee7b714, transparent 60%),
    radial-gradient(40rem 30rem at 100% 0%, #60a5fa0a, transparent 60%),
    radial-gradient(circle at 1px 1px, #ffffff0d 1px, transparent 0) 0 0 / 28px 28px;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 5; background: #0a0a0bd9; backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--border-soft); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.02em; font-variation-settings: "opsz" 72; }
.wordmark:hover { text-decoration: none; }
.wordmark svg { width: 28px; height: 28px; flex: none; }
.wordmark small { font-family: var(--text); font-weight: 500; font-size: 0.78rem; color: var(--text3); letter-spacing: 0; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--text2); text-decoration: none; font-size: 0.93rem; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
@media (max-width: 560px) { .wordmark small { display: none; } .nav { gap: 2px 14px; } .nav a { font-size: 0.88rem; } }

/* ---- type ---- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.025em; line-height: 1.04; margin: 0; font-variation-settings: "opsz" 144; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 8.5vw, 5.6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
h3 { font-size: 1.45rem; letter-spacing: -0.015em; line-height: 1.2; font-variation-settings: "opsz" 36; }
h1 em, h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--text2); max-width: 38rem; line-height: 1.55; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.muted { color: var(--text2); }
.fine { color: var(--text3); font-size: 0.9rem; }

/* ---- layout blocks ---- */
section { padding: clamp(56px, 9vw, 112px) 0; }
.hero { padding-top: clamp(56px, 10vw, 128px); padding-bottom: clamp(48px, 8vw, 96px); }
.hero .lede { margin-top: 26px; }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 5vw, 48px); max-width: 44rem; }
.rule { border: 0; border-top: 1px solid var(--border-soft); margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: linear-gradient(180deg, #16161a, var(--surface)); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(22px, 3vw, 30px); position: relative; }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card .num { font-family: var(--display); font-style: italic; color: var(--accent); font-size: 1.05rem; display: block; margin-bottom: 18px; }
.card .icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); display: grid; place-items: center; margin-bottom: 18px; }
.card .icon svg { width: 20px; height: 20px; stroke: var(--accent); }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid var(--border); color: var(--fg); background: var(--surface2); font-size: 0.98rem; }
.btn:hover { text-decoration: none; border-color: var(--accent-line); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: #8af0c8; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* store badges */
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.badge { display: inline-flex; flex-direction: column; justify-content: center; min-width: 190px; padding: 10px 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); text-decoration: none; line-height: 1.25; }
.badge small { font-size: 0.72rem; color: var(--text3); letter-spacing: 0.04em; }
.badge strong { font-size: 1.08rem; font-weight: 650; }
.badge .soon { color: var(--accent); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
a.badge:hover { border-color: var(--accent-line); text-decoration: none; }
.badge[aria-disabled="true"] { cursor: default; }

/* app card on the studio page */
.app-card { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: 1fr; align-items: center; background: linear-gradient(135deg, #10201a 0%, var(--surface) 55%); border: 1px solid var(--accent-line); border-radius: 28px; padding: clamp(24px, 5vw, 56px); overflow: hidden; }
@media (min-width: 880px) { .app-card { grid-template-columns: 1.2fr 1fr; } }
.app-card h3 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.025em; font-variation-settings: "opsz" 144; }
.app-card ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; color: var(--text2); }
.app-card li { position: relative; padding-left: 20px; }
.app-card li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.tag { display: inline-block; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }

/* phone mock (pure CSS) */
.phone { justify-self: center; width: min(280px, 80vw); aspect-ratio: 9 / 18.5; border-radius: 44px; border: 1px solid #34343c; background: #0c0c0e; padding: 14px; box-shadow: 0 30px 80px -30px #6ee7b733, inset 0 0 0 6px #151518; }
.phone .screen { height: 100%; border-radius: 32px; background: linear-gradient(180deg, #121215, #0b0b0d); padding: 22px 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.phone .row { background: #1a1a1f; border: 1px solid #25252c; border-radius: 16px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text2); }
.phone .row b { font-family: var(--display); font-weight: 500; font-size: 1.35rem; color: var(--fg); font-variant-numeric: tabular-nums; }
.phone .row .ok { color: var(--accent); font-weight: 600; font-size: 0.72rem; }
.phone .title { font-family: var(--display); font-size: 1.5rem; color: var(--fg); margin: 6px 4px 6px; }
.phone .band { height: 54px; border-radius: 14px; background: linear-gradient(180deg, transparent 30%, #6ee7b71f 30%, #6ee7b71f 70%, transparent 70%), #1a1a1f; border: 1px solid #25252c; position: relative; overflow: hidden; }
.phone .band::after { content: ""; position: absolute; inset: 12px 10px; background: linear-gradient(90deg, transparent, transparent); border-bottom: 2px solid var(--accent); clip-path: polygon(0 60%, 15% 45%, 30% 55%, 45% 35%, 60% 50%, 75% 40%, 90% 52%, 100% 44%, 100% 100%, 0 100%); }

/* pricing */
.prices { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.price { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.price.featured { border-color: var(--accent-line); background: linear-gradient(180deg, #11211a, var(--surface)); }
.price .amount { font-family: var(--display); font-size: 3rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1; margin: 14px 0 6px; font-variant-numeric: tabular-nums; }
.price .amount span { font-family: var(--text); font-size: 1rem; color: var(--text2); letter-spacing: 0; font-weight: 500; }
.forever { margin-top: 18px; border: 1px dashed var(--accent-line); border-radius: var(--radius); padding: 20px 24px; color: var(--text2); }
.forever strong { color: var(--fg); }

/* faq */
.faq { display: grid; gap: 10px; max-width: 52rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--display); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; color: var(--text2); }

/* prose pages (privacy, terms, support, redeem) */
.prose { max-width: 46rem; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(56px, 9vw, 112px); }
.prose h1 { font-size: clamp(2.4rem, 7vw, 4rem); margin-bottom: 14px; }
.prose h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 2.2em 0 0.6em; }
.prose h3 { font-size: 1.2rem; margin: 1.6em 0 0.4em; }
.prose p, .prose li { color: #d4d4d8; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; background: var(--surface2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
.prose .callout { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 18px 22px; margin: 1.5em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--text3); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.table-wrap { overflow-x: auto; }
.updated { color: var(--text3); font-size: 0.92rem; }

/* contact band */
.contact { text-align: left; }
.contact a.mail { font-family: var(--display); font-size: clamp(1.6rem, 5vw, 2.8rem); letter-spacing: -0.02em; font-style: italic; overflow-wrap: anywhere; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 40px 0 48px; color: var(--text3); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: flex-start; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text2); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }
.site-footer p { margin: 0 0 6px; }

/* small utilities (no inline styles: the CSP forbids them) */
.lede.tight { margin-top: 14px; }
.mb { margin-bottom: 22px; }
.mt { margin-top: 22px; }
.center { text-align: center; }
.wordmark span { white-space: nowrap; }
@media (max-width: 560px) { .site-header .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 6px 16px; } .wordmark { font-size: 1.15rem; } }
