/* Cadenza marketing site. Design rules: docs/REBRAND.md section 3.
   Tokens match the app's token file (frontend/src/styles/tokens.css, from the feat/rebrand-app-tokens branch);
   once that is merged, change both together.
   One typeface, Barlow, self-hosted from ./fonts (SIL OFL 1.1, licence in ./fonts/OFL-Barlow.txt). */

@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/barlow-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600 700; font-display: swap; src: url('fonts/barlow-latin-600-normal.woff2') format('woff2'); }

/* ---------- Tokens ---------- */
:root {
  --bg: #0B0D10;
  --surface: #12151A;
  --line: #2A2F37;
  --line-strong: #5D6672;      /* control borders: 3:1 against --bg */
  --text: #E8EAED;             /* 16.1:1 on --bg */
  --text-muted: #9AA3AE;       /* 7.6:1 on --bg */
  --accent: #FFB020;           /* amber, 10.6:1 on --bg. Means "a link" or "a change". */
  --on-accent: #0B0D10;
  --ok: #4CC38A;
  --warn: #E8C547;
  --error: #FF6B61;

  /* The one light section (long tables). */
  --paper: #EDEFF1;
  --ink: #0B0D10;
  --ink-muted: #4A525C;        /* 6.9:1 on --paper */
  --paper-line: #C8CDD3;
  --accent-ink: #8A5700;       /* amber as text on --paper, 5.3:1 */
  --ok-ink: #1B7349;
  --warn-ink: #7A5C00;

  --font: 'Barlow', system-ui, sans-serif;
  --w-regular: 400;
  --w-medium: 500;
  --w-bold: 600;

  --margin: clamp(16px, 4.45vw, 64px);
  --gutter: clamp(16px, 1.7vw, 24px);
  --max: 1680px;
  --header-h: 72px;
  --section-y: clamp(88px, 12vw, 176px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--w-regular) 18px/1.6 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; font-weight: var(--w-bold); letter-spacing: -0.02em; text-wrap: balance; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }
[hidden] { display: none !important; }

.skip { position: absolute; left: var(--margin); top: -100px; z-index: 60; background: var(--text); color: var(--bg); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.label {
  font-weight: var(--w-medium);
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.muted { color: var(--text-muted); }
.lead { font-size: clamp(19px, 1.5vw, 22px); line-height: 1.55; max-width: 36em; }
.caption { color: var(--text-muted); font-size: 15px; line-height: 1.5; max-width: 62em; }
.h-section { font-size: clamp(38px, 4.8vw, 72px); line-height: 1.0; letter-spacing: -0.025em; }
.h-sub { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; letter-spacing: -0.015em; }
.text-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--accent); }

/* ---------- Layout ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--margin);
}
.span-all { grid-column: 1 / -1; }
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.section__head { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: 28px; align-items: end; }
.section__label { grid-column: 1 / -1; color: var(--text-muted); }
.section__title { grid-column: 1 / span 7; }
.section__intro { grid-column: 8 / span 5; color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  min-height: 52px; padding: 14px 22px 14px 24px;
  border: 1px solid var(--text); background: transparent; color: var(--text);
  font-weight: var(--w-medium); font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn svg { width: 22px; height: 12px; flex: none; color: var(--accent); transition: transform .25s var(--ease), color .2s var(--ease); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn:hover svg { color: var(--on-accent); transform: translateX(4px); }
.btn--solid { background: var(--text); color: var(--bg); }
.btn--solid svg { color: var(--bg); }
.btn--sm { min-height: 40px; padding: 9px 14px 9px 16px; font-size: 13px; gap: 12px; white-space: nowrap; }
.btn--sm svg { width: 16px; height: 10px; }
.btn--play svg { width: 12px; height: 14px; }
.btn--play:hover svg { transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px 16px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--header-h);
  background: transparent; border-bottom: 1px solid transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.site-header.scrolled, .site-header.menu-open { background: var(--bg); border-bottom-color: var(--line); }
.site-header__inner {
  display: flex; align-items: center; gap: 32px; height: 100%;
  max-width: var(--max); margin-inline: auto; padding-inline: var(--margin);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: var(--w-bold); font-size: 16px; letter-spacing: 0.34em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; padding-block: 8px;
}
.mark { width: 26px; height: 26px; flex: none; color: var(--text); }
.mark__accent { fill: var(--accent); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { white-space: nowrap; font-weight: var(--w-medium); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; color: var(--text); }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); }
.lang-btn {
  background: transparent; border: 0; padding: 7px 9px; cursor: pointer;
  font-weight: var(--w-medium); font-size: 13px; letter-spacing: 0.12em; color: var(--text-muted);
}
.lang-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--line-strong); width: 44px; height: 40px; cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); content: ''; transition: transform .2s var(--ease), opacity .2s;
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before { left: 0; right: 0; top: -6px; }
.nav-toggle span::after { left: 0; right: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 39;
  background: var(--bg); padding: 24px var(--margin) 40px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0;
}
.mobile-menu a.mobile-link {
  display: block; padding: 18px 0; border-bottom: 1px solid var(--line);
  font-weight: var(--w-bold); font-size: 28px; letter-spacing: -0.01em; text-decoration: none;
}
.mobile-menu .btn-row { margin-top: 32px; }
.mobile-menu .lang-switch { margin-top: 28px; align-self: flex-start; }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--header-h) + clamp(56px, 9vh, 120px)); padding-bottom: clamp(56px, 7vw, 104px); }
.hero__title { grid-column: 1 / -1; font-size: clamp(44px, 7.1vw, 116px); line-height: 0.98; letter-spacing: -0.03em; }
.hero__title span { display: block; text-wrap: balance; }
/* Founder, 2026-10-28: the second line of the headline in amber, as in the PoC one-pager. */
.hero__title span + span { color: var(--accent); }
.hero__sub { grid-column: 1 / span 8; margin-top: clamp(22px, 2.4vw, 34px); font-size: clamp(20px, 1.9vw, 27px); line-height: 1.35; }
.hero__works { grid-column: 1 / span 9; margin-top: 18px; font-size: clamp(17px, 1.35vw, 19px); line-height: 1.5; color: var(--text-muted); max-width: 48em; }
.hero__works strong { color: var(--text); font-weight: var(--w-medium); white-space: nowrap; }
.hero__cta { grid-column: 1 / -1; margin-top: clamp(32px, 3.4vw, 48px); }

/* ---------- Architecture figure (redrawn from the old Integration architecture image) ---------- */
.arch { grid-column: 1 / -1; margin-top: clamp(64px, 8vw, 128px); }
.arch__title { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--text-muted); }
.arch__sheet {
  position: relative; padding: clamp(28px, 3.5vw, 56px) clamp(0px, 2vw, 32px) 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Crect x='11.5' y='11.5' width='1' height='1' fill='%23262B33'/%3E%3C/svg%3E");
}
.arch__flow {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1.3fr) 112px minmax(0, 1fr);
  grid-template-rows: auto 64px;
  align-items: stretch;
}
.box { border: 1px solid var(--line-strong); background: var(--bg); padding: 26px 26px 22px; display: flex; flex-direction: column; }
.box--core { border-color: var(--text); background: var(--surface); }
.box__head { padding-bottom: 18px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.box__name { display: block; font-weight: var(--w-bold); font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; }
.box--core .box__name { font-size: 22px; letter-spacing: 0.3em; }
.box__sub { display: block; margin-top: 6px; color: var(--text-muted); font-size: 15px; }
.box--core .box__sub { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.box__list { list-style: none; flex: 1; }
.box__list li { display: flex; align-items: baseline; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 18px; line-height: 1.3; }
.box__list li:last-child { border-bottom: 0; }
.box__list .mk { flex: none; width: 10px; height: 10px; border: 1.5px solid var(--text-muted); transform: translateY(-1px); }
.box--core .box__list .mk { border: 0; width: 9px; height: 9px; background: var(--text); transform: translateY(-2px) rotate(45deg); }
.box__list .check { flex: none; width: 13px; height: 10px; color: var(--text-muted); }
.box__list .item-sub { display: block; margin-top: 4px; color: var(--text-muted); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.box__foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.box--core .box__foot { color: var(--text); }

.conn { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-inline: 10px; color: var(--text-muted); font-size: 13px; text-align: center; }
.conn svg { width: 100%; height: 16px; overflow: visible; }
.conn path { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.conn__label { line-height: 1.2; }
.conn__label.label { font-size: 13px; letter-spacing: 0.1em; }

.loop { position: relative; }
.loop::before { content: ''; position: absolute; top: 0; height: 40px; border-bottom: 1.5px dashed var(--accent); }
.loop--a::before { left: 50%; right: 0; border-left: 1.5px dashed var(--accent); }
.loop--mid { grid-column: 2 / span 3; }
.loop--mid::before { left: 0; right: 0; }
.loop--o::before { left: 0; right: 50%; border-right: 1.5px dashed var(--accent); }
.loop--a::after {           /* arrowhead into the ALM box */
  content: ''; position: absolute; left: calc(50% - 5px); top: 1px; width: 10px; height: 10px;
  border-top: 1.5px solid var(--accent); border-left: 1.5px solid var(--accent); transform: rotate(45deg);
}
.loop__label {
  position: absolute; left: 50%; top: 40px; transform: translate(-50%, -50%);
  padding: 4px 14px; background: var(--bg); color: var(--text); font-size: 13px; letter-spacing: 0.06em;
  width: max-content; max-width: 100%; text-align: center;
}
.loop-v { display: none; }

.arch__principles {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 0;
  margin-top: 28px; padding-block: 22px; border-top: 1px solid var(--line); list-style: none;
}
.arch__principles li { padding-inline: clamp(16px, 2.6vw, 40px); }
.arch__principles li + li { border-left: 1px solid var(--line-strong); }

/* ---------- Product ---------- */
.statement { grid-column: 1 / span 10; margin-top: 28px; font-weight: var(--w-medium); font-size: clamp(30px, 3.5vw, 52px); line-height: 1.12; letter-spacing: -0.02em; }
.product__body { grid-column: 6 / span 6; margin-top: clamp(40px, 4.5vw, 64px); display: grid; gap: 22px; }
.product__body p:not(.caption) { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.6; }
.product__body .caption { padding-left: 16px; border-left: 1px solid var(--accent); }

.video { grid-column: 1 / -1; margin-top: clamp(64px, 8vw, 120px); }
.video__frame { position: relative; aspect-ratio: 16 / 9; background: var(--surface); border: 1px solid var(--line); overflow: hidden; cursor: pointer; }
.video__frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video__overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: clamp(18px, 3vw, 40px);
}
.video__frame.playing .video__overlay { display: none; }
.video__meta { max-width: 32em; padding: 18px 22px; background: var(--bg); border: 1px solid var(--line); }
.video__meta .h-sub { margin-top: 8px; }
.play {
  flex: none; display: inline-flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 14px 22px; border: 1px solid var(--text); background: var(--bg); color: var(--text);
  font-weight: var(--w-medium); font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
}
.play svg { width: 12px; height: 14px; color: var(--accent); }
.play:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.play:hover svg { color: var(--on-accent); }

.tour { grid-column: 1 / -1; margin-top: clamp(80px, 10vw, 152px); display: grid; grid-template-columns: subgrid; row-gap: 32px; }
.tour__head { grid-column: 1 / span 4; }
.tour__head .h-section { font-size: clamp(34px, 3.6vw, 56px); }
.tour__head .caption { margin-top: 18px; }
.tour__tabs { grid-column: 1 / span 4; display: flex; flex-direction: column; border-top: 1px solid var(--line); align-self: start; }
.tour__tab {
  display: grid; grid-template-columns: 2.6em 1fr; gap: 6px 12px; text-align: left;
  padding: 22px 0 22px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--text-muted);
  position: relative;
}
.tour__tab .n { font-size: 13px; letter-spacing: 0.1em; padding-top: 5px; color: var(--text-muted); }
.tour__tab .t { font-weight: var(--w-bold); font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; color: var(--text-muted); }
.tour__tab .d { grid-column: 2; font-size: 16.5px; line-height: 1.5; display: none; color: var(--text-muted); }
.tour__tab[aria-selected="true"] .t { color: var(--text); }
.tour__tab[aria-selected="true"] .n { color: var(--accent); }
.tour__tab[aria-selected="true"] .d { display: block; }
.tour__tab[aria-selected="true"]::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); }
.tour__tab:hover .t { color: var(--text); }
.tour__panels { grid-column: 5 / span 8; grid-row: 1 / span 2; }
.tour__panel .shot { border: 1px solid var(--line); background: var(--surface); }
.tour__panel .shot img { width: 100%; }
.tour__panel .caption { margin-top: 14px; }
.tour__panel-head { display: none; }
/* Without JavaScript, every step and screen shows in order. */
html:not(.js) .tour__tabs { display: none; }
html:not(.js) .tour__panels { grid-column: 1 / -1; grid-row: auto; display: grid; gap: 72px; }
html:not(.js) .tour__panel-head { display: block; margin-bottom: 18px; }

/* ---------- Capabilities ---------- */
.caps__main { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
.caps__aside { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--header-h) + 40px); }
.caps__aside .lead { margin-top: 28px; color: var(--text-muted); }
.caps__list { grid-column: 6 / span 7; list-style: none; border-top: 1px solid var(--line); counter-reset: cap; }
.caps__list li { counter-increment: cap; display: grid; grid-template-columns: 3.2em 1fr; gap: 10px 16px; padding: 34px 0 36px; border-bottom: 1px solid var(--line); }
.caps__list li::before { content: counter(cap, decimal-leading-zero); color: var(--accent); font-size: 14px; letter-spacing: 0.1em; padding-top: 10px; }
.caps__list h3 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; letter-spacing: -0.015em; }
.caps__list p { grid-column: 2; color: var(--text-muted); font-size: 18px; line-height: 1.6; max-width: 34em; }
.also { grid-column: 1 / -1; margin-top: clamp(72px, 8vw, 120px); display: grid; grid-template-columns: subgrid; row-gap: 24px; }
.also__label { grid-column: 1 / -1; color: var(--text-muted); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.also__item { grid-column: span 3; padding-right: 24px; }
.also__item h3 { font-size: 21px; line-height: 1.25; font-weight: var(--w-bold); letter-spacing: -0.01em; }
.also__item p { margin-top: 10px; color: var(--text-muted); font-size: 16.5px; line-height: 1.55; }
/* A screen with its caption on the left. The ASPICE and the Guided Remediation screens share it, so both are
   the same width (columns 4 to 12) and line up. */
.split-fig { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; }
.split-fig__cap { grid-column: 1 / span 3; display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.split-fig__cap .caption { max-width: 22em; }
.split-fig__shot { grid-column: 4 / -1; border: 1px solid var(--line); background: var(--surface); }
.split-fig__shot img { width: 100%; }
.caps__shot { margin-top: clamp(72px, 8vw, 120px); }

/* ---------- Bulk writes ---------- */
.bulk__intro { grid-column: 1 / span 6; margin-top: clamp(64px, 8vw, 120px); }
.bulk__intro .lead { margin-top: 28px; }
/* Measured figures: the number large, its label under it. */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: clamp(40px, 4vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 14px; }
.stats dd { margin: 0; font-size: clamp(36px, 3.4vw, 56px); line-height: 1; font-weight: var(--w-bold); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats dt { color: var(--text-muted); line-height: 1.45; }
.stats__punch { margin-top: clamp(32px, 3vw, 44px); }
.stats__note { margin-top: 12px; }
/* The steps and their note are one block, so the note stays under step 04 however tall the left column is. */
.bulk__steps { grid-column: 7 / span 6; align-self: start; margin-top: clamp(64px, 8vw, 120px); }
.steps { list-style: none; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.2em 7.5em 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); font-size: 14px; letter-spacing: 0.1em; color: var(--accent); padding-top: 3px; }
.steps .label { padding-top: 4px; }
.steps p { color: var(--text-muted); font-size: 17px; line-height: 1.55; }
.steps__note { margin-top: 16px; }

/* ---------- Integrations ---------- */
.integr__text { grid-column: 1 / span 5; }
.integr__text .h-section { margin-top: 28px; }
.integr__text p { margin-top: 24px; color: var(--text-muted); font-size: 18px; line-height: 1.6; }
.integr__text p.lead { color: var(--text); }
.tools { grid-column: 7 / span 6; align-self: end; list-style: none; border-top: 1px solid var(--line-strong); }
.tools li { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 22px 0 20px; border-bottom: 1px solid var(--line); }
.tools__name { font-size: clamp(26px, 2.5vw, 38px); line-height: 1.1; font-weight: var(--w-medium); letter-spacing: -0.015em; }
.tools__vendor { color: var(--text-muted); white-space: nowrap; }

/* ---------- Security: the one light section ---------- */
.section--paper { background: var(--paper); color: var(--ink); border-top: 0; }
.section--paper .section__label { color: var(--ink-muted); }
.section--paper .lead { color: var(--ink); }
.section--paper a { color: var(--ink); text-decoration-color: var(--accent-ink); }
.security .h-section { grid-column: 1 / span 7; margin-top: 28px; }
.security .lead { grid-column: 1 / span 6; margin-top: 28px; }
.sec-list { grid-column: 1 / -1; margin-top: clamp(48px, 5vw, 72px); list-style: none; display: grid; grid-template-columns: subgrid; row-gap: clamp(36px, 4vw, 56px); }
.sec-list li { grid-column: span 4; padding-top: 20px; border-top: 1px solid var(--ink); }
.sec-list h3 { font-size: 21px; line-height: 1.25; font-weight: var(--w-bold); letter-spacing: -0.01em; }
.sec-list p { margin-top: 10px; color: var(--ink-muted); font-size: 17px; line-height: 1.55; max-width: 26em; }

/* ---------- Contact sales ---------- */
.sales__text { grid-column: 1 / span 6; }
.sales__text .h-section { margin-top: 28px; }
.sales__text .lead { margin-top: 28px; }
.sales__text .btn-row { margin-top: 40px; }
.sales__text .caption { margin-top: 24px; }
.sales__facts { grid-column: 8 / span 5; align-self: end; border-top: 1px solid var(--line); }
.sales__facts div { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.sales__facts dt { padding-top: 3px; }
.sales__facts dd { color: var(--text-muted); font-size: 17px; line-height: 1.55; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(72px, 7vw, 104px) 40px; }
.signoff { grid-column: 1 / span 10; font-weight: var(--w-bold); font-size: clamp(34px, 4.8vw, 72px); line-height: 1.02; letter-spacing: -0.025em; }
.footer-cols { grid-column: 1 / -1; margin-top: clamp(64px, 8vw, 112px); display: grid; grid-template-columns: subgrid; row-gap: 40px; }
.footer-col { grid-column: span 3; }
.footer-col h2 { color: var(--text-muted); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { text-decoration: none; font-size: 17px; }
.footer-col a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.footer-col p { color: var(--text-muted); font-size: 16px; line-height: 1.55; }
.footer-col p + p { margin-top: 10px; }
.footer-brand .wordmark { padding-block: 0; }
.footer-col .footer-claim { margin-top: 20px; color: var(--text); font-size: 17px; font-weight: var(--w-medium); }
.footer-bottom { grid-column: 1 / -1; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; color: var(--text-muted); font-size: 14.5px; }

/* ---------- Sub pages ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(56px, 9vh, 120px)); padding-bottom: clamp(48px, 6vw, 88px); }
.page-hero .label { grid-column: 1 / -1; color: var(--text-muted); }
.page-hero h1 { grid-column: 1 / span 10; margin-top: 24px; font-size: clamp(42px, 6vw, 92px); line-height: 1; letter-spacing: -0.03em; }
.page-hero .lead { grid-column: 1 / span 7; margin-top: 28px; color: var(--text-muted); }
.page-body { padding-block: clamp(56px, 7vw, 104px) var(--section-y); border-top: 1px solid var(--line); }

.prose { grid-column: 1 / span 8; font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; }
.prose h3 { margin-top: 1.8em; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose p, .prose li { color: #C9CED4; }
.prose strong { color: var(--text); font-weight: var(--w-bold); }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose ul li::marker { color: var(--text-muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); }
.prose blockquote { margin: 1.4em 0; padding-left: 20px; border-left: 1px solid var(--accent); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.legal-meta { color: var(--text-muted); font-size: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.prose .lede { font-size: clamp(19px, 1.5vw, 22px); color: var(--text); }

/* FAQ */
.faq { grid-column: 1 / span 9; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: baseline;
  padding: 26px 0; font-weight: var(--w-bold); font-size: clamp(21px, 1.9vw, 27px); line-height: 1.25; letter-spacing: -0.01em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; flex: none; color: var(--accent); font-weight: var(--w-regular); font-size: 28px; line-height: 1; }
.faq__item[open] summary::after { content: '\2212'; }
.faq__item .faq__a { padding: 0 0 30px; max-width: 46em; color: #C9CED4; font-size: 18px; line-height: 1.7; }
.faq__item .faq__a p + p { margin-top: 0.9em; }
.faq__item .faq__a a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* Contact */
.contact-form { grid-column: 1 / span 7; }
.contact-side { grid-column: 9 / span 4; }
.contact-side .sales__facts { border-top: 1px solid var(--line); }
.contact-side .sales__facts div { grid-template-columns: 1fr; gap: 6px; }
.contact-side h2, .contact-form h2 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; }
.contact-side h2 + * , .contact-form h2 + * { margin-top: 16px; }
.form { margin-top: 32px; display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-field { display: grid; gap: 8px; }
.form-field label { font-weight: var(--w-medium); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.form-field .req { color: var(--accent); }
.form input, .form textarea {
  width: 100%; padding: 14px 16px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 0; font: inherit; font-size: 17px;
}
.form textarea { min-height: 180px; resize: vertical; }
.form input::placeholder, .form textarea::placeholder { color: #848D98; }   /* 5.4:1 on --surface */
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form .hint { color: var(--text-muted); font-size: 14.5px; }
.form-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-note { color: var(--text-muted); font-size: 14.5px; }
.form-note a { color: var(--text); }
.form-success, .form-error { padding: 14px 16px; border: 1px solid; font-size: 16px; }
.form-success { border-color: var(--ok); color: var(--ok); }
.form-error { border-color: var(--error); color: var(--error); }

/* Blog */
.post-list { grid-column: 1 / span 9; list-style: none; border-top: 1px solid var(--line); }
.post-card { padding: 34px 0 36px; border-bottom: 1px solid var(--line); }
.post-meta { color: var(--text-muted); }
.post-card h2 { margin-top: 14px; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; }
.post-card h2 a { text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.post-card p { margin-top: 14px; color: var(--text-muted); max-width: 44em; }
.post-card .text-link { display: inline-block; margin-top: 18px; }

/* CTA band on sub pages */
.cta-band .h-section { grid-column: 1 / span 8; }
.cta-band .lead { grid-column: 1 / span 6; margin-top: 24px; color: var(--text-muted); }
.cta-band .btn-row { grid-column: 1 / -1; margin-top: 36px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .hero [data-reveal] { transition-duration: 1.1s; }
  .js .hero [data-reveal]:nth-child(2) { transition-delay: .1s; }
  .js .hero [data-reveal]:nth-child(3) { transition-delay: .22s; }
  .js .hero [data-reveal]:nth-child(4) { transition-delay: .34s; }
  .js .hero .arch[data-reveal] { transition-delay: .5s; }
  .tour__panel.is-entering { animation: panel-in .45s var(--ease); }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1320px) {
  .nav { gap: 16px; }
  .nav a { font-size: 13px; letter-spacing: 0.08em; }
  .header-actions { gap: 14px; }
  .header-actions .btn--sm svg { display: none; }
}
/* The header switches to the menu button at 1180px: below that the German nav and button don't fit one row. */
@media (max-width: 1180px) {
  .nav, .header-actions .lang-switch { display: none; }
  .nav-toggle { display: inline-block; }
  .header-actions { margin-left: auto; gap: 12px; }
  .header-actions .btn--sm svg { display: inline; }
}
@media (max-width: 1080px) {
  .section__title, .section__intro, .hero__sub, .hero__works, .statement, .product__body,
  .caps__aside, .caps__list, .bulk__intro, .bulk__steps, .integr__text, .tools,
  .security .h-section, .security .lead, .sales__text, .sales__facts,
  .contact-form, .contact-side, .prose, .faq, .post-list, .cta-band .h-section, .cta-band .lead,
  .page-hero h1, .page-hero .lead, .signoff { grid-column: 1 / -1; }
  .caps__aside { position: static; }
  .caps__list { margin-top: 48px; }
  .split-fig__cap, .split-fig__shot { grid-column: 1 / -1; }
  .split-fig__cap { margin-bottom: 20px; }
  .tools, .sales__facts, .contact-side { margin-top: 56px; }
  .also__item { grid-column: 1 / -1; padding-right: 0; }
  .tour__head, .tour__tabs { grid-column: 1 / -1; }
  .tour__panels { grid-column: 1 / -1; grid-row: auto; }
  .tour__tabs { flex-direction: row; overflow-x: auto; border-top: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .tour__tab { flex: 1 0 auto; grid-template-columns: auto; padding: 14px 18px 14px 0; border-bottom: 0; gap: 2px; }
  .tour__tab .t { font-size: 19px; }
  .tour__tab .d { display: none !important; }
  .tour__tab[aria-selected="true"]::before { top: auto; bottom: -1px; }
  .tour__panel-head { display: block; margin-bottom: 18px; }
  .tour__panel-head .label { color: var(--accent); }
  .tour__panel-head p { margin-top: 6px; color: var(--text-muted); }
  .footer-col { grid-column: span 6; }
  .sec-list li { grid-column: span 6; }
}
@media (max-width: 960px) {
  /* The architecture figure becomes a column: ALM, Cadenza, outputs, with the loop on the left. */
  .arch__sheet { padding: 28px 0 0; }
  .arch__flow { grid-template-columns: 1fr; grid-template-rows: none; padding-left: 34px; }
  .conn { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 6px 0 6px 24px; min-height: 64px; }
  .conn svg { width: 48px; height: 16px; transform: rotate(90deg); flex: none; }
  .conn__label { text-align: left; }
  .conn--out svg { order: -1; }
  .loop--a, .loop--o { display: none; }
  .loop--mid { grid-column: 1; margin-top: 18px; }
  .loop--mid::before { position: static; display: inline-block; width: 28px; height: 0; margin-right: 12px; vertical-align: middle; }
  .loop__label { position: static; transform: none; padding: 0; background: none; width: auto; max-width: none; text-align: left; }
  .loop-v {
    display: block; position: absolute; left: 4px; top: 56px; bottom: 56px; width: 22px;
    border: 1.5px dashed var(--accent); border-right: 0;
  }
  .loop-v::after {
    content: ''; position: absolute; right: -2px; top: -6px; width: 10px; height: 10px;
    border-top: 1.5px solid var(--accent); border-right: 1.5px solid var(--accent); transform: rotate(45deg);
  }
  .arch__principles { justify-content: flex-start; flex-direction: column; gap: 10px; }
  .arch__principles li { padding-inline: 0; }
  .arch__principles li + li { border-left: 0; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  :root { --header-h: 64px; }
  .header-actions .btn--sm { display: none; }
  .hero__title { font-size: clamp(40px, 11.4vw, 64px); }
  .statement { font-size: 24px; line-height: 1.2; }
  .hero__cta .btn { flex: 1 1 100%; }
  .box { padding: 20px 18px 18px; }
  .box__list li { font-size: 17px; }
  .video__overlay { position: static; background: var(--surface); padding: 18px; flex-direction: column; align-items: stretch; }
  .video__meta { padding: 0; border: 0; background: none; }
  .video__frame { aspect-ratio: auto; }
  .video__frame video { aspect-ratio: 16 / 9; }
  .play { justify-content: center; }
  .caps__list li { grid-template-columns: 1fr; padding: 28px 0; }
  .caps__list li::before { padding-top: 0; }
  .caps__list p { grid-column: 1; }
  .steps li { grid-template-columns: 2.6em 1fr; }
  .stats { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
  .stats div { flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .stats dd { min-width: 4.3em; font-size: 36px; }
  .steps li p { grid-column: 2; }
  .sales__facts div { grid-template-columns: 1fr; gap: 6px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-col { grid-column: 1 / -1; }
  .sec-list li { grid-column: 1 / -1; }
  .tools li { padding: 18px 0 16px; }
  .faq__item summary { padding: 22px 0; }
  .tour__tab { padding-right: 12px; }
  .tour__tab .t { font-size: 16.5px; }
}
