/* ---------------------------------------------------------------------------
 * Garage Door Pros — landing page styles.
 * Color system + typography locked per BUILD.md §11.1 / §11.2.
 * ------------------------------------------------------------------------- */

:root {
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F9FC;
  --color-text: #0F172A;
  --color-text-soft: #475569;
  --color-border: #E2E8F0;

  --color-primary: #1E40AF;
  --color-primary-dk: #1E3A8A;
  --color-accent: #EA580C;
  --color-accent-dk: #C2410C;
  --color-accent-hv: #F97316;

  --color-success: #059669;
  --color-danger: #DC2626;
  --color-star: #F59E0B;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-card-hover: 0 2px 6px rgba(15, 23, 42, 0.08), 0 16px 40px rgba(15, 23, 42, 0.08);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  color: var(--color-text);
  line-height: 1.2;
}

h1 { font-size: 44px; font-weight: 800; line-height: 1.15; }
h2 { font-size: 32px; font-weight: 700; }
h3 { font-size: 22px; font-weight: 600; }
p  { margin: 0 0 1em; }

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

button { font: inherit; }

/* Container ------------------------------------------------------------ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header --------------------------------------------------------------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 40px;
  width: auto;
}

.header-location {
  margin: 0;
  color: var(--color-text-soft);
  font-weight: 500;
  font-size: 15px;
  text-align: center;
}

.header-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.header-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  color: var(--color-primary);
}

.header-phone-meta {
  font-size: 12px;
  color: var(--color-text-soft);
}

/* Hero ----------------------------------------------------------------- */
#hero {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--color-bg-alt) 100%);
  padding: 48px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.hero-headline {
  color: var(--color-text);
  margin-bottom: 16px;
}

.hero-subheadline {
  font-size: 18px;
  color: var(--color-text-soft);
  margin-bottom: 20px;
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.hero-bullets li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 16px;
}

.hero-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-success);
  font-weight: 800;
}

.hero-alt-call {
  font-size: 15px;
  color: var(--color-text-soft);
}

/* Hero photo band --------------------------------------------------- */
.hero-photo-band {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin: 18px 0 18px;
}

.hero-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #E2E8F0;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-card);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-photo-main {
  aspect-ratio: 16 / 9;
}

.hero-photo-secondary {
  aspect-ratio: 4 / 3;
}

/* Form card ------------------------------------------------------------ */
.hero-right {
  position: sticky;
  top: 96px;
}

.lead-form {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.form-title {
  font-size: 22px;
  margin-bottom: 14px;
}

.form-error-banner {
  background: #FEE2E2;
  color: #7F1D1D;
  border: 1px solid #FCA5A5;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 12px;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--color-text);
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  background: #fff;
  color: var(--color-text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.field.has-error input,
.field.has-error select {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field-error {
  margin: 6px 0 0;
  color: var(--color-danger);
  font-size: 13px;
  font-weight: 500;
}

.btn-primary {
  display: inline-block;
  width: 100%;
  background: var(--color-accent);
  color: #fff;
  padding: 14px 20px;
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 120ms ease, transform 60ms ease, box-shadow 120ms ease;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-accent-hv);
  outline: none;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
  text-decoration: none;
}

.btn-primary:focus-visible {
  outline: 3px solid rgba(30, 64, 175, 0.35);
  outline-offset: 2px;
}

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

.btn-primary[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary-lg {
  width: auto;
  padding: 16px 28px;
  font-size: 18px;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-primary);
  padding: 14px 20px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.btn-secondary:hover { text-decoration: underline; }

.form-microcopy {
  margin: 10px 0 6px;
  font-size: 13px;
  color: var(--color-text-soft);
  text-align: center;
}

.form-alt-cta {
  margin: 0;
  font-size: 14px;
  text-align: center;
  color: var(--color-text-soft);
}

/* Trust strip ---------------------------------------------------------- */
#trust-strip {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
}

.trust-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-rating {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}

.trust-rating span { color: var(--color-star); margin-right: 4px; }

.trust-logos {
  display: flex;
  gap: 28px;
  align-items: center;
  filter: grayscale(100%);
  opacity: 0.7;
}

.trust-logo { height: 20px; width: auto; }

/* Sections shared ------------------------------------------------------- */
main section + section {
  padding: 56px 0;
}

#services,
#process,
#faq {
  background: var(--color-bg);
}

#reviews,
#guarantee,
#bottom-cta {
  background: var(--color-bg-alt);
}

.section-heading {
  text-align: center;
  margin-bottom: 6px;
}

.section-subheading {
  text-align: center;
  color: var(--color-text-soft);
  margin-bottom: 36px;
  font-size: 17px;
}

/* Services ------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.service-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.service-card h3 {
  color: var(--color-primary);
  margin-bottom: 8px;
}

.service-card p {
  margin: 0;
  color: var(--color-text-soft);
}

/* Reviews carousel ----------------------------------------------------- */
.reviews-carousel {
  position: relative;
  overflow: hidden;
  padding: 0 0 40px;
}

.reviews-track {
  display: flex;
  transition: transform 0.45s ease;
  will-change: transform;
}

.reviews-track .review-card {
  flex: 0 0 calc(100% / 3);
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}

.carousel-btn {
  position: absolute;
  top: calc(50% - 20px);
  transform: translateY(-50%);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--color-text);
  box-shadow: var(--shadow-card);
  padding: 0;
}

.carousel-btn:hover { background: var(--color-bg-alt); }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-dots {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 200ms;
}

.carousel-dot.active { background: var(--color-primary); }

.review-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 0;
  box-shadow: var(--shadow-card);
  transition: box-shadow 120ms ease;
}

.review-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.review-card blockquote {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--color-text);
  font-style: normal;
  line-height: 1.6;
}

.review-card figcaption {
  font-size: 14px;
  color: var(--color-text-soft);
  font-weight: 500;
}

/* Process -------------------------------------------------------------- */
.process-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.process-steps li {
  text-align: center;
  padding: 0 8px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 12px;
}

.process-steps h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.process-steps p {
  font-size: 14px;
  color: var(--color-text-soft);
  margin: 0;
}

/* Guarantee ------------------------------------------------------------ */
.guarantee-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: stretch;
  max-width: 820px;
  margin: 0 auto;
}

.guarantee-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.guarantee-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
}

.guarantee-item h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.guarantee-item p {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 15px;
}

/* FAQ ------------------------------------------------------------------ */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--color-bg);
}

.faq-item summary {
  padding: 14px 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 20px;
}

.faq-item[open] summary::after { content: '–'; }

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

.faq-item p {
  padding: 0 16px 16px;
  margin: 0;
  color: var(--color-text-soft);
}

/* Bottom CTA ----------------------------------------------------------- */
.bottom-cta-inner {
  text-align: center;
}

.bottom-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0 0;
}

/* Footer --------------------------------------------------------------- */
#site-footer {
  background: var(--color-primary-dk);
  color: #E2E8F0;
  padding: 32px 0;
  margin-top: 0;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}

#site-footer a {
  color: #fff;
  text-decoration: underline;
}

.footer-links { margin: 0; }
.footer-links span { margin: 0 8px; opacity: 0.5; }

.footer-meta {
  margin: 8px 0 0;
  opacity: 0.8;
  font-size: 14px;
}

/* Static pages + thank you -------------------------------------------- */
.static-inner,
.thank-you-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 0 48px;
}

.static-inner h1,
.thank-you-heading {
  margin-bottom: 18px;
}

.static-inner h2 {
  margin-top: 28px;
  font-size: 22px;
}

.static-updated {
  color: var(--color-text-soft);
  font-size: 14px;
  margin-bottom: 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.contact-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px;
}

.contact-card h2 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--color-primary);
}

.contact-card p { margin: 4px 0; font-size: 15px; }
.muted { color: var(--color-text-soft); font-size: 13px; }

.thank-you-inner {
  text-align: center;
}

.thank-you-body {
  font-size: 17px;
  color: var(--color-text-soft);
}

.thank-you-actions {
  margin-top: 24px;
}

/* Emergency banner CTA ------------------------------------------------- */
.hero-emergency {
  background: #FEF3C7;
  border-left: 4px solid var(--color-star);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.emergency-cta-link {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.emergency-cta-link:hover {
  background: var(--color-accent-dk);
  text-decoration: none;
}

/* Form price anchor ---------------------------------------------------- */
.form-price-anchor {
  font-size: 12px;
  color: var(--color-text-soft);
  text-align: center;
  margin: -4px 0 12px;
  line-height: 1.5;
}

.form-microcopy-24 {
  margin-top: 2px;
}

/* Service card icons, badge, CTA -------------------------------------- */
.service-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.service-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.service-card-cta {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

.service-card-cta:hover {
  color: var(--color-accent-dk);
  text-decoration: underline;
}

/* Review card enhancements -------------------------------------------- */
.review-stars {
  color: var(--color-star);
  font-size: 18px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #DBE3F6;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-meta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-author {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
}

.review-location {
  font-size: 12px;
  color: var(--color-text-soft);
}

/* Exit-intent popup ---------------------------------------------------- */
.exit-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.exit-popup-overlay[hidden] { display: none; }

.exit-popup {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 36px 32px 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.exit-popup-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 8px;
}

.exit-popup-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 20px;
  line-height: 1.25;
  text-align: center;
}

.exit-popup-field {
  margin-bottom: 14px;
}

.exit-popup-phone-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
  text-align: center;
}

.exit-popup-phone-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.exit-popup-cta-btn {
  width: 100%;
  font-size: 17px;
}

.exit-popup-dismiss {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--color-text-soft);
  cursor: pointer;
  text-decoration: underline;
}

.exit-popup-dismiss:hover { color: var(--color-text); }

/* Thank-you followup --------------------------------------------------- */
.ty-followup {
  margin-top: 36px;
  padding: 24px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
}

.ty-followup h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.ty-followup-sub {
  font-size: 14px;
  color: var(--color-text-soft);
  margin-bottom: 16px;
}

.ty-input-row {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}

.ty-issue-select {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--color-text);
}

.ty-issue-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.ty-issue-btn {
  flex-shrink: 0;
  width: auto;
  padding: 10px 20px;
  font-size: 15px;
}

.ty-issue-confirm {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-success);
  font-weight: 600;
}

/* Responsive fallback -------------------------------------------------- */
@media (max-width: 900px) {
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-right { position: static; }
  .hero-photo-band { grid-template-columns: 1fr; }
  .hero-photo-secondary { display: none; }
  .services-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .header-grid { grid-template-columns: auto auto; row-gap: 4px; }
  .header-location { grid-column: 1 / -1; text-align: left; order: 3; }
}

@media (max-width: 560px) {
  .process-steps { grid-template-columns: 1fr; }
  .trust-strip-inner { gap: 18px; }
  #hero { padding: 24px 0; }
  .btn-primary-lg { width: 100%; }
  .guarantee-grid { grid-template-columns: 1fr; max-width: 420px; }
  .reviews-track .review-card { flex: 0 0 100%; }
  .hero-emergency { flex-direction: column; align-items: flex-start; }
  .emergency-cta-link { width: 100%; text-align: center; padding: 12px 14px; }
  .exit-popup { padding: 28px 20px 20px; }
  .exit-popup-title { font-size: 20px; }
}
