/* ============================================================
   Window Specialists USA — Design System v2
   Modern, conversion-focused, mobile-first
   Footer intentionally below the fold
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --blue-900: #0d1b3e;
  --blue-800: #0f2356;
  --blue-700: #1a3a7c;
  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;

  --gold-600: #d97706;
  --gold-500: #f59e0b;
  --gold-400: #fbbf24;
  --gold-100: #fef3c7;
  --gold-50: #fffbeb;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;

  --white: #ffffff;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --success: #059669;
  --success-bg: #ecfdf5;

  --radius-md: 0.625rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.14), 0 4px 16px rgba(0, 0, 0, 0.06);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--slate-900);
  background-color: #0c1526;
  background-image:
    radial-gradient(ellipse 140% 70% at 55% -15%, rgba(37, 99, 235, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at -10% 90%, rgba(245, 158, 11, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 110% 60%, rgba(8, 12, 30, 0.60) 0%, transparent 50%);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--blue-400);
}

input,
select,
button,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.site-header {
  flex-shrink: 0;
  padding: 0.875rem 1.25rem 0.625rem;
  text-align: center;
}

.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.header-logo-icon {
  width: 1.875rem;
  height: 1.875rem;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
  flex-shrink: 0;
}

.header-logo-icon svg {
  width: 1rem;
  height: 1rem;
}

.header-logo-text {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: -0.01em;
}

.site-header h1 {
  font-size: clamp(1.0625rem, 4vw, 1.375rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}

.header-sub {
  font-size: 0.78125rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 36ch;
  margin: 0 auto;
  line-height: 1.5;
}

.trust-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem 1rem;
  flex-wrap: wrap;
  padding: 0.3rem 1rem 0.5rem;
}

.trust-bar-item {
  display: flex;
  align-items: center;
  gap: 0.275rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.trust-bar-item svg {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  opacity: 0.65;
}

.trust-bar-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.page-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem 1rem;
  min-height: 0;
}

.main-shell {
  width: 100%;
  max-width: 440px;
}

.alert {
  width: 100%;
  margin: 0 auto 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
}

.alert.error {
  background: #fff1f2;
  border: 1px solid #fda4af;
  color: #be123c;
}

.alert.success {
  background: var(--success-bg);
  border: 1px solid #86efac;
  color: #047857;
}

.form {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  outline: 1px solid rgba(255, 255, 255, 0.10);
}

.progress-header {
  padding: 0.875rem 1.375rem 0.75rem;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4375rem;
}

.progress-label {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.progress-step-count {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--blue-600);
  letter-spacing: 0.02em;
}

.progress-track {
  height: 3px;
  background: var(--slate-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-500), var(--gold-500));
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease-out);
  width: 0%;
}

.form-body {
  padding: 1.25rem 1.375rem 1.375rem;
}

.form-step {
  display: none;
  animation: stepIn 0.25s var(--ease-out) forwards;
}

.form-step.is-active {
  display: block;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.step-question {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.3;
  margin-bottom: 1.125rem;
  letter-spacing: -0.015em;
}

.step-question-sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--slate-500);
  margin-top: 0.2rem;
  line-height: 1.45;
}

.input-group {
  margin-bottom: 0.875rem;
}

.input-group > label.field-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3125rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  display: block;
  width: 100%;
  padding: 0.6875rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--slate-900);
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 100ms, box-shadow 100ms;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

input::placeholder {
  color: var(--slate-400);
  font-weight: 400;
}

.input-group.has-error input,
.input-group.has-error select {
  border-color: var(--error);
  background: var(--error-bg);
}

.error-text {
  color: var(--error);
  font-size: 0.6875rem;
  font-weight: 500;
  min-height: 1rem;
  margin-top: 0.25rem;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
  margin-bottom: 1.125rem;
}

.choice-list.has-error .choice-item {
  border-color: var(--error);
}

.choice-item {
  position: relative;
}

.choice-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.choice-item-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.6875rem 0.875rem;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--white);
  transition: border-color 100ms, background 100ms, box-shadow 100ms, transform 70ms;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-800);
}

.choice-item-label:hover {
  border-color: var(--blue-400);
  background: var(--blue-50);
}

.choice-item-label:active {
  transform: scale(0.98);
}

.choice-item input[type="radio"]:checked + .choice-item-label {
  border-color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
  color: var(--blue-700);
}

.choice-indicator {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--slate-300);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 100ms;
}

.choice-item input[type="radio"]:checked + .choice-item-label .choice-indicator {
  border-color: var(--blue-500);
  background: var(--blue-500);
}

.choice-item input[type="radio"]:checked + .choice-item-label .choice-indicator::after {
  content: "";
  width: 0.3125rem;
  height: 0.3125rem;
  background: #fff;
  border-radius: var(--radius-full);
}

.ownership-toggle {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  padding: 0.6875rem 0.875rem;
  background: var(--blue-50);
  border: 1.5px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-bottom: 1.125rem;
  transition: background 100ms;
}

.ownership-toggle:hover {
  background: var(--blue-100);
}

.ownership-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--blue-600);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.ownership-toggle-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue-700);
  cursor: pointer;
  margin: 0;
}

.btns-group {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  align-items: center;
}

.btns-group.compact-top {
  margin-top: 0.5rem;
}

.btns-group.submit-row {
  margin-bottom: 0.625rem;
}

.btn-solo {
  display: block;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: background 100ms, box-shadow 100ms, transform 70ms;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-next {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.28), 0 3px 10px rgba(29, 78, 216, 0.16);
  width: 100%;
}

.btn-next:hover {
  background: var(--blue-700);
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.32), 0 5px 16px rgba(29, 78, 216, 0.20);
}

#btn-submit {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
  color: var(--slate-900);
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.28), 0 3px 12px rgba(217, 119, 6, 0.20);
  font-size: 0.9375rem;
  padding: 0.8125rem 1.125rem;
  width: 100%;
}

#btn-submit:hover {
  background: linear-gradient(135deg, var(--gold-500) 0%, #b45309 100%);
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.32), 0 5px 18px rgba(217, 119, 6, 0.26);
}

#btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-prev {
  background: transparent;
  color: var(--slate-400);
  border: 1.5px solid var(--slate-200);
  padding: 0.75rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  width: auto;
  box-shadow: none;
}

.btn-prev:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
  color: var(--slate-600);
}

.results-ready-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  background: linear-gradient(135deg, var(--gold-50), #fffdf5);
  border: 1.5px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  margin-bottom: 1.125rem;
}

.results-ready-text strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.125rem;
  letter-spacing: -0.01em;
}

.results-ready-text span {
  font-size: 0.75rem;
  color: var(--slate-500);
  line-height: 1.45;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3125rem;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--slate-400);
  letter-spacing: 0.01em;
}

.secure-badge svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: var(--success);
  flex-shrink: 0;
}

.tcpa-wrapper {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--slate-100);
}

.tcpa-copy {
  font-size: 0.625rem;
  line-height: 1.6;
  color: var(--slate-400);
  margin: 0;
}

.tcpa-copy a {
  color: var(--slate-500);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tcpa-copy a:hover {
  color: var(--blue-600);
}

footer {
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.40);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.30);
  font-size: 0.625rem;
  line-height: 1.7;
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
}

.footer-heading {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.terms {
  display: block;
  max-width: 600px;
  margin: 0 auto 1.125rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2rem 0.875rem;
}

.modal-button {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.625rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 100ms;
}

.modal-button:hover {
  color: rgba(255, 255, 255, 0.7);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1.25rem 1rem;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal[hidden] {
  display: none;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  position: relative;
  margin: auto;
  box-shadow: var(--shadow-xl);
}

.modal-content h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
  padding-right: 2rem;
  letter-spacing: -0.01em;
}

.modal-content p {
  font-size: 0.8125rem;
  color: var(--slate-500);
  line-height: 1.65;
  margin-bottom: 0.625rem;
}

.modal-content p:last-child {
  margin-bottom: 0;
}

.close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-100);
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  color: var(--slate-500);
  cursor: pointer;
  transition: background 100ms, color 100ms;
  line-height: 1;
}

.close:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

@media (min-width: 640px) {
  .site-header {
    padding: 1.375rem 2rem 0.875rem;
  }

  .site-header h1 {
    font-size: 1.75rem;
  }

  .header-sub {
    font-size: 0.875rem;
  }

  .trust-bar {
    padding: 0.4rem 2rem 0.7rem;
    gap: 0.2rem 1.75rem;
  }

  .trust-bar-item {
    font-size: 0.6875rem;
  }

  .page-main {
    padding: 0.75rem 2rem 1.25rem;
  }

  .form-body {
    padding: 1.5rem 1.75rem 1.75rem;
  }

  .progress-header {
    padding: 1rem 1.75rem 0.875rem;
  }

  footer {
    padding: 2.25rem 3rem 3rem;
  }
}

@media (max-width: 520px) {
  .name-row {
    grid-template-columns: 1fr;
  }

  .btns-group {
    grid-template-columns: 1fr;
  }

  .btn-prev {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
