/* Keep by Barricade: marketing site. Tokens follow the app's fortress palette (keep/src/app/globals.css). */

@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap; src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  /* colour */
  --paper: #f4f4f3;        /* stone paper: page background */
  --sheet: #ffffff;        /* screenshots and the form sit on sheets */
  --ink: #1e2024;          /* text */
  --ink-2: #474b4e;        /* secondary text, 8.5:1 on paper */
  --line: #d5d8d7;         /* hairlines */
  --line-strong: #7b807f;  /* control borders, 3:1+ on sheet */
  --navy: #00005b;         /* Barricade navy */
  --accent: var(--navy);   /* links, buttons, focus, bullets, crenellation */
  --accent-hover: #14147c;
  --accent-soft: #e6e6f0;
  --on-accent: #ffffff;    /* text on an accent fill */
  --band: #eaeae7;         /* the pricing section: the paper's own stone, a shade deeper */
  --band-line: #cdd0ce;    /* its edges and column dividers */
  --field-bg: #ffffff;
  --keep-fill: var(--navy);/* the drawn keep (fallback when 3D can't run) */
  --stone: #9fa4a3;        /* masonry lines */
  --danger: #a12d2d;
  --shadow: rgb(0 0 91 / .38);
  --veil: 241 240 236;     /* paper field behind the hero copy (RGB) */
  --hero-sky: linear-gradient(180deg, #a9c3dc 0%, #cfdce7 38%, #e6e2d9 70%, #e8e6e0 100%);
  /* type */
  --display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --text: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* space */
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(96px, 13vw, 176px);
  --radius: 8px;
}

/* Dark: night stone. Slate-blue dusk ground, warm limestone text, a parchment accent (navy vanishes on dark). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #161a26;
  --sheet: #1f2433;
  --ink: #ece8df;
  --ink-2: #b6b3aa;
  --line: #2e3445;
  --line-strong: #737a8c;
  --accent: #dccfae;
  --accent-hover: #ebe0c4;
  --accent-soft: rgb(220 207 174 / .12);
  --on-accent: #161a26;
  --band: #1b2030;
  --band-line: #363d52;
  --field-bg: #12151f;
  --keep-fill: #3b4361;
  --danger: #f08a7c;
  --shadow: rgb(0 0 0 / .55);
  --veil: 22 26 38;
  --hero-sky: linear-gradient(180deg, #090f22 0%, #111833 45%, #161a26 100%); /* night, matching the floodlit scene */
}

/* Theme-specific content (the screenshots have a dark and a light capture): show the one that matches. */
:root[data-theme="dark"] .only-light { display: none; }
:root:not([data-theme="dark"]) .only-dark { display: none; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.6 var(--text);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; color: var(--ink); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
[hidden] { display: none !important; }
:target, section[id] { scroll-margin-top: 16px; }

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

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

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

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 26px; border-radius: var(--radius);
  font: 600 1.0625rem/1 var(--text); letter-spacing: .005em;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--accent); color: var(--on-accent); }
.btn--solid:hover { background: var(--accent-hover); }
.btn--quiet { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--quiet:hover { background: var(--accent-soft); }

/* ── Header ──────────────────────────────────────────── */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 3; }
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); text-decoration: none; margin: 0; }
.brand .mark { flex: none; }
.brand__name { font: 700 1.75rem/1 var(--display); letter-spacing: -.01em; }
.brand__by { font-size: .9375rem; color: var(--ink-2); margin-top: .35em; }
.nav { display: flex; align-items: center; gap: clamp(8px, 2.4vw, 32px); list-style: none; margin: 0; padding: 0; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px;
  color: var(--ink); text-decoration: none; font-size: 1.0625rem;
}
.nav a:hover { color: var(--accent); text-decoration: underline; }
.nav .nav__cta { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.nav .nav__cta:hover { text-decoration: none; box-shadow: inset 0 -4px 0 var(--accent); }
.nav .nav__login { padding-inline: 18px; border: 1.5px solid var(--accent); border-radius: var(--radius); color: var(--accent); font-weight: 600; transition: background-color .15s ease; }
.nav .nav__login:hover { background: var(--accent-soft); text-decoration: none; }

/* ── Log in: the flight through the gate ─────────────── */
/* scripts/hero-keep.js puts .is-entering on <html> while the camera flies in. The keep's stage is pinned over
   the whole window, the page's own furniture fades away, and a veil closes to dark as the arch fills the view. */
.hero::before, .hero::after, .hero__grid, .site-header { transition: opacity .4s ease; }
html.is-entering { overflow: hidden; } /* no page scrollbar beside the full-window scene */
.is-entering .hero { z-index: 50; }
.is-entering .hero__stage { position: fixed; inset: 0; -webkit-mask-image: none; mask-image: none; cursor: pointer; }
.is-entering .hero::before, .is-entering .hero::after, .is-entering .hero__grid { opacity: 0; pointer-events: none; }
.is-entering .site-header { z-index: 60; opacity: 0; pointer-events: none; }
.gate-veil {
  position: fixed; inset: 0; z-index: 70; pointer-events: none; visibility: hidden;
  display: grid; place-items: center;
  --edge: 0; --dark: 0;
  background:
    linear-gradient(rgb(8 9 13 / var(--dark)), rgb(8 9 13 / var(--dark))),
    radial-gradient(ellipse 72% 82% at 50% 50%, transparent 28%, rgb(8 9 13 / var(--edge)) 100%);
}
.is-entering .gate-veil { visibility: visible; }
/* Shown only if the login page is slow to answer, so the dark screen is never unexplained. */
.gate-veil__note { color: #b6b3aa; font-size: 1.0625rem; opacity: 0; transition: opacity .4s ease; }
.gate-veil.is-waiting .gate-veil__note { opacity: 1; }

/* ── Hero ────────────────────────────────────────────── */
/* Full-bleed stage behind the headline. The canvas fades in over a sky-coloured ground while three.js loads. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center;
  min-height: clamp(640px, 100svh, 1040px);
  background: var(--hero-sky);
}
.hero__stage { position: absolute; inset: 0; z-index: 0; }
.hero__canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .9s ease-out; }
.hero__stage.is-live .hero__canvas { opacity: 1; }
.hero__fallback { position: absolute; right: var(--gutter); bottom: 0; width: min(50vw, 620px); }
.js .hero__stage:not(.no-webgl) .hero__fallback, .hero__stage.is-live .hero__fallback { display: none; }
/* Veil: keeps the headline readable over the sky; fades the scene into the page below. */
.hero::before, .hero::after { content: ""; position: absolute; z-index: 1; pointer-events: none; }
/* A clean paper field behind the copy, with a short soft edge, so no landscape shows through the text. */
.hero::before { inset: 0; background: linear-gradient(90deg, rgb(var(--veil) / .97) 0%, rgb(var(--veil) / .95) 36%, rgb(var(--veil) / .55) 46%, rgb(var(--veil) / 0) 56%); }
.hero::after { left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(180deg, transparent, var(--paper)); }
.hero__grid { position: relative; z-index: 2; width: 100%; padding-top: 104px; padding-bottom: 96px; }
.hero__copy { max-width: 620px; }
.hero__title {
  font-size: clamp(3.25rem, 7.4vw, 7.25rem); line-height: .9; letter-spacing: -.025em;
  max-width: 10.5ch;
}
.hero__lede { margin-top: clamp(24px, 3vw, 36px); max-width: 40ch; font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.55; color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 3.4vw, 44px); }
.keep { width: 100%; height: auto; }
.keep__courses { stroke: #fff; stroke-opacity: .12; stroke-width: 1.25; fill: none; }
.keep__string { stroke: #fff; stroke-opacity: .28; stroke-width: 2; }
.keep__grille { stroke: var(--accent); stroke-width: 3.5; fill: none; }

/* Headline entrance, once, on load. The keep's own entrance and idle motion live in scripts/hero-keep.js
   and follow the same reduced-motion setting. Nothing is tied to scrolling. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero__copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__copy > :nth-child(2) { animation-delay: .08s; }
  .hero__copy > :nth-child(3) { animation-delay: .16s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ── Section heads ───────────────────────────────────── */
.section-title { font-size: clamp(2.25rem, 4.6vw, 3.75rem); line-height: 1; letter-spacing: -.015em; }
.section-title::after {
  content: ""; display: block; width: 104px; height: 7px; margin-top: 20px;
  background: repeating-linear-gradient(90deg, var(--crenel, var(--accent)) 0 14px, transparent 14px 22.5px);
}
.section-lede { margin-top: 24px; max-width: 56ch; font-size: clamp(1.125rem, 1.4vw, 1.25rem); color: var(--ink-2); }

/* ── Software story ──────────────────────────────────── */
.story { padding-block: var(--section); }
.section-head { max-width: 780px; }
.screens { list-style: none; margin: clamp(64px, 8vw, 112px) 0 0; padding: 0; }
.screen + .screen { margin-top: clamp(96px, 12vw, 168px); }
.screen__figure { margin: 0; }
.screen__frame {
  background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 0 rgb(0 0 0 / .03), 0 30px 60px -36px var(--shadow);
}
.screen__frame img { width: 100%; height: auto; }
.screen__full { margin-top: 10px; font-size: .9375rem; text-align: right; }
.screen__full a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); }
.screen__full a:hover { color: var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.screen__num {
  display: flex; align-items: center; gap: 12px;
  font: 700 1.0625rem/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums;
}
.screen__num::after { content: ""; width: 32px; height: 2px; background: var(--accent); }
.screen__title { margin-top: 14px; font-size: clamp(1.625rem, 2.5vw, 2.25rem); font-weight: 600; line-height: 1.08; letter-spacing: -.01em; }
.screen__body { margin-top: 14px; max-width: 50ch; color: var(--ink); }
.screen__details { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.screen__details li { position: relative; padding-left: 22px; }
.screen__details li + li { margin-top: 12px; }
.screen__details li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--accent); }

/* wide: the shot takes the column, the caption runs underneath in two parts */
.screen--wide .screen__caption {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px);
  align-items: start; margin-top: 8px;
}
.screen--wide .screen__details { margin-top: 6px; }

/* feature: the key wide shots break out past the text column (caption stays in it), for scale contrast */
.screen--feature .screen__media {
  width: min(100vw - 32px, 1360px);
  margin-left: calc((100% - min(100vw - 32px, 1360px)) / 2);
}
.screen--feature .screen__frame { border-radius: 12px; }
/* inset: a step narrower than the column, set to the right, so it reads as a different beat.
   A wide shot with neither feature nor inset is exactly the column width. */
.screen--inset .screen__media { width: min(100%, 980px); margin-left: auto; }
.screen--inset .screen__caption { max-width: 980px; margin-left: auto; }

/* split: the shot beside the caption; side chosen per shot from its focal point */
.screen--split .screen__figure {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 88px); align-items: center;
}
.screen--split .screen__details { margin-top: 28px; }
.screen--img-right .screen__figure { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
.screen--img-right .screen__media { grid-column: 2; grid-row: 1; }
.screen--img-right .screen__caption { grid-column: 1; grid-row: 1; }

.story__next { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: clamp(96px, 12vw, 160px); padding-top: 40px; border-top: 1px solid var(--line); color: var(--ink-2); }

/* ── Reimbursements ──────────────────────────────────── */
.reimb { padding-block: 0 var(--section); }
.reimb__head { padding-top: clamp(64px, 8vw, 104px); border-top: 1px solid var(--line); }
.reimb__addon { margin-top: 18px; font-weight: 600; color: var(--ink); }
.reimb__addon a { margin-left: 8px; font-weight: 400; }
/* portrait: a tall shot (the report summary) kept narrow, caption beside it */
.screen--portrait .screen__figure { grid-template-columns: minmax(0, 3fr) minmax(0, 5fr); }
.screen--portrait .screen__media { max-width: 380px; width: 100%; justify-self: center; }

/* ── Pricing ─────────────────────────────────────────── */
/* Pricing sits on the page's own stone, a shade off the paper, with a hairline above and below. All colour comes
   from the theme tokens. The accent (parchment by night, navy by day) is kept for the main price, icons and bullets. */
.pricing { background: var(--band); border-block: 1px solid var(--band-line); padding-block: clamp(88px, 11vw, 140px); }
.pricing__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 56px; }
.pricing__note { max-width: 40ch; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }

/* Three columns: the main price in the centre, an extra on each side, hairline dividers between. */
.plans { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); }
.plan { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px clamp(16px, 3vw, 44px) 16px; }
.plan--users { order: 1; }
.plan--main { order: 2; border-inline: 1px solid var(--band-line); }
.plan--addon { order: 3; }
.plan__icon { display: block; color: var(--accent); line-height: 0; }
.plan__name { margin-top: 16px; font-size: 1.5rem; font-weight: 600; letter-spacing: -.005em; }
.plan__price { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 10px; font-family: var(--display); }
.plan__amount { font-weight: 700; font-size: 2.25rem; line-height: 1; letter-spacing: -.01em; font-variant-numeric: lining-nums; }
.plan__unit { font-weight: 600; font-size: 1.25rem; }
.plan--main .plan__amount { font-size: clamp(4.5rem, 8vw, 6.75rem); line-height: .9; letter-spacing: -.02em; color: var(--accent); }
.plan--main .plan__unit { font-size: clamp(1.375rem, 2vw, 1.75rem); }
.plan__body { margin-top: 16px; max-width: 30ch; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }

/* The banner of assurances */
.terms {
  list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 18px clamp(20px, 3vw, 40px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 4px 24px;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 12px;
}
.terms li { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; font-weight: 600; font-size: 1.0625rem; }
.terms .icon { flex: none; color: var(--accent); }

/* What's included, beside the estimator */
.pricing__lower { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(36px, 5vw, 80px); align-items: start; margin-top: clamp(48px, 6vw, 80px); }
.included__title { font-size: 1.5rem; font-weight: 600; }
.included__list { list-style: none; margin: 22px 0 0; padding: 0; columns: 2; column-gap: clamp(28px, 4vw, 56px); }
.included__list li { position: relative; break-inside: avoid; padding-left: 22px; margin-bottom: 13px; line-height: 1.45; }
.included__list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; background: var(--accent); }
/* estimator: a sheet, like the demo form */
.estimate { padding: clamp(24px, 3vw, 32px); border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); box-shadow: 0 30px 60px -40px var(--shadow); }
.estimate__title { font-size: 1.375rem; font-weight: 600; }
.estimate__controls { display: grid; gap: 14px; margin-top: 18px; }
.estimate__label { font-weight: 600; font-size: 1rem; }
.stepper { display: inline-flex; align-items: stretch; width: max-content; border: 1.5px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.stepper__btn { width: 48px; min-height: 48px; font: 600 1.375rem/1 var(--text); color: var(--ink); background: transparent; border: 0; cursor: pointer; }
.stepper__btn:hover { background: var(--accent-soft); }
.stepper input {
  width: 84px; min-height: 48px; text-align: center; font: 600 1.25rem var(--text); color: var(--ink); background: var(--field-bg);
  border: 0; border-inline: 1.5px solid var(--line-strong); -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.check { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 1.0625rem; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer; }
.estimate__result { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.estimate__result output { font: 700 clamp(2.25rem, 3.4vw, 2.75rem)/1 var(--display); letter-spacing: -.01em; }
.estimate__detail { margin-top: 8px; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); min-height: 2.9em; }
.pricing__cta { margin-top: 22px; }

/* ── Demo ────────────────────────────────────────────── */
.demo { padding-block: var(--section); }
.demo__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.demo__notice {
  margin-top: 32px; max-width: 48ch; padding: 16px 20px;
  background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1rem; line-height: 1.5;
}
.form, .result {
  background: var(--sheet); border: 1px solid var(--line); border-radius: 12px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 30px 60px -40px var(--shadow);
}
.field + .field { margin-top: 24px; }
.field label { display: block; font-weight: 600; font-size: 1.0625rem; margin-bottom: 8px; }
.field input {
  width: 100%; min-height: 52px; padding: 10px 14px;
  font: inherit; font-size: 1.0625rem; color: var(--ink); background: var(--field-bg);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
}
.field input:hover { border-color: var(--ink-2); }
.field input:focus-visible { outline-offset: 1px; border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field__hint { margin-top: 6px; font-size: .9375rem; color: var(--ink-2); }
.field__error { margin-top: 6px; font-size: .9375rem; font-weight: 600; color: var(--danger); }
.form__actions { margin-top: 32px; }
.result:focus { outline: none; }
.result:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.result__title { font-size: clamp(1.625rem, 2.6vw, 2.125rem); font-weight: 600; line-height: 1.1; margin-bottom: 14px; }
.result__list { margin: 24px 0 28px; border-top: 1px solid var(--line); }
.result__list div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.result__list dt { color: var(--ink-2); }
.result__list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ── Footer ──────────────────────────────────────────── */
/* A crenellated wall in the keep's own stone, painted by scripts/footer-wall.js (empty without JavaScript). */
.site-footer__wall { display: block; width: 100%; height: 132px; }
.site-footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; padding-block: 36px 48px; }
.brand--footer .brand__name { font-size: 1.375rem; }
.site-footer__note { max-width: 60ch; font-size: .9375rem; color: var(--ink-2); }

/* ── Narrow screens ──────────────────────────────────── */
/* Narrow or portrait screens: headline on top, the keep in its own stage below, fading up into the sky. */
@media (max-width: 960px), (orientation: portrait) {
  .hero { align-items: flex-start; min-height: max(780px, 112svh); }
  .hero::before { background: linear-gradient(180deg, rgb(var(--veil) / .9) 0%, rgb(var(--veil) / .6) 36%, rgb(var(--veil) / 0) 52%); }
  .hero__stage { top: 40%; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); }
  .hero__grid { padding-top: 96px; padding-bottom: 0; }
  .hero__fallback { left: 50%; right: auto; transform: translateX(-50%); width: min(86vw, 520px); }
}
@media (max-width: 960px) {
  .screen--wide .screen__caption { grid-template-columns: 1fr; gap: 20px; }
  .screen--split .screen__figure,
  .screen--img-right .screen__figure { grid-template-columns: 1fr; gap: 28px; }
  .screen--img-right .screen__media, .screen--img-right .screen__caption { grid-column: auto; grid-row: auto; }
  /* pricing: columns stack with the main price first; dividers turn horizontal */
  .plans { grid-template-columns: 1fr; }
  .plan { padding-block: 28px; }
  .plan--users, .plan--main, .plan--addon { order: 0; }
  .plan--main { border-inline: 0; padding-top: 4px; }
  .plan + .plan { border-top: 1px solid var(--band-line); }
  .pricing__lower { grid-template-columns: 1fr; }
  .demo__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav__extra { display: none; }
  .brand__by { display: none; }
  .result__list div { grid-template-columns: 1fr; gap: 2px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .terms li { justify-content: flex-start; }
  .included__list { columns: 1; }
}
