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

:root {
  --blue:        #1a56db;
  --blue-dark:   #1245b5;
  --blue-light:  #e8f0fe;
  --black:       #111827;
  --text:        #374151;
  --muted:       #6b7280;
  --border:      #e5e7eb;
  --bg:          #f3f4f6;
  --white:       #ffffff;
  --green:       #059669;
  --green-bg:    #ecfdf5;
  --green-border:#a7f3d0;
  --red:         #dc2626;
  --red-bg:      #fef2f2;
  --red-border:  #fecaca;
  --radius:      10px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ── */
.site-header {
  background: var(--black);
  color: var(--white);
  padding: 1.25rem 0;
  border-bottom: 3px solid var(--blue);
}
.site-header .container { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.logo { font-size: 1.6rem; font-weight: 800; letter-spacing: -.5px; }
.logo-be   { color: var(--white); }
.logo-tech { color: var(--blue); }
.logo-network { color: #9ca3af; font-weight: 400; font-size: 1rem; }
.tagline { color: #9ca3af; font-size: .85rem; }

/* ── Main ── */
main.container { flex: 1; padding-top: 2rem; padding-bottom: 3rem; }

.hero { text-align: center; margin-bottom: 2rem; }
.hero h1 { font-size: 2rem; font-weight: 700; color: var(--black); }
.hero-sub { color: var(--muted); margin-top: .5rem; }

/* ── Card ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

/* ── Steps ── */
.steps {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}
.step {
  display: flex;
  align-items: center;
  gap: .5rem;
  opacity: .35;
  transition: opacity .3s;
}
.step.active { opacity: 1; }
.step.done   { opacity: .7; }
.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  transition: background .3s, color .3s;
}
.step.active .step-num { background: var(--blue); color: var(--white); }
.step.done .step-num   { background: var(--green); color: var(--white); }
.step-label { font-size: .85rem; font-weight: 600; color: var(--black); white-space: nowrap; }
.step-divider { flex: 1; height: 2px; background: var(--border); margin: 0 .5rem; min-width: 16px; }

/* ── Form fields ── */
.form-fields { display: flex; flex-direction: column; gap: 1.25rem; }

.field-group label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: .4rem;
}
.optional { font-weight: 400; color: var(--muted); }

.field-group.disabled label { color: var(--muted); }
.field-group.hidden { display: none; }

.autocomplete-wrap { position: relative; }

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  padding: .625rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 1rem;
  color: var(--black);
  background: var(--white);
  outline: none;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 80px; }
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}
input[type="text"]:disabled {
  background: var(--bg);
  cursor: not-allowed;
  color: var(--muted);
}

/* Spinner */
.spinner {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}
.spinner.active { display: block; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}
.dropdown.open { display: block; }
.dropdown li {
  padding: .6rem .9rem;
  cursor: pointer;
  font-size: .9rem;
  border-bottom: 1px solid var(--bg);
  transition: background .15s;
}
.dropdown li:last-child { border-bottom: none; }
.dropdown li:hover, .dropdown li.highlighted { background: var(--blue-light); color: var(--blue); }
.dropdown .drop-sub { font-size: .75rem; color: var(--muted); }

/* Select */
.select-wrap { position: relative; }
.select-wrap .spinner { right: 2rem; }
select {
  width: 100%;
  padding: .625rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 1rem;
  color: var(--black);
  background: var(--white);
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.5rem;
}
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}

/* Check button */
.btn-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 2rem;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 7px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, opacity .2s;
  margin-top: .5rem;
}
.btn-check svg { width: 18px; height: 18px; }
.btn-check:hover:not(:disabled) { background: var(--blue-dark); }
.btn-check:disabled { opacity: .45; cursor: not-allowed; }
.btn-check.loading { opacity: .7; pointer-events: none; }

/* ── Results ── */
.result-card { border-left: 4px solid var(--blue); }
.result-card h2 { font-size: 1.05rem; color: var(--black); font-weight: 600; }

.section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.section-title svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--blue); }

.tech-grid {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 2rem;
}

.tech-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.tech-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.tech-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -.3px;
}
.tech-max-speed {
  font-size: .9rem;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}
.tech-desc {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.5;
}

.tech-profiles {
  margin-top: .35rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  border-top: 1px solid var(--bg);
  padding-top: .45rem;
}
.align-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .82rem;
}
.align-label  { color: var(--muted); }
.align-speeds { font-weight: 700; color: var(--black); }

.no-coverage {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.no-coverage svg { width: 48px; height: 48px; margin-bottom: 1rem; }

.btn-reset {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding: .6rem 1.25rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: border-color .2s, color .2s;
}
.btn-reset svg { width: 16px; height: 16px; }
.btn-reset:hover { border-color: var(--blue); color: var(--blue); }

/* ── Toast ── */
.error-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: var(--white);
  padding: .75rem 1.5rem;
  border-radius: 7px;
  font-size: .9rem;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

/* ── Footer ── */
.site-footer {
  background: var(--black);
  color: #6b7280;
  text-align: center;
  padding: 1.25rem 0;
  font-size: .8rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .steps { flex-wrap: nowrap; overflow-x: auto; }
  .hero h1 { font-size: 1.5rem; }
  .card { padding: 1.25rem; }
  .btn-check { width: 100%; }
}

.hidden { display: none !important; }

/* ── CTA card button ── */
.tech-available {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .6rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--green);
}
.tech-available svg { width: 18px; height: 18px; flex-shrink: 0; stroke: var(--green); }

.btn-interest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  margin-top: .6rem;
  padding: .65rem 1rem;
  background: var(--green);
  border: none;
  border-radius: 7px;
  color: var(--white);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-interest svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-interest:hover { background: #047857; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1rem;
  animation: fadeIn .2s ease;
}
.modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  padding: 2rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border: none; background: transparent;
  font-size: 1.4rem; line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--bg); color: var(--black); }
.modal-title { font-size: 1.25rem; font-weight: 700; color: var(--black); margin-bottom: .5rem; }
.modal-sub { font-size: .875rem; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.5; }
.modal-sub strong { color: var(--black); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.required { color: var(--red); font-weight: 700; }

.lead-success {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--green);
}
.lead-success svg { width: 56px; height: 56px; margin-bottom: 1rem; stroke: var(--green); }
.lead-success p { font-size: 1rem; font-weight: 600; color: var(--black); }

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 1.25rem; }
}
