/* Roofing Llama 9-step funnel — native CSS clone */

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: Lato, Montserrat, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #ffffff;
  background-color: #0d0d0d;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.62)),
    url("../images/roof-hero.webp"),
    linear-gradient(160deg, #2a2a2a 0%, #0d0d0d 55%, #1c1208 100%);
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
}

/* ---------- Chrome (steps 2–9 + success) ---------- */
.chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 20px 16px 0;
}

.chrome[hidden] {
  display: none !important;
}

.chrome-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
  margin: 0 auto;
}

.chrome-top {
  display: none;
}

.lock {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #1041b5;
  border-radius: 50%;
  flex-shrink: 0;
}

.chrome-logo {
  display: block;
  line-height: 0;
}

.chrome-logo img {
  display: block;
  width: 120px;
  height: auto;
  max-height: 72px;
}

.progress-wrap {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  padding: 2px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff8a1f 0%, #fb7304 55%, #ffb347 100%);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(251, 115, 4, 0.55);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Main / steps ---------- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 16px 100px;
  width: 100%;
}

.step {
  width: 100%;
  display: none;
  justify-content: center;
  animation: fadeInSlide 0.55s ease-in-out;
}

.step.is-active {
  display: flex;
}

.step[hidden] {
  display: none !important;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(5px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.step-inner {
  width: 100%;
  max-width: 42rem;
  text-align: center;
  padding: 0 8px;
}

.step-inner--wide {
  max-width: 56rem;
}

.step-inner--narrow {
  max-width: 36rem;
}

.step-inner--roof {
  max-width: 48rem;
}

.step--hero .step-inner {
  padding-top: 8vh;
  padding-bottom: 4vh;
}

.step-icon {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.step-icon--svg {
  color: #ffffff;
  margin: 0 auto 16px;
}

.heading {
  margin: 0 0 1.75rem;
  font-family: Montserrat, Lato, sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.heading-lg {
  font-size: 1.875rem;
  margin-bottom: 1rem;
  max-width: 18em;
  margin-left: auto;
  margin-right: auto;
}

.sub {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  line-height: 1.45;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.step-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* ---------- Zip row ---------- */
.zip-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}

.zip-field-wrap {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.field {
  width: 100%;
  padding: 14px 24px;
  font-size: 1.125rem;
  line-height: 1.3;
  font-family: inherit;
  color: #111;
  background: #ffffff;
  border: 2px solid #d1d5db;
  border-radius: 9999px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field--center {
  text-align: center;
}

.field--center::placeholder {
  text-align: center;
}

.field:focus {
  border-color: #1041b5;
  box-shadow: 0 0 0 3px rgba(16, 65, 181, 0.25);
}

.field.is-invalid {
  border-color: #e53935;
}

.field::placeholder {
  color: #9ca3af;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block;
  width: 100%;
  padding: 14px 24px;
  font-size: 1.125rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: #fb7304;
  border: 2px solid transparent;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #e65c00;
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(251, 115, 4, 0.4);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary--zip {
  width: 100%;
}

.btn-primary--narrow {
  width: 100%;
  max-width: 10rem;
  margin-top: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Choice tiles (timeline / credit / ownership) */
.choice-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
}

.choice-grid--2 {
  max-width: 36rem;
}

.choice-btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.025em;
  color: #ffffff;
  background: #fb7304;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.choice-btn:hover,
.choice-btn:focus {
  background: #e65c00;
}

.choice-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(251, 115, 4, 0.35);
}

.choice-btn.is-active {
  background: #1041b5;
}

/* Roof type cards */
.roof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.roof-card {
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #1a1a1a;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.roof-card:hover,
.roof-card:focus {
  transform: scale(1.02);
  outline: none;
}

.roof-card img {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
}

.roof-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 12px;
  transition: background 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.roof-card:hover .roof-card-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.roof-card-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  background: #fb7304;
  border-radius: 9999px;
  white-space: nowrap;
  pointer-events: none;
  transition: background 0.2s ease;
}

.roof-card:hover .roof-card-label,
.roof-card.is-active .roof-card-label {
  background: #e65c00;
}

.roof-card.is-active .roof-card-label {
  background: #1041b5;
}

.btn-unsure {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 28px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  background: #fb7304;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-unsure:hover,
.btn-unsure:focus {
  background: #e65c00;
}

.btn-unsure.is-active {
  background: #1041b5;
}

/* Name row */
.name-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.name-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Errors — red pill like reference */
.error-pill {
  margin: 8px 0 0;
  display: inline-block;
  padding: 4px 16px;
  font-size: 0.875rem;
  color: #991b1b;
  background: #fee2e2;
  border-radius: 9999px;
  white-space: nowrap;
}

.error-pill[hidden] {
  display: none !important;
}

/* Consent / TCPA */
.consent-line {
  margin: 12px 0 4px;
  max-width: 24rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
}

.phone-script {
  margin: 16px 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.tcpa {
  margin: 16px 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.tcpa p {
  margin: 0 0 8px;
}

.tcpa a {
  color: #f6ad55;
  text-decoration: none;
}

.tcpa a:hover,
.tcpa a:focus {
  text-decoration: underline;
}

.tcpa-sep {
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.55);
}

.tcpa-links {
  margin-top: 4px !important;
}

/* Back */
.btn-back {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 2px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  color: #ffffff;
  background: transparent;
  border: none;
  cursor: pointer;
}

.btn-back[hidden] {
  display: none !important;
}

.btn-back-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.btn-back:hover,
.btn-back:focus {
  opacity: 0.9;
}

.btn-back:focus {
  outline: 2px solid #1041b5;
  outline-offset: 3px;
}

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  width: 100%;
  background: #000000;
  padding: 28px 20px;
}

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-copy {
  order: 3;
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}

.footer-logo {
  order: 1;
  line-height: 0;
}

.footer-logo img {
  display: block;
  width: 120px;
  height: auto;
  max-height: 72px;
}

.footer-nav {
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #ffffff;
}

.footer-nav a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: #9ca3af;
}

.footer-sep {
  display: none;
  margin: 0 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .name-row {
    flex-direction: row;
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
  }

  .footer-sep {
    display: inline;
  }
}

@media (min-width: 768px) {
  .heading {
    font-size: 2.25rem;
    line-height: 3.3rem;
  }

  .heading-lg {
    font-size: 2.25rem;
  }

  .sub {
    font-size: 1.25rem;
  }

  .choice-row {
    flex-direction: row;
    align-items: stretch;
  }

  .choice-btn {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .roof-card img {
    height: 150px;
  }

  .roof-card-label {
    padding: 8px 24px;
    font-size: 1rem;
  }

  .main {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  .chrome-logo img,
  .footer-logo img {
    width: 135px;
  }

  .lock {
    left: 40px;
  }

  .progress-wrap {
    max-width: 22rem;
  }

  .btn-back {
    left: 90px;
    bottom: 40px;
  }
}

@media (min-width: 1024px) {
  .heading-lg {
    font-size: 3rem;
    line-height: 1.15;
  }

  .zip-row {
    flex-direction: row;
    align-items: stretch;
    gap: 16px;
  }

  .zip-field-wrap {
    flex: 1 1 50%;
    width: auto;
  }

  .btn-primary--zip {
    flex: 1 1 50%;
    width: auto;
  }

  .zip-field-wrap .error-pill {
    position: absolute;
    left: 50%;
    bottom: -36px;
    transform: translateX(-50%);
    margin-top: 0;
  }

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

  .footer-copy {
    order: 1;
    text-align: left;
    flex: 1;
  }

  .footer-logo {
    order: 2;
  }

  .footer-nav {
    order: 3;
    flex: 1;
    justify-content: flex-end;
  }

  .lock {
    left: 60px;
  }

  .btn-back {
    bottom: 48px;
  }
}

@media (max-width: 479px) {
  .roof-card-label {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  .heading,
  .heading-lg {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .sub {
    font-size: 1rem;
  }

  .main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .btn-back {
    left: 16px;
    bottom: 16px;
  }
}
