/* Glova AI: the website (glovaai.com) and the app's own site (downloads.glovaai.com, which gets a copy).
   One stylesheet, no inline styles (the Content-Security-Policy forbids them). Every page is whole without the
   script; the script only adds motion, and never with reduced motion. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --paper: #f5f7f6;
  --ink: #0e1817;
  --ink-2: #3a4745;
  --muted: #5f6b69;
  --line: #e2e8e6;
  --teal: #0b8f84;
  --teal-ink: #0a7469;
  --teal-btn: #0a7c72;
  --teal-btn-hover: #08695f;
  --night: #0a1615;
  --on-night: #eaf2f1;
  --on-night-2: #b2c2bf;
  --on-night-3: #85968f;
  --night-line: rgba(234, 242, 241, 0.12);
  --teal-on-night: #5fd3c6;
  --ghost: #c3ccca;
  --wrap: 1180px;
  --header: 68px;
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--teal-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-btn-hover); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.4vw, 72px); line-height: 1.03; letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -0.03em; }
h3 { font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
.num { font-variant-numeric: tabular-nums; }

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

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--night); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.site-header.scrolled { border-bottom-color: var(--night-line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand img { width: 28px; height: 28px; }
.site-header .brand, .site-header .brand:hover { color: var(--on-night); }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { color: var(--on-night-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 11px; border-radius: 6px; transition: color 0.15s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--on-night); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--teal-on-night); text-underline-offset: 8px; text-decoration-thickness: 2px; }
@media (max-width: 760px) {
  .site-header { position: static; }
  .site-header .wrap { flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; padding-bottom: 10px; }
  .site-header .btn { margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0 -10px; overflow-x: auto; }
  .nav a { white-space: nowrap; padding: 6px 10px; }
}

/* ---------- buttons and links that act like them ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 8px; font: 600 16px/1 var(--font); text-decoration: none; border: 1px solid transparent; white-space: nowrap; transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.btn-primary { background: var(--teal-btn); color: #fff; }
.btn-primary:hover { background: var(--teal-btn-hover); color: #fff; }
.btn-sm { min-height: 38px; padding: 0 15px; font-size: 15px; }
.go { font-weight: 600; text-decoration: none; white-space: nowrap; }
.go::after { content: " \2192"; display: inline-block; transition: transform 0.15s var(--ease); }
.go:hover::after { transform: translateX(3px); }
.actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 32px; }

/* =====================================================================================================
   Home: one request across the network. The globe stays on the right (the stage) while the story scrolls
   past on the left: the hero, then four beats. The script turns the scroll into what the globe shows.
   ===================================================================================================== */
.scene { background: var(--night); color: var(--on-night); overflow: clip; }
.scene a:not(.btn) { color: var(--teal-on-night); }
.scene-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 40px; }
.stage { position: sticky; top: var(--header); height: calc(100svh - var(--header)); display: grid; place-items: center; }
.stage canvas, .stage img { width: min(112%, calc(100svh - var(--header) - 12px)); max-width: none; aspect-ratio: 1; height: auto; }
canvas.globe { touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
canvas.globe.grab { cursor: grab; }
canvas.globe.grabbing { cursor: grabbing; }

.hero { min-height: calc(100svh - var(--header)); display: flex; flex-direction: column; justify-content: center; padding: 56px 0 72px; }
.hero h1 { color: var(--on-night); max-width: 12.5em; }
.hero .sub { margin-top: 26px; max-width: 31em; color: var(--on-night-2); font-size: 19px; line-height: 1.55; }
.models-line { margin-top: 44px; max-width: 34em; color: var(--on-night-3); font: 13px/1.8 var(--mono); }
.models-line b { color: var(--on-night-2); font-weight: 500; }

.beat { min-height: 92svh; display: flex; flex-direction: column; justify-content: center; padding: 48px 0; max-width: 29em; }
.beat h2 { color: var(--on-night); font-size: clamp(28px, 3vw, 40px); }
.beat p { margin-top: 16px; color: var(--on-night-2); font-size: 18px; }
.beat .source { margin-top: 14px; color: var(--on-night-3); font-size: 14px; }
.motion .beat { opacity: 0.3; transition: opacity 0.35s var(--ease); }
.motion .beat.on { opacity: 1; }

/* the bill for the example, written out as it scrolls into view (the script moves --r from 0 to 1) */
.receipt { margin-top: 26px; font: 14px/1.6 var(--mono); color: var(--on-night-2); }
.receipt .what { color: var(--on-night-3); font: 13px/1.5 var(--font); margin-bottom: 10px; }
.receipt .row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5em 7.5em; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--night-line); }
.receipt .row span:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
.receipt .head { color: var(--on-night-3); font-size: 12px; }
.receipt .us { color: var(--on-night); }
.receipt .total { color: var(--on-night); font-weight: 600; border-bottom: 0; }
.receipt .total .us { color: var(--teal-on-night); }
.receipt .saving { margin-top: 14px; color: var(--on-night); font: 600 20px/1.3 var(--font); letter-spacing: -0.01em; }
.motion .receipt .row:nth-child(3) { clip-path: inset(0 calc((1 - clamp(0, var(--r, 1) * 5 - 0, 1)) * 100%) 0 0); }
.motion .receipt .row:nth-child(4) { clip-path: inset(0 calc((1 - clamp(0, var(--r, 1) * 5 - 1, 1)) * 100%) 0 0); }
.motion .receipt .row:nth-child(5) { clip-path: inset(0 calc((1 - clamp(0, var(--r, 1) * 5 - 2, 1)) * 100%) 0 0); }
.motion .receipt .saving { opacity: clamp(0, var(--r, 1) * 5 - 3, 1); }

@media (max-width: 900px) {
  .scene-grid { grid-template-columns: 1fr; gap: 0; }
  .stage { order: -1; top: 0; z-index: 1; height: 44svh; background: var(--night); border-bottom: 1px solid var(--night-line); }
  .stage canvas, .stage img { width: auto; height: calc(44svh - 16px); }
  .hero { min-height: 0; padding: 32px 0 40px; }
  .beat { min-height: 70svh; padding: 32px 0; }
}
@media (min-width: 761px) and (max-width: 900px) { .stage { top: var(--header); } }
@media (prefers-reduced-motion: reduce) {
  .stage { position: static; height: auto; padding: 24px 0; }
  .stage canvas, .stage img { width: min(100%, 520px); height: auto; }
  .beat { min-height: 0; padding: 40px 0; }
}

/* ---------- sections below the scene ---------- */
.section { padding: 128px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-paper { background: var(--paper); }
.lead { margin-top: 18px; color: var(--ink-2); font-size: 19px; line-height: 1.55; max-width: 34em; }
.note { margin-top: 18px; color: var(--muted); font-size: 15px; max-width: 46em; }
@media (max-width: 760px) { .section { padding: 84px 0; } }

/* change one line */
.oneline { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 64px; align-items: start; }
.facts { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 16px; }
.facts code { color: var(--ink); }
.code { background: var(--night); color: #d9e5e3; border-radius: 10px; overflow: hidden; }
.code-bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid #1b302d; }
.code-bar .lang { color: var(--on-night-2); font: 500 13px/1 var(--font); padding: 8px 10px; }
.tabs { display: flex; gap: 2px; }
.tabs button, .copy { font: 500 13px/1 var(--font); color: var(--on-night-3); background: none; border: 0; padding: 9px 11px; border-radius: 6px; cursor: pointer; transition: color 0.15s var(--ease), background-color 0.15s var(--ease); }
.tabs button:hover, .copy:hover { color: var(--on-night); }
.tabs button[aria-selected="true"] { color: var(--on-night); background: rgba(234, 242, 241, 0.08); }
.copy { margin-left: auto; }
.code pre { margin: 0; padding: 20px 0 24px; overflow-x: auto; font: 14px/1.75 var(--mono); tab-size: 4; }
.code pre > code { display: block; font-size: 1em; }
.code .ln { display: block; padding: 0 22px 0 34px; position: relative; white-space: pre; }
.code .ln.del { background: rgba(214, 102, 90, 0.12); color: #c9a19b; text-decoration: line-through; text-decoration-color: rgba(214, 102, 90, 0.6); }
.code .ln.add { background: rgba(95, 211, 198, 0.12); color: #eafaf7; }
.code .ln.del::before, .code .ln.add::before { position: absolute; left: 14px; text-decoration: none; }
.code .ln.del::before { content: "\2212"; color: #d6665a; }
.code .ln.add::before { content: "+"; color: var(--teal-on-night); }
.code .k { color: #f2f6f5; font-weight: 600; }
.code .s { color: #8adbd1; }
.code .c { color: #7f9692; }
@media (max-width: 900px) { .oneline { grid-template-columns: 1fr; gap: 36px; } }

/* the price ledger: each bar slides from the typical provider's price down to ours */
.ledger { margin-top: 48px; border-top: 1px solid var(--ink); }
.ledger .row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2.2fr) minmax(0, 0.7fr); gap: 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ledger .row.head { padding: 12px 0; color: var(--muted); font-size: 13px; }
.ledger .row.head span:last-child { text-align: right; }
.ledger .model { font-weight: 600; }
.ledger .model small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.ledger .input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.ledger .prices { font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger .prices b { color: var(--ink); font-weight: 600; }
.ledger .saving { text-align: right; font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
.bar { position: relative; height: 10px; }
.bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--them); border: 1px dashed var(--ghost); border-radius: 2px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--us); background: var(--teal); border-radius: 0 3px 3px 0; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .bar i { animation: down linear both; animation-timeline: view(); animation-range: entry 15% cover 45%; }
  }
}
@keyframes down { from { width: var(--them); background: var(--ghost); } to { width: var(--us); background: var(--teal); } }
/* each model's bar lengths, as a share of $0.15 (the stylesheet holds them: no inline styles) */
.m-llama   { --us: 13.2%; --them: 90%; }
.m-qwen9   { --us: 16%;   --them: 66.7%; }
.m-gemma12 { --us: 11.3%; --them: 41.7%; }
.m-qwen14  { --us: 13.5%; --them: 96.7%; }
.m-oss20   { --us: 11.3%; --them: 20%; }
.m-mistral { --us: 32.5%; --them: 50%; }
.m-gemma27 { --us: 35.3%; --them: 53.3%; }
.m-qwen30  { --us: 11.9%; --them: 63.3%; }
.m-qwen32  { --us: 41.5%; --them: 80%; }
.m-oss120  { --us: 12%;   --them: 66.7%; }
@media (max-width: 760px) {
  .ledger .row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; grid-auto-flow: row dense; }
  .ledger .row .input { grid-column: 1 / -1; }
  .ledger .row.head { display: none; }
}

/* the full ledger (pricing page) */
.table-box { margin-top: 44px; overflow-x: auto; border-top: 1px solid var(--ink); }
table.full { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.full th, .full td { padding: 14px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.full th:first-child, .full td:first-child { text-align: left; padding-left: 0; }
.full td:last-child, .full th:last-child { padding-right: 0; }
.full thead th { color: var(--muted); font-weight: 500; font-size: 13px; vertical-align: bottom; white-space: normal; }
.full thead tr.group th { color: var(--ink); font-weight: 600; font-size: 14px; border-bottom: 0; padding-bottom: 0; }
.full .model { font-weight: 600; }
.full .model small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.full .them { color: var(--muted); }
.full .saving { font-weight: 600; }
.full .split { border-left: 1px solid var(--line); }
@media (max-width: 760px) {
  table.full, .full tbody, .full tr, .full td { display: block; }
  .full thead { display: none; }
  .full tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .full td { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border: 0; text-align: right; }
  .full td::before { content: attr(data-label); color: var(--muted); text-align: left; }
  .full td.model { display: block; text-align: left; padding-bottom: 8px; }
  .full td.model::before { content: none; }
  .full .split { border-left: 0; }
}

/* the worked example and notes */
.example { margin-top: 72px; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.receipt-light { font: 14px/1.6 var(--mono); }
.receipt-light .row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5em 7.5em; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.receipt-light .row span:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
.receipt-light .head { color: var(--muted); font-size: 12px; }
.receipt-light .total { color: var(--ink); font-weight: 600; border-bottom: 0; }
.receipt-light .total span:nth-child(2) { color: var(--teal-ink); }
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin-top: 72px; }
.notes > div { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.notes p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.notes p + p { margin-top: 10px; }
.notes ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 16px; }
.notes li { margin-bottom: 6px; }
@media (max-width: 760px) { .notes { grid-template-columns: 1fr; } .example { grid-template-columns: 1fr; gap: 28px; } }

/* lend yours */
.lend { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 64px; align-items: center; }
.lend h2 { max-width: 17em; }
.lend-figure { background: var(--night); border-radius: 50%; padding: 22px; width: 100%; max-width: 300px; justify-self: end; }
@media (max-width: 760px) { .lend { grid-template-columns: 1fr; gap: 32px; } .lend-figure { justify-self: start; max-width: 200px; order: -1; } }

/* ---------- inner pages ---------- */
.page-head { padding: 88px 0 8px; }
.page-head h1 { font-size: clamp(36px, 4.6vw, 60px); max-width: 15em; }
.page-head .lead { font-size: 20px; }
.page-head + .section, .page-head + section { padding-top: 48px; }
.release { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 22px; color: var(--muted); font-size: 15px; }
.release b { color: var(--ink); font-weight: 600; }

/* downloads: first whether it'll work, then the download for your system */
.needs { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--ink); }
.needs > div { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.needs h3 { font-size: 15px; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.needs p { margin-top: 6px; color: var(--ink); font-size: 16px; }
@media (max-width: 760px) { .needs { grid-template-columns: 1fr; } }
.systems { margin-top: 56px; }
.system { border-top: 1px solid var(--line); }
.system:last-child { border-bottom: 1px solid var(--line); }
.system > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 20px 0; font-weight: 600; font-size: 19px; }
.system > summary::-webkit-details-marker { display: none; }
.system > summary svg { width: 24px; height: 24px; color: var(--ink); }
.system > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-weight: 400; font-size: 24px; }
.system[open] > summary::after { content: "\2212"; }
.system .yours-tag { display: none; color: var(--teal-ink); font-size: 14px; font-weight: 500; }
.system.yours .yours-tag { display: inline; }
.system .body { padding: 0 0 30px 36px; }
.system ol { margin: 18px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 16px; display: grid; gap: 8px; max-width: 46em; }
.system code { background: var(--paper); padding: 1px 6px; border-radius: 4px; color: var(--ink); white-space: nowrap; }
.system.yours { border-top: 2px solid var(--teal); }
@media (max-width: 760px) { .system .body { padding-left: 0; } }
.history { margin-top: 96px; max-width: 46em; }
.history h3 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.025em; margin-bottom: 18px; scroll-margin-top: 96px; }
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 16px 0; border-top: 1px solid var(--line); }
.news .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.news .when { color: var(--muted); font-size: 14px; margin-left: 10px; }
.news p { margin-top: 4px; color: var(--ink-2); font-size: 16px; }
.history details { border-top: 1px solid var(--line); }
.history summary { cursor: pointer; color: var(--teal-ink); font-weight: 600; padding: 14px 0; }
.small { color: var(--muted); font-size: 15px; margin-top: 10px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.site-footer .sign-off { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); max-width: 13em; margin-top: 20px; }
.site-footer h2 { font-size: 14px; letter-spacing: 0; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.site-footer ul a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 16px; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* 404 */
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.center .actions { justify-content: center; }
