/* ============================================================
   PoolMate — landing page styles (mobile-first, no dependencies)
   ============================================================ */

:root {
  --primary:        #0D9488;
  --primary-dark:   #0B7268;
  --primary-darker: #085850;
  --primary-soft:   #CCF1EA;
  --accent:       #F59E0B;
  --accent-soft:  #FEF3C7;
  --ink:          #123832;
  --body:         #46605A;
  --bg:           #FFFFFF;
  --bg-tint:      #F0FBF7;
  --bg-deep:      #0F3D36;
  --border:       #DCEBE6;
  --card:         #FFFFFF;
  --error:        #DC2626;
  --success:      #16A34A;
  --whatsapp:       #14793A;
  --whatsapp-dark:  #0F5E2D;
  --shadow:       0 2px 8px rgba(18, 56, 50, 0.06);
  --shadow-lg:    0 12px 32px rgba(18, 56, 50, 0.1);
  --radius:       16px;
  --radius-btn:   12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Noto Sans", Ubuntu, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- reset / base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Anchor jumps (#waitlist etc.) must land clear of the sticky header. */
[id] { scroll-margin-top: 76px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

a { color: var(--primary-dark); }

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  flex: none;
}
.icon-xl { width: 56px; height: 56px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--primary-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- layout ---------- */

.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 20px;
}
.container.narrow { max-width: 720px; }

.section { padding-block: clamp(56px, 10vw, 96px); }

.section-title {
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.75em;
}

.section-sub {
  font-size: 1.0625rem;
  max-width: 46ch;
}

/* ---------- buttons, pills, chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 26px;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, transform 0.12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary-dark);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-darker); }

.btn-secondary {
  background: var(--bg);
  color: var(--primary-dark);
  border-color: var(--primary);
}
.btn-secondary:hover { background: var(--bg-tint); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
}
.btn-whatsapp:hover { background: var(--whatsapp-dark); }
.btn-whatsapp .icon { color: #fff; }

.btn-sm { min-height: 44px; padding: 6px 18px; font-size: 0.9375rem; }
.btn-block { width: 100%; }

.btn[disabled] { opacity: 0.65; cursor: default; }

.pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #7C4A03;
  font-size: 0.875rem;
  font-weight: 600;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}
.chip-static {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.brand-mark { width: 30px; height: 30px; }
.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(40px, 8vw, 88px);
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--bg-tint), transparent 65%),
    var(--bg);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
.hero-title {
  font-size: clamp(2rem, 6.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 18px 0 14px;
}
.hero-title em {
  font-style: normal;
  color: var(--primary);
}
.hero-sub {
  font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
  max-width: 50ch;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.hero-visual { max-width: 640px; margin-inline: auto; }
.hero-art { display: block; width: 100%; height: auto; }

@media (min-width: 900px) {
  .container { padding-inline: 32px; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; }
}

/* hero animations */
@media (prefers-reduced-motion: no-preference) {
  #routePath {
    animation: route-dash 4s linear infinite;
  }
  @keyframes route-dash {
    to { stroke-dashoffset: -184; }
  }
  .hero-car {
    animation: car-bob 2.6s ease-in-out infinite;
  }
  @keyframes car-bob {
    50% { transform: translateY(-3px); }
  }
  .hero-coin {
    animation: coin-float 3.4s ease-in-out infinite;
  }
  @keyframes coin-float {
    50% { transform: translateY(-10px); }
  }
}

/* ---------- how it works ---------- */

.how { background: var(--bg); }
.how-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 860px) {
  .how-grid { grid-template-columns: 1fr 1fr; }
}
.how-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}
.how-role {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1875rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.how-role .icon { color: var(--primary); width: 26px; height: 26px; }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.step {
  display: flex;
  gap: 14px;
  counter-increment: step;
}
.step-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.step-icon::after {
  content: counter(step);
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}
.step h4 { font-size: 1.0313rem; margin-bottom: 2px; }
.step p { font-size: 0.9375rem; margin: 0; }

/* ---------- positioning band ---------- */

.positioning { background: var(--bg-tint); }
.pos-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}
@media (min-width: 900px) {
  .pos-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; }
}
.pos-art { display: block; width: 100%; max-width: 460px; height: auto; margin-inline: auto; }

.check-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.check-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500;
  color: var(--ink);
}
.check-list .icon {
  color: var(--primary);
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

/* ---------- perks ---------- */

.perk-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.perk-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.perk-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.perk-art { width: 72px; height: 72px; margin-bottom: 12px; }
.perk-card h3 { font-size: 1.125rem; margin-bottom: 6px; }
.perk-card p { font-size: 0.9375rem; margin: 0; }
.perk-tag {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #7C4A03;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- cities ---------- */

.cities { background: var(--bg-tint); }
.city-grid {
  display: grid;
  gap: 22px;
}
@media (min-width: 760px) {
  .city-grid { grid-template-columns: 1fr 1fr; }
}
.city-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 30px);
}
.city-art {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin-bottom: 16px;
}
.city-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.city-card p { font-size: 0.9688rem; margin: 0; }
.cities-other {
  margin-top: 26px;
  text-align: center;
  font-size: 1rem;
  color: var(--ink);
}

/* ---------- waitlist form ---------- */

.waitlist { background: var(--bg); }
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: clamp(22px, 5vw, 38px);
  margin-top: 8px;
}

.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 26px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-tint);
}
.role-option { position: relative; }
.role-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.role-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 8px 6px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--body);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.role-face .icon { width: 22px; height: 22px; }
.role-option input:checked + .role-face {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(18, 56, 50, 0.12);
}
.role-option input:focus-visible + .role-face {
  outline: 3px solid var(--primary-dark);
  outline-offset: 2px;
}
/* Keep "Car owner" on one line inside the ~110px columns of tiny phones */
@media (max-width: 360px) {
  .role-face { font-size: 0.875rem; gap: 6px; }
  .role-face .icon { width: 18px; height: 18px; }
}

.field { margin-bottom: 18px; }
.field > label,
.field > legend {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
  padding: 0;
}
.label-soft { font-weight: 400; color: var(--body); }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.field input[aria-invalid="true"] { border-color: var(--error); }
.field input::placeholder { color: #5F7A73; }

.input-adorned {
  display: flex;
  align-items: stretch;
}
.input-adorned .adorn {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: var(--bg-tint);
  font-weight: 600;
  color: var(--ink);
}
.input-adorned input { border-radius: 0 10px 10px 0; }

.field-hint {
  margin: 7px 0 0;
  font-size: 0.8125rem;
  color: var(--body);
}

/* progressive disclosure: phone + city are enough, everything else is
   tucked behind this panel and stays optional once opened */
.more-details {
  margin: 0 0 18px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  background: var(--bg-tint);
}
.more-details[open] {
  border-style: solid;
  background: var(--bg);
}
.more-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  list-style: none;
}
.more-summary::-webkit-details-marker { display: none; }
.more-summary::before {
  content: "+";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}
.more-details[open] .more-summary::before { content: "–"; }
.more-summary:hover { color: var(--ink); }
.more-body {
  padding: 2px 16px 16px;
  border-top: 1px solid var(--border);
  margin-top: -2px;
}
.more-body .role-toggle { margin-top: 18px; }
.more-body > .field:last-child { margin-bottom: 0; }

fieldset.field {
  border: none;
  margin-inline: 0;
  padding: 0;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip { position: relative; }
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--body);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip input:checked + span {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}
.chip input:focus-visible + span {
  outline: 3px solid var(--primary-dark);
  outline-offset: 2px;
}

.field--owner { display: none; }
.form--owner .field--owner { display: block; }

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

.hp {
  position: absolute !important;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid #FECACA;
  border-radius: 10px;
  background: #FEF2F2;
  color: #991B1B;
  font-size: 0.9375rem;
}
.form-error p { margin: 0; }
.form-error a { color: #991B1B; font-weight: 600; }

.form-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--body);
}

.form-success {
  text-align: center;
  padding: 18px 6px;
}
.success-icon { color: var(--success); }
.form-success h3 { font-size: 1.5rem; margin: 12px 0 8px; }
.form-success p { max-width: 42ch; margin-inline: auto; }
.form-success .btn { margin-top: 18px; }

/* ---------- faq ---------- */

.faq { background: var(--bg-tint); }
.faq-list {
  display: grid;
  gap: 10px;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
}
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 48px 16px 18px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--primary);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}
.faq-item summary .icon {
  color: var(--primary);
  width: 22px;
  height: 22px;
}
.faq-item p {
  padding: 0 18px 18px 52px;
  margin: 0;
  font-size: 0.9688rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--bg-deep);
  color: #C9E5DD;
  padding-block: 48px;
}
.footer-inner { display: grid; gap: 14px; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand .brand-name { color: #fff; }
.footer-tagline { color: #E4F4EF; font-weight: 500; margin: 0; }
.footer-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 4px 0;
  padding: 0;
}
.footer-cities li {
  padding: 4px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.footer-fine {
  font-size: 0.8125rem;
  opacity: 0.75;
  margin: 0;
  max-width: 64ch;
}

/* ---------- scroll reveals ---------- */

html:not(.no-js) .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html:not(.no-js) .reveal.is-visible {
  opacity: 1;
  transform: none;
}
html:not(.no-js) .reveal.d1 { transition-delay: 0.08s; }
html:not(.no-js) .reveal.d2 { transition-delay: 0.16s; }
html:not(.no-js) .reveal.d3 { transition-delay: 0.24s; }
html:not(.no-js) .reveal.d4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html:not(.no-js) .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- get the app ---------- */

.get-app { background: var(--bg-tint); }
.get-app .section-sub { max-width: 46ch; }
.app-note {
  font-size: 0.875rem;
  color: var(--body);
  max-width: 52ch;
  margin: 14px auto 0;
}

/* ---------- legal pages (privacy, deletion) ---------- */

.legal h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.legal h2 {
  font-size: 1.1875rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.4em;
}
.legal-meta { font-size: 0.875rem; color: var(--body); margin-bottom: 2em; }
.legal ul, .legal ol { padding-left: 1.25em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.5em; }
.legal a { font-weight: 600; }
.site-footer a { color: #A7D9CE; }
