/* Reset default margin and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  :root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: rgba(17, 24, 39, 0.14);
    --shadow: 0 18px 55px rgba(17, 24, 39, 0.10);
    --shadow-sm: 0 8px 25px rgba(17, 24, 39, 0.10);
    --brand: #C8102E;
    --radius: 14px;
    --funnel-header-h: 120px;
  }

  html {
    scroll-padding-top: calc(var(--funnel-header-h) + 12px);
  }
  
  /* Body styles */
  body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 0;
    background:
      radial-gradient(900px 420px at 15% 0%, rgba(200, 16, 46, 0.12), transparent 55%),
      radial-gradient(800px 420px at 85% 5%, rgba(17, 24, 39, 0.08), transparent 60%),
      var(--bg);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--text);
    line-height: 1.4;

  }
  
  body::before {
    content: "";
    position: absolute;
    top: 120px; /* Offset by the height of the header */
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/model.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center top;
    opacity: 0.04;
    z-index: -1;
  }
  
  .header, .footer, .form-container, #progress-container, .question-container {
    position: relative;
    z-index: 1;
  }
  
  
  /* Header styles - center logo */
  .header {
    width: 100%;
    height: 120px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    backdrop-filter: blur(10px);
    overflow: hidden;
  }

  @media (max-width: 560px) {
    :root {
      --funnel-header-h: 100px;
    }
    .header {
      height: 100px;
      align-items: stretch;
      padding: 0 10px;
    }
    body::before {
      top: 100px;
    }
    .logo {
      width: auto;
      height: 100%;
      max-height: 100px;
      max-width: min(96vw, 520px);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .logo-image {
      height: 100%;
      width: auto;
      max-height: 100%;
      max-width: 100%;
      object-fit: contain;
      display: block;
    }

    .question-container {
      margin-top: 150px;
    }

    .thank-you-container {
      margin-top: 150px;
    }
  }
  
  /* Footer styles */
  .footer {
    background-color: transparent;
    color: var(--muted);
    padding: 10px 0;
    text-align: center;
    font-size: 0.9em;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    width: 100%;
    height: 100px; /* Standard height similar to header */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px; /* Space between button and text */
    margin-top: 100px; /* Space between the body content and footer */
  }
  
  .footer p {
    margin: 0;
  }
  
  .footer a {
    color: var(--brand);
    text-decoration: none;
    margin: 0 20px;
  }
  
  .footer a:hover {
    text-decoration: underline;
  }
  
  /* Container for urgent button below the form */
  .urgent-button-container {
    text-align: center;
    margin-top: 40px; /* 40px space above the button */
  }
  
  /* Urgent call button below the form */
  .urgent-call-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    background-color: white;
    color: #C8102E;
    border: 1px solid #C8102E;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    width: 200px; /* Fixed width for button */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    text-align: center;
  }
  
  /* Hover effect */
  .urgent-call-button:hover {
    background-color: #C8102E;
    color: white;
    transform: scale(1.05);
  }
  
  .logo {
    max-width: 120px;
    max-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logo-image {
    max-width: 100%;
    max-height: 100%;
  }
  
  /* Main content container */
  .question-container {
    margin-top: 190px;
    margin-bottom: 20px;
    text-align: center;
    padding: 0 10px;
    max-width: 90%;
  }

  #main-header,
  #question-header {
    scroll-margin-top: calc(var(--funnel-header-h) + 12px);
  }

  .funnel-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    color: rgba(17, 24, 39, 0.70);
    font-weight: 600;
    font-size: 0.95em;
  }

  .funnel-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(17, 24, 39, 0.10);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
  }

  .zip-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.28);
  }

  .zip-status-dot.is-loading {
    background: rgba(200, 16, 46, 0.55);
    animation: pulse 1.1s ease-in-out infinite;
  }

  .zip-status-dot.is-ok {
    background: rgba(16, 185, 129, 0.75);
  }

  .zip-status-dot.is-bad {
    background: rgba(239, 68, 68, 0.75);
  }

  @keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.35); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
  }
  
  #progress-container {
    width: 100%;
    background-color: rgba(17, 24, 39, 0.06);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 20px; /* Add gap between progress bar and form */
  }
  
  #progress-bar {
    height: 10px;
    background-color: var(--brand); /* Red from the logo */
    width: 0;
    transition: width 0.4s ease;
  }
  
  .form-container {
    background-color: var(--surface);
    padding: 40px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(17, 24, 39, 0.06);
    width: 90%;
    max-width: 500px;
    text-align: left;
    margin: 0 auto; /* Center the container */
    margin-bottom: 120px;
    overflow-y: auto;
    max-height: 80vh;

  }
  
  h1 {
    font-size: 1.5em;
  }
  
  /* Main header style */
  #main-header {
    color: var(--text);
    font-size: 1.85em; /* Make the main header bigger */
  }
  
  #question-header {
    color: var(--text);
  }
  
  /* Opt-in text styles */
  .opt-in-text {
    font-size: 0.8em; /* Smaller font size */
    color: var(--muted); /* Lighter gray color for subtlety */
    margin-top: 10px;
    line-height: 1.4; /* Improved readability */
    text-align: left;
  }
  
  /* Step styles */
  .step {
    display: none;
    opacity: 0;
    transform: translateY(6px);
  }
  
  .step.active {
    display: block;
    animation: stepIn 220ms ease-out forwards;
  }

  @keyframes stepIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Radio and checkbox groups */
  .radio-group,
  .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .radio-group label,
  .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(17, 24, 39, 0.10);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  }

  .radio-group label:hover,
  .checkbox-group label:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.10);
  }

  .radio-group label.is-selected,
  .checkbox-group label.is-selected {
    border-color: rgba(200, 16, 46, 0.35);
    box-shadow: 0 18px 38px rgba(200, 16, 46, 0.12);
    background: rgba(200, 16, 46, 0.06);
  }
  
  input[type="radio"],
  input[type="checkbox"] {
    accent-color: var(--brand); /* Red from the logo */
  }
  
  /* Input group (for text inputs) */
  .input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .input-group label {
    flex-basis: 100%;
    margin-bottom: 10px;
    display: block; /* Display labels as block to stack them */
  }
  
  .input-group input[type="text"],
  input[type="email"],
  input[type="tel"],
  select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.85);
  }

  .input-group input[type="text"]:focus,
  input[type="email"]:focus,
  input[type="tel"]:focus,
  select:focus,
  textarea:focus {
    outline: none;
    border-color: rgba(200, 16, 46, 0.55);
    box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12);
    background: #fff;
  }
  
  /* Textarea styles */
  textarea {
    width: 100%; /* Adjust width as needed */
    height: 150px; /* Adjust height as needed */
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-sizing: border-box;
    resize: vertical;
    margin: 0 auto; /* Center textareas */
    background: rgba(255, 255, 255, 0.85);
  }
  
  textarea::placeholder {
    color: #999;
  }
  
  /* Button group */
  .button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 12px;
  }
  
  button {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  button:active {
    transform: translateY(1px);
  }

  button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
  }

  .funnel-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.08);
    color: rgba(127, 29, 29, 0.95);
    font-weight: 650;
    display: none;
    scroll-margin-top: calc(var(--funnel-header-h) + 12px);
  }

  .funnel-error.is-visible {
    display: block;
  }
  
  #prev-button {
    background-color: white;
    color: var(--brand); /* Red from the logo */
    border: 1px solid var(--brand);
  }
  
  #prev-button:hover {
    background-color: var(--brand); /* Red from the logo */
    color: white;
  }
  
  #next-button {
    background-color: var(--brand); /* Red from the logo */
    color: white;
  }
  
  #next-button:hover {
    background-color: white;
    color: var(--brand); /* Red from the logo */
    border: 1px solid var(--brand);
  }
  
  .submit-button {
    background-color: var(--brand); /* Red from the logo */
    color: white;
    width: 100%;
    margin-top: 20px;
    display: none; /* Initially hidden */
  }
  
  .submit-button:hover {
    background-color: transparent;
    color: var(--brand); /* Red from the logo */
    border: 1px solid var(--brand);
  }

  @media (max-width: 520px) {
    .form-container {
      padding: 28px 18px;
      border-radius: 12px;
    }
    .footer a {
      margin: 0 10px;
    }
  }
  
  .thank-you-container {
    background-color: white;
    padding: 60px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    text-align: center;
    margin-top: 190px;
  }

  .thank-you-container--wide {
    max-width: 980px;
    text-align: left;
  }

  .thank-you-container h1 {
    margin: 0 0 10px;
  }

  .thank-you-sub {
    margin: 0 0 12px;
    color: rgba(17, 24, 39, 0.76);
    line-height: 1.55;
  }

  .quote-helper {
    margin: 0 0 18px;
    color: rgba(17, 24, 39, 0.64);
    font-weight: 600;
  }

  .quote-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 14px 0 18px;
  }

  .quote-field {
    display: block;
    font-weight: 700;
    color: rgba(17, 24, 39, 0.92);
  }

  .quote-field input {
    margin-top: 8px;
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    font-size: 1.05em;
  }

  .quote-note {
    display: block;
    margin-top: 6px;
    color: rgba(17, 24, 39, 0.62);
    font-weight: 600;
    font-size: 0.92em;
  }

  .packages {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 10px;
  }

  .package-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
  }

  details > summary::-webkit-details-marker {
    display: none;
  }

  .package-summary-main {
    min-width: 0;
  }

  .package-summary-main h2 {
    margin: 0;
    font-size: 1.05em;
    letter-spacing: -0.01em;
  }

  .package-summary-sub {
    margin-top: 4px;
    color: rgba(17, 24, 39, 0.66);
    font-weight: 650;
    font-size: 0.95em;
  }

  .package-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
  }

  details.package-accordion[open] .package-summary {
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  }

  details.package-accordion:not([open]) .package-pill {
    margin-top: 6px;
  }

  .designer-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    padding: 14px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(17, 24, 39, 0.10);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
  }

  .designer-callout-title {
    font-weight: 900;
    letter-spacing: -0.01em;
  }

  .designer-callout-sub {
    margin-top: 4px;
    color: rgba(17, 24, 39, 0.70);
    font-weight: 600;
    line-height: 1.55;
  }

  .designer-callout-cta {
    flex: 0 0 auto;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(200, 16, 46, 0.22);
    white-space: nowrap;
  }

  .designer-callout-cta:hover {
    background: #b30f29;
  }

  .package-card {
    border: 1px solid rgba(17, 24, 39, 0.10);
    background: rgba(255, 255, 255, 0.78);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
  }

  .package-card--featured {
    border-color: rgba(200, 16, 46, 0.22);
    box-shadow: 0 20px 45px rgba(200, 16, 46, 0.10);
    background: rgba(200, 16, 46, 0.04);
  }

  .package-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
  }

  .package-top h2 {
    margin: 0;
    font-size: 1.05em;
    letter-spacing: -0.01em;
    min-width: 0;
  }

  .package-price {
    font-weight: 900;
    color: rgba(17, 24, 39, 0.92);
    font-size: 1.2em;
    white-space: nowrap;
    margin-left: auto;
  }

  .package-pill {
    display: inline-flex;
    margin: 10px 0 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(200, 16, 46, 0.12);
    color: rgba(122, 11, 27, 0.98);
    border: 1px solid rgba(200, 16, 46, 0.20);
    font-weight: 800;
    font-size: 0.9em;
  }

  .package-card ul {
    margin: 0;
    padding-left: 18px;
    color: rgba(17, 24, 39, 0.74);
    line-height: 1.5;
  }

  .package-card ul li {
    margin: 6px 0;
  }

  .package-pricing {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
  }

  .package-lede {
    margin: 0;
    color: rgba(17, 24, 39, 0.74);
    line-height: 1.55;
    font-weight: 600;
  }

  .package-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
  }

  .package-grid > div {
    min-width: 0;
  }

  .package-h3 {
    margin: 0 0 8px;
    font-size: 0.98em;
    letter-spacing: -0.01em;
    color: rgba(17, 24, 39, 0.90);
  }

  .package-list {
    margin: 0;
    padding-left: 18px;
    color: rgba(17, 24, 39, 0.74);
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .package-footnote {
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    color: rgba(17, 24, 39, 0.66);
    line-height: 1.55;
    font-weight: 600;
    font-size: 0.95em;
  }

  .sticky-call {
    position: sticky;
    bottom: 14px;
    margin-top: 16px;
    z-index: 5;
  }

  .sticky-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 14px;
    border-radius: 14px;
    background: rgba(200, 16, 46, 0.96);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 22px 55px rgba(200, 16, 46, 0.25);
    border: 1px solid rgba(200, 16, 46, 0.32);
  }

  .sticky-call-btn:hover {
    background: rgba(179, 15, 41, 0.98);
  }

  .urgent-sub {
    margin-top: 10px;
    color: rgba(17, 24, 39, 0.72);
    font-weight: 600;
  }

  @media (max-width: 980px) {
    .packages {
      grid-template-columns: 1fr;
    }
    .quote-inputs {
      grid-template-columns: 1fr;
    }
    .package-grid {
      grid-template-columns: 1fr;
    }
    .designer-callout {
      flex-direction: column;
      align-items: stretch;
    }
    .designer-callout-cta {
      width: 100%;
      text-align: center;
    }
    /* Mobile: show only summary until expanded */
    details.package-accordion {
      padding: 14px;
    }
    .package-body {
      padding-top: 12px;
    }
  }

  /* Legal (Privacy / Terms) */
  body.legal-page {
    align-items: flex-start;
    min-height: 100vh;
  }

  .legal-content {
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    padding: calc(var(--funnel-header-h) + 1.5rem) 1.25rem 2.5rem;
    text-align: left;
    line-height: 1.6;
  }

  .legal-content h1 {
    font-size: clamp(1.5rem, 4vw, 1.9rem);
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text);
  }

  .legal-content h2 {
    font-size: 1.1rem;
    margin: 1.6rem 0 0.5rem;
    color: var(--text);
  }

  .legal-content p,
  .legal-content li {
    color: var(--text);
  }

  .legal-content ul {
    margin: 0.4rem 0 0.8rem 1.25rem;
  }

  .legal-content a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .legal-updated {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
  }

  .legal-lead {
    font-size: 1.02rem;
    color: var(--text);
    margin: 0.75rem 0 1rem;
  }

  .legal-config--notice {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(200, 16, 46, 0.08);
    border: 1px solid rgba(200, 16, 46, 0.2);
    margin: 0 0 1.25rem;
  }

  .legal-todo {
    background: linear-gradient(
      to bottom,
      transparent 60%,
      rgba(200, 16, 46, 0.18) 60%
    );
  }

  .legal-dl {
    margin: 0.5rem 0 0;
  }

  .legal-dl dt {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 0.75rem;
  }

  .legal-dl dd {
    margin: 0.2rem 0 0 0;
  }

  .legal-footer {
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    border-top: 1px solid var(--border);
  }

  .legal-footer a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
  }

  .legal-footer a:hover {
    text-decoration: underline;
  }
