/* ============================================================
   Aura Windows — theme tokens
   Matches the live Perspective funnel's theme block: buttonBackgroundColor
   #7BB13F (green, CTAs/selection), fontColor #1D2E51 (navy), formField
   BackgroundColor #858F9D (grey, unstyled card fallback), font
   Poppins:400,700, borderRadius "small".
   ============================================================ */
:root {
  --color-text: #1D2E51;
  --color-navy: #1D2E51;
  --color-bg: #FFFFFF;
  --color-field-bg: #7BB13F;    /* primary brand green — buttons, CTAs */
  --color-field-bg-hover: #699f36;
  --color-grey: #858F9D;        /* unstyled card fallback (theme formFieldBackgroundColor) */
  --color-red: #F80101;         /* "No" answer */
  --color-accent: #7BB13F;
  --color-star: #FACC15;
  --color-border: #E4E4E1;
  --color-error: #C0392B;
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 640px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  padding: 16px 24px;
  background: #FFFFFF;
}
.site-header__logo { display: inline-block; }
.site-header__logo img {
  height: 40px;
  width: auto;
}

/* ---------- Layout ---------- */
.app {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  padding-bottom: 8px; /* clear the fixed progress bar */
}

.screen {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 24px 56px;
  animation: screenEnter 480ms ease both;
}
.screen--tight-top { padding-top: 8px; }
@keyframes screenEnter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.narrow { max-width: var(--max-width); margin-left: auto; margin-right: auto; }

/* ---------- Progress bar ---------- */
.progress-bar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: var(--color-border);
  z-index: 50;
}
.progress-bar__fill {
  height: 100%;
  width: 0%;
  background: var(--color-field-bg);
  transition: width 320ms ease;
}

/* ---------- Typography ---------- */
h1.headline {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-align: left;
  margin: 0 0 20px;
  color: var(--color-text);
}
h1.headline .accent { color: var(--color-field-bg); }

h2.question {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-text);
  text-align: left;
  margin: 8px 0 6px;
}
.question-sub {
  text-align: left;
  font-size: 16px;
  color: var(--color-text);
  margin: 0 0 20px;
}
.body-text {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  margin: 0 0 20px;
}

@media (min-width: 640px) {
  h1.headline { font-size: 36px; }
  h2.question { font-size: 28px; }
}

.question-head { text-align: left; margin-bottom: 20px; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--color-field-bg);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  transition: background 150ms ease, transform 150ms ease;
}
.btn-primary:hover { background: var(--color-field-bg-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary .btn-sub { font-weight: 400; font-size: 13px; opacity: 0.85; }
.btn-primary-wrap { display: flex; justify-content: center; margin: 4px 0 32px; }

/* ---------- Answer card grid ----------
   Shared by every single-select question on this funnel (photo cards on
   the "what are you looking to install" step, icon cards everywhere
   else) — flexbox + justify-content:center so a lone remainder card
   (the 5th of 5 on the windows/doors count steps) centers itself under
   the row instead of stretching or sticking to the left. Verified live
   on the source funnel at 375px (2-up) and 768px+ (4-up), both with the
   5th item centered the same way. */
.answers-media-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
}
.answers-media-grid .answer-card { width: calc(50% - 7px); }
@media (min-width: 768px) {
  .answers-media-grid.cols-4 .answer-card { width: calc(25% - 11px); }
}

.answer-card {
  display: flex;
  flex-direction: column;
  border: none;
  padding: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-grey);
  transition: transform 150ms ease, box-shadow 150ms ease;
  text-align: center;
}
.answer-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.answer-card:active { transform: scale(0.98); }
.answer-card:disabled { opacity: 0.6; }

.answer-card__media {
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  background: var(--color-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.answer-card__media--photo img { width: 100%; height: 100%; object-fit: cover; }
.answer-card__media--icon { padding: 22%; }
.answer-card__media--icon svg { width: 100%; height: 100%; fill: #fff; }

.answer-card__label {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 10px;
  background: var(--color-field-bg);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

/* ---------- Postcode step ---------- */
.coverage-map { margin-bottom: 20px; border-radius: var(--radius-sm); overflow: hidden; }
.field-input-wrap {
  position: relative;
  margin-bottom: 8px;
}
.field-input-wrap .field-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  font-size: 17px;
  pointer-events: none;
}
.field-input-wrap input[type="text"] {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px 16px 16px 44px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
}
.field-input-wrap input:focus { outline: none; border-color: var(--color-field-bg); }

/* ---------- Contact form ---------- */
.contact-form { margin-bottom: 20px; }
.input-wrap { position: relative; margin-bottom: 14px; }
.input-wrap .field-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  font-size: 17px;
  pointer-events: none;
}
.input-wrap input[type="text"],
.input-wrap input[type="email"],
.input-wrap input[type="tel"] {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px 16px 16px 46px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
}
.input-wrap input:focus { outline: none; border-color: var(--color-field-bg); }

.phone-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.phone-wrap:focus-within { border-color: var(--color-field-bg); }
.phone-code {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #F5F5F3;
  border-right: 1px solid var(--color-border);
  font-size: 16px;
  white-space: nowrap;
}
.phone-wrap input[type="tel"] {
  border: none;
  flex: 1;
  min-width: 0;
  padding: 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
}
.phone-wrap input[type="tel"]:focus { outline: none; }

.field-error {
  color: var(--color-error);
  font-size: 13px;
  margin: -10px 0 14px 4px;
  display: none;
}
.field-error.visible { display: block; }

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
}
.consent-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-field-bg);
  flex-shrink: 0;
}
.consent-row a { text-decoration: underline; }

/* ---------- FAQ accordion (start page only) ---------- */
.faq-accordion { margin: 8px 0 28px; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #f5f5f5; border-radius: var(--radius-sm); overflow: hidden; }
.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  text-align: left;
}
.faq-item__chevron { flex-shrink: 0; transition: transform 200ms ease; font-size: 14px; color: #5c5c5c; }
.faq-item.open .faq-item__chevron { transform: rotate(180deg); }
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
  padding: 0 18px;
}
.faq-item.open .faq-item__a { max-height: 240px; padding-bottom: 16px; }
.faq-item__a p { margin: 0; font-size: 15px; line-height: 1.6; color: #5c5c5c; }

/* ---------- Reviews bar ---------- */
.reviews-bar { text-align: center; margin: 12px 0; }
.reviews-bar__google { width: 36px; height: 36px; margin: 0 auto 8px; }
.reviews-bar__stars { color: var(--color-star); font-size: 18px; letter-spacing: 2px; margin-bottom: 4px; }
.reviews-bar__text { font-size: 14px; color: var(--color-text); }
.reviews-bar__text strong { font-weight: 700; }

/* ---------- Hero image ---------- */
.hero-image { margin: 0 0 20px; border-radius: var(--radius-sm); overflow: hidden; }

/* ---------- Thank-you page ---------- */
.thanks-headline {
  font-weight: 700;
  font-size: 26px;
  text-align: left;
  margin: 8px 0 12px;
  color: var(--color-text);
}
.thanks-headline .accent { color: var(--color-field-bg); }
.thanks-intro { font-size: 16px; line-height: 1.5; margin: 0 0 20px; }

.thanks-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .thanks-steps { grid-template-columns: 1fr 1fr; }
}
.thanks-steps li { display: flex; gap: 12px; align-items: flex-start; }
.thanks-steps .step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--color-grey);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.thanks-steps strong { display: block; font-size: 15px; margin-bottom: 2px; }
.thanks-steps span.body { font-size: 14px; color: #5c5c5c; line-height: 1.4; }

.thanks-cta-label { font-size: 18px; font-weight: 400; margin: 0 0 16px; }
.thanks-cta-label .accent { color: var(--color-field-bg); font-weight: 700; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 28px;
  background: #fff;
  color: var(--color-text);
  border: 2px solid var(--color-field-bg);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.btn-outline-wrap { display: flex; justify-content: center; }

/* ---------- Confetti ---------- */
.confetti-piece {
  position: fixed;
  top: -10px;
  width: 8px;
  height: 14px;
  opacity: 0.9;
  z-index: 999;
  pointer-events: none;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(540deg); opacity: 0.4; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy);
  padding: 28px 24px;
  text-align: center;
}
.site-footer a {
  color: #fff;
  font-size: 14px;
  text-decoration: underline;
}

/* ---------- Misc ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
