/* triquest.se — the public site (docs/SITE.md). One stylesheet, no framework, system fonts. */

@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 1; /* the finished picture unless /assets/main.d9d992ccf9b2.js takes over (no JS, reduced motion) */
}

:root {
  color-scheme: dark;
  --bg: #07090d;
  --bg-2: #0b0f16;
  --surface: #11161f;
  --surface-2: #161c27;
  --line: rgb(255 255 255 / 0.09);
  --line-strong: rgb(255 255 255 / 0.16);
  --text: #f3f5f8;
  --muted: #a6afbd;
  --faint: #8a94a3;
  /* The TriQuest mark's colours (app/icon.svg, 0.9.1): the brand accent is its coral red, the gradient its three bars. */
  --brand: #ff5a4a;
  --brand-strong: #e8202f;
  --mark-green: #22e06b;
  --mark-yellow: #ffd93a;
  --mark-orange: #ff8a1a;
  --mark-red: #ff2d3b;
  --brand-gradient: linear-gradient(100deg, var(--mark-green) 0%, var(--mark-yellow) 34%, var(--mark-orange) 64%, var(--mark-red) 100%);
  --route: #2f7cf6;
  /* The sport colours (the app's dark-mode sport tokens): swim, bike and run where a sport is meant. */
  --swim: #3fb3df;
  --bike: #f2a548;
  --run: #56bd78;
  --strength: #b38af0;
  --radius: 22px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
s { text-decoration-thickness: 1.5px; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section[id] { scroll-margin-top: var(--header-h); }

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

h1, .h-xxl, .h-xl {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); }
.h-xxl { font-size: clamp(2.3rem, 5.6vw, 4.6rem); }
.h-xl { font-size: clamp(2rem, 4.4vw, 3.5rem); }
h3 { font-size: 1.125rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-brand { color: var(--brand); }
.eyebrow-bike { color: var(--bike); }
.eyebrow-run { color: var(--run); }

.lead {
  margin-top: 20px;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.narrow { max-width: 44rem; }
.fine { font-size: 0.9375rem; color: var(--faint); }

.accent-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 0.9375rem; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 1.0625rem; }
.btn-primary { background: linear-gradient(120deg, var(--mark-orange), var(--mark-red)); color: #0b0d12; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); background: rgb(255 255 255 / 0.04); }
.btn-ghost:hover { border-color: rgb(255 255 255 / 0.32); background: rgb(255 255 255 / 0.08); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-center { justify-content: center; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.site-header.scrolled, .site-header.menu-open {
  background: rgb(7 9 13 / 0.82);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
}
.header-row { display: flex; align-items: center; gap: 24px; height: 100%; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.logo-img { height: 36px; width: auto; flex: none; }

.primary-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.primary-nav ul { display: flex; gap: 2px; }
.primary-nav ul a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; white-space: nowrap;
  border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
}
.primary-nav ul a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.menu-button { display: none; }

/* The menu collapses before its links would wrap (the English labels are the longer ones, docs/SITE.md §language). */
@media (max-width: 1240px) {
  .menu-button {
    display: inline-flex; align-items: center; gap: 10px; margin-left: auto;
    min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px;
    background: transparent; color: var(--text); font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer;
  }
  .menu-icon, .menu-icon::before, .menu-icon::after {
    display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.2s, opacity 0.2s;
  }
  .menu-icon { position: relative; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -5px; }
  .menu-icon::after { top: 5px; }
  .menu-open .menu-icon { background: transparent; }
  .menu-open .menu-icon::before { transform: translateY(5px) rotate(45deg); }
  .menu-open .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }

  /* Without JS the actions stay in the header; with JS they move into the menu panel. */
  .primary-nav { gap: 8px; }
  .js .primary-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 16px;
    padding: 12px var(--gutter) 24px;
    background: rgb(7 9 13 / 0.97); border-bottom: 1px solid var(--line);
  }
  .js .menu-open .primary-nav { display: flex; }
  .js .primary-nav ul { display: flex; flex-direction: column; gap: 0; }
  .js .primary-nav ul a { width: 100%; min-height: 52px; padding: 0 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; color: var(--text); }
  .js .nav-actions { flex-direction: column; align-items: stretch; }
  .js .nav-actions .lang-toggle { align-self: flex-start; }
  .js .nav-actions .btn { width: 100%; min-height: 50px; }
  html:not(.js) .menu-button { display: none; }
  html:not(.js) .primary-nav ul { display: none; }
  html:not(.js) .nav-actions .btn-ghost { display: none; }
}

/* ─── Devices (CSS frames around real screenshots) ─────────────────────────── */

.phone {
  position: relative;
  border-radius: 15% / 7%;
  background: linear-gradient(145deg, #2b2f37, #121418 60%, #23262d);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.14),
    0 40px 80px -30px rgb(0 0 0 / 0.9),
    0 0 0 1px rgb(0 0 0 / 0.6);
}
/* The bezel is the image's margin: a percentage of the frame's own width, wherever the frame is placed. */
.phone img { width: 93.2%; margin: 3.4%; border-radius: 12% / 5.6%; background: #000; }

.watch {
  position: relative;
  border-radius: 30%;
  background: linear-gradient(150deg, #34373e, #111317 55%, #2a2d33);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16), 0 30px 60px -24px rgb(0 0 0 / 0.9);
}
.watch img { width: 86%; margin: 7%; border-radius: 24%; background: #000; }

.laptop { position: relative; }
.laptop-screen {
  padding: 1.6% 1.6% 2%;
  border-radius: 18px 18px 4px 4px;
  background: #15181e;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12), 0 50px 90px -40px rgb(0 0 0 / 0.95);
}
.laptop-screen img { width: 100%; border-radius: 6px; }
.laptop-base {
  height: 14px; width: 112%; margin-left: -6%;
  border-radius: 2px 2px 14px 14px;
  background: linear-gradient(#3a3e46, #1b1e24 70%);
  box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.9);
}

/* ─── Sections ─────────────────────────────────────────────────────────────── */

.section { position: relative; padding-block: clamp(88px, 12vw, 160px); }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

/* 1 · Hero */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + clamp(40px, 7vw, 96px));
  padding-bottom: clamp(56px, 8vw, 110px);
  min-height: min(100svh, 980px);
  display: flex; align-items: center;
  isolation: isolate;
  overflow: hidden;
}
.hero-bg, .final-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img, .final-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgb(7 9 13 / 0.92) 0%, rgb(7 9 13 / 0.7) 40%, rgb(7 9 13 / 0.25) 75%),
    linear-gradient(180deg, rgb(7 9 13 / 0.55) 0%, rgb(7 9 13 / 0) 30%, rgb(7 9 13 / 0) 60%, var(--bg) 100%);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center; gap: clamp(32px, 5vw, 72px);
}
.hero-copy .lead { max-width: 36rem; color: #c3cad5; }
.platform-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.platform-line span {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgb(7 9 13 / 0.4); color: var(--muted); font-size: 0.875rem; font-weight: 500;
}
.hero-devices { position: relative; justify-self: center; width: min(100%, 340px); }
.hero-phone { width: 82%; margin-left: auto; }
.hero-watch { position: absolute; left: -6%; bottom: 8%; width: 46%; }

/* 2 · How */
.how { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.loop {
  position: relative;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px;
  margin-top: clamp(48px, 7vw, 88px);
  counter-reset: step;
}
.loop::before {
  content: ""; position: absolute; left: 6px; right: 6px; top: 7px; height: 2px;
  background: var(--brand-gradient);
  transform-origin: left; transform: scaleX(var(--p));
  opacity: 0.6;
}
.loop-step { position: relative; padding-top: 40px; counter-increment: step; }
.loop-step h3 { font-size: 1.35rem; letter-spacing: -0.02em; }
.loop-step h3::before { content: "0" counter(step); display: block; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 600; color: var(--faint); letter-spacing: 0.08em; }
.loop-step p { margin-top: 10px; color: var(--muted); font-size: 0.98rem; }
.loop-dot { position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--c, var(--brand)); box-shadow: 0 0 0 5px var(--bg-2), 0 0 24px var(--c, var(--brand)); }
/* The five steps along the mark's colours, green to red, as the line under them. */
.loop-step:nth-child(1) { --c: var(--mark-green); }
.loop-step:nth-child(2) { --c: var(--mark-yellow); }
.loop-step:nth-child(3) { --c: var(--mark-orange); }
.loop-step:nth-child(4) { --c: var(--brand); }
.loop-step:nth-child(5) { --c: var(--mark-red); }
.loop-coach h3 { color: #ffb3a8; }

/* 3 · Coach */
.coach { background: var(--bg-2); overflow: hidden; isolation: isolate; }
.coach-glow {
  position: absolute; z-index: -1; inset: -10% -20% auto; height: 80%;
  background: radial-gradient(50% 50% at 50% 40%, rgb(255 90 74 / 0.22), transparent 70%);
  pointer-events: none;
}
.coach-head { text-align: center; }
.coach-head .lead { margin-inline: auto; }
.coach-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: clamp(32px, 6vw, 96px);
  align-items: center; max-width: 1000px; margin: clamp(48px, 7vw, 96px) auto 0;
}
.chat {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line); border-radius: 28px;
  background: linear-gradient(180deg, rgb(22 28 39 / 0.9), rgb(13 17 24 / 0.9));
  box-shadow: 0 40px 100px -50px rgb(255 90 74 / 0.4);
}
.chat-caption { margin-bottom: 18px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.chat-list { position: relative; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 20px; font-size: 1rem; line-height: 1.45; }
.msg-athlete { align-self: flex-end; background: var(--brand-strong); color: #fff; border-bottom-right-radius: 6px; }
.msg-coach { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg-typing { display: none; position: absolute; left: 0; align-self: flex-start; gap: 5px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); }
.msg-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: typing 1.2s infinite; }
.msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat.typing .msg-typing { display: inline-flex; }
.msg-done { align-self: center; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 0.9375rem; color: var(--run); background: rgb(86 189 120 / 0.1); border: 1px solid rgb(86 189 120 / 0.3); }
.check { width: 16px; height: 16px; border-radius: 50%; background: var(--run); position: relative; flex: none; }
.check::after { content: ""; position: absolute; left: 5px; top: 2.5px; width: 4px; height: 8px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.proposal {
  align-self: flex-start; width: min(100%, 26rem);
  padding: 16px 18px; border-radius: 18px;
  background: var(--surface); border: 1px solid rgb(255 90 74 / 0.4);
}
.proposal-label { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 650; color: #ffb3a8; }
.spark { width: 12px; height: 12px; background: var(--brand); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.proposal-change { margin-top: 10px; font-size: 1rem; }
.proposal-change s { color: var(--faint); }
.proposal-bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: 12px; }
.proposal-bars i { display: block; border-radius: 2px; }
.b-easy { height: 40%; background: #3aa6a0; }
.b-hard { height: 100%; background: var(--run); }
.w1 { flex: 1; } .w2 { flex: 2; } .w3 { flex: 3; }
.proposal-why { margin-top: 10px; font-size: 0.9375rem; color: var(--muted); }
.proposal-actions { display: flex; gap: 8px; margin-top: 14px; }
.fake-btn { padding: 7px 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; border: 1px solid var(--line-strong); color: var(--muted); }
.fake-primary { background: #e5533d; border-color: #e5533d; color: #fff; }

.coach-phone { text-align: center; }
.coach-phone .phone { width: min(100%, 300px); margin-inline: auto; }
.coach-phone figcaption { margin-top: 16px; font-size: 0.875rem; color: var(--faint); }

.coach-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(64px, 8vw, 112px); }
.card { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card-quiet { background: transparent; }
.card h3 { margin-bottom: 16px; }
.ticks { display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: var(--muted); font-size: 0.98rem; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 12px; height: 7px; border: solid var(--brand); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.ticks-quiet li::before { width: 12px; height: 2px; top: 0.75em; border: 0; background: var(--faint); transform: none; }

/* 4 · Plan */
.split { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.feature-list { display: grid; gap: 14px; margin-top: 32px; }
.feature-list li { padding-left: 18px; border-left: 2px solid var(--line-strong); color: var(--muted); }
.feature-list strong { color: var(--text); font-weight: 600; }
.plan-visual { position: relative; padding-bottom: 8%; }
.plan-visual .laptop { width: 92%; }
.builder-visual { max-width: 960px; margin: clamp(40px, 6vw, 72px) auto 0; }
.plan-phone { position: absolute; right: 0; bottom: 0; width: 28%; }

/* 5 · Ride */
.ride { background: linear-gradient(180deg, var(--bg) 0%, #0d0b08 50%, var(--bg) 100%); }
.ride-rail { position: relative; }
.rail-list {
  display: flex; gap: clamp(16px, 2.5vw, 32px);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 8px max(var(--gutter), calc((100vw - var(--wrap)) / 2)) 24px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  scrollbar-width: none;
}
.rail-list::-webkit-scrollbar { display: none; }
.rail-item { flex: none; width: clamp(200px, 22vw, 260px); scroll-snap-align: start; }
.rail-cap { margin-top: 16px; font-size: 0.9375rem; color: var(--muted); }
.rail-cap strong { display: block; color: var(--text); font-weight: 600; }
.rail-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.rail-buttons button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: rgb(255 255 255 / 0.05); color: var(--text); font-size: 1.1rem; cursor: pointer;
}
.rail-buttons button:hover:not(:disabled) { background: rgb(255 255 255 / 0.1); }
.rail-buttons button:disabled { opacity: 0.35; cursor: default; }
.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: clamp(48px, 6vw, 80px); border-radius: var(--radius); overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.spec-grid li { padding: 28px; background: var(--bg); }
.spec-grid h3 { color: var(--text); }
.spec-grid p { margin-top: 8px; color: var(--muted); font-size: 0.98rem; }
.spec-grid li:nth-child(1) h3::before, .spec-grid li:nth-child(2) h3::before { background: var(--bike); }
.spec-grid h3::before { content: ""; display: block; width: 24px; height: 3px; margin-bottom: 14px; border-radius: 2px; background: var(--line-strong); }

/* 6 · Routes (scroll-driven on large screens: /assets/main.d9d992ccf9b2.js sets --p and data-step) */
.routes { background: var(--bg-2); padding-bottom: clamp(64px, 8vw, 120px); }
.routes-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.route-steps { display: grid; gap: 22px; margin-top: 36px; }
.route-steps li { padding-left: 20px; border-left: 2px solid var(--line-strong); transition: border-color 0.4s, opacity 0.4s; }
.route-steps p { margin-top: 6px; color: var(--muted); font-size: 0.98rem; }
.route-stage { position: relative; }
.route-map {
  position: relative; width: min(100%, 520px); margin-inline: auto;
  border-radius: 28px; overflow: hidden;
  background: radial-gradient(120% 80% at 30% 20%, #142034 0%, #0b111b 60%);
  border: 1px solid var(--line);
}
.route-svg { display: block; width: 100%; height: auto; aspect-ratio: 600 / 800; }
.grid-line { stroke: rgb(255 255 255 / 0.045); stroke-width: 1; }
.route-casing, .route-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
.route-casing { stroke: #0b2a5c; stroke-width: 14; opacity: 0.7; }
.route-line { stroke: var(--route); stroke-width: 6; filter: drop-shadow(0 0 10px rgb(47 124 246 / 0.6)); }
.route-casing, .route-line { stroke-dashoffset: calc(1 - clamp(0, (var(--p) - 0.08) * 2.6, 1)); }
.wp circle { fill: var(--route); stroke: #fff; stroke-width: 3; }
.wp text { fill: #fff; font: 700 15px var(--font); text-anchor: middle; }
.wp-0 { opacity: clamp(0, (var(--p) - 0.01) * 20, 1); }
.wp-1 { opacity: clamp(0, (var(--p) - 0.12) * 20, 1); }
.wp-2 { opacity: clamp(0, (var(--p) - 0.22) * 20, 1); }
.wp-3 { opacity: clamp(0, (var(--p) - 0.34) * 20, 1); }
.route-stats {
  position: absolute; left: 20px; right: 20px; top: 18px; display: flex; gap: 10px;
  opacity: clamp(0, (var(--p) - 0.45) * 8, 1);
}
.route-stats span { padding: 6px 12px; border-radius: 999px; background: rgb(7 9 13 / 0.75); border: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
.route-stats b { color: var(--text); font-size: 1rem; }
.profile-svg {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 18%;
  clip-path: inset(0 calc((1 - clamp(0, (var(--p) - 0.45) * 3.2, 1)) * 100%) 0 0);
}
.profile-area { fill: rgb(47 124 246 / 0.28); }
.profile-line { fill: none; stroke: var(--route); stroke-width: 2; vector-effect: non-scaling-stroke; }
.route-phone {
  position: absolute; right: max(-2%, calc(50% - 360px)); bottom: -6%; width: 40%;
  opacity: clamp(0, (var(--p) - 0.74) * 6, 1);
  transform: translateY(calc((1 - clamp(0, (var(--p) - 0.74) * 4, 1)) * 60px));
}
.routes-foot { margin-top: clamp(56px, 7vw, 96px); }
.routes-foot .fine { max-width: 44rem; }
.route-web { margin-top: 32px; }
.route-web img { border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 50px 100px -50px rgb(0 0 0 / 0.95); }
.route-web figcaption { margin-top: 14px; font-size: 0.875rem; color: var(--faint); }

/* 7 · Watch */
.watch-section { background: var(--bg); }
.watch-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.watch-row li { text-align: center; }
.watch-row p { margin-top: 14px; font-size: 0.9375rem; font-weight: 600; color: var(--muted); }

/* 8 · Analysis and recovery */
.analysis { background: linear-gradient(180deg, var(--bg) 0%, #08100c 100%); }
.analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.analysis-card {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 28px; align-items: center;
  padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.analysis-card p { margin-top: 10px; color: var(--muted); font-size: 0.98rem; }
.recovery {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center;
  margin-top: 20px; padding: 32px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgb(86 189 120 / 0.1), rgb(63 179 223 / 0.06)); border: 1px solid var(--line);
}
.recovery p { margin-top: 10px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 8px 14px; border-radius: 999px; background: rgb(7 9 13 / 0.6); border: 1px solid var(--line-strong); font-size: 0.9375rem; }

/* 9 · Platforms (scroll-driven on large screens) */
.eco { background: var(--bg-2); overflow: clip; }
.eco-sticky .section-head { text-align: center; margin-bottom: clamp(24px, 4vw, 48px); }
.eco-stage { position: relative; width: min(100%, 860px); margin-inline: auto; padding-bottom: 6%; }
.eco-laptop { width: 88%; margin-inline: auto; transform: translateY(calc((1 - clamp(0, var(--p) * 4, 1)) * 30px)); opacity: clamp(0.25, var(--p) * 4, 1); }
.eco-phone {
  position: absolute; right: 2%; bottom: 0; width: 22%;
  opacity: clamp(0, (var(--p) - 0.25) * 6, 1);
  transform: translateX(calc((1 - clamp(0, (var(--p) - 0.25) * 4, 1)) * 80px));
}
.eco-watch {
  position: absolute; left: 3%; bottom: 4%; width: 15%;
  opacity: clamp(0, (var(--p) - 0.5) * 6, 1);
  transform: translateX(calc((1 - clamp(0, (var(--p) - 0.5) * 4, 1)) * -80px));
}
.eco-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: clamp(28px, 4vw, 48px); }
.eco-steps li { padding-top: 14px; border-top: 2px solid var(--line-strong); transition: border-color 0.4s, opacity 0.4s; }
.eco-steps p { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }
.eco-foot { margin-top: clamp(56px, 7vw, 96px); }
.eco-extras { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 20px; }
.mini { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.mini p { margin-top: 10px; color: var(--muted); font-size: 0.98rem; }
.mini-social { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 24px; align-items: center; }
.availability { margin-top: 28px; }

/* Step highlighting while scroll-driven */
.motion [data-scrub].scrubbing .route-steps h3,
.motion [data-scrub].scrubbing .eco-steps h3 { color: var(--muted); transition: color 0.4s; }
.motion [data-scrub].scrubbing .route-steps p,
.motion [data-scrub].scrubbing .eco-steps p { color: var(--faint); }
.motion [data-scrub].scrubbing .route-steps li.active,
.motion [data-scrub].scrubbing .eco-steps li.active { border-color: var(--route); }
.motion [data-scrub].scrubbing .route-steps li.active h3,
.motion [data-scrub].scrubbing .eco-steps li.active h3 { color: var(--text); }
.motion [data-scrub].scrubbing .route-steps li.active p,
.motion [data-scrub].scrubbing .eco-steps li.active p { color: var(--muted); }

/* 10 · Who */
.sports { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.sport { border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); }
.sport img { width: 100%; aspect-ratio: 555 / 215; object-fit: cover; }
.sport h3, .sport p { padding-inline: 20px; }
.sport h3 { margin-top: 18px; color: var(--c); }
.sport p { margin: 8px 0 22px; color: var(--muted); font-size: 0.95rem; }
.sport-tri { --c: var(--brand); }
.sport-bike { --c: var(--bike); }
.sport-run { --c: var(--run); }
.sport-swim { --c: var(--swim); }
.sport-strength { --c: var(--strength); }

/* 11 · Final */
.final { text-align: center; isolation: isolate; overflow: hidden; padding-block: clamp(120px, 16vw, 220px); }
.final-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgb(7 9 13 / 0.55) 45%, rgb(7 9 13 / 0.85) 100%); }
.final-inner .lead { margin-inline: auto; max-width: 34rem; color: #c3cad5; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 4px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.footer-links a:hover { color: var(--text); }
.copyright { margin-left: auto; color: var(--faint); font-size: 0.875rem; }

/* ─── Motion (only when /assets/main.d9d992ccf9b2.js runs and the visitor allows motion) ────────── */

.motion [data-reveal].pending { opacity: 0; transform: translateY(28px); }
.motion [data-reveal] { transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.motion .loop.pending { --p: 0; }
.motion .loop { transition: --p 1.6s cubic-bezier(0.3, 0.6, 0.2, 1) 0.2s, opacity 0.9s, transform 0.9s; }
.motion .chat [data-chat-step] { transition: opacity 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s; }
.motion .chat [data-chat-step].hidden { opacity: 0; transform: translateY(12px); visibility: hidden; transition: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.motion .hero-copy > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.motion .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
.motion .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
.motion .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
.motion .hero-copy > :nth-child(5) { animation-delay: 0.24s; }
.motion .hero-phone { animation: rise-far 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
.motion .hero-watch { animation: rise-far 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both; }
@keyframes rise-far { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }

/* Large screens: the routes and platforms stages are pinned while scrolling drives --p. */
@media (min-width: 901px) and (min-height: 640px) {
  .motion .routes[data-scrub] { padding-top: 0; }
  .motion .routes[data-scrub] .routes-sticky,
  .motion .eco[data-scrub] .eco-sticky {
    position: sticky; top: 0; min-height: 100vh; display: flex; align-items: center;
    padding-block: calc(var(--header-h) + 24px) 32px;
  }
  .motion [data-scrub] [data-track] { height: 260vh; }
  .motion .eco[data-scrub] { padding-top: 0; }
  .motion .route-map { width: min(100%, 440px, calc((100vh - var(--header-h) - 80px) * 0.75)); }
  .motion .eco-stage { width: min(100%, 860px, calc((100vh - var(--header-h) - 320px) * 1.55)); }
}

/* Small screens and no scroll-driving: the stages play once when they come into view. */
.motion [data-scrub].play { transition: --p 2.6s cubic-bezier(0.3, 0.6, 0.2, 1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .loop { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 44px; }
  .loop::before { display: none; }
  .sports { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analysis-grid { grid-template-columns: minmax(0, 1fr); }
  .analysis-card { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-devices { width: min(78%, 300px); margin-top: 8px; }
  .coach-stage { grid-template-columns: minmax(0, 1fr); }
  .coach-phone .phone { width: min(70%, 260px); }
  .coach-cards { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .routes-grid { grid-template-columns: minmax(0, 1fr); }
  .route-map { width: min(100%, 440px); }
  .route-phone { right: 0; width: 36%; }
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .eco-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eco-extras { grid-template-columns: minmax(0, 1fr); }
  .recovery { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .section { padding-block: 72px; }
  .hero { padding-top: calc(var(--header-h) + 28px); }
  .hero-bg::after {
    background: linear-gradient(180deg, rgb(7 9 13 / 0.75) 0%, rgb(7 9 13 / 0.55) 35%, rgb(7 9 13 / 0.85) 70%, var(--bg) 100%);
  }
  .cta-row .btn { flex: 1 1 auto; }
  .loop { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .loop-step { padding: 0 0 0 36px; }
  .loop-dot { top: 4px; }
  .chat { padding: 18px; border-radius: 22px; }
  .msg { max-width: 94%; }
  .card, .mini, .analysis-card, .recovery { padding: 22px; }
  .analysis-card { grid-template-columns: minmax(0, 1fr); }
  .analysis-card .phone { width: min(52%, 210px); margin-inline: auto; }
  .plan-phone { width: 32%; }
  .spec-grid { grid-template-columns: minmax(0, 1fr); }
  .spec-grid li { padding: 22px; }
  .watch-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-row li:last-child { grid-column: 1 / -1; width: 50%; margin-inline: auto; }
  .eco-steps { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .mini-social { grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 18px; }
  .sports { grid-template-columns: minmax(0, 1fr); }
  .sport { display: grid; grid-template-columns: 38% minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .sport img { grid-row: 1 / span 2; height: 100%; aspect-ratio: auto; }
  .sport h3 { margin-top: 14px; padding-inline: 16px; }
  .sport p { margin: 6px 0 14px; padding-inline: 16px; }
  .copyright { margin-left: 0; width: 100%; }
}

/* 404 */
.notfound { display: flex; flex-direction: column; justify-content: center; gap: 0; min-height: 100vh; padding-block: 64px; }
.notfound .logo { margin-bottom: 48px; }

/* Integritet and Support (docs/SITE.md §pages): readable long-form text on the site's own background. */
.page { max-width: 46rem; padding-block: 48px 96px; }
.page .logo { display: inline-block; margin-bottom: 40px; }
.page h1 { margin-bottom: 16px; }
.page h2 { margin-top: 48px; font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.2; }
.page h3 { margin-top: 28px; font-size: 1.125rem; }
.page p, .page li { color: #c3cad5; line-height: 1.65; }
.page p { margin-top: 12px; }
.page ul { margin-top: 12px; padding-left: 1.25rem; list-style: disc; }
.page li + li { margin-top: 6px; }
.page a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.page .meta { color: var(--muted); font-size: 0.9375rem; }
.page .lang-switch { margin-top: 20px; }
.page hr { margin-top: 64px; border: 0; border-top: 1px solid var(--line); }

/* The language switch (docs/SITE.md §language): SV / EN, the current one marked. */
.lang-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; }
.lang-toggle a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 30px; padding: 0 8px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.lang-toggle a:hover { color: var(--text); }
.lang-toggle a[aria-current="true"] { color: var(--text); background: rgb(255 255 255 / 0.1); }
.page-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.page-top .logo { margin-bottom: 0; }
