/* ============================================================
   RefactorAI — warm editorial design system
   Paper base · distinctive system typography · hairline structure
   ============================================================ */

:root {
  /* Warm paper base */
  --paper: #f4f0e6;
  --paper-2: #eee9dc;
  --card: #fbf8f1;
  --card-2: #f7f2e8;

  /* Ink + text */
  --ink: #211d16;
  --ink-soft: #4a4437;
  --muted: #726a59;
  --faint: #9b9382;

  /* Hairlines */
  --line: #ddd5c2;
  --line-strong: #cdc4ad;

  /* One confident accent: clay */
  --clay: #b1552f;
  --clay-deep: #92411f;
  --clay-tint: #efe1d6;

  /* Semantic (product logic only) */
  --green: #2f7d45;
  --green-tint: #e4efe4;
  --red: #c0392b;
  --red-tint: #f4e2df;
  --amber: #a9752a;
  --amber-tint: #f2e8d4;

  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1180px;
  --shadow: 0 20px 50px -30px rgba(45, 35, 20, 0.35);
  --shadow-soft: 0 2px 0 rgba(45, 35, 20, 0.02);

  --display: "Bricolage Grotesque", "Inter", system-ui, -apple-system, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  font-family: var(--sans);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.62;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

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

::selection {
  background: var(--clay-tint);
  color: var(--clay-deep);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 240, 230, 0.82);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-small {
  font-size: 17px;
}

.logo {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: transparent;
}

.logo svg {
  width: 100%;
  height: 100%;
}

.logo .logo-glyph {
  fill: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--clay);
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 550;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--clay);
  color: #fdf7f0;
  border-color: var(--clay);
}

.btn-primary:hover {
  background: var(--clay-deep);
  border-color: var(--clay-deep);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(33, 29, 22, 0.03);
}

.btn-lg {
  padding: 13px 24px;
  font-size: 15.5px;
}

.btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.18s ease;
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

/* ---------- Eyebrow / badge ---------- */
.eyebrow {
  font-family: var(--mono);
  color: var(--clay);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 72px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 64px;
  align-items: center;
}

.hero-copy {
  text-align: left;
}

.hero h1 {
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 24px;
  max-width: 640px;
}

.hero h1 .grad {
  color: var(--clay);
  font-weight: 600;
}

.hero p.lead {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 0 34px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.final .hero-cta,
.hero-cta.center {
  justify-content: center;
}

.install {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 11px 11px 18px;
  font-family: var(--mono);
  font-size: 14px;
  box-shadow: var(--shadow-soft);
}

.install .prompt {
  color: var(--clay);
  user-select: none;
}

.install code {
  color: var(--ink);
}

.copy-btn {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--mono);
}

.copy-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.copy-btn.copied {
  color: var(--green);
  border-color: var(--green);
}

.trust-row {
  margin-top: 30px;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13.5px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-row svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

/* ---------- Sections ---------- */
section.block {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 660px;
  margin: 0 0 56px;
}

.section-head.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-head .eyebrow {
  display: block;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.section-head p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 18px;
}

/* ---------- Cards / feature grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card {
  background: var(--card);
  padding: 30px 28px;
  transition: background 0.18s ease;
}

.card:hover {
  background: var(--card-2);
}

.card .ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: var(--clay-tint);
  color: var(--clay-deep);
}

.card .ico svg {
  width: 21px;
  height: 21px;
}

.card h3 {
  margin: 0 0 9px;
  font-size: 20px;
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* Use-case grid keeps card chrome but no icon */
.card-feature .ico {
  background: var(--clay-tint);
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.steps.steps-4 {
  grid-template-columns: repeat(4, 1fr);
}

.step {
  position: relative;
  background: var(--card);
  padding: 30px 26px 32px;
}

.step em {
  color: var(--ink);
  font-style: normal;
  font-weight: 600;
}

.step .num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--clay);
  color: var(--clay);
  font-family: var(--mono);
  font-weight: 500;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 14px;
}

.step h3 {
  margin: 0 0 9px;
  font-size: 18px;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* Inline code */
code {
  font-family: var(--mono);
}

.step code,
.hero p.lead code,
.compare-cell code,
.plan-features li code,
.faq-item code {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  font-family: var(--mono);
  font-size: 0.84em;
  color: var(--clay-deep);
}

/* ---------- Compare table ---------- */
.compare {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
}

.compare-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr 1.1fr;
}

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

.compare-cell {
  padding: 17px 22px;
  font-size: 15px;
  color: var(--ink-soft);
}

.compare-cell.compare-label {
  font-weight: 600;
  color: var(--ink);
  background: var(--card-2);
}

.compare-cell.compare-them {
  color: var(--muted);
}

.compare-cell.compare-us {
  color: var(--ink);
  background: var(--clay-tint);
  border-left: 1px solid rgba(177, 85, 47, 0.24);
  font-weight: 500;
}

.compare-head .compare-cell {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.compare-head .compare-us {
  color: var(--clay-deep);
}

.compare-note {
  max-width: 720px;
  margin: 32px 0 0;
  color: var(--ink-soft);
  font-size: 20px;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

/* ---------- Callout (privacy) ---------- */
.callout {
  background: var(--ink);
  color: #efe9dc;
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: center;
}

.callout h2 {
  color: #f6f1e6;
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  line-height: 1.1;
}

.callout p {
  color: #c8c1b0;
  margin: 0 0 26px;
  font-size: 16px;
}

.callout .btn-primary {
  background: var(--clay);
  border-color: var(--clay);
}

.callout .btn-primary:hover {
  background: #c56438;
  border-color: #c56438;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 15px;
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  color: #d9d3c4;
}

.checklist svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: #7fb98f;
  margin-top: 1px;
}

/* ---------- Final CTA ---------- */
.final {
  text-align: center;
  padding: 112px 0;
}

.final h2 {
  font-size: clamp(30px, 4.6vw, 50px);
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  line-height: 1.04;
}

.final p {
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 34px;
  font-size: 18px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  background: var(--paper-2);
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 13.5px;
}

.foot-links {
  display: flex;
  gap: 24px;
}

.foot-links a {
  color: var(--ink-soft);
}

.foot-links a:hover {
  color: var(--clay);
}

/* ---------- Blueprint commit-graph card ---------- */
.hero-demo {
  position: relative;
}

.editor {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: -1px -1px;
}

.editor-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--card-2);
}

.editor-bar .dots {
  display: inline-flex;
  gap: 7px;
}

.editor-bar .dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.editor-bar .dots i:nth-child(1) {
  background: #d98b74;
}
.editor-bar .dots i:nth-child(2) {
  background: #d8b46a;
}
.editor-bar .dots i:nth-child(3) {
  background: #8fbf94;
}

.editor-file {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.editor-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--clay-deep);
  background: var(--clay-tint);
  border: 1px solid rgba(177, 85, 47, 0.24);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
}

.editor-body {
  padding: 20px 20px 10px;
  min-height: 300px;
  background: rgba(251, 248, 241, 0.7);
}

.editor.term .editor-body {
  padding: 18px 20px;
  min-height: 300px;
}

.editor-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  background: var(--card-2);
}

.term-keys {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11.5px;
}

.editor-status {
  margin-left: auto;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.editor-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
  animation: pulse 1.8s ease-in-out infinite;
}

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

/* ---------- Commit graph rows ---------- */
.term-graph {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
}

.cnode {
  display: flex;
  gap: 14px;
  padding: 9px 0;
}

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

.crail {
  position: relative;
  width: 12px;
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.crail::before {
  content: "";
  position: absolute;
  top: 13px;
  bottom: -16px;
  width: 2px;
  background: var(--line-strong);
}

.cnode:last-child .crail::before {
  display: none;
}

.cdot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line-strong);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--line-strong);
  z-index: 1;
}

.cdot.queued {
  background: var(--faint);
  box-shadow: 0 0 0 1px var(--faint);
}

.cdot.reviewing {
  background: var(--clay);
  box-shadow: 0 0 0 3px var(--clay-tint);
  animation: pulse 1.3s ease-in-out infinite;
}

.cdot.pass {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}

.cdot.high {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-tint);
}

.cbody {
  flex: 1;
  min-width: 0;
}

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

.cbranch {
  color: var(--clay-deep);
  font-weight: 600;
}

.cage {
  color: var(--faint);
  font-size: 11.5px;
}

.cgate {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.gate-pass {
  color: var(--green);
  background: var(--green-tint);
  border: 1px solid rgba(47, 125, 69, 0.28);
}

.gate-warn {
  color: var(--amber);
  background: var(--amber-tint);
  border: 1px solid rgba(169, 117, 42, 0.3);
}

.gate-high {
  color: var(--red);
  background: var(--red-tint);
  border: 1px solid rgba(192, 57, 43, 0.3);
}

.cmeta {
  margin-top: 4px;
  color: var(--ink-soft);
}

.csha {
  color: var(--amber);
}

.cmsg.dim,
.cmeta .dim {
  color: var(--faint);
}

.rr {
  color: var(--clay);
  font-weight: 600;
}

.blocked {
  color: var(--red);
}

.cnode-live {
  background: var(--clay-tint);
  border-radius: 8px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}

/* ---------- Branch-tree graph (hero mockup) ---------- */
.glegend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.glegend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.gl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.gl-master {
  background: var(--ink-soft);
}
.gl-clay {
  background: var(--clay);
}
.gl-green {
  background: var(--green);
}

.gitgraph {
  position: relative;
  padding-left: 54px;
}

.git-rails {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 504px;
  overflow: visible;
}

.rail {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: rail-draw 1.1s ease forwards;
}

.rail-master {
  stroke: var(--line-strong);
  animation-delay: 0.1s;
}
.rail-clay {
  stroke: var(--clay);
  opacity: 0.85;
  animation-delay: 0.5s;
}
.rail-green {
  stroke: var(--green);
  opacity: 0.85;
  animation-delay: 0.9s;
}

@keyframes rail-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.gdot {
  animation: gdot-pop 0.4s ease both;
}

@keyframes gdot-pop {
  from {
    transform: scale(0);
    transform-box: fill-box;
    transform-origin: center;
  }
  to {
    transform: scale(1);
    transform-box: fill-box;
    transform-origin: center;
  }
}

.git-rails .gdot-clay {
  animation: gdot-pop 0.4s ease both, gdot-pulse 1.8s ease-in-out 1.4s infinite;
}

@keyframes gdot-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(177, 85, 47, 0));
  }
  50% {
    filter: drop-shadow(0 0 4px rgba(177, 85, 47, 0.6));
  }
}

.gdot {
  stroke: var(--card);
  stroke-width: 2.5;
}

.gdot-master {
  fill: var(--ink-soft);
}
.gdot-pass {
  fill: var(--green);
}
.gdot-clay {
  fill: var(--clay);
}
.gdot-green {
  fill: var(--green);
}
.gdot-open {
  fill: var(--card);
  stroke: var(--clay);
  stroke-width: 2.5;
}

.grow {
  height: 84px;
  padding-top: 16px;
  border-radius: 8px;
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
  transition: background 0.16s ease, box-shadow 0.16s ease;
  cursor: default;
}

.grow:hover {
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.grow-live {
  background: var(--clay-tint);
  box-shadow: inset 0 0 0 1px rgba(177, 85, 47, 0.18);
}

.grow-live:hover {
  background: var(--clay-tint);
  box-shadow: inset 0 0 0 1px rgba(177, 85, 47, 0.32);
}

.grow-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gbranch {
  font-weight: 600;
  color: var(--ink);
}

.gfork {
  color: var(--clay);
  font-weight: 600;
}

.gsha {
  color: var(--amber);
}

.gpath {
  color: var(--muted);
}

.gage {
  color: var(--faint);
  font-size: 11.5px;
}

.gmeta {
  margin-top: 5px;
  color: var(--ink-soft);
}

.grow .cgate {
  margin-left: auto;
}

.grow-head .sev {
  margin-left: auto;
}

.sev {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 999px;
}

.sev-critical {
  color: #fdf7f0;
  background: var(--red);
}
.sev-high {
  color: var(--red);
  background: var(--red-tint);
  border: 1px solid rgba(192, 57, 43, 0.3);
}
.sev-medium {
  color: var(--amber);
  background: var(--amber-tint);
  border: 1px solid rgba(169, 117, 42, 0.3);
}
.sev-low {
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--line);
}

@media (max-width: 520px) {
  .grow {
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .git-rails {
    display: none;
  }
  .gitgraph {
    padding-left: 14px;
    border-left: 2px solid var(--line-strong);
  }
}

/* ---------- Stats band ---------- */
.stats-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  padding: 0;
}

.stat {
  background: var(--paper-2);
  padding: 44px 24px;
  text-align: center;
}

.stat-num {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--clay);
}

.stat-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Pricing ---------- */
.price-hero {
  text-align: center;
  padding: 88px 32px 8px;
  max-width: 780px;
}

.price-hero .badge {
  margin-bottom: 22px;
}

.price-hero h1 {
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 18px;
}

.price-hero .lead {
  color: var(--ink-soft);
  font-size: clamp(16px, 1.5vw, 19px);
  margin: 0 auto 30px;
  max-width: 640px;
}

.billing-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
}

.bt-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 550;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.15s ease, color 0.15s ease;
}

.bt-opt.is-active {
  background: var(--clay);
  color: #fdf7f0;
}

.bt-save {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--green);
  background: var(--green-tint);
  border-radius: 999px;
  padding: 2px 8px;
}

.bt-opt.is-active .bt-save {
  color: #fdf7f0;
  background: rgba(255, 255, 255, 0.22);
}

.price-section {
  padding: 44px 32px 8px;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.price-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.price-card.featured {
  border-color: var(--clay);
  box-shadow: 0 24px 60px -34px rgba(177, 85, 47, 0.5);
}

.pc-tag {
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--clay);
  color: #fdf7f0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

.pc-kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--clay);
  margin-bottom: 14px;
}

.pc-name {
  font-size: 24px;
  font-weight: 560;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.pc-desc {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0 0 22px;
  min-height: 42px;
}

.pc-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.pc-amount {
  font-family: var(--display);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pc-period {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.pc-subprice {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 24px;
  min-height: 18px;
}

.pc-price:last-of-type {
  margin-bottom: 24px;
}

.pc-cta {
  width: 100%;
  justify-content: center;
  margin-bottom: 26px;
}

.plan-features {
  list-style: none;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 13px;
}

.plan-features li {
  position: relative;
  padding-left: 28px;
  font-size: 14.5px;
  color: var(--ink);
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f7d45' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.plan-features li em {
  font-style: normal;
  color: var(--muted);
}

.price-foot-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 640px;
  margin: 34px auto 0;
}

/* ---------- Pricing calculator ---------- */
.calc {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px;
}

.calc-controls {
  display: grid;
  gap: 28px;
  align-content: start;
}

.calc-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
}

.calc-slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.calc-slider-row output {
  min-width: 58px;
  text-align: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 8px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--line-strong);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--clay);
  border: 3px solid var(--card);
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line-strong);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--clay);
  border: 3px solid var(--card);
  cursor: pointer;
}

.calc-field select {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--sans);
  cursor: pointer;
}

.calc-hint {
  color: var(--faint);
  font-size: 12px;
  margin: 10px 0 0;
}

.calc-result {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calc-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 0;
}

.calc-line span:last-child {
  color: var(--ink);
  font-weight: 600;
  font-family: var(--mono);
}

.calc-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.calc-total span:last-child {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--clay);
}

.calc-total small {
  font-size: 14px;
  color: var(--muted);
  font-family: var(--sans);
}

.calc-perdev {
  margin-top: 12px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--mono);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 19px 22px;
  font-weight: 600;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.faq-item summary::after {
  content: "+";
  color: var(--clay);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

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

.grid .reveal.in:nth-child(2) {
  transition-delay: 0.06s;
}
.grid .reveal.in:nth-child(3) {
  transition-delay: 0.12s;
}
.grid .reveal.in:nth-child(4) {
  transition-delay: 0.18s;
}
.grid .reveal.in:nth-child(5) {
  transition-delay: 0.24s;
}
.grid .reveal.in:nth-child(6) {
  transition-delay: 0.3s;
}
.steps .reveal.in:nth-child(2) {
  transition-delay: 0.1s;
}
.steps .reveal.in:nth-child(3) {
  transition-delay: 0.2s;
}
.steps .reveal.in:nth-child(4) {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .editor-status::before,
  .cdot.reviewing,
  .rail,
  .gdot,
  .git-rails .gdot-clay {
    animation: none;
  }
  .rail {
    stroke-dashoffset: 0;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 64px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps.steps-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .wrap {
    padding: 0 22px;
  }
  .grid,
  .steps,
  .steps.steps-4,
  .price-grid,
  .calc {
    grid-template-columns: 1fr;
  }
  .callout {
    grid-template-columns: 1fr;
    padding: 34px;
  }
  .compare-row {
    grid-template-columns: 1fr;
  }
  .compare-head {
    display: none;
  }
  .compare-cell {
    padding: 11px 18px;
  }
  .compare-cell.compare-label {
    padding-top: 16px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .compare-cell.compare-us {
    border-left: none;
    border-top: 1px solid rgba(177, 85, 47, 0.24);
  }
  .nav-links {
    display: none;
  }
  .pc-desc {
    min-height: 0;
  }
}
