/* =========================================================================
   FormToCode — public site
   Full redesign in the spirit of GitBook / Typeform: centered oversized
   type, a floating pill nav, generous whitespace, soft rounded cards,
   one confident accent color used sparingly, a colorful closing CTA card
   instead of a plain banner. Still a plain white page — no dark mode,
   no glass/blur gimmicks beyond the nav.
   ========================================================================= */
:root {
  --bg: #ffffff;
  --bg-tint: #fdf8f4;
  --ink: #0f0f0e;
  --surface: #ffffff;
  --border: #ececE7;
  --text: #14130f;
  --muted: #6b6a63;
  --muted-dark: #97948a;

  --accent: #ff5c00;
  --accent-dark: #d94c00;
  --accent-tint: #fff1e8;
  --accent-tint-2: #ffe4d1;

  --blue-tint: #eef4ff;
  --green-tint: #eefaf0;

  --diff-add: #1a7f37;
  --diff-del: #cf222e;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'General Sans', 'Inter', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
code, .mono { font-family: var(--mono); }
h1, h2, h3, .logo { font-family: var(--font-display); }

/* ================= FormToCode wordmark — the logo IS the styled text ================= */
.ftc-wordmark { font-weight: 700; letter-spacing: -0.01em; color: #17171a; white-space: nowrap; }
.ftc-wordmark .ftc-accent { color: #0e93a4; }
.ftc-logo-img { height: 24px; width: auto; display: block; }

/* ================= Nav — floating pill, GitBook/Typeform style ================= */
.nav-wrap { position: sticky; top: 0; z-index: 40; padding: 16px 24px 0; }
nav {
  max-width: 1040px; margin: 0 auto;
  background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(20,19,15,.05);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 10px 0 18px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.logo-mark { width: 24px; height: 24px; border-radius: 7px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.nav-links { display: flex; gap: 26px; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 8px; }

/* ================= Buttons — pill-shaped, flat, no glow ================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14.5px;
  border-radius: var(--radius-pill);
  padding: 11px 20px;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background .12s ease, border-color .12s ease, color .12s ease, transform .12s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2926; transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }

/* ================= Hero — big, centered, oversized type ================= */
.hero {
  padding: 84px 0 0;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -160px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 500px; z-index: -1;
  background:
    radial-gradient(circle at 20% 40%, rgba(255,92,0,.14), transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(58,130,255,.10), transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(30,180,110,.10), transparent 55%);
  filter: blur(10px);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--accent-dark);
  background: var(--accent-tint); padding: 7px 16px; border-radius: var(--radius-pill);
  margin-bottom: 26px;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.05;
  margin-bottom: 24px;
  max-width: 16ch;
}
.hero p { font-size: 18px; color: var(--muted); max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 12px; align-items: center; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--muted-dark); margin-bottom: 56px; }

/* ── Hero visual: floating window, overlapping into the next section ── */
.hero-visual-wrap { width: 100%; padding: 0 24px 0; }
.diff-window, .video-window {
  max-width: 940px; margin: 0 auto;
  background: var(--ink); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(20,19,15,.35), 0 1px 0 rgba(0,0,0,.02);
  border: 1px solid #2c2a26;
  text-align: left;
}
.diff-titlebar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; background: #1c1a17;
  border-bottom: 1px solid #2c2a26;
}
.diff-dot { width: 9px; height: 9px; border-radius: 50%; background: #3a3733; }
.diff-filename { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted-dark); }
.diff-body { font-family: var(--mono); font-size: 13px; line-height: 1.9; padding: 8px 0; }
.diff-line { padding: 2px 20px; white-space: pre; color: #d8d4c9; }
.diff-line.add { background: rgba(63, 185, 80, .13); color: #7ee2a8; }
.diff-line.add::before { content: '+ '; color: #56d364; }
.diff-line.del { background: rgba(248, 81, 73, .13); color: #ffa19c; }
.diff-line.del::before { content: '- '; color: #f85149; }
.diff-line.ctx { color: #8b877d; }
.diff-line.ctx::before { content: '  '; }
.diff-meta { padding: 12px 18px 16px; border-top: 1px solid #2c2a26; }
.diff-meta-title { font-size: 13.5px; color: #d8d4c9; font-weight: 600; margin-bottom: 3px; }
.diff-meta-sub { font-size: 11.5px; color: var(--muted-dark); font-family: var(--mono); }
.video-window video { display: block; width: 100%; max-height: 600px; background: #000; }

@media (max-width: 780px) {
  .hero { padding-top: 56px; }
  .hero-note { margin-bottom: 40px; }
}

/* ================= Trust / stat strip ================= */
.stat-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  max-width: 780px; margin: 56px auto 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.stat-item {
  padding: 24px; font-size: 13px; color: var(--muted); text-align: center;
  border-left: 1px solid var(--border);
}
.stat-item:first-child { border-left: none; }
.stat-num { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; margin-bottom: 2px; }
@media (max-width: 780px) {
  .stat-strip { grid-template-columns: 1fr; }
  .stat-item { border-left: none; border-top: 1px solid var(--border); }
  .stat-item:first-child { border-top: none; }
}

/* ================= Sections ================= */
.pub-section { padding: 96px 0; }
.pub-section.tint { background: var(--bg-tint); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-label {
  display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--accent-dark);
  margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--accent-tint); padding: 5px 12px; border-radius: var(--radius-pill);
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 14px; }
.section-head p { font-size: 16px; color: var(--muted); }
.pub-section .lede { font-size: 15.5px; color: var(--muted); max-width: 56ch; margin: 0 auto; }

/* ================= Feature grid — icon cards ================= */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px;
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  margin-bottom: 20px; color: var(--accent-dark); background: var(--accent-tint);
}
.feature-card:nth-child(2) .feature-icon { color: #2455c9; background: var(--blue-tint); }
.feature-card:nth-child(3) .feature-icon { color: #17824e; background: var(--green-tint); }
.feature-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.feature-card p { font-size: 14.5px; color: var(--muted); }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; } }

/* ================= How it works — horizontal numbered steps ================= */
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.step-card { position: relative; }
.step-number {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-family: var(--mono); font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.step-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.step-card p { font-size: 14.5px; color: var(--muted); margin-bottom: 20px; }
@media (max-width: 860px) { .steps-row { grid-template-columns: 1fr; gap: 40px; } }

/* small UI mockup pieces reused inside the steps */
.mock-card { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; box-shadow: 0 12px 30px -14px rgba(20,19,15,.12); }
.mock-card-header { padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 12px; font-family: var(--mono); color: var(--muted); background: #fafaf8; }
.mock-card-body { padding: 16px; }
.mock-field { margin-bottom: 12px; }
.mock-field label { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.mock-field .val { font-size: 13.5px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fafaf8; color: var(--text); }
.mock-filelist { font-family: var(--mono); font-size: 12.5px; }
.mock-file { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--muted); }
.mock-file.picked { color: var(--text); font-weight: 600; }
.mock-file .chk { width: 13px; height: 13px; border: 1.5px solid var(--border); border-radius: 3px; flex-shrink: 0; }
.mock-file.picked .chk { background: var(--accent); border-color: var(--accent); }
.mock-btn-row { display: flex; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--border); background: #fafaf8; }

/* ================= Under the hood — icon + copy split ================= */
.split-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.split-feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px;
}
.split-feature .feature-icon { margin-bottom: 18px; }
.split-feature h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.split-feature p { font-size: 14.5px; color: var(--muted); }
@media (max-width: 780px) { .split-feature-grid { grid-template-columns: 1fr; } }

/* ================= Closing CTA — colorful floating card, Typeform-style ================= */
.cta-band {
  max-width: 1040px; margin: 0 auto; padding: 0 24px;
}
.cta-card {
  background: var(--ink); color: #fff; border-radius: 28px; overflow: hidden;
  padding: 72px 48px; text-align: center; position: relative;
}
.cta-card::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,92,0,.35), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(58,130,255,.25), transparent 45%);
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card h2 { font-family: var(--font-display); font-size: clamp(26px, 3.6vw, 38px); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 16px; max-width: 22ch; margin-left: auto; margin-right: auto; }
.cta-card p { color: #cfcbc2; font-size: 16px; margin-bottom: 30px; max-width: 42ch; margin-left: auto; margin-right: auto; }
.cta-card .btn-accent { font-size: 15.5px; padding: 14px 28px; }
.terminal {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  font-family: var(--mono); font-size: 13px; padding: 20px 22px; color: #d8d4c9;
  max-width: 460px; margin: 32px auto 0; text-align: left;
}
.terminal .prompt { color: var(--accent); }
.terminal .line { padding: 3px 0; }
.terminal .out { color: #97948a; }

/* ================= Pricing ================= */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 40px; }
.pricing-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; background: var(--surface); }
.pricing-card.featured { border-color: var(--accent); box-shadow: 0 20px 50px -20px rgba(255,92,0,.25); }
.pricing-tag { font-family: var(--mono); font-size: 11.5px; color: var(--accent-dark); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.pricing-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.pricing-price { font-family: var(--font-display); font-size: 36px; font-weight: 600; letter-spacing: -0.02em; margin: 14px 0 6px; }
.pricing-price span { font-size: 15px; font-weight: 500; color: var(--muted); }
.pricing-desc { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.pricing-features { list-style: none; margin-bottom: 26px; }
.pricing-features li { font-size: 13.5px; padding: 8px 0; border-top: 1px solid var(--border); display: flex; gap: 9px; align-items: flex-start; }
.pricing-features li:first-child { border-top: none; }
.pricing-features li::before { content: '+'; color: var(--diff-add); font-weight: 700; font-family: var(--mono); flex-shrink: 0; }

/* ================= Footer — minimal, centered ================= */
footer { padding: 64px 0 40px; }
.footer-inner { text-align: center; }
.footer-inner .logo { justify-content: center; margin-bottom: 14px; }
.footer-inner p { color: var(--muted); font-size: 14px; max-width: 360px; margin: 0 auto 26px; }
.footer-links { display: flex; justify-content: center; gap: 24px; font-size: 14px; color: var(--muted); margin-bottom: 34px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { text-align: center; font-size: 12.5px; color: var(--muted-dark); font-family: var(--mono); border-top: 1px solid var(--border); padding-top: 24px; }

@media (max-width: 768px) {
  .nav-links { display: none; }
}
