/* proptrac.no
 *
 * Two grounds: paper (warm off-white, ink type) for reading, and night (the
 * application's own near-black, mint accent) for the chapters that show the
 * product working. A section says which with data-theme="night"; the header
 * reads the section under it and follows.
 *
 * Motion lives in site.js. Here: the resting and the revealed state of what
 * moves, and the reduced-motion fallback, which is simply the revealed one.
 */

@font-face { font-family: 'Geist'; src: url('/static/fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/static/fonts/geist-mono.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #f3f2ec;
  --paper-2: #e9e8e0;
  --ink: #111410;
  --ink-2: #2b2f29;
  --muted: #62675f;
  --line: rgba(17, 20, 16, 0.12);
  --line-strong: rgba(17, 20, 16, 0.28);
  --sage: #bcc0ae;

  --night: #0a0d12;
  --night-2: #111820;
  --night-3: #18212c;
  --night-text: #e4eaf1;
  --night-muted: #8c98a8;
  --night-line: rgba(228, 234, 241, 0.12);

  --accent: #34d399;
  --accent-ink: #00795b;
  --coral: #f87171;

  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-sharp: cubic-bezier(0.625, 0.05, 0, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --nav-h: 72px;

  --fg: var(--ink);
  --fg-muted: var(--muted);
  --bg: var(--paper);
  --rule: var(--line);
}

[data-theme='night'] {
  --fg: var(--night-text);
  --fg-muted: var(--night-muted);
  --bg: var(--night);
  --rule: var(--night-line);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  font-feature-settings: 'ss01', 'tnum' 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--night); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 14px; background: var(--ink); color: var(--paper); }

section, .band { position: relative; background: var(--bg); color: var(--fg); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Type ─────────────────────────────────────────────────────────────── */

.label {
  font: 500 11px/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 18px;
  display: flex; gap: 10px; align-items: center;
}
.label b { color: var(--fg); font-weight: 500; }
.label .dash { width: 28px; height: 1px; background: currentColor; opacity: 0.6; }

.display {
  font-size: clamp(44px, 8.4vw, 132px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 300;
}
.display strong, .h2 strong, .h1 strong { font-weight: 600; }
.h1 { font-size: clamp(42px, 6.6vw, 104px); font-weight: 300; letter-spacing: -0.045em; line-height: 0.96; }
.h2 { font-size: clamp(34px, 4.6vw, 68px); font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--fg-muted); max-width: 36em; }
.figure { font-family: var(--font); font-weight: 300; letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; }
.mono { font-family: var(--mono); }
em { font-style: normal; color: var(--fg-muted); }

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  --h: 46px;
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  height: var(--h); padding: 0 20px;
  border-radius: 999px;
  font: 500 15px/1 var(--font);
  letter-spacing: -0.01em;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease-out), border-color 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 0.6s var(--ease-out); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.6s var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn-solid { background: var(--fg); color: var(--bg); }
.btn-solid::before { background: var(--accent); }
.btn-solid:hover { color: var(--night); }
.btn-accent { background: var(--accent); color: var(--night); }
.btn-accent::before { background: var(--night-text); }
.btn-line { border: 1px solid var(--rule); color: var(--fg); }
[data-theme='night'] .btn-line { border-color: rgba(228, 234, 241, 0.28); }
.btn-line::before { background: var(--fg); }
.btn-line:hover { color: var(--bg); border-color: var(--fg); }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; border-bottom: 1px solid var(--rule); padding-bottom: 4px; transition: border-color 0.4s var(--ease-out); }
.link-arrow:hover { border-color: var(--fg); }
.link-arrow svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ── Header ───────────────────────────────────────────────────────────── */

.nav {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  color: var(--ink);
  transition: transform 0.7s var(--ease-out), color 0.4s, background-color 0.4s;
}
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  opacity: 0; transition: opacity 0.4s;
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-night { color: var(--night-text); }
.nav.is-night::before { background: color-mix(in srgb, var(--night) 72%, transparent); border-color: var(--night-line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav.is-night .btn-solid { background: var(--night-text); color: var(--night); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -0.03em; }
.brand b { font-weight: 650; }
.brand span { font-weight: 300; }
.brand-mark { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.brand-mark path:nth-child(2) { stroke: var(--accent); }

.nav-links { display: flex; gap: 30px; font-size: 15px; }
.nav-links { align-items: center; }
.nav-links > a, .nav-item > a { position: relative; display: block; height: 1.3em; overflow: hidden; line-height: 1.3; }
.nav-links > a span, .nav-item > a span { display: block; transition: transform 0.6s var(--ease-out); }
.nav-links > a:hover span, .nav-item > a:hover span { transform: translateY(-100%); }
.nav-links > a[aria-current='page'] span:first-child::after, .nav-item > a[aria-current='page'] span:first-child::after { content: ''; display: inline-block; width: 5px; height: 5px; margin-left: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }

/* The product menu: opens under "Produkt" on hover or keyboard focus, always on paper. */
.nav-item { position: relative; }
.nav-item > a { padding-right: 15px; }
.nav-item::after { content: ''; position: absolute; right: 1px; top: 50%; width: 5px; height: 5px; margin-top: -4px; border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor; transform: rotate(45deg); opacity: 0.55; pointer-events: none; transition: transform 0.3s var(--ease-out); }
.nav-item:hover::after, .nav-item:focus-within::after { transform: translateY(2px) rotate(225deg); }
.drop { position: absolute; top: 100%; left: -24px; padding-top: 22px; transform: translateY(8px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s, transform 0.35s var(--ease-out), visibility 0.25s; }
.nav-item:hover .drop, .nav-item:focus-within .drop { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.drop-panel { width: min(640px, calc(100vw - 2 * var(--gutter))); padding: 10px; border-radius: 14px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 24px 60px -24px rgba(10, 13, 18, 0.35); }
.drop-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.drop-list a { display: block; padding: 12px 14px; border-radius: 9px; transition: background-color 0.2s; }
.drop-list a:hover, .drop-list a:focus-visible { background: var(--paper-2); }
.drop-list b { display: block; font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; }
.drop-list a[aria-current='page'] b::after { content: ''; display: inline-block; width: 5px; height: 5px; margin-left: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.drop-list span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.drop-all { display: flex; align-items: center; justify-content: space-between; margin: 6px 4px 2px; padding: 12px 10px 4px; border-top: 1px solid var(--line); font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.drop-all svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.nav-end { display: flex; align-items: center; gap: 18px; }
.nav-login { font-size: 15px; }
.nav-cta { --h: 40px; padding: 0 16px; font-size: 14px; }
.lang { display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--mono); letter-spacing: 0.1em; }
.lang span { opacity: 0.45; transition: opacity 0.3s; }
.lang span.on { opacity: 1; }
.lang i { width: 1px; height: 10px; background: currentColor; opacity: 0.3; }
.lang:hover span { opacity: 1; }

.menu-btn { display: none; width: 40px; height: 40px; position: relative; }
.menu-btn i { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform 0.6s var(--ease-out); }
.menu-btn i:nth-of-type(1) { top: 16px; }
.menu-btn i:nth-of-type(2) { top: 23px; }
.menu-open .menu-btn i:nth-of-type(1) { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-btn i:nth-of-type(2) { transform: translateY(-3.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--night); color: var(--night-text);
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.9s var(--ease-sharp);
}
.menu[hidden] { display: flex; visibility: hidden; }
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; }
.menu nav a { display: flex; align-items: baseline; gap: 14px; font-size: clamp(38px, 10vw, 64px); font-weight: 300; letter-spacing: -0.04em; line-height: 1.15; opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease-sharp), transform 0.8s var(--ease-sharp); transition-delay: calc(0.15s + var(--i) * 0.06s); }
.menu nav a small { font: 500 11px var(--mono); color: var(--night-muted); letter-spacing: 0.1em; }
.menu-open .menu nav a { opacity: 1; transform: none; }
.menu { overflow-y: auto; }
.menu .menu-sub { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 14px 34px; opacity: 0; transition: opacity 0.8s var(--ease-sharp); transition-delay: calc(0.3s + var(--i) * 0.06s); }
.menu .menu-sub a { display: inline; font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--night-muted); opacity: 1; transform: none; transition: color 0.2s; }
.menu .menu-sub a:hover { color: var(--night-text); }
.menu-open .menu .menu-sub { opacity: 1; }
.menu-foot { display: flex; gap: 12px; flex-wrap: wrap; }
.menu-open .nav { color: var(--night-text); }
.menu-open .nav::before { opacity: 0; }

@media (max-width: 1000px) {
  .nav-links, .nav-login { display: none; }
  .menu-btn { display: block; }
}
@media (max-width: 560px) {
  .nav-cta { display: none; }
}

/* ── Reveal primitives ────────────────────────────────────────────────── */

.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 1s var(--ease-sharp), transform 1.1s var(--ease-sharp); transition-delay: var(--d, 0s); }

/* Split headlines: each line sits in a mask and rises into it. */
.line-mask { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line-inner { display: block; }
.js [data-split] .line-inner { transform: translateY(105%); }
.js [data-split].is-in .line-inner { transform: none; transition: transform 1.2s var(--ease-sharp); transition-delay: calc(var(--l, 0) * 0.08s + var(--d, 0s)); }

/* Scroll-lit text: words dim until the reading position passes them. */
.lit .w { opacity: 0.16; transition: opacity 0.25s linear; }
.lit .w.on { opacity: 1; }
.lit .w.hl { color: var(--accent-ink); }
[data-theme='night'] .lit .w.hl { color: var(--accent); }

/* Ink: an SVG path drawn when it enters the view. pathLength="1" on each. */
.js [data-ink] path, .js [data-ink] line, .js [data-ink] polyline, .js [data-ink] circle.ink, .js [data-ink] rect.ink { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js [data-ink].is-in path, .js [data-ink].is-in line, .js [data-ink].is-in polyline, .js [data-ink].is-in circle.ink, .js [data-ink].is-in rect.ink { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s var(--ease-out); transition-delay: calc(var(--k, 0) * 0.06s); }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--nav-h) + 40px) 0 0;
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 20% 100%, rgba(10, 13, 18, 0.9), rgba(10, 13, 18, 0.2) 60%, rgba(10, 13, 18, 0) 100%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; }
.hero-title { margin: 0 0 32px; max-width: 13ch; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; padding-bottom: 48px; }
.hero-row .lede { margin: 0; color: var(--night-muted); max-width: 32em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-ticker {
  position: relative; z-index: 2;
  border-top: 1px solid var(--night-line);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.hero-ticker div { padding: 18px var(--gutter); border-right: 1px solid var(--night-line); }
.hero-ticker div:last-child { border-right: 0; }
.hero-ticker b { display: block; font: 300 clamp(22px, 2.4vw, 34px)/1.1 var(--font); letter-spacing: -0.03em; color: var(--night-text); font-variant-numeric: tabular-nums; }
.hero-ticker span { font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--night-muted); }
.hero-coord { position: absolute; z-index: 2; right: var(--gutter); top: calc(var(--nav-h) + 24px); text-align: right; font: 500 11px/1.6 var(--mono); letter-spacing: 0.08em; color: var(--night-muted); }
.hero-coord b { color: var(--accent); font-weight: 500; }
@media (max-width: 800px) {
  .hero-row { grid-template-columns: 1fr; }
  .hero-ticker { grid-template-columns: repeat(2, 1fr); }
  .hero-ticker div:nth-child(2) { border-right: 0; }
  .hero-ticker div:nth-child(-n+2) { border-bottom: 1px solid var(--night-line); }
  .hero-coord { display: none; }
}

/* ── Manifesto ────────────────────────────────────────────────────────── */

.manifesto { padding: clamp(120px, 18vw, 240px) 0; }
.manifesto-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.manifesto-text { font-size: clamp(28px, 3.7vw, 56px); font-weight: 400; letter-spacing: -0.035em; line-height: 1.12; margin: 0; }
@media (max-width: 800px) { .manifesto-grid { grid-template-columns: 1fr; gap: 0; } }

/* ── Build: the registers wired into one dossier (pinned, scrubbed) ──── */

.build { height: 420vh; }
.build-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(260px, 0.36fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); padding: calc(var(--nav-h) + 24px) var(--gutter) 32px; max-width: 1600px; margin: 0 auto; }
.build-copy { display: flex; flex-direction: column; justify-content: space-between; min-height: 0; }
.build-steps { list-style: none; padding: 0; margin: 28px 0 0; position: relative; }
.build-steps li { position: relative; padding: 12px 0 12px 44px; color: var(--night-muted); transition: color 0.4s; }
.build-steps li small { position: absolute; left: 0; top: 15px; font: 500 11px var(--mono); letter-spacing: 0.1em; }
.build-steps li b { display: block; font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.build-steps li p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.7s var(--ease-out), opacity 0.5s; }
.build-steps li.on { color: var(--night-text); }
.build-steps li.on small { color: var(--accent); }
.build-steps li.on p { max-height: 14em; opacity: 1; color: var(--night-muted); }
.build-rail { position: absolute; left: 14px; top: 12px; bottom: 12px; width: 1px; background: var(--night-line); }
.build-rail i { position: absolute; inset: 0; background: var(--accent); transform-origin: top; transform: scaleY(0); }
.build-status { font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--night-muted); display: flex; align-items: center; gap: 10px; }
.build-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--night-muted); }
.build[data-state='done'] .build-status { color: var(--accent); }
.build[data-state='done'] .build-status::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
.build-figure { position: relative; min-height: 0; border: 1px solid var(--night-line); border-radius: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 30%), var(--night); overflow: hidden; }
.build-figure::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(228, 234, 241, 0.07) 1px, transparent 1px); background-size: 22px 22px; }
.build-figure svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.build-head { position: absolute; z-index: 2; top: 16px; left: 20px; right: 20px; display: flex; justify-content: space-between; font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--night-muted); }

/* SVG parts of the build figure. */
.bf-src rect { fill: var(--night-2); stroke: var(--night-line); }
.bf-src text { fill: var(--night-muted); font: 500 13px var(--font); letter-spacing: -0.01em; }
.bf-src .kind { font: 500 9px var(--mono); letter-spacing: 0.12em; fill: #5e6b7c; }
.bf-src.on rect { stroke: rgba(52, 211, 153, 0.55); }
.bf-src.on text { fill: var(--night-text); }
.bf-src .dot { fill: #3a4656; }
.bf-src.on .dot { fill: var(--accent); }
.bf-wire { fill: none; stroke: var(--accent); stroke-width: 1.25; opacity: 0.85; }
.bf-wire-base { fill: none; stroke: rgba(228, 234, 241, 0.08); stroke-width: 1; }
.bf-packet { fill: var(--accent); }
.bf-card > rect { fill: var(--night-2); stroke: rgba(228, 234, 241, 0.16); }
.bf-card .t { fill: var(--night-text); font: 500 17px var(--font); letter-spacing: -0.02em; }
.bf-card .s { fill: var(--night-muted); font: 500 9.5px var(--mono); letter-spacing: 0.12em; }
.bf-row text { font: 400 12.5px var(--font); }
.bf-row .k { fill: var(--night-muted); }
.bf-row .v { fill: var(--night-text); font-weight: 500; }
.bf-row .v.ok { fill: var(--accent); }
.bf-row .v.warn { fill: #fbbf24; }
.bf-row line { stroke: rgba(228, 234, 241, 0.08); }
.bf-row .ph { fill: rgba(228, 234, 241, 0.07); }
.bf-score text { fill: var(--night-text); font: 300 34px var(--font); }

@media (max-width: 900px) {
  .build { height: 360vh; }
  .build-stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
  .build-steps li { padding: 6px 0 6px 40px; }
  .build-steps li:not(.on) { display: none; }
  .build-copy .h2 { font-size: 30px; }
  .build-rail { display: none; }
  .build-head { display: none; }
}

/* ── Norway: every address as a dot (pinned) ─────────────────────────── */

.country { height: 300vh; }
.country-stage { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px; padding: var(--nav-h) var(--gutter) 0; max-width: var(--max); margin: 0 auto; }
.country-canvas { width: 100%; height: calc(100svh - var(--nav-h) - 24px); }
.country-copy .count { font: 300 clamp(54px, 7vw, 108px)/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; margin: 8px 0 12px; }
.country-chapters { position: relative; min-height: 13em; margin-top: 28px; }
.country-chapters > div { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out); }
.country-chapters > div.on { opacity: 1; transform: none; }
.corner { position: absolute; font: 500 11px var(--mono); letter-spacing: 0.1em; color: var(--fg-muted); }
.corner.tl { left: var(--gutter); top: calc(var(--nav-h) + 12px); }
.corner.tr { right: var(--gutter); top: calc(var(--nav-h) + 12px); }
.corner.bl { left: var(--gutter); bottom: 18px; }
.corner.br { right: var(--gutter); bottom: 18px; }
.pips { display: flex; gap: 6px; margin-top: 24px; }
.pips i { width: 6px; height: 2px; background: var(--line-strong); transition: width 0.6s var(--ease-out), background 0.3s; }
.pips i.on { width: 28px; background: var(--ink); }
@media (max-width: 800px) {
  .country-stage { grid-template-columns: 1fr; grid-template-rows: 1fr auto; align-content: center; padding-bottom: 24px; }
  .country-canvas { height: 52svh; }
  .country-chapters { min-height: 9em; }
  .corner { display: none; }
}

/* ── Modules: a pinned sideways track ─────────────────────────────────── */

.modules { padding-top: clamp(64px, 8vw, 120px); }
.modules-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: clamp(24px, 4vh, 48px); }
.modules-pin { overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 8px) 0 24px; }
.mod { height: clamp(380px, calc(100svh - var(--nav-h) - 230px), 560px); }
.mod .mod-art { flex: 1 1 auto; min-height: 90px; height: auto; }
@media (max-width: 800px) { .modules-pin { min-height: 0; padding-top: 0; } .mod { height: auto; } .mod .mod-art { height: 180px; flex: none; } }
.modules-track { display: flex; gap: 20px; padding: 0 var(--gutter) 0; width: max-content; will-change: transform; }
.mod {
  position: relative;
  width: min(560px, 82vw);
  display: flex; flex-direction: column;
  border: 1px solid var(--rule); border-radius: 14px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 40%), var(--night-2);
  overflow: hidden;
}
.mod-top { display: flex; justify-content: space-between; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); }
.mod h3 { font-size: clamp(30px, 3vw, 42px); font-weight: 300; letter-spacing: -0.035em; margin: 22px 0 12px; }
.mod p { color: var(--fg-muted); font-size: 15.5px; max-width: 34em; }
.mod ul { list-style: none; padding: 0; margin: 4px 0 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.mod li { font: 500 11px var(--mono); letter-spacing: 0.04em; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 10px; color: var(--fg-muted); }
.mod-art { margin-top: auto; height: 210px; border-top: 1px solid var(--rule); padding-top: 16px; }
.mod-art svg { width: 100%; height: 100%; fill: none; stroke: var(--night-muted); stroke-width: 1; }
.mod-art .a { stroke: var(--accent); }
.mod-art .f { fill: rgba(52, 211, 153, 0.12); stroke: none; }
.mod-art text { fill: var(--night-muted); stroke: none; font: 500 9px var(--mono); letter-spacing: 0.1em; }
.mod-num { position: absolute; right: 24px; bottom: 18px; font: 200 120px/1 var(--font); color: rgba(228, 234, 241, 0.05); letter-spacing: -0.06em; pointer-events: none; }
.modules-rail { display: flex; gap: 0; margin-top: clamp(20px, 3vh, 36px); border-top: 1px solid var(--rule); padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; }
.modules-rail button { position: relative; padding: 16px 22px 18px 0; margin-right: 22px; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); white-space: nowrap; }
.modules-rail button::before { content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease-out); }
.modules-rail button.on { color: var(--fg); }
.modules-rail button.on::before { transform: scaleX(1); }
.modules-foot { padding: 40px var(--gutter) clamp(96px, 12vw, 160px); }
@media (max-width: 800px) {
  .modules-track { width: auto; flex-direction: column; padding: 0 var(--gutter); }
  .mod { width: auto; min-height: 0; }
  .modules-rail { display: none; }
}

/* ── Segments: sticky picture, stepping copy ──────────────────────────── */

.segments { padding: clamp(96px, 12vw, 160px) 0; }
.seg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); margin-top: 56px; }
.seg-visual { position: sticky; top: calc(var(--nav-h) + 24px); height: calc(100svh - var(--nav-h) - 48px); border-radius: 14px; overflow: hidden; background: var(--night); }
.seg-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.8s var(--ease-out), transform 1.2s var(--ease-out); opacity: 0; transform: scale(1.04); }
.seg-visual svg.on { opacity: 1; transform: none; }
.seg-visual .cap { position: absolute; z-index: 2; left: 20px; bottom: 18px; right: 20px; display: flex; justify-content: space-between; font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--night-muted); }
.seg { min-height: 82svh; display: flex; flex-direction: column; justify-content: center; border-top: 1px solid var(--rule); padding: 40px 0; }
.seg:first-child { border-top: 0; }
.seg .h3 { font-size: clamp(30px, 3.2vw, 46px); font-weight: 300; letter-spacing: -0.035em; margin: 0 0 28px; }
.seg dl { margin: 0; display: grid; gap: 22px; }
.seg dt { font: 500 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 6px; }
.seg dd { margin: 0; font-size: 16.5px; line-height: 1.55; }
.seg dd.with { color: var(--ink); }
.seg dt.with { color: var(--accent-ink); }
@media (max-width: 900px) {
  .seg-grid { grid-template-columns: 1fr; }
  .seg-visual { position: relative; top: 0; height: 56vw; min-height: 260px; }
  .seg { min-height: 0; }
}

/* ── Workflow tiles (outcomes grid) ───────────────────────────────────── */

.flows { padding: clamp(96px, 12vw, 160px) 0; }
.flows-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; }
.flow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.flow { position: relative; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); transition: transform 0.8s var(--ease-out); }
.flow:hover { transform: translateY(-4px); }
.flow-art { aspect-ratio: 16 / 9; position: relative; background: var(--night); border-bottom: 1px solid var(--night-line); }
.flow.paper .flow-art { background: var(--paper-2); border-color: var(--line); }
.flow-art svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(228, 234, 241, 0.42); stroke-width: 1; }
.flow.paper .flow-art svg { stroke: rgba(17, 20, 16, 0.45); }
.flow-art svg .a { stroke: var(--accent); stroke-width: 1.4; }
.flow.paper .flow-art svg .a { stroke: var(--accent-ink); }
.flow-art svg .f { fill: rgba(52, 211, 153, 0.14); stroke: none; }
.flow.paper .flow-art svg .f { fill: rgba(0, 121, 91, 0.12); }
.flow-art svg text { stroke: none; fill: rgba(228, 234, 241, 0.55); font: 500 10px var(--mono); letter-spacing: 0.1em; }
.flow.paper .flow-art svg text { fill: rgba(17, 20, 16, 0.55); }
.flow-art .cap { position: absolute; left: 18px; right: 18px; bottom: 14px; display: flex; justify-content: space-between; font: 500 10.5px var(--mono); letter-spacing: 0.08em; color: var(--night-muted); }
.flow.paper .flow-art .cap { color: var(--muted); }
.flow-body { padding: 22px 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; }
.flow-body h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.025em; }
.flow-body p { grid-column: 1; margin: 0; color: var(--fg-muted); font-size: 15.5px; }
.flow-body .tags { grid-column: 1 / -1; margin-top: 14px; display: flex; gap: 14px; font: 500 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.flow-body .tags span + span::before { content: '|'; margin-right: 14px; opacity: 0.4; }
.flow-body svg.arr { grid-column: 2; grid-row: 1; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 0.6s var(--ease-out); }
.flow:hover svg.arr { transform: translate(3px, -3px); }
@media (max-width: 800px) { .flow-grid { grid-template-columns: 1fr; } }

/* ── Marquee ──────────────────────────────────────────────────────────── */

.marquee { padding: 36px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font-size: clamp(24px, 2.8vw, 40px); font-weight: 300; letter-spacing: -0.03em; white-space: nowrap; }
.marquee-track span::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Price teaser / blocks ────────────────────────────────────────────── */

.price-band { padding: clamp(96px, 12vw, 160px) 0; }
.price-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.price-big { font: 300 clamp(96px, 16vw, 240px)/0.85 var(--font); letter-spacing: -0.05em; font-variant-numeric: lining-nums; }
.price-big small { font: 300 clamp(18px, 1.6vw, 24px)/1.3 var(--font); letter-spacing: -0.01em; color: var(--fg-muted); display: block; margin-top: 18px; }
/* The figure reads as a price: the currency beside it in the accent, the period under the currency. */
.price-fig { display: flex; align-items: flex-start; gap: 0.08em; }
.price-unit { display: flex; flex-direction: column; gap: clamp(8px, 1vw, 14px); padding-top: 0.1em; letter-spacing: normal; }
.price-unit b { font: 400 clamp(36px, 5vw, 76px)/0.9 var(--font); letter-spacing: -0.03em; color: var(--accent-ink); }
[data-theme='night'] .price-unit b { color: var(--accent); }
.price-unit i { font: 400 clamp(11px, 0.9vw, 13px)/1.3 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-muted); white-space: nowrap; }
.checks { list-style: none; padding: 0; margin: 0 0 28px; columns: 2; column-gap: 32px; }
.checks li { break-inside: avoid; padding: 10px 0 10px 28px; border-top: 1px solid var(--rule); position: relative; font-size: 15.5px; }
.checks li::before { content: ''; position: absolute; left: 2px; top: 17px; width: 12px; height: 7px; border-left: 1.5px solid var(--accent-ink); border-bottom: 1.5px solid var(--accent-ink); transform: rotate(-45deg); }
[data-theme='night'] .checks li::before { border-color: var(--accent); }
@media (max-width: 800px) { .price-grid { grid-template-columns: 1fr; } .checks { columns: 1; } }

/* ── Inner pages ──────────────────────────────────────────────────────── */

.page-hero { padding: calc(var(--nav-h) + clamp(64px, 10vw, 140px)) 0 clamp(56px, 7vw, 96px); border-bottom: 1px solid var(--rule); }
.page-hero .h1 { max-width: 15ch; }
.page-hero-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); gap: 48px; align-items: end; margin-top: 40px; }
.page-hero-row .lede { margin: 0; }
@media (max-width: 800px) { .page-hero-row { grid-template-columns: 1fr; gap: 24px; } }

.block { padding: clamp(80px, 10vw, 140px) 0; }
.block + .block:not([data-theme]) { border-top: 1px solid var(--rule); }
.split { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); }
.split-sticky { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split-sticky { position: static; } }

.rows { border-top: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: 64px minmax(0, 0.8fr) minmax(0, 1fr); gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.row .n { font: 500 11px var(--mono); letter-spacing: 0.1em; color: var(--fg-muted); padding-top: 6px; }
.row h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 400; letter-spacing: -0.025em; }
.row p { color: var(--fg-muted); margin: 0; }
.row p + p { margin-top: 10px; }
.row ul { margin: 10px 0 0; padding-left: 18px; color: var(--fg-muted); }
@media (max-width: 800px) { .row { grid-template-columns: 1fr; gap: 8px; } }

.chapter { padding: clamp(80px, 10vw, 140px) 0; border-top: 1px solid var(--rule); }
.chapter-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.chapter-grid.flip > :first-child { order: 2; }
.chapter h2 { font-size: clamp(32px, 3.8vw, 56px); font-weight: 300; letter-spacing: -0.04em; margin-bottom: 24px; }
.chapter .feat { list-style: none; padding: 0; margin: 28px 0 0; }
.chapter .feat li { padding: 14px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; font-size: 15.5px; }
.chapter .feat li b { font-weight: 500; }
.chapter .feat li span { color: var(--fg-muted); }
.chapter .feat-links b a { border-bottom: 1px solid var(--rule); transition: border-color 0.3s; }
.chapter .feat-links b a:hover { border-color: currentColor; }
.chapter .more, .page-hero .more { display: inline-flex; gap: 8px; align-items: center; margin-top: 24px; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.chapter .more:hover, .page-hero .more:hover { border-color: currentColor; }
@media (max-width: 900px) { .chapter-grid { grid-template-columns: 1fr; } .chapter-grid.flip > :first-child { order: 0; } .chapter .feat li { grid-template-columns: 1fr; gap: 2px; } }

.chapter-grid > .shot, .chapter-grid > .art { position: sticky; top: calc(var(--nav-h) + 32px); }
@media (max-width: 900px) { .chapter-grid > .shot, .chapter-grid > .art { position: relative; top: 0; } }
.shot { margin: 0; position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); background: var(--night); box-shadow: 0 30px 80px -30px rgba(10, 13, 18, 0.45); }
.shot img { width: 100%; height: auto; }
.shot figcaption { position: absolute; left: 14px; bottom: 12px; font: 500 10.5px var(--mono); letter-spacing: 0.08em; color: var(--night-muted); background: rgba(10, 13, 18, 0.7); padding: 5px 8px; border-radius: 4px; }

.art { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--night); border: 1px solid var(--night-line); }
.art svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(228, 234, 241, 0.4); stroke-width: 1; }
.art svg .a { stroke: var(--accent); stroke-width: 1.4; }
.art svg .f { fill: rgba(52, 211, 153, 0.14); stroke: none; }
.art svg text { stroke: none; fill: rgba(228, 234, 241, 0.6); font: 500 10px var(--mono); letter-spacing: 0.1em; }
/* What is included, door by door: a night card with a row per fact. */
.cmp-wrap { margin-top: 48px; border-radius: 16px; background: var(--night); border: 1px solid var(--night-line); overflow-x: auto; }
.cmp { width: 100%; min-width: 560px; border-collapse: collapse; color: var(--night-text); font-size: 14.5px; }
.cmp th, .cmp td { padding: 15px 20px; border-bottom: 1px solid var(--night-line); text-align: center; font-weight: 400; }
.cmp th[scope='row'], .cmp thead th:first-child { text-align: left; font-weight: 500; }
.cmp thead th { font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding-block: 20px; }
.cmp thead th:first-child { color: var(--night-muted); }
.cmp td { color: var(--night-muted); }
.cmp .grp th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); padding-top: 28px; }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp thead th:not(:first-child) { width: 20%; }
.cmp .tick { display: inline-block; width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.6; vertical-align: middle; }
@media (max-width: 640px) { .cmp th, .cmp td { padding: 12px 12px; } .cmp th[scope='row'] { width: 40%; } }

/* A request and its answer, or an assistant's turn, set as a terminal on night. */
.code { margin: 0; border-radius: 12px; background: var(--night); border: 1px solid var(--night-line); color: var(--night-text); overflow: hidden; }
.code-bar { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--night-line); font: 500 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--night-muted); }
.code pre { margin: 0; padding: 18px 16px 20px; font: 400 clamp(11.5px, 1vw, 13px)/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.code .k { color: var(--accent); }
.code .m { color: var(--night-muted); }
.code .you { display: block; color: var(--night-muted); }
.code .you::before { content: '› '; color: var(--accent); }
.art .cap { position: absolute; left: 16px; right: 16px; bottom: 12px; display: flex; justify-content: space-between; font: 500 10.5px var(--mono); letter-spacing: 0.08em; color: var(--night-muted); }

.src-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.src-table th, .src-table td { text-align: left; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.src-table th { font: 500 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); }
.src-table td:first-child { font-weight: 500; width: 26%; }
.src-table td.l { font: 500 12px var(--mono); color: var(--fg-muted); white-space: nowrap; }
@media (max-width: 800px) { .src-table thead { display: none; } .src-table td { display: block; padding: 4px 0; border: 0; width: auto !important; } .src-table tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); } }

.plan { border: 1px solid var(--rule); border-radius: 16px; padding: clamp(28px, 4vw, 48px); background: var(--bg); }
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font-size: 19px; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-75%) rotate(45deg); transition: transform 0.5s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details > div { padding: 0 0 24px; color: var(--fg-muted); max-width: 44em; }

.prose { max-width: 44em; }
.prose h2 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 400; letter-spacing: -0.025em; margin: 56px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 20px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose a { border-bottom: 1px solid var(--line-strong); }
.prose a:hover { border-color: var(--ink); }
.prose .meta { font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.contact-grid > div { padding: 32px 32px 32px 0; border-right: 1px solid var(--rule); }
.contact-grid > div + div { padding-left: 32px; }
.contact-grid > div:last-child { border-right: 0; }
.contact-grid .big { font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -0.02em; display: block; margin-bottom: 6px; }
.contact-grid a.big { border-bottom: 1px solid var(--rule); display: inline-block; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } .contact-grid > div { border-right: 0; border-bottom: 1px solid var(--rule); padding: 24px 0 !important; } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.stats > div { padding: 28px 24px 28px 0; border-right: 1px solid var(--rule); }
.stats > div + div { padding-left: 24px; }
.stats > div:last-child { border-right: 0; }
.stats b { display: block; font: 300 clamp(36px, 4vw, 60px)/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; margin-bottom: 10px; }
.stats span { font-size: 14.5px; color: var(--fg-muted); }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr 1fr; } .stats > div:nth-child(2) { border-right: 0; } .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); } .stats > div:nth-child(3) { padding-left: 0; } }

/* App page: real screenshots in device frames. The frames are drawn here,
   so the images stay plain captures from the simulator. */
.device { position: relative; background: #05070a; box-shadow: 0 0 0 1px rgba(228, 234, 241, 0.14), 0 50px 120px -40px rgba(10, 13, 18, 0.7); }
.device img { display: block; width: 100%; height: auto; }
.device-phone { width: min(300px, 72vw); padding: 9px; border-radius: 50px; margin: 0 auto; }
.device-phone img { border-radius: 41px; }
.device-tablet { padding: 14px; border-radius: 34px; }
.device-tablet img { border-radius: 21px; }
.device-cap { margin-top: 18px; font: 500 11px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); text-align: center; }
.devices { position: relative; padding: 0 0 8% 0; }
.devices .device-tablet { width: 86%; }
.devices .device-phone { position: absolute; right: 0; bottom: 0; width: 26%; padding: 6px; border-radius: 34px; }
.devices .device-phone img { border-radius: 28px; }
.app-hero { padding-bottom: clamp(48px, 6vw, 80px); }
.app-hero .devices { margin-top: clamp(40px, 6vw, 72px); }
.phone-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); align-items: start; margin-top: 56px; }
.phone-row .device-phone { width: 100%; max-width: 300px; }
.phone-row h3 { font-size: 21px; font-weight: 500; letter-spacing: -0.02em; margin: 28px 0 8px; }
.phone-row p { color: var(--fg-muted); font-size: 15.5px; margin: 0; }
.tablet-pair { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.8fr); gap: clamp(20px, 3vw, 40px); align-items: end; margin-top: 56px; }
.sample-note { margin-top: 40px; font-size: 13.5px; color: var(--fg-muted); max-width: 52em; }
@media (max-width: 800px) {
  .phone-row { grid-template-columns: 1fr; gap: 48px; }
  .phone-row .device-phone { max-width: 260px; }
  .tablet-pair { grid-template-columns: 1fr; }
  .devices { padding-bottom: 14%; }
  .devices .device-tablet { width: 92%; }
  .devices .device-phone { width: 30%; }
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.foot { background: var(--night); color: var(--night-text); padding: clamp(96px, 12vw, 160px) var(--gutter) 28px; overflow: hidden; }
.foot-invite { max-width: var(--max); margin: 0 auto; padding-bottom: clamp(64px, 8vw, 112px); border-bottom: 1px solid var(--night-line); }
.foot-title { font-size: clamp(40px, 6.4vw, 100px); font-weight: 300; letter-spacing: -0.045em; line-height: 0.98; max-width: 14ch; margin-bottom: 40px; }
.foot-title em { color: var(--night-muted); }
.foot-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.foot-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px; padding: 48px 0; }
.foot-grid a { display: block; padding: 4px 0; color: var(--night-text); opacity: 0.8; transition: opacity 0.3s; width: fit-content; }
.foot-grid a:hover { opacity: 1; }
.foot-grid p:not(.label) { color: var(--night-muted); font-size: 15px; }
.foot-word { max-width: var(--max); margin: 0 auto; font-size: clamp(80px, 22vw, 340px); line-height: 0.8; letter-spacing: -0.07em; white-space: nowrap; user-select: none; color: var(--night-2); padding: 12px 0 24px; }
.foot-word span:first-child { font-weight: 650; }
.foot-word span:last-child { font-weight: 200; }
.foot-base { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 500 10.5px/1.6 var(--mono); letter-spacing: 0.06em; color: var(--night-muted); border-top: 1px solid var(--night-line); padding-top: 20px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ── Intro curtain (first visit in a session) ─────────────────────────── */

.curtain { position: fixed; inset: 0; z-index: 90; background: var(--night); color: var(--night-text); display: flex; align-items: flex-end; justify-content: space-between; padding: var(--gutter); font: 500 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; transition: clip-path 1s var(--ease-sharp); clip-path: inset(0 0 0 0); }
.curtain.done { clip-path: inset(0 0 100% 0); }
.curtain .count { font: 300 clamp(64px, 12vw, 160px)/0.8 var(--font); letter-spacing: -0.06em; text-transform: none; }

/* ── Reduced motion: everything at rest in its final state ───────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js [data-split] .line-inner { opacity: 1 !important; transform: none !important; }
  .js [data-ink] * { stroke-dashoffset: 0 !important; }
  .lit .w { opacity: 1; }
  .build, .country { height: auto; }
  .build-stage, .country-stage { position: relative; height: auto; min-height: 100svh; }
  .build-steps li p { max-height: none; opacity: 1; }
  .build-steps li { color: var(--night-text); }
  .build-steps li:not(.on) { display: block; }
  .country-chapters > div { position: relative; opacity: 1; transform: none; margin-bottom: 20px; }
  .country-chapters { min-height: 0; }
  .curtain { display: none; }
}

/* ── Markets: one card per country, Norway lit ─────────────────────────── */

.mkt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mkt { display: flex; flex-direction: column; gap: 14px; padding: 26px 24px 24px; border-radius: 14px; border: 1px solid var(--rule); background: color-mix(in srgb, var(--paper-2) 55%, transparent); }
.mkt h3 { margin: 0; font: 300 clamp(30px, 2.6vw, 40px)/1 var(--font); letter-spacing: -0.03em; }
.mkt p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--fg-muted); }
.mkt .more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.mkt-status { display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px var(--mono) !important; letter-spacing: 0.1em; text-transform: uppercase; }
.mkt-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1.3px solid currentColor; }
.mkt-on { background: var(--night); color: var(--night-text); border-color: var(--night); }
.mkt-on p { color: var(--night-muted); }
.mkt-on .mkt-status { color: var(--accent) !important; }
.mkt-on .mkt-status::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
@media (max-width: 1000px) { .mkt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mkt-grid { grid-template-columns: 1fr; } }

/* "Tell me when it opens": the markets page's email form. */
.mkt-notify { margin-top: auto; padding-top: 8px; }
.mkt-notify label > span:first-child { display: block; margin-bottom: 8px; font-size: 14.5px; }
.mkt-row { display: flex; gap: 6px; }
.mkt-row input { flex: 1; min-width: 0; padding: 9px 11px; font: inherit; font-size: 14px; color: inherit; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; }
.mkt-row button { padding: 9px 14px; font: inherit; font-size: 14px; color: var(--paper); background: var(--fg); border: 0; border-radius: 8px; cursor: pointer; }
.mkt-row button:disabled { opacity: 0.6; cursor: default; }
.mkt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mkt-msg { margin: 8px 0 0 !important; min-height: 1.2em; font-size: 13px !important; }
.mkt-notify.is-done .mkt-row, .mkt-notify.is-done label > span:first-child { display: none; }

/* Toplists (/topplister): the hub's cards, a list's table, a kommune's stats. */
.rank-meta { margin: 0; font: 500 11px/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); align-self: end; }
.rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.rank-stack { display: grid; gap: clamp(32px, 4vw, 56px); }
.rank-card h2 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 400; letter-spacing: -0.025em; margin: 0 0 6px; }
.rank-card h2 a { border-bottom: 1px solid transparent; }
.rank-card h2 a:hover { border-color: var(--line-strong); }
.rank-tag { color: var(--fg-muted); margin: 0 0 16px; max-width: 48em; }
.rank-card .more { margin-top: 14px; display: inline-flex; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank-table th { text-align: left; font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); padding: 8px 8px; border-bottom: 1px solid var(--line-strong); }
.rank-table td { padding: 9px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.rank-table .rank-n { width: 2.2em; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.rank-table .rank-v, .rank-table .rank-x, .rank-table .rank-date { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-table .rank-x, .rank-table .rank-date, .rank-table .rank-place { color: var(--fg-muted); }
.rank-table .rank-name a { border-bottom: 1px solid var(--line); }
.rank-table .rank-name a:hover { border-color: var(--fg); }
.rank-table td small { display: block; color: var(--fg-muted); font-size: 12px; margin-top: 2px; }
.rank-table a { color: inherit; }
.rank-wrap .rank-table { font-size: 15px; }
.rank-empty { color: var(--fg-muted); }
.rank-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); margin-top: clamp(40px, 5vw, 72px); padding-top: 32px; border-top: 1px solid var(--rule); }
.rank-method { color: var(--fg-muted); font-size: 14px; margin: 12px 0 0; }
.rank-more { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.rank-more a { border-bottom: 1px solid var(--line-strong); }
.rank-embed { width: 100%; margin-top: 10px; font: 12px/1.4 var(--mono); padding: 10px; border: 1px solid var(--rule); border-radius: 4px; background: transparent; color: var(--fg); resize: vertical; }
.rank-places { list-style: none; padding: 0; margin: 32px 0 0; columns: 5; column-gap: 24px; font-size: 14px; }
.rank-places li { break-inside: avoid; padding: 3px 0; }
.rank-places a { border-bottom: 1px solid transparent; }
.rank-places a:hover { border-color: var(--line-strong); }
.rank-places small { color: var(--fg-muted); font-variant-numeric: tabular-nums; margin-left: 4px; }
.rank-stats { display: flex; flex-wrap: wrap; gap: 24px 48px; margin: 40px 0 0; }
.rank-stats div { margin: 0; }
.rank-stats dt { font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 6px; }
.rank-stats dd { margin: 0; font-size: clamp(22px, 2.4vw, 32px); font-weight: 300; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rank-stats dd a { border-bottom: 1px solid var(--line-strong); }
@media (max-width: 900px) {
  .rank-grid, .rank-foot { grid-template-columns: minmax(0, 1fr); }
  .rank-places { columns: 3; }
}
@media (max-width: 560px) {
  .rank-places { columns: 2; }
  .rank-table { font-size: 13px; }
  .rank-wrap .rank-table { font-size: 13px; }
  .rank-table .rank-place, .rank-table .rank-date, .rank-table th.rank-place, .rank-table th.rank-date { display: none; }
}
