/* Ghost — build + maintenance agent.
   Merges ghost-landing (dark grid / waves / terminal / accent gradient)
   with the boxy, sharp-edged, tabbed feel of the product demos.
   Design intent: professional, gentle motion, sharp corners, fully responsive. */

:root {
  --bg: #050508;
  --bg-elevated: #0a0b10;
  --panel: rgba(10, 12, 18, 0.82);
  --panel-solid: #0d1018;
  --text: #e8eaef;
  --muted: #8b94a7;
  --quiet: #5f6878;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(165, 243, 252, 0.26);
  --accent-start: #c4b5fd;
  --accent-mid: #7dd3fc;
  --accent-end: #a5f3fc;
  --green: #8ff5c8;
  --gold: #ffd88a;
  --danger: #ffb1b1;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  --section-heading-size: clamp(1.9rem, 4vw, 3.4rem);
  --section-space: 84px;

  /* Boxy, sharp edges throughout */
  --r: 4px;
  --r-sharp: 2px;
  --shell: min(1180px, calc(100% - 40px));
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* ---------- Background layers ---------- */
.bg-grid {
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 52px 52px;
  background-position: center center;
  transform-origin: 50% 45%;
  opacity: 1;
  animation: grid-wave 20s ease-in-out infinite;
  will-change: transform;
}

.bg-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 181, 253, 0.05) 1px, transparent 1px);
  background-size: 13px 13px;
  mix-blend-mode: screen;
  opacity: 0.6;
  animation: grid-wave-fine 14s ease-in-out infinite reverse;
}

@keyframes grid-wave {
  0%, 100% { transform: perspective(1000px) rotateX(4deg) rotateY(-1.5deg) translate3d(0, 0, 0); }
  33% { transform: perspective(1000px) rotateX(2deg) rotateY(1deg) translate3d(0, -12px, 0); }
  66% { transform: perspective(1000px) rotateX(-0.5deg) rotateY(1.5deg) translate3d(6px, 8px, 0); }
}

@keyframes grid-wave-fine {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6px, 5px) scale(1.015); }
}

.waves {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.waves svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.wave-layer {
  opacity: 0.6;
  transform-origin: 50% 50%;
  animation: wave-flicker 14s ease-in-out infinite, wave-drift 28s ease-in-out infinite;
  will-change: transform, opacity;
}

.wave-layer:nth-child(2) {
  animation-delay: -6s, -12s;
  animation-duration: 18s, 34s;
  opacity: 0.5;
}

@keyframes wave-flicker {
  0%, 100% { opacity: 0.46; }
  50% { opacity: 0.64; }
}

@keyframes wave-drift {
  0%, 100% { transform: translate3d(-1%, 0, 0) scale(1.01); }
  50% { transform: translate3d(1.5%, -1.5%, 0) scale(1.035); }
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse 84% 66% at 50% 40%, transparent 0%, var(--bg) 80%);
}

/* ---------- Shared layout ---------- */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 3;
}

main {
  width: var(--shell);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-end);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3, h4 {
  color: var(--text);
  letter-spacing: 0;
}

/* ---------- Buttons (boxy, sharp) ---------- */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--r-sharp);
  padding: 11px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.28s var(--ease),
    background 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    color 0.28s var(--ease),
    transform 0.28s var(--ease);
  will-change: transform;
}

.button:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32), 0 0 28px rgba(125, 211, 252, 0.16);
  color: #fff;
  transform: translateY(-2px) scale(1.015);
}

.button:active {
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.24);
  transform: translateY(0) scale(0.99);
}

.button:focus-visible {
  outline: 2px solid var(--accent-mid);
  outline-offset: 2px;
}

.button.primary {
  border-color: rgba(165, 243, 252, 0.36);
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.2), rgba(125, 211, 252, 0.18));
  color: #f4faff;
}

.button.primary:hover {
  border-color: rgba(165, 243, 252, 0.7);
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.3), rgba(125, 211, 252, 0.27));
}

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

.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  width: var(--shell);
  margin: 0 auto;
  padding: 16px 0;
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.86), rgba(5, 5, 8, 0));
  backdrop-filter: blur(10px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'Bungee', cursive;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: linear-gradient(110deg, var(--accent-start), var(--accent-mid), var(--accent-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-glyph {
  display: inline-flex;
  filter: drop-shadow(0 0 10px rgba(125, 211, 252, 0.28));
}

.nav {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.nav a {
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav a:hover {
  color: var(--text);
  border-bottom-color: var(--line-strong);
}

.nav-cta {
  min-height: 38px;
  padding: 8px 16px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.82fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  padding: 40px 0 72px;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  line-height: 0.96;
  font-weight: 780;
}

.hero-subtitle {
  margin: 24px 0 0;
  color: var(--muted);
  max-width: 640px;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

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

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.85rem;
}

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

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--quiet);
}

.dot.ok {
  background: var(--green);
  box-shadow: 0 0 10px rgba(143, 245, 200, 0.5);
}

/* ---------- Terminal card ---------- */
.terminal-card {
  border: 1px solid rgba(165, 243, 252, 0.16);
  border-radius: var(--r);
  background: rgba(6, 9, 14, 0.86);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.terminal-top > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--quiet);
}

.terminal-top > span:nth-child(1) { background: #fca5a5; }
.terminal-top > span:nth-child(2) { background: #fde68a; }
.terminal-top > span:nth-child(3) { background: #86efac; }

.terminal-top p {
  margin: 0 0 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.terminal-body {
  padding: 18px;
  font-family: var(--mono);
  color: #dbeafe;
  min-height: 268px;
  font-size: 0.86rem;
}

.terminal-body p {
  margin: 0 0 13px;
  overflow-wrap: anywhere;
}

.prompt {
  color: var(--accent-end);
  margin-right: 10px;
}

.fail { color: var(--danger); font-weight: 700; }
.ok-text { color: var(--green); font-weight: 700; }

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 4px;
  transform: translateY(2px);
  background: var(--accent-end);
  animation: blink 0.9s steps(2, start) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- Trust row ---------- */
.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: -24px 0 88px;
}

.trust-row div {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-radius: var(--r);
}

.trust-row strong {
  display: block;
  margin-bottom: 6px;
}

.trust-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section-space) 0;
}

.section-heading {
  margin-bottom: 32px;
}

.section-heading h2 {
  margin: 0;
  font-size: var(--section-heading-size);
  line-height: 1.02;
  max-width: 820px;
}

.section-heading p {
  margin-top: 16px;
  color: var(--muted);
  max-width: 680px;
  font-size: 1rem;
}

/* ---------- Interactive flow diagram ---------- */
.flow {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.5fr);
  gap: 18px;
  align-items: stretch;
}

.flow-track {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flow-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  font: inherit;
  color: var(--muted);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: var(--r-sharp);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition:
    color 0.22s var(--ease),
    background 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.flow-node:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.flow-node.active {
  color: var(--text);
  background: rgba(125, 211, 252, 0.09);
  border-color: var(--line-strong);
  border-left-color: var(--accent-mid);
}

.flow-node:focus-visible {
  outline: 2px solid var(--accent-mid);
  outline-offset: 2px;
}

.flow-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent-end);
  opacity: 0.85;
}

.flow-name {
  font-size: 0.98rem;
  font-weight: 600;
}

.flow-detail {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-radius: var(--r);
  padding: clamp(22px, 3vw, 34px);
  min-height: 300px;
  display: flex;
  align-items: center;
}

.flow-panel {
  width: 100%;
}

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

.flow-panel.active {
  animation: panel-fade 0.4s var(--ease);
}

@keyframes panel-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.flow-panel h3 {
  margin: 0 0 12px;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
}

.flow-panel > p {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 1.02rem;
  max-width: 560px;
}

.flow-vs {
  color: var(--muted) !important;
  font-size: 0.94rem !important;
}

.flow-vs span {
  color: var(--gold);
  font-weight: 600;
}

.flow-log {
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sharp);
  background: rgba(0, 0, 0, 0.4);
}

.flow-log code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #cfe6ff;
}

/* ---------- Compare table ---------- */
.compare {
  display: grid;
  gap: 22px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.compare-table thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.02);
}

.compare-table tbody th {
  color: var(--text);
  font-weight: 600;
}

.compare-table td {
  text-align: center;
  color: var(--muted);
}

.compare-table .col-ghost,
.compare-table td.ghost {
  background: rgba(125, 211, 252, 0.07);
  color: var(--text);
}

.compare-table td.y { color: var(--green); font-weight: 600; }
.compare-table td.n { color: var(--quiet); }
.compare-table td.p { color: var(--gold); }
.compare-table td.y.ghost { color: var(--green); }
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-lines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.compare-lines p {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.95rem;
}

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

/* ---------- Build + maintain modes ---------- */
.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mode-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-radius: var(--r);
  padding: 26px;
}

.mode-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-sharp);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #071018;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-mid));
}

.mode-tag.alt {
  background: linear-gradient(135deg, var(--green), var(--accent-end));
}

.mode-card h3 {
  margin: 16px 0 10px;
  font-size: 1.3rem;
}

.mode-card > p {
  margin: 0 0 16px;
  color: var(--muted);
}

.mode-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.mode-card li {
  position: relative;
  padding-left: 22px;
  color: var(--text);
  font-size: 0.92rem;
}

.mode-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  background: var(--accent-mid);
  border-radius: 1px;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.steps article {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-radius: var(--r);
  padding: 20px;
  min-height: 180px;
}

.steps span {
  font-family: var(--mono);
  color: var(--accent-end);
  font-size: 0.85rem;
}

.steps h3 {
  margin: 26px 0 8px;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Mobile control ---------- */
.mobile-control {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.78fr);
  align-items: center;
  gap: clamp(48px, 9vw, 120px);
}

.mobile-control-copy h2 {
  margin: 0;
  max-width: 820px;
  font-size: var(--section-heading-size);
  line-height: 1.02;
}

.mobile-control-intro {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.mobile-control-points {
  display: grid;
  gap: 2px;
  margin: 30px 0;
}

.mobile-control-points article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.mobile-control-points article:first-child {
  border-top: 1px solid var(--line);
}

.mobile-control-points article > span {
  padding-top: 2px;
  color: var(--accent-end);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.mobile-control-points h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.mobile-control-points p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.phone-demo {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 630px;
}

.phone-glow {
  position: absolute;
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.17), rgba(196, 181, 253, 0.06) 48%, transparent 72%);
  filter: blur(12px);
}

.phone-frame {
  position: relative;
  width: min(100%, 340px);
  padding: 11px 10px 16px;
  border: 1px solid rgba(165, 243, 252, 0.27);
  border-radius: 36px;
  background: linear-gradient(160deg, #181b24, #08090d 26%, #050508);
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.54),
    0 0 0 6px rgba(255, 255, 255, 0.025),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: rotate(1.5deg);
  transition: transform 0.65s var(--ease), box-shadow 0.65s var(--ease);
}

.phone-demo:hover .phone-frame {
  box-shadow:
    0 42px 110px rgba(0, 0, 0, 0.62),
    0 0 48px rgba(125, 211, 252, 0.12),
    0 0 0 6px rgba(255, 255, 255, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: rotate(0) translateY(-5px);
}

.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 2px 14px 9px;
  color: #dce3ed;
  font-size: 0.68rem;
  font-weight: 650;
}

.phone-status-icons {
  color: var(--muted);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.phone-appbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  background: rgba(11, 13, 19, 0.96);
}

.phone-ghost {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #071018;
  font-family: 'Bungee', cursive;
  font-size: 0.72rem;
}

.phone-appbar div {
  display: grid;
  line-height: 1.2;
}

.phone-appbar strong {
  font-size: 0.78rem;
}

.phone-appbar div span {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.phone-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.phone-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(143, 245, 200, 0.8);
}

.phone-screen {
  padding: 14px 12px 18px;
  border: 1px solid var(--line);
  border-radius: 0 0 22px 22px;
  background:
    linear-gradient(rgba(125, 211, 252, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.025) 1px, transparent 1px),
    #080a0f;
  background-size: 18px 18px;
}

.phone-issue {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 16, 24, 0.94);
}

.phone-issue > span,
.phone-review div > span {
  color: var(--accent-end);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.phone-issue h3 {
  margin: 8px 0 7px;
  font-size: 0.96rem;
  line-height: 1.25;
}

.phone-issue p {
  margin: 0;
  color: var(--quiet);
  font-size: 0.62rem;
}

.phone-progress {
  position: relative;
  display: grid;
  gap: 0;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.phone-progress::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 7px;
  width: 1px;
  background: var(--line);
  content: '';
}

.phone-progress li {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 8px 0;
}

.phone-progress li > span {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  border: 3px solid #080a0f;
  border-radius: 50%;
  background: var(--quiet);
}

.phone-progress li.done > span {
  background: var(--green);
  box-shadow: 0 0 8px rgba(143, 245, 200, 0.3);
}

.phone-progress li.active > span {
  background: var(--accent-mid);
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.7);
}

.phone-progress li div {
  display: grid;
  line-height: 1.3;
}

.phone-progress strong {
  font-size: 0.7rem;
}

.phone-progress small,
.phone-progress time {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.54rem;
}

.phone-progress time {
  padding-top: 2px;
}

.phone-review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(165, 243, 252, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.11), rgba(125, 211, 252, 0.09));
}

.phone-review div {
  display: grid;
  gap: 4px;
}

.phone-review strong {
  font-size: 0.72rem;
}

.phone-review-arrow {
  color: var(--accent-end);
  font-size: 1.2rem;
}

.phone-safety {
  margin: 12px 0 0;
  color: var(--quiet);
  font-size: 0.59rem;
  text-align: center;
}

.phone-safety span {
  color: var(--green);
}

.phone-homebar {
  width: 38%;
  height: 4px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

/* ---------- Proof / pilot ---------- */
.pilot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-radius: var(--r);
  padding: 20px;
}

.metric-card strong {
  display: block;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1;
  margin-bottom: 10px;
  background: linear-gradient(110deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.pr-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pr-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  backdrop-filter: blur(16px);
  text-decoration: none;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.pr-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
}

.pr-repo {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent-end);
}

.pr-title {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}

.pr-meta {
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--mono);
}

.pr-arrow {
  transition: transform 0.22s var(--ease);
  display: inline-block;
}

.pr-card:hover .pr-arrow {
  transform: translateX(4px);
}

/* ---------- Proof: ticker of common breaks ---------- */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: inline-flex;
  gap: 12px;
  white-space: nowrap;
  will-change: transform;
  animation: ticker-scroll 34s linear infinite;
}

.ticker-track span {
  flex: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 12px;
  background: var(--panel);
}

.ticker-track span::before {
  content: '\00d7';
  color: #fb7185;
  margin-right: 7px;
  font-weight: 700;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Proof: example outcome cards ---------- */
.outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.outcome-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-radius: var(--r);
  padding: 22px 20px 20px;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.outcome-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.outcome-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-end);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 7px;
  margin-bottom: 12px;
}

.outcome-card h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 8px;
}

.outcome-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.proof-real {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.proof-real a {
  color: var(--accent-end);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.proof-real a:hover {
  border-bottom-color: var(--accent-end);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: grid;
  gap: 10px;
  max-width: 820px;
  margin: 0;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  backdrop-filter: blur(16px);
  transition: border-color 0.28s var(--ease), background 0.28s var(--ease);
}

.faq-list details:hover,
.faq-list details[open] {
  border-color: var(--line-strong);
  background: rgba(13, 16, 24, 0.94);
}

.faq-list summary {
  position: relative;
  padding: 18px 54px 18px 20px;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 650;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  position: absolute;
  top: 50%;
  right: 20px;
  color: var(--accent-end);
  content: '+';
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 400;
  transform: translateY(-50%) rotate(0);
  transition: transform 0.28s var(--ease);
}

.faq-list details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-list summary:focus-visible {
  outline: 2px solid var(--accent-mid);
  outline-offset: -2px;
}

.faq-list details p {
  margin: -2px 54px 20px 20px;
  color: var(--muted);
}

/* ---------- Staggered reveal (children animate in sequence) ---------- */
.js .reveal.stagger {
  opacity: 1;
  transform: none;
  transition: none;
}

.js .reveal.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.js .reveal.stagger.in > * {
  opacity: 1;
  transform: none;
}

.js .reveal.stagger.in > *:nth-child(1) { transition-delay: 0.04s; }
.js .reveal.stagger.in > *:nth-child(2) { transition-delay: 0.12s; }
.js .reveal.stagger.in > *:nth-child(3) { transition-delay: 0.2s; }
.js .reveal.stagger.in > *:nth-child(4) { transition-delay: 0.28s; }
.js .reveal.stagger.in > *:nth-child(5) { transition-delay: 0.36s; }
.js .reveal.stagger.in > *:nth-child(6) { transition-delay: 0.44s; }

/* ---------- Fit ---------- */
.fit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.fit-grid article {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-radius: var(--r);
  padding: 22px;
  min-height: 160px;
}

.fit-grid h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.fit-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  margin: 40px 0 88px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background:
    radial-gradient(ellipse 60% 120% at 50% 0%, rgba(125, 211, 252, 0.1), transparent 70%),
    var(--panel);
  backdrop-filter: blur(16px);
  padding: clamp(32px, 6vw, 64px);
  text-align: center;
}

.cta-inner {
  max-width: 640px;
  margin: 0 auto;
}

.cta-band h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.02;
}

.cta-band > .cta-inner > p {
  margin: 16px 0 0;
  color: var(--muted);
}

.cta-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 28px 0 0;
  flex-wrap: wrap;
}

.cta-form input {
  flex: 1;
  min-width: 220px;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: var(--r-sharp);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.22s var(--ease);
}

.cta-form input::placeholder {
  color: var(--quiet);
}

.cta-form input:focus {
  border-color: var(--line-strong);
}

.cta-form input.invalid {
  border-color: var(--danger);
}

.cta-form--stack {
  flex-direction: column;
  align-items: stretch;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.cta-form--stack input {
  max-width: none;
  width: 100%;
}

.cta-form--stack .button {
  width: 100%;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.calendar-option {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  margin: 18px auto 0;
}

.calendar-option::before,
.calendar-option::after {
  height: 1px;
  background: var(--line);
  content: '';
}

.calendar-option span {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.calendar-option .button {
  grid-column: 1 / -1;
  width: 100%;
}

.cta-message {
  margin: 14px 0 0;
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.cta-message.visible {
  opacity: 1;
}

.cta-message.error {
  color: var(--danger);
}

.cta-fineprint {
  margin: 18px 0 0;
  color: var(--quiet);
  font-size: 0.82rem;
}

/* ---------- Footer ---------- */
.site-footer {
  width: var(--shell);
  margin: 0 auto;
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.5fr);
  gap: 40px;
}

.footer-brand p {
  margin: 16px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sharp);
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.footer-social a:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.footer-cols h4 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--quiet);
}

.footer-cols a {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s var(--ease);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.84rem;
}

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

.footer-legal a {
  color: var(--quiet);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

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

/* ---------- Legal pages ---------- */
.legal-shell {
  min-height: calc(100vh - 180px);
  padding: 72px 0 88px;
}

.legal-hero {
  max-width: 780px;
  margin-bottom: 40px;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.98;
}

.legal-hero > p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.legal-content {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.legal-content section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

.legal-content h2 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
}

.legal-content p {
  margin: 0;
}

.legal-content p + p {
  margin-top: 10px;
}

.legal-content ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 20px;
}

.legal-content a {
  color: var(--accent-end);
}

.legal-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: var(--shell);
  margin: 0 auto;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.84rem;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-footer a {
  color: var(--muted);
  text-decoration: none;
}

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

/* ---------- Reveal-on-scroll (progressive enhancement: only hides when JS is active) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.72s var(--ease), transform 0.72s var(--ease);
  will-change: opacity, transform;
}

.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 48px;
  }

  .nav {
    display: none;
  }

  .flow {
    grid-template-columns: 1fr;
  }

  .flow-track {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .flow-node {
    flex: 0 0 auto;
    border-left: 1px solid var(--line);
    border-bottom: 3px solid transparent;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 116px;
  }

  .flow-node.active {
    border-left-color: var(--line-strong);
    border-bottom-color: var(--accent-mid);
  }

  .trust-row,
  .steps,
  .pilot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-control {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
    gap: 42px;
  }

  .phone-frame {
    transform: none;
  }

  .phone-demo:hover .phone-frame {
    transform: translateY(-5px);
  }

  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .compare-table thead th:nth-child(2),
  .compare-table thead th:nth-child(3),
  .compare-table tbody td:nth-child(2),
  .compare-table tbody td:nth-child(3) {
    display: none;
  }

  .compare-lines {
    grid-template-columns: 1fr;
  }

  .modes {
    grid-template-columns: 1fr;
  }

  .outcomes {
    grid-template-columns: 1fr;
  }

  .mobile-control {
    grid-template-columns: 1fr;
  }

  .phone-demo {
    min-height: auto;
    padding-top: 12px;
  }

  .phone-frame {
    transform: none;
  }

  .pr-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --shell: min(1180px, calc(100% - 28px));
  }

  .site-header {
    grid-template-columns: auto auto;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .trust-row,
  .steps,
  .pilot-grid,
  .fit-grid {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-control-copy .button {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .legal-footer {
    flex-direction: column;
  }

  .section {
    --section-space: 60px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .bg-grid,
  .wave-layer,
  .ticker-track {
    animation: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .js .reveal.stagger > * {
    opacity: 1;
    transform: none;
  }
}
