/* Plainly — site styles. Tokens mirror the app's design system (APP_BLUEPRINT §19–§21). */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/Inter-SemiBold.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --canvas: #0a0a0b;
  --surface-1: #111113;
  --surface-2: #18181b;
  --surface-3: #202024;
  --border-subtle: #1e1e21;
  --border-default: #2a2a2e;
  --border-strong: #3a3a40;
  --text-primary: #ededea;
  --text-secondary: #a3a3a8;
  --text-tertiary: #7c7c82;
  --inverse: #ededea;
  --on-inverse: #0a0a0b;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --content: 720px;
  --wide: 1080px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-primary);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--text-primary); text-decoration-color: var(--border-strong); text-underline-offset: 3px; transition: text-decoration-color 150ms var(--ease); }
a:hover { text-decoration-color: var(--text-primary); }
:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: 16px; top: -48px; padding: 8px 12px; background: var(--inverse); color: var(--on-inverse); border-radius: var(--radius-sm); z-index: 20; }
.skip-link:focus { top: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(10, 10, 11, 0.86); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--border-subtle); }
.site-header .inner { max-width: var(--wide); margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand img { width: 28px; height: 28px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--text-secondary); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: var(--radius-sm); transition: color 150ms var(--ease), background 150ms var(--ease); }
.nav a:hover { color: var(--text-primary); background: var(--surface-1); }
.nav a[aria-current="page"] { color: var(--text-primary); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--text-primary); width: 44px; height: 44px; border-radius: var(--radius-sm); cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 1.75px; background: currentColor; border-radius: 2px; position: relative; margin: 0 auto; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 720px) {
  .js .nav-toggle { display: block; }
  .js .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--canvas); border-bottom: 1px solid var(--border-subtle); padding: 8px 12px 16px; }
  .js .nav.open { display: flex; }
  .nav { overflow-x: auto; }
  .nav a { padding: 12px; font-size: 15px; }
}

/* Layout */
main { display: block; }
.container { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.prose { max-width: var(--content); margin: 0 auto; padding: 56px 20px 96px; }

/* Hero */
.hero { padding: 96px 20px 72px; text-align: center; }
.hero .app-icon { width: 96px; height: 96px; margin: 0 auto 28px; border-radius: 22px; box-shadow: 0 0 0 1px var(--border-default); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 500; color: var(--text-secondary); background: var(--surface-1); border: 1px solid var(--border-subtle); padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; margin: 0 auto 20px; max-width: 14ch; }
.hero .lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--text-secondary); max-width: 34em; margin: 0 auto 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--radius-md); font-weight: 500; font-size: 15px; text-decoration: none; transition: transform 90ms var(--ease), background 150ms var(--ease); }
.button:active { transform: scale(0.97); }
.button.primary { background: var(--inverse); color: var(--on-inverse); }
.button.secondary { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border-default); }
.button.secondary:hover { background: var(--surface-3); }
.button[aria-disabled="true"] { cursor: default; }
.note { font-size: 13px; color: var(--text-tertiary); margin-top: 16px; }

/* Sections */
.section { padding: 72px 20px; border-top: 1px solid var(--border-subtle); }
.section h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.025em; line-height: 1.15; font-weight: 600; margin: 0 0 12px; text-align: center; }
.section .section-lead { color: var(--text-secondary); text-align: center; max-width: 36em; margin: 0 auto 44px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; max-width: var(--wide); margin: 0 auto; }
.card { background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 24px; }
.card h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin: 14px 0 6px; }
.card p { margin: 0; color: var(--text-secondary); font-size: 15px; }
.card .icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--surface-3); display: grid; place-items: center; }
.card .icon svg { width: 20px; height: 20px; stroke: var(--text-primary); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.promise { max-width: var(--content); margin: 0 auto; list-style: none; padding: 0; }
.promise li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.promise li:last-child { border-bottom: 0; }
.promise strong { color: var(--text-primary); font-weight: 600; }
.promise .check { flex: none; width: 22px; height: 22px; margin-top: 2px; stroke: var(--text-primary); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.formats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.formats span { font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px; background: var(--surface-1); border: 1px solid var(--border-subtle); color: var(--text-secondary); }

/* Prose (legal & support pages) */
.prose h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.03em; line-height: 1.1; font-weight: 600; margin: 0 0 12px; }
.prose .meta { color: var(--text-tertiary); font-size: 14px; margin: 0 0 32px; }
.prose h2 { font-size: 21px; letter-spacing: -0.015em; font-weight: 600; margin: 48px 0 12px; }
.prose h3 { font-size: 17px; font-weight: 600; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text-secondary); }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.summary { background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 20px 24px; margin: 0 0 32px; }
.summary p { margin: 0; color: var(--text-primary); }
.toc { background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 16px 24px; margin: 0 0 8px; }
.toc p { margin: 4px 0 8px; font-size: 13px; font-weight: 600; color: var(--text-tertiary); }
.toc ol { margin: 0 0 4px; }
.toc a { text-decoration: none; color: var(--text-secondary); }
.toc a:hover { color: var(--text-primary); }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
th { color: var(--text-primary); font-weight: 600; }
td { color: var(--text-secondary); }
.table-wrap { overflow-x: auto; }

details { background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); margin: 10px 0; }
summary { cursor: pointer; padding: 16px 20px; font-weight: 500; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--text-tertiary); font-weight: 400; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 20px 16px; }
details p { margin: 0 0 8px; color: var(--text-secondary); }

.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 24px; margin: 24px 0; }
.contact-card .label { font-size: 13px; color: var(--text-tertiary); margin: 0; }
.contact-card .value { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 2px 0 0; word-break: break-all; }
.copy-button { font: inherit; font-size: 14px; font-weight: 500; min-height: 44px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-default); background: var(--surface-2); color: var(--text-primary); cursor: pointer; }
.copy-button:hover { background: var(--surface-3); }

pre.license { white-space: pre-wrap; background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px; font-size: 13px; line-height: 1.55; color: var(--text-secondary); overflow-x: auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--border-subtle); padding: 40px 20px 56px; }
.site-footer .inner { max-width: var(--wide); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--text-primary); }
.site-footer p { margin: 0; color: var(--text-tertiary); font-size: 13px; }

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