:root {
  --accent: #001E50;
  --accent-light: #00b0f0;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #16181d;
  --text-dim: #5b6270;
  --border: #e2e5ea;
  --error: #c0392b;
  --whatsapp: #25d366;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.hero-banner {
  max-width: 520px;
  margin: 0 auto;
  line-height: 0;
}

.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-banner.is-compact {
  display: none;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.progress .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.progress .dot.done { background: var(--accent-light); }
.progress .dot.current { background: var(--accent); transform: scale(1.3); }

.screen { display: none; }
.screen.active { display: block; animation: fade-in 0.18s ease; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 1.35rem;
  margin: 4px 0 18px;
  line-height: 1.25;
}

.back-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 8px 0;
  margin-bottom: 4px;
  cursor: pointer;
}

.brand-grid, .model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.brand-card {
  border: none;
  border-radius: var(--radius);
  padding: 28px 12px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.brand-card small {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 8px;
}

.brand-logo {
  max-width: 72%;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.model-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 64px;
  color: var(--text);
}

.model-card:active { background: var(--bg); }

.selection-chip {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.field {
  margin-bottom: 16px;
}

.field label, fieldset.field legend {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dim);
  padding: 0;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"] {
  width: 100%;
  padding: 14px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
}

.field input:focus {
  outline: 2px solid var(--accent-light);
  outline-offset: 1px;
}

.phone-row {
  display: flex;
  gap: 8px;
}

.phone-row select {
  flex: 0 0 auto;
  width: 92px;
  padding: 14px 6px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
}

.phone-row input[type="tel"] {
  flex: 1 1 auto;
  min-width: 0;
}

.phone-row select:focus {
  outline: 2px solid var(--accent-light);
  outline-offset: 1px;
}

fieldset.field {
  border: none;
  padding: 0;
  margin: 0 0 16px;
}

.chip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-options label {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
}

.chip-options input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-options label:has(input:checked),
.chip-options label.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 18px 0;
  line-height: 1.4;
}

.consent input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn {
  display: block;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-block { width: 100%; }

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

.btn-primary:disabled {
  opacity: 0.6;
}

.btn-secondary {
  background: transparent;
  color: var(--text-dim);
  margin-top: 12px;
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  margin-bottom: 10px;
}

.form-error {
  color: var(--error);
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: 0 0 10px;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 18px;
}

#screen-success h1 { text-align: center; }
.success-text {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.offline-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: #fff3cd;
  color: #7a5b00;
  border: 1px solid #ffe08a;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .wrap { padding-top: 32px; }
  .model-grid { grid-template-columns: 1fr 1fr 1fr; }
}
