:root {
  --paper: #EDF1F5;
  --paper-2: #E2E8EF;
  --sheet: #FFFFFF;
  --ink: #16213E;
  --ink-2: #4A5672;
  --red: #D7263D;
  --yellow: #FFC400;
  --land: #C9D4E1;
  --rule: #B9C4D0;
  --display: 'Anybody', system-ui, sans-serif;
  --body: 'Schibsted Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 800; font-stretch: 125%; line-height: 1.02; }
h3 { font-size: 1.2rem; font-weight: 700; font-stretch: 110%; line-height: 1.2; }
code { font-family: var(--mono); font-size: 0.9em; }

/* Header */
.top {
  max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 800 1.35rem/1 var(--display); font-stretch: 130%;
}
.brand-mark { width: 34px; height: 34px; }
.top-nav { display: flex; align-items: center; gap: 24px; font-weight: 500; }
.top-nav a { text-decoration: none; }
.top-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.top-cta { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px; }
.top-cta:hover { background: var(--ink); color: var(--paper); text-decoration: none !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1 var(--body); padding: 14px 22px; border-radius: 999px;
  border: 2px solid var(--ink); text-decoration: none; cursor: pointer;
  background: transparent; color: var(--ink); transition: background .15s, color .15s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--red); border-color: var(--red); }
.btn-quiet:hover { background: var(--sheet); }
.btn-copy { padding: 8px 14px; font-size: 0.9rem; background: var(--sheet); }
.btn-copy:hover { background: var(--ink); color: var(--paper); }
.btn-copy.done { background: var(--ink); color: var(--paper); }

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(24px, 6vw, 72px) var(--gutter) clamp(48px, 8vw, 104px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 56px); align-items: center;
  overflow-x: clip;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.9rem); font-weight: 850; font-stretch: 118%;
  line-height: 0.98; letter-spacing: -0.02em; text-wrap: balance;
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 34ch; margin: 24px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 20px 0 0; font-size: 0.95rem; color: var(--ink-2); }

/* Stage */
.stage { position: relative; min-height: 650px; }
.chat {
  position: absolute; left: 0; top: 0; width: min(330px, 62%); z-index: 2;
  background: var(--sheet); border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: 8px 8px 0 var(--ink);
}
.chat-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 2px solid var(--ink);
}
.dots { display: flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); }
.assistant {
  font: 700 0.95rem/1 var(--display); font-stretch: 115%;
  transition: opacity .25s, transform .25s;
}
.assistant.swap { opacity: 0; transform: translateY(-6px); }
.chat-body { padding: 16px; min-height: 236px; display: flex; flex-direction: column; gap: 12px; }
.msg { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.msg-user {
  align-self: flex-end; max-width: 88%; background: var(--paper); border-radius: 12px 12px 2px 12px;
  padding: 10px 12px; min-height: 2.9em;
}
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--ink); vertical-align: -0.15em; margin-left: 1px; animation: blink 1s steps(1) infinite; }
.caret.off { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.tool {
  border: 1.5px dashed var(--ink-2); border-radius: 10px; padding: 10px 12px; font-size: 0.85rem;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.tool.show { opacity: 1; transform: none; }
.tool-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; font-family: var(--mono); font-size: 0.8rem; }
.tool-name { background: var(--ink); color: var(--paper); padding: 2px 7px; border-radius: 4px; }
.tool-fn { font-weight: 500; }
.tool-grid { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 0; }
.tool-grid dt { color: var(--ink-2); }
.tool-grid dd { margin: 0; font-weight: 600; }
.msg-ai { opacity: 0; transition: opacity .3s; color: var(--ink); }
.msg-ai.show { opacity: 1; }

.map {
  position: absolute; right: 0; bottom: 0; width: min(460px, 76%); aspect-ratio: 281 / 255;
  background: var(--paper-2); border-radius: 18px; padding: 14px;
}
.map svg#map-svg { width: 100%; height: 100%; overflow: visible; }
.map .dot { fill: var(--land); }
.map .city { fill: var(--ink-2); opacity: .55; transition: fill .3s, opacity .3s; }
.map .city.visited { fill: var(--yellow); opacity: .8; }
.map .city.lit { fill: var(--yellow); opacity: 1; stroke: var(--ink); stroke-width: 1.4; }
.map .ring { fill: none; stroke: var(--yellow); stroke-width: 2.5; opacity: 0; }
.map .ring.go { animation: ring 1.1s ease-out forwards; }
@keyframes ring { 0% { opacity: 1; r: 4; } 100% { opacity: 0; r: 26; } }
.map .city-label { font: 600 9px/1 var(--body); fill: var(--ink); opacity: 0; transition: opacity .3s; }
.map .city-label.lit { opacity: 1; }

.postmark {
  position: absolute; right: -18px; bottom: -22px; width: 168px; color: var(--red);
  opacity: 0; transform: rotate(-14deg) scale(1.5); pointer-events: none; mix-blend-mode: multiply;
}
.postmark.stamp { animation: stamp .45s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.postmark.fade { opacity: .9; transform: rotate(-14deg) scale(1); transition: opacity .5s; }
@keyframes stamp {
  0% { opacity: 0; transform: rotate(-14deg) scale(1.5); }
  60% { opacity: .95; transform: rotate(-14deg) scale(.96); }
  100% { opacity: .9; transform: rotate(-14deg) scale(1); }
}
.pm-city { font: 700 11px/1 var(--display); letter-spacing: .14em; fill: currentColor; }
.pm-date { font: 600 13px/1 var(--mono); fill: currentColor; }

.envelope {
  position: absolute; left: 0; top: 0; width: 54px; z-index: 3; opacity: 0; pointer-events: none;
  will-change: transform, opacity;
}
.envelope.registered #env-stamp { fill: var(--yellow); }

/* How */
.how, .connect, .pricing, .faq { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter); }
.how { border-top: 2px solid var(--ink); }
.route {
  list-style: none; margin: 48px 0 0; padding: 0; counter-reset: stop;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; position: relative;
}
.route::before {
  content: ''; position: absolute; left: 0; right: 0; top: 19px; border-top: 2px dashed var(--rule);
}
.route li { position: relative; counter-increment: stop; }
.route li::before {
  content: counter(stop); position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink);
  font: 800 1.05rem/1 var(--display); margin-bottom: 20px;
}
.route li:last-child::before { background: var(--yellow); }
.route p { color: var(--ink-2); margin: 8px 0 0; max-width: 32ch; }

/* Connect */
.connect { background: var(--ink); color: var(--paper); max-width: none; }
.connect > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.connect-head p { color: #C4CCDA; max-width: 52ch; margin: 16px 0 0; }
.url-box {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 36px; background: var(--sheet); color: var(--ink); border-radius: 14px; padding: 16px 16px 16px 22px;
}
.url-box code { font-size: clamp(1rem, 2.6vw, 1.5rem); font-weight: 500; word-break: break-all; }
.tabs { margin-top: 36px; }
.tab-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tab-list [role=tab] {
  font: 600 0.95rem/1 var(--body); color: var(--paper); background: transparent; cursor: pointer;
  border: 2px solid #46527A; border-radius: 999px; padding: 10px 16px;
}
.tab-list [role=tab]:hover { border-color: var(--paper); }
.tab-list [role=tab][aria-selected=true] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.tab-panel { margin-top: 20px; max-width: 760px; }
.tab-panel p { margin: 0; }
.tab-panel p code { background: #26325A; padding: 2px 6px; border-radius: 4px; }
.snippet { position: relative; margin-top: 14px; }
.snippet pre {
  margin: 0; background: #0E1630; border: 1px solid #2E3A63; border-radius: 12px; padding: 18px 20px; padding-right: 92px;
  overflow-x: auto; font-size: 0.9rem; line-height: 1.55;
}
.snippet .btn-copy { position: absolute; top: 10px; right: 10px; }

/* Pricing */
.pricing { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.pricing-head p { color: var(--ink-2); margin: 16px 0 0; max-width: 34ch; }
.tariff { width: 100%; border-collapse: separate; background: var(--sheet); border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; border-spacing: 0; }
.tariff th, .tariff td { text-align: left; padding: 18px 20px; vertical-align: top; }
.tariff thead th { font: 600 0.9rem/1.2 var(--body); color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.tariff tbody th { font: 750 1.2rem/1.2 var(--display); font-stretch: 112%; }
.tariff tbody th span:not(.r-mark) { display: block; font: 400 0.92rem/1.4 var(--body); color: var(--ink-2); margin-top: 4px; }
.tariff tbody td { font: 800 1.5rem/1.1 var(--display); font-stretch: 120%; white-space: nowrap; }
.tariff tbody td + td { font-size: 1.1rem; font-weight: 600; color: var(--ink-2); }
.tariff tbody tr + tr > * { border-top: 1px solid var(--rule); }
.tariff tfoot td { font-size: 0.95rem; color: var(--ink-2); border-top: 1px solid var(--rule); background: var(--paper); }
.r-mark {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px; vertical-align: 2px;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 4px; font: 800 0.85rem/1 var(--display);
}

/* FAQ */
.faq { border-top: 2px solid var(--ink); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list details:first-child { border-top: 1px solid var(--rule); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font: 650 1.1rem/1.35 var(--body);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+'; position: absolute; right: 4px; top: 14px; font: 500 1.6rem/1 var(--display); transition: transform .2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: 0 0 20px; color: var(--ink-2); max-width: 62ch; }

/* Footer */
.foot {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 56px; border-top: 2px solid var(--ink);
  display: flex; flex-wrap: wrap; gap: 12px 40px; align-items: baseline;
}
.foot p { margin: 0; color: var(--ink-2); }
.foot-brand { font: 800 1.2rem/1 var(--display); font-stretch: 130%; color: var(--ink) !important; }
.foot-links { display: flex; gap: 20px; margin-left: auto !important; }

/* Simple pages */
.notice { max-width: 640px; margin: 0 auto; padding: clamp(48px, 12vw, 140px) var(--gutter); }
.notice h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 850; font-stretch: 135%; line-height: 1; }
.notice p { color: var(--ink-2); font-size: 1.15rem; margin: 20px 0 32px; }
.notice-mark { width: 120px; color: var(--red); margin-bottom: 28px; transform: rotate(-12deg); }
.notice-mark.muted { color: var(--ink-2); }

/* Responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .stage { min-height: 0; display: flex; flex-direction: column; gap: 20px; }
  .chat { position: relative; width: 100%; max-width: 440px; }
  .map { position: relative; width: 100%; max-width: 480px; align-self: flex-end; }
  .route { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .route::before { display: none; }
  .pricing, .faq { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .top-nav a:not(.top-cta) { display: none; }
  .route { grid-template-columns: minmax(0, 1fr); }
  .chat { box-shadow: 5px 5px 0 var(--ink); }
  .tariff th, .tariff td { padding: 14px 12px; }
  .tariff tbody td { font-size: 1.2rem; }
  .tariff thead th:last-child, .tariff tbody td:last-child { display: none; }
  .tariff tfoot td::before { content: 'Each extra page adds 0.25 €. '; }
  .foot-links { margin-left: 0 !important; }
  .postmark { width: 128px; right: -6px; bottom: -16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(32px, 7vw, 80px) var(--gutter) 96px; }
.doc h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 850; font-stretch: 135%; line-height: 1; }
.doc .updated { color: var(--ink-2); margin: 14px 0 40px; font-size: .95rem; }
.doc h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-stretch: 115%; margin: 44px 0 12px; line-height: 1.15; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--ink); }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink-2); }
.doc th { color: var(--ink); font-weight: 600; }
.doc .table-wrap { overflow-x: auto; }
