/* Right Hand Program: palette, fonts and icon rules from docs/05_brand.md */
:root {
  --dark:    #1C2B25; /* Forest Ink */
  --primary: #C99A56; /* Brass */
  --light:   #F5F0E7; /* Paper */

  --font-head: "PT Serif", Georgia, serif;
  --font-body: "Lato", system-ui, sans-serif;

  --gutter: 20px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--light);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.875rem, 1.2rem + 3.2vw, 3.5rem); }
h2 { font-size: clamp(1.625rem, 1.2rem + 1.9vw, 2.5rem); max-width: 22ch; }
h3 { font-size: 1.1875rem; }

p { margin: 0 0 1em; }

a { color: inherit; }

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* Surfaces. Brass is only used as text, rules or icons on dark (5.80:1). */
.light { background: var(--light); color: var(--dark); }
.dark  { background: var(--dark);  color: var(--light); }
.dark .icon, .dark .eyebrow, .dark .proof strong, .dark .asterisk, .dark .marker { color: var(--primary); }
.light .icon, .light .marker { color: var(--dark); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

.section { padding: 64px 0; }
.light + .light { border-top: 1px solid rgb(28 43 37 / 0.15); }
.dark + .dark { border-top: 1px solid rgb(245 240 231 / 0.12); }

.lead { font-size: 1.1875rem; max-width: 60ch; }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* Editorial section markers: "01 — Track record" with a short rule */
.marker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.marker__rule { width: 32px; height: 2px; background: currentColor; flex: none; }

/* The one CTA style */
.cta {
  display: inline-block;
  background: var(--primary);
  color: var(--dark);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 6px;
  margin-top: 8px;
  transition: transform 0.2s var(--ease);
}
.cta:hover { transform: translateY(-2px); }
.cta:focus-visible { outline-color: var(--primary); }
.light .cta:focus-visible { outline-color: var(--dark); }

.under-cta { font-size: 0.9375rem; margin: 10px 0 0; }

.icon { width: 32px; height: 32px; flex: none; }

/* Cards: hover lift */
.card { transition: transform 0.25s var(--ease); }
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); }
}

/* 1. Hero */
.hero { display: flex; flex-direction: column; }
.hero__text { padding: 20px var(--gutter) 28px; }
.hero__logo { width: 190px; margin-bottom: 22px; }
.hero h1 { margin-bottom: 14px; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--primary); }
.hero .lead { font-size: 1.0625rem; margin-bottom: 14px; }
.hero .cta { margin-top: 0; }
.proof { font-size: 1.0625rem; margin: 14px 0 4px; }
.proof strong { font-family: var(--font-head); font-size: 1.5rem; }
.footnote { font-size: 0.8125rem; margin: 0; }
.hero__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Hero fade-up on load, staggered */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero__text > * { animation: fade-up 0.6s var(--ease) both; }
.hero__text > :nth-child(2) { animation-delay: 0.08s; }
.hero__text > :nth-child(3) { animation-delay: 0.16s; }
.hero__text > :nth-child(4) { animation-delay: 0.24s; }
.hero__text > :nth-child(5) { animation-delay: 0.32s; }
.hero__text > :nth-child(6) { animation-delay: 0.38s; }
.hero__text > :nth-child(7) { animation-delay: 0.44s; }
.hero__text > :nth-child(8) { animation-delay: 0.50s; }

/* Fade-up on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* 2. Social proof: dark band */
.stats {
  list-style: none; margin: 36px 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 16px;
}
.stats strong {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4rem);
  line-height: 1;
  margin-bottom: 6px;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.communities {
  font-size: 0.9375rem;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgb(245 240 231 / 0.18);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
}
.communities__label { width: 100%; }
/* Each name carries its own left rule; the list is shifted left and clipped, so the rule of
   whichever name starts a line is hidden. No stray divider when the row wraps. */
.communities__names { display: block; overflow: hidden; flex: 1 1 auto; }
.communities__list { display: flex; flex-wrap: wrap; row-gap: 10px; margin-left: -17px; }
.community {
  font-weight: 700;
  white-space: nowrap;
  padding: 0 16px;
  border-left: 1px solid rgb(245 240 231 / 0.3);
}
/* The " · " stays in the text (copy + screen readers) but is visually hidden */
.sep {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 3. Problem */
.split { display: grid; gap: 32px; }
.split__media img { border-radius: 6px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pull {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
  line-height: 1.3;
  margin: 28px 0;
  padding-left: 20px;
  border-left: 3px solid var(--primary); /* decorative rule, not text */
}

/* 4. How it works */
.steps {
  list-style: none; margin: 36px 0 32px; padding: 0;
  display: grid; gap: 16px; counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 24px;
  border: 1px solid rgb(245 240 231 / 0.15);
  border-radius: 8px;
}
.steps h3::before { content: counter(step) ". "; }
.steps .icon { margin-bottom: 12px; }
.steps p { margin: 0; }

/* 5. Benefits */
.benefits { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 28px; }
.benefits li { display: flex; gap: 16px; align-items: flex-start; }
.benefits h3 { margin-bottom: 4px; }
.benefits p { margin: 0; }

/* 6. More social proof */
.story { font-size: 1.125rem; margin-top: 28px; }
.disclaimer { font-size: 0.875rem; margin: 24px 0 0; }

/* 7. The offer */
.offer {
  margin-top: 32px;
  padding: 28px var(--gutter);
  border: 1px solid rgb(28 43 37 / 0.2);
  border-radius: 8px;
}
.offer h3 { margin-top: 24px; }
.offer h3:first-child { margin-top: 0; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.check { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--dark); }
.bonus { margin-top: 24px; }
.label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid var(--dark);
  border-radius: 4px;
  padding: 1px 8px;
  margin-top: 6px;
}
.price-block {
  margin: 28px calc(var(--gutter) * -1) -28px;
  padding: 28px var(--gutter);
  background: var(--dark);
  color: var(--light);
  border-radius: 0 0 8px 8px;
}
.price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 10px;
}
.price-note { font-size: 0.9375rem; }

/* 8. Guarantees */
.guarantees { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
.guarantees li {
  padding: 24px;
  border: 1px solid rgb(28 43 37 / 0.2);
  border-radius: 8px;
}
.guarantees .icon { margin-bottom: 12px; }
.guarantees li.guarantees__lead { background: var(--dark); color: var(--light); border-color: var(--dark); }
.guarantees__lead h3, .guarantees__lead .icon { color: var(--primary); }
.guarantees p { margin: 0; }

/* 9. Final CTA */
.final { display: flex; flex-direction: column; }
.final__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.final__text { padding: 48px var(--gutter) 64px; }

/* Lead form (GoHighLevel embed), full-width row at the bottom of the final CTA section */
.apply { padding: 0 var(--gutter) 64px; scroll-margin-top: 24px; }
.apply__form { max-width: 640px; margin: 0 auto; }
.apply__form iframe { display: block; }

/* Mobile sticky CTA */
.sticky-cta { display: none; }
@media (max-width: 719px) {
  .sticky-cta {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgb(245 240 231 / 0.15);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  .sticky-cta.is-shown { transform: none; visibility: visible; transition: transform 0.3s var(--ease), visibility 0s; }
  .sticky-cta .cta { display: block; text-align: center; margin: 0; }
  body { padding-bottom: 80px; } /* keep the final CTA clear of the bar */
}

/* Tablet and up */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .section { padding: 88px 0; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); gap: 32px 40px; }
  .guarantees { grid-template-columns: repeat(3, 1fr); }
  .offer { padding: 40px; }
  .price-block { margin: 32px -40px -40px; padding: 32px 40px; }
  .communities__label { width: auto; }
}

/* Desktop: hero and final CTA side by side, text on the solid dark column */
@media (min-width: 960px) {
  .hero { flex-direction: row; min-height: min(100vh, 820px); }
  .hero__text {
    flex: 0 0 46%;
    display: flex; flex-direction: column; justify-content: center;
    padding: 40px 48px 40px max(48px, calc((100vw - var(--max)) / 2 + 32px));
  }
  .hero__logo { width: 210px; margin-bottom: 28px; }
  .hero h1 { font-size: clamp(2.25rem, 1rem + 2.4vw, 3.125rem); }
  .hero .lead { font-size: 1.125rem; }
  .hero__media { flex: 1; }
  .hero__media img { height: 100%; aspect-ratio: auto; object-position: 70% center; }

  .split { grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .benefits { grid-template-columns: repeat(3, 1fr); }

  .final { flex-direction: row-reverse; flex-wrap: wrap; }
  .apply { flex: 0 0 100%; padding-top: 64px; padding-bottom: 88px; }
  .final__media { flex: 1; }
  .final__media img { height: 100%; aspect-ratio: auto; }
  .final__text {
    flex: 0 0 46%;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    padding: 88px 48px 88px max(48px, calc((100vw - var(--max)) / 2 + 32px));
  }
}

/* Everything off under reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__text > * { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cta, .card, .sticky-cta, .sticky-cta.is-shown { transition: none; }
  .cta:hover, .card:hover { transform: none; }
}
