/* Novon Tech — site styles. Tokens live in tokens.css. */

/* ---------- Theme ---------- */
:root {
  color-scheme: light;
  --frame: var(--color-surface-base);
  --line: var(--color-surface-base);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --frame: var(--color-surface-deep);
  --line: var(--color-line-dark);
}

/* Surfaces. Each one sets its own foreground, focus and control colors so contrast holds everywhere. */
.s1, .s2, .inv, .acc, .sun { background: var(--bg); color: var(--fg); }

.s1, .s2 {
  --fg: var(--color-text-primary); --muted: var(--color-text-inverse);
  --focus: var(--color-text-primary); --mark: var(--color-brand-logo);
  --btn-bg: var(--color-accent-sun); --btn-fg: var(--color-text-primary);
  --btn-hover-bg: var(--color-text-primary); --btn-hover-fg: var(--color-text-secondary); --btn-hover-border: var(--color-text-primary);
  --link-hover-bg: var(--color-surface-raised); --link-hover-fg: var(--color-text-secondary);
  --logo-color: var(--color-brand-logo);
  --hl-bar: var(--color-accent-sun);
  --art-ink: var(--color-text-primary); --art-shape: var(--color-brand-logo);
  --error: var(--color-feedback-error);
  --rule: var(--color-rule-light);
}
.s1 { --bg: var(--color-surface-paper); }
.s2 { --bg: var(--color-surface-muted); --muted: var(--color-text-muted-strong); }
.inv {
  --bg: var(--color-text-primary); --fg: var(--color-text-secondary); --muted: var(--color-text-tertiary);
  --focus: var(--color-text-secondary); --mark: var(--color-accent-sun);
  --btn-bg: var(--color-accent-sun); --btn-fg: var(--color-text-primary);
  --btn-hover-bg: var(--color-text-secondary); --btn-hover-fg: var(--color-text-primary); --btn-hover-border: var(--color-text-secondary);
  --link-hover-bg: var(--color-surface-raised); --link-hover-fg: var(--color-text-secondary);
  --logo-color: var(--color-text-secondary);
  --hl-color: var(--color-accent-sun); --hl-bar: var(--color-accent-sun);
  --art-ink: var(--color-brand-logo); --art-shape: var(--color-text-secondary);
  --error: var(--color-feedback-error-dark);
  --rule: var(--color-rule-dark);
}
/* Logo teal. Only pure white text sits on it (4.7:1). */
.acc {
  --bg: var(--color-surface-raised); --fg: var(--color-text-secondary); --muted: var(--color-text-secondary);
  --focus: var(--color-text-secondary); --mark: var(--color-accent-sun);
  --btn-bg: var(--color-accent-sun); --btn-fg: var(--color-text-primary);
  --btn-hover-bg: var(--color-text-secondary); --btn-hover-fg: var(--color-text-primary); --btn-hover-border: var(--color-text-secondary);
  --link-hover-bg: var(--color-text-primary); --link-hover-fg: var(--color-text-secondary);
  --logo-color: var(--color-text-secondary);
  --hl-bar: var(--color-accent-sun);
  --art-ink: var(--color-text-primary); --art-shape: var(--color-text-secondary);
  --error: var(--color-text-secondary);
  --rule: var(--color-rule-dark);
}
/* Saffron: the bright accent. Ink text only (7.6:1). */
.sun {
  --bg: var(--color-accent-sun); --fg: var(--color-text-primary); --muted: var(--color-text-on-sun-muted);
  --focus: var(--color-text-primary); --mark: var(--color-text-primary);
  --btn-bg: var(--color-text-primary); --btn-fg: var(--color-text-secondary);
  --btn-hover-bg: var(--color-text-secondary); --btn-hover-fg: var(--color-text-primary); --btn-hover-border: var(--color-text-primary);
  --link-hover-bg: var(--color-text-primary); --link-hover-fg: var(--color-accent-sun);
  --logo-color: var(--color-text-primary);
  --hl-bar: var(--color-text-secondary);
  --art-ink: var(--color-text-primary); --art-shape: var(--color-text-secondary);
  --error: var(--color-text-primary);
  --rule: var(--color-rule-light);
}
[data-theme="dark"] .s1, [data-theme="dark"] .s2 {
  --fg: var(--color-text-ice); --muted: var(--color-text-ice-muted);
  --focus: var(--color-text-ice); --mark: var(--color-brand-logo);
  --btn-bg: var(--color-accent-sun); --btn-fg: var(--color-text-primary);
  --btn-hover-bg: var(--color-text-ice); --btn-hover-fg: var(--color-text-primary); --btn-hover-border: var(--color-text-ice);
  --logo-color: var(--color-text-ice);
  --hl-color: var(--color-accent-sun);
  --art-ink: var(--color-brand-logo); --art-shape: var(--color-text-ice);
  --error: var(--color-feedback-error-dark);
  --rule: var(--color-rule-dark);
}
[data-theme="dark"] .s1 { --bg: var(--color-surface-deep); }
[data-theme="dark"] .s2 { --bg: var(--color-surface-night); }
[data-theme="dark"] .inv {
  --bg: var(--color-surface-ink-dark); --fg: var(--color-text-ice); --muted: var(--color-text-ice-muted);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-3));
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--frame);
  color: var(--color-text-primary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-base);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong { font-weight: var(--font-weight-display); }
:focus-visible { outline: 2px solid var(--focus, var(--color-text-primary)); outline-offset: 3px; }
/* Full-bleed interactive cells draw the ring inside, where it always sits on their own surface */
.hdr > a:focus-visible, .hdr > button:focus-visible, .menu-links a:focus-visible, .ft-link:focus-visible,
.ft-cta:focus-visible, .next-link:focus-visible, .pcard:focus-visible { outline-offset: -5px; }
main:focus { outline: none; }
::selection { background: var(--color-surface-raised); color: var(--color-text-secondary); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-2); top: calc(-1 * var(--space-6)); z-index: 100;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill);
  font-family: var(--font-family-mono); font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.06em;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-2); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Layout ---------- */
.page {
  max-width: var(--layout-max);
  min-height: 100vh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--line-w);
  background: var(--line);
  border-inline: var(--line-w) solid var(--line);
}
main { flex: 1; display: flex; flex-direction: column; gap: var(--line-w); }
main > .grid:last-child { flex: 1; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--line-w);
  background: var(--line);
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.c-2 { grid-column: span 2; }
.c-3 { grid-column: span 3; }
.c-4 { grid-column: 1 / -1; }

.cell { position: relative; min-width: 0; padding: var(--space-3); }
.cell--flush { padding: 0; }
.stack { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4); }
.flow > * + * { margin-top: var(--space-2); }
.flow-l > * + * { margin-top: var(--space-3); }
.sticky { position: sticky; top: calc(var(--header-h) + var(--space-3)); }
.h-hero { min-height: clamp(520px, calc(100svh - var(--header-h) - 200px), 820px); }
.h-tall { min-height: clamp(320px, 38vw, 540px); }
.h-mid { min-height: clamp(240px, 22vw, 340px); }
.h-stat { min-height: clamp(200px, 19vw, 280px); }
.push-end { margin-top: auto; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }

@media (max-width: 1023px) {
  .grid, .grid--3, .grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-2, .c-3, .c-4, .t-full { grid-column: 1 / -1; }
  .sticky { position: static; }
  .h-hero { min-height: 0; }
  .t-hide { display: none; }
}
@media (max-width: 639px) {
  .grid, .grid--3, .grid--5 { grid-template-columns: minmax(0, 1fr); }
  .grid > * { grid-column: 1 / -1; }
  .grid.m-keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.m-keep-2 > * { grid-column: span 1; }
  .grid.m-keep-2 > .c-4 { grid-column: 1 / -1; }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .m-hide { display: none; }
  .h-mid, .h-tall { min-height: 0; }
  .h-stat { min-height: 180px; }
  .grid:not(.m-keep-2) > .h-stat { min-height: 0; }
}

/* ---------- Typography ---------- */
.t-d1, .t-d2, .t-d3 {
  font-weight: var(--font-weight-display);
  line-height: 0.94;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
  hyphens: manual;
}
.t-d1 { font-size: var(--font-size-display-l); }
.t-d2 { font-size: var(--font-size-display-m); }
.t-d3 { font-size: var(--font-size-display-s); letter-spacing: -0.03em; }
/* Cyrillic (Д, Ц, Щ, у, р) reaches further below the baseline: give display lines room */
:lang(ru) .t-d1, :lang(ru) .t-d2, :lang(ru) .t-d3 { line-height: 1; }
.t-title {
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-base);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.t-lead { font-size: var(--font-size-lg); line-height: 1.3; letter-spacing: -0.01em; }
.t-body { font-size: var(--font-size-read); line-height: var(--line-height-read); }
.t-small { font-size: var(--font-size-sm); line-height: 1.5; }
.t-num { font-size: var(--font-size-display-s); font-weight: var(--font-weight-display); line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.t-label {
  display: flex; align-items: flex-start; gap: var(--space-2);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  font-weight: 450;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.t-label .sq, .sq {
  flex: none; width: var(--mark-size); height: var(--mark-size);
  margin-top: 0.2em; border-radius: 50%; background: var(--mark);
}
.muted { color: var(--muted); }
.measure { max-width: 36em; }
.measure-s { max-width: 26em; }

/* Text links */
.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  border-radius: 4px;
  transition: background-color var(--motion-duration-instant) var(--motion-ease), color var(--motion-duration-instant) var(--motion-ease);
}
.link:hover { background: var(--link-hover-bg); color: var(--link-hover-fg); }
.link:active { text-decoration-thickness: 2px; }

/* Icons */
.i { width: var(--icon-size); height: var(--icon-size); flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; }
.logo { display: block; height: auto; fill: currentColor; color: var(--logo-color); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-3);
  border: var(--line-w) solid var(--btn-bg); border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-family-mono); font-size: var(--font-size-xs); font-weight: 500;
  line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  transition: background-color var(--motion-duration-instant) var(--motion-ease), color var(--motion-duration-instant) var(--motion-ease), border-color var(--motion-duration-instant) var(--motion-ease);
}
.btn .i { transition: transform var(--motion-duration-fast) var(--motion-ease); }
.btn:hover { background: var(--btn-hover-bg); color: var(--btn-hover-fg); border-color: var(--btn-hover-border); }
.btn:hover .i-arrow { transform: translateX(var(--space-1)); }
.btn:hover .i-ext { transform: translate(2px, -2px); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.btn.is-loading { cursor: progress; }
.btn.is-loading .i { display: none; }
.btn.is-loading::after {
  content: ""; width: 10px; height: 10px; flex: none;
  border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin var(--motion-duration-slow) linear infinite;
}
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tags and status */
.tag {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border: var(--line-w) solid var(--fg); border-radius: var(--radius-pill);
  background: var(--bg); color: var(--fg);
  font-family: var(--font-family-mono); font-size: var(--font-size-xs); line-height: 1.3;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.tag--corner { position: absolute; top: var(--space-2); right: var(--space-2); z-index: 1; }
.dot { width: var(--mark-size); height: var(--mark-size); border-radius: 50%; background: currentColor; flex: none; }
.dot--live { background: var(--color-feedback-live); animation: pulse 2.4s var(--motion-ease) 2; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(31 157 85 / 0.45); }
  70% { box-shadow: 0 0 0 8px rgb(31 157 85 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(31 157 85 / 0); }
}

/* Lists */
.list-sq { display: grid; gap: var(--space-1); }
.list-sq li {
  display: flex; gap: var(--space-2);
  font-family: var(--font-family-mono); font-size: var(--font-size-xs); line-height: 1.3;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.list-sq li::before { content: ""; flex: none; width: var(--mark-size); height: var(--mark-size); margin-top: 0.2em; border-radius: 50%; background: var(--mark); }
.list-text { display: grid; gap: var(--space-2); }
.list-text li { display: flex; gap: var(--space-2); }
.list-text li::before { content: ""; flex: none; width: var(--mark-size); height: var(--mark-size); margin-top: 0.45em; border-radius: 50%; background: var(--mark); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; }
.hdr {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: var(--line-w);
  height: var(--header-h);
  background: var(--line);
}
.hdr > * { display: flex; align-items: center; min-width: 0; }
.hdr-logo { padding-inline: var(--space-3); text-decoration: none; }
.hdr-logo .logo { width: 104px; }
.hdr-nav { padding-inline: var(--space-2); }
.hdr-nav ul { display: flex; gap: var(--space-1); }
.hdr-nav a, .ft-nav a {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background-color var(--motion-duration-instant) var(--motion-ease), color var(--motion-duration-instant) var(--motion-ease);
}
.ft-nav a { margin-left: calc(-1 * var(--space-2)); }
.hdr-nav a:hover, .ft-nav a:hover { background: var(--color-surface-raised); color: var(--color-text-secondary); }
.hdr-nav a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.hdr-tools { gap: var(--space-2); padding-inline: var(--space-2); }
.hdr-cta {
  justify-content: space-between; gap: var(--space-4);
  min-width: 200px; padding-inline: var(--space-3);
  text-decoration: none;
  transition: background-color var(--motion-duration-instant) var(--motion-ease), color var(--motion-duration-instant) var(--motion-ease);
}
.hdr-cta:hover, .hdr-cta[aria-current="page"] { background: var(--color-text-primary); color: var(--color-accent-sun); --focus: var(--color-accent-sun); }
.hdr-cta:hover .i-arrow { transform: translateX(var(--space-1)); }
.hdr-cta .i { transition: transform var(--motion-duration-fast) var(--motion-ease); }
.hdr-spacer, .hdr-menu { display: none; }

.lang { display: flex; font-family: var(--font-family-mono); font-size: var(--font-size-xs); letter-spacing: 0.04em; }
.lang a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; min-height: 32px; padding: 0 var(--space-2);
  border: var(--line-w) solid var(--fg); text-decoration: none;
  transition: background-color var(--motion-duration-instant) var(--motion-ease), color var(--motion-duration-instant) var(--motion-ease);
}
.lang a:first-child { border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
.lang a:last-child { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.lang a + a { border-left: 0; }
.lang a:hover { background: var(--link-hover-bg); color: var(--link-hover-fg); }
.lang a[aria-current="true"] { background: var(--fg); color: var(--bg); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap-min); min-height: 32px; padding: 0 var(--space-1);
  background: transparent; border: 0; border-radius: var(--radius-pill); color: var(--fg);
}
.theme-dots { display: inline-flex; gap: 2px; transition: transform var(--motion-duration-instant) var(--motion-ease); }
.theme-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; transition: background-color var(--motion-duration-fast) var(--motion-ease); }
.theme-dots i:last-child { background: currentColor; }
[data-theme="dark"] .theme-dots i:first-child { background: currentColor; }
[data-theme="dark"] .theme-dots i:last-child { background: transparent; }
.theme-toggle:hover .theme-dots { transform: scale(1.12); }

.hdr-menu {
  align-items: center; justify-content: center; gap: var(--space-2);
  min-width: var(--header-h); padding-inline: var(--space-3);
  border: 0;
  font-family: var(--font-family-mono); font-size: var(--font-size-xs); letter-spacing: 0.06em; text-transform: uppercase;
}
.burger { position: relative; width: 20px; height: 10px; }
.burger::before, .burger::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform var(--motion-duration-fast) var(--motion-ease), top var(--motion-duration-fast) var(--motion-ease);
}
.burger::before { top: 0; }
.burger::after { top: 8.5px; }
.hdr-menu[aria-expanded="true"] .burger::before { top: 4.25px; transform: rotate(45deg); }
.hdr-menu[aria-expanded="true"] .burger::after { top: 4.25px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: calc(var(--header-h) + var(--line-w)) 0 0 0; z-index: 39;
  display: flex; flex-direction: column; gap: var(--line-w);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--line);
  opacity: 0; transform: translateY(calc(-1 * var(--space-2)));
  transition: opacity var(--motion-duration-fast) var(--motion-ease), transform var(--motion-duration-fast) var(--motion-ease);
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; transform: none; }
.menu-links { display: flex; flex-direction: column; gap: var(--line-w); background: var(--line); }
.menu-links a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3);
  font-size: var(--font-size-xl); line-height: 1.05; letter-spacing: -0.02em; text-decoration: none;
}
.menu-links a[aria-current="page"] { background: var(--color-surface-raised); color: var(--color-text-secondary); --focus: var(--color-text-secondary); }
.menu-links a .i { width: 24px; height: 24px; }
.menu-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.menu-fill { flex: 1; min-height: var(--space-4); }

@media (max-width: 1023px) {
  .hdr { grid-template-columns: auto minmax(0, 1fr) auto; }
  .hdr-nav, .hdr-tools, .hdr-cta { display: none; }
  .hdr-spacer, .hdr-menu { display: flex; }
}
@media (min-width: 1024px) { .menu { display: none !important; } }

/* ---------- Halftone art (round dots, drawn in site.js) ---------- */
.art {
  position: relative; overflow: hidden;
  --art-paper: var(--bg);
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--art-ink) 1.4px, transparent 1.9px);
  background-size: 8px 8px;
}
.art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.art.is-drawn { background-image: none; }
.art-fill { position: absolute; inset: 0; }
.art-band { height: clamp(180px, 24vw, 360px); }
.art-pause {
  position: absolute; left: var(--space-2); bottom: var(--space-2); z-index: 2;
  min-height: 32px;
  cursor: pointer;
  transition: background-color var(--motion-duration-instant) var(--motion-ease), color var(--motion-duration-instant) var(--motion-ease);
}
.art-pause:hover { background: var(--fg); color: var(--bg); }
.art-pause:active { transform: translateY(1px); }
.art-pause-icon { position: relative; width: 8px; height: 10px; flex: none; }
.art-pause-icon::before, .art-pause-icon::after { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; border-radius: 1px; background: currentColor; }
.art-pause-icon::before { left: 0; }
.art-pause-icon::after { right: 0; }
[data-motion="off"] .art-pause-icon::before { width: 0; height: 0; left: 1px; border-radius: 0; background: none; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; }
[data-motion="off"] .art-pause-icon::after { display: none; }
@media (prefers-reduced-motion: reduce) { .art-pause { display: none; } }
.art-cell { min-height: clamp(300px, 70vw, 520px); }
.art-cell--tall { min-height: clamp(360px, 90vw, 640px); }
@media (min-width: 1024px) {
  .art-cell { min-height: 0; }
  .art-cell--tall { min-height: 640px; }
}

/* Wireframe drawings */
.wire { width: 100%; max-width: 180px; height: auto; fill: none; stroke: currentColor; stroke-width: 1; }
.wire * { vector-effect: non-scaling-stroke; }

/* ---------- Sections ---------- */
.hero-text { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4); }
.hero-text .t-d1, .hero-text .t-d2 { margin-block: var(--space-4) 0; }

.stat { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-3); }
.stat .t-small { max-width: 18em; }

.prod { display: grid; grid-template-columns: var(--space-4) minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); padding-block: var(--space-4); }
.prod + .prod { border-top: var(--line-w) solid var(--rule); }
.prod-head { display: flex; flex-direction: column; gap: var(--space-3); }
.prod-head .wire { max-width: 150px; margin-top: var(--space-3); color: var(--mark); }
.prod-body { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
@media (max-width: 1199px) {
  .prod { grid-template-columns: var(--space-4) minmax(0, 1fr); }
  .prod-body { grid-column: 2; }
  .prod-head .wire { display: none; }
}
@media (max-width: 639px) {
  .prod { grid-template-columns: minmax(0, 1fr); }
  .prod-body { grid-column: 1; }
}

.step { display: flex; flex-direction: column; gap: var(--space-3); }
.step .t-lead { margin-top: auto; }
.step-num { font-family: var(--font-family-mono); font-size: var(--font-size-xs); letter-spacing: 0.04em; }

/* Person / employee cards */
.pcard { position: relative; display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.pcard .art { flex: 1; min-height: 280px; }
/* Founder photo slot: empty for now; drop an <img> inside and it fills the frame */
.pcard-photo { position: relative; flex: 1; min-height: 280px; overflow: hidden; background: var(--color-surface-muted); }
[data-theme="dark"] .pcard-photo { background: var(--color-surface-night); }
.pcard-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard--lg .pcard-photo { min-height: clamp(340px, 42vw, 620px); }
.pcard--lg .pcard-name { padding-block: var(--space-4) var(--space-3); }
.pcard-name {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3); border-top: var(--line-w) solid var(--line);
  transition: background-color var(--motion-duration-instant) var(--motion-ease), color var(--motion-duration-instant) var(--motion-ease);
}
.pcard-name .i { width: 24px; height: 24px; transition: transform var(--motion-duration-fast) var(--motion-ease); }
a.pcard:hover .pcard-name .i { transform: translateX(var(--space-1)); }
a.pcard:hover .pcard-name { background: var(--color-text-primary); color: var(--color-text-secondary); }
.stagger-cell { padding-top: var(--space-4); }
@media (max-width: 1023px) { .stagger-cell { padding-top: 0; } }

/* Pricing */
.plan { display: flex; flex-direction: column; gap: var(--space-3); }
.plan-price { display: flex; align-items: baseline; gap: var(--space-2); margin-top: var(--space-4); }
.plan .list-sq { margin-top: auto; }

/* Pilot weeks */
.weeks { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.weeks i { height: var(--mark-size); border: var(--line-w) solid var(--fg); border-radius: var(--radius-pill); }
.weeks i.on { background: var(--mark); border-color: var(--mark); }

/* Founder profiles */
.profile { display: flex; flex-direction: column; gap: var(--space-4); }
.quote { padding-left: var(--space-3); border-left: 2px solid var(--mark); }
.profile .cols-2 { gap: var(--space-4) var(--space-3); }
@media (min-width: 1024px) { .order-first-d { order: -1; } }

/* Next link row */
.next-link {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3);
  text-decoration: none;
  transition: background-color var(--motion-duration-instant) var(--motion-ease), color var(--motion-duration-instant) var(--motion-ease);
}
.next-link .t-title { display: block; }
.next-link .i { width: 32px; height: 32px; stroke-width: 1; transition: transform var(--motion-duration-fast) var(--motion-ease); }
.next-link:hover { background: var(--color-surface-raised); color: var(--color-text-secondary); --mark: var(--color-text-secondary); --focus: var(--color-text-secondary); }
.next-link:hover .i { transform: translateX(var(--space-1)); }

/* Contact */

.form { display: grid; gap: var(--space-3); }
.field { display: grid; gap: var(--space-1); }
.field-label { display: flex; justify-content: space-between; gap: var(--space-2); font-family: var(--font-family-mono); font-size: var(--font-size-xs); letter-spacing: 0.04em; text-transform: uppercase; }
.input {
  width: 100%; min-height: 48px; padding: var(--space-2);
  border: var(--line-w) solid var(--fg); border-radius: var(--radius-control);
  background: var(--bg); color: var(--fg);
  font-size: var(--font-size-md); line-height: var(--line-height-base);
  transition: box-shadow var(--motion-duration-instant) var(--motion-ease), border-color var(--motion-duration-instant) var(--motion-ease);
  appearance: none;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:hover { box-shadow: inset 0 0 0 var(--line-w) var(--fg); }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.input:disabled { opacity: 0.45; cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--error); box-shadow: inset 0 0 0 var(--line-w) var(--error); }
textarea.input { min-height: 168px; resize: vertical; }
.select-wrap { position: relative; }
.select-wrap .input { padding-right: var(--space-4); cursor: pointer; }
.select-wrap::after {
  content: ""; position: absolute; right: var(--space-3); top: 50%;
  width: var(--mark-size); height: var(--mark-size);
  border-right: 1.5px solid var(--fg); border-bottom: 1.5px solid var(--fg);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.field-error { display: flex; gap: var(--space-2); color: var(--error); font-size: var(--font-size-sm); line-height: 1.3; }
.field-error[hidden] { display: none; }
.field-error::before { content: "!"; flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--error); color: var(--bg); font-family: var(--font-family-mono); font-size: var(--font-size-xs); font-weight: 600; }
.form-summary { padding: var(--space-2) var(--space-3); border: 2px solid var(--error); border-radius: var(--radius-control); }
.form-summary[hidden] { display: none; }
.form-summary:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.form-summary ul { margin-top: var(--space-1); display: grid; gap: var(--space-1); }
.form-summary a { color: var(--error); text-underline-offset: 0.2em; }
.form-status:empty { display: none; }
.form-status { padding: var(--space-2) var(--space-3); border-radius: var(--radius-control); background: var(--color-surface-raised); color: var(--color-text-secondary); }
.form-status.is-error { background: transparent; border: 2px solid var(--error); color: var(--error); }
.form-status a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }

.clock { display: flex; align-items: center; gap: var(--space-2); }
.clock-face { width: 32px; height: 32px; flex: none; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; }

/* ---------- Footer ---------- */
.ft-nav ul { display: grid; gap: var(--space-1); justify-items: start; }
.ft-link {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: 60px; text-decoration: none; overflow-wrap: anywhere;
  transition: background-color var(--motion-duration-instant) var(--motion-ease), color var(--motion-duration-instant) var(--motion-ease);
}
.ft-link:hover { background: var(--color-surface-raised); color: var(--color-text-secondary); }
.ft-brand { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4); min-height: clamp(280px, 26vw, 400px); }
.ft-brand .logo { width: min(100%, 560px); }
.ft-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.ft-cta {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4);
  min-height: clamp(280px, 26vw, 400px); overflow: hidden; text-decoration: none;
}
.round-arrow {
  position: absolute; right: var(--space-3); bottom: var(--space-3);
  display: grid; place-items: center;
  width: clamp(96px, 11vw, 168px); aspect-ratio: 1;
  border: var(--line-w) solid currentColor; border-radius: 50%;
  transition: background-color var(--motion-duration-fast) var(--motion-ease), color var(--motion-duration-fast) var(--motion-ease);
}
.round-arrow svg {
  width: 38%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.25;
  transform: rotate(-45deg);
  transition: transform var(--motion-duration-normal) var(--motion-ease);
}
.ft-cta:hover .round-arrow { background: var(--color-text-primary); color: var(--color-text-secondary); }
.ft-cta:hover .round-arrow svg { transform: rotate(0deg); }
.ft-cta:hover .t-small { text-decoration: underline; text-underline-offset: 0.22em; }

/* ---------- Links to the product sites ---------- */
.title-link {
  text-decoration: none;
  background: linear-gradient(var(--hl-bar), var(--hl-bar)) no-repeat 0 100% / 0 0.07em;
  transition: background-size var(--motion-duration-normal) var(--motion-ease);
}
.title-link:hover { background-size: 100% 0.07em; }
.site-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); }
.site-link {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--font-size-lg); line-height: 1.2; letter-spacing: -0.01em;
  text-decoration: underline; text-decoration-color: var(--color-accent-sun);
  text-decoration-thickness: 3px; text-underline-offset: 0.18em;
  border-radius: 4px;
  transition: background-color var(--motion-duration-instant) var(--motion-ease), color var(--motion-duration-instant) var(--motion-ease);
}
.site-link .i { width: 20px; height: 20px; transition: transform var(--motion-duration-fast) var(--motion-ease); }
.site-link:hover { background: var(--link-hover-bg); color: var(--link-hover-fg); }
.site-link:hover .i { transform: translate(2px, -2px); }

/* ---------- Highlighted words ---------- */
.hl {
  color: var(--hl-color, inherit);
  background: linear-gradient(var(--hl-bar), var(--hl-bar)) no-repeat 0 92% / 0 0.14em;
  transition: background-size var(--motion-duration-slow) var(--motion-ease) 250ms;
}
.hl.is-in { background-size: 100% 0.14em; }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker ul { display: flex; flex: none; }
.ticker li {
  display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) 0 var(--space-3) var(--space-4);
  font-family: var(--font-family-mono); font-size: var(--font-size-sm); font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.ticker li::after { content: ""; width: var(--mark-size); height: var(--mark-size); border-radius: 50%; background: currentColor; }
.ticker:hover .ticker-track, [data-motion="off"] .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Scroll progress ---------- */
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; pointer-events: none; z-index: 2; }
.progress i { display: block; height: 100%; background: var(--color-accent-sun); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- Conversation demo (vott.work) ---------- */
.chat {
  width: 100%; max-width: 540px; margin-inline: auto;
  border: var(--line-w) solid var(--rule); border-radius: 22px; overflow: hidden;
  background: var(--bg); box-shadow: 0 28px 60px -32px rgb(22 50 59 / 0.45);
}
.chat-head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: var(--line-w) solid var(--rule); }
.chat-avatar {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: var(--color-surface-raised); color: var(--color-text-secondary); font-weight: var(--font-weight-display);
}
.chat-who { flex: 1; min-width: 0; line-height: 1.3; }
.chat-who b { display: block; font-weight: var(--font-weight-display); }
.chat-call { display: inline-flex; align-items: center; gap: 6px; }
.chat-body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); min-height: 470px; }
.msg { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; }
.msg--me { align-self: flex-end; background: var(--color-text-primary); color: var(--color-text-secondary); border-bottom-right-radius: 6px; }
.msg--ai { align-self: flex-start; background: var(--color-surface-muted); color: var(--color-text-primary); border-bottom-left-radius: 6px; }
[data-theme="dark"] .msg--ai { background: var(--color-surface-night); color: var(--color-text-ice); }
[data-theme="dark"] .msg--me { background: var(--color-surface-raised); }
.msg-check { display: grid; gap: 6px; margin-top: 8px; }
.msg-check li { display: flex; align-items: flex-start; gap: 8px; }
.msg-check li::before {
  content: "\2713"; display: grid; place-items: center; flex: none; width: 18px; height: 18px; margin-top: 1px;
  border-radius: 50%; background: var(--color-accent-sun); color: var(--color-text-primary); font-size: 11px; font-weight: 700;
}
.msg-foot { margin-top: 8px; font-weight: var(--font-weight-display); }
.msg-result { display: flex; align-items: center; gap: var(--space-2); background: var(--bg); color: var(--fg); border: 1.5px solid var(--color-accent-sun); }
.msg-thumb {
  width: 54px; height: 40px; flex: none; border-radius: 6px;
  background:
    linear-gradient(var(--color-surface-raised) 0 0) 6px 6px / 42px 6px no-repeat,
    linear-gradient(var(--color-rule-light) 0 0) 6px 17px / 30px 4px no-repeat,
    linear-gradient(var(--color-rule-light) 0 0) 6px 25px / 36px 4px no-repeat,
    linear-gradient(var(--color-accent-sun) 0 0) 6px 32px / 16px 4px no-repeat,
    var(--color-surface-muted);
}
.msg-result small { display: block; color: var(--muted); font-size: var(--font-size-xs); font-family: var(--font-family-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.35; animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 50% { opacity: 1; transform: translateY(-2px); } }
.js .chat [data-step]:not(.is-shown) { display: none; }
.js .chat [data-step].is-shown { animation: msg-in var(--motion-duration-fast) var(--motion-ease); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.typing[hidden] { display: none; }
.chat-note { font-family: var(--font-family-mono); font-size: var(--font-size-xs); letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- Motion ---------- */
/* Cells keep their background; only their content rises in, so hairlines never flash through. */
.js .reveal:not(.cell),
.js .reveal.cell > * {
  opacity: 0;
  transform: translateY(var(--space-3));
  transition: opacity var(--motion-duration-normal) var(--motion-ease), transform var(--motion-duration-slow) var(--motion-ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.cell > .tag--corner { transform: none; }
.js .reveal.is-in:not(.cell),
.js .reveal.cell.is-in > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .js .reveal:not(.cell), .js .reveal.cell > * { opacity: 1; transform: none; }
  .dot--live { animation: none; }
  .ticker-track { animation: none; }
  .hl { background-size: 100% 0.14em; }
}

@media (forced-colors: active) {
  .btn, .tag, .lang a, .input { border: 1px solid CanvasText; }
  .art { display: none; }
}

@media print {
  .site-header, .menu, .art, .ft-cta { display: none !important; }
  .page { border: 0; background: #fff; }
}
