/* HPACE growth pack — fullscreen quiz teaser + overlay, calc, share, compare, progress, geo */

/* ——— Teaser on homepage ——— */
.hp-section--fsq {
  position: relative;
  overflow: visible;
}

.hp-section--fsq::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 90% 20%, color-mix(in srgb, var(--hp-accent) 18%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 90%, color-mix(in srgb, var(--hp-accent) 10%, transparent), transparent 65%);
}

.hp-section--fsq > .hp-section__inner {
  position: relative;
  z-index: 1;
}

.hp-fsq-teaser {
  position: relative;
  display: grid;
  gap: clamp(24px, 3.5vw, 40px);
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 360px);
  align-items: stretch;
  padding: clamp(24px, 3.5vw, 36px);
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius-lg, 24px);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--hp-accent) 7%, var(--hp-bg-elevated)), var(--hp-bg-elevated) 48%);
  box-shadow: var(--hp-shadow);
  min-width: 0;
  overflow: hidden;
}

.hp-fsq-teaser__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hp-fsq-teaser__eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hp-accent);
}

.hp-fsq-teaser__title {
  margin: 0 0 14px;
  max-width: 18ch;
  font-family: var(--hp-display);
  font-size: clamp(1.65rem, 3.4vw, 2.55rem);
  font-weight: var(--hp-display-weight, 400);
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  line-height: 1.12;
  color: var(--hp-ink);
}

.hp-fsq-teaser__lead {
  margin: 0 0 18px;
  max-width: 44ch;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.55;
  color: var(--hp-ink-soft, color-mix(in srgb, var(--hp-ink) 78%, transparent));
}

.hp-fsq-teaser__perks {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.hp-fsq-teaser__perks li {
  position: relative;
  padding: 0 0 0 22px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--hp-ink);
}

.hp-fsq-teaser__perks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hp-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hp-accent) 18%, transparent);
}

.hp-fsq-teaser__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.hp-fsq-teaser__meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--hp-ink-soft, color-mix(in srgb, var(--hp-ink) 72%, transparent));
}

.hp-fsq-teaser__aside {
  display: flex;
  min-width: 0;
  width: 100%;
}

.hp-fsq-teaser__card {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: clamp(20px, 2.8vw, 28px);
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--hp-accent) 28%, var(--hp-line));
  background: color-mix(in srgb, var(--hp-accent) 8%, var(--hp-bg));
}

.hp-fsq-teaser__card-label {
  display: block;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hp-accent);
}

.hp-fsq-teaser__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
  width: 100%;
  counter-reset: fsq-step;
}

.hp-fsq-teaser__steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
  align-items: start;
  padding: 0;
  margin: 0;
  counter-increment: fsq-step;
}

.hp-fsq-teaser__steps li::before {
  content: counter(fsq-step);
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--hp-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.hp-fsq-teaser__steps strong {
  grid-column: 2;
  display: block;
  margin: 0;
  padding-top: 2px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hp-ink);
}

.hp-fsq-teaser__steps span {
  grid-column: 2;
  display: block;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--hp-ink-soft, color-mix(in srgb, var(--hp-ink) 72%, transparent));
}

@media (max-width: 860px) {
  .hp-fsq-teaser {
    grid-template-columns: 1fr;
    padding: 22px 18px;
    gap: 20px;
  }

  .hp-fsq-teaser__title {
    max-width: none;
  }

  .hp-fsq-teaser__card {
    justify-content: flex-start;
  }
}

/* ——— Fullscreen quiz overlay ——— */
.hp-fsq {
  position: fixed;
  inset: 0;
  z-index: 10045;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, color-mix(in srgb, var(--hp-accent) 16%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, color-mix(in srgb, var(--hp-accent) 10%, transparent), transparent 50%),
    var(--hp-bg);
  color: var(--hp-ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.32s var(--hp-ease, ease),
    transform 0.32s var(--hp-ease, ease),
    visibility 0.32s;
}

.hp-fsq.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

body.hp-fsq-open {
  overflow: hidden;
}

.hp-fsq__shell {
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  height: 100%;
  margin: 0 auto;
  padding:
    max(14px, env(safe-area-inset-top))
    clamp(16px, 4vw, 32px)
    max(18px, env(safe-area-inset-bottom));
}

.hp-fsq__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0 14px;
}

.hp-fsq__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hp-fsq__brand-mark {
  font-family: var(--hp-display);
  font-size: 15px;
  font-weight: var(--hp-display-weight, 400);
  letter-spacing: 0.08em;
  color: var(--hp-ink);
}

.hp-fsq__brand-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--hp-muted);
}

.hp-fsq__top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hp-fsq__step-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--hp-ink);
  white-space: nowrap;
}

.hp-fsq__close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--hp-line);
  border-radius: 999px;
  background: var(--hp-bg-elevated);
  color: var(--hp-ink);
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hp-fsq__close:hover,
.hp-fsq__close:focus-visible {
  border-color: var(--hp-accent);
  background: color-mix(in srgb, var(--hp-accent) 10%, var(--hp-bg-elevated));
  outline: none;
}

.hp-fsq__close-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hp-muted);
}

.hp-fsq__track {
  height: 5px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hp-ink) 10%, transparent);
  overflow: hidden;
}

.hp-fsq__track-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hp-accent), color-mix(in srgb, var(--hp-accent) 65%, #005fa3));
  box-shadow: 0 0 14px color-mix(in srgb, var(--hp-accent) 40%, transparent);
  transition: width 0.35s var(--hp-ease, ease);
}

.hp-fsq__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: 18px 0 8px;
  -webkit-overflow-scrolling: touch;
}

.hp-fsq__panel {
  display: none;
  animation: hp-fsq-in 0.35s var(--hp-ease, ease);
}

.hp-fsq__panel.is-active {
  display: block;
}

@keyframes hp-fsq-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-fsq,
  .hp-fsq__track-bar,
  .hp-fsq__panel {
    transition: none;
    animation: none;
  }
}

.hp-fsq__eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hp-accent);
}

.hp-fsq__title {
  margin: 0 0 12px;
  max-width: 18ch;
  font-family: var(--hp-display);
  font-size: clamp(1.55rem, 3.6vw, 2.4rem);
  font-weight: var(--hp-display-weight, 400);
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  line-height: 1.15;
  color: var(--hp-ink);
}

.hp-fsq__hint {
  margin: 0 0 24px;
  max-width: 54ch;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.55;
  color: var(--hp-ink-soft);
}

.hp-fsq__opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hp-fsq__opts--budget {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hp-fsq__opt {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 88px;
  padding: 16px 18px;
  text-align: left;
  border: 1px solid var(--hp-line);
  border-radius: 18px;
  background: var(--hp-bg-elevated);
  color: var(--hp-ink);
  font: inherit;
  cursor: pointer;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--hp-ink) 4%, transparent);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.hp-fsq__opt:hover {
  border-color: color-mix(in srgb, var(--hp-accent) 55%, var(--hp-line));
  background: color-mix(in srgb, var(--hp-accent) 8%, var(--hp-bg-elevated));
  transform: translateY(-1px);
}

.hp-fsq__opt:focus-visible {
  outline: 2px solid var(--hp-accent);
  outline-offset: 2px;
}

.hp-fsq__opt.is-selected {
  border-color: var(--hp-accent);
  background: color-mix(in srgb, var(--hp-accent) 14%, var(--hp-bg-elevated));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hp-accent) 18%, transparent);
}

.hp-fsq__opt-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--hp-accent) 14%, transparent);
  color: var(--hp-accent);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hp-fsq__opt.is-selected .hp-fsq__opt-mark {
  background: var(--hp-accent);
  color: #fff;
}

.hp-fsq__opt-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hp-fsq__opt-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hp-ink);
}

.hp-fsq__opt-desc {
  font-size: 13px;
  line-height: 1.4;
  color: var(--hp-muted);
}

.hp-fsq__back {
  margin-top: 20px;
  padding: 12px 4px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--hp-muted);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.hp-fsq__back:hover,
.hp-fsq__back:focus-visible {
  color: var(--hp-ink);
  outline: none;
}

.hp-fsq__panel--done .hp-fsq__title {
  max-width: 22ch;
}

.hp-fsq__summary {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg-elevated);
}

.hp-fsq__summary-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: baseline;
}

.hp-fsq__summary-key {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hp-muted);
}

.hp-fsq__summary-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--hp-ink);
}

.hp-fsq__done-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.hp-fsq__done-actions .hp-fsq__back {
  margin-top: 0;
}

@media (max-width: 720px) {
  .hp-fsq__opts,
  .hp-fsq__opts--budget {
    grid-template-columns: 1fr;
  }

  .hp-fsq__opt {
    min-height: 76px;
    padding: 14px 14px;
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }

  .hp-fsq__opt-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .hp-fsq__opt-title {
    font-size: 15px;
  }

  .hp-fsq__close-text {
    display: none;
  }

  .hp-fsq__summary-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .hp-fsq__title {
    max-width: none;
  }
}

/* Calculator */
.hp-calc {
  display: grid;
  gap: 22px;
  grid-template-columns: 1.2fr 0.8fr;
}

.hp-calc__panel,
.hp-calc__result {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius-lg, 16px);
  background: var(--hp-bg-elevated);
}

.hp-calc__field {
  margin-bottom: 18px;
}

.hp-calc__field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.hp-calc__field select,
.hp-calc__field input[type="range"] {
  width: 100%;
}

.hp-calc__field select {
  appearance: none;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg);
  color: inherit;
}

.hp-calc__range-val {
  margin-top: 6px;
  font-size: 13px;
  color: var(--hp-muted, #667);
}

.hp-calc__price {
  margin: 0 0 8px;
  font-family: var(--hp-display);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.hp-calc__note {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--hp-muted, #667);
  line-height: 1.5;
}

.hp-calc__form {
  display: grid;
  gap: 10px;
}

.hp-calc__form input {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg);
  color: inherit;
}

.hp-calc__consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.4;
}

.hp-calc__msg {
  min-height: 1.2em;
  font-size: 13px;
}

.hp-calc__msg.is-ok { color: #0a7a4b; }
.hp-calc__msg.is-err { color: #b42318; }

@media (max-width: 900px) {
  .hp-calc { grid-template-columns: 1fr; }
}

/* Read progress */
#hp-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 10050;
  background: linear-gradient(90deg, #0ea5e9, #14b8a6);
  pointer-events: none;
  transform-origin: left center;
}

/* Share */
.hp-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 20px 0 8px;
}

.hp-share__label {
  font-size: 13px;
  color: var(--hp-muted, #667);
  margin-right: 4px;
}

.hp-share__btn {
  appearance: none;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg-elevated);
  color: inherit;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hp-share__btn:hover {
  border-color: var(--hp-accent, #0ea5e9);
}

.hp-share__btn.is-copied {
  border-color: #14b8a6;
  color: #0a7a4b;
}

/* Fav compare */
.hp-fav-drawer__actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--hp-line);
}

.hp-fav-compare {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: none;
}

.hp-fav-compare.is-open { display: block; }

.hp-fav-compare__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 12, 20, 0.55);
  cursor: pointer;
}

.hp-fav-compare__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(960px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--hp-bg-elevated, #fff);
  border-radius: 16px;
  border: 1px solid var(--hp-line);
  padding: 20px;
}

.hp-fav-compare__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hp-fav-compare__head h2 {
  margin: 0;
  font-size: 22px;
}

.hp-fav-compare__close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.hp-fav-compare__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.hp-fav-compare__table th,
.hp-fav-compare__table td {
  border: 1px solid var(--hp-line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.hp-fav-compare__table th {
  background: var(--hp-bg, #f6f7f9);
  font-weight: 600;
}

/* Service FAQ */
.hp-service-faq {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--hp-line);
}

.hp-service-faq__title {
  margin: 0 0 16px;
  font-family: var(--hp-display);
  font-size: clamp(22px, 3vw, 28px);
}

.hp-service-faq details {
  border: 1px solid var(--hp-line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--hp-bg-elevated);
}

.hp-service-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}

.hp-service-faq details p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hp-muted, #556);
}

/* White-label / franchise / geo lists */
.hp-gate-download[hidden],
.hp-gate-form[hidden] { display: none !important; }

.hp-gate-form {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.hp-gate-form input {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg);
  color: inherit;
}

.hp-geo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.hp-geo-grid a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--hp-line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: var(--hp-bg-elevated);
  font-size: 14px;
}

.hp-geo-grid a:hover {
  border-color: var(--hp-accent, #0ea5e9);
}

.hp-compare-landing .hp-compare__more {
  margin-top: 16px;
}

.hp-err-hub-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.hp-err-hub-list a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--hp-line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: var(--hp-bg-elevated);
}
