/* Ontara — site styles on the Base design language (tokens copied from the Base design system). */
:root, [data-theme="light"] {
  --bg: #FFFFFF; --surface: #FAFAFA; --surface-2: #F2F2F2; --surface-3: #E8E8E8; --raised: #FFFFFF;
  --border: #E5E5E5; --border-strong: #8F8F8F;
  --ink: #0A0A0A; --ink-muted: #5C5C5C; --ink-inverse: #FFFFFF;
  --accent: #2B5BE8; --accent-ink: #FFFFFF; --accent-subtle: #EAF0FF; --accent-strong: #1F3FA8;
  --focus: var(--accent);
  --success: #007A5E; --success-subtle: #E3F5EF;
  --warning: #8F5F00; --warning-subtle: #FBF1DC;
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.06);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0A0A0A; --surface: #111111; --surface-2: #1A1A1A; --surface-3: #242424; --raised: #171717;
  --border: #262626; --border-strong: #6E6E6E;
  --ink: #EDEDED; --ink-muted: #A1A1A1; --ink-inverse: #0A0A0A;
  --accent: #6B8FFF; --accent-ink: #0A0A0A; --accent-subtle: #121C3D; --accent-strong: #A9BEFF;
  --success: #3CC9A3; --success-subtle: #0C2A22;
  --warning: #F0B13A; --warning-subtle: #2E2208;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px;
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-full: 9999px;
  --control-md: 36px; --control-lg: 44px; --bar-height: 56px;
  --container-prose: 680px; --container-page: 1120px;
  --duration-fast: 120ms; --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --font-sans: "Geist", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, "PingFang SC", monospace;
  --hover: color-mix(in oklab, var(--ink) 6%, transparent);
  --active: color-mix(in oklab, var(--ink) 11%, transparent);
}
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/24px var(--font-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
h1, h2, h3, p, ul, ol { margin: 0; }
code { font: 400 13px/20px var(--font-mono); background: var(--surface-2); padding: 1px var(--space-1); border-radius: var(--radius-xs); }

.container { max-width: var(--container-page); margin: 0 auto; padding: 0 var(--space-4); }
.prose-wrap { max-width: var(--container-prose); margin: 0 auto; padding: 0 var(--space-4); }
@media (min-width: 768px) { .container, .prose-wrap { padding: 0 var(--space-8); } }

/* Type */
.display { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.03em; }
.h1 { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.h2 { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.h3 { font-size: 18px; line-height: 26px; font-weight: 600; }
@media (min-width: 640px) {
  .display { font-size: 48px; line-height: 52px; }
  .h1 { font-size: 32px; line-height: 40px; }
  .h2 { font-size: 24px; line-height: 32px; }
}
.body-lg { font-size: 17px; line-height: 28px; }
.small { font-size: 13px; line-height: 20px; }
.muted { color: var(--ink-muted); }
.label { font: 500 12px/16px var(--font-mono); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-muted); }

/* Navbar */
.nav { position: sticky; top: 0; z-index: 100; background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.nav__inner { height: var(--bar-height); display: flex; align-items: center; gap: var(--space-2); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; margin-right: auto; min-height: var(--control-lg); }
.brand:hover { text-decoration: none; }
.brand svg { width: 22px; height: 22px; }
.nav__link { display: inline-flex; align-items: center; min-height: var(--control-lg); padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--ink-muted); font: 500 14px/20px var(--font-sans); transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
.nav__link:hover { text-decoration: none; color: var(--ink); }
@media (hover: hover) { .nav__link:hover { background: var(--hover); } }
.nav__link[aria-current="page"] { color: var(--ink); }
.nav__hide-sm { display: none; }
@media (min-width: 640px) { .nav__hide-sm { display: inline-flex; } }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control-lg); padding: 0 var(--space-5); border-radius: var(--radius-md); font: 500 14px/20px var(--font-sans); border: 1px solid var(--border-strong); color: var(--ink); background: transparent; transition: background var(--duration-fast) var(--ease-out); }
.button:hover { text-decoration: none; }
@media (hover: hover) { .button:hover { background: var(--hover); } }
.button:active { background: var(--active); }
.button--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .button--primary:hover { background: color-mix(in oklab, var(--accent) 86%, var(--ink-inverse)); } }
.button svg { width: 16px; height: 16px; }

.badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-2); border-radius: var(--radius-sm); font: 500 12px/18px var(--font-sans); border: 1px solid var(--border); color: var(--ink-muted); background: var(--surface); }

/* Sections */
.section { padding: var(--space-12) 0; }
@media (min-width: 768px) { .section { padding: var(--space-16) 0; } }
.section + .section { border-top: 1px solid var(--border); }
.hero { padding: var(--space-12) 0 var(--space-12); }
@media (min-width: 768px) { .hero { padding: 96px 0 var(--space-16); } }
.hero__lead { max-width: 600px; margin-top: var(--space-4); color: var(--ink-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.stack-2 > * + * { margin-top: var(--space-2); }
.stack-4 > * + * { margin-top: var(--space-4); }
.section__head { margin-bottom: var(--space-8); }
.section__head p { margin-top: var(--space-2); }

/* Cards */
.card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); padding: var(--space-6); }
a.card { display: block; color: inherit; transition: box-shadow var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
a.card:hover { text-decoration: none; }
@media (hover: hover) { a.card:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); } }
.app-card { display: grid; grid-template-columns: 64px 1fr; gap: var(--space-4) var(--space-5); align-items: start; }
@media (min-width: 768px) { .app-card { grid-template-columns: 96px 1fr auto; align-items: center; padding: var(--space-8); } }
.app-icon { width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--border); }
@media (min-width: 768px) { .app-card .app-icon { width: 96px; height: 96px; border-radius: 21px; } }
.app-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.app-card__go { grid-column: 1 / -1; font: 500 14px/20px var(--font-sans); color: var(--accent); }
@media (min-width: 768px) { .app-card__go { grid-column: auto; } }

.grid-3 { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
.feature svg { width: 20px; height: 20px; color: var(--ink); }
.feature h3 { margin-top: var(--space-3); }
.feature p { margin-top: var(--space-2); color: var(--ink-muted); }

/* Gridling hero */
.product-hero { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 1024px) { .product-hero { grid-template-columns: 1fr 1fr; gap: var(--space-12); } }
.product-hero .app-icon { width: 80px; height: 80px; border-radius: 18px; margin-bottom: var(--space-6); }
.mini-grid { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; max-width: 420px; }
.mini-grid span { aspect-ratio: 1; border-radius: 2px; background: var(--surface-3); }
.mini-grid span[data-on] { background: var(--accent); }
.mini-grid span[data-half] { background: color-mix(in oklab, var(--accent) 45%, var(--surface-3)); }

.shots { display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-2); margin: 0 calc(-1 * var(--space-4)); padding-left: var(--space-4); padding-right: var(--space-4); }
@media (min-width: 768px) { .shots { margin: 0; padding-left: 0; padding-right: 0; display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; } }
.shots figure { margin: 0; flex: 0 0 62%; scroll-snap-align: start; }
@media (min-width: 640px) { .shots figure { flex-basis: 40%; } }
.shots img { width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.shots figcaption { margin-top: var(--space-2); font-size: 13px; line-height: 20px; color: var(--ink-muted); }

.list { padding-left: 0; list-style: none; }
.list li { display: flex; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list svg { flex: none; width: 16px; height: 16px; margin-top: 4px; color: var(--ink); }

.note { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--accent-subtle); color: var(--ink); }
.note svg { flex: none; width: 20px; height: 20px; color: var(--accent-strong); margin-top: 2px; }

/* Legal / long text */
.doc { padding: var(--space-12) 0 var(--space-16); }
.doc__head { padding-bottom: var(--space-8); margin-bottom: var(--space-8); border-bottom: 1px solid var(--border); }
.doc__head p { margin-top: var(--space-2); }
.doc h2 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; margin: var(--space-10) 0 var(--space-3); }
.doc h3 { font-size: 16px; line-height: 24px; font-weight: 600; margin: var(--space-6) 0 var(--space-2); }
.doc p, .doc ul, .doc ol { font-size: 16px; line-height: 27px; margin-bottom: var(--space-4); }
.doc ul, .doc ol { padding-left: var(--space-6); }
.doc li + li { margin-top: var(--space-2); }
.doc strong { font-weight: 600; }
.toc { padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); margin-bottom: var(--space-8); }
.toc ol { margin: var(--space-2) 0 0; padding-left: var(--space-5); font-size: 14px; line-height: 22px; }
.toc li + li { margin-top: var(--space-1); }
.faq details { border-bottom: 1px solid var(--border); padding: var(--space-4) 0; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 16px; line-height: 24px; list-style: none; display: flex; justify-content: space-between; gap: var(--space-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--ink-muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p, .faq details ul { margin-top: var(--space-3); margin-bottom: 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }

/* Footer */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: var(--space-10) 0 var(--space-12); }
.footer__grid { display: grid; gap: var(--space-8); grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer__col { font-size: 14px; line-height: 20px; }
.footer__col .label { margin-bottom: var(--space-3); }
.footer__col a { color: var(--ink-muted); display: inline-block; padding: var(--space-1) 0; }
.footer__col a:hover { color: var(--ink); }
.footer__about { grid-column: 1 / -1; }
@media (min-width: 768px) { .footer__about { grid-column: auto; } }
.footer__legal { margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.theme-toggle { appearance: none; border: 1px solid var(--border); background: transparent; color: var(--ink-muted); min-height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-md); font: 500 13px/20px var(--font-sans); cursor: pointer; }
@media (hover: hover) { .theme-toggle:hover { background: var(--hover); color: var(--ink); } }

.center { text-align: center; }
.mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); } .mt-8 { margin-top: var(--space-8); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
