/* ==========================================================================
   HOME — hero band carrying the calculator, then the article sections.
   ========================================================================== */

/* --- Hero: blue colour block, calculator above the fold ------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 40px 48px;
  background: var(--blue);
  color: var(--white);
  border-bottom: var(--bw-strong) solid var(--border);
  /* Dot-grid texture from the spec, held back to 30% so it reads as texture
     behind the headline rather than competing with it. */
  background-image: radial-gradient(rgba(255, 255, 255, 0.3) 2px, transparent 2px);
  background-size: 20px 20px;
}

@media (min-width: 1024px) {
  .hero {
    padding-block: 48px 64px;
  }
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 var(--s4);
  padding: var(--s2) var(--s4);
  background: var(--yellow);
  color: var(--fg);
  border: var(--bw) solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.hero__eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--red);
  border-radius: 9999px;
}

/* Compact so the calculator clears the fold — the poster-scale display type
   lives on the section headings below. */
.hero h1 {
  margin: 0 0 var(--s3);
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
}

.hero__tagline {
  max-width: 62ch;
  margin: 0 0 var(--s6);
  font-size: 1rem;
  line-height: 1.6;
}

@media (min-width: 640px) {
  .hero__tagline {
    font-size: 1.125rem;
  }
}

/* Decorative geometry sits behind the calculator card, bleeding off-canvas. */
.hero__shape {
  position: absolute;
  border: var(--bw-strong) solid var(--border);
  pointer-events: none;
  z-index: 0;
}

.hero__shape--circle {
  width: 260px;
  height: 260px;
  border-radius: 9999px;
  background: var(--red);
  top: -110px;
  right: -90px;
}

.hero__shape--square {
  width: 220px;
  height: 220px;
  background: var(--yellow);
  bottom: -120px;
  left: -80px;
  transform: rotate(45deg);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin: var(--s6) 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero__meta span[aria-hidden] {
  width: 8px;
  height: 8px;
  background: var(--yellow);
}

/* --- Stats: yellow block, divided grid ----------------------------------- */

.stats {
  background: var(--yellow);
  border-bottom: var(--bw-strong) solid var(--border);
}

.stats__grid {
  display: grid;
  grid-template-columns: 1fr;
}

.stat {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s6) var(--pad-x);
  border-bottom: var(--bw) solid var(--border);
}

.stats__grid .stat:last-child {
  border-bottom: 0;
}

@media (min-width: 640px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(odd) {
    border-right: var(--bw) solid var(--border);
  }
  .stats__grid .stat:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .stats__grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .stat,
  .stat:nth-child(odd) {
    border-bottom: 0;
    border-right: var(--bw) solid var(--border);
  }
  .stats__grid .stat:last-child {
    border-right: 0;
  }
}

/* Each figure sits inside a geometric container; every 3rd is rotated. */
.stat__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--fg);
  color: var(--white);
  border: var(--bw) solid var(--border);
}

.stat:nth-child(2) .stat__mark {
  border-radius: 9999px;
  background: var(--red);
}

.stat:nth-child(3) .stat__mark {
  transform: rotate(45deg);
  background: var(--blue);
}

.stat:nth-child(3) .stat__mark svg {
  transform: rotate(-45deg); /* counter-rotate the content */
}

.stat:nth-child(4) .stat__mark {
  background: var(--white);
  color: var(--fg);
}

.stat__value {
  display: block;
  font-size: 1.625rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat__label {
  display: block;
  margin-top: var(--s1);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* --- Steps: rotated number plates ---------------------------------------- */

.steps__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .steps__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .steps__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step__num {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: var(--s6);
  background: var(--white);
  border: var(--bw-strong) solid var(--border);
  box-shadow: var(--shadow-md);
  transform: rotate(45deg);
  font-size: 1.375rem;
  font-weight: 900;
}

.step__num span {
  transform: rotate(-45deg); /* counter-rotate so the digit reads flat */
}

.step:nth-child(1) .step__num {
  background: var(--red);
  color: var(--white);
}
.step:nth-child(2) .step__num {
  background: var(--blue);
  color: var(--white);
}
.step:nth-child(3) .step__num {
  background: var(--yellow);
}

.step h3 {
  margin-bottom: var(--s3);
}

.step p {
  font-size: 1rem;
}

/* --- Benefits: red block -------------------------------------------------- */

.benefits {
  background: var(--red);
  color: var(--white);
}

.benefits .section-label {
  color: var(--yellow);
}

.benefits__grid {
  display: grid;
  gap: var(--s6);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .benefits__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.benefit {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
}

.benefit__check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: var(--yellow);
  border: var(--bw) solid var(--border);
  color: var(--fg);
}

.benefit h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--s1);
}

.benefit p {
  font-size: 1rem;
  margin: 0;
}

/* --- FAQ accordion -------------------------------------------------------- */

.faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  max-width: 56rem;
}

.faq__item {
  background: var(--white);
  border: var(--bw-strong) solid var(--border);
  box-shadow: var(--shadow-md);
}

.faq__item h3 {
  margin: 0;
}

.faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  width: 100%;
  padding: var(--s4) var(--s6);
  background: none;
  border: 0;
  color: inherit;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-align: left;
  line-height: 1.25;
  cursor: pointer;
  transition:
    background-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.faq__trigger svg {
  flex: 0 0 auto;
  transition: transform var(--dur) var(--ease);
}

/* Open state: red header, white text, chevron flipped. */
.faq__trigger[aria-expanded="true"] {
  background: var(--red);
  color: var(--white);
}

.faq__trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Collapsed panels are hidden from assistive tech too, not just visually. */
.faq__panel {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  background: var(--wash);
  transition:
    max-height 300ms var(--ease),
    visibility 300ms var(--ease);
}

.faq__panel[data-open="true"] {
  visibility: visible;
}

/* No-JS fallback: every answer stays readable. */
.no-js .faq__panel {
  max-height: none;
  visibility: visible;
}

.faq__panel-inner {
  padding: var(--s6);
  border-top: var(--bw-strong) solid var(--border);
  font-size: 1rem;
}

.faq__panel-inner p:last-child {
  margin-bottom: 0;
}

/* --- Final CTA: yellow block with corner shapes -------------------------- */

.cta {
  position: relative;
  overflow: hidden;
  background: var(--yellow);
  text-align: center;
}

.cta__shape {
  position: absolute;
  opacity: 0.5;
  border: var(--bw-strong) solid var(--border);
  pointer-events: none;
}

.cta__shape--circle {
  width: 200px;
  height: 200px;
  border-radius: 9999px;
  background: var(--red);
  top: -70px;
  left: -70px;
}

.cta__shape--square {
  width: 180px;
  height: 180px;
  background: var(--blue);
  right: -60px;
  bottom: -70px;
  transform: rotate(45deg);
}

.cta__inner {
  position: relative;
  max-width: 44rem;
  margin-inline: auto;
}

.cta h2 {
  margin-bottom: var(--s4);
}

.cta p {
  margin-bottom: 32px;
  font-size: 1.125rem;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s4);
}
