/* =========================================================
   The Pain-Free Body Guide
   Design system: navy/blue brand, terracotta CTA, warm neutrals.
   Audience skews 45+ (90%) and 65+ (50%), so type runs large,
   contrast stays high, tap targets are generous, and motion is calm.
   ========================================================= */

/* -------------------- Tokens -------------------- */

:root {
  /* ink */
  --ink-900: #0F1C24;
  --ink-800: #16222B;
  --ink-700: #1E2C35;
  --ink-600: #33424C;
  --body: #4C5A64;
  --body-2: #55636D;
  --muted: #74848F;
  --muted-2: #8496A1;
  --faint: #A2B2BC;
  --faint-2: #AFBFC9;

  /* surfaces */
  --surface: #FBFDFE;
  --surface-2: #F0F5F9;
  --tint-1: #E9F1F7;
  --tint-2: #F1F6FA;
  --tint-3: #E1EDF5;
  --tint-4: #EDF3F8;

  /* lines */
  --line: #DFE8EF;
  --line-2: #D8E2EA;
  --line-3: #E5EDF2;

  /* brand */
  --brand: #17608F;
  --brand-2: #1E719F;
  --brand-3: #2E86B0;
  --brand-ink: #F2F8FC;
  --brand-wash: rgba(23, 96, 143, 0.10);
  --brand-wash-2: rgba(23, 96, 143, 0.07);
  --brand-edge: rgba(23, 96, 143, 0.22);

  /* cta */
  --cta: #C6483F;
  --cta-ink: #FFF6F5;
  --cta-dark: #A93A32;
  --cta-shadow: rgba(198, 72, 63, 0.60);

  --maxw: 1280px;
  --gutter: 44px;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 24px;

  --shadow-card: 0 12px 26px -20px rgba(22, 34, 43, 0.35);
  --shadow-lift: 0 34px 70px -40px rgba(22, 34, 43, 0.40);

  --font-sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink-800);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
}

h1 {
  color: var(--ink-900);
  font-size: clamp(2.15rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.72rem, 3.2vw, 2.38rem);
  letter-spacing: -0.015em;
}

h2 b, h1 b { font-weight: 800; }
h2 .accent { color: var(--brand); font-weight: 800; }

h3 { font-size: 1.06rem; font-weight: 700; color: var(--ink-800); }

p { margin: 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(52px, 5.6vw, 80px) 0; }

.section-head { margin-bottom: clamp(32px, 3.4vw, 48px); }
.section-head.is-center { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.section-head p {
  margin-top: 14px;
  font-size: clamp(1rem, 1.2vw, 1.06rem);
  color: var(--body);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.bg-surface { background: var(--surface); }
.bg-soft    { background: var(--surface-2); }
.bg-tint    { background: linear-gradient(180deg, var(--tint-1) 0%, var(--tint-2) 100%); }
.bg-tint-r  { background: linear-gradient(180deg, var(--tint-2) 0%, var(--tint-1) 100%); }

/* -------------------- Buttons -------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 19px 36px;
  min-height: 58px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

.btn-cta {
  background: var(--cta);
  color: var(--cta-ink);
  box-shadow: 0 14px 28px -12px var(--cta-shadow);
}
.btn-cta:hover { background: #b84038; box-shadow: 0 18px 34px -12px var(--cta-shadow); }

.btn-onblue {
  background: var(--cta-ink);
  color: var(--cta-dark);
  box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.35);
}
.btn-onblue:hover { background: #fff; }

.btn-block { width: 100%; }
.btn-lg { font-size: 1.12rem; min-height: 64px; padding: 20px 40px; }

/* price note that sits beside a CTA */
.price-note {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.02rem;
  color: var(--muted-2);
}
.price-note s { text-decoration: line-through; }

.tag-save {
  background: var(--brand);
  color: #EFF6FB;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 13px;
  border-radius: 8px;
}

/* -------------------- Discount banner -------------------- */

.promo {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 60%, var(--brand-3) 100%);
  color: #F4FAFD;
}

.promo .container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-top: 11px;
  padding-bottom: 11px;
  text-align: center;
}

.promo__text { font-size: 0.96rem; font-weight: 600; }
.promo__text s { opacity: 0.72; font-weight: 400; }

.promo__tag {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.promo__link {
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 2px;
  white-space: nowrap;
}
.promo__link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

@media (max-width: 760px) {
  /* Scrolls away on phones — a pinned bar eats too much of a short
     viewport, and the sticky CTA at the bottom already carries the price. */
  .promo { position: static; }
  .promo .container {
    gap: 0 9px;
    padding-top: 7px;
    padding-bottom: 7px;
    flex-wrap: nowrap;
  }
  .promo__text { font-size: 0.82rem; white-space: nowrap; }
  .promo__text .promo__lead { display: none; }
  .promo__tag { font-size: 0.66rem; padding: 2px 8px; }
  .promo__link { font-size: 0.8rem; padding: 4px 0; }
}

@media (max-width: 380px) {
  .promo__link { display: none; }
}

/* -------------------- Hero -------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(168deg, var(--tint-3) 0%, var(--tint-4) 62%, var(--surface) 100%);
  padding: clamp(30px, 3.4vw, 46px) 0 clamp(44px, 4.5vw, 60px);
}

.hero::before {
  content: "";
  position: absolute;
  width: 620px; height: 620px;
  right: -140px; top: -260px;
  background: radial-gradient(circle at 30% 30%, rgba(23,96,143,0.13) 0%, rgba(23,96,143,0) 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(22px, 2.6vw, 34px);
  padding: 0;
  list-style: none;
}

.hero-pills li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--brand-wash);
  border: 1px solid var(--brand-edge);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
}

.hero-pills li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

.hero-pills .emoji { width: 17px; height: 17px; flex: none; }

/* Provided as small bitmaps, so cap the rendered size and let the
   browser smooth rather than sharpen them. */
.emoji { display: inline-block; image-rendering: auto; }

.hero-lede {
  margin-top: clamp(18px, 2vw, 26px);
  font-size: clamp(1.04rem, 1.35vw, 1.16rem);
  line-height: 1.6;
  color: var(--body);
  max-width: 30em;
}

.hero-actions {
  margin-top: clamp(24px, 2.8vw, 34px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 22px;
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(22px, 2.4vw, 30px);
  font-size: 0.92rem;
  color: var(--body);
}
.hero-rating b { color: var(--ink-800); }

.stars {
  color: var(--cta);
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  line-height: 1;
}

/* hero media — main creative plus a thumbnail strip */
.hero-media { display: grid; gap: clamp(12px, 1.6vw, 16px); min-width: 0; }

.hero-shot {
  padding: 0;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow-lift);
  display: block;
  width: 100%;
}
.hero-shot img { width: 100%; display: block; }
.hero-shot:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(6px, 0.9vw, 11px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-thumbs button {
  padding: 0;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  width: 100%;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hero-thumbs button:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.hero-thumbs button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.hero-thumbs img { width: 100%; display: block; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { order: 2; }
  .hero-actions .btn { width: 100%; }
  .hero-actions { gap: 14px; }
  .price-note { width: 100%; justify-content: center; }
  .hero-rating { justify-content: flex-start; }
}

/* -------------------- Pain-point cards -------------------- */

.pain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pain-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 26px 25px 28px;
}

.pain-card .ico {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--brand-wash);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.pain-card .ico .emoji { width: 19px; height: 19px; }

.pain-card h3 { margin-bottom: 8px; font-size: 1.05rem; line-height: 1.3; }
.pain-card p { font-size: 0.92rem; color: var(--body-2); line-height: 1.55; }

@media (max-width: 1040px) { .pain-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 700px) {
  .pain-grid { grid-template-columns: 1fr; gap: 12px; }
  .pain-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 16px;
    padding: 20px;
  }
  .pain-card .ico { margin-bottom: 0; grid-row: span 2; }
  .pain-card h3 { margin-bottom: 4px; align-self: center; }
}

/* -------------------- Image bands -------------------- */

/* Fullscreen image viewer */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 28, 36, 0.93);
}
.viewer.is-open { display: flex; }
.viewer img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 12px;
}
.viewer__close {
  position: absolute;
  top: 18px; right: 18px;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--ink-800);
  font-size: 1.35rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.viewer__close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* -------------------- What's inside -------------------- */

.inside-grid {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 340px) 1fr;
  gap: clamp(24px, 3vw, 46px);
  align-items: center;
}

.chapter {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 15px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.chapter:last-child { border-bottom: 0; }

.chapter .num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--faint);
  padding-top: 3px;
}

.chapter h3 { margin-bottom: 5px; }
.chapter p { font-size: 0.92rem; color: var(--body-2); line-height: 1.5; }

/* fanned page preview */
.page-fan {
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
}
.page-fan img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  box-shadow: 0 22px 44px -26px rgba(15, 28, 36, 0.55);
  background: #fff;
}
.page-fan img:nth-child(1) { transform: rotate(-7deg) translate(-7%, 2%) scale(0.94); }
.page-fan img:nth-child(2) { transform: rotate(6deg) translate(7%, -1%) scale(0.94); }
.page-fan img:nth-child(3) { transform: rotate(-1deg); }

.inside-cta { margin-top: clamp(34px, 3.6vw, 48px); text-align: center; }

@media (max-width: 940px) {
  .inside-grid { grid-template-columns: 1fr; }
  /* Narrower than the column so the fan's rotate/translate stays on-screen. */
  .page-fan { order: -1; width: min(80%, 290px); margin: 0 auto clamp(10px, 2vw, 20px); }
  .inside-cta .btn { width: 100%; }
}

/* -------------------- Stats band -------------------- */

.stats-band { background: var(--brand); color: var(--brand-ink); }
.stats-band .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: clamp(40px, 4vw, 56px);
  padding-bottom: clamp(40px, 4vw, 56px);
}

.stat { text-align: center; }
.stat b {
  display: block;
  font-size: clamp(1.62rem, 2.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
}
.stat span {
  font-size: 0.9rem;
  color: rgba(242, 248, 252, 0.72);
}

@media (max-width: 700px) {
  .stats-band .container { grid-template-columns: 1fr; }
  .stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    padding: 16px 4px;
    border-bottom: 1px solid rgba(242, 248, 252, 0.12);
  }
  .stat:last-child { border-bottom: 0; }
  .stat span { text-align: right; }
}

/* -------------------- Comparison table -------------------- */

.compare-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

table.compare th,
table.compare td {
  padding: 17px 16px;
  text-align: center;
  vertical-align: middle;
}

table.compare thead th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--body);
  font-size: 0.9rem;
}

table.compare thead th.is-guide {
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
}

table.compare tbody td.is-guide { background: var(--brand-wash-2); }

table.compare th:first-child,
table.compare td:first-child {
  text-align: left;
  padding-left: 24px;
  color: var(--ink-600);
  font-weight: 400;
  width: 34%;
}

table.compare tbody tr { border-top: 1px solid var(--line-3); }

.mark-yes { color: var(--brand); font-weight: 700; font-size: 1.05rem; }
.mark-yes-dim { color: var(--faint-2); font-size: 1.05rem; }
.mark-no { color: var(--faint-2); font-size: 1.05rem; }

@media (max-width: 720px) {
  table.compare { font-size: 0.84rem; }
  table.compare th, table.compare td { padding: 13px 8px; }
  table.compare th:first-child,
  table.compare td:first-child { padding-left: 14px; width: 40%; line-height: 1.35; }
  table.compare thead th { font-size: 0.78rem; }
}

/* -------------------- Testimonials -------------------- */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.testimonial {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 27px 26px 24px;
  display: flex;
  flex-direction: column;
}

.testimonial .stars { font-size: 0.98rem; margin-bottom: 16px; }

.testimonial blockquote {
  margin: 0 0 auto;
  font-family: var(--font-serif);
  font-size: 1.04rem;
  line-height: 1.55;
  color: var(--ink-700);
}

.who {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 24px;
}

.who .avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex: none;
  background: #DCE7EE;
  border: 1px solid rgba(23, 96, 143, 0.20);
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
}

.who b { display: block; font-size: 0.9rem; color: var(--ink-800); }
.who span { font-size: 0.79rem; color: var(--muted); }

@media (max-width: 900px) {
  .testimonial-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 6px;
  }
  .testimonial-grid::-webkit-scrollbar { display: none; }
  .testimonial {
    flex: 0 0 280px;
    scroll-snap-align: center;
  }
}

.dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}
.dots i {
  width: 8px; height: 4px;
  border-radius: 4px;
  background: #C4D2DC;
  transition: width 0.2s ease, background 0.2s ease;
}
.dots i.is-on { width: 22px; background: var(--brand); }

@media (max-width: 900px) { .dots { display: flex; } }

/* -------------------- Pricing card -------------------- */

.price-card {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(173deg, #fff 0%, #F3F8FC 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lift);
  padding: clamp(26px, 3.4vw, 45px);
}

.price-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 18px 0 6px;
}
.price-row s { font-size: 1.5rem; color: var(--muted-2); }
.price-row .now {
  font-size: clamp(3rem, 5.2vw, 4.25rem);
  font-weight: 800;
  color: var(--ink-900);
  line-height: 1;
  letter-spacing: -0.03em;
}

.price-sub { font-size: 0.92rem; font-weight: 600; color: var(--cta); }

.price-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: clamp(22px, 2.6vw, 30px) 0;
}

.includes {
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(26px, 3vw, 34px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 26px;
}

.includes li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  font-size: 0.98rem;
  color: var(--ink-600);
  line-height: 1.35;
}
.includes li::before {
  content: "✓";
  color: var(--brand);
  font-weight: 700;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 30px;
  margin-top: 22px;
}

.trust-row li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--body);
}

.trust-row .bullet {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(23, 96, 143, 0.12);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex: none;
}

@media (max-width: 620px) {
  .includes { grid-template-columns: 1fr; gap: 13px; }
  .price-card__top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .trust-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

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

.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: none;
  border: 0;
  text-align: left;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink-800);
  padding: 20px 24px;
  min-height: 62px;
  cursor: pointer;
}
.faq-q:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }

.faq-q .sign {
  flex: none;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--brand);
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq-item[data-open="true"] .sign { transform: rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-a > div {
  padding: 0 24px 22px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--body-2);
}

/* -------------------- Closing band -------------------- */

.closing {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 58%, var(--brand-3) 100%);
  color: #F4FAFD;
  text-align: center;
}

.closing::before {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  left: -140px; top: -280px;
  background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

.closing .container { position: relative; }
.closing h2 { color: #F4FAFD; font-size: clamp(1.85rem, 3.5vw, 2.6rem); }
.closing p {
  margin: 18px auto 0;
  max-width: 34em;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: rgba(244, 250, 253, 0.82);
}
.closing .btn { margin-top: clamp(26px, 3vw, 34px); }
.closing .fineprint {
  margin-top: 18px;
  font-size: 0.94rem;
  color: rgba(244, 250, 253, 0.70);
}
.closing .fineprint s { text-decoration: line-through; }

@media (max-width: 620px) { .closing .btn { width: 100%; } }

/* -------------------- Footer -------------------- */

.site-footer {
  background: var(--ink-800);
  color: rgba(237, 242, 245, 0.72);
  padding: 26px 0;
  font-size: 0.86rem;
}

.site-footer .container {
  display: flex;
  align-items: center;
  gap: 16px 34px;
  flex-wrap: wrap;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #EDF2F5;
  font-weight: 700;
  font-size: 0.92rem;
}

.brand-mark {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--surface);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex: none;
}
.site-footer .brand-mark { background: var(--brand-3); color: #F4FAFD; }

.footer-links { display: flex; gap: 10px 22px; flex-wrap: wrap; }
/* Generous hit area — the audience skews older, so no 20px-tall links. */
.footer-links a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
}
.footer-links a:hover { color: #fff; }

.site-footer .brand-lockup { min-height: 44px; }

.footer-fine {
  margin-left: auto;
  color: rgba(237, 242, 245, 0.42);
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .site-footer { text-align: center; }
  .site-footer .container { flex-direction: column; }
  .footer-links { justify-content: center; }
  .footer-fine { margin-left: 0; }
}

/* -------------------- Checkout modal -------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(15, 28, 36, 0.72);
  overflow-y: auto;
}
.modal.is-open { display: flex; }

.modal__panel {
  background: #fff;
  border-radius: var(--r-lg);
  width: min(100%, 520px);
  margin: auto;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.modal__head b { font-size: 1.02rem; color: var(--ink-800); }

.modal__close {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--ink-800);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.modal__close:hover { background: #e7eef3; }
.modal__close:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.modal__body { padding: 16px; min-height: 220px; }

.modal__loading {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 0.94rem;
}

.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--line-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------- Sticky mobile CTA -------------------- */

.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 253, 254, 0.98);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(15, 28, 36, 0.10);
}

.sticky-cta .p b { font-size: 1.05rem; color: var(--ink-900); font-weight: 800; }
.sticky-cta .p s { display: block; font-size: 0.76rem; color: var(--muted-2); }
.sticky-cta .btn { min-height: 50px; padding: 14px 26px; font-size: 0.98rem; }

@media (max-width: 760px) {
  .sticky-cta.is-visible { display: flex; }
  body.has-sticky { padding-bottom: 84px; }
}

/* -------------------- Success page -------------------- */

.success {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--tint-3) 0%, var(--tint-4) 30%, var(--surface) 60%);
  padding: clamp(28px, 3vw, 46px) 0 clamp(50px, 5vw, 76px);
  min-height: 100vh;
}

.success::before {
  content: "";
  position: absolute;
  width: 700px; height: 700px;
  left: 50%; top: -420px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 40%, rgba(23,96,143,0.12) 0%, rgba(23,96,143,0) 68%);
  pointer-events: none;
}

.success .container { position: relative; max-width: 720px; }

.success-brand { display: flex; justify-content: center; margin-bottom: clamp(28px, 3vw, 44px); }
.success-brand .brand-lockup { color: var(--ink-800); }

.success-check {
  width: clamp(88px, 9vw, 108px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(23, 96, 143, 0.12);
  display: grid;
  place-items: center;
}
.success-check i {
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 700;
  font-style: normal;
}

.success h1 {
  text-align: center;
  margin-top: clamp(22px, 2.6vw, 32px);
  font-size: clamp(1.95rem, 4vw, 3.1rem);
}

.success-sub {
  text-align: center;
  margin-top: 14px;
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  color: var(--body);
}
.success-sub b { color: var(--ink-800); font-weight: 600; }

.download-card {
  margin-top: clamp(28px, 3.2vw, 40px);
  background: linear-gradient(175deg, #fff 0%, #F3F8FC 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lift);
  padding: clamp(24px, 3vw, 34px);
}

.download-card__top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(18px, 2.4vw, 30px);
  align-items: center;
  margin-bottom: clamp(22px, 2.6vw, 30px);
}

.download-card__thumb {
  width: clamp(72px, 8vw, 96px);
  border-radius: 8px;
  box-shadow: 0 14px 28px -14px rgba(15, 28, 36, 0.5);
}

.download-card h2 { font-size: clamp(1.15rem, 2vw, 1.55rem); font-weight: 700; }

.filename {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
  word-break: break-all;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--body);
}

.pdf-badge {
  background: var(--brand-wash);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 7px;
}

.order-summary {
  margin-top: clamp(22px, 2.6vw, 30px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
}

.order-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.order-summary__row .name { font-size: 1.02rem; font-weight: 600; color: var(--ink-800); }
.order-summary__row .meta { font-size: 0.86rem; color: var(--muted); margin-top: 4px; }

.order-price { display: flex; align-items: baseline; gap: 12px; }
.order-price s { font-size: 1.06rem; color: var(--muted-2); }
.order-price b { font-size: 1.7rem; font-weight: 800; color: var(--ink-800); }

.paid-badge {
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 7px;
  align-self: center;
}

.start-here { margin-top: clamp(38px, 4vw, 56px); }
.start-here h2 { text-align: center; margin-bottom: clamp(22px, 2.6vw, 30px); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 21px 24px;
}

.step .n {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-wash);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 { margin-bottom: 8px; font-size: 1.02rem; }
.step p { font-size: 0.92rem; color: var(--body-2); line-height: 1.5; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .step {
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 16px;
    padding: 18px 20px;
  }
  .step .n { margin-bottom: 0; grid-row: span 2; }
  .step h3 { align-self: center; margin-bottom: 4px; }
  .download-card__top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* -------------------- Utility -------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--ink-800);
  color: #fff;
  padding: 14px 20px;
  border-radius: 8px;
  z-index: 999;
}
.skip-link:focus { left: 16px; top: 16px; }

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