:root {
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-text: #1a1d24;
  --color-text-muted: #5b6270;
  --color-border: #e2e5ea;
  --color-accent: #1f6feb;
  --color-accent-dark: #17539c;
  --color-locked: #9aa1ad;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 24, 32, 0.08), 0 1px 2px rgba(20, 24, 32, 0.06);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.site-header .wrap {
  padding: 16px 20px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.logo-mark {
  color: var(--color-accent);
  flex-shrink: 0;
}
.radar-sweep {
  transform-origin: 16px 16px;
  animation: radar-spin 3.5s linear infinite;
}
@keyframes radar-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .radar-sweep {
    animation: none;
  }
}

/* Hero */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.subhead {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 24px;
}

.service-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}
.badge {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.personalized-banner {
  max-width: 480px;
  margin: 0 auto 16px;
  background: #eaf2ff;
  border: 1px solid #cfe0fb;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.9rem;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.address-form {
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
}
.address-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.address-form-row {
  display: flex;
  gap: 8px;
}
.address-form input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
}
.address-form button,
.cta-primary {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.address-form button:hover,
.cta-primary:hover {
  background: var(--color-accent-dark);
}
.field-error {
  color: #b3261e;
  font-size: 0.85rem;
  margin: 8px 0 0;
}

/* How it works */
.how-it-works {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 40px 0;
}
.how-it-works h2 {
  text-align: center;
  margin-top: 0;
}
.how-it-works ol {
  max-width: 640px;
  margin: 24px auto 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
}
.footnote {
  max-width: 640px;
  margin: 20px auto 0;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* Results */
.results {
  padding: 40px 0 60px;
}
.results h2 {
  margin-bottom: 4px;
}
.results-subhead {
  color: var(--color-text-muted);
  margin-top: 0;
  margin-bottom: 20px;
}
.results .cta-primary {
  display: block;
  margin: 0 0 16px;
  width: 100%;
}

.shop-list-header,
.shop-row {
  display: grid;
  grid-template-columns: 2fr 0.8fr 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
}
.shop-list-header {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}
.shop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.shop-row {
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}
.shop-row:first-child {
  border-top: none;
}
.col-name {
  display: flex;
  flex-direction: column;
}
.shop-address {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.col-distance {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.col-price {
  text-align: center;
}
.locked-price {
  background: #eef0f3;
  color: var(--color-locked);
  border-radius: 6px;
  padding: 6px 4px;
  font-weight: 600;
  filter: blur(3px);
  user-select: none;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 32, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}
.modal {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow);
}
.modal h2 {
  margin-top: 0;
}
.modal #waitlist-form {
  text-align: left;
  margin-top: 16px;
}
.modal #waitlist-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.modal #waitlist-form .address-form-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
}
.modal #confirmation-close {
  margin-top: 16px;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.modal #confirmation-close:hover {
  background: var(--color-bg);
}
#waitlist-success p {
  margin: 0;
}

/* Visually hidden but still functional — used for the Netlify Forms
   honeypot field, which needs to stay in the accessibility tree/DOM (not
   display:none) to work as a bot trap. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 20px 0;
}
.site-footer p {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-align: center;
  margin: 0;
}

/* Mobile */
@media (max-width: 640px) {
  .shop-list-header {
    display: none;
  }
  .shop-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .shop-row .col-name {
    flex: 1 1 100%;
  }
  .shop-row .col-distance {
    flex: 1 1 100%;
  }
  .shop-row .col-price {
    flex: 1 1 calc(33.333% - 8px);
  }
  .address-form-row {
    flex-direction: column;
  }
}
