/* ============================================================================
   OurPath — marketing site design system  (ourpath.app)
   Dark brand chrome (header/footer/hero), light high-legibility content.
   Bricolage Grotesque headings · Poppins body · OurPath green + clay.
   Shares tokens with /legal so the whole site reads as one product.
   Built for 390px up, WCAG 2.2 AA, prefers-reduced-motion aware.
   ============================================================================ */

:root {
  /* Light reading surface — matches the homepage light-green background */
  --bg: #f3f6f0;
  --surface: #ffffff;
  --ink: #16201b;
  --ink-mid: #45514b;
  --ink-faint: #6d7a72;
  --rule: #e5e8e4;
  --rule-soft: #eef1ee;
  --sunk: #f4f6f3;
  --header-bg: rgba(243, 246, 240, 0.86);

  --accent: #2f7f66;        /* AA on white — links / interactive */
  --accent-deep: #245f4d;
  --accent-soft: #e7f2ed;
  --clay: #b9713a;
  --clay-soft: #fbf0e5;

  /* Dark brand — matches the app splash + existing ourpath.app */
  --brand-bg: #0a0e0c;
  --brand-bg-2: #101613;
  --brand-ink: #edf3ef;
  --brand-ink-mid: #9fb2a8;
  --brand-rule: rgba(255,255,255,0.08);
  --brand-accent: #8fe7c4;
  --brand-accent-2: #5fb89a;
  --brand-clay: #e0a468;

  --pending: #b45309;
  --pending-bg: #fdf3e3;

  --maxw: 1120px;
  --readw: 74ch;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16,32,25,0.05), 0 2px 8px rgba(16,32,25,0.04);
  --shadow-md: 0 6px 24px rgba(16,32,25,0.08);
  --font-head: "Bricolage Grotesque", "Poppins", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "Poppins", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dark theme — flips the whole page (chrome + content) via the header toggle,
   mirroring the homepage's light/dark switch. */
[data-theme="dark"] {
  --bg: #0e1310;
  --surface: #131916;
  --ink: #eaf1ec;
  --ink-mid: #b3c1ba;
  --ink-faint: #869890;
  --rule: #26302b;
  --rule-soft: #1e2723;
  --sunk: #182019;
  --accent: #6fcaa9;
  --accent-deep: #8fe7c4;
  --accent-soft: rgba(95, 184, 154, 0.14);
  --header-bg: rgba(10, 14, 12, 0.86);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.35);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

body {
  margin: 0;
  background-color: var(--bg);
  /* Faint grid overlay, echoing the homepage hero background. */
  background-image:
    linear-gradient(rgba(30, 52, 40, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 52, 40, 0.032) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--ink-mid);
  font: 400 17px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent-deep); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent-deep); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.98rem; line-height: 1;
  padding: 13px 22px; border-radius: 14px; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
/* All CTAs use the dark-green + gold store-badge theme (rounded rectangle, 14px) */
.btn--primary { background: linear-gradient(145deg, #1E4D3B 0%, #14261E 100%); color: #F1E4C4; border: 1px solid rgba(201,168,106,0.32); box-shadow: 0 10px 30px -18px rgba(18,53,39,0.5); }
.btn--primary:hover { color: #F1E4C4; transform: translateY(-2px); box-shadow: 0 20px 42px -18px rgba(201,168,106,0.40); }
.btn--nav { padding: 10px 18px; }
.btn--ghost { background: transparent; border-color: rgba(201,168,106,0.45); color: var(--accent-deep); }
.btn--ghost:hover { border-color: rgba(201,168,106,0.7); color: #14261E; background: rgba(30,77,59,0.06); }
.btn--onbrand { background: rgba(255,255,255,0.08); color: var(--brand-ink); border-color: var(--brand-rule); }
.btn--onbrand:hover { background: rgba(255,255,255,0.16); color: #fff; }


/* ---- Layout shells ------------------------------------------------------- */
main { display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 64px 0; }
.section--tight { padding: 44px 0; }

/* Article (auto-generated content pages) */
.page { max-width: var(--readw); margin: 0 auto; padding: 46px 22px 92px; }
.page--wide { max-width: 900px; }

.eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-deep); margin: 0 0 12px;
}

h1, h2, h3, h4 { color: var(--ink); font-family: var(--font-head); }
.page h1 { font-weight: 700; font-size: clamp(2rem, 5vw, 2.7rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .5rem; text-wrap: balance; }
.page h2 { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; margin: 2.8rem 0 .9rem; scroll-margin-top: 84px; }
.page h2::before { content: ""; flex: 0 0 auto; width: 5px; height: 0.92em; border-radius: 3px; background: linear-gradient(180deg, var(--accent), var(--accent-deep)); }
.page h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.14rem; line-height: 1.35; margin: 1.7rem 0 .5rem; color: var(--ink); scroll-margin-top: 84px; }
.page p { margin: 0 0 1.05rem; }
.page ul, .page ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.page li { margin: 0 0 .5rem; }
.page li::marker { color: var(--accent); }
.page a { color: var(--accent-deep); text-decoration: underline; overflow-wrap: anywhere; }
.page a:hover { color: var(--accent); }
/* Buttons/CTAs inside articles must never show the link underline */
.page a.btn, .page a.btn:hover, .page a.cta-btn, .page a.cta-btn:hover { text-decoration: none; }
.page a.btn--primary, .page a.btn--primary:hover { color: #F1E4C4; }
.page strong { color: var(--ink); font-weight: 600; }
/* Section separator — fading rule with a glowing accent node (matches homepage .sep) */
.page hr {
  position: relative; border: 0; height: 1px; margin: 3rem auto; overflow: visible;
  background: linear-gradient(90deg, transparent, var(--rule) 22%, var(--rule) 78%, transparent);
}
.page hr::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 8px; height: 8px; background: var(--accent); border-radius: 2px;
  box-shadow: 0 0 16px 1px rgba(95, 184, 154, 0.55);
}

/* Lead sentence — the extractable definition paragraph */
.page .lead { font-size: 1.16rem; line-height: 1.6; color: var(--ink); }
.page .lead strong { font-weight: 600; }

/* byline / review line */
.byline {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  font-size: 0.85rem; color: var(--ink-faint);
  background: var(--sunk); border: 1px solid var(--rule); border-radius: 999px;
  padding: 8px 16px; margin: 0 0 1.8rem;
}
.byline strong { color: var(--ink-mid); font-weight: 600; }

/* Heading anchor */
.anchor { opacity: 0; margin-left: .4rem; color: var(--accent); text-decoration: none; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor { opacity: .7; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.5rem; border: 1px solid var(--rule); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; min-width: 440px; font-size: 0.93rem; background: var(--surface); }
thead th { background: var(--accent-soft); color: var(--ink); font-weight: 600; text-align: left; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--rule-soft); border-right: 1px solid var(--rule-soft); vertical-align: top; }
th:last-child, td:last-child { border-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: var(--sunk); }

/* Blockquote → callout */
blockquote { margin: 0 0 1.5rem; padding: 16px 20px; background: var(--clay-soft); border-left: 4px solid var(--clay); border-radius: 0 12px 12px 0; color: var(--ink); }
blockquote p:last-child { margin-bottom: 0; }

/* Related links card — gradient top edge, labelled rule, rows with a circular arrow badge */
.related {
  position: relative; margin: 3rem 0 0; padding: 12px 28px 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--rule); border-top: 0;
  border-radius: 20px; box-shadow: 0 18px 44px -28px rgba(18,53,39,0.35);
}
.related::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 2;
  background: linear-gradient(90deg, #3e8770, #5fb89a 50%, #8fe7c4);
  border-radius: 20px 20px 0 0;
}
.related__label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-deep); margin: 20px 0 4px;
}
.related ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.related li { margin: 0; }
.related li + li a { border-top: 1px solid var(--rule); }
.related a {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 6px; color: var(--ink); font-weight: 700; font-size: 1.05rem; line-height: 1.3;
  text-decoration: none; border-radius: 12px; transition: background .15s ease, color .15s ease, padding .15s ease;
}
.related a:hover { background: var(--accent-soft); color: var(--accent-deep); padding-left: 12px; padding-right: 12px; }
.related__arrow {
  order: -1; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-deep); font-size: 1.15rem; font-weight: 400;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.related a:hover .related__arrow { background: var(--accent); color: #fff; transform: translateX(2px); }

/* Sources + disclaimer */
.sources { margin-top: 1.8rem; font-size: 0.86rem; color: var(--ink-faint); }
.sources strong { color: var(--ink-mid); }
.disclaimer { margin-top: 1.4rem; font-size: 0.88rem; font-style: italic; color: var(--ink-faint); border-top: 1px solid var(--rule); padding-top: 1rem; }

/* CTA button rows inside content */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6rem 0 1.2rem; }

/* pending token */
.tok { background: var(--pending-bg); color: var(--pending); border: 1px dashed var(--pending); border-radius: 5px; padding: 0 6px; font-size: .85em; font-weight: 600; white-space: nowrap; }

/* ---- Reusable marketing blocks (homepage / pricing) --------------------- */
.hero {
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(95,184,154,0.22), transparent 60%),
    radial-gradient(760px 420px at 8% 8%, rgba(224,164,104,0.12), transparent 55%),
    linear-gradient(180deg, var(--brand-bg), var(--brand-bg-2));
  color: var(--brand-ink);
}
.hero__in { max-width: var(--maxw); margin: 0 auto; padding: 92px 22px 84px; }
.hero h1 { font-size: clamp(2.4rem, 6.4vw, 4rem); line-height: 1.02; letter-spacing: -0.03em; color: #fff; margin: 0 0 20px; text-wrap: balance; max-width: 15ch; }
.hero__lede { font-size: 1.2rem; line-height: 1.6; color: var(--brand-ink); max-width: 60ch; margin: 0 0 14px; }
.hero__sub { color: var(--brand-ink-mid); max-width: 52ch; margin: 0 0 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__foot { margin-top: 22px; font-size: 0.85rem; color: var(--brand-ink-mid); font-style: italic; }

.band { background: var(--surface); }
.band--sunk { background: var(--sunk); }
.band--brand { background: linear-gradient(180deg, var(--brand-bg-2), var(--brand-bg)); color: var(--brand-ink); }
.band--brand h2, .band--brand h3 { color: #fff; }
.band--accent { background: var(--accent-soft); }

.section-head { max-width: 62ch; margin: 0 0 36px; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; border: 0; padding: 0; }
.section-head p { font-size: 1.08rem; margin: 0; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.card h3 { margin: 0 0 8px; font-family: var(--font-body); font-weight: 600; font-size: 1.12rem; }
.card p { margin: 0; font-size: 0.97rem; }
.card__num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; font-size: 0.9rem; margin-bottom: 14px; }

.prose-narrow { max-width: 64ch; }
.prose-narrow p { margin: 0 0 1.1rem; font-size: 1.06rem; }

/* price block */
.price-hero { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: baseline; margin: 4px 0 6px; }
.price-hero .amt { font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; color: var(--ink); letter-spacing: -0.02em; }
.price-hero .per { color: var(--ink-faint); font-size: 1rem; }
.pill { display: inline-block; background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; font-size: 0.8rem; padding: 5px 12px; border-radius: 999px; }

@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* verify form */
.verify-form { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm); margin: 6px 0 2rem; }
.verify-form label { display: block; font-weight: 600; color: var(--ink); margin: 14px 0 6px; }
.verify-form .hint { font-size: 0.86rem; color: var(--ink-faint); font-weight: 400; margin: 0 0 6px; }
.verify-form input { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); }
.verify-form input:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
#verify-result { margin-top: 14px; }
.result-note { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.95rem; }
.result-note--ok { background: var(--accent-soft); color: var(--accent-deep); border: 1px solid #bfe0d2; }
.result-note--warn { background: var(--pending-bg); color: var(--pending); border: 1px solid #f2d19a; }

/* ============================================================================
   Features index — "Everything OurPath does"
   A crisp, categorised showcase of the whole product. Cards use the shared
   surface/rule/accent tokens so they track light + dark automatically.
   ========================================================================== */
.features-index .lead { margin-bottom: 1.6rem; }

/* One-idea callout under the hero. */
.feat-idea {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--accent-soft); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 18px 20px; margin: 0 0 2.4rem;
}
.feat-idea svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--accent-deep); margin-top: 1px; }
.feat-idea p { margin: 0; color: var(--ink); font-size: 1rem; line-height: 1.55; }
.feat-idea strong { color: var(--accent-deep); }

/* Section band: eyebrow + heading + optional sub. */
.feat-cat { margin: 2.6rem 0 1rem; }
.feat-cat:first-of-type { margin-top: 1.4rem; }
.feat-cat .eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-deep); margin: 0 0 .35rem;
}
.feat-cat h2 {
  font-family: var(--font-head); font-weight: 700; font-size: 1.42rem; line-height: 1.2;
  color: var(--ink); margin: 0; display: flex; align-items: center; gap: 12px;
}
.feat-cat h2::before {
  content: ""; flex: 0 0 auto; width: 5px; height: 0.92em; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}
.feat-cat p.sub { margin: .5rem 0 0; color: var(--ink-mid); font-size: .98rem; line-height: 1.5; }

/* The card grid — auto-fit so rows always fill, no dead space on the right. */
.feat-grid {
  display: grid; gap: 14px; margin: 0 0 .4rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}
.feat-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.feat-card .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent-deep); margin-bottom: 2px;
}
.feat-card .ic svg { width: 20px; height: 20px; }
.feat-card h3 {
  margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 1.04rem;
  line-height: 1.25; color: var(--ink);
}
.feat-card p { margin: 0; color: var(--ink-mid); font-size: .92rem; line-height: 1.5; }

/* Linked cards (the six + pro): whole card is the hit target, arrow reveals. */
a.feat-card { text-decoration: none; }
a.feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(47,127,102,0.4); }
a.feat-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
a.feat-card h3 .arw { flex: 0 0 auto; color: var(--accent-deep); opacity: .55; transition: transform .14s ease, opacity .14s ease; }
a.feat-card:hover h3 .arw { opacity: 1; transform: translateX(3px); }
.feat-card .num {
  position: absolute; top: 14px; right: 16px; font-family: var(--font-head);
  font-weight: 700; font-size: .86rem; color: var(--ink-faint); opacity: .7;
}

/* Compact cards for the long "everything in the app" catalogue. */
.feat-grid--tight { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 12px; }
.feat-grid--tight .feat-card { padding: 15px 16px; }
.feat-grid--tight .feat-card .ic { width: 32px; height: 32px; border-radius: 9px; }
.feat-grid--tight .feat-card .ic svg { width: 17px; height: 17px; }
.feat-grid--tight .feat-card h3 { font-size: .98rem; }
.feat-grid--tight .feat-card p { font-size: .88rem; }

/* Closing CTA band. */
.feat-cta {
  margin: 3rem 0 .5rem; padding: 26px 24px; text-align: center;
  background: var(--accent-soft); border: 1px solid var(--rule); border-radius: var(--radius);
}
.feat-cta h2 { margin: 0 0 .3rem; font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: var(--ink); }
.feat-cta h2::before { display: none; }
.feat-cta p { margin: 0 auto 1.1rem; max-width: 46ch; color: var(--ink-mid); }
.feat-cta .cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

@media (max-width: 520px) {
  .feat-grid, .feat-grid--tight { grid-template-columns: 1fr; }
}

/* ============================================================================
   CTA link rows — the "Next steps" arrow-links at the foot of articles.
   Plain bold-underlined "Text → · Text →" reads as an afterthought; render
   them as tappable pills instead. Applied by converting pure link-only
   paragraphs (see build) into .cta-links; prose links keep their inline style.
   ========================================================================== */
.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1.7rem 0 0.4rem;
}
.page a.cta-pill,
.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--accent-deep);
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.page a.cta-pill:hover,
.cta-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(47, 127, 102, 0.4);
  color: var(--accent-deep);
  text-decoration: none;
}
.cta-pill svg { flex: none; transition: transform 0.14s ease; }
.cta-pill:hover svg { transform: translateX(3px); }

/* First pill in a row reads as the primary next step. */
.cta-links .cta-pill:first-child {
  background: linear-gradient(145deg, #1e4d3b 0%, #14261e 100%);
  color: #f1e4c4;
  border-color: rgba(201, 168, 106, 0.32);
}
.page a.cta-pill:first-child:hover,
.cta-links .cta-pill:first-child:hover { color: #f1e4c4; }
