/* ============================================================
   HOW IT WORKS PAGES — INDEX-MATCHING STYLES
   Sized, spaced, and typeset to match the home page exactly.
   - Section padding: matches .hiw-section pattern from home
   - Inner max-width: matches --max-w (1100px)
   - H2 type ramp: matches .hiw-head h2 (clamp 34→54px)
   - Body p: matches .hiw-head p (17px / 1.65)
   - Bottom CTA: clones .hiw-outro-cta verbatim (purple band with
     yellow eyebrow, white H2, yellow Fraunces em, yellow pill,
     SVG noise overlay, top-yellow + bottom-plum radial gradients)
   ============================================================ */

/* ── HERO ───────────────────────────────────────────────────── */
.hw-hero {
  position: relative;
  background: var(--soft);
  padding: calc(var(--nav-height) + 90px) var(--section-pad-h) 90px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.hw-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 25% 30%, rgba(124,58,237,0.08) 0%, transparent 65%),
    radial-gradient(ellipse 50% 45% at 80% 80%, rgba(255,202,1,0.06) 0%, transparent 60%);
  z-index: -1;
}
.hw-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.hw-hero .section-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
  display: inline-block;
  margin-bottom: 18px;
}
.hw-hero h1 {
  font-family: var(--font-body);
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -2.4px;
  color: var(--ink);
  font-weight: 500;
  margin: 0 auto 22px;
  max-width: 18ch;
  text-wrap: balance;
}
.hw-hero h1 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--purple);
  letter-spacing: -1.5px;
}
.hw-hero p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--mid);
  font-weight: 300;
  max-width: 580px;
  margin: 0 auto;
}

/* ── BODY ───────────────────────────────────────────────────── */
.hw-body {
  background: white;
  padding: 110px var(--section-pad-h) 120px;
}
.hw-body-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  align-items: start;
}

/* ── SIDEBAR ────────────────────────────────────────────────── */
.hw-toc {
  position: sticky;
  top: 110px;
  align-self: start;
}
.hw-toc h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
  margin: 0 0 18px;
}
.hw-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: hw-toc-counter;
}
.hw-toc li {
  margin: 0 0 4px;
  counter-increment: hw-toc-counter;
}
.hw-toc a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.2s ease, border-left-color 0.2s ease, background-color 0.2s ease;
  border-radius: 0 6px 6px 0;
  line-height: 1.4;
}
.hw-toc a::before {
  content: counter(hw-toc-counter, decimal-leading-zero);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--purple);
  opacity: 0.65;
  flex-shrink: 0;
  font-feature-settings: "tnum";
}
.hw-toc a:hover {
  color: var(--purple);
  border-left-color: var(--purple);
  background: var(--lavender);
}
.hw-toc a.is-active {
  color: var(--purple);
  border-left-color: var(--purple);
  background: var(--lavender);
  font-weight: 600;
}
.hw-toc a.is-active::before { opacity: 1; }

/* ── CONTENT (matches home page typography) ─────────────────── */
.hw-content { }
.hw-section {
  margin-bottom: 32px;
  scroll-margin-top: 120px;
}
.hw-section:last-child { margin-bottom: 0; }

.hw-section-head {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}
.hw-section-num {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
  display: inline-block;
  margin-bottom: 14px;
}
/* Match home page section heading type ramp (.hiw-head h2) */
.hw-section h2 {
  font-family: var(--font-body);
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.05;
  letter-spacing: -1.4px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.hw-section h2 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--purple);
}

/* Body paragraphs match the .hiw-head p / .ed-body type */
.hw-section p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--mid);
  font-weight: 300;
  margin: 0 0 18px;
}
.hw-section p:last-child { margin-bottom: 0; }
.hw-section p strong {
  color: var(--ink);
  font-weight: 600;
}
.hw-section p em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--purple);
  letter-spacing: -0.3px;
}

/* Lists match the home page tick-list voice */
.hw-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.hw-section ul li {
  position: relative;
  padding-left: 24px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--mid);
  font-weight: 300;
  margin-bottom: 12px;
}
.hw-section ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}
.hw-section ul li strong {
  color: var(--ink);
  font-weight: 600;
}

/* ── CALLOUT CARDS ───────────────────────────────────────────── */
.hw-callout {
  background: var(--soft);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 8px 0 18px;
}
.hw-callout-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
  display: block;
  margin-bottom: 10px;
}
.hw-callout p {
  margin-bottom: 12px;
}
.hw-callout p:last-child { margin-bottom: 0; }

.hw-callout--note {
  background: var(--lavender);
  border-color: var(--purple-light);
}

/* ── INLINE LINKS ───────────────────────────────────────────── */
.hw-content a:not(.hw-outro-btn):not(.hw-midcta-btn) {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-color: rgba(124, 58, 237, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease;
}
.hw-content a:not(.hw-outro-btn):not(.hw-midcta-btn):hover {
  text-decoration-color: var(--purple);
}

/* ============================================================
   MID-PAGE CTA CARD
   Lighter card sitting between sections, on white. Lavender
   background, purple border, single yellow pill button. Catches
   readers mid-scroll without competing with the big bottom CTA.
   ============================================================ */
.hw-midcta {
  margin: 56px 0;
  padding: 36px 40px;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(124,58,237,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(255,202,1,0.08) 0%, transparent 55%),
    var(--lavender);
  border: 1px solid var(--purple-light);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.hw-midcta-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
  display: inline-block;
}
.hw-midcta h3 {
  font-family: var(--font-body);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.8px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  max-width: 28ch;
}
.hw-midcta h3 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--purple);
  letter-spacing: -0.4px;
}
.hw-midcta p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--mid);
  font-weight: 300;
  margin: 0;
  max-width: 56ch;
}
.hw-midcta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--purple);
  color: white;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}
.hw-midcta-btn:hover {
  background: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(28, 18, 41, 0.20);
}
.hw-midcta-btn svg {
  width: 14px; height: 14px;
  stroke-width: 2.2;
  transition: transform 0.2s ease;
}
.hw-midcta-btn:hover svg {
  transform: translateX(2px);
}

@media (max-width: 720px) {
  .hw-midcta {
    margin: 40px 0;
    padding: 28px 24px;
  }
}

/* ============================================================
   BOTTOM CTA — clones .hiw-outro-cta from home page exactly.
   Same purple band, top-yellow + bottom-plum radials, SVG noise
   overlay, yellow eyebrow, white H2 + yellow Fraunces em, yellow
   pill button. Identical type ramp and motion.
   ============================================================ */
.hw-outro-cta {
  position: relative;
  isolation: isolate;
  background: var(--purple);
  padding: 96px var(--section-pad-h) 104px;
  text-align: center;
  overflow: hidden;
}
.hw-outro-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 45% at 50% -10%,
      rgba(255,202,1,0.18) 0%,
      rgba(255,202,1,0.08) 24%,
      transparent 55%),
    radial-gradient(ellipse 100% 50% at 50% 110%,
      rgba(45,18,80,0.45) 0%,
      rgba(45,18,80,0.20) 30%,
      transparent 60%);
}
.hw-outro-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.88  0 0 0 0 0.55  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 260px 260px;
}
.hw-outro-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}
.hw-outro-cta .section-label {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 16px;
}
.hw-outro-cta h2 {
  font-family: var(--font-body);
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -1.4px;
  font-weight: 600;
  color: white;
  margin: 0 0 16px;
  text-wrap: balance;
}
.hw-outro-cta h2 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--yellow);
}
.hw-outro-cta p {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
  font-weight: 300;
  max-width: 520px;
  margin: 0 auto 28px;
}
.hw-outro-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--yellow);
  color: var(--ink);
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  box-shadow: 0 6px 24px rgba(255,202,1,0.30);
}
.hw-outro-btn:hover {
  background: white;
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}
.hw-outro-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  fill: none;
  stroke: currentColor;
  transition: transform 0.2s ease;
}
.hw-outro-btn:hover svg {
  transform: translateX(3px);
}
.hw-outro-secondary {
  display: block;
  margin-top: 18px;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}
.hw-outro-secondary:hover { color: white; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hw-hero { padding: calc(var(--nav-height) + 56px) var(--section-pad-h) 64px; }
  .hw-body { padding: 72px var(--section-pad-h) 88px; }
  .hw-body-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hw-toc {
    position: static;
    padding: 20px;
    background: var(--soft);
    border-radius: 16px;
    border: 1px solid var(--hairline);
  }
  .hw-toc a { padding: 6px 12px; }
  .hw-section { margin-bottom: 26px; }
}

@media (max-width: 720px) {
  .hw-outro-cta { padding: 72px 20px 80px; }
}

@media (max-width: 560px) {
  .hw-hero { padding: calc(var(--nav-height) + 40px) var(--section-pad-h) 56px; }
  .hw-body { padding: 56px var(--section-pad-h) 64px; }
  .hw-section { margin-bottom: 22px; }
  .hw-section p, .hw-section ul li { font-size: 16px; }
  .hw-callout { padding: 20px 22px; }
}
