/* Strathvik site styles
   Midnight palette, follows the device's light or dark setting.
   App-catalogue layout, CSS-only micro-animations (off for reduced motion).
   Self-hosted Inter only. No scripts, no third-party requests. */

/* ---------- Fonts ---------- */

@font-face { font-family: "Inter"; src: url("/fonts/inter-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: clamp(0.90rem, 0.87rem + 0.15vw, 0.97rem);
  --step-0: clamp(1.00rem, 0.96rem + 0.20vw, 1.125rem);
  --step-1: clamp(1.20rem, 1.10rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.35rem, 1.20rem + 0.70vw, 1.75rem);
  --step-3: clamp(1.60rem, 1.35rem + 1.20vw, 2.30rem);
  --step-4: clamp(2.07rem, 1.50rem + 2.80vw, 3.60rem);
  --step-hero: clamp(2.6rem, 1.4rem + 4.6vw, 5.2rem);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --section: clamp(56px, 7vw, 104px);
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  interpolate-size: allow-keywords;

  color-scheme: light;
  --bg: #ffffff;
  --surface: #f7f8f9;
  --surface-2: #eef0f3;
  --border: #e1e4e8;
  --text: #0b0c0e;
  --muted: #555b66;
  --accent: #4a55cf;
  --on-accent: #ffffff;
  --accent-text: #3f4ac2;
  --glow: rgb(74 85 207 / 0.14);
  --edge: rgb(255 255 255 / 0.9);
  --shadow: 0 1px 2px rgb(11 12 14 / 0.06), 0 12px 32px rgb(11 12 14 / 0.08);
  --phone-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #08090a;
    --surface: #101113;
    --surface-2: #17181b;
    --border: #23252a;
    --text: #f7f8f8;
    --muted: #8a8f98;
    --accent: #5e6ad2;
    --on-accent: #ffffff;
    --accent-text: #9aa2f5;
    --glow: rgb(94 106 210 / 0.24);
    --edge: rgb(255 255 255 / 0.06);
    --shadow: 0 0 0 1px rgb(255 255 255 / 0.04), 0 24px 64px rgb(0 0 0 / 0.5);
    --phone-bg: #0c0d0f;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--step-0)/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent-text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; background: var(--accent); color: var(--on-accent); border-radius: 8px; }
.skip:focus { top: 16px; }

.wrap { max-width: 1200px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: var(--step-4); max-width: 18ch; }
h2 { font-size: var(--step-4); max-width: 18ch; }
h3 { font-size: var(--step-1); letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; max-width: 62ch; }
.label { font-size: var(--step--1); font-weight: 600; color: var(--accent-text); letter-spacing: 0.01em; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 38ch; }
.muted { color: var(--muted); }
.fine { font-size: var(--step--1); color: var(--muted); }
.stack { display: grid; gap: 20px; justify-items: start; }

/* Status note: says plainly that the first app isn't out yet */
.note {
  display: grid; justify-items: start; gap: 8px; padding: 16px 18px; max-width: 34rem;
  border: 1px solid color-mix(in oklab, var(--accent-text) 35%, var(--border)); border-radius: var(--radius);
  background: color-mix(in oklab, var(--accent) 6%, var(--bg));
}
.note p { line-height: 1.5; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font: 600 var(--step-0)/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn--block { width: 100%; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); text-decoration: none; }
  .btn--primary:hover { box-shadow: 0 8px 24px var(--glow); }
  .btn--outline:hover { border-color: var(--accent-text); }
}
.btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.08s; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 420px) { .actions .btn { padding: 0 14px; } }

/* ---------- Header ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 92%, transparent); border-bottom: 1px solid transparent;
}
@supports (backdrop-filter: blur(1px)) {
  .nav { background: color-mix(in oklab, var(--bg) 70%, transparent); backdrop-filter: saturate(1.5) blur(16px); }
}
@supports (animation-timeline: scroll()) {
  .nav { animation: nav-edge linear both; animation-timeline: scroll(); animation-range: 0 100px; }
  @keyframes nav-edge { to { border-bottom-color: var(--border); } }
}
@supports not (animation-timeline: scroll()) { .nav { border-bottom-color: var(--border); } }

.nav__in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-text);
  transition: transform 0.4s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.05); }
.brand__mark svg { width: 20px; height: 20px; }
.nav__links { display: flex; gap: 22px; margin-left: auto; font-size: var(--step--1); font-weight: 400; }
.nav__links a { position: relative; color: var(--muted); text-decoration: none; padding-block: 14px; transition: color 0.2s; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; border-radius: 2px;
  background: var(--accent-text); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: var(--step--1); }
.menu-btn { display: none; }
#menu {
  margin: 0; inset: 68px var(--gutter-r) auto auto; width: min(300px, calc(100vw - 32px));
  padding: 8px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
#menu a { display: block; padding: 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 400; }
#menu a:hover { background: var(--surface-2); }
#menu a.menu-cta { color: var(--accent-text); }
@media (max-width: 800px) {
  .nav__links, .nav .btn--primary { display: none; }
  .nav__in { justify-content: space-between; }
  .menu-btn { display: inline-flex; }
}

/* ---------- Home: hero ---------- */

.hero { padding-block: clamp(32px, 4.5vw, 56px) var(--section); overflow: clip; }
.hero h1 { font-size: var(--step-hero); max-width: 13ch; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero__copy { min-width: 0; }
@media (max-width: 880px) { .hero__grid { grid-template-columns: 1fr; } }

.fan-wrap { margin: 0; min-width: 0; }
.fan-wrap figcaption { margin-top: 8px; text-align: center; font-size: var(--step--1); color: var(--muted); }
.fan { position: relative; height: clamp(380px, 46vw, 520px); isolation: isolate; }
.fan::before {
  content: ""; position: absolute; inset: 8% 4%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(10px);
}
.device {
  position: absolute; width: clamp(150px, 15vw, 190px); aspect-ratio: 9 / 19; max-width: 100%;
  padding: 26px 11px 11px; display: flex; flex-direction: column; gap: 7px;
  background: var(--phone-bg); border: 1.5px solid var(--border); border-radius: 30px; box-shadow: var(--shadow);
  font-size: 0.7rem; line-height: 1.3;
}
.device::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 4px; background: var(--border); }
.device--left { left: 0; top: 14%; transform: rotate(-7deg); padding-inline: 14px; }
.device--mid { left: calc(50% - clamp(75px, 7.5vw, 95px)); top: 0; z-index: 2; }
.device--right { right: 0; top: 16%; transform: rotate(6deg); padding-inline: 14px; }
.device .t { font-weight: 700; font-size: 0.95rem; letter-spacing: -0.02em; margin: 2px 2px 4px; }
.row { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: var(--surface-2); }
.row > div { min-width: 0; }
.row b { display: block; font-weight: 600; }
.row span { color: var(--muted); }
.row > div > b, .row > div > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .ok { color: var(--accent-text); }
.pill { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); }
.pill--two { background: linear-gradient(90deg, #c94b4b 50%, #4b6fc9 50%); }
.pill--white { background: #e9ecea; border: 1px solid var(--border); }
.dev { flex: none; width: 18px; height: 18px; color: var(--accent-text); }
.device .foot { margin-top: auto; display: flex; gap: 6px; align-items: center; color: var(--muted); padding: 4px; }
.device .foot svg { width: 12px; height: 12px; color: var(--accent-text); }
@media (max-width: 880px) {
  .fan { height: clamp(330px, 92vw, 460px); max-width: 480px; margin-inline: auto; }
  .device { width: clamp(118px, 33vw, 180px); }
  .device--mid { left: calc(50% - clamp(59px, 16.5vw, 90px)); }
}
/* Small laptops and tablets: the phones are at their narrowest desktop size, so tighten the rows a little */
@media (min-width: 881px) and (max-width: 1100px) {
  .device { font-size: 0.66rem; }
  .device--left, .device--right { padding-inline: 11px; }
  .row { gap: 6px; padding: 7px 6px; }
  .pill, .dev { width: 14px; height: 14px; }
}
/* Narrow phones: smaller type and tighter rows so labels in the side phones fit on one line */
@media (max-width: 560px) {
  .device { padding: 22px 8px 8px; gap: 5px; font-size: 0.62rem; border-radius: 24px; }
  .device--left, .device--right { padding-inline: 9px; }
  .device .t { font-size: 0.82rem; margin-bottom: 2px; }
  .row { gap: 6px; padding: 6px; border-radius: 8px; }
  .pill, .dev { width: 12px; height: 12px; }
  .device .foot { padding: 2px; gap: 4px; }
}
@media (max-width: 400px) {
  .device { font-size: 0.58rem; }
  .row { gap: 5px; padding: 5px; }
  .pill, .dev { width: 10px; height: 10px; }
}

/* ---------- Home: tick list ---------- */

.ticks { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--border); }
.tick { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.tick svg { flex: none; width: 26px; height: 26px; color: var(--accent-text); margin-top: 2px; }
.tick b { display: block; font-weight: 600; margin-bottom: 2px; }
.tick p { color: var(--muted); }
@media (max-width: 1000px) { .ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ticks { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */

.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--edge), transparent); pointer-events: none; }

.catalogue { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 48px; }
@media (max-width: 880px) { .catalogue { grid-template-columns: 1fr; } }
.app__shots { position: relative; display: flex; justify-content: center; gap: 12px; padding: 28px 20px 0; background: var(--surface-2); height: 210px; overflow: hidden; }
.shots__tag { position: absolute; left: 12px; bottom: 12px; z-index: 1; background: var(--surface); }
.mini { width: 110px; flex: none; border: 1.5px solid var(--border); border-bottom: 0; border-radius: 20px 20px 0 0; background: var(--phone-bg); padding: 16px 8px 0; display: grid; align-content: start; gap: 6px; transition: transform 0.45s var(--ease); }
.mini i { display: block; height: 22px; border-radius: 6px; background: var(--surface-2); }
.mini i.a { background: color-mix(in oklab, var(--accent) 30%, var(--surface-2)); }
.mini:nth-child(2) { transform: translateY(-10px); }
@media (hover: hover) {
  .card:hover .mini:nth-child(1) { transform: translateY(-6px) rotate(-2deg); }
  .card:hover .mini:nth-child(3) { transform: translateY(-6px) rotate(2deg); }
}
.app { margin-top: 48px; padding: clamp(24px, 3vw, 40px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px 56px; align-items: start; }
.app__main { display: grid; gap: 16px; }
@media (max-width: 880px) { .app { grid-template-columns: 1fr; } }
.app__head { display: flex; gap: 14px; align-items: center; }
.icon { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.icon svg { width: 28px; height: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 400; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; transition: color 0.2s, border-color 0.2s; }
.chip--dev { color: var(--accent-text); border-color: color-mix(in oklab, var(--accent-text) 40%, var(--border)); background: color-mix(in oklab, var(--accent) 10%, transparent); }
@media (hover: hover) { .chip:hover { border-color: var(--accent-text); color: var(--text); } }
.facts { margin: 0; display: grid; gap: 12px; }
@media (min-width: 881px) { .facts { padding-left: 56px; border-left: 1px solid var(--border); } }
@media (max-width: 880px) { .facts { padding-top: 20px; border-top: 1px solid var(--border); } }
.facts > div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.status { padding: 24px; display: grid; gap: 12px; }
.status dl { margin: 0; display: grid; gap: 14px; }
.status dl > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; }
.status dd { margin: 0; color: var(--muted); font-size: var(--step--1); }

.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 40px; }
.point { padding: 24px; display: grid; gap: 10px; align-content: start; }
.point svg { width: 26px; height: 26px; color: var(--accent-text); }
.point p { color: var(--muted); font-size: var(--step--1); }
.more { margin-top: 20px; font-size: var(--step--1); }

/* ---------- Home: the empty record ---------- */

.record-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px 72px; align-items: center; }
@media (max-width: 880px) { .record-grid { grid-template-columns: 1fr; } }
.record { padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.record__title { font-weight: 600; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.record dl { margin: 0; }
.record dl > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--border); }
.record dt { font-weight: 600; }
.record dd { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; }
.record dd svg { width: 16px; height: 16px; flex: none; }
.record__total { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; font-weight: 600; max-width: none; }
.record__total strong { color: var(--accent-text); }

/* ---------- FAQ: smooth open where supported ---------- */

.faq { margin-top: 32px; border-top: 1px solid var(--border); max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; font-weight: 600; font-size: var(--step-1); letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq .plus { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; transition: transform 0.35s var(--ease), background-color 0.2s; }
.faq .plus svg { width: 14px; height: 14px; color: var(--accent-text); }
.faq details[open] .plus { transform: rotate(45deg); background: var(--surface-2); }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.4s var(--ease), content-visibility 0.4s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq details p { padding-bottom: 22px; color: var(--muted); max-width: 70ch; }
.faq details p:has(+ ul) { padding-bottom: 8px; }
.faq details ul { margin: 0 0 12px; padding-left: 1.25rem; color: var(--muted); max-width: 70ch; }
.faq details li { margin-bottom: 6px; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 48px; align-items: start; }
.faq-grid .faq { margin-top: 0; max-width: none; }
@media (max-width: 880px) { .faq-grid { grid-template-columns: 1fr; } }

/* ---------- Closing band ---------- */

.cta { isolation: isolate; text-align: center; display: grid; justify-items: center; gap: 20px; padding: clamp(40px, 5vw, 64px) 24px; }
.cta::after { content: ""; position: absolute; inset: auto 10% -60% 10%; height: 120%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); }
.cta h2, .cta p { margin-inline: auto; }

/* ---------- Inner pages ---------- */

.page-head { padding-block: clamp(40px, 6vw, 72px) 40px; }
.page-head .meta { font-size: var(--step--1); color: var(--muted); }
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--step-3); max-width: none; margin: 56px 0 16px; scroll-margin-top: 96px; }
.prose h3 { font-size: var(--step-1); margin: 32px 0 8px; }
.prose p, .prose ul, .prose address, .prose .table-scroll { margin-bottom: 16px; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 8px; }
.prose > :first-child { margin-top: 0; }
address { font-style: normal; }

/* About: heading on the left, text on the right, using the full page width */
.split { max-width: none; }
.split > section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px 48px; padding-block: 40px; border-top: 1px solid var(--border); }
.split > section > h2 { margin: 0; }
.split > section > div > :last-child { margin-bottom: 0; }
.split > section > div > :first-child { margin-top: 0; }
@media (max-width: 880px) { .split > section { grid-template-columns: 1fr; padding-block: 32px; } }

.summary { padding: clamp(20px, 3vw, 32px); margin-bottom: 48px; }
.summary h2 { font-size: var(--step-2); margin: 0 0 12px; }
.summary ul { margin: 0; }

.toc { margin: 0 0 16px; padding-left: 1.5rem; columns: 2 16rem; column-gap: 48px; }
.toc li { margin-bottom: 8px; break-inside: avoid; }
.toc a { color: var(--text); display: inline-block; padding-block: 3px; }
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 64px; }
.doc > * { min-width: 0; }
.doc__toc { margin-bottom: 40px; }
.doc__toc-title { font-weight: 600; margin-bottom: 8px; }
@media (min-width: 1000px) {
  .doc { grid-template-columns: 17rem minmax(0, 1fr); }
  .doc__intro { grid-column: 2; grid-row: 1; }
  .doc__body { grid-column: 2; grid-row: 2; }
  .doc__toc { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; margin-bottom: 0; font-size: var(--step--1); }
  .doc__toc .toc { columns: auto; margin: 0; padding-left: 2.1rem; }
}

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 32rem; font-size: var(--step--1); }
th, td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--border); }
th { font-weight: 600; }
thead th { border-bottom-color: var(--text); }

.contact-list { margin: 0 0 48px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.contact-list > div { padding: 24px; }
.contact-list dt { color: var(--muted); font-size: var(--step--1); }
.contact-list dd { margin: 8px 0 0; font-size: var(--step-1); font-weight: 600; overflow-wrap: anywhere; }

.notfound { padding-block: clamp(64px, 12vw, 160px) 64px; }
.notfound .code { font-size: clamp(4rem, 2rem + 10vw, 9rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1; color: var(--accent-text); }
.notfound ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 8px; }


/* ---------- Footer ---------- */

footer { border-top: 1px solid var(--border); padding-block: 64px 40px; margin-top: var(--section); color: var(--muted); font-size: var(--step--1); }
.foot { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot__title { color: var(--text); font-weight: 600; margin-bottom: 6px; }
.foot__about p { margin-top: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.foot a { color: var(--muted); text-decoration: none; transition: color 0.2s; display: inline-block; padding-block: 6px; }
.legal a { color: var(--muted); display: inline-block; padding-block: 6px; }
.foot a:hover { color: var(--text); }
.foot .brand { color: var(--text); display: flex; padding-block: 0; }
.legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); display: grid; gap: 4px; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

/* ---------- Back to top ---------- */

.totop {
  position: fixed; z-index: 40;
  right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.totop svg { width: 18px; height: 18px; }
@media (hover: hover) { .totop:hover { transform: translateY(-3px); border-color: var(--accent-text); } }
@media (max-width: 800px) { .totop { display: none; } }
@supports (animation-timeline: scroll()) {
  .totop { animation: totop-show linear both; animation-timeline: scroll(); animation-range: 300px 500px; }
  @keyframes totop-show { from { opacity: 0; visibility: hidden; translate: 0 12px; } to { opacity: 1; visibility: visible; translate: 0 0; } }
}

/* ---------- Motion (progressive enhancement; everything is visible without it) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > *, .page-head > * { animation: rise 0.9s var(--ease) both; }
  .hero__copy > :nth-child(2), .page-head > :nth-child(2) { animation-delay: 70ms; }
  .hero__copy > :nth-child(3), .page-head > :nth-child(3) { animation-delay: 140ms; }
  .hero__copy > :nth-child(4), .page-head > :nth-child(4) { animation-delay: 210ms; }
  .hero__copy > :nth-child(5) { animation-delay: 280ms; }
  .device--left { animation: in-left 1.1s var(--ease) 0.25s both; }
  .device--mid { animation: rise 1.1s var(--ease) 0.15s both; }
  .device--right { animation: in-right 1.1s var(--ease) 0.35s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes in-left { from { opacity: 0; transform: translate(24px, 24px) rotate(0deg); } }
  @keyframes in-right { from { opacity: 0; transform: translate(-24px, 24px) rotate(0deg); } }

  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(26px); } }
    .draw :is(path, circle, rect) { stroke-dasharray: 100; animation: draw linear both; animation-timeline: view(); animation-range: entry 10% entry 80%; }
    @keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
    .drift-a { animation: drift-a linear both; animation-timeline: scroll(); animation-range: 0 600px; }
    .drift-b { animation: drift-b linear both; animation-timeline: scroll(); animation-range: 0 600px; }
    @keyframes drift-a { to { translate: 0 -36px; } }
    @keyframes drift-b { to { translate: 0 -16px; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .nav, .skip, .fan, .totop, .actions { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- App page ---------- */

.app-hero h1 { max-width: 12ch; }
.feature svg { flex: none; width: 26px; height: 26px; color: var(--accent-text); margin-top: 2px; }
.app__more { font-weight: 600; }
@media (min-width: 881px) { .facts--plain { padding-left: 0; border-left: 0; } }
@media (max-width: 880px) { .facts--plain { padding-top: 0; border-top: 0; } }
.facts--plain { margin-bottom: 20px; }
