/* contractor.ca — preview stage */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0b1629;
  --navy-mid: #1a2d4f;
  --red: #c8102e;
  --red-hover: #a50d26;
  --white: #ffffff;
  --off-white: #f5f7fa;
  --text: #1a1a2e;
  --muted: #6b7280;
  --glass-bg: rgba(255,255,255,0.12);
  --glass-border: rgba(255,255,255,0.2);
  --shadow: 0 8px 32px rgba(0,0,0,0.25);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--off-white);
  color: var(--text);
  line-height: 1.6;
}

/* ── Nav ─────────────────────────────────────────── */
.topnav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 24px;
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  background: linear-gradient(145deg, #0b1629 0%, #1a3355 45%, #0d2044 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(200,16,46,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Maple leaf background decoration */
.hero::after {
  content: '🍁';
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-size: 280px;
  opacity: 0.04;
  pointer-events: none;
  transform: rotate(-15deg);
}

.hero-content {
  max-width: 820px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  position: relative;
  z-index: 1;
}

/* ── Pill Nav ─────────────────────────────────────── */
.pill-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  border: 1.5px solid var(--glass-border);
  background: var(--glass-bg);
  color: rgba(255,255,255,0.8);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pill:hover {
  background: rgba(255,255,255,0.2);
  color: var(--white);
}

.pill.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* ── Hero Text ─────────────────────────────────────── */
.hero-text {
  text-align: center;
  color: var(--white);
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-text p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
}

/* ── Glass Form ─────────────────────────────────────── */
.glass-form {
  width: 100%;
  background: rgba(255,255,255,0.11);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: var(--white);
  padding: 11px 14px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
  font-family: inherit;
}

.form-group select option {
  background: var(--navy-mid);
  color: var(--white);
}

.form-group input::placeholder {
  color: rgba(255,255,255,0.35);
}

.form-group input:focus,
.form-group select:focus {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.12);
}

.submit-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  align-self: flex-end;
  letter-spacing: 0.01em;
}

.submit-btn:hover { background: var(--red-hover); }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled {
  background: rgba(200,16,46,0.5);
  cursor: not-allowed;
}

/* ── Form Success ─────────────────────────────────── */
.form-success {
  text-align: center;
  color: var(--white);
  padding: 24px 0;
}

.checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(34,197,94,0.2);
  border: 2px solid rgba(34,197,94,0.5);
  border-radius: 50%;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.form-success h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-success p { color: rgba(255,255,255,0.75); }

/* ── Trust Bar ─────────────────────────────────────── */
.trust-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Modal ─────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.modal-box h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.modal-box p {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

#waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#waitlist-form input[type="email"] {
  border: 1.5px solid #d1d5db;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  color: var(--text);
  width: 100%;
}

#waitlist-form input[type="email"]:focus { border-color: var(--navy); }

#waitlist-form button {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

#waitlist-success {
  background: #dcfce7;
  color: #166534;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-weight: 600;
  text-align: center;
}

/* ── Rebates Banner ─────────────────────────────────── */
.rebates-banner {
  background: linear-gradient(90deg, #0b1629, #1a3355);
  color: var(--white);
  padding: 48px 24px;
}

.rebates-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.rebates-banner h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.rebates-banner p {
  color: rgba(255,255,255,0.75);
  max-width: 540px;
}

.btn-secondary {
  display: inline-block;
  border: 2px solid rgba(255,255,255,0.4);
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* ── How It Works ─────────────────────────────────── */
.how-it-works {
  padding: 80px 24px;
  background: var(--off-white);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
}

.how-it-works h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  color: var(--text);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.step {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  text-align: center;
}

.step-num {
  width: 48px; height: 48px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 auto 16px;
}

.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* ── Footer ─────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 40px 24px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
}

.footer-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-legal {
  font-size: 0.8rem;
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

/* ── Rebates Page ─────────────────────────────────── */
.page-header {
  background: linear-gradient(145deg, #0b1629, #1a3355);
  color: var(--white);
  padding: 120px 24px 60px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-header p {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  max-width: 580px;
  margin: 0 auto;
}

.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
}

.rebate-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border-left: 4px solid var(--red);
}

.rebate-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.rebate-amount {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.rebate-amount.unknown {
  background: #fef9c3;
  color: #854d0e;
}

.rebate-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

.rebate-card a {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
}

.rebate-card .source {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.disclaimer {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.9rem;
  color: #92400e;
  margin-bottom: 32px;
}

/* ── Privacy Page ─────────────────────────────────── */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px;
}

.legal-content h2 { font-size: 1.3rem; font-weight: 700; margin: 32px 0 12px; color: var(--text); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--muted); margin-bottom: 14px; font-size: 0.95rem; }
.legal-content ul { color: var(--muted); padding-left: 20px; margin-bottom: 14px; }
.legal-content ul li { margin-bottom: 6px; font-size: 0.95rem; }
.legal-content a { color: var(--navy); }

/* ── Error Alert ─────────────────────────────────── */
.form-error {
  background: #fee2e2;
  border: 1px solid #f87171;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #991b1b;
  margin-top: -4px;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 100px 16px 60px; }
  .glass-form { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .rebates-banner-inner { flex-direction: column; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .submit-btn { width: 100%; text-align: center; }
}
