/* The Quote Engine — landing + widget styles */

:root {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 4px 6px rgba(15, 23, 42, 0.04), 0 20px 40px rgba(15, 23, 42, 0.08);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav-links {
  display: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-secondary:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
}

.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 36ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 1.75rem;
}

.hero-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.hero-card-text {
  margin: 0.5rem 0 1.25rem;
  font-size: 1rem;
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-stats strong {
  font-size: 0.9375rem;
}

.hero-stats span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: #f1f5f9;
}

.section-head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.75rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.step {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.step h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
}

.step p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Features */
.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.feature-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Quote engine wrapper */
.quote-engine-wrap {
  max-width: 480px;
  margin: 0 auto;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.quote-fallback {
  margin: 0;
  padding: 1.25rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.quote-fallback code {
  font-size: 0.8125rem;
  background: #f1f5f9;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial {
  margin: 0;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.testimonial p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text);
}

.testimonial cite {
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Use cases */
.use-case-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .use-case-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.use-case {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.use-case h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
}

.use-case p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* CTA */
.cta-section {
  padding-bottom: 5rem;
}

.cta-box {
  text-align: center;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.cta-box h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
}

.cta-box > p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--bg-elevated);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}

.footer-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Quote Engine component */
.quote-engine {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: visible;
}

.quote-engine__header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
}

.quote-engine__header h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
}

.quote-engine__header p {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.quote-engine__hint {
  margin: 0.75rem 0 0 !important;
  font-size: 0.8125rem !important;
  line-height: 1.45;
}

.quote-engine__hint code {
  font-size: 0.75rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.quote-engine__hint--warn {
  color: #92400e !important;
  background: #fffbeb;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid #fde68a;
}

.quote-engine__hint--info {
  color: #1e3a5f !important;
  background: #eff6ff;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid #bfdbfe;
}

.quote-engine__status {
  margin: 0 0 1rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.quote-engine__status--error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

/* Google Places (legacy) — custom list used instead */
.pac-container {
  z-index: 10050 !important;
  font-family: var(--font) !important;
}

/* Custom Places Autocomplete list (AutocompleteService) */
.field--prediction {
  position: relative;
  z-index: 1;
}

.field--prediction:focus-within {
  z-index: 5;
}

.prediction-field {
  position: relative;
}

.prediction-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  max-height: min(280px, 45vh);
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 10060;
}

.prediction-list li {
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  line-height: 1.35;
  cursor: pointer;
  color: var(--text);
}

.prediction-list li:hover,
.prediction-list li.prediction-list__item--active {
  background: var(--accent-soft);
}

.quote-engine__body {
  padding: 1.5rem;
}

.quote-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.quote-form .field {
  margin-bottom: 1rem;
}

.quote-form input,
.quote-form select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.quote-form input:focus,
.quote-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.quote-result {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  border: 1px solid #bfdbfe;
}

.quote-result__price {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.quote-breakdown {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.quote-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}

.quote-breakdown li:last-child {
  border-bottom: none;
}

.quote-breakdown .total {
  font-weight: 600;
  color: var(--text);
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(37, 99, 235, 0.2);
  border-bottom: none;
}

.quote-actions {
  margin-top: 1rem;
}

.lead-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.lead-panel h4 {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
}

.lead-success {
  padding: 1rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: #065f46;
}

.lead-success[hidden] {
  display: none;
}

/* Sections use .reveal for optional future motion — do not hide by default (blank page if JS blocked) */
