/* ============================================================
   Mergenware — design system
   Dark mono base. Tweakable theme, density, motion.
   ============================================================ */

:root {
  /* Type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Mono dark — default */
  --bg: #0a0a0a;
  --bg-2: #111111;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --surface-3: #222222;
  --border: #232323;
  --border-2: #2c2c2c;
  --text: #f3f3f3;
  --text-dim: #8a8a8a;
  --text-faint: #5a5a5a;
  --accent: #f5f5f5;
  --signal: #9bb89a; /* desaturated calm green */

  /* Density (airy ↔ compact) */
  --pad-section: clamp(80px, 12vw, 160px);
  --gutter: clamp(20px, 3vw, 40px);
  --stack: clamp(20px, 2vw, 28px);
  --max-w: 1280px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 600ms;

  color-scheme: dark;
}

/* ---- Theme variants ---- */
:root[data-theme="warm-dark"] {
  --bg: #0e0c0a;
  --bg-2: #15120e;
  --surface: #181410;
  --surface-2: #1e1914;
  --surface-3: #28221a;
  --border: #2a2218;
  --border-2: #36291c;
  --text: #f4ece0;
  --text-dim: #9a8e7d;
  --text-faint: #65594a;
  --signal: #c89b6a;
}
:root[data-theme="mono-light"] {
  color-scheme: light;
  --bg: #f7f6f3;
  --bg-2: #efeeea;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --surface-3: #e6e4dd;
  --border: #d9d6cd;
  --border-2: #c8c5bb;
  --text: #0c0c0c;
  --text-dim: #5a5a5a;
  --text-faint: #8a8a8a;
  --accent: #0c0c0c;
  --signal: #3f6f3d;
}

/* ---- Density ---- */
:root[data-density="compact"] {
  --pad-section: clamp(56px, 8vw, 104px);
  --gutter: clamp(14px, 2vw, 24px);
  --stack: clamp(14px, 1.4vw, 20px);
}
:root[data-density="airy"] {
  --pad-section: clamp(112px, 16vw, 220px);
  --gutter: clamp(28px, 4vw, 56px);
  --stack: clamp(28px, 2.8vw, 40px);
}

/* ---- Motion ---- */
:root[data-motion="off"] .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
:root[data-motion="full"] { --dur: 850ms; }

/* ============================================================
   Reset + base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02";
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); }

::selection { background: var(--text); color: var(--bg); }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.tnum { font-variant-numeric: tabular-nums; }

/* Container */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 56px);
  padding-right: clamp(20px, 4vw, 56px);
}

/* Reveal */
/* Content is visible without JS; the "js" class (set in <head>) enables the hidden start state. */
.js .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(14px);
}
.js .reveal {
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  will-change: opacity, transform;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal:not(.is-in) { opacity: 1; transform: none; }
  .js .reveal { transition: none; }
  .status-dot { animation: none; }
  .btn, .btn .arrow, .app-card { transition: none; }
}

/* ============================================================
   Logo / wordmark
   ============================================================ */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  letter-spacing: 0.18em;
  font-weight: 600;
  font-family: var(--font-display);
}
.wordmark-text { display: inline-block; }

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 56px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.nav-brand { display: inline-flex; }
.nav-links {
  justify-self: center;
  display: flex;
  gap: 28px;
}
.nav-link {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
  transition: color 200ms var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link.is-current { color: var(--text); }
.nav-link.is-current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -16px;
  height: 1px; background: var(--text);
}
.nav-actions {
  display: flex; align-items: center; gap: 8px;
}
.nav-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  transition: color 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease);
}
.nav-pill:hover { color: var(--text); border-color: var(--border-2); }
.nav-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--signal) 22%, transparent);
}
.nav-pill-sep { opacity: 0.45; }
.nav-pill-dim { color: var(--text-faint); }

.nav-burger { display: none; flex-direction: column; gap: 4px; padding: 8px; }
.nav-burger span { display: block; width: 18px; height: 1px; background: var(--text); }
.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px clamp(20px, 4vw, 56px);
  flex-direction: column; gap: 12px;
  background: var(--bg-2);
}
.nav-mobile a { font-size: 14px; color: var(--text-dim); }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile.is-open { display: flex; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 220ms var(--ease), background 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--text);
  color: var(--bg);
}
.btn--primary:hover { background: color-mix(in oklab, var(--text) 90%, var(--signal)); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn--ghost:hover { border-color: var(--text); }
.btn .arrow {
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 220ms var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   Kicker / section header
   ============================================================ */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.kicker::before {
  content: "";
  width: 16px; height: 1px;
  background: var(--text-dim);
}
.section-h { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: 56px; }
.section-h--center { align-items: center; text-align: center; margin-left: auto; margin-right: auto; }
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
.section-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: clamp(15px, 1.2vw, 17px);
  max-width: 56ch;
  text-wrap: pretty;
}

section[data-section] {
  padding-top: var(--pad-section);
  padding-bottom: var(--pad-section);
  position: relative;
}
section[data-section] + section[data-section] { border-top: 1px solid var(--border); }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding-top: calc(var(--pad-section) * 0.6);
  padding-bottom: calc(var(--pad-section) * 0.9);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: end;
}
.hero-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.hero-kicker { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-kicker .status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--text-dim); text-transform: uppercase;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--signal) 25%, transparent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--signal) 25%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--signal) 10%, transparent); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 9vw, 132px);
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0;
  text-wrap: balance;
}
.hero-title .line { display: block; }
.hero-title .line-2 { color: var(--text-dim); }

.hero-sub {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text-dim);
  max-width: 52ch;
  margin: 16px 0 0 0;
  text-wrap: pretty;
}

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

.hero-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-top: 56px;
  align-items: end;
}
.hero-stat { display: flex; flex-direction: column; gap: 6px; }
.hero-stat-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.02em;
}
.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

/* Hero ambient grid backdrop */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--border) 80%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--border) 80%, transparent) 1px, transparent 1px);
  background-size: clamp(40px, 6vw, 96px) clamp(40px, 6vw, 96px);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}

@media (max-width: 720px) {
  .hero-foot { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Apps showcase
   ============================================================ */

.apps-wrap { display: flex; flex-direction: column; gap: 40px; }

/* Layout variants set via data-apps-layout on the section */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}
@media (max-width: 900px) {
  .apps-grid { grid-template-columns: 1fr; }
}

.app-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 250ms var(--ease), transform 250ms var(--ease), background 250ms var(--ease);
}
.app-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  background: var(--surface-2);
}
.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.app-card-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}
.app-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.app-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, transparent 40%, color-mix(in oklab, var(--text) 4%, transparent) 50%, transparent 60%);
  pointer-events: none;
}
.app-preview {
  position: relative;
  aspect-ratio: 9 / 14;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    radial-gradient(140% 80% at 50% 0%, color-mix(in oklab, var(--text) 4%, transparent), transparent 50%),
    var(--surface-2);
  overflow: hidden;
}
.app-preview .device {
  position: absolute;
  inset: 14% 18% -22% 18%;
  border-radius: 26px 26px 0 0;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-bottom: 0;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
  overflow: hidden;
  padding: 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.app-preview .device .row {
  height: 6px; border-radius: 3px;
  background: var(--surface-3);
}
.app-preview .device .row.short { width: 50%; }
.app-preview .device .row.med { width: 75%; }
.app-preview .device .row.lock {
  height: 28px; border-radius: 8px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-faint); letter-spacing: 0.18em;
}
.app-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 1.8vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.app-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.app-desc {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}
.app-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.app-meta .link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text);
}
.app-meta .link::after { content: "→"; transition: transform 200ms var(--ease); }
.app-card:hover .app-meta .link::after { transform: translateX(3px); }

/* Stacked layout — full-width rows */
[data-apps-layout="stacked"] .apps-grid {
  grid-template-columns: 1fr;
}
[data-apps-layout="stacked"] .app-card {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr 0.8fr;
  gap: 32px;
  align-items: center;
  padding: 28px;
}
[data-apps-layout="stacked"] .app-card .app-preview { aspect-ratio: 16 / 10; }
[data-apps-layout="stacked"] .app-card .app-preview .device { inset: 8% 30% -10% 30%; }
@media (max-width: 900px) {
  [data-apps-layout="stacked"] .app-card { grid-template-columns: 1fr; }
}

/* Carousel layout — horizontal scroll */
[data-apps-layout="carousel"] .apps-grid {
  grid-template-columns: none;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: var(--gutter);
  padding-bottom: 8px;
  margin-left: calc(-1 * clamp(20px, 4vw, 56px));
  margin-right: calc(-1 * clamp(20px, 4vw, 56px));
  padding-left: clamp(20px, 4vw, 56px);
  padding-right: clamp(20px, 4vw, 56px);
}
[data-apps-layout="carousel"] .app-card {
  flex: 0 0 min(420px, 80vw);
  scroll-snap-align: start;
}

/* ============================================================
   Capabilities
   ============================================================ */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.cap-cell {
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
  background: var(--surface);
  transition: background 220ms var(--ease);
}
.cap-cell:hover { background: var(--surface-2); }
.cap-cell:nth-child(3n) { border-right: 0; }
.cap-cell:nth-last-child(-n+3) { border-bottom: 0; }
.cap-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}
.cap-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}
.cap-desc { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.5; max-width: 36ch; }

@media (max-width: 900px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap-cell { border-right: 0; }
  .cap-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .cap-cell:last-child { border-bottom: 0; }
}

/* ============================================================
   Security
   ============================================================ */

.sec-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 980px) { .sec-split { grid-template-columns: 1fr; gap: 56px; } }

.sec-list { display: flex; flex-direction: column; gap: 0; }
.sec-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: start;
}
.sec-item:last-child { border-bottom: 0; }
.sec-item-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  padding-top: 4px;
}
.sec-item-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}
.sec-item-body { color: var(--text-dim); margin: 0; font-size: 14.5px; line-height: 1.55; max-width: 52ch; }

@media (max-width: 600px) {
  .sec-item { grid-template-columns: 1fr; gap: 8px; }
}

/* Code-ish panel */
.code-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
}
.code-panel-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.code-panel-bar .lights { display: flex; gap: 5px; }
.code-panel-bar .lights span { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.code-panel-body { padding: 18px 18px 22px; color: var(--text-dim); }
.code-panel-body .ln { display: block; }
.code-panel-body .k { color: var(--text); }
.code-panel-body .c { color: var(--text-faint); }
.code-panel-body .s { color: var(--signal); }

/* ============================================================
   About
   ============================================================ */

.about-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) { .about-split { grid-template-columns: 1fr; gap: 48px; } }

.about-body { color: var(--text); font-size: clamp(16px, 1.2vw, 19px); line-height: 1.6; }
.about-body p + p { margin-top: 1em; }
.about-team { display: flex; flex-direction: column; gap: 18px; padding-left: 0; }
.about-team-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.about-team-row:last-child { border-bottom: 0; }
.about-team-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(160deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
  letter-spacing: 0.04em;
}
.about-team-name { font-family: var(--font-display); font-size: 16px; }
.about-team-role { color: var(--text-dim); font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.about-team-tag { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.1em; }

/* ============================================================
   Press / quotes
   ============================================================ */

.press-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}
@media (max-width: 900px) { .press-grid { grid-template-columns: 1fr; } }
.press-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 24px;
  min-height: 220px;
  justify-content: space-between;
}
.press-quote {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.4;
  margin: 0;
  text-wrap: pretty;
}
.press-cite {
  display: flex; justify-content: space-between; align-items: end;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ============================================================
   FAQ
   ============================================================ */

.faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-summary {
  display: grid;
  grid-template-columns: 60px 1fr 28px;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary:hover .faq-q { color: var(--text); }
.faq-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--text-faint); }
.faq-q {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color 200ms var(--ease);
}
.faq-toggle {
  width: 24px; height: 24px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-dim);
  transition: transform 220ms var(--ease), border-color 220ms var(--ease);
  font-size: 14px;
}
details[open] .faq-toggle { transform: rotate(45deg); border-color: var(--text); color: var(--text); }
.faq-a {
  padding: 0 0 24px 84px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
  max-width: 72ch;
}

@media (max-width: 600px) {
  .faq-summary { grid-template-columns: 1fr 28px; }
  .faq-num { display: none; }
  .faq-a { padding-left: 0; }
}

/* ============================================================
   Newsletter + contact CTA
   ============================================================ */

.cta-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
}
.cta-pane {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 380px;
  position: relative;
}
.cta-pane + .cta-pane { border-left: 1px solid var(--border); }
.cta-pane .pane-h {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.cta-pane .pane-b { margin: 0; color: var(--text-dim); font-size: 15px; max-width: 36ch; }
.cta-pane .pane-foot { margin-top: auto; }

.news-form { display: flex; gap: 10px; flex-wrap: wrap; }
.news-input {
  flex: 1; min-width: 220px;
  height: 48px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  border-radius: 999px;
  padding: 0 22px;
  font: inherit;
  outline: none;
  transition: border-color 200ms var(--ease);
}
.news-input:focus { border-color: var(--text); }
.news-input::placeholder { color: var(--text-faint); }
.news-msg { font-family: var(--font-mono); font-size: 12px; color: var(--signal); letter-spacing: 0.08em; }

.contact-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.contact-chip:hover { color: var(--text); border-color: var(--text); }
.contact-chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }

@media (max-width: 820px) {
  .cta-wrap { grid-template-columns: 1fr; }
  .cta-pane + .cta-pane { border-left: 0; border-top: 1px solid var(--border); }
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  padding-top: 80px;
  padding-bottom: 32px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
.footer > * { max-width: var(--max-w); margin-left: auto; margin-right: auto; padding-left: clamp(20px, 4vw, 56px); padding-right: clamp(20px, 4vw, 56px); }
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 56px;
  padding-bottom: 56px;
}
.footer-tagline {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.02em;
  margin: 16px 0 0 0;
  max-width: 26ch;
  text-wrap: pretty;
}
.footer-meta { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 32px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col .footer-h {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 6px 0;
}
.footer-col a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 200ms var(--ease);
}
.footer-col a:hover { color: var(--text); }

.footer-rule { height: 1px; background: var(--border); margin: 0; max-width: none; padding: 0; }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Placeholder (used for image slots)
   ============================================================ */

.placeholder {
  border-radius: 14px;
  background:
    repeating-linear-gradient(135deg, var(--surface-2) 0 8px, var(--surface) 8px 16px);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.placeholder--light {
  background:
    repeating-linear-gradient(135deg, var(--bg-2) 0 8px, var(--surface) 8px 16px);
}
.placeholder-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================================
   Inner page (Privacy / Terms / Contact)
   ============================================================ */

.page-hero {
  padding-top: calc(var(--pad-section) * 0.6);
  padding-bottom: calc(var(--pad-section) * 0.4);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 80px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 24px 0 24px 0;
  font-weight: 500;
}
.page-hero p {
  max-width: 60ch;
  color: var(--text-dim);
  font-size: clamp(16px, 1.2vw, 18px);
  margin: 0;
}
.page-body { padding-bottom: var(--pad-section); }
.page-body h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  margin: 56px 0 16px 0;
  letter-spacing: -0.02em;
}
.page-body h2:first-of-type { margin-top: 0; }
.page-body h3 { font-family: var(--font-display); font-size: clamp(18px, 1.5vw, 21px); margin: 36px 0 12px 0; letter-spacing: -0.01em; font-weight: 500; }
.page-body h4 { font-family: var(--font-display); font-size: 16px; margin: 28px 0 8px 0; font-weight: 500; }
.page-body p, .page-body li { color: var(--text-dim); line-height: 1.7; font-size: 15.5px; max-width: 72ch; }
.page-body p { margin: 0 0 16px 0; }
.page-body ul, .page-body ol { padding-left: 22px; margin: 0 0 20px 0; list-style-position: outside; }
.page-body ul { list-style-type: disc; }
.page-body ol { list-style-type: decimal; }
.page-body li { margin: 8px 0; }
.page-body li::marker { color: var(--text-faint); }
.page-body strong { color: var(--text); font-weight: 600; }
.page-body a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.page-body a:hover { text-decoration-thickness: 2px; }
.page-body code { font-family: var(--font-mono); font-size: 0.92em; background: var(--surface); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }
.page-body .legal-note { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-faint); margin: 0 0 32px 0; }
.page-body .legal-note[hidden] { display: none; }


/* ============================================================
   Production additions
   ============================================================ */

/* Contrast: lift the faintest text tone to stay readable at small sizes */
:root { --text-faint: #7b7b7b; }
:root[data-theme="mono-light"] { --text-faint: #6b6b6b; }

/* Accessibility */
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-size: 13px;
}
.skip-link:focus { left: 8px; z-index: 100; }
section[id] { scroll-margin-top: 60px; }
.nav-burger { border-radius: 8px; }

/* Code panel: preserve indentation, scroll on narrow screens */
.code-panel-body { overflow-x: auto; }
.code-panel-body .ln { white-space: pre; }

/* ---------- Services ---------- */
.svc-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: var(--gutter);
}
.svc-mode {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 18px;
  row-gap: 8px;
  align-items: start;
  padding: 28px;
  border-right: 1px solid var(--border);
  transition: background 220ms var(--ease);
}
.svc-mode:last-child { border-right: 0; }
.svc-mode:hover { background: var(--surface-2); }
.svc-mode-code {
  grid-row: span 2;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--text);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
}
.svc-mode-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  align-self: center;
}
.svc-mode-body { grid-column: 2; margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.5; }

.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.svc-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 300px;
  padding: 32px 28px 24px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 220ms var(--ease);
}
.svc-card:hover { background: var(--surface-2); }
.svc-card:nth-child(3n) { border-right: 0; }
.svc-card:nth-last-child(-n+3) { border-bottom: 0; }
.svc-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--text-faint); }
.svc-title { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.svc-desc { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.svc-tag {
  padding: 4px 10px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  white-space: nowrap;
}
.svc-card-foot {
  display: flex; gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.mode-badge {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
}
.mode-badge.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
.mode-badge.is-off { border-style: dashed; color: var(--text-faint); opacity: 0.55; }

.svc-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-top: var(--gutter);
  padding: 20px 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}
.svc-foot-text { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--text-dim); }

@media (max-width: 900px) {
  .svc-modes { grid-template-columns: 1fr; }
  .svc-mode { border-right: 0; border-bottom: 1px solid var(--border); }
  .svc-mode:last-child { border-bottom: 0; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-card:nth-child(3n) { border-right: 1px solid var(--border); }
  .svc-card:nth-child(2n) { border-right: 0; }
  .svc-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .svc-card:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 600px) {
  .svc-grid { grid-template-columns: 1fr; }
  .svc-card { border-right: 0; min-height: 0; }
  .svc-card:nth-child(2n), .svc-card:nth-child(3n) { border-right: 0; }
  .svc-card:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .svc-card:last-child { border-bottom: 0; }
  .svc-foot { padding: 20px; }
}

/* App preview tiles (Mind Warrior mock) */
.app-preview .device .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px 0; }
.app-preview .device .tiles i { aspect-ratio: 1; border-radius: 4px; background: var(--surface-3); }
.app-preview .device .tiles i.on { background: var(--text); opacity: 0.9; }

/* ---------- About facts ---------- */
.about-facts { display: flex; flex-direction: column; }
.about-fact {
  display: grid;
  grid-template-columns: minmax(110px, 160px) 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.about-fact:first-child { border-top: 1px solid var(--border); }
.about-fact-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.about-fact-value { font-family: var(--font-display); font-size: 16px; color: var(--text); }

/* ---------- Contact ---------- */
.cta-pane .btn { align-self: flex-start; }

.contact-mail { padding-bottom: var(--pad-section); }
.contact-mail-link {
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 4.4vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
  text-decoration: none;
}
.contact-mail-link:hover, .contact-mail-link:focus-visible { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 2px; }
