/* By Damian — the closing sections: How I work (#how), Plan & pricing (#pricing), FAQ (#faq),
   Contact (#contact) and the footer. Calmer than the hero: clarity first, subtle motion.

   html.closing-anim (set by closing.js; never with reduced motion or ?static): .reveal blocks
   start slightly lower and transparent and settle in when they reach the screen (.is-in).
   Whatever is already on screen at load is marked .is-in first, so nothing flickers. */

/* ---------- Shared ---------- */
.sec-label {
  margin: 0 0 clamp(18px, 3svh, 32px);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}
.is-light .sec-label { color: #6E6E69; }
.sec-title {
  margin: 0 auto;
  max-width: 900px;
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: var(--display-weight);
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: var(--display-tracking);
  text-align: center;
  text-wrap: balance;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: #FFD23F; }

/* Light sections (bone): dark text. */
.is-light { background: var(--next-bg); color: var(--bg); }

/* Entrance */
.closing-anim .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
}
.closing-anim .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 5 · How I work ---------- */
.how { background: var(--bg); color: var(--ink); }
.how__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(96px, 14svh, 160px) clamp(16px, 4vw, 56px) clamp(88px, 12svh, 140px);
}
.steps {
  --fill: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
  margin: clamp(48px, 8svh, 88px) 0 0;
  padding: 0;
  list-style: none;
}
/* The line joining the numbers: grey track + yellow fill (closing.js sets where it starts and
   ends, --a / --b, and how full it is, --fill, from the scroll). */
.steps::before,
.steps::after {
  content: '';
  position: absolute;
  top: 27px;
  left: var(--a, 16.6%);
  width: calc(var(--b, 83.3%) - var(--a, 16.6%));
  height: 2px;
  border-radius: 2px;
  background: rgba(138, 138, 133, 0.3);
}
.steps::after {
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--fill));
}
.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.step__num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(138, 138, 133, 0.45);
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: var(--display-weight);
  font-size: 1rem;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.step.is-on .step__num { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.step__name {
  margin: 22px 0 10px;
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: var(--display-weight);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  letter-spacing: -0.01em;
}
.step__text { max-width: 320px; margin: 0; color: rgba(237, 235, 230, 0.78); font-size: 1rem; line-height: 1.55; }
.step__note {
  margin: 14px 0 0;
  padding: 6px 12px;
  border: 1px solid rgba(138, 138, 133, 0.35);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- 6 · Plan & pricing ---------- */
.pricing__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(96px, 14svh, 150px) clamp(16px, 4vw, 56px) clamp(64px, 9svh, 100px);
}
.plan {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: 'main side' 'after after';
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(28px, 4.5vw, 56px);
  border-radius: 28px;
  background: #FAF9F6;
  box-shadow: 0 40px 80px -48px rgba(31, 31, 31, 0.35), 0 0 0 1px rgba(31, 31, 31, 0.06);
}
.plan__main { grid-area: main; }
.plan__side { grid-area: side; }
.plan__after {
  grid-area: after;
  padding-top: clamp(24px, 3.5vw, 40px);
  border-top: 1px solid rgba(31, 31, 31, 0.1);
}
.plan__name { margin: 0; font: 600 1.05rem/1.3 var(--font-body); }
.plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 8px 0 0; }
.plan__amount {
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: var(--display-weight);
  font-size: clamp(4rem, 9vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.plan__unit { color: #6E6E69; font-size: 0.95rem; }
.plan__spots { display: grid; gap: 10px; margin-top: 22px; }
.plan__spots[hidden] { display: none; }
.plan__count { margin: 0; font-weight: 600; font-size: 1rem; }
.plan__only { margin: 8px 0 0; color: #6E6E69; font-size: 0.92rem; line-height: 1.5; }
.plan__h {
  margin: clamp(26px, 3.6vw, 36px) 0 14px;
  color: #6E6E69;
  font: 600 0.74rem/1.2 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.plan__side .plan__h,
.plan__after .plan__h { margin-top: 0; }

.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay__part {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--next-bg);
  box-shadow: inset 0 3px 0 var(--accent);
}
.pay__pct { margin: 0; font-weight: 700; font-size: 1.05rem; }
.pay__text { margin: 6px 0 0; color: #4A4A46; font-size: 0.9rem; line-height: 1.45; }
.pay__guarantee { margin: 14px 0 0; font-size: 0.95rem; font-weight: 500; line-height: 1.5; }

.incl { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.incl li {
  position: relative;
  padding-left: 36px;
  font-size: 1.02rem;
  line-height: 1.45;
}
.incl li::before { /* yellow dot with a graphite check */
  content: '';
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
}
.incl li::after {
  content: '';
  position: absolute;
  left: 8px;
  top: calc(0.05em + 5px);
  width: 5px;
  height: 9px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { padding: 18px 20px; border: 1px solid rgba(31, 31, 31, 0.14); border-radius: 16px; }
.opt__name { margin: 0; font-weight: 700; font-size: 1.05rem; }
.opt__text { margin: 6px 0 0; color: #4A4A46; font-size: 0.92rem; line-height: 1.45; }
.plan__cta { margin-top: clamp(22px, 3vw, 32px); }

.parts { margin-top: clamp(64px, 10svh, 112px); }
.parts__title {
  margin: 0 0 clamp(24px, 4svh, 40px);
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: var(--display-weight);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  letter-spacing: var(--display-tracking);
  line-height: 1.1;
  text-align: center;
  text-wrap: balance;
}
.parts__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.5vw, 28px); }
.part { padding: clamp(22px, 3vw, 32px); border: 1px solid rgba(31, 31, 31, 0.12); border-radius: 20px; }
.part__name { margin: 0 0 10px; font: 700 1.15rem/1.3 var(--font-body); }
.part__text { margin: 0; color: #4A4A46; font-size: 1rem; line-height: 1.6; }

/* ---------- 7 · FAQ ---------- */
.faq { interpolate-size: allow-keywords; }
.faq__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(48px, 7svh, 80px) clamp(16px, 4vw, 56px) clamp(96px, 14svh, 150px);
  border-top: 1px solid rgba(31, 31, 31, 0.1);
}
.faq__list { border-top: 1px solid rgba(31, 31, 31, 0.14); }
.qa { border-bottom: 1px solid rgba(31, 31, 31, 0.14); }
.qa__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 18px 2px;
  font-weight: 600;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}
.qa__q::-webkit-details-marker { display: none; }
.qa__q i { /* "+" that turns into "×" */
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(31, 31, 31, 0.2);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.qa__q i::before,
.qa__q i::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.8px;
  margin: -0.9px 0 0 -6px;
  border-radius: 2px;
  background: currentColor;
}
.qa__q i::after { transform: rotate(90deg); }
.qa[open] .qa__q i { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); }
.qa__q:hover i { border-color: rgba(31, 31, 31, 0.45); }
.qa__a p { margin: 0; padding: 0 48px 22px 2px; color: #4A4A46; font-size: 1rem; line-height: 1.6; }
/* Smooth open/close where the browser supports it; instant elsewhere. */
.qa::details-content {
  height: 0;
  overflow: clip;
  transition: height 0.4s var(--ease), content-visibility 0.4s allow-discrete;
}
.qa[open]::details-content { height: auto; }

/* ---------- 8 · Contact ---------- */
.contact { background: var(--bg); color: var(--ink); }
.contact__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 92vh;
  min-height: 92svh;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(96px, 14svh, 150px) clamp(16px, 4vw, 56px);
  text-align: center;
}
.contact__title {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: var(--display-weight);
  font-size: clamp(2.1rem, 5.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
}
/* Two buttons with exactly the same weight. */
.contact__btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: min(100%, 660px);
  margin-top: clamp(36px, 6svh, 56px);
}
.btn--contact {
  min-height: 60px;
  border: 1px solid rgba(237, 235, 230, 0.4);
  color: var(--ink);
  font-size: 1.02rem;
}
.btn--contact svg { width: 21px; height: 21px; flex: none; }
.btn--contact span { white-space: nowrap; }
.btn--contact:hover { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.contact__small { margin: 18px 0 0; color: var(--muted); font-size: 0.88rem; }
.contact__pending {
  margin: 14px 0 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.5;
}
.contact__pending[hidden] { display: none; }
.contact__pending a { color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px 24px;
  padding: 28px clamp(16px, 4vw, 56px) max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer p { margin: 0; }
.footer__brand {
  justify-self: start;
  color: var(--ink);
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: var(--display-weight);
  font-size: 0.95rem;
  text-decoration: none;
}
.footer__meta { justify-self: end; }
.footer__meta a { color: var(--ink); text-underline-offset: 3px; }
.footer__meta a:hover { color: var(--accent); }

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 36px; }
  /* Vertical line on the left, joining the numbers top to bottom. */
  .steps::before,
  .steps::after {
    top: var(--a, 28px);
    left: 27px;
    width: 2px;
    height: calc(var(--b, 100%) - var(--a, 28px));
  }
  .steps::after { transform-origin: 50% 0; transform: scaleY(var(--fill)); }
  .step { display: block; padding-left: 80px; text-align: left; min-height: 56px; }
  .step__num { position: absolute; left: 0; top: 0; }
  .step__name { margin: 12px 0 8px; }
  .step__text { max-width: none; }
  .step__note { display: inline-block; }

  .plan { grid-template-columns: 1fr; grid-template-areas: 'main' 'side' 'after'; border-radius: 22px; }
  .plan__side { padding-top: 24px; border-top: 1px solid rgba(31, 31, 31, 0.1); }
  .pay, .opts, .parts__grid { grid-template-columns: 1fr; }
  .plan__cta { width: 100%; }

  .qa__a p { padding-right: 8px; }

  .contact__btns { grid-template-columns: 1fr; }

  .footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer__brand, .footer__meta { justify-self: center; }
}

/* ---------- Reduced motion / ?static: everything finished, nothing moves ---------- */
.is-static .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.is-static .step__num,
.is-static .qa__q i,
.is-static .qa::details-content { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .qa::details-content, .qa__q i, .btn { transition: none; }
}
