/* ══════════════════════════════════════════
       CSS CUSTOM PROPERTIES — client theming
    ══════════════════════════════════════════ */
    :root {
      --primary: #1B5E9B;      /* Swift Roof Pros blue — overridden by JS BRAND */
      --accent:  #F2632B;      /* orange CTA */
      --text:    #1A1A1A;
      --muted:   #555;
      --bg:      #F7F8FA;
      --white:   #fff;
      --radius:  10px;
      --shadow:  0 2px 16px rgba(0,0,0,.10);
      --max:     640px;        /* single-column mobile-first max */
    }

    /* ══════════════════════════════════════════
       RESET + BASE
    ══════════════════════════════════════════ */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      font-family: 'Inter', system-ui, -apple-system, sans-serif;
      background: var(--bg);
      color: var(--text);
      font-size: 16px;
      line-height: 1.6;
      padding-bottom: 72px; /* clearance for sticky bar */
    }

    /* ══════════════════════════════════════════
       TOP BAR
    ══════════════════════════════════════════ */
    #top-bar {
      background: var(--primary);
      color: #fff;
      text-align: center;
      font-size: 13px;
      padding: 8px 16px;
      font-weight: 600;
      letter-spacing: .3px;
    }

    /* ══════════════════════════════════════════
       HEADER / LOGO
    ══════════════════════════════════════════ */
    header {
      background: #fff;
      border-bottom: 1px solid #e5e7eb;
      padding: 14px 20px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    #brand-logo {
      font-size: 20px;
      font-weight: 800;
      color: var(--primary);
      letter-spacing: -.5px;
    }
    #brand-logo span { color: var(--accent); }

    /* ══════════════════════════════════════════
       HERO
    ══════════════════════════════════════════ */
    #hero {
      position: relative;
      background: var(--primary);
      color: #fff;
      padding: 36px 20px 30px;
      text-align: center;
      overflow: hidden;
    }
    #hero-bg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: .22;
      z-index: 0;
    }
    #hero-inner { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; }
    #hero h1 {
      font-size: clamp(24px, 6vw, 34px);
      font-weight: 800;
      line-height: 1.18;
      margin-bottom: 12px;
      text-shadow: 0 1px 4px rgba(0,0,0,.3);
    }
    #hero-sub {
      font-size: 15px;
      line-height: 1.55;
      opacity: .93;
      margin-bottom: 20px;
    }
    /* Trust bar */
    #trust-bar {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: rgba(255,255,255,.12);
      border-radius: 30px;
      padding: 8px 16px;
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 22px;
      flex-wrap: wrap;
    }
    #trust-bar .stars { color: #FFD700; letter-spacing: 1px; }
    #trust-bar .sep { opacity: .5; }

    /* Hero bullets */
    #hero-bullets {
      list-style: none;
      text-align: left;
      display: inline-block;
      margin-bottom: 24px;
    }
    #hero-bullets li {
      font-size: 15px;
      font-weight: 600;
      padding: 5px 0;
    }
    #hero-bullets li::before {
      content: '✓ ';
      color: #4ADE80;
      font-weight: 800;
    }

    /* Primary CTA button */
    .cta-btn {
      display: inline-block;
      background: var(--accent);
      color: #fff;
      font-size: 17px;
      font-weight: 800;
      padding: 16px 36px;
      border-radius: 50px;
      border: none;
      cursor: pointer;
      text-decoration: none;
      box-shadow: 0 4px 20px rgba(242,99,43,.45);
      transition: transform .15s, box-shadow .15s;
      letter-spacing: .2px;
      width: 100%;
      max-width: 380px;
      text-align: center;
    }
    .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 26px rgba(242,99,43,.55); }
    .cta-btn:active { transform: translateY(0); }
    #hero-urgency {
      margin-top: 10px;
      font-size: 12px;
      opacity: .8;
    }

    /* ══════════════════════════════════════════
       SECTION WRAPPER
    ══════════════════════════════════════════ */
    .section {
      max-width: var(--max);
      margin: 0 auto;
      padding: 28px 20px;
    }
    .section-title {
      font-size: 19px;
      font-weight: 800;
      color: var(--primary);
      margin-bottom: 16px;
      text-align: center;
    }

    /* ══════════════════════════════════════════
       MULTI-STEP FORM
    ══════════════════════════════════════════ */
    #form-card {
      background: #fff;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
    }
    #form-header {
      background: var(--primary);
      color: #fff;
      padding: 18px 20px 14px;
      text-align: center;
    }
    #form-header h2 { font-size: 18px; font-weight: 800; }
    #form-header p { font-size: 13px; opacity: .85; margin-top: 4px; }

    /* Progress bar */
    #progress-wrap {
      background: #e5e7eb;
      height: 5px;
    }
    #progress-bar {
      height: 100%;
      background: var(--accent);
      width: 33%;
      transition: width .3s ease;
    }

    /* Steps */
    .form-step { padding: 24px 20px; display: none; }
    .form-step.active { display: block; }
    .step-label {
      font-size: 12px;
      color: var(--muted);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 12px;
    }
    .step-q {
      font-size: 17px;
      font-weight: 700;
      margin-bottom: 18px;
      line-height: 1.35;
    }

    /* Step 1 — type buttons */
    .type-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    .type-btn {
      border: 2px solid #d1d5db;
      background: #fff;
      border-radius: var(--radius);
      padding: 16px 10px;
      text-align: center;
      cursor: pointer;
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      transition: border-color .15s, background .15s;
      line-height: 1.3;
    }
    .type-btn .icon { font-size: 24px; display: block; margin-bottom: 6px; }
    .type-btn:hover, .type-btn.selected {
      border-color: var(--primary);
      background: #EEF4FB;
      color: var(--primary);
    }

    /* Step 2 — address */
    .field-group { margin-bottom: 14px; }
    .field-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
    .field-group input[type=text],
    .field-group input[type=tel],
    .field-group input[type=email] {
      width: 100%;
      border: 1.5px solid #d1d5db;
      border-radius: 8px;
      padding: 13px 14px;
      font-size: 16px; /* prevents iOS zoom */
      color: var(--text);
      outline: none;
      transition: border-color .15s;
      font-family: inherit;
    }
    .field-group input:focus { border-color: var(--primary); }
    .yes-no { display: flex; gap: 10px; }
    .yn-btn {
      flex: 1;
      border: 2px solid #d1d5db;
      background: #fff;
      border-radius: 8px;
      padding: 13px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      text-align: center;
      transition: border-color .15s, background .15s;
      font-family: inherit;
    }
    .yn-btn:hover, .yn-btn.selected {
      border-color: var(--primary);
      background: #EEF4FB;
      color: var(--primary);
    }

    /* Step 3 — contact */
    .consent-block {
      background: #F7F8FA;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      padding: 14px;
      margin-top: 14px;
    }
    .consent-row {
      display: flex;
      gap: 10px;
      align-items: flex-start;
      margin-bottom: 10px;
    }
    .consent-row:last-child { margin-bottom: 0; }
    .consent-row input[type=checkbox] {
      width: 18px;
      height: 18px;
      flex-shrink: 0;
      margin-top: 2px;
      accent-color: var(--primary);
      cursor: pointer;
    }
    .consent-text {
      font-size: 11px;
      line-height: 1.5;
      color: var(--muted);
    }
    .consent-text a { color: var(--primary); }
    .consent-required { color: #DC2626; font-weight: 700; }

    /* Nav buttons */
    .btn-row { display: flex; gap: 10px; margin-top: 20px; }
    .btn-back {
      flex: 1;
      border: 2px solid #d1d5db;
      background: #fff;
      border-radius: 8px;
      padding: 14px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      color: var(--muted);
      font-family: inherit;
    }
    .btn-next {
      flex: 2;
      background: var(--primary);
      color: #fff;
      border: none;
      border-radius: 8px;
      padding: 14px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      transition: opacity .15s;
    }
    .btn-next:disabled { opacity: .45; cursor: not-allowed; }
    .btn-submit {
      width: 100%;
      background: var(--accent);
      color: #fff;
      border: none;
      border-radius: 50px;
      padding: 17px;
      font-size: 17px;
      font-weight: 800;
      cursor: pointer;
      margin-top: 16px;
      box-shadow: 0 4px 18px rgba(242,99,43,.4);
      font-family: inherit;
      transition: opacity .15s, transform .15s;
    }
    .btn-submit:disabled { opacity: .45; cursor: not-allowed; }
    .btn-submit:not(:disabled):hover { transform: translateY(-1px); }

    #form-micro-trust {
      text-align: center;
      font-size: 12px;
      color: var(--muted);
      padding: 12px 20px;
      border-top: 1px solid #f0f0f0;
    }

    /* ══════════════════════════════════════════
       CONFIRMATION STATE
    ══════════════════════════════════════════ */
    #confirm-state {
      display: none;
      padding: 40px 24px;
      text-align: center;
    }
    #confirm-state .check-icon { font-size: 56px; margin-bottom: 12px; }
    #confirm-state h2 {
      font-size: 22px;
      font-weight: 800;
      color: var(--primary);
      margin-bottom: 10px;
    }
    #confirm-state p { font-size: 15px; color: var(--muted); margin-bottom: 20px; }
    #confirm-call-btn {
      display: inline-block;
      background: var(--accent);
      color: #fff;
      padding: 14px 32px;
      border-radius: 50px;
      text-decoration: none;
      font-weight: 800;
      font-size: 16px;
    }

    /* Error state */
    #error-state {
      display: none;
      padding: 24px;
      text-align: center;
    }
    #error-state p { color: #DC2626; font-size: 14px; margin-bottom: 12px; }
    #retry-btn {
      background: var(--primary);
      color: #fff;
      border: none;
      border-radius: 8px;
      padding: 12px 24px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
    }

    /* ══════════════════════════════════════════
       TRUST STACK SECTION
    ══════════════════════════════════════════ */
    #trust-stack {
      background: #fff;
      border-top: 1px solid #e5e7eb;
      border-bottom: 1px solid #e5e7eb;
    }
    .trust-items {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .trust-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
    }
    .trust-item .ti-icon { font-size: 22px; flex-shrink: 0; }
    .trust-item .ti-text { font-size: 13px; font-weight: 600; line-height: 1.4; }
    .trust-item .ti-sub { font-weight: 400; color: var(--muted); font-size: 12px; }

    #review-block {
      margin-top: 22px;
      background: #F7F8FA;
      border-radius: var(--radius);
      padding: 16px;
    }
    .review-stars { color: #FFD700; font-size: 18px; }
    .review-quote { font-size: 14px; line-height: 1.6; font-style: italic; margin: 8px 0; }
    .review-author { font-size: 12px; font-weight: 700; color: var(--muted); }

    /* ══════════════════════════════════════════
       FAQ
    ══════════════════════════════════════════ */
    #faq-section { background: var(--bg); }
    details {
      border: 1px solid #e5e7eb;
      border-radius: var(--radius);
      background: #fff;
      margin-bottom: 8px;
      overflow: hidden;
    }
    summary {
      padding: 14px 16px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      list-style: none;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    summary::after { content: '+'; font-size: 18px; color: var(--primary); }
    details[open] summary::after { content: '−'; }
    details p { padding: 0 16px 14px; font-size: 14px; color: var(--muted); line-height: 1.6; }

    /* ══════════════════════════════════════════
       SECOND CTA SECTION
    ══════════════════════════════════════════ */
    #cta-bottom {
      background: var(--primary);
      color: #fff;
      text-align: center;
    }
    #cta-bottom h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
    #cta-bottom p { font-size: 14px; opacity: .85; margin-bottom: 20px; }

    /* ══════════════════════════════════════════
       FOOTER
    ══════════════════════════════════════════ */
    footer {
      background: #111;
      color: #aaa;
      text-align: center;
      padding: 20px;
      font-size: 12px;
      line-height: 1.8;
    }
    footer a { color: #ccc; }
    #license-line { margin-top: 6px; font-size: 11px; opacity: .7; }

    /* ══════════════════════════════════════════
       STICKY MOBILE CALL BAR
    ══════════════════════════════════════════ */
    #sticky-call {
      position: fixed;
      bottom: 0; left: 0; right: 0;
      z-index: 999;
      display: flex;
      gap: 0;
      box-shadow: 0 -2px 16px rgba(0,0,0,.15);
    }
    #sticky-call a {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 16px;
      font-size: 15px;
      font-weight: 800;
      text-decoration: none;
      color: #fff;
    }
    #sticky-call .call-btn { background: var(--accent); }
    #sticky-call .form-btn { background: var(--primary); }
    #sticky-call a span { font-size: 18px; }

    /* Spinner */
    .spinner {
      display: inline-block;
      width: 20px;
      height: 20px;
      border: 3px solid rgba(255,255,255,.4);
      border-top-color: #fff;
      border-radius: 50%;
      animation: spin .7s linear infinite;
      vertical-align: middle;
      margin-right: 8px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* Validation highlight */
    input.invalid { border-color: #DC2626 !important; }
    .field-error { font-size: 11px; color: #DC2626; margin-top: 3px; display: none; }
    .field-error.show { display: block; }

    @media (min-width: 480px) {
      .trust-items { grid-template-columns: 1fr 1fr; }
    }