/* ============================================================
   PitchIron.com — Design System Implementation
   Palette: iron/charcoal base · orange acts · gold adorns
   ============================================================ */

:root {
  --iron-950: #0B0C0E;
  --iron-900: #101216;
  --iron-800: #161A20;
  --iron-700: #1E232B;
  --line: #2A303A;

  --text-hi: #EDEFF3;
  --text-mid: #B7BEC9;
  --text-low: #828B98;

  --orange: #FF9233;
  --orange-hover: #FFA24F;
  --orange-press: #E27A17;
  --orange-ink: #1F1204;
  --gold: #C9A257;
  --gold-soft: rgba(201, 162, 87, 0.35);

  --success: #4FBF8B;
  --error: #E5484D;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  --h1: clamp(2.4rem, 5.5vw, 4.25rem);
  --h2: clamp(1.7rem, 3.2vw, 2.5rem);
  --h3: clamp(1.2rem, 2vw, 1.5rem);

  --container: 1200px;
  --pad-x: clamp(20px, 4vw, 48px);
  --sect: clamp(72px, 10vw, 136px);

  --font-head: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--iron-900);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-hover); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-hi);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
h1 { font-size: var(--h1); font-weight: 700; line-height: 1.05; }
h2 { font-size: var(--h2); font-weight: 700; line-height: 1.12; }
h3 { font-size: var(--h3); font-weight: 500; line-height: 1.2; }
p { margin: 0 0 16px; max-width: 65ch; }
.lead { font-size: 1.125rem; line-height: 1.65; max-width: 36rem; }
strong { color: var(--text-hi); font-weight: 600; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--orange); color: var(--orange-ink);
  padding: 10px 18px; border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad-x); }
section { padding: var(--sect) 0; }
section, h2, input, select, textarea { scroll-margin-top: 84px; }
section.alt { background: var(--iron-800); }
.center { text-align: center; }
.center p, .center .lead { margin-left: auto; margin-right: auto; }

.eyebrow {
  font: 600 12px/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin: 0 0 14px;
}
.eyebrow::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  background: var(--gold-soft);
  margin-top: 14px;
}
.center .eyebrow::after { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--font-body);
  border-radius: var(--r-md);
  padding: 14px 28px;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 150ms ease-out;
  text-decoration: none;
}
.btn-primary { background: var(--orange); color: var(--orange-ink); }
.btn-primary:hover { background: var(--orange-hover); color: var(--orange-ink); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 146, 51, 0.25); }
.btn-primary:active { background: var(--orange-press); transform: translateY(0); box-shadow: none; }
.btn-primary:disabled { background: #3A3F47; color: #828B98; box-shadow: none; transform: none; cursor: not-allowed; }
.btn-secondary { background: transparent; border-color: var(--line); color: var(--text-hi); }
.btn-secondary:hover { border-color: var(--orange); color: var(--orange); }
.btn-secondary:active { background: rgba(255, 146, 51, 0.08); }
.btn-small { padding: 10px 20px; font-size: 0.9375rem; }
.link-arrow { font-weight: 600; white-space: nowrap; }
.link-arrow::after { content: "→"; display: inline-block; margin-left: 6px; transition: transform 150ms ease-out; }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.center .cta-row { justify-content: center; }
@media (max-width: 640px) {
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 11px/1 var(--font-body);
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 999px; padding: 5px 10px;
  vertical-align: middle;
}
.badge-live { background: rgba(255, 146, 51, 0.10); color: var(--orange); }
.badge-live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
  animation: pulse 2s ease-out infinite;
}
.badge-soon { border: 1px solid var(--line); color: var(--text-low); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 146, 51, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(255, 146, 51, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 146, 51, 0); }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  background: rgba(11, 12, 14, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--pad-x);
  height: 100%;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.nav-logo img { height: 34px; width: auto; }
.nav-logo span {
  font: 700 1.05rem/1 var(--font-head);
  color: var(--text-hi); letter-spacing: -0.01em;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font: 500 0.9375rem/1 var(--font-body); color: var(--text-mid); padding: 6px 0; }
.nav-links a:hover { color: var(--text-hi); }
.nav-links a[aria-current="page"] { color: var(--text-hi); box-shadow: inset 0 -2px 0 var(--orange); }
.nav-open-app { font-size: 0.875rem; color: var(--text-low); white-space: nowrap; }
.nav-open-app:hover { color: var(--text-hi); }
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer; padding: 10px;
  width: 44px; height: 44px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text-hi);
  margin: 5px auto; transition: transform 200ms ease-out, opacity 200ms ease-out;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: fixed; inset: 64px 0 0 0;
    background: var(--iron-950);
    padding: 32px var(--pad-x) calc(32px + env(safe-area-inset-bottom));
    flex-direction: column; align-items: stretch; gap: 0;
    overflow-y: auto; overscroll-behavior: none;
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { font-size: var(--h3); font-family: var(--font-head); padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav-links a[aria-current="page"] { box-shadow: none; color: var(--orange); }
  .nav-cta-mobile { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
  .nav-cta-mobile .btn { width: 100%; }
  .nav-open-app { margin-top: 20px; text-align: center; }
  .nav-desktop-cta { display: none !important; }
}
@media (min-width: 901px) {
  .nav-menu { display: flex; align-items: center; gap: 28px; }
  .nav-cta-mobile { display: none; }
}
body.nav-locked { overflow: hidden; }

main { padding-top: 64px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(96px, 14vw, 180px) 0 var(--sect); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% -20%, rgba(255, 146, 51, 0.08), transparent 60%);
}
.hero .container { position: relative; }
.hero .lead { margin-bottom: 32px; }

/* ---------- Chat-bar motif ---------- */
.chatbar-wrap { margin-top: 56px; max-width: 720px; }
.center .chatbar-wrap { margin-left: auto; margin-right: auto; }
.chatbar {
  background: rgba(30, 35, 43, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 50px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: var(--r-xl);
  padding: 20px 24px;
  display: flex; align-items: center; gap: 12px;
  text-align: left;
}
.chatbar .prompt-icon { color: var(--orange); flex: none; font-weight: 700; font-family: var(--font-head); }
.chatbar .prompt-text { color: var(--text-hi); font-weight: 500; min-height: 1.65em; }
.chatbar .caret {
  display: inline-block; width: 2px; height: 1.1em; background: var(--orange);
  vertical-align: text-bottom; margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.chat-result {
  margin-top: 12px;
  background: var(--iron-700);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  text-align: left;
  opacity: 0; transform: translateY(8px);
  transition: opacity 250ms ease-out, transform 250ms ease-out;
}
.chat-result.show { opacity: 1; transform: none; }
.chat-result .check { color: var(--success); font-weight: 700; }
.chat-result .result-text { color: var(--text-mid); font-size: 0.9375rem; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--iron-700);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: border-color 200ms ease-out, transform 200ms ease-out;
}
.card h3 .badge { position: absolute; top: 32px; right: 24px; }
@media (hover: hover) {
  .card:hover { border-color: rgba(255, 146, 51, 0.35); transform: translateY(-2px); }
}
.card h3 { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card p { margin-bottom: 0; }
.icon-tile {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--iron-800);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--orange);
}
.icon-tile svg { width: 22px; height: 22px; stroke-width: 1.5; }

/* ---------- Steps ---------- */
.step-num {
  font: 700 0.875rem/1 var(--font-head);
  color: var(--orange);
  display: block; margin-bottom: 12px;
}

/* ---------- Capability blocks (What It Does) ---------- */
.cap-block {
  background: var(--iron-700);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 48px);
  margin-bottom: 32px;
}
.cap-block h2 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cap-includes {
  color: var(--text-low); font-size: 0.9375rem;
  border-left: 2px solid var(--gold-soft);
  padding-left: 16px; margin: 20px 0;
  max-width: none;
}
.cap-example {
  background: var(--iron-800);
  border-radius: var(--r-md);
  padding: 18px 22px;
  margin: 20px 0;
  font-size: 0.9375rem;
}
.cap-example .prompt { color: var(--text-hi); font-weight: 500; }
.cap-replaces { color: var(--text-mid); margin-bottom: 0; }
.cap-replaces strong { color: var(--gold); font-weight: 600; }

/* ---------- Comparison table ---------- */
.compare { width: 100%; border-collapse: collapse; margin-top: 16px; }
.compare th {
  font: 600 12px/1.4 var(--font-body);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gold-soft);
}
.compare td {
  padding: 16px; border-bottom: 1px solid var(--line);
  color: var(--text-mid); font-size: 0.9375rem; vertical-align: top;
}
.compare td:first-child { color: var(--text-hi); font-weight: 500; }
.compare .pi-cell { color: var(--text-hi); }
@media (max-width: 640px) {
  .compare thead { position: absolute; left: -9999px; }
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100%; }
  .compare tr { border-bottom: 1px solid var(--line); padding: 14px 0; }
  .compare td { border: none; padding: 4px 0; }
  .compare td:first-child { font-family: var(--font-head); }
  .compare td[data-label]::before {
    content: attr(data-label) " — ";
    color: var(--text-low); font-size: 0.8125rem;
  }
}

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; text-align: left;
  font: 500 var(--h3) var(--font-head);
  color: var(--text-hi); letter-spacing: -0.01em;
}
.faq-q .faq-icon {
  flex: none; color: var(--orange); font-size: 1.4rem; line-height: 1;
  transition: transform 150ms ease-out;
}
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height 250ms ease-out; }
.faq-a-inner { padding: 0 0 24px; }
.faq-a-inner p { margin-bottom: 0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { font: 500 0.875rem/1.3 var(--font-body); color: var(--text-hi); }
label .opt { color: var(--text-low); font-weight: 400; }
input, select, textarea {
  background: var(--iron-700);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font: 400 16px/1.4 var(--font-body);
  color: var(--text-hi);
  width: 100%;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
input::placeholder, textarea::placeholder { color: var(--text-low); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 146, 51, 0.18);
}
.form-field.invalid input, .form-field.invalid select { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.875rem; display: none; }
.form-field.invalid .field-error { display: block; }
.form-note { color: var(--text-low); font-size: 0.875rem; margin-top: 16px; }
.form-success {
  background: var(--iron-700); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 48px 32px; text-align: center;
}
.form-success .check-tile {
  width: 56px; height: 56px; border-radius: var(--r-md);
  background: rgba(255, 146, 51, 0.12); color: var(--orange);
  font-size: 1.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.form-error-global {
  display: none;
  background: rgba(229, 72, 77, 0.08); border: 1px solid rgba(229, 72, 77, 0.4);
  border-radius: var(--r-sm); padding: 14px 18px;
  color: var(--error); font-size: 0.9375rem; margin-bottom: 20px;
}
.form-error-global.show { display: block; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(31, 18, 4, 0.3); border-top-color: var(--orange-ink);
  animation: spin 700ms linear infinite;
  display: none;
}
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
footer {
  background: var(--iron-950);
  border-top: 1px solid var(--gold-soft);
  padding: 64px 0 40px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-tagline { color: var(--text-mid); max-width: 26rem; }
.footer-col h4 {
  font: 600 12px/1 var(--font-body);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: var(--text-low); font-size: 0.9375rem; }
.footer-col a:hover { color: var(--text-hi); }
.footer-legal {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--text-low); font-size: 0.875rem;
}
.footer-legal a { color: var(--text-low); }
.footer-legal a:hover { color: var(--text-hi); }
.footer-dogfood { color: var(--text-low); font-size: 0.8125rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--iron-800); text-align: center; }
.cta-band .lead { margin-left: auto; margin-right: auto; margin-bottom: 32px; }
.cta-band .cta-row { justify-content: center; }
.cta-band p { margin-left: auto; margin-right: auto; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 350ms ease-out, transform 350ms ease-out; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Walkthroughs ---------- */
.walk { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 900px) { .walk { grid-template-columns: 1fr; } }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-48 { margin-bottom: 48px; }
.placeholder-box {
  border: 1px dashed var(--line); border-radius: var(--r-lg);
  padding: 48px 32px; text-align: center; color: var(--text-low); font-size: 0.9375rem;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .chat-result { opacity: 1; transform: none; }
}
