/* ==========================================================================
   Alineplane — landing page
   Forest / cream / copper. Typography-led, hairline structure, little motion.
   ========================================================================== */

:root {
  --forest: #0F1A17;
  --cream: #F2EDE3;
  --sage: #8FB59A;
  --copper: #C8693B;
  --copper-hover: #D57A4C;

  /* Surface tokens (dark by default; .paper re-declares them) */
  --bg: var(--forest);
  --surface: #15221E;
  --surface-2: #1B2B26;
  --text: var(--cream);
  --muted: rgba(242, 237, 227, 0.68);
  --faint: rgba(242, 237, 227, 0.5);
  --line: rgba(242, 237, 227, 0.1);
  --line-strong: rgba(242, 237, 227, 0.18);
  --accent: var(--sage);

  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.paper {
  --bg: var(--cream);
  --surface: #FBF8F2;
  --surface-2: #E9E3D6;
  --text: var(--forest);
  --muted: rgba(15, 26, 23, 0.7);
  --faint: rgba(15, 26, 23, 0.64);
  --line: rgba(15, 26, 23, 0.1);
  --line-strong: rgba(15, 26, 23, 0.18);
  --accent: #3E6A4C;
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--surface-2);
}

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

::selection { background: var(--copper); color: var(--forest); }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--copper);
  color: var(--forest);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* Typography ------------------------------------------------------------- */

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  letter-spacing: -0.04em;
  line-height: 1.04;
}

h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--sage);
}

h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); }

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

p { text-wrap: pretty; }

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-lead {
  margin-top: 18px;
  max-width: 600px;
  font-size: 1.0625rem;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s;
}
.text-link:hover { text-decoration-color: currentColor; }
.text-link svg { width: 14px; height: 14px; }

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.btn-primary { background: var(--copper); color: var(--forest); }
.btn-primary:hover { background: var(--copper-hover); }

.btn-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--text); }

.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
.btn-block { width: 100%; }

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

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 26, 23, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.header.is-scrolled { border-bottom-color: rgba(242, 237, 227, 0.1); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.logo-mark { width: 24px; height: 24px; }

.nav { display: flex; gap: 4px; }

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: rgba(242, 237, 227, 0.72);
  transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover { color: var(--cream); background: rgba(242, 237, 227, 0.06); }
.nav-link.is-active { color: var(--cream); }

.header-end { display: flex; align-items: center; gap: 8px; }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid rgba(242, 237, 227, 0.18);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.5px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.menu-open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

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

.section {
  padding: 112px 0;
  background: var(--bg);
  color: var(--text);
  border-top: 1px solid var(--line);
}
.paper { border-top-color: transparent; }
.paper + .section { border-top-color: transparent; }

.section-head { margin-bottom: 56px; max-width: 720px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .section-lead { margin-left: auto; margin-right: auto; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}
.split .section-head { margin-bottom: 0; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }

/* Cards */
.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.975rem; }

.card-num {
  display: block;
  margin-bottom: 36px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--faint);
}
.card-accent { border-color: var(--accent); }
.card-accent .card-num { color: var(--accent); }

/* Lists with marks */
.ticks li, .crosses li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  font-size: 0.975rem;
}
.ticks li + li, .crosses li + li { margin-top: 12px; }
.ticks li::before, .crosses li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em;
  width: 16px; height: 16px;
  background: var(--accent);
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}
.ticks li::before {
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.crosses li::before {
  background: var(--faint);
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5l7 7M11.5 4.5l-7 7' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 96px 0 112px;
  overflow: hidden;
}
/* One quiet light source behind the headline. */
.hero::before {
  content: "";
  position: absolute;
  left: 50%; top: -280px;
  width: 1100px; height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(143, 181, 154, 0.12), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--muted);
}
.pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(143, 181, 154, 0.18);
}

.hero h1 { max-width: 900px; }

.lede {
  margin-top: 24px;
  max-width: 620px;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--muted);
}

.repo-form {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 520px;
  margin-top: 36px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.2s;
}
.repo-form:focus-within { border-color: var(--sage); }
.repo-form input {
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.9rem;
  outline: none;
}
.repo-form input::placeholder { color: var(--faint); }
.repo-form .btn { flex-shrink: 0; }
.repo-form.is-invalid { border-color: var(--copper); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 24px;
  margin-top: 20px;
  font-size: 0.925rem;
  color: var(--muted);
}

/* Canvas preview: repo → services → datastores ------------------------- */
.canvas {
  position: relative;
  max-width: 980px;
  margin: 72px auto 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
  text-align: left;
}

.plan-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.plan-dots { display: flex; gap: 6px; }
.plan-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(242, 237, 227, 0.16); }
.plan-url {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: none;
  font-size: 0.8125rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-tag {
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--muted);
}
.canvas-replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 0.75rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
}
.canvas-replay[hidden] { display: none; }
.canvas-replay:hover { border-color: var(--sage); }
.canvas-replay svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Dotted canvas, like a project board */
.canvas-stage {
  position: relative;
  padding: 48px 40px;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(242, 237, 227, 0.09) 1px, transparent 1.2px);
  background-size: 20px 20px;
  background-position: -10px -10px;
}

.canvas-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.wire {
  fill: none;
  stroke: rgba(242, 237, 227, 0.22);
  stroke-width: 1.5;
}
.wire.is-drawing { transition: stroke-dashoffset 0.6s var(--ease); }
.wire-gap {
  stroke: var(--copper);
  stroke-dasharray: 4 5;
  opacity: 0;
  transition: opacity 0.5s;
}
.wire-gap.is-shown { opacity: 0.55; }
.flow {
  fill: none;
  stroke: var(--sage);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 2 16;
  opacity: 0;
  transition: opacity 0.6s;
}
.flow.is-flowing { opacity: 0.9; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -18; } }

.canvas-graph {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 72px;
  align-items: center;
}
.col { display: flex; flex-direction: column; gap: 16px; }

.node {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.4s, opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.node-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.node-head strong {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.node-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
}
.node-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.node-ev { justify-self: start; padding: 0; background: none; font-size: 0.75rem; color: var(--faint); }
.node-st { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--muted); }
.node-st em { font-style: normal; }
.node-st i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: rgba(242, 237, 227, 0.3); transition: background-color 0.3s; }

.node[data-state="deploying"] .node-st i { background: var(--copper); }
.node[data-state="deploying"] .node-st i::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--copper);
  animation: ping 1.1s var(--ease) infinite;
}
.node[data-state="active"] { border-color: rgba(143, 181, 154, 0.45); }
.node[data-state="active"] .node-st { color: var(--text); }
.node[data-state="active"] .node-st i { background: var(--sage); }
.node[data-state="active"] .node-icon { color: var(--sage); }
.node[data-state="flagged"] { border-style: dashed; border-color: rgba(200, 105, 59, 0.6); }
.node[data-state="flagged"] .node-st i { background: var(--copper); }
.node.is-pulse { animation: settle 0.5s var(--ease); }

@keyframes ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
@keyframes settle { 40% { transform: scale(1.025); } }

/* Nodes arrive one by one before the wires draw. */
.js .canvas:not(.is-on) .node { opacity: 0; transform: translateY(8px) scale(0.98); }
.js .canvas.is-on .node { transition-delay: calc(var(--i) * 0.08s), calc(var(--i) * 0.08s), calc(var(--i) * 0.08s); }
.js .canvas.is-on.is-settled .node { transition-delay: 0s; }

.plan-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}
.plan-foot strong { color: var(--text); font-weight: 600; }
.canvas-status { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.canvas-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }

/* Video ------------------------------------------------------------------ */

.video {
  max-width: 940px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}
.video iframe { display: block; width: 100%; height: 100%; border: 0; }

.video-facade {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  border: 0;
  background: #000;
  cursor: pointer;
}
.video-facade img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: opacity 0.3s, transform 0.6s var(--ease);
}
.video-facade:hover img { opacity: 0.85; transform: scale(1.015); }
.video-play {
  position: absolute;
  left: 50%; top: 50%;
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--copper);
  color: var(--forest);
  transition: transform 0.3s var(--ease);
}
.video-play svg { width: 28px; height: 28px; margin-left: 3px; }
.video-facade:hover .video-play { transform: translate(-50%, -50%) scale(1.06); }
.video-len {
  position: absolute;
  right: 16px; bottom: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 26, 23, 0.8);
  color: var(--cream);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* How it works ----------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.step { position: relative; }
.step-num {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--sage);
  position: relative;
  z-index: 1;
}
/* Connector line between step markers */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 52px;
  right: -20px;
  height: 1px;
  background: var(--line-strong);
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.95rem; }

/* Three states ----------------------------------------------------------- */

.state-label {
  margin-bottom: 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}
.snippet {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow-x: auto;
}
.snippet code {
  padding: 0;
  background: none;
  font-size: 0.8125rem;
  line-height: 1.8;
  color: var(--text);
}
.snippet span { color: var(--faint); }
.snippet .ok { color: var(--sage); }

/* Your cloud ------------------------------------------------------------- */

.note {
  margin-top: 28px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 0.975rem;
}
.note strong { color: var(--text); font-weight: 600; }

.facts { display: grid; gap: 0; }
.fact { padding: 28px 0; border-top: 1px solid var(--line); }
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact dt { margin-bottom: 8px; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; }
.fact dd { color: var(--muted); }

/* Pricing ---------------------------------------------------------------- */

.tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.tier .ticks { margin: 24px 0 32px; flex: 1; }
.tier-featured { border: 1.5px solid var(--forest); box-shadow: 0 24px 48px -28px rgba(15, 26, 23, 0.45); }
.tier-badge {
  position: absolute;
  top: -12px; left: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--cream);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tier-name { font-size: 1.25rem; }
.tier-for { margin-top: 4px; font-size: 0.9rem; color: var(--muted); }
.tier-price {
  margin-top: 24px;
  font-size: 2.75rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.tier-price span { margin-left: 4px; font-size: 1rem; letter-spacing: 0; color: var(--muted); }
.tier-desc { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }

/* Compare table ---------------------------------------------------------- */

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}
.compare { width: 100%; min-width: 620px; border-collapse: collapse; text-align: left; }
.compare th, .compare td {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.95rem;
}
.compare thead th, .compare thead td { border-top: 0; font-weight: 600; }
.compare tbody th { font-weight: 500; color: var(--text); width: 28%; }
.compare td { color: var(--muted); }
.compare .is-us { background: var(--surface); color: var(--text); }
.compare thead .is-us { color: var(--sage); }

/* Evidence --------------------------------------------------------------- */

.mini { padding-top: 24px; border-top: 1.5px solid var(--forest); }
.mini h3 { margin-bottom: 10px; }
.mini p { color: var(--muted); font-size: 0.95rem; }

/* FAQ -------------------------------------------------------------------- */

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px; height: 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  color: var(--muted);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--sage); }
.faq details p { padding: 0 40px 22px 0; color: var(--muted); }

/* CTA + form ------------------------------------------------------------- */

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 64px;
  align-items: start;
}
.cta-copy .ticks { margin-top: 32px; }

.form-card {
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}
.optional { color: var(--muted); font-weight: 400; }

.signup-form input, .signup-form select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.signup-form input::placeholder { color: var(--faint); }
.signup-form input:focus, .signup-form select:focus { outline: none; border-color: var(--sage); }
.signup-form select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23F2EDE3' stroke-opacity='.6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
.signup-form .btn { margin-top: 8px; }
.signup-error { margin-top: 14px; color: #E8956B; font-size: 0.925rem; }
.signup-success { font-size: 1.0625rem; color: var(--text); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

.footer { padding: 48px 0 56px; border-top: 1px solid var(--line); }
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 48px;
  align-items: center;
}
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 24px; font-size: 0.925rem; color: var(--muted); }
.footer-nav a:hover { color: var(--text); }
.footer-note { grid-column: 1 / -1; max-width: 640px; font-size: 0.85rem; color: var(--faint); }

/* Reveal ----------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-d, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .canvas .node { opacity: 1; transform: none; }
  .flow.is-flowing { animation: none; }
}

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

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .step:nth-child(2)::after { display: none; }
  .split, .cta-inner { grid-template-columns: 1fr; gap: 48px; }
  .tiers { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
}

@media (max-width: 860px) {
  .burger { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 20px;
    background: var(--forest);
    border-bottom: 1px solid rgba(242, 237, 227, 0.1);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0.2s;
  }
  .menu-open .nav { opacity: 1; transform: none; visibility: visible; }
  .nav-link { padding: 14px 8px; font-size: 1.0625rem; border-bottom: 1px solid rgba(242, 237, 227, 0.08); border-radius: 0; }
  .nav-link:last-child { border-bottom: 0; }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .card-num { margin-bottom: 20px; }

  .canvas-stage { padding: 36px 24px; }
  .canvas-graph { column-gap: 40px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }

  .header-end .btn-sm { display: none; }

  .hero { padding: 56px 0 80px; }
  .pill { font-size: 0.8125rem; }
  .repo-form { flex-direction: column; padding: 8px; }
  .repo-form input { height: 44px; font-size: max(16px, 0.9rem); }
  .hero-meta { flex-direction: column; gap: 12px; }

  .canvas { margin-top: 56px; }
  .plan-tag { display: none; }
  .canvas-stage { padding: 28px 16px; }
  /* Phones: top-to-bottom flow — repo, then services, then datastores. */
  .canvas-graph { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 40px; }
  .col { display: contents; }
  .node[data-node="repo"], .node[data-node="search"] { grid-column: 1 / -1; justify-self: center; width: min(100%, 220px); }
  .node[data-node="search"] { margin-top: -16px; }
  .node { padding: 12px; gap: 6px; }
  .node-head { gap: 8px; }
  .node-head strong { font-size: 0.875rem; }
  .node-icon { width: 24px; height: 24px; }
  .node-ev { font-size: 0.6875rem; }
  .node-st { font-size: 0.75rem; }
  .plan-foot { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 16px; }

  .grid-4 { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr; row-gap: 32px; }
  .step { padding-left: 60px; }
  .step-num { position: absolute; left: 0; top: -6px; margin: 0; }
  .step::after { display: none; }

  .card, .tier, .form-card { padding: 24px 20px; }
  .compare th, .compare td { padding: 14px 16px; }
  .faq details p { padding-right: 0; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

/* Comparison table stacks on phones so the Alineplane column never scrolls off-screen. */
@media (max-width: 640px) {
  .table-wrap { border: 0; overflow: visible; }
  .compare { min-width: 0; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare thead { display: none; }
  .compare tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .compare tbody th { padding: 14px 16px 6px; border: 0; font-weight: 600; width: auto; }
  .compare td { display: grid; gap: 2px; padding: 8px 16px 12px; border: 0; }
  .compare td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .compare td.is-us { padding-top: 12px; border-top: 1px solid var(--line); }
  .compare td.is-us::before { color: var(--sage); }
}
