/* Viorta — "Daybreak": cool paper, ultramarine and a sun-yellow halo. Calm and clear.
   Every colour, font and shape comes from the tokens in :root. */

@font-face { font-family: "Figtree"; font-weight: 300 900; font-style: normal; font-display: swap; src: url("../fonts/figtree.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400 900; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk.woff2") format("woff2"); }

:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --sunk: #e7ebf4;
  --line: #d5dbe8;
  --ink: #131a2c;
  --soft: #3b445b;
  --muted: #5a6380;
  --accent: #3a4cf0;
  --accent-hover: #2a3ad8;
  --on-accent: #ffffff;
  --accent-soft: #e2e6ff;
  --link: #2a3ad8;
  --halo: #ffcf5c;

  --band-bg: #131a2c;
  --band-ink: #f3f5fa;
  --band-soft: #b3bbd1;
  --band-icon: #ffcf5c;

  --phone-frame: #131a2c;
  --screen: #04112a;
  --screen-ink: #ffffff;

  --font-head: "Schibsted Grotesk", system-ui, sans-serif;
  --head-weight: 800;
  --head-track: -0.035em;
  --head-leading: 1.0;

  --r-s: 10px;
  --r: 16px;
  --r-l: 28px;
  --r-btn: 999px;
  --lift: 0 1px 2px rgb(19 26 44 / .05), 0 18px 40px -20px rgb(19 26 44 / .22);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 "Figtree", system-ui, sans-serif; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.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; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--r-s); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
[x-cloak] { display: none !important; }
/* Only the inline padding: sections that are also .wrap set their own block padding. */
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-inline: 32px; }
.icon { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.mark { width: 34px; height: auto; fill: currentColor; flex: none; }
.wordmark { width: 92px; height: auto; fill: none; stroke: currentColor; stroke-width: 3.6; }
.brand-sm .mark { width: 28px; }
.brand-sm .wordmark { width: 78px; }

/* ---------- masthead ---------- */
.masthead { border-bottom: 1px solid var(--line); }
.masthead-in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--soft); text-decoration: none; font-weight: 600; font-size: 16px; padding: 8px 14px; border-radius: var(--r-btn); }
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.nav-toggle { display: none; }


/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: var(--r-btn); font-weight: 700; font-size: 17px; text-decoration: none; transition: background-color .15s ease, transform .1s ease; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-quiet { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-quiet:hover { background: var(--sunk); }

/* ---------- product tiles ---------- */
.tile { display: inline-grid; place-items: center; flex: none; background: var(--sunk); color: var(--ink); border-radius: 26%; object-fit: cover; }
.tile-xs { width: 28px; height: 28px; }
.tile-md { width: 56px; height: 56px; }
.tile-xl { width: 120px; height: 120px; }
.tile-site { background: var(--ink); color: var(--bg); }
.tile-site .mark { width: 62%; }

/* ---------- hero ---------- */
.hero { overflow-x: clip; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 88px; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.release { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: var(--r-btn); background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.release:hover { background: var(--sunk); }
.hero h1 { font-size: clamp(42px, 5.6vw, 76px); line-height: var(--head-leading); max-width: 11em; }
.lead { color: var(--soft); font-size: 20px; line-height: 1.55; max-width: 32em; }

/* The memorable thing: the featured release running on a phone, in front of a sun-yellow halo. */
.launcher { position: relative; display: grid; place-items: center; padding: 24px 0; }
.launcher::before { content: ""; position: absolute; width: 112%; aspect-ratio: 1; max-width: 460px; border-radius: 50%; background: var(--halo); }
.phone { position: relative; display: flex; flex-direction: column; width: 300px; aspect-ratio: 9 / 18; padding: 12px; border-radius: 46px; background: var(--phone-frame); box-shadow: var(--lift); text-decoration: none; }
.phone::after { content: ""; position: absolute; inset: 12px; border-radius: 34px; background: var(--screen); }
.phone > * { position: relative; z-index: 1; }
.phone-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px 8px; color: var(--screen-ink); font-size: 13px; font-weight: 700; }
.phone-cam { width: 12px; height: 12px; border-radius: 50%; background: var(--phone-frame); }
.phone-sig { width: 34px; height: 10px; border-radius: 4px; background: currentColor; opacity: .7; }
.phone-screen { width: 100%; }
.phone-home { position: absolute; left: 50%; bottom: 22px; width: 96px; height: 5px; margin-left: -48px; border-radius: 3px; background: var(--screen-ink); opacity: .45; }

/* One orchestrated moment: the app screen rises into the phone on load. */
@media (prefers-reduced-motion: no-preference) {
  .phone-screen { animation: rise .7s cubic-bezier(.2, .8, .3, 1) .15s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- sections ---------- */
.section { padding-top: 88px; padding-bottom: 88px; }
.section.section-tight { padding-top: 16px; }
.sec-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; max-width: 46em; }
.sec-head-row { flex-direction: row; align-items: end; justify-content: space-between; flex-wrap: wrap; max-width: none; }
.sec-head h2, .faq-intro h2, .contact h2, .band h2 { font-size: clamp(32px, 4vw, 48px); }
.sec-head p { color: var(--soft); font-size: 18px; }
.page-head { padding-top: 64px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 16px; }
.page-head h1 { font-size: clamp(40px, 5vw, 64px); }

/* catalog: an index of releases, one row each */
.catalog { border-top: 1px solid var(--line); }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-btn); background: var(--sunk); }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r-btn); color: var(--soft); text-decoration: none; font-weight: 600; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.count { font-size: 13px; opacity: .7; }

.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--lift); overflow: hidden; }
.htmx-request .rows { opacity: .6; }
.empty { padding: 40px 32px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-l); color: var(--soft); }
.empty-title { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); font-size: 24px; color: var(--ink); margin-bottom: 6px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 28px; padding: 20px 28px; }
.row + .row { border-top: 1px solid var(--line); }
.row-main { display: flex; align-items: center; gap: 18px; color: var(--ink); text-decoration: none; min-width: 0; }
.row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-name { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); font-size: 20px; line-height: 1.25; }
.row-main:hover .row-name { text-decoration: underline; text-underline-offset: 4px; }
.row-tagline { color: var(--muted); font-size: 16px; }
.row-links { display: flex; gap: 18px; font-weight: 600; font-size: 15px; }

.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pills li { padding: 2px 10px; border-radius: var(--r-btn); background: var(--sunk); color: var(--soft); font-size: 13px; font-weight: 600; }
.pills .pill-kind { background: var(--accent-soft); color: var(--ink); }

/* band: three promises on an inverted strip */
.band { background: var(--band-bg); color: var(--band-ink); }
.band-in { padding-top: 80px; padding-bottom: 80px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.promises .icon { width: 30px; height: 30px; color: var(--band-icon); margin-bottom: 14px; }
.promises h3 { font-size: 22px; margin-bottom: 8px; }
.promises p { color: var(--band-soft); }

/* ledger: every policy URL in one table */
.ledger-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--lift); overflow: hidden; }
.ledger { width: 100%; border-collapse: collapse; font-size: 16px; }
.ledger th, .ledger td { text-align: left; padding: 16px 24px; vertical-align: middle; }
.ledger thead th { font-size: 14px; font-weight: 600; color: var(--muted); background: var(--sunk); }
.ledger tbody tr + tr { border-top: 1px solid var(--line); }
.ledger tbody th { font-weight: 700; }
.ledger-name { display: inline-flex; align-items: center; gap: 12px; }
.ledger a { font-weight: 600; word-break: break-all; }
.ledger .none { color: var(--muted); }

/* faq */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 48px; }
.faq-intro { display: flex; flex-direction: column; gap: 12px; }
.faq-intro p { color: var(--soft); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 4px; cursor: pointer; list-style: none; font-weight: 700; font-size: 19px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { color: var(--muted); transition: transform .2s ease; }
.faq-list details[open] summary .icon { transform: rotate(180deg); }
.faq-list details p { padding: 0 4px 22px; color: var(--soft); max-width: 40em; }

/* contact */
.contact { border-top: 1px solid var(--line); }
.contact .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.contact p { color: var(--soft); font-size: 19px; max-width: 34em; }
.mail { display: inline-flex; align-items: center; gap: 14px; margin-top: 8px; font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); font-size: clamp(24px, 4vw, 44px); color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 8px; word-break: break-all; }
.mail .icon { color: var(--accent); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-note { color: var(--muted); font-size: 15px; }
.footer-links { display: flex; gap: 20px; margin-left: auto; font-size: 15px; font-weight: 600; }
.footer-links a { color: var(--soft); }

/* ---------- product page ---------- */
.crumbs { display: flex; gap: 10px; padding-top: 28px; color: var(--muted); font-size: 15px; }
.crumbs a { color: var(--soft); font-weight: 600; }
.product-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 40px; }
.product-title { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.product-title h1 { font-size: clamp(34px, 4.6vw, 58px); }
.product-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.product-about { display: flex; flex-direction: column; gap: 16px; }
.product-about h2 { font-size: 26px; }
.product-about h2 + p { color: var(--soft); max-width: 38em; }
.product-about p + h2 { margin-top: 24px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--soft); }
.checks .icon { color: var(--accent); margin-top: 4px; }
.factsheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--lift); padding: 28px; }
.factsheet h2 { font-size: 22px; margin-bottom: 12px; }
.factsheet dl { margin: 0; }
.factsheet dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.factsheet dt { color: var(--muted); }
.factsheet dd { margin: 0; font-weight: 600; text-align: right; }
.fine-links { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; font-weight: 700; }

/* screenshots: the first one large, the rest in a grid, all inside the content width */
.shots { padding-bottom: 96px; }
.shots h2 { font-size: 26px; margin-bottom: 20px; }
.shot-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.shot-grid li:first-child { grid-column: 1 / -1; }
.shot-grid img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); }
.shot-grid li:first-child img { border-radius: var(--r-l); box-shadow: var(--lift); }

/* ---------- legal pages ---------- */
.legal-head { padding: 32px 0 40px; display: flex; flex-direction: column; gap: 10px; }
.legal-head h1 { font-size: clamp(38px, 5vw, 60px); }
.legal-head p { color: var(--muted); }
.legal-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 96px; }
.toc { position: sticky; top: 24px; font-size: 15px; }
.toc-title { font-weight: 700; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.toc a { color: var(--soft); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.prose { max-width: 68ch; color: var(--soft); }
.prose > * + * { margin-top: 1em; }
.prose h2 { color: var(--ink); font-size: 26px; margin-top: 2em; scroll-margin-top: 24px; }
.prose strong { color: var(--ink); }
.prose ul { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose blockquote { margin: 0; padding: 20px 24px; border-radius: var(--r); background: var(--accent-soft); color: var(--ink); border: 1px solid transparent; }

.notfound { padding-bottom: 120px; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 56px; padding-top: 48px; }
  .band-in, .faq { grid-template-columns: 1fr; gap: 28px; }
  .row { grid-template-columns: 1fr; gap: 14px; }
  .product-body, .legal-grid { grid-template-columns: 1fr; gap: 40px; }
  .toc { position: static; }
  .shot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap { padding-inline: 16px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .hero-in { gap: 40px; padding-top: 32px; padding-bottom: 64px; }
  .hero-copy { gap: 24px; }
  .band-in { padding-top: 64px; padding-bottom: 64px; }
  .page-head { padding-top: 40px; }
  .product-head { padding-top: 24px; }
  .footer-in { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-links { margin-left: 0; }
  .masthead-in { gap: 12px; min-height: 64px; }
  .nav-toggle { margin-left: auto; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
  .nav-toggle .icon { width: 22px; height: 22px; }
  .masthead { position: relative; }
  .js .nav { display: none; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; flex-direction: column; padding: 12px 16px 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--lift); }
  .js .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 18px; }
  .wordmark { width: 80px; }
  .promises { grid-template-columns: 1fr; gap: 28px; }
  .row { padding: 18px 20px; }
  .row-main { align-items: flex-start; }
  .empty { padding: 28px 20px; }
  .faq-list summary { padding: 18px 4px; font-size: 17px; }
  .faq-list details p { padding-bottom: 18px; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger th, .ledger td { display: block; }
  .ledger tbody tr { padding: 16px 20px; }
  .ledger th, .ledger td { padding: 4px 0; }
  .ledger td::before { content: attr(data-label); display: block; font-size: 13px; color: var(--muted); }
  .ledger tbody th { padding-bottom: 8px; }
  .product-head { grid-template-columns: 1fr; gap: 20px; }
  .tile-xl { width: 88px; height: 88px; }
  .phone { width: 280px; }
  .factsheet { padding: 24px 20px; }
  .shot-grid { grid-template-columns: 1fr; gap: 12px; }
  .shots, .legal-grid { padding-bottom: 64px; }
  .legal-head { padding: 24px 0 32px; }
  .prose blockquote { padding: 16px 18px; }
  .notfound { padding-bottom: 80px; }
  .lead { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq-list summary .icon { transition: none; }
}
