/* AgenX Systems full-site mockup design system (AX-MOCK-004).
   One token layer drives both themes. Dark navy is the primary brand mode;
   light is a full alternate. All component colors reference tokens only. */

/* ---------- Tokens: dark (default / brand) ---------- */

:root {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #0a1728;
  --surface-soft: rgba(255, 255, 255, 0.04);
  --text: #f7fafc;
  --muted: #a3afc3;
  --muted-2: #76839a;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --mint: #4ee6b4;
  --blue: #67a8ff;
  --mint-soft: rgba(78, 230, 180, 0.08);
  --mint-line: rgba(78, 230, 180, 0.35);
  --blue-soft: rgba(103, 168, 255, 0.08);
  --blue-line: rgba(103, 168, 255, 0.35);
  --header-bg: rgba(7, 17, 31, 0.86);
  --danger: #ff7a90;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --console-grad: linear-gradient(180deg, var(--surface), rgba(10, 23, 40, 0.4));
  --radius: 12px;
  --content-max: 1120px;
  --gutter: 28px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ---------- Tokens: light (explicit choice) ---------- */

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-soft: rgba(13, 23, 38, 0.03);
  --text: #0e1726;
  --muted: #46566c;
  --muted-2: #5d6b81;
  --line: rgba(13, 23, 38, 0.13);
  --line-soft: rgba(13, 23, 38, 0.07);
  --mint: #047857;
  --blue: #1d4ed8;
  --mint-soft: rgba(4, 120, 87, 0.07);
  --mint-line: rgba(4, 120, 87, 0.35);
  --blue-soft: rgba(29, 78, 216, 0.06);
  --blue-line: rgba(29, 78, 216, 0.3);
  --header-bg: rgba(247, 249, 248, 0.86);
  --danger: #b3263c;
  --shadow: 0 24px 60px rgba(13, 23, 38, 0.1);
  --console-grad: linear-gradient(180deg, var(--surface), rgba(255, 255, 255, 0.6));
}

/* ---------- Tokens: light (system preference, no explicit choice) ---------- */

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f7f9f8;
    --surface: #ffffff;
    --surface-soft: rgba(13, 23, 38, 0.03);
    --text: #0e1726;
    --muted: #46566c;
    --muted-2: #5d6b81;
    --line: rgba(13, 23, 38, 0.13);
    --line-soft: rgba(13, 23, 38, 0.07);
    --mint: #047857;
    --blue: #1d4ed8;
    --mint-soft: rgba(4, 120, 87, 0.07);
    --mint-line: rgba(4, 120, 87, 0.35);
    --blue-soft: rgba(29, 78, 216, 0.06);
    --blue-line: rgba(29, 78, 216, 0.3);
    --header-bg: rgba(247, 249, 248, 0.86);
    --danger: #b3263c;
    --shadow: 0 24px 60px rgba(13, 23, 38, 0.1);
    --console-grad: linear-gradient(180deg, var(--surface), rgba(255, 255, 255, 0.6));
  }
}

/* ---------- Base ---------- */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.shell {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.brand svg { display: block; flex: none; }

.nav-links {
  display: none;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a:hover { color: var(--text); }

.nav-links a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface-soft);
  transition: color 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover { color: var(--text); border-color: var(--muted-2); }

.theme-toggle svg { width: 17px; height: 17px; }

.theme-toggle .icon-moon { display: none; }

[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
}

.nav-cta {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  transition: opacity 160ms ease;
  white-space: nowrap;
}

.nav-cta:hover { opacity: 0.85; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface-soft);
}

.menu-toggle:hover { color: var(--text); }

.menu-toggle svg { width: 17px; height: 17px; }

.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-bars { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.mobile-menu ul {
  list-style: none;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 10px var(--gutter) 18px;
}

.mobile-menu a {
  display: block;
  padding: 12px 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
}

.mobile-menu a:hover,
.mobile-menu a[aria-current="page"] { color: var(--text); }

.mobile-menu .mobile-cta {
  margin-top: 14px;
  border: none;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  text-align: center;
  padding: 13px;
}

/* ---------- Buttons / eyebrow / badges ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 10px;
  transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.button:active { transform: scale(0.98); }

.button-primary { background: var(--text); color: var(--bg); }
.button-primary:hover { opacity: 0.85; }
.button-primary svg { width: 16px; height: 16px; }

.button-secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface-soft);
}

.button-secondary:hover { border-color: var(--muted-2); }

.button[disabled],
.button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 26px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
}

.badge-pass {
  color: var(--mint);
  border: 1px solid var(--mint-line);
  background: var(--mint-soft);
}

.badge-review {
  color: var(--blue);
  border: 1px solid var(--blue-line);
  background: var(--blue-soft);
}

.badge-neutral {
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

/* ---------- Heroes ---------- */

.hero {
  padding: clamp(72px, 12vh, 132px) 0 clamp(40px, 6vh, 64px);
  text-align: center;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 760;
  line-height: 1.04;
  max-width: 17ch;
  margin-inline: auto;
}

.accent {
  background: linear-gradient(120deg, var(--blue), var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 58ch;
  margin: 24px auto 0;
  font-size: clamp(16px, 1.9vw, 19px);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

/* Subpage hero: left-aligned, smaller */

.page-hero { padding: clamp(56px, 9vh, 104px) 0 clamp(32px, 5vh, 56px); }

.page-hero h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 760;
  line-height: 1.06;
  max-width: 18ch;
}

.page-hero .hero-copy {
  margin: 20px 0 0;
  max-width: 60ch;
}

.page-hero .hero-actions {
  justify-content: flex-start;
  margin-top: 30px;
}

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 9vh, 104px) 0; }
.section-tight { padding: clamp(36px, 6vh, 64px) 0; }

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 740;
  line-height: 1.12;
  max-width: 24ch;
}

.section-sub {
  margin-top: 14px;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 17px);
}

.section-kicker {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--mint);
  margin-bottom: 14px;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 26px 24px;
  transition: border-color 180ms ease, transform 180ms ease;
}

a.card:hover,
.card.is-hoverable:hover {
  border-color: var(--muted-2);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 7px;
}

.card p {
  font-size: 14.5px;
  color: var(--muted);
}

.card .card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.card-link-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mint);
}

.card-link-hint svg { width: 14px; height: 14px; }

/* Joined grid (principles style: 1px gaps over a line background) */

.joined-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}

.joined-cell {
  background: var(--bg);
  padding: 28px 26px;
}

.joined-cell h2,
.joined-cell h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.joined-cell .tick { color: var(--mint); margin-right: 8px; }

.joined-cell p {
  font-size: 14.5px;
  color: var(--muted);
}

/* ---------- Numbered steps ---------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-top: 48px;
  counter-reset: step;
}

.step { counter-increment: step; }

.step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--mint);
  margin-bottom: 12px;
}

.step h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Tabs / stepper (shared behavior, two skins) ---------- */

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.tab {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  background: var(--surface-soft);
  transition: color 160ms ease, border-color 160ms ease;
}

.tab:hover { color: var(--text); }

.tab[aria-selected="true"] {
  color: var(--text);
  border-color: var(--mint-line);
  background: var(--mint-soft);
}

.tab-panel {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 28px 26px;
}

.tab-panel h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tab-panel p {
  font-size: 15px;
  color: var(--muted);
  max-width: 64ch;
}

.tab-panel[hidden] { display: none; }

/* Stepper skin: numbered pills */

.stepper .tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
}

.stepper .tab .step-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mint);
}

/* ---------- Console (live ingestion card) ---------- */

.console-section { padding: clamp(28px, 5vh, 56px) 0 0; }

.console {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--console-grad);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.console-head strong { color: var(--text); font-weight: 600; }

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mint);
  border: 1px solid var(--mint-line);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.console-body {
  display: grid;
  grid-template-columns: 1fr;
}

.console-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.sources-label {
  width: 100%;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.source-chip {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--surface-soft);
}

.console-rows { padding: 6px 0; }

.work-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 20px;
}

.work-row + .work-row { border-top: 1px solid var(--line-soft); }

.work-main { min-width: 0; }

.work-main strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}

.work-main span {
  display: block;
  font-size: 13px;
  color: var(--muted-2);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-from {
  display: none;
  font-size: 13px;
  color: var(--muted-2);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-from b { color: var(--muted); font-weight: 600; }

.work-badge { justify-self: end; }

.console-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted-2);
  font-family: var(--mono);
}

/* ---------- Forge demo ---------- */

.demo {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--console-grad);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 40px;
}

.demo-request {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.demo-request strong { font-size: 14.5px; font-weight: 600; }

.demo-request span {
  display: block;
  font-size: 13px;
  color: var(--muted-2);
  margin-top: 2px;
}

.demo-stages {
  list-style: none;
  padding: 6px 0;
}

.demo-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
}

.demo-stage + .demo-stage { border-top: 1px solid var(--line-soft); }

.demo-stage .stage-name { font-size: 14px; font-weight: 600; }

.demo-stage .stage-desc {
  display: block;
  font-size: 12.5px;
  color: var(--muted-2);
  font-weight: 400;
  margin-top: 1px;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.demo-actions .button { padding: 11px 20px; font-size: 14px; }

.demo-log {
  list-style: none;
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted-2);
  display: grid;
  gap: 6px;
  min-height: 68px;
}

.demo-log li::before { content: "› "; color: var(--mint); }

/* ---------- Statement / CTA ---------- */

.statement {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(64px, 10vh, 110px) 0;
  text-align: center;
}

.statement blockquote {
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 680;
  line-height: 1.25;
  max-width: 26ch;
  margin-inline: auto;
}

.statement p {
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 17px);
  max-width: 52ch;
  margin-inline: auto;
}

.cta {
  padding: clamp(72px, 12vh, 130px) 0;
  text-align: center;
}

.cta h2 {
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 740;
  line-height: 1.1;
}

.cta p {
  margin: 16px auto 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 17px);
}

.cta .hero-actions { margin-top: 32px; }

/* ---------- Forms ---------- */

.form-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--console-grad);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 36px);
  margin-top: 40px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.field { display: grid; gap: 7px; }

.field label {
  font-size: 13.5px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  width: 100%;
}

.field textarea { min-height: 110px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }

.form-note {
  font-size: 13px;
  color: var(--muted-2);
  margin-top: 16px;
}

.form-actions { margin-top: 20px; }

/* ---------- Article prose ---------- */

.prose {
  max-width: 68ch;
  margin-top: 8px;
}

.prose h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 720;
  line-height: 1.2;
  margin: 44px 0 14px;
}

.prose p {
  font-size: clamp(15.5px, 1.8vw, 17px);
  color: var(--muted);
  margin: 14px 0;
}

.prose strong { color: var(--text); }

.prose ul {
  list-style: none;
  margin: 18px 0;
  display: grid;
  gap: 10px;
}

.prose ul li {
  font-size: 15.5px;
  color: var(--muted);
  padding-left: 26px;
  position: relative;
}

.prose ul li::before {
  content: "✓";
  color: var(--mint);
  position: absolute;
  left: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--muted-2);
}

/* ---------- Exclusion list ---------- */

.x-list {
  list-style: none;
  margin-top: 28px;
  display: grid;
  gap: 12px;
  max-width: 64ch;
}

.x-list li {
  font-size: 15px;
  color: var(--muted);
  padding-left: 26px;
  position: relative;
}

.x-list li::before {
  content: "✕";
  color: var(--muted-2);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 13px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
}

.footer-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
  color: var(--muted-2);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover { color: var(--text); }

/* ---------- Reveal on scroll (JS present only) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (min-width: 640px) {
  .joined-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .steps-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-row { flex-direction: row; justify-content: space-between; align-items: center; }
  .work-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; }
  .work-from { display: block; }
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .form-grid-2 .field-wide { grid-column: 1 / -1; }
}

@media (min-width: 880px) {
  :root { --gutter: 40px; }
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none; }
  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .steps-4 { grid-template-columns: repeat(4, 1fr); }
  .console-body { grid-template-columns: 220px 1fr; }
  .console-sources {
    flex-direction: column;
    align-items: flex-start;
    border-bottom: none;
    border-right: 1px solid var(--line);
    padding: 20px;
  }
  .sources-label { margin-bottom: 4px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
  .button, .nav-cta, .card, .tab, .theme-toggle { transition: none; }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Talk with AgenX widget ---------- */

.contact-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--console-grad);
  box-shadow: var(--shadow);
  padding: clamp(22px, 3.5vw, 30px);
  display: grid;
  gap: 26px;
  margin-top: 40px;
}

.voice-panel h2,
.voice-panel h3,
.call-form h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.voice-panel > p {
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 16px;
}

.voice-lead-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.voice-lead-grid label,
.call-form > label {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
}

.voice-lead-grid input,
.call-form input,
.call-form select {
  font: inherit;
  font-size: 14.5px;
  font-weight: 400;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  width: 100%;
}

.voice-lead-grid input::placeholder,
.call-form input::placeholder { color: var(--muted-2); }

.consent-row {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 400 !important;
  color: var(--muted);
}

.consent-row input {
  width: auto !important;
  margin-top: 3px;
  accent-color: var(--mint);
}

.voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.voice-actions .button { padding: 11px 20px; font-size: 14px; }

.call-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.call-form .button { justify-self: start; padding: 11px 20px; font-size: 14px; margin-top: 4px; }

.call-status {
  font-size: 13.5px;
  color: var(--muted);
  min-height: 18px;
  margin-top: 8px;
}

.call-status[data-tone="success"] { color: var(--mint); }
.call-status[data-tone="info"] { color: var(--blue); }
.call-status[data-tone="error"] { color: var(--danger); }

.contact-card audio { display: none; }

.fake-form {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.fake-form .button { padding: 11px 20px; font-size: 14px; }

@media (min-width: 640px) {
  .voice-lead-grid { grid-template-columns: 1fr 1fr; }
  .voice-lead-grid label.wide { grid-column: 1 / -1; }
}

[hidden] { display: none !important; }

/* ---------- Intro video ---------- */

.video-frame {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
  line-height: 0;
}

.video-frame video {
  width: 100%;
  height: auto;
  display: block;
}
