/* ============================================================================
   Capnode — Shared design system
   Ported verbatim from website-mockups/home-aria-heal.html, then extended
   with reusable page patterns (page-hero, mobile menu, legal, pricing,
   contact, prose, chips, skip-link, active nav).
   ============================================================================ */

:root {
  --ink: #0b1020;
  --ink-soft: #1b2236;
  --muted: #5b6478;
  --muted-2: #8b94a7;
  --line: #e6e9ef;
  --line-soft: #eef1f6;
  --bg: #ffffff;
  --cloud: #f6f8fb;
  --cloud-2: #f0f4fa;
  --indigo: #4f46e5;
  --blue: #2563eb;
  --emerald: #10b981;
  --rose: #e11d48;
  --violet: #7c3aed;
  --grad: linear-gradient(120deg, #4f46e5 0%, #2563eb 100%);
  --shadow-sm: 0 1px 2px rgba(11, 16, 32, 0.04), 0 1px 3px rgba(11, 16, 32, 0.06);
  --shadow-md: 0 4px 12px rgba(11, 16, 32, 0.06), 0 12px 28px rgba(11, 16, 32, 0.07);
  --shadow-lg: 0 18px 50px rgba(11, 16, 32, 0.10), 0 6px 18px rgba(11, 16, 32, 0.06);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  transition: top 0.2s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: #cdd3df;
  box-shadow: var(--shadow-md);
}
.btn svg { width: 16px; height: 16px; }
.btn-lg { padding: 15px 26px; font-size: 16px; }

/* ---------- Nav ---------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}
header.nav.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(11, 16, 32, 0.02);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand .logo-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--grad);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.brand .logo-mark svg { width: 18px; height: 18px; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 9px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 9px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--cloud); }
/* active nav link */
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--cloud-2);
}

.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .btn { padding: 10px 18px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(660px, 94vh, 940px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(1100px 540px at 78% -8%, rgba(37, 99, 235, 0.10), transparent 60%),
    radial-gradient(900px 520px at 8% 4%, rgba(124, 58, 237, 0.07), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 55%, #f6f8fb 100%);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}
/* soft fade so 3D melts into the page bottom */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(246,248,251,0) 0%, #f6f8fb 92%);
  z-index: 2;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 40px;
}
.hero-copy {
  max-width: 620px;
  position: relative;
}
/* soft readability scrim so copy stays crisp over the 3D, without hiding it */
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -50px -120px -50px -50px;
  background: radial-gradient(120% 120% at 16% 44%, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.72) 40%, rgba(255,255,255,0) 76%);
  z-index: -1;
  pointer-events: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 11px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.20); }
  50% { box-shadow: 0 0 0 7px rgba(16,185,129,0.05); }
}

.hero h1 {
  font-size: clamp(40px, 6.2vw, 68px);
  margin: 22px 0 0;
  font-weight: 700;
}
.hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  font-size: clamp(16.5px, 1.7vw, 19px);
  color: var(--muted);
  margin-top: 22px;
  max-width: 540px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.trust-strip {
  margin-top: 38px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted-2);
}
.trust-strip .flow-step {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.trust-strip .flow-step b {
  color: var(--indigo);
  font-weight: 700;
}
.trust-strip .arrow { color: var(--muted-2); }

/* ---------- Hero: live incident status card + Aria tag ---------- */
.hero-status {
  position: absolute;
  z-index: 4;
  right: 5.5%;
  top: 25%;
  width: 290px;
  max-width: 42vw;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px 16px;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.4s var(--ease);
  pointer-events: none;
}
.hero-status.show { opacity: 1; transform: none; }
.hero-status .row { display: flex; align-items: center; gap: 11px; }
.hero-status .ic {
  width: 32px; height: 32px;
  border-radius: 9px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.hero-status .st-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em;
}
.hero-status .st-sub {
  font-size: 12px; color: var(--muted); margin-top: 3px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
.hero-status .meter {
  height: 4px; border-radius: 99px;
  background: var(--line-soft); margin-top: 13px; overflow: hidden;
}
.hero-status .meter > i {
  display: block; height: 100%; width: 12%;
  border-radius: 99px;
  transition: width 0.55s var(--ease), background 0.4s var(--ease);
}
.hero-status[data-state="healthy"] { border-color: rgba(16,185,129,0.40); }
.hero-status[data-state="healthy"] .ic { background: rgba(16,185,129,0.14); color: #059669; }
.hero-status[data-state="break"] { border-color: rgba(225,29,72,0.46); }
.hero-status[data-state="break"] .ic { background: rgba(225,29,72,0.14); color: #be123c; }
.hero-status[data-state="diagnose"] { border-color: rgba(124,58,237,0.46); }
.hero-status[data-state="diagnose"] .ic { background: rgba(124,58,237,0.14); color: #6d28d9; }
.hero-status[data-state="heal"] { border-color: rgba(16,185,129,0.52); }
.hero-status[data-state="heal"] .ic { background: rgba(16,185,129,0.16); color: #047857; }

.aria-tag {
  position: absolute;
  z-index: 4;
  left: 0; top: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(120deg, #4f46e5, #7c3aed);
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
  box-shadow: 0 8px 20px rgba(79,70,229,0.42);
  transform: translate(-50%, -165%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  white-space: nowrap;
}
.aria-tag.show { opacity: 1; }
.aria-tag .spark { font-size: 11px; }

/* ---------- Logo band ---------- */
.logoband {
  background: var(--cloud);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
}
.logoband-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 44px;
}
.logoband .label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.logoband .wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: #aab2c2;
  transition: color 0.25s var(--ease);
}
.logoband .wordmark:hover { color: var(--ink-soft); }

/* ---------- Section scaffolding ---------- */
section.block { padding: 96px 0; }
.section-head { max-width: 660px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p {
  color: var(--muted);
  font-size: 17px;
  margin-top: 16px;
}

/* ---------- Features grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  grid-column: span 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #d8deea;
}
.feature:hover::before { opacity: 1; }

.feature .icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(79,70,229,0.10), rgba(37,99,235,0.10));
  border: 1px solid rgba(79,70,229,0.16);
  color: var(--indigo);
  transition: transform 0.3s var(--ease);
}
.feature:hover .icon { transform: scale(1.06) rotate(-3deg); }
.feature .icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 19px; margin-bottom: 9px; }
.feature p { color: var(--muted); font-size: 14.5px; }
.feature .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
}
.feature .tag .badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
}
.badge.safe { background: rgba(16,185,129,0.12); color: #047857; }
.badge.approve { background: rgba(124,58,237,0.12); color: #6d28d9; }
.badge.realtime { background: rgba(37,99,235,0.12); color: #1d4ed8; }

.icon.c-emerald { background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(5,150,105,0.10)); border-color: rgba(16,185,129,0.18); color: #059669; }
.icon.c-rose { background: linear-gradient(135deg, rgba(225,29,72,0.10), rgba(244,63,94,0.10)); border-color: rgba(225,29,72,0.16); color: #be123c; }
.icon.c-violet { background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(99,102,241,0.10)); border-color: rgba(124,58,237,0.16); color: #6d28d9; }
.icon.c-blue { background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(59,130,246,0.10)); border-color: rgba(37,99,235,0.16); color: #1d4ed8; }

/* ---------- How it works ---------- */
.how {
  background: var(--cloud);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.how-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.flow-steps { display: flex; flex-direction: column; gap: 14px; }
.flow-card {
  display: flex;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.flow-card:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.flow-card .step-no {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 16px;
  color: #fff;
}
.flow-card:nth-child(1) .step-no { background: linear-gradient(135deg,#e11d48,#f43f5e); }
.flow-card:nth-child(2) .step-no { background: linear-gradient(135deg,#2563eb,#4f46e5); }
.flow-card:nth-child(3) .step-no { background: linear-gradient(135deg,#10b981,#059669); }
.flow-card h3 { font-size: 17.5px; }
.flow-card p { color: var(--muted); font-size: 14px; margin-top: 5px; }

/* terminal */
.terminal {
  background: #0b1020;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid #1c2440;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  background: #11182e;
  border-bottom: 1px solid #1c2440;
}
.term-bar .d { width: 11px; height: 11px; border-radius: 50%; }
.term-bar .d.r { background: #f87171; }
.term-bar .d.y { background: #fbbf24; }
.term-bar .d.g { background: #34d399; }
.term-bar .title {
  margin-left: 8px;
  font-size: 12.5px;
  color: #7c87a3;
  font-family: 'Space Grotesk', monospace;
  letter-spacing: 0.02em;
}
.term-body {
  padding: 20px 22px 24px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.85;
  color: #c7d0e6;
  min-height: 280px;
}
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line .prompt { color: #6d8bff; }
.term-line .ok { color: #34d399; }
.term-line .warn { color: #fbbf24; }
.term-line .err { color: #fb7185; }
.term-line .dim { color: #7c87a3; }
.term-line .aria { color: #a78bfa; }
.cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: #6d8bff;
  margin-left: 2px;
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Architecture sound-bite ---------- */
.arch {
  margin-top: 84px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}
.arch .node-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 11px;
  background: var(--cloud);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.arch .node-chip svg { width: 16px; height: 16px; color: var(--indigo); }
.arch .conn {
  color: var(--muted-2);
  font-size: 18px;
  font-weight: 700;
}

/* ---------- Final CTA ---------- */
.cta-band { padding: 30px 0 110px; }
.cta-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 64px 48px;
  text-align: center;
  background:
    radial-gradient(900px 360px at 50% -30%, rgba(255,255,255,0.18), transparent 60%),
    linear-gradient(125deg, #4f46e5 0%, #2563eb 60%, #7c3aed 130%);
  box-shadow: 0 30px 70px rgba(79, 70, 229, 0.30);
  color: #fff;
}
.cta-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card h2 { color: #fff; font-size: clamp(28px, 4vw, 42px); }
.cta-card p { color: rgba(255,255,255,0.86); font-size: 17.5px; margin: 16px auto 32px; max-width: 540px; }
.cta-card .btn-primary {
  background: #fff; color: var(--indigo);
  box-shadow: 0 10px 26px rgba(0,0,0,0.16);
}
.cta-card .btn-primary:hover { background: #f5f6ff; }
.cta-card .btn-ghost {
  background: rgba(255,255,255,0.10);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  box-shadow: none;
}
.cta-card .btn-ghost:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.7); }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
footer.site {
  background: var(--cloud);
  border-top: 1px solid var(--line);
  padding: 68px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 280px; }
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14px; color: var(--muted); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-bottom p { font-size: 13px; color: var(--muted-2); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.footer-social a:hover { color: var(--indigo); border-color: #cdd3df; transform: translateY(-2px); }
.footer-social svg { width: 17px; height: 17px; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.06s; }
.reveal.d2 { transition-delay: 0.12s; }
.reveal.d3 { transition-delay: 0.18s; }
.reveal.d4 { transition-delay: 0.24s; }

/* ============================================================================
   EXTENDED PATTERNS (new classes, same design language)
   ============================================================================ */

/* ---------- Mobile menu ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-toggle:hover { border-color: #cdd3df; }
.nav-toggle svg { width: 22px; height: 22px; display: block; }
.nav-toggle .ic-close { display: none; }
.nav-toggle[aria-expanded="true"] .ic-open { display: none; }
.nav-toggle[aria-expanded="true"] .ic-close { display: block; }

.mobile-menu {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 12px 0 22px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s var(--ease);
}
.mobile-menu.open {
  opacity: 1;
  transform: none;
  visibility: visible;
}
.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.mobile-menu a {
  display: block;
  padding: 13px 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.2s var(--ease);
}
.mobile-menu a:hover { color: var(--indigo); }
.mobile-menu a[aria-current="page"] { color: var(--indigo); }
.mobile-menu .btn { width: 100%; margin-top: 18px; }

/* ---------- Inner-page hero / banner ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 116px 0 64px;
  background:
    radial-gradient(1000px 460px at 80% -20%, rgba(37, 99, 235, 0.09), transparent 60%),
    radial-gradient(820px 440px at 6% 0%, rgba(124, 58, 237, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 60%, #f6f8fb 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-inner { max-width: 760px; }
.page-hero.center { text-align: center; }
.page-hero.center .page-hero-inner { margin: 0 auto; }
.page-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  margin-top: 16px;
  font-weight: 700;
}
.page-hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.page-hero .page-sub {
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--muted);
  margin-top: 18px;
  max-width: 620px;
}
.page-hero.center .page-sub { margin-left: auto; margin-right: auto; }
.page-hero .page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}
.page-hero.center .page-actions { justify-content: center; }

/* breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li::after { content: "/"; color: var(--line); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--indigo); }
.breadcrumb [aria-current="page"] { color: var(--ink-soft); }

/* ---------- Generic prose (long-form) ---------- */
.prose { color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.prose > * + * { margin-top: 18px; }
.prose h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin-top: 44px;
  padding-top: 4px;
  scroll-margin-top: 96px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 18.5px;
  margin-top: 30px;
  scroll-margin-top: 96px;
}
.prose p { color: var(--ink-soft); }
.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(37, 99, 235, 0.35);
}
.prose a:hover { text-decoration-color: var(--blue); }
.prose ul, .prose ol { margin: 0; padding-left: 22px; color: var(--ink-soft); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 8px; }
.prose li::marker { color: var(--muted-2); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose blockquote {
  margin: 0;
  padding: 14px 20px;
  border-left: 3px solid var(--indigo);
  background: var(--cloud);
  border-radius: 0 10px 10px 0;
  color: var(--ink-soft);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.prose table th,
.prose table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.prose table th {
  background: var(--cloud);
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
}
.prose table tr:last-child td { border-bottom: none; }
.prose code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--cloud-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--ink-soft);
}

/* ---------- Legal layout ---------- */
.legal-wrap {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 72px 0 96px;
}
.legal-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.legal-toc h4 {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 14px;
}
.legal-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.legal-toc a {
  display: block;
  padding: 7px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.legal-toc a:hover { color: var(--ink); background: var(--cloud); }
.legal-toc a[aria-current="true"],
.legal-toc a.active {
  color: var(--indigo);
  background: var(--cloud-2);
  border-left-color: var(--indigo);
}
.legal-article {
  max-width: 760px;
}
.legal-article .last-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 28px;
}
.legal-contact {
  margin-top: 40px;
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}
.legal-contact h3 { font-size: 17px; margin-bottom: 8px; }
.legal-contact p { color: var(--muted); font-size: 14.5px; }
.legal-contact a { color: var(--blue); font-weight: 600; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.price-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #d8deea;
}
.price-card.featured {
  border-color: rgba(79, 70, 229, 0.5);
  box-shadow: 0 18px 50px rgba(79, 70, 229, 0.16), var(--shadow-md);
}
.price-card.featured::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad);
}
.price-card .plan {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.price-card .plan-note { color: var(--muted); font-size: 13.5px; margin-top: 6px; min-height: 38px; }
.price-card .price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 20px 0 4px;
}
.price-card .price .amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.price-card .price .unit { font-size: 14px; font-weight: 600; color: var(--muted); }
.price-card .price-sub { font-size: 12.5px; color: var(--muted-2); margin-bottom: 22px; }
.price-badge {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(79, 70, 229, 0.12);
  color: var(--indigo);
}
.tier-features {
  list-style: none;
  margin: 0 0 26px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
}
.tier-features li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  color: var(--ink-soft);
}
.tier-features li svg {
  width: 18px; height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--emerald);
}
.tier-features li.muted { color: var(--muted-2); }
.tier-features li.muted svg { color: var(--muted-2); }
.price-cta { margin-top: auto; }
.price-cta .btn { width: 100%; }

/* comparison table */
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.compare th, .compare td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.compare thead th {
  background: var(--cloud);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--ink);
  font-size: 15px;
}
.compare tbody th {
  font-weight: 600;
  color: var(--ink-soft);
}
.compare td { text-align: center; color: var(--ink-soft); }
.compare td:first-child, .compare th:first-child { text-align: left; }
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: none; }
.compare tbody tr:hover { background: var(--cloud); }
.compare .yes { color: var(--emerald); font-weight: 700; }
.compare .no { color: var(--muted-2); }
.compare .feat-col { width: 36%; }

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.faq-item:hover { border-color: #d8deea; }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 22px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.faq-q .chev {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  color: var(--muted-2);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}
.faq-item.open .faq-q .chev { transform: rotate(180deg); color: var(--indigo); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}
.faq-a-inner {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 460px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 44px;
  align-items: start;
}
.form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 30px 32px;
  box-shadow: var(--shadow-sm);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.form-field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.form-field label .req { color: var(--rose); margin-left: 2px; }
.form-field input,
.form-field textarea,
.form-field select {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted-2); }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field .hint { font-size: 12.5px; color: var(--muted-2); }
.form .btn { width: 100%; margin-top: 6px; }
.form .form-note { font-size: 12.5px; color: var(--muted-2); margin-top: 14px; text-align: center; }

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-card {
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}
.contact-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.contact-card h3 svg { width: 18px; height: 18px; color: var(--indigo); }
.contact-card p { color: var(--muted); font-size: 14px; }
.contact-card a { color: var(--blue); font-weight: 600; }
.contact-card a:hover { color: var(--indigo); }

/* ---------- Chip grid (failure modes) ---------- */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.chip:hover { transform: translateY(-2px); border-color: #d8deea; box-shadow: var(--shadow-md); }
.chip .chip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex: 0 0 auto;
  background: var(--rose);
}
.chip.ok .chip-dot { background: var(--emerald); }
.chip.warn .chip-dot { background: #f59e0b; }
.chip.info .chip-dot { background: var(--blue); }

/* ---------- Generic content section helpers ---------- */
.section-narrow { max-width: 820px; margin: 0 auto; }
.muted-text { color: var(--muted); }
.center-text { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .legal-wrap { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; max-height: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .nav-cta .btn-primary { display: none; }
  .nav-toggle { display: inline-flex; }
  section.block { padding: 72px 0; }
  .hero { min-height: 92vh; }
  .hero-status { right: 4%; top: auto; bottom: 7%; width: 240px; max-width: 74vw; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .arch { gap: 12px; padding: 24px; }
  .arch .conn { display: none; }
  .cta-card { padding: 48px 26px; }
  .page-hero { padding: 92px 0 52px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .compare { display: block; overflow-x: auto; white-space: nowrap; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
  .page-hero .page-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  .mobile-menu { transition: none; }
}
