/* Public sales page and companion pages (tietosuoja, auth/error pages). */

:root {
  --bg: #ffffff;
  --surface: #f5f5f3;
  --surface-2: #ebebe8;
  --raised: #ffffff;
  --ink: #17191c;
  --ink-2: #454952;
  --muted: #636773;
  --line: #e4e4e0;
  --line-2: #cfcfc9;
  --decision-bg: #fbe1d1;
  --decision-ink: #5d2a1a;
  --decision-line: #f0c7ad;
  --decision-solid: #8a3d1c;
  --decision-on-solid: #ffffff;
  --ai: #3b55d9;
  --ai-bg: #eceffd;
  --ai-ink: #27379a;
  --ai-line: #cfd6fa;
  --shadow-frame: 0 24px 60px -28px rgba(23, 25, 28, 0.16), 0 4px 14px -6px rgba(23, 25, 28, 0.06);
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-frame: 14px;
  --r-card: 18px;
  --r-sm: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101017;
    --surface: #16161f;
    --surface-2: #1e1e2a;
    --raised: #1b1b27;
    --ink: #ededf3;
    --ink-2: #c5c6d2;
    --muted: #9a9bab;
    --line: #272835;
    --line-2: #383a4b;
    --decision-bg: #38241a;
    --decision-ink: #f8d3bb;
    --decision-line: #5a3a29;
    --decision-solid: #f0b08a;
    --decision-on-solid: #1e120b;
    --ai: #8c9bff;
    --ai-bg: #1b1f3f;
    --ai-ink: #c3caff;
    --ai-line: #2f3668;
    --shadow-frame: 0 28px 64px -24px rgba(0, 0, 0, 0.65), 0 4px 16px -6px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 32px;
}

.muted {
  color: var(--muted);
}

.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
  font-weight: 500;
}

.link:hover {
  text-decoration-color: var(--ink);
}

/* Typography */
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.24;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.body-copy {
  color: var(--ink-2);
  max-width: 66ch;
  font-size: 16.5px;
  line-height: 1.62;
  text-wrap: pretty;
}

/* Header */
.site-header {
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
  align-items: center;
}

.brand-name {
  font-family: var(--font-ui);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.brand-maker {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--line-2);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
  background-color: var(--surface);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background-color: var(--ink);
  color: var(--bg);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  opacity: 0.88;
}

.btn-compact {
  padding: 8px 18px;
  font-size: 14px;
}

.btn-ghost {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}

.btn-ghost:hover {
  opacity: 1;
  border-color: var(--ink);
}

/* Device frame for screenshots */
.frame {
  border: 1px solid var(--line);
  border-radius: var(--r-frame);
  overflow: hidden;
  background-color: var(--raised);
  box-shadow: var(--shadow-frame);
}

.frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--line);
}

.frame-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.frame-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background-color: var(--line-2);
}

.frame-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.frame picture,
.frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero */
.hero {
  padding-top: 64px;
  padding-bottom: 0;
  background-color: var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 48px 56px;
  align-items: start;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 12px;
}

.lead {
  font-size: clamp(16.5px, 1.45vw, 18.5px);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.hero-note {
  font-size: 14px;
  color: var(--muted);
  max-width: 52ch;
}

/* Hero animated case card */
.case-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.case-card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
}

.case-steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-step {
  background-color: var(--raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-step-ai {
  background-color: var(--ai-bg);
  border-color: var(--ai-line);
  border-left: 3px solid var(--ai);
}

.case-step-decision {
  background-color: var(--decision-bg);
  border-color: var(--decision-line);
  border-left: 3px solid var(--decision-solid);
  padding: 13px 14px;
  gap: 6px;
}

.case-step-future {
  background-color: transparent;
  border: 1px dashed var(--line-2);
  padding: 10px 14px;
}

.case-step-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.step-role {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.step-role-ai {
  color: var(--ai-ink);
}

.step-role-decision {
  color: var(--decision-ink);
}

.entity-id {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  line-height: 1.5;
}

.entity-id-ai {
  background-color: var(--raised);
  border-color: var(--ai-line);
  color: var(--ai-ink);
}

.entity-id-decision {
  background-color: var(--raised);
  border-color: var(--decision-line);
  color: var(--decision-ink);
}

.case-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.case-step-text {
  font-size: 14px;
  line-height: 1.42;
  color: var(--ink);
  min-width: 0;
}

.case-step-text-strong {
  font-weight: 600;
  color: var(--decision-ink);
}

.conf-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.conf-value {
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  color: var(--ai-ink);
  min-width: 2ch;
  text-align: right;
}

.conf-label {
  font-size: 12px;
  color: var(--muted);
}

.case-delta {
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ai-ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.decision-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background-color: var(--decision-solid);
  color: var(--decision-on-solid);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  flex-shrink: 0;
}

.case-decision-sub {
  font-size: 12.5px;
  color: var(--decision-ink);
}

.case-future-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.case-future-tags span {
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  border-radius: 999px;
  padding: 1px 9px;
  line-height: 1.5;
}

.case-future-text {
  font-size: 13px;
  color: var(--muted);
}

/* Progress rail under case card */
.case-rail {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(min-content, 1fr));
  gap: 4px;
}

.rail-item {
  position: relative;
  padding-top: 9px;
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.rail-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 999px;
  background-color: var(--line-2);
}

.rail-ai {
  color: var(--ai-ink);
}

.rail-ai::before {
  background-color: var(--ai);
}

.rail-decision {
  color: var(--decision-ink);
  font-weight: 600;
}

.rail-decision::before {
  background-color: var(--decision-solid);
}

.rail-future::before {
  background-color: transparent;
  border-top: 2px dashed var(--line-2);
  border-radius: 0;
}

.case-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-swatch-ai {
  background-color: var(--ai);
}

.legend-swatch-decision {
  background-color: var(--decision-solid);
}

/* Hero screenshot frame overlapping into next section */
.hero-frame {
  margin-top: 56px;
  margin-bottom: -120px;
  position: relative;
  z-index: 2;
}

/* Sections */
.section {
  padding-block: 88px;
  border-top: 1px solid var(--line);
}

.section-surface {
  background-color: var(--surface);
}

.section-problem {
  background-color: var(--surface);
  padding-top: 184px;
  padding-bottom: 96px;
}

.problem-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 820px;
}

.problem-lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(21px, 2.35vw, 27px);
  line-height: 1.48;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  max-width: 48ch;
  text-wrap: pretty;
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 72ch;
}

/* OTA three-column editorial strip */
.ota-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 36px;
}

.ota-pillar {
  border-top: 1px solid var(--line-2);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ota-pillar p {
  font-size: 15px;
  line-height: 1.58;
  color: var(--ink-2);
}

/* Nine-view showcase: base no-JS stacked figures */
.showcase {
  display: block;
}

.showcase-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
}

.showcase-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.showcase-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 68ch;
}

.showcase-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.showcase-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* Nine-view showcase: JS-enhanced interactive switcher */
.showcase-ready {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.showcase-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.showcase-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.showcase-group-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px 2px;
}

.showcase-tab {
  appearance: none;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  background-color: transparent;
  border-radius: 10px;
  padding: 7px 12px;
  min-height: 44px;
  text-align: left;
  font-family: var(--font-ui);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: var(--ink-2);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.showcase-tab:hover {
  background-color: var(--surface);
  color: var(--ink);
}

.showcase-tab.is-active {
  background-color: var(--surface);
  border-color: var(--line);
  border-left: 2px solid var(--ink);
  color: var(--ink);
}

.showcase-tab-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: inherit;
}

.showcase-tab-desc {
  font-size: 12.5px;
  line-height: 1.38;
  color: var(--muted);
}

.showcase-tab.is-active .showcase-tab-desc {
  color: var(--ink-2);
}

.showcase-ready .showcase-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  position: sticky;
  top: 24px;
}

.showcase-ready .showcase-panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.showcase-ready .showcase-panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.showcase-ready .showcase-caption {
  display: none;
}

/* Domain spine chain */
.chain {
  list-style: none;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 8px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-frame);
}

.chain li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chain-step {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.25;
  padding: 6px 12px;
  border-radius: 999px;
  background-color: var(--raised);
  border: 1px solid var(--line);
  color: var(--ink);
}

.chain-step-ai {
  background-color: var(--ai-bg);
  border-color: var(--ai-line);
  color: var(--ai-ink);
}

.chain-step-decision {
  background-color: var(--decision-bg);
  border-color: var(--decision-line);
  color: var(--decision-ink);
}

.chain li:not(:last-child)::after {
  content: "\2192";
  color: var(--muted);
  font-size: 14px;
}

/* Päätöspöytä section */
.desk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr);
  gap: 36px 40px;
  align-items: start;
}

.desk-notes {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.desk-note {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}

.desk-num {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background-color: var(--decision-bg);
  border: 1px solid var(--decision-line);
  color: var(--decision-ink);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.desk-note-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.desk-note-body h3 {
  font-family: var(--font-ui);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.desk-note-body p {
  font-size: 14.5px;
  line-height: 1.56;
  color: var(--ink-2);
}

/* Oppiminen section + SVG loop diagram */
.learning-grid {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 40px 56px;
  align-items: center;
}

.loop-figure {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.loop-svg {
  width: 100%;
  max-width: 440px;
  height: auto;
  overflow: visible;
}

.loop-track {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1.75;
}

.loop-track-active {
  fill: none;
  stroke: var(--ai);
  stroke-width: 2;
  stroke-dasharray: 918;
  stroke-dashoffset: 0;
  opacity: 0.45;
}

.loop-arrow {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loop-return-line {
  fill: none;
  stroke: var(--decision-solid);
  stroke-width: 1.75;
  stroke-linecap: round;
}

.loop-return-arrow {
  fill: none;
  stroke: var(--decision-solid);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loop-center-box {
  fill: var(--surface);
  stroke: var(--line-2);
  stroke-width: 1.25;
}

.loop-center-text {
  fill: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
}

.loop-gate-box {
  fill: var(--decision-bg);
  stroke: var(--decision-line);
  stroke-width: 1.5;
}

.loop-gate-title {
  fill: var(--decision-ink);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
}

.loop-gate-sub {
  fill: var(--decision-ink);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 400;
}

.loop-node-box {
  fill: var(--raised);
  stroke: var(--line-2);
  stroke-width: 1.25;
}

.loop-node-box-ai {
  fill: var(--ai-bg);
  stroke: var(--ai-line);
}

.loop-node-text {
  fill: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
}

.loop-node-text-ai {
  fill: var(--ai-ink);
  font-weight: 600;
}

.loop-orbit {
  transform-origin: 230px 230px;
}

.loop-dot-halo {
  fill: var(--ai);
  opacity: 0.18;
}

.loop-dot {
  fill: var(--ai);
  stroke: var(--bg);
  stroke-width: 2;
}

.levels-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.level-item {
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.level-item p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 58ch;
}

.learning-shot {
  margin-top: 8px;
}

/* Rakennettu johtoryhmän ehdoilla: principles + mock log */
.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 36px 52px;
  align-items: start;
}

.principles-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line-2);
}

.principles-list li {
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 58ch;
}

.log-panel {
  background-color: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.log-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.log-count {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.log {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.log-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background-color: var(--bg);
  font-size: 14px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.log-row-ai {
  background-color: var(--ai-bg);
  border-color: var(--ai-line);
  border-left: 3px solid var(--ai);
}

.log-row-decision {
  background-color: var(--raised);
  border-color: var(--decision-line);
  border-left: 3px solid var(--decision-solid);
}

.log-row-undo {
  background-color: var(--surface);
  border-color: var(--line);
  border-style: dashed;
}

.log-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.log-dot-ai {
  background-color: var(--ai);
}

.log-dot-decision {
  background-color: var(--decision-solid);
}

.log-dot-undo {
  background-color: transparent;
  border: 1.5px solid var(--muted);
}

.log-text {
  color: var(--ink);
  min-width: 0;
}

.log-row-undo .log-text {
  color: var(--ink-2);
}

/* Demo bullets + Credential request form section */
.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 40px 56px;
  align-items: start;
}

.demo-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
}

.demo-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}

.demo-list li {
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  line-height: 1.56;
  color: var(--ink-2);
}

.section-note {
  font-size: 14px;
  color: var(--muted);
  max-width: 52ch;
}

.form-panel {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-layout {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.field-group input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background-color: var(--raised);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.4;
  transition: border-color 0.15s ease;
}

.field-group input::placeholder {
  color: var(--muted);
}

.field-group input:hover {
  border-color: var(--ink-2);
}

.field-group input:focus {
  border-color: var(--ai);
}

.lead-form .btn {
  align-self: flex-start;
  min-height: 48px;
  padding: 12px 26px;
  font-size: 15.5px;
  margin-top: 4px;
}

.privacy-summary {
  background-color: var(--raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Visually hidden honeypot wrapper */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 32px 48px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  color: var(--ink-2);
  font-weight: 500;
}

.footer-credit {
  color: var(--muted);
}

/* Simple centered column used by tietosuoja.html and server-rendered pages */
.page {
  max-width: 70ch;
  margin-inline: auto;
  padding: 48px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page h1 {
  font-size: clamp(28px, 3.8vw, 40px);
}

.page h2 {
  font-size: clamp(20px, 2.2vw, 24px);
  margin-top: 12px;
}

.page p {
  color: var(--ink-2);
  text-wrap: pretty;
}

.page ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-2);
}

.page a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
  font-weight: 500;
}

.page a:hover {
  text-decoration-color: var(--ink);
}

.page a.eyebrow {
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  align-self: flex-start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.page a.eyebrow:hover {
  color: var(--ink);
}

.page-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.back-link {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.back-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.error-summary {
  background-color: var(--decision-bg);
  border: 1px solid var(--decision-line);
  border-left: 3px solid var(--decision-solid);
  border-radius: var(--r-sm);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.error-summary h2 {
  font-family: var(--font-ui);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--decision-ink);
  margin-top: 0;
}

.error-summary ul {
  color: var(--decision-ink);
}

/* Purposeful motion: wrapped strictly in prefers-reduced-motion: no-preference */
@keyframes step-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes decision-settle {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  70% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rail-light {
  from {
    opacity: 0.28;
  }
  to {
    opacity: 1;
  }
}

@keyframes loop-orbit-once {
  from {
    transform: rotate(67.5deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes loop-stroke-once {
  from {
    stroke-dashoffset: 918;
  }
  to {
    stroke-dashoffset: 172;
  }
}

@keyframes gate-arrive {
  0% {
    opacity: 0.55;
  }
  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .case-seq-1 {
    animation: step-arrive 0.5s ease 0.15s 1 both;
  }

  .case-seq-2 {
    animation: step-arrive 0.5s ease 0.95s 1 both;
  }

  .case-seq-3 {
    animation: step-arrive 0.5s ease 1.85s 1 both;
  }

  .case-seq-4 {
    animation: step-arrive 0.5s ease 2.65s 1 both;
  }

  .case-seq-5 {
    animation: decision-settle 0.65s ease 3.45s 1 both;
  }

  .case-seq-6 {
    animation: step-arrive 0.55s ease 4.35s 1 both;
  }

  .rail-seq-1 {
    animation: rail-light 0.4s ease 0.15s 1 both;
  }

  .rail-seq-2 {
    animation: rail-light 0.4s ease 0.95s 1 both;
  }

  .rail-seq-3 {
    animation: rail-light 0.4s ease 1.85s 1 both;
  }

  .rail-seq-4 {
    animation: rail-light 0.4s ease 2.65s 1 both;
  }

  .rail-seq-5 {
    animation: rail-light 0.45s ease 3.45s 1 both;
  }

  .rail-seq-6 {
    animation: rail-light 0.35s ease 4.35s 1 both;
  }

  .rail-seq-7 {
    animation: rail-light 0.35s ease 4.55s 1 both;
  }

  .rail-seq-8 {
    animation: rail-light 0.35s ease 4.75s 1 both;
  }

  .loop-figure .loop-track-active {
    stroke-dashoffset: 918;
  }

  .loop-figure.is-visible .loop-track-active {
    animation: loop-stroke-once 2.8s cubic-bezier(0.35, 0, 0.2, 1) 0.2s 1 both;
  }

  .loop-figure.is-visible .loop-orbit {
    animation: loop-orbit-once 2.8s cubic-bezier(0.35, 0, 0.2, 1) 0.2s 1 both;
  }

  .loop-figure.is-visible .loop-gate {
    animation: gate-arrive 0.5s ease 2.75s 1 both;
  }
}

/* Responsive layouts */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .desk-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .learning-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .trust-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .cta-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 900px) {
  .ota-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .showcase-ready {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .showcase-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .showcase-nav::-webkit-scrollbar {
    display: none;
  }

  .showcase-group {
    display: contents;
  }

  .showcase-group-label {
    display: none;
  }

  .showcase-tab {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 16px;
    min-height: 44px;
    flex-direction: row;
    align-items: center;
    white-space: nowrap;
  }

  .showcase-tab.is-active {
    background-color: var(--ink);
    border-color: var(--ink);
    border-left-color: var(--ink);
    color: var(--bg);
  }

  .showcase-tab-desc {
    display: none;
  }

  .showcase-ready .showcase-stage {
    position: static;
  }

  .showcase-ready .showcase-caption {
    display: flex;
    padding-top: 6px;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding-inline: 16px;
  }

  .site-header-in {
    gap: 12px;
  }

  .site-nav {
    display: none;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    justify-content: center;
  }

  .brand-name {
    font-size: 14.5px;
    line-height: 1.2;
  }

  .brand-maker {
    font-size: 11.5px;
    line-height: 1.2;
    padding-left: 0;
    border-left: 0;
  }

  .btn-compact {
    padding: 8px 14px;
    font-size: 13.5px;
  }

  .hero {
    padding-top: 36px;
  }

  .hero-frame {
    margin-top: 36px;
    margin-bottom: -52px;
  }

  .section {
    padding-block: 56px;
  }

  .section-problem {
    padding-top: 92px;
    padding-bottom: 60px;
  }

  .section-stack {
    gap: 28px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .btn {
    width: 100%;
  }

  .case-card {
    padding: 12px;
  }

  .case-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 6px;
  }

  .log-row {
    align-items: flex-start;
  }

  .log-dot {
    margin-top: 6px;
  }

  .form-panel {
    padding: 22px 18px;
  }

  .lead-form .btn {
    align-self: stretch;
    width: 100%;
  }

  .page {
    padding: 32px 16px 56px;
  }
}

/* Narrowest phones: drop the maker label so the header button fits. */
@media (max-width: 359px) {
  .brand-maker {
    display: none;
  }

  .brand-name {
    font-size: 13px;
  }

  .btn-compact {
    padding-inline: 10px;
    font-size: 13px;
  }

  .site-header-in {
    gap: 8px;
  }
}
