/* APEX core website, version 2. Order: fonts, tokens, base, components, sections, scenes, motion.
   Direction A ("Ein OK genügt.") with the Austrian "Passt." as accent. Design notes in DESIGN.md. */

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

@font-face { font-family: "Poppins"; src: url("../fonts/poppins-400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-500.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-700.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
/* New Zen (Newlyn) needs its own web licence. Until the files are in fonts/, an installed copy is used,
   otherwise display text falls back to Poppins Bold. Add url("../fonts/new-zen-800.woff2") here later. */
@font-face { font-family: "New Zen"; src: local("New Zen ExtraBold"), local("NewZen-ExtraBold"); font-weight: 800; font-style: normal; font-display: swap; }

/* ---------- Tokens: light values first, dark values for the system setting and for an explicit choice ---------- */

:root {
  --brand: #133c83;          /* measured from the logo; stands for the human decision */
  --brand-fill: #133c83;
  --brand-strong: #0e2d63;
  --brand-tint: #e6ecf6;
  --brand-tint-2: #ccd9ee;
  --on-brand: #ffffff;
  --ink: #0f1a2e;
  --ink-2: #3a4559;
  --ink-3: #5b6679;
  --paper: #f4f6f9;
  --surface: #ffffff;
  --sunken: #eaeef4;
  --line: #dce2ea;
  --line-strong: #c4ccd8;
  --wait: #8a4f00;
  --wait-tint: #fbefd8;
  --ok: #17663f;
  --ok-tint: #e2f1e8;
  --mute-tint: #eceff3;
  --danger: #b4332e;
  --band: #133c83;
  --band-mark: #1c4a98;
  --on-band: #ffffff;
  --on-band-2: #c8d6f0;
  --inverse-bg: #ffffff;
  --inverse-fg: #133c83;
  --inverse-hover: #e6ecf6;
  --node-you: #133c83;
  --hero-field: #ccd9ee;
  --chat-me: #133c83;
  --card-edge: #e3e8ef;
  --shadow: 0 1px 2px rgb(15 26 46 / 0.07), 0 24px 48px -24px rgb(15 26 46 / 0.24);
  --logo-apex: var(--brand);
  --logo-core: var(--ink);

  --font-display: "New Zen", "Poppins", ui-sans-serif, sans-serif;
  --font-text: "Poppins", ui-sans-serif, sans-serif;
  --fs-h2: clamp(2rem, 1.3rem + 2.4vw, 3.4rem);

  --container: 1240px;
  --gutter: 24px;
  --nav-h: 64px;
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #9dbbf5; --brand-fill: #2e5bb5; --brand-strong: #244c9c; --brand-tint: #14223d; --brand-tint-2: #22385f;
    --ink: #e8edf5; --ink-2: #b3bed0; --ink-3: #8f9bb1; --paper: #0b1220; --surface: #121b2d; --sunken: #0f1727;
    --line: #24304a; --line-strong: #33415e; --wait: #f2c27a; --wait-tint: #3a2a10; --ok: #8fd3ae; --ok-tint: #12301f;
    --mute-tint: #1a2336; --danger: #f1a39e; --band: #1a3a78; --band-mark: #24488c; --inverse-bg: #e8edf5; --inverse-hover: #ffffff;
    --node-you: #9dbbf5; --hero-field: #1a2d50; --chat-me: #2e5bb5; --card-edge: var(--line-strong);
    --shadow: 0 2px 6px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #9dbbf5; --brand-fill: #2e5bb5; --brand-strong: #244c9c; --brand-tint: #14223d; --brand-tint-2: #22385f;
  --ink: #e8edf5; --ink-2: #b3bed0; --ink-3: #8f9bb1; --paper: #0b1220; --surface: #121b2d; --sunken: #0f1727;
  --line: #24304a; --line-strong: #33415e; --wait: #f2c27a; --wait-tint: #3a2a10; --ok: #8fd3ae; --ok-tint: #12301f;
  --mute-tint: #1a2336; --danger: #f1a39e; --band: #1a3a78; --band-mark: #24488c; --inverse-bg: #e8edf5; --inverse-hover: #ffffff;
  --node-you: #9dbbf5; --hero-field: #1a2d50; --chat-me: #2e5bb5; --card-edge: var(--line-strong);
  --shadow: 0 2px 6px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}
@media (max-width: 640px) { :root { --gutter: 20px; } }

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 1.0625rem/1.65 var(--font-text);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }
b, strong { color: var(--ink); font-weight: 600; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.h2 { font: 800 var(--fs-h2)/1.04 var(--font-display); letter-spacing: -0.025em; }
.copy { max-width: 46ch; margin-top: 18px; font-size: 1.125rem; }
.note { color: var(--ink-3); font-size: 0.875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 40; padding: 10px 16px; border-radius: var(--r-m); background: var(--brand-fill); color: var(--on-brand); text-decoration: none; }
.skip:focus { top: 12px; }
.icon { width: 1.125em; height: 1.125em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Brand lockup: logo files as masks, so both themes get the right colour ---------- */

.brand { --logo-h: 24px; display: inline-flex; align-items: flex-end; gap: calc(var(--logo-h) * 0.24); padding-block: 6px; text-decoration: none; }
.brand__apex, .brand__core { display: block; -webkit-mask: var(--mask) center / contain no-repeat; mask: var(--mask) center / contain no-repeat; }
.brand__apex { --mask: url("../assets/logo-apex.png"); height: var(--logo-h); aspect-ratio: 2000 / 529; background: var(--logo-apex); }
.brand__core { --mask: url("../assets/logo-core.png"); height: calc(var(--logo-h) * 0.68); aspect-ratio: 1337 / 365; background: var(--logo-core); }
@media (forced-colors: active) { .brand__apex, .brand__core { forced-color-adjust: none; background: CanvasText; } }

/* ---------- Buttons, links, chips ---------- */

.button {
  --bg: transparent; --fg: var(--ink); --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  border: 1px solid var(--bd); border-radius: var(--r-m);
  background: var(--bg); color: var(--fg);
  font: 500 1rem/1 var(--font-text); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.12s var(--ease-out);
}
.button:active:not(:disabled, [aria-disabled="true"]) { transform: scale(0.97); }
.button:disabled, .button[aria-disabled="true"] { cursor: default; opacity: 0.5; }
.button--small { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; gap: 8px; }
.button--primary { --bg: var(--brand-fill); --fg: var(--on-brand); }
.button--quiet { --bd: var(--line-strong); }
.button--inverse { --bg: var(--inverse-bg); --fg: var(--inverse-fg); }
.icon--arrow { transition: transform 0.25s var(--ease-out); }
@media (hover: hover) {
  .button--primary:hover:not(:disabled, [aria-disabled="true"]) { --bg: var(--brand-strong); }
  .button--quiet:hover:not(:disabled, [aria-disabled="true"]) { --bd: var(--ink-3); --bg: var(--paper); }
  .button--inverse:hover { --bg: var(--inverse-hover); }
  .button:hover .icon--arrow { transform: translateX(3px); }
}
.text-link { position: relative; color: var(--ink); font-weight: 500; text-decoration: underline 1px var(--line-strong); text-underline-offset: 7px; }
.text-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-out); }
@media (hover: hover) { .text-link:hover::after { transform: scaleX(1); } }
.chip { display: inline-flex; align-items: center; width: fit-content; padding: 3px 10px; border-radius: var(--r-s); background: var(--wait-tint); color: var(--wait); font-size: 0.8125rem; font-weight: 500; line-height: 1.5; }
.chip--ok { background: var(--ok-tint); color: var(--ok); }
.chip--mute { background: var(--mute-tint); color: var(--ink-3); }
.chip--brand { background: var(--brand-tint); color: var(--brand); }
.soon { margin-left: 6px; padding: 1px 7px; border-radius: var(--r-s); background: var(--mute-tint); color: var(--ink-3); font-size: 0.75rem; font-weight: 500; vertical-align: 0.1em; }

/* ---------- Navigation ---------- */

.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.nav__inner { display: flex; align-items: center; gap: 40px; height: var(--nav-h); }
.nav__links { display: flex; gap: 28px; }
.nav__links a, .nav__login, .footer__links a, .footer__links button {
  position: relative; padding: 6px 0; border: 0; background: none; color: var(--ink-2);
  font-size: 0.9375rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.nav__links a::after, .nav__login::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease-out); }
@media (hover: hover) {
  .nav__links a:hover, .nav__login:hover, .footer__links a:hover, .footer__links button:hover { color: var(--ink); }
  .nav__links a:hover::after, .nav__login:hover::after { transform: scaleX(1); }
}
.nav__actions { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav__menu { display: none; place-items: center; width: 44px; height: 44px; margin-right: -10px; border: 0; border-radius: var(--r-m); background: none; color: var(--ink); cursor: pointer; }
.nav__menu .icon { width: 24px; height: 24px; }
@media (max-width: 1080px) { .nav__links { display: none; } .nav__menu { display: grid; } }
@media (max-width: 640px) { .nav__cta, .nav__login { display: none; } }

.menu[popover], .login[popover] {
  margin: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); opacity: 1; transform: none;
  transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out), overlay 0.18s allow-discrete, display 0.18s allow-discrete;
}
.menu[popover]:not(:popover-open), .login[popover]:not(:popover-open) { opacity: 0; }
@starting-style { .menu[popover]:popover-open, .login[popover]:popover-open { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .menu[popover]:not(:popover-open), .login[popover]:not(:popover-open) { transform: translateY(-6px); }
  @starting-style { .menu[popover]:popover-open, .login[popover]:popover-open { transform: translateY(-6px); } }
}
.menu[popover] {
  position: fixed; inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 auto 0; width: auto;
  max-height: calc(100dvh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px var(--gutter) 28px; border-width: 0 0 1px; background: var(--paper);
}
.menu nav { display: grid; }
.menu nav a { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); font: 800 1.5rem/1.2 var(--font-display); text-decoration: none; }
.menu__actions { display: grid; gap: 12px; margin-top: 24px; }
.login[popover] {
  position: fixed; inset: calc(var(--nav-h) + 8px) max(var(--gutter), (100% - var(--container)) / 2) auto auto;
  width: min(380px, 100% - 2 * var(--gutter)); padding: 22px; border-color: var(--card-edge); border-radius: var(--r-l); box-shadow: var(--shadow);
}
.login::backdrop { background: transparent; }
.login__form { display: grid; gap: 10px; }
.login__label { color: var(--ink); font-weight: 500; }
.login__field { display: flex; align-items: center; min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--paper); }
.login__field:focus-within { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: 1px; }
.login__field input { flex: 1; min-width: 0; height: 46px; padding: 0 4px 0 14px; border: 0; background: none; color: var(--ink); font: 500 1rem var(--font-text); outline: none; }
.login__suffix { padding-right: 14px; color: var(--ink-3); font-size: 0.9375rem; }
.login__hint { color: var(--ink-3); font-size: 0.875rem; line-height: 1.5; }
.login__error { color: var(--danger); font-size: 0.875rem; line-height: 1.5; }
.login__field:has(input[aria-invalid="true"]) { border-color: var(--danger); }
.login__form .button { margin-top: 6px; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(36px, 6vh, 72px) clamp(72px, 9vw, 120px); overflow-x: clip; }
.hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
.hero__text { grid-column: 1 / span 6; }
.hero__title { display: grid; gap: 4px; }
.hero__done { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font: 700 clamp(1.3rem, 0.95rem + 1.5vw, 2.1rem)/1.15 var(--font-display); letter-spacing: -0.015em; }
.hero__done .tick { display: grid; place-items: center; width: 0.95em; height: 0.95em; border-radius: var(--r-s); background: var(--ok-tint); color: var(--ok); }
.hero__done .tick svg { width: 0.62em; height: 0.62em; stroke-width: 3; }
.hero__claim { margin-top: 10px; color: var(--ink); font: 800 clamp(3rem, 1.4rem + 6vw, 6.25rem)/0.98 var(--font-display); letter-spacing: -0.04em; }
.hero__claim em { font-style: normal; color: var(--brand); }
.lead { max-width: 34ch; margin-top: 26px; color: var(--ink-2); font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem); line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.hero__stage { grid-column: 8 / -1; position: relative; isolation: isolate; padding-top: 18px; }
.hero__stage::before {
  content: ""; position: absolute; z-index: -1; top: 110px; bottom: calc(-1 * clamp(72px, 9vw, 120px)); left: 26%;
  right: calc((min(var(--container), 100vw - 2 * var(--gutter)) - 100vw) / 2);
  border-radius: var(--r-l) 0 0 var(--r-l); background: var(--hero-field);
}

/* Approval card: the one real card on the page */
.approval { position: relative; width: min(100%, 520px); border: 1px solid var(--card-edge); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); font-size: 0.9375rem; line-height: 1.55; }
.approval__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; color: var(--ink-3); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.approval__source { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; }
.approval__mail { margin: 8px 22px 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.approval__label { padding: 16px 22px 2px; color: var(--ink-3); font-size: 0.8125rem; font-weight: 500; }
.approval__steps { list-style: none; padding: 0 22px; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 9px 0; }
.step__icon { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-s); background: var(--paper); color: var(--ink-2); transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out); }
.step__icon .icon { grid-area: 1 / 1; width: 16px; height: 16px; transition: opacity 0.2s var(--ease-out), transform 0.3s var(--ease-out); }
.step__ok { opacity: 0; transform: scale(0.6); stroke-width: 2.25; }
.step.is-done .step__icon { background: var(--ok-tint); color: var(--ok); }
.step.is-done .step__todo { opacity: 0; transform: scale(0.6); }
.step.is-done .step__ok { opacity: 1; transform: none; }
.step__title { padding-top: 3px; color: var(--ink); font-weight: 500; }
.step__text, .step__edit { display: block; width: 100%; margin-top: 8px; padding: 10px 12px; border-radius: var(--r-s); background: var(--paper); color: var(--ink-2); font: 400 0.875rem/1.55 var(--font-text); }
.step__text[hidden], .step__edit[hidden] { display: none; }
.step__edit { border: 1px solid var(--brand); resize: vertical; min-height: 7.5em; }
.file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 8px; color: var(--ink-3); font-size: 0.8125rem; overflow-wrap: anywhere; }
.file .icon { width: 15px; height: 15px; }
.approval__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 16px 22px 20px; border-top: 1px solid var(--line); }
.approval__buttons { display: flex; gap: 8px; }
.approval[data-state="done"] .chip { background: var(--ok-tint); color: var(--ok); }
.approval[data-state="done"] .approval__buttons { display: none; }
.approval__done { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; padding: 0 22px 20px; color: var(--ink-2); font-size: 0.875rem; }
.approval__done[hidden] { display: none; }
.approval__done p { max-width: 34ch; }
.approval__again { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: var(--ink); font-weight: 500; cursor: pointer; }
.approval__again .icon { width: 15px; height: 15px; }
/* The Austrian accent: approving stamps "Passt." on the card */
.stamp {
  position: absolute; right: 26px; top: 46%; z-index: 2; padding: 2px 14px 6px;
  border: 3px solid var(--brand); border-radius: var(--r-m); color: var(--brand);
  font: 800 2.4rem/1 var(--font-display); letter-spacing: -0.03em;
  opacity: 0; transform: rotate(-9deg) scale(1.6); pointer-events: none;
  mix-blend-mode: multiply;
}
.approval[data-state="done"] .stamp { opacity: 0.92; transform: rotate(-9deg) scale(1); transition: opacity 0.18s ease-out, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1); }
:root[data-theme="dark"] .stamp { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stamp { mix-blend-mode: normal; } }

/* ---------- Chapters ---------- */

.chapter { padding-block: clamp(96px, 12vw, 168px) 0; }
.chapter__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.chapter__head > div { grid-column: 1 / span 7; }
.facts3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.facts3 div { padding-top: 16px; border-top: 2px solid var(--ink); }
.facts3 b { display: block; font-size: 1.0625rem; }
.facts3 p { margin-top: 6px; font-size: 0.9375rem; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.examples span { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); font-size: 0.875rem; }

/* ---------- Scroll scenes: tall block, sticky stage, progress from scrolling ---------- */

.scene { position: relative; height: 280vh; margin-top: 40px; }
.scene--short { height: 220vh; }
.scene__sticky { position: sticky; top: calc(var(--nav-h) + 16px); height: calc(100vh - var(--nav-h) - 32px); min-height: 520px; max-height: 760px; }
.stage { position: relative; height: 100%; overflow: hidden; border-radius: var(--r-l); background: var(--sunken); isolation: isolate; }
.scrub { position: absolute; right: 20px; top: 22px; z-index: 5; width: 72px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.scrub::after { content: ""; position: absolute; inset: 0; background: var(--brand); transform-origin: left; transform: scaleX(var(--p, 0)); }
.forced .scene { height: auto; margin-bottom: 24px; }
.forced .scene__sticky { position: relative; top: 0; height: 680px; }
@media (prefers-reduced-motion: reduce) {
  .scene, .scene--short { height: auto; }
  .scene__sticky { position: relative; top: 0; height: 640px; }
  .scrub { display: none; }
}

/* Scene: the inbox sorts itself */
.inbox__head { position: absolute; left: 24px; right: 24px; top: 52px; z-index: 4; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.inbox__head strong { color: var(--ink); font: 800 clamp(1.4rem, 1rem + 1.4vw, 2.1rem)/1.1 var(--font-display); letter-spacing: -0.02em; }
.inbox__head span { color: var(--ink-3); font-size: 0.875rem; }
.inbox__empty { position: absolute; left: 24px; top: 50%; width: 40%; transform: translateY(-50%); opacity: var(--empty, 0); display: grid; gap: 8px; }
.inbox__empty b { color: var(--ink); font: 800 clamp(1.8rem, 1.2rem + 2.2vw, 3.2rem)/1.02 var(--font-display); letter-spacing: -0.03em; }
.inbox__empty span { color: var(--ink-3); }
.today { position: absolute; top: 120px; bottom: 24px; right: 24px; width: min(460px, 52%); display: grid; align-content: start; gap: 6px; }
.today h3 { margin-top: 10px; color: var(--ink-3); font: 600 0.75rem/1.4 var(--font-text); letter-spacing: 0.02em; opacity: var(--groups, 0); }
.slot { height: 58px; border-radius: var(--r-m); }
.item { position: absolute; left: 0; top: 0; z-index: 2; width: var(--w, 300px); height: 58px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; padding: 0 12px; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow); will-change: transform; }
.item__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-s); background: var(--paper); color: var(--ink-2); }
.item__icon .icon { width: 16px; height: 16px; }
.item__text { min-width: 0; display: grid; }
.item__from { overflow: hidden; color: var(--ink-3); font-size: 0.6875rem; white-space: nowrap; text-overflow: ellipsis; }
.item__subj { overflow: hidden; color: var(--ink); font-size: 0.8125rem; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.item__done { overflow: hidden; max-height: 0; opacity: 0; color: var(--ok); font-size: 0.75rem; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; transition: opacity 0.25s var(--ease-out); }
.item[data-kind="wait"] .item__done { color: var(--wait); }
.item[data-kind="noise"] .item__done { color: var(--ink-3); }
.item.is-sorted .item__from { display: none; }
.item.is-sorted .item__done { max-height: 1.4em; opacity: 1; }
.item[data-kind="noise"].is-sorted { opacity: 0.55; }
@media (max-width: 720px) {
  .inbox__empty { display: none; }
  .inbox__head { top: 48px; flex-direction: column; gap: 4px; }
  .today { left: 16px; right: 16px; width: auto; top: 112px; bottom: 12px; gap: 4px; }
  .today h3 { margin-top: 4px; font-size: 0.6875rem; }
  .slot, .item { height: 40px; }
  .item { gap: 8px; padding: 0 10px; }
  .item__subj { font-size: 0.75rem; }
  .item__icon { width: 26px; height: 26px; }
}

/* Scene: the A of the logo as the way of a task, zooming into the approval */
.knick svg { position: absolute; left: 50%; top: 54%; width: min(560px, 82%); height: auto; transform: translate(-50%, -50%) scale(var(--a-scale, 1)); transform-origin: 71% 55%; opacity: var(--a-op, 1); }
.knick__shape { fill: none; stroke: var(--brand-tint-2); stroke-width: 104; stroke-linecap: round; stroke-linejoin: round; }
.knick__line { fill: none; stroke: var(--ink-2); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: var(--draw, 1); }
.knick__node { fill: var(--surface); stroke: var(--ink-2); stroke-width: 4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.knick__node--you { fill: var(--node-you); stroke: var(--node-you); }
.knick__label { fill: var(--ink-2); font: 500 30px var(--font-text); opacity: 0; }
.knick__label--you { fill: var(--brand); font-weight: 700; }
.knick__words { position: absolute; left: 24px; top: 56px; z-index: 4; font: 800 clamp(1.5rem, 1rem + 1.6vw, 2.4rem)/1.1 var(--font-display); letter-spacing: -0.02em; }
.knick__words span { display: block; color: var(--line-strong); transition: color 0.3s var(--ease-out); }
.knick__words span.is-on { color: var(--ink); }
.knick__words span.is-you.is-on { color: var(--brand); }
.mini { position: absolute; left: 50%; top: 52%; z-index: 6; width: min(420px, 88%); padding: 18px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); transform: translate(-50%, -50%) scale(var(--card-scale, 0.2)); opacity: var(--card-op, 0); font-size: 0.875rem; }
.mini__row { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 6px 0; }
.mini__dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-s); background: var(--sunken); color: var(--ink-2); font-size: 0.75rem; font-weight: 700; }
.mini__row.is-done .mini__dot { background: var(--ok-tint); color: var(--ok); }
.mini__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--r-m); background: var(--brand-fill); color: var(--on-brand); font-size: 0.875rem; font-weight: 500; transition: transform 0.12s var(--ease-out), background-color 0.12s; }
.pill.is-pressed { transform: scale(0.94); background: var(--brand-strong); }
.pill--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (max-width: 720px) { .knick__words { font-size: 1.3rem; } }

/* Scene: one sentence instead of a workflow */
.flow { position: absolute; inset: 72px 24px 24px; }
.flow .wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.wires path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 5 5; }
.node { position: absolute; left: 0; top: 0; width: 168px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--sunken); color: var(--ink-2); font-size: 0.75rem; line-height: 1.35; will-change: transform, opacity; }
.node b { display: block; color: var(--ink); font-size: 0.6875rem; }
.sentence { position: absolute; left: 50%; top: 50%; width: min(640px, 100% - 16px); transform: translate(-50%, -50%); padding: 24px 26px; border: 1px solid transparent; border-radius: var(--r-l); transition: background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out); }
.sentence.is-card { background: var(--surface); box-shadow: var(--shadow); }
.sentence__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; opacity: 0; transition: opacity 0.3s var(--ease-out); }
.sentence.is-card .sentence__meta, .sentence.is-card .sentence__chips { opacity: 1; }
.sentence__meta b { font-size: 0.8125rem; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 22px; background: var(--brand-fill); }
.switch::after { content: ""; position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #ffffff; }
.sentence__text { min-height: 3.6em; color: var(--ink); font: 600 clamp(1.05rem, 0.9rem + 0.8vw, 1.45rem)/1.4 var(--font-text); }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.15em; background: var(--brand); }
.sentence__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; opacity: 0; transition: opacity 0.3s var(--ease-out); }
.flow__label { position: absolute; left: 24px; bottom: 20px; z-index: 3; color: var(--ink-3); font-size: 0.8125rem; font-weight: 500; }
@media (max-width: 720px) { .node { width: 124px; padding: 7px 9px; font-size: 0.6875rem; } }

/* Scene: ask anything, three panels that pan sideways */
.ask__track { position: absolute; left: 0; top: 0; bottom: 0; display: flex; align-items: center; gap: 24px; padding-inline: 32px; will-change: transform; }
.ask { flex: none; display: grid; align-content: start; gap: 14px; width: min(480px, 78vw); }
.ask__q { justify-self: end; max-width: 88%; padding: 10px 14px; border-radius: 16px 16px 6px 16px; background: var(--chat-me); color: #ffffff; font-size: 0.9375rem; }
.ask__q .icon { margin-right: 6px; vertical-align: -0.15em; }
.ask__steps { display: grid; gap: 6px; color: var(--ink-3); font-size: 0.8125rem; }
.ask__steps span { display: flex; align-items: center; gap: 8px; }
.ask__steps .icon { width: 14px; height: 14px; color: var(--ok); stroke-width: 2.5; }
.ask__a { padding: 12px 14px; border-radius: 16px 16px 16px 6px; background: var(--surface); color: var(--ink); font-size: 0.9375rem; box-shadow: var(--shadow); }
.ask__file { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ask__file i { display: grid; place-items: center; width: 34px; height: 40px; border-radius: 5px; color: #ffffff; font: 700 0.625rem/1 var(--font-text); font-style: normal; }
.ask__file b { display: block; font-size: 0.8125rem; }
.ask__file small { color: var(--ink-3); font-size: 0.75rem; }
.ft-xlsx { background: #1d6f42; } .ft-docx { background: #2b579a; } .ft-ok { background: var(--brand-fill); }
.ask__intro { flex: none; width: min(340px, 70vw); }
.ask__intro b { display: block; color: var(--ink); font: 800 clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem)/1.08 var(--font-display); letter-spacing: -0.02em; }
.ask__intro p { margin-top: 12px; color: var(--ink-3); font-size: 0.9375rem; }
@media (max-width: 720px) {
  .scene--ask { height: auto; }
  .scene--ask .scene__sticky { position: relative; top: 0; height: auto; min-height: 0; max-height: none; }
  .scene--ask .stage { height: auto; }
  .scene--ask .ask__track { position: relative; flex-direction: column; align-items: stretch; padding: 20px 16px; transform: none !important; }
  .scene--ask .ask, .scene--ask .ask__intro { width: auto; }
}

/* Scene: "Passt." in a chat */
.passt { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 24px; padding: 64px 40px 32px; }
.passt__word { color: var(--brand); font: 800 clamp(3.4rem, 2rem + 7vw, 8.5rem)/0.95 var(--font-display); letter-spacing: -0.04em; transform: scale(var(--w-scale, 0.9)); transform-origin: left center; opacity: var(--w-op, 0.12); }
.passt__sub { max-width: 28ch; margin-top: 16px; color: var(--ink-2); font-size: 1.0625rem; opacity: var(--w-op, 0.12); }
.phone { justify-self: center; width: min(330px, 100%); height: min(600px, 100%); padding: 12px; border-radius: 40px; background: var(--ink); }
.phone__screen { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 30px; background: var(--sunken); }
.phone__bar { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.phone__bar .mark { display: block; width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--brand-tint); fill: var(--brand); }
.phone__bar b { display: block; font-size: 0.875rem; }
.phone__bar small { display: block; color: var(--ink-3); font-size: 0.6875rem; }
.thread { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 12px; overflow: hidden; }
.msg { max-width: 84%; padding: 9px 12px; border-radius: 16px; background: var(--surface); color: var(--ink); font-size: 0.8125rem; line-height: 1.45; opacity: 0; transform: translateY(14px); transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out); }
.msg.is-in { opacity: 1; transform: none; }
.msg--me { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--chat-me); color: #ffffff; }
.msg--apex { border-bottom-left-radius: 6px; }
.msg time { display: block; margin-top: 2px; font-size: 0.625rem; text-align: right; opacity: 0.7; }
.msg-card { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border-radius: 12px; background: var(--sunken); }
.msg-card b { font-size: 0.75rem; }
.msg-card p { color: var(--ink-2); font-size: 0.75rem; }
.msg-card .row { display: flex; gap: 6px; }
.msg-card .pill { min-height: 30px; padding: 0 12px; font-size: 0.75rem; }
.msg-card .state { display: none; color: var(--ok); font-size: 0.75rem; font-weight: 600; }
.msg-card.is-sent .row { display: none; }
.msg-card.is-sent .state { display: block; }
@media (max-width: 720px) {
  .passt { grid-template-columns: minmax(0, 1fr); align-content: start; padding: 56px 16px 16px; }
  .passt__word { font-size: 3.2rem; }
  .passt__sub { display: none; }
  .phone { height: 440px; }
}

/* ---------- Apps ---------- */

.apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; margin-top: 48px; }
.apps h3 { padding-top: 16px; border-top: 2px solid var(--ink); color: var(--ink-3); font: 500 0.875rem/1.4 var(--font-text); }
.apps ul { display: grid; gap: 8px; margin-top: 16px; padding: 0; list-style: none; }
.apps li { color: var(--ink); font-size: 1.0625rem; font-weight: 500; line-height: 1.35; }
.apps li small { display: block; color: var(--ink-3); font-size: 0.8125rem; font-weight: 400; }
.chat-head { margin-top: clamp(72px, 9vw, 112px); }
.apps__note { margin-top: 32px; }

/* ---------- Industries ---------- */

.tabs { margin-top: 40px; }
.tabs__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs__list button { min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; }
.tabs__list button[aria-selected="true"] { border-color: var(--brand-fill); background: var(--brand-fill); color: var(--on-brand); }
.tab-panel { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; margin-top: 28px; padding: clamp(24px, 4vw, 44px); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); }
.tab-panel[hidden] { display: none; }
.tab-panel__claim { grid-column: 1 / span 5; }
.tab-panel__claim p:first-child { color: var(--ink); font: 800 clamp(1.7rem, 1.2rem + 1.8vw, 2.7rem)/1.06 var(--font-display); letter-spacing: -0.02em; }
.tab-panel__claim p:first-child span { color: var(--brand); }
.tab-panel__claim p + p { margin-top: 14px; }
.tab-panel__claim a { display: inline-block; margin-top: 20px; }
.lines { grid-column: 7 / -1; display: grid; gap: 0; padding: 0; list-style: none; }
.lines li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-block: 14px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 1.0625rem; font-weight: 500; }
.lines li:last-child { border-bottom: 0; }
.lines li span { color: var(--brand); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) { .tab-panel:not([hidden]) { animation: fade-in 0.35s var(--ease-out); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Trust ---------- */

.trust { margin-top: clamp(96px, 12vw, 168px); padding-block: clamp(80px, 10vw, 128px); background: var(--surface); }
.facts { margin-top: 48px; }
.fact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px 24px; padding-block: 26px; }
.fact + .fact { border-top: 1px solid var(--line); }
.fact dt { grid-column: 1 / span 5; color: var(--ink); font: 800 1.375rem/1.3 var(--font-display); letter-spacing: -0.01em; }
.fact dd { grid-column: 7 / -1; max-width: 52ch; }

/* ---------- Pricing as a sum ---------- */

.sum { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: 24px; margin-top: 56px; padding: 0; list-style: none; }
.sum__word { display: block; color: var(--ink); font: 800 clamp(1.875rem, 1.2rem + 1.7vw, 2.875rem)/1.05 var(--font-display); letter-spacing: -0.02em; }
.sum__text { display: block; max-width: 26ch; margin-top: 12px; }
.sum__op { color: var(--ink-3); font: 400 clamp(1.875rem, 1.2rem + 1.7vw, 2.875rem)/1.05 var(--font-text); }
.price-notes { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 24px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.price-notes p:first-child { grid-column: 1 / span 6; color: var(--ink); font-weight: 500; }
.price-notes p:last-child { grid-column: 8 / -1; }

/* ---------- Closing band: "Passt?" ---------- */

.closing { margin-top: clamp(96px, 12vw, 168px); overflow: hidden; padding-block: clamp(80px, 10vw, 128px); background: var(--band); color: var(--on-band-2); }
.closing__inner { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.closing__text { grid-column: 1 / span 7; position: relative; z-index: 1; }
.closing__word { color: var(--on-band); font: 800 clamp(4rem, 2rem + 8vw, 9rem)/0.9 var(--font-display); letter-spacing: -0.045em; }
.closing__text > p:not(.closing__word):not(.closing__mail) { max-width: 46ch; margin-top: 22px; font-size: 1.125rem; }
.closing .button { margin-top: 32px; }
.closing__mail { margin-top: 20px; font-size: 0.9375rem; }
.closing__mail a { color: var(--on-band); text-underline-offset: 3px; }
.closing :focus-visible { outline-color: var(--on-band); }
.closing__mark { grid-column: 9 / -1; align-self: center; justify-self: end; width: 100%; max-width: 440px; aspect-ratio: 662 / 529; background: var(--band-mark); -webkit-mask: url("../assets/mark.png") center / contain no-repeat; mask: url("../assets/mark.png") center / contain no-repeat; translate: 18% 0; }

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

.footer { padding-block: 40px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.footer__by { color: var(--ink-3); font-size: 0.9375rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
.footer__links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Industry pages ---------- */

.kicker { color: var(--brand); font-size: 0.9375rem; font-weight: 600; }
.hero__claim--branch { margin-top: 14px; font-size: clamp(2.4rem, 1.2rem + 3.6vw, 4rem); line-height: 1.02; }
.hero__claim--branch span { display: block; }
.hero__claim--branch span + span { color: var(--brand); }
.branch-lines { margin-top: 40px; max-width: 760px; }
.branch-lines .lines { padding: 0; }
.branch-note { max-width: 60ch; margin-top: 28px; padding: 16px 18px; border-radius: var(--r-m); background: var(--brand-tint); color: var(--ink-2); }
.facts3 a { color: var(--ink); }

.timeline { display: grid; margin-top: 40px; padding: 0; list-style: none; }
.moment { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 32px; padding-block: 24px; border-top: 1px solid var(--line); }
.moment__time { color: var(--ink); font: 800 2rem/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.moment h3 { font: 500 1.1875rem/1.35 var(--font-text); }
.moment p { max-width: 52ch; margin-top: 6px; }
.moment .chip { margin-top: 12px; }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 0.9375rem; font-weight: 500; text-decoration: none; }
.back:hover { color: var(--ink); }

/* ---------- Legal page ---------- */

.legal { display: grid; gap: 64px; padding-block: 72px 120px; }
.legal section { display: grid; gap: 12px; max-width: 60ch; }

/* ---------- Small screens: every multi-column layout collapses to one column ---------- */

@media (max-width: 960px) {
  .hero__grid, .chapter__head, .tab-panel, .fact, .price-notes, .closing__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__text, .hero__stage, .chapter__head > div, .tab-panel__claim, .lines, .fact dt, .fact dd, .price-notes p:first-child, .price-notes p:last-child, .closing__text { grid-column: 1 / -1; }
  .hero__stage { margin-top: 48px; padding-top: 0; }
  .hero__stage::before { top: 45%; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); border-radius: 0; }
  .approval { margin-inline: auto; }
  .facts3, .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sum { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .closing__mark { display: none; }
}
@media (max-width: 560px) {
  .facts3, .apps { grid-template-columns: minmax(0, 1fr); }
  .moment { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 16px; }
  .moment__time { font-size: 1.5rem; }
  .approval__head, .approval__label, .approval__steps, .approval__foot, .approval__done { padding-inline: 16px; }
  .approval__mail { margin-inline: 16px; }
  .approval__foot .button--small { padding: 0 12px; }
  .stamp { right: 16px; font-size: 2rem; }
  .footer__links { margin-left: 0; }
}

/* ---------- Motion: optional, off for reduced motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero__done, .hero__claim, .lead, .actions, .approval { animation: rise 0.5s var(--ease-out) both; }
  .hero__done:nth-child(1) { animation-delay: 0.05s; }
  .hero__done:nth-child(2) { animation-delay: 0.17s; }
  .hero__done:nth-child(3) { animation-delay: 0.29s; }
  .hero__claim { animation-delay: 0.45s; }
  .lead { animation-delay: 0.55s; }
  .actions { animation-delay: 0.62s; }
  .approval { animation-delay: 0.3s; }
  .hero__done .tick { animation: tick 0.4s var(--ease-out) both; }
  .hero__done:nth-child(1) .tick { animation-delay: 0.25s; }
  .hero__done:nth-child(2) .tick { animation-delay: 0.37s; }
  .hero__done:nth-child(3) .tick { animation-delay: 0.49s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } }
  @keyframes tick { from { opacity: 0; transform: scale(0.4); } }

  @supports (animation-timeline: view()) {
    .nav { animation: nav-edge linear both; animation-timeline: scroll(); animation-range: 0 48px; }
    @keyframes nav-edge { from { box-shadow: 0 1px 0 transparent; } }
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 120px; }
    @keyframes reveal { from { opacity: 0; transform: translateY(18px); } }
  }
  .step__icon .icon { transition: opacity 0.2s var(--ease-out), transform 0.3s var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) {
  .button:active:not(:disabled, [aria-disabled="true"]), .button:hover .icon--arrow, .step__icon .icon { transform: none; }
  .approval[data-state="done"] .stamp { transform: rotate(-9deg); transition: none; }
}
