/*
 * Konvyra design tokens. Canonical source: copy verbatim into
 * konvyra-twenty/konvyra/web/src/styles/tokens.css. See ../system.md.
 * Light is the default; dark applies with [data-theme="dark"] on <html>,
 * or with prefers-color-scheme when <html data-theme="system">.
 */

:root {
  /* Brand (logo colours; brand moments only) */
  --brand-indigo: #443bfb;
  --brand-violet: #8387fc;
  --brand-orchid: #dd71dc;
  --brand-pink: #ffafb6;
  --brand-peach: #ffc98c;
  --brand-ink: #181a3a;
  --brand-gradient: linear-gradient(120deg, #443bfb 0%, #8387fc 32%, #dd71dc 62%, #ffafb6 84%, #ffc98c 100%);

  /* Surfaces */
  --bg-app: #f5f5f8;          /* window, sidebar */
  --bg-surface: #ffffff;      /* content panel, cards, tables */
  --bg-subtle: #fafafc;       /* table header, inset areas */
  --bg-muted: #f0f0f5;        /* inputs disabled, skeleton base */
  --bg-hover: rgba(24, 26, 58, 0.045);
  --bg-active: rgba(24, 26, 58, 0.075);
  --bg-overlay: rgba(14, 14, 30, 0.32);
  --bg-inverse: #14152b;      /* bulk-action bar, tooltips */

  /* Text */
  --text-primary: #14152b;
  --text-secondary: #555872;
  --text-tertiary: #71748c;   /* icons, placeholders, meta: 4.6:1 on surface */
  --text-disabled: #b5b7c8;
  --text-inverse: #f6f6fb;
  --text-on-accent: #ffffff;

  /* Borders */
  --border-subtle: #ececf2;
  --border-default: #e1e1ea;
  --border-strong: #cfd0dc;

  /* Accent: one colour for primary actions, focus, selection, links */
  --accent: #4b3ff0;
  --accent-hover: #3f33de;
  --accent-pressed: #3529c4;
  --accent-text: #4136e0;     /* links, active icon (6.2:1 on white) */
  --accent-subtle: #f0efff;   /* selected row, active filter chip */
  --accent-subtle-border: #d9d6ff;
  --focus-ring: 0 0 0 2px var(--bg-surface), 0 0 0 4px rgba(75, 63, 240, 0.55);

  /* Status */
  --success: #0e7656;  --success-subtle: #e8f6ef; --success-border: #bfe6d3;
  --warning: #a75a00;  --warning-subtle: #fff4e3; --warning-border: #f6dab0;
  --danger: #c8322b;   --danger-subtle: #fdeeed;  --danger-border: #f5c9c6;
  --info: var(--accent-text); --info-subtle: var(--accent-subtle);

  /* Tag palette (select options): text / background pairs, AA */
  --tag-gray-fg: #4a4d66;   --tag-gray-bg: #eeeef4;
  --tag-indigo-fg: #3d32d6; --tag-indigo-bg: #ecebff;
  --tag-violet-fg: #6c34c9; --tag-violet-bg: #f3ebff;
  --tag-pink-fg: #b0287a;   --tag-pink-bg: #fdebf5;
  --tag-red-fg: #b42d26;    --tag-red-bg: #fdecea;
  --tag-orange-fg: #a24c06; --tag-orange-bg: #fff0e1;
  --tag-yellow-fg: #826000; --tag-yellow-bg: #fdf5d8;
  --tag-green-fg: #17734f;  --tag-green-bg: #e6f5ed;
  --tag-teal-fg: #11706e;   --tag-teal-bg: #e2f5f4;
  --tag-blue-fg: #1d5fb8;   --tag-blue-bg: #e7f0fd;

  /* Charts: categorical, in this order */
  --chart-1: #4b3ff0; --chart-2: #20a4a0; --chart-3: #e0699c;
  --chart-4: #f0a03c; --chart-5: #8b7ff7; --chart-6: #5a6178;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(20, 21, 43, 0.05);
  --shadow-sm: 0 1px 3px rgba(20, 21, 43, 0.07), 0 1px 2px rgba(20, 21, 43, 0.04);
  --shadow-md: 0 6px 16px -4px rgba(20, 21, 43, 0.1), 0 2px 4px -2px rgba(20, 21, 43, 0.05);
  --shadow-lg: 0 16px 40px -12px rgba(20, 21, 43, 0.2), 0 4px 10px -4px rgba(20, 21, 43, 0.06);
  --shadow-panel: -12px 0 40px -16px rgba(20, 21, 43, 0.22);
  --highlight-top: inset 0 1px 0 rgba(255, 255, 255, 0);

  /* Type */
  --font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono Variable", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-features: "cv11", "ss01", "ss03";
  --text-2xs: 11px;  --lh-2xs: 16px;
  --text-xs: 12px;   --lh-xs: 16px;
  --text-sm: 13px;   --lh-sm: 20px;
  --text-base: 14px; --lh-base: 20px;
  --text-md: 15px;   --lh-md: 22px;
  --text-lg: 18px;   --lh-lg: 26px;
  --text-xl: 22px;   --lh-xl: 28px;
  --text-2xl: 28px;  --lh-2xl: 34px;
  --text-3xl: 36px;  --lh-3xl: 42px;
  --tracking-tight: -0.018em;
  --tracking-display: -0.026em;

  /* Spacing (4 px grid) */
  --space-0-5: 2px; --space-1: 4px; --space-1-5: 6px; --space-2: 8px; --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px;

  /* Radii */
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px;
  --radius-xl: 16px; --radius-full: 999px;

  /* Sizes */
  --control-sm: 28px; --control-md: 32px; --control-lg: 40px; --control-touch: 44px;
  --sidebar-width: 244px; --sidebar-collapsed: 60px;
  --topbar-height: 52px; --panel-width: 560px; --shell-gap: 8px;
  --row-compact: 32px; --row-default: 40px; --row-comfortable: 48px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 100ms; --duration-base: 160ms; --duration-slow: 240ms;

  color-scheme: light;
}


@media (prefers-color-scheme: dark) {
  :root {
  --bg-app: #09090f;
  --bg-surface: #111119;
  --bg-subtle: #15151f;
  --bg-muted: #1b1b27;
  --bg-hover: rgba(236, 236, 255, 0.05);
  --bg-active: rgba(236, 236, 255, 0.085);
  --bg-overlay: rgba(3, 3, 8, 0.6);
  --bg-inverse: #ececf6;

  --text-primary: #ececf4;
  --text-secondary: #a6a8be;
  --text-tertiary: #80829b;
  --text-disabled: #4b4d62;
  --text-inverse: #12121c;
  --text-on-accent: #ffffff;

  --border-subtle: #1e1e2b;
  --border-default: #262635;
  --border-strong: #353548;

  --accent: #5b50f5;
  --accent-hover: #6a60ff;
  --accent-pressed: #4c41e6;
  --accent-text: #9d97ff;
  --accent-subtle: rgba(123, 115, 255, 0.14);
  --accent-subtle-border: rgba(123, 115, 255, 0.34);
  --focus-ring: 0 0 0 2px var(--bg-surface), 0 0 0 4px rgba(141, 133, 255, 0.7);

  --success: #4cc993;  --success-subtle: rgba(76, 201, 147, 0.12); --success-border: rgba(76, 201, 147, 0.3);
  --warning: #f1b25a;  --warning-subtle: rgba(241, 178, 90, 0.12); --warning-border: rgba(241, 178, 90, 0.3);
  --danger: #ff7a70;   --danger-subtle: rgba(255, 122, 112, 0.12); --danger-border: rgba(255, 122, 112, 0.3);

  --tag-gray-fg: #b9bbd0;   --tag-gray-bg: rgba(185, 187, 208, 0.12);
  --tag-indigo-fg: #a9a3ff; --tag-indigo-bg: rgba(123, 115, 255, 0.16);
  --tag-violet-fg: #c8a6ff; --tag-violet-bg: rgba(178, 132, 255, 0.15);
  --tag-pink-fg: #f59ccc;   --tag-pink-bg: rgba(245, 120, 190, 0.14);
  --tag-red-fg: #ff9a92;    --tag-red-bg: rgba(255, 110, 100, 0.14);
  --tag-orange-fg: #ffb877; --tag-orange-bg: rgba(255, 160, 80, 0.14);
  --tag-yellow-fg: #f1d06b; --tag-yellow-bg: rgba(240, 200, 80, 0.13);
  --tag-green-fg: #6fd6a6;  --tag-green-bg: rgba(80, 200, 140, 0.13);
  --tag-teal-fg: #6fd3cf;   --tag-teal-bg: rgba(80, 200, 195, 0.13);
  --tag-blue-fg: #8dbbff;   --tag-blue-bg: rgba(100, 160, 255, 0.14);

  --chart-1: #7b73ff; --chart-2: #3cc3bd; --chart-3: #f08ab6;
  --chart-4: #f5b65e; --chart-5: #b3a9ff; --chart-6: #8a90a8;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02);
  --shadow-md: 0 8px 20px -6px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 48px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-panel: -16px 0 48px -16px rgba(0, 0, 0, 0.75);
  --highlight-top: inset 0 1px 0 rgba(255, 255, 255, 0.045);

  color-scheme: dark;
    color-scheme: dark;
  }
}
/* Konvyra marketing site. Values come from tokens.css (the app's design
   tokens); site-only sizes are the display scale and section spacing. */

@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-latin-wght.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-latin-ext-wght.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --site-max: 1180px;
  --site-pad: clamp(20px, 5vw, 40px);
  --section-y: clamp(72px, 10vw, 128px);
  --display: clamp(38px, 4.8vw, 58px);
  --h2: clamp(28px, 3.6vw, 40px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-feature-settings: var(--font-features);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: 3px; }
ul, ol { list-style: none; }
h1, h2, h3 { letter-spacing: var(--tracking-tight); line-height: 1.15; font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.wrap { max-width: var(--site-max); margin: 0 auto; padding: 0 var(--site-pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 20; background: var(--bg-surface); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }

/* Buttons (system.md §4) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-md); padding: 0 14px; border-radius: var(--radius-sm);
  font: 500 14px/1 var(--font-sans); text-decoration: none; white-space: nowrap; border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--duration-base) var(--ease-out); }
.btn:hover svg { transform: translateX(2px); }
.btn-sm { height: 36px; font-size: 14px; }
.btn-lg { height: 48px; padding: 0 20px; font-size: 16px; border-radius: 10px; }
.btn-primary { background: var(--accent); color: var(--text-on-accent); box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-pressed); }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-default); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--bg-subtle); border-color: var(--border-strong); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo img { height: 26px; width: auto; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; align-items: center; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 15px; font-weight: 500; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text-primary); }
.nav a[aria-current="page"] { background: var(--bg-hover); }
.language-menu { position: relative; font-size: 14px; }
.language-menu summary { cursor: pointer; min-height: 44px; padding: 0 8px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); }
.language-menu summary::after { content: '▾'; }
.language-menu > ul, .nav .language-menu > ul { position: absolute; right: 0; z-index: 20; display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 150px; padding: 8px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-sm); box-shadow: 0 8px 24px #0002; }
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; }
.site-footer .language-menu > ul, .notfound .language-menu > ul { right: auto; left: 0; }


/* Hero */
.hero, .page-hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 112px) 0 var(--section-y); }
.page-hero { padding-bottom: clamp(48px, 7vw, 88px); }
.hero-wash, .final-wash { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero-wash::before { content: ""; position: absolute; left: -10%; right: -10%; top: -46%; height: 112%;
  background: var(--brand-gradient); transform: skewY(-8deg); transform-origin: 0 100%; opacity: 0.9;
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 62%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 55%);
  mask-composite: intersect; -webkit-mask-composite: source-in; }
.page-hero .hero-wash::before { top: -70%; opacity: 0.55; }
.hero-wash::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 18% 30%, var(--bg-surface) 30%, transparent 75%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.eyebrow, .kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--accent-text); margin-bottom: 16px; }
.hero h1, .page-hero h1 { font-size: var(--display); letter-spacing: var(--tracking-display); line-height: 1.04; }
.page-hero h1 { max-width: 16ch; }
.lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--text-secondary); margin-top: 24px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-media { position: relative; padding-bottom: 40px; }
.hero-media .frame-browser { width: 128%; max-width: none; }
.hero-media .frame-phone { position: absolute; width: 30%; left: -6%; bottom: 0; }
.hero-media-small .frame-browser { width: 118%; }

/* Device frames */
.frame-browser { border-radius: 14px; background: var(--bg-app); border: 1px solid var(--border-default); overflow: hidden;
  box-shadow: 0 40px 80px -32px rgba(24, 26, 58, 0.35), 0 16px 32px -16px rgba(24, 26, 58, 0.18), var(--shadow-xs); }
.frame-bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--bg-subtle); border-bottom: 1px solid var(--border-subtle); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.frame-phone { border-radius: 34px; padding: 8px; background: var(--brand-ink); box-shadow: 0 30px 60px -24px rgba(24, 26, 58, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.frame-phone img { border-radius: 27px; }
.frame-browser img, .frame-phone img { width: 100%; }

/* Proof strip */
.proof { border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); background: var(--bg-subtle); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-grid > div { padding: 28px 24px; border-left: 1px solid var(--border-subtle); }
.proof-grid > div:first-child { border-left: 0; padding-left: 0; }
.proof h2 { font-size: 16px; }
.proof p { font-size: 15px; color: var(--text-secondary); margin-top: 4px; }

/* Feature story */
.story { padding: var(--section-y) 0 0; }
.story:last-of-type { padding-bottom: var(--section-y); }
.story-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.story-flip .story-copy { order: 2; }
.story h2 { font-size: var(--h2); }
.story-copy > p:not(.kicker) { color: var(--text-secondary); margin-top: 16px; font-size: 18px; }
.checks { margin-top: 24px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; }
.checks svg { flex: none; width: 20px; height: 20px; margin-top: 3px; padding: 3px; border-radius: 50%; background: var(--accent-subtle); stroke: var(--accent-text); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.phones { display: flex; align-items: flex-start; gap: 6%; justify-content: center; padding: 0 6%; }
.phones .frame-phone { width: 44%; }
.phones .frame-phone:nth-child(2) { margin-top: 12%; }
.story-text { padding-top: 48px; }

/* Dark band with cards */
.band { margin-top: var(--section-y); padding: var(--section-y) 0; background: var(--brand-ink); color: #f2f2f8;
  --text-secondary: #b8b9d3; --text-primary: #f2f2f8; --accent-text: #b4afff; --accent-subtle: rgba(131, 135, 252, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.09); --bg-card: rgba(255, 255, 255, 0.04); --focus-ring: 0 0 0 2px var(--brand-ink), 0 0 0 4px #8d85ff; }
.band-head { max-width: 40em; }
.band h2 { font-size: var(--h2); }
.band-head p { color: var(--text-secondary); margin-top: 16px; font-size: 18px; }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { padding: 28px; border-radius: var(--radius-xl); border: 1px solid var(--border-subtle); background: var(--bg-card, var(--bg-surface)); box-shadow: var(--shadow-xs); }
.band .card { box-shadow: none; }
.card h3 { font-size: 20px; margin-top: 4px; }
.card p { color: var(--text-secondary); margin-top: 8px; font-size: 16px; }
.card .kicker { margin: 18px 0 0; color: var(--accent-text); font-size: 14px; }
.card-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-subtle); }
.card-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent-text); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.card-icon + h3 { margin-top: 18px; }
.card-wide { display: grid; grid-template-columns: auto 1fr; gap: 24px; }
.card-wide h2 { font-size: 26px; }
.shot-note { font-size: 13px; color: var(--text-tertiary); margin-top: 40px; }
.band .shot-note { color: #9a9cb8; }

/* Reseller teaser */
.teaser { padding: var(--section-y) 0 0; }
.teaser-inner { display: flex; gap: 32px; align-items: center; justify-content: space-between; padding: clamp(28px, 4vw, 48px); border-radius: 20px;
  border: 1px solid transparent; background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box, var(--brand-gradient) border-box; }
.teaser h2 { font-size: clamp(24px, 2.6vw, 30px); }
.teaser p { color: var(--text-secondary); margin-top: 8px; max-width: 38em; }

/* Final call to action */
.final { position: relative; overflow: hidden; isolation: isolate; padding: var(--section-y) 0; margin-top: var(--section-y); text-align: center; background: var(--bg-subtle); border-top: 1px solid var(--border-subtle); }
.final-wash::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: -60%; height: 100%; background: var(--brand-gradient); filter: blur(80px); opacity: 0.32; border-radius: 50%; }
.final-inner { display: flex; flex-direction: column; align-items: center; }
.final h2 { font-size: var(--h2); max-width: 20ch; }
.final p { color: var(--text-secondary); margin: 16px 0 32px; max-width: 36em; font-size: 18px; }
.final .mail-note { margin: 16px 0 0; font-size: 14px; color: var(--text-tertiary); }

/* Features table of contents */
.toc ul { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.toc a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--radius-full); border: 1px solid var(--border-default);
  background: color-mix(in srgb, var(--bg-surface) 80%, transparent); color: var(--text-secondary); font-size: 14px; font-weight: 500; text-decoration: none; }
.toc a:hover { color: var(--text-primary); border-color: var(--border-strong); }

/* Reseller page sections */
.section { padding: var(--section-y) 0; }
.section + .section { padding-top: 0; }
.section-subtle { background: var(--bg-subtle); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.section-subtle + .section, .section + .section-subtle { padding-top: var(--section-y); }
.section-title { font-size: var(--h2); max-width: 22ch; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.split p { color: var(--text-secondary); margin-top: 16px; font-size: 18px; }
.step-num { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--radius-full); background: var(--accent-subtle); color: var(--accent-text); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.step-num + h3 { margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 10px 16px; border-radius: var(--radius-full); background: var(--bg-surface); border: 1px solid var(--border-default); box-shadow: var(--shadow-xs); font-weight: 500; font-size: 16px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; counter-reset: step; }
.steps li { padding: 28px; border-radius: var(--radius-xl); border: 1px solid var(--border-subtle); position: relative; }
.steps h3 { font-size: 20px; }
.steps p { color: var(--text-secondary); margin-top: 8px; font-size: 16px; }
.faq { max-width: 820px; }
.faq .section-title { margin-bottom: 32px; }
.faq details { border-bottom: 1px solid var(--border-default); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 18px; font-weight: 600; letter-spacing: var(--tracking-tight); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; color: var(--text-tertiary); transition: transform var(--duration-base) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--text-secondary); max-width: 44em; }

/* Footer */
.site-footer { border-top: 1px solid var(--border-subtle); padding: 48px 0; font-size: 14px; color: var(--text-secondary); }
.page-home .site-footer, .page-features .site-footer, .page-reseller .site-footer { border-top: 0; background: var(--bg-subtle); }
.footer-inner { display: grid; grid-template-columns: 2fr 2fr 3fr; gap: 32px; align-items: start; }
.footer-mark { margin-bottom: 12px; }
.footer-tagline { max-width: 24em; }
.site-footer ul { display: grid; gap: 4px; }
.site-footer nav a { display: inline-flex; min-height: 32px; align-items: center; color: var(--text-secondary); text-decoration: none; }
.site-footer nav a:hover { color: var(--text-primary); text-decoration: underline; }
.footer-meta p + p { margin-top: 8px; }

/* About and imprint */
.about { padding: var(--section-y) 0 0; }
.about-inner { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.about h2 { font-size: clamp(24px, 2.6vw, 30px); }
.about p { color: var(--text-secondary); margin-top: 12px; max-width: 40em; }
.about dl { display: grid; gap: 4px; font-size: 15px; padding: 24px; border-radius: var(--radius-xl); border: 1px solid var(--border-subtle); background: var(--bg-subtle); }
.about dt { color: var(--text-secondary); font-size: 13px; }
.about dd + dt { margin-top: 10px; }
.imprint { margin-top: 16px; }

/* Documentation */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); padding-top: 48px; padding-bottom: var(--section-y); align-items: start; }
.docs-nav { position: sticky; top: 88px; font-size: 15px; }
.docs-nav ul, .docs-menu ul { display: grid; gap: 2px; }
.docs-nav a, .docs-menu a { display: flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text-secondary); text-decoration: none; }
.docs-nav a:hover, .docs-menu a:hover { color: var(--text-primary); background: var(--bg-hover); }
.docs-nav a[aria-current="page"], .docs-menu a[aria-current="page"] { color: var(--text-primary); background: var(--bg-hover); font-weight: 600; }
.docs-menu { display: none; }
.docs-article { max-width: 760px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--text-secondary); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--text-tertiary); }
.crumbs a { color: var(--text-secondary); }
.docs-article h1 { font-size: clamp(32px, 4vw, 44px); letter-spacing: var(--tracking-display); margin-top: 16px; }
.docs-toc { margin-top: 24px; padding: 16px 20px; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); background: var(--bg-subtle); font-size: 15px; }
.docs-toc p { font-weight: 600; margin-bottom: 6px; }
.docs-toc ul { display: grid; gap: 2px; }
.docs-toc a { display: inline-flex; min-height: 32px; align-items: center; }
.prose { margin-top: 32px; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: 26px; margin-top: 48px; scroll-margin-top: 88px; }
.prose h3 { font-size: 20px; margin-top: 32px; scroll-margin-top: 88px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.9em; padding: 1px 6px; border-radius: var(--radius-sm); background: var(--bg-hover); }
.prose .anchor { margin-left: 8px; color: var(--text-tertiary); text-decoration: none; opacity: 0; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.callout { padding: 14px 18px; border-radius: var(--radius-lg); border-left: 3px solid var(--accent); background: var(--accent-subtle); }
.callout-note { border-left-color: var(--border-strong); background: var(--bg-subtle); }
.docs-shot { margin-top: 28px; margin-bottom: 12px; }
.docs-index { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 40px; }
.docs-index a { display: grid; gap: 4px; height: 100%; padding: 18px 20px; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); text-decoration: none; color: var(--text-primary); }
.docs-index a:hover { border-color: var(--border-strong); background: var(--bg-subtle); }
.docs-index span { color: var(--text-secondary); font-size: 15px; }
.docs-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border-subtle); }
.docs-pager a { display: grid; gap: 2px; padding: 12px 16px; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); text-decoration: none; font-weight: 600; }
.docs-pager a span { font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.pager-next { text-align: right; margin-left: auto; }

/* 404 */
.notfound { padding: 96px var(--site-pad); max-width: 640px; }
.notfound h1 { font-size: 40px; margin-top: 24px; }
.notfound h2 { font-size: 24px; margin-top: 48px; }
.notfound p { color: var(--text-secondary); margin-top: 12px; }

/* Motion: a short fade-and-rise as sections enter; off with reduced motion. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0ms !important; } }

/* Dark mode refinements */
@media (prefers-color-scheme: dark) {
  .frame-browser { box-shadow: 0 40px 80px -32px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04); }
  .frame-phone { background: #1d1e33; }
  .hero-wash::before { opacity: 0.5; }
  .band { background: #0d0d18; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
}

/* Tablet and phone */
@media (max-width: 1023px) {
  .hero-grid, .story-grid, .split { grid-template-columns: 1fr; }
  .story-flip .story-copy { order: 0; }
  .hero-media .frame-browser, .hero-media-small .frame-browser { width: 100%; }
  .hero-media .frame-phone { width: 26%; left: auto; right: -2%; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .proof-grid > div:nth-child(n+3) { border-top: 1px solid var(--border-subtle); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-meta { grid-column: 1 / -1; }
  .about-inner, .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { display: none; }
  .docs-menu { display: block; border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 0 8px; }
  .docs-menu summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 8px; font-weight: 600; }
  .docs-menu nav { padding-bottom: 8px; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .header-inner { gap: 8px; height: 56px; }
  .logo img { height: 22px; }
  .header-cta, .nav .nav-docs { display: none; }
  .nav a { padding: 0 8px; font-size: 14px; }
  .header-inner { height: auto; min-height: 56px; flex-wrap: wrap; padding-block: 6px; }
  .nav { max-width: 100%; }
  .nav > ul { flex-wrap: wrap; justify-content: flex-end; }
  .hero-media .frame-phone { width: 34%; right: -3%; }
  .proof-grid, .card-grid, .card-grid-3, .card-grid-4, .steps { grid-template-columns: 1fr; }
  .proof-grid > div { border-left: 0; padding-left: 0; }
  .proof-grid > div + div { border-top: 1px solid var(--border-subtle); }
  .teaser-inner { flex-direction: column; align-items: flex-start; }
  .card-wide { grid-template-columns: 1fr; gap: 16px; }
  .footer-inner { grid-template-columns: 1fr; }
  .docs-layout { padding-top: 24px; }
  .docs-index { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; }
  /* App images switch to the phone render here, so frame them as a phone. */
  .frame-browser { max-width: 300px; margin: 0 auto; border-radius: 34px; padding: 8px; background: var(--brand-ink); border: 0; }
  .frame-browser .frame-bar { display: none; }
  .frame-browser img { border-radius: 27px; }
  .hero-media { padding-bottom: 0; }
  .hero-media .frame-browser, .hero-media-small .frame-browser { max-width: 300px; }
  .hero-media .frame-phone { display: none; }
  .actions { flex-direction: column; }
}
