/* Main Street Reply — clean, trustworthy local-business aesthetic */
:root {
  --ink: #1a2332;
  --ink-soft: #3d4a5c;
  --muted: #6b7a8f;
  --line: #e2e8f0;
  --paper: #ffffff;
  --wash: #f7f9fc;
  --wash-warm: #faf8f5;
  --brand: #1e5a8a;
  --brand-dark: #154468;
  --brand-soft: #e8f1f8;
  --accent: #2d7a4f;
  --accent-soft: #eaf5ef;
  --warn: #9a6b1a;
  --warn-soft: #fdf6e8;
  --danger-soft: #fef2f2;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(26, 35, 50, 0.06), 0 4px 16px rgba(26, 35, 50, 0.04);
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.95rem;
}
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--brand); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #ffffff; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--brand);
  color: white;
}
.btn-primary:hover { background: var(--brand-dark); color: white; }
.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--muted); background: var(--wash); }
.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover { background: #246640; color: white; }
.btn-ghost {
  background: transparent;
  color: var(--brand);
  padding-inline: 0.5rem;
}
.btn-block { width: 100%; }
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--wash-warm) 0%, var(--paper) 100%);
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 840px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  margin-bottom: 0.75rem;
}
.hero-lead {
  font-size: 1.1rem;
  max-width: 36em;
  margin-bottom: 1.5rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.trust-row span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.trust-row svg { flex-shrink: 0; }

.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.hero-card .label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.stars { color: #d4a017; letter-spacing: 0.05em; margin-bottom: 0.35rem; }
.review-sample {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--line);
}
.draft-preview {
  background: var(--brand-soft);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  color: var(--ink);
}
.draft-preview .tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin-bottom: 0.4rem;
}

/* Sections */
section { padding: 3.5rem 0; }
section.alt { background: var(--wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head {
  max-width: 36em;
  margin-bottom: 2rem;
}
.section-head h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
.grid-3 {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}
.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  font-size: 1.2rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.card p { font-size: 0.95rem; margin-bottom: 0; }

/* How it works */
.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.step h3 { font-size: 1.1rem; }
.step p { font-size: 0.95rem; margin: 0; }

/* Pricing */
.pricing-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--paper);
  border: 2px solid var(--brand);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.price {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin: 0.5rem 0;
}
.price span { font-size: 1.1rem; font-family: var(--font); font-weight: 500; color: var(--muted); }
.price-note { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.25rem; }
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
}
.feature-list li {
  padding: 0.45rem 0 0.45rem 1.6rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Demo / App */
.app-shell { padding: 2rem 0 3.5rem; background: var(--wash); min-height: 70vh; }
.app-layout {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .app-layout { grid-template-columns: 1fr 1fr; align-items: start; }
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.panel h2 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.panel-lead {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.form-row .hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}
input[type="text"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea { min-height: 120px; resize: vertical; }
.tone-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tone-pills label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
  background: var(--paper);
}
.tone-pills input { accent-color: var(--brand); }
.tone-pills label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.flag-banner {
  display: none;
  background: var(--warn-soft);
  border: 1px solid #e8d4a8;
  color: var(--warn);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.flag-banner.visible { display: block; }
.flag-banner strong { color: var(--ink); }

.draft-list { display: grid; gap: 1rem; }
.draft-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  background: var(--wash);
}
.draft-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}
.draft-item .num {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
}
.draft-body {
  font-size: 0.95rem;
  color: var(--ink);
  white-space: pre-wrap;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.status-bar {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
  min-height: 1.3em;
}
.status-bar.error { color: #b42318; }
.status-bar.ok { color: var(--accent); }

/* Legal pages */
.legal {
  padding: 2.5rem 0 4rem;
  max-width: 720px;
}
.legal h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.legal .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 1.75rem; }
.legal ul { color: var(--ink-soft); padding-left: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }

/* CTA band */
.cta-band {
  background: var(--brand);
  color: white;
  padding: 3rem 0;
  text-align: center;
}
.cta-band h2 { color: white; font-size: 1.75rem; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 32em; margin: 0 auto 1.25rem; }
.cta-band .btn-primary {
  background: white;
  color: var(--brand);
}
.cta-band .btn-primary:hover { background: var(--wash); color: var(--brand-dark); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand); }

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