/* ==========================================================================
   greggoryjordan.com — Design System
   Palette: Gulf Ink (deep teal) + Sunlit Amber + Shell Cream
   Author note: all sizes/colors/spacing come from tokens below. Edit here once.
   ========================================================================== */

/* ---------- 1. Fonts ---------- */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&f[]=gambetta@400,500,600&display=swap');

/* ---------- 2. Tokens ---------- */
:root {
  /* Type scale (fluid) */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl:  clamp(2.5rem, 1rem + 4vw, 4.5rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem;  --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem;  --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;    --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-body: 'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Gambetta', ui-serif, Georgia, 'Times New Roman', serif;

  /* Radii + shadows */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(10, 32, 34, 0.06), 0 1px 3px rgba(10, 32, 34, 0.05);
  --shadow: 0 4px 6px -1px rgba(10, 32, 34, 0.07), 0 10px 20px -6px rgba(10, 32, 34, 0.10);
  --shadow-lg: 0 18px 40px -12px rgba(10, 32, 34, 0.22);

  --container: 1200px;
  --container-narrow: 760px;
  --header-h: 72px;
}

/* Light theme (default) */
:root,
[data-theme='light'] {
  --color-bg: #faf7f1;
  --color-surface: #ffffff;
  --color-surface-2: #f4efe6;
  --color-surface-offset: #ece5d9;
  --color-border: #ddd3c4;
  --color-divider: #e8e0d3;

  --color-text: #12292b;
  --color-text-muted: #5b6b6c;
  --color-text-faint: #5f6d6e;       /* smallest supporting text — 5.0:1 on cream */
  --color-text-inverse: #faf7f1;

  --color-primary: #0d3b3f;          /* Gulf Ink — headers, dark sections */
  --color-primary-hover: #0a2d30;
  --color-primary-soft: #e3ecec;

  --color-accent: #a66210;           /* Sunlit Amber — CTAs, links. 4.8:1 with white, 4.5:1 on cream */
  --color-accent-hover: #8f540b;
  --color-accent-bright: #e0a03f;    /* decorative only: rules, icons on dark */
  --color-accent-soft: #f8ecd8;

  --color-success: #1f6b4a;
  --color-success-soft: #e2efe8;

  --hero-scrim: linear-gradient(100deg, rgba(8,33,35,0.93) 0%, rgba(8,33,35,0.82) 42%, rgba(8,33,35,0.34) 72%, rgba(8,33,35,0.18) 100%);
}

/* Dark theme */
[data-theme='dark'] {
  --color-bg: #0b2023;
  --color-surface: #112c2f;
  --color-surface-2: #163438;
  --color-surface-offset: #1c3e42;
  --color-border: #2b545a;
  --color-divider: #21484c;

  --color-text: #eef4f2;
  --color-text-muted: #a7bcbb;
  --color-text-faint: #7b9594;
  --color-text-inverse: #0b2023;

  --color-primary: #e9f1ef;
  --color-primary-hover: #ffffff;
  --color-primary-soft: #1c3e42;

  --color-accent: #e8ab4d;
  --color-accent-hover: #f3bd6a;
  --color-accent-bright: #e8ab4d;
  --color-accent-soft: #23393a;

  --color-success: #6cc79b;
  --color-success-soft: #1a3a30;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.4), 0 10px 20px -6px rgba(0,0,0,0.45);
  --shadow-lg: 0 18px 40px -12px rgba(0,0,0,0.6);

  --hero-scrim: linear-gradient(100deg, rgba(4,20,22,0.96) 0%, rgba(4,20,22,0.88) 42%, rgba(4,20,22,0.45) 72%, rgba(4,20,22,0.25) 100%);
}

/* ---------- 3. Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 { line-height: 1.12; font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-family: var(--font-display); font-size: var(--text-2xl); }
h2 { font-family: var(--font-display); font-size: var(--text-xl); }
h3 { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; }
h4 { font-family: var(--font-body); font-size: var(--text-base); font-weight: 700; }
p  { text-wrap: pretty; }

a { color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-accent-hover); }

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

::selection { background: var(--color-accent-soft); color: var(--color-text); }

/* ---------- 4. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 768px) { .container { padding-inline: var(--space-8); } }

.narrow { max-width: var(--container-narrow); margin-inline: auto; }

/* Left-aligned section intro (heading + lede) that doesn't stretch full width */
.intro { max-width: 60ch; }

.section { padding-block: clamp(var(--space-16), 9vw, var(--space-32)); }
.section--tight { padding-block: clamp(var(--space-12), 6vw, var(--space-20)); }
.section--alt { background: var(--color-surface-2); }
.section--ink {
  background: var(--color-primary);
  color: #f2f7f5;
}
[data-theme='dark'] .section--ink { background: var(--color-surface); color: var(--color-text); }
.section--ink h2, .section--ink h3 { color: #ffffff; }
[data-theme='dark'] .section--ink h2, [data-theme='dark'] .section--ink h3 { color: var(--color-text); }
.section--ink p { color: #c9dbd8; }
[data-theme='dark'] .section--ink p { color: var(--color-text-muted); }

.stack > * + * { margin-top: var(--space-4); }

/* Mobile-first: one column by default, then widen.
   Keep these in ASCENDING min-width order — a later rule wins at equal
   specificity, so a 640px rule placed after a 900px rule would override it. */
.grid { display: grid; gap: var(--space-6); }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 5. Utilities ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.eyebrow::before {
  content: '';
  width: 28px; height: 2px;
  background: var(--color-accent-bright);
  border-radius: 2px;
}
/* On every deep-teal panel the amber must brighten, or the eyebrow drops to
   ~2.5:1 against the dark background. */
.section--ink .eyebrow,
.cta-band .eyebrow,
.hero .eyebrow,
.page-head .eyebrow { color: var(--color-accent-bright); }

.lede { font-size: var(--text-lg); color: var(--color-text-muted); line-height: 1.5; }
.section--ink .lede { color: #c9dbd8; }
[data-theme='dark'] .section--ink .lede { color: var(--color-text-muted); }

.muted { color: var(--color-text-muted); }
.small { font-size: var(--text-sm); }
.tiny { font-size: var(--text-xs); }
.center { text-align: center; }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: var(--space-2);
  transform: translateY(-200%);
  background: var(--color-accent); color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm); z-index: 200;
  font-weight: 700; text-decoration: none;
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translateY(0); }
/* In dark mode the accent is a light amber, so the label flips to dark ink. */
[data-theme='dark'] .skip-link,
[data-theme='dark'] .skip-link:focus { color: var(--color-bg); }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--color-accent-hover); color: #fff; box-shadow: var(--shadow); }
[data-theme='dark'] .btn--primary { color: #0b2023; }
[data-theme='dark'] .btn--primary:hover { color: #0b2023; }

.btn--ink {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn--ink:hover { background: var(--color-primary-hover); color: var(--color-text-inverse); }

.btn--outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn--outline:hover { border-color: var(--color-text); background: var(--color-surface); color: var(--color-text); }

.btn--ghost-light {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
  backdrop-filter: blur(6px);
}
.btn--ghost-light:hover { background: rgba(255,255,255,0.18); border-color: #fff; color: #fff; }

.btn--lg { padding: var(--space-5) var(--space-8); font-size: var(--text-base); }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.btn-row--center { justify-content: center; }

/* ---------- 7. Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--color-divider);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
  margin-right: auto;
  flex: 0 1 auto;
  min-width: 0;          /* lets the wordmark give way before the menu button is pushed off-screen */
}
.brand__mark { width: 38px; height: 38px; color: var(--color-accent); flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
@media (max-width: 400px) {
  .header__inner { gap: var(--space-2); }
  .brand { gap: var(--space-2); }
  .brand__role { letter-spacing: 0.1em; }
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand__role {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  white-space: nowrap;
}

.nav { display: none; }
@media (min-width: 1000px) {
  .nav { display: flex; align-items: center; gap: var(--space-1); }
}
.nav a {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav a:hover { color: var(--color-text); background: var(--color-surface-2); }
.nav a[aria-current='page'] { color: var(--color-text); font-weight: 700; }

.header__actions { display: flex; align-items: center; gap: var(--space-2); flex: none; }
.header__cta { display: none; }
@media (min-width: 1000px) { .header__cta { display: inline-flex; } }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--color-surface-2); border-color: var(--color-text-faint); }
.icon-btn svg { width: 20px; height: 20px; }
.nav-toggle { display: inline-flex; }
@media (min-width: 1000px) { .nav-toggle { display: none; } }

.icon-sun { display: none; }
[data-theme='dark'] .icon-sun { display: block; }
[data-theme='dark'] .icon-moon { display: none; }

/* Mobile drawer */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-divider);
  background: var(--color-bg);
  /* padding-block only — a `padding` shorthand here would wipe out the
     horizontal padding this element inherits from .container. */
  padding-block: var(--space-4) var(--space-6);
}
.mobile-nav.is-open { display: block; }
@media (min-width: 1000px) { .mobile-nav, .mobile-nav.is-open { display: none; } }
.mobile-nav a {
  display: block;
  padding: var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
}
.mobile-nav a[aria-current='page'] { color: var(--color-accent); font-weight: 700; }
/* The generic `.mobile-nav a` rule above would otherwise override .btn--block's
   flex centering and add a stray bottom border to the drawer CTA. */
.mobile-nav a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-6);
  border-bottom: none;
  text-align: center;
}

/* ---------- 8. Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: var(--hero-scrim);
}
.hero__inner {
  padding-block: clamp(var(--space-20), 14vw, var(--space-32));
  max-width: 660px;
  color: #fff;
}
.hero__inner .eyebrow { color: var(--color-accent-bright); }
.hero h1 {
  font-size: var(--text-3xl);
  color: #fff;
  margin-top: var(--space-5);
}
.hero__lede {
  font-size: var(--text-lg);
  color: #d5e3e0;
  margin-top: var(--space-6);
  max-width: 54ch;
}
.hero .btn-row { margin-top: var(--space-8); }
.hero__note {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  color: #a8c0bd;
  max-width: 48ch;
}

/* Page header (interior pages) */
.page-head {
  background: var(--color-primary);
  color: #fff;
  padding-block: clamp(var(--space-12), 8vw, var(--space-20));
}
[data-theme='dark'] .page-head { background: var(--color-surface); }
.page-head h1 { color: #fff; margin-top: var(--space-4); max-width: 22ch; }
[data-theme='dark'] .page-head h1 { color: var(--color-text); }
.page-head .eyebrow { color: var(--color-accent-bright); }
.page-head p {
  color: #c9dbd8;
  font-size: var(--text-lg);
  margin-top: var(--space-5);
  max-width: 58ch;
  line-height: 1.5;
}
[data-theme='dark'] .page-head p { color: var(--color-text-muted); }

/* ---------- 9. Cards ---------- */
.card {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--color-text-faint); }
.card h3 { margin-bottom: var(--space-3); }
.card p { color: var(--color-text-muted); font-size: var(--text-sm); }
.card__foot { margin-top: auto; padding-top: var(--space-6); }
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: var(--radius);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  margin-bottom: var(--space-5);
  flex: none;
}
.card__icon svg { width: 23px; height: 23px; }

.card--flag {
  border-color: var(--color-accent);
  border-width: 2px;
  box-shadow: var(--shadow);
  position: relative;
}
.card--static:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--color-border); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--free { background: var(--color-success-soft); color: var(--color-success); }
.badge--paid { background: var(--color-accent-soft); color: var(--color-accent-hover); }
[data-theme='dark'] .badge--paid { color: var(--color-accent); }
.badge--flag { background: var(--color-accent); color: #fff; }
[data-theme='dark'] .badge--flag { color: #0b2023; }

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
/* In narrow cards (4-up grids) the badge drops above the heading instead of
   squeezing the title into a ragged two-line wrap. */
@container (max-width: 270px) {
  .card__top {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: var(--space-3);
  }
}

/* ---------- 10. Steps ---------- */
.steps { counter-reset: step; display: grid; gap: var(--space-8); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-10); } }
.step { counter-increment: step; position: relative; padding-top: var(--space-8); }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-accent-bright);
  line-height: 1;
}
.step::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--color-divider);
}
.section--ink .step::after { background: rgba(255,255,255,0.18); }
.step h3 { margin-bottom: var(--space-3); }

/* ---------- 11. Split (image + text) ---------- */
.split { display: grid; gap: var(--space-10); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-16); }
  .split--wide-text { grid-template-columns: 1fr 1.15fr; }
  .split--reverse .split__media { order: 2; }
}
.split__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 12. Roadmap (Homebuyer Path) ---------- */
.roadmap { position: relative; display: grid; gap: var(--space-8); counter-reset: stage; }
.roadmap::before {
  content: '';
  position: absolute;
  left: 21px; top: var(--space-6); bottom: var(--space-6);
  width: 2px;
  background: linear-gradient(to bottom, var(--color-accent-bright), var(--color-divider));
}
@media (min-width: 640px) { .roadmap::before { left: 25px; } }
.stage {
  counter-increment: stage;
  position: relative;
  padding-left: calc(var(--space-16) + var(--space-2));
}
@media (min-width: 640px) { .stage { padding-left: calc(var(--space-20) + var(--space-2)); } }
.stage::before {
  content: counter(stage);
  position: absolute;
  left: 0; top: 0;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: #fff;
  font-weight: 900;
  font-size: var(--text-sm);
  box-shadow: 0 0 0 5px var(--color-bg);
}
@media (min-width: 640px) { .stage::before { width: 52px; height: 52px; } }
[data-theme='dark'] .stage::before { color: #0b2023; }
.stage h3 { margin-bottom: var(--space-2); }
.stage__meta {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
}

/* ---------- 13. Lists ---------- */
.check-list { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.check-list li {
  position: relative;
  padding-left: var(--space-8);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.45em;
  width: 15px; height: 9px;
  border-left: 2.5px solid var(--color-accent);
  border-bottom: 2.5px solid var(--color-accent);
  transform: rotate(-45deg);
}
.section--ink .check-list li { color: #c9dbd8; }
.section--ink .check-list li::before { border-color: var(--color-accent-bright); }

.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--space-12); margin-bottom: var(--space-4); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-8); margin-bottom: var(--space-3); }
.prose p, .prose ul, .prose ol { margin-bottom: var(--space-4); color: var(--color-text-muted); }
.prose ul, .prose ol { padding-left: var(--space-6); }
.prose li { margin-bottom: var(--space-2); }
.prose strong { color: var(--color-text); }

/* ---------- 14. Stat strip ---------- */
.stats { display: grid; gap: var(--space-8); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { border-left: 3px solid var(--color-accent-bright); padding-left: var(--space-5); }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1;
}
.stat__label { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2); }
.section--ink .stat__label { color: #a8c0bd; }

/* ---------- 15. Testimonials ---------- */
.quote {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
}
.quote__mark {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 0.8;
  color: var(--color-accent-bright);
  margin-bottom: var(--space-3);
}
.quote blockquote { font-size: var(--text-base); color: var(--color-text-muted); font-style: italic; }
.quote figcaption {
  margin-top: auto;
  padding-top: var(--space-6);
  font-size: var(--text-sm);
  font-weight: 700;
}
.quote figcaption span { display: block; font-weight: 400; color: var(--color-text-faint); font-size: var(--text-xs); }

.placeholder-note {
  background: var(--color-accent-soft);
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-accent-hover);
}
[data-theme='dark'] .placeholder-note { color: var(--color-accent); }

/* ---------- 16. Forms ---------- */
.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  box-shadow: var(--shadow);
}
.field { margin-bottom: var(--space-5); }
.field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.field .req { color: var(--color-accent); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--color-text-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--color-text-faint); }
.field__hint { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-2); }
.field-row { display: grid; gap: var(--space-5); }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

.form-status {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
}
.form-status[hidden] { display: none; }
.form-status--ok { background: var(--color-success-soft); color: var(--color-success); }
.form-status--err { background: #fdeaea; color: #a32020; }
[data-theme='dark'] .form-status--err { background: #3a1c1c; color: #f0a5a5; }
.form-status--busy { background: var(--color-surface-2); color: var(--color-text-muted); }

.btn[aria-busy='true'] { opacity: 0.7; pointer-events: none; }

/* ---------- 17. Modal (workbook gate) ---------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: rgba(7, 26, 28, 0.72);
  backdrop-filter: blur(4px);
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 5vw, var(--space-10));
  box-shadow: var(--shadow-lg);
}
.modal__close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: none; background: var(--color-surface-2);
  border-radius: var(--radius-full);
  cursor: pointer; color: var(--color-text-muted);
}
.modal__close:hover { background: var(--color-surface-offset); color: var(--color-text); }
.modal__panel h2 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 700; padding-right: var(--space-10); }
.modal__panel > p { margin-top: var(--space-3); margin-bottom: var(--space-6); color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---------- 18. Disclaimer boxes ---------- */
.disclaimer {
  border-left: 3px solid var(--color-accent-bright);
  background: var(--color-surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-5) var(--space-6);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.section--ink .disclaimer {
  background: rgba(255,255,255,0.07);
  color: #b9cfcc;
}
.disclaimer strong { color: var(--color-text); }
.section--ink .disclaimer strong { color: #fff; }
[data-theme='dark'] .section--ink .disclaimer strong { color: var(--color-text); }

/* ---------- 19. CTA band ---------- */
.cta-band {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-8), 6vw, var(--space-16));
  text-align: center;
}
[data-theme='dark'] .cta-band { background: var(--color-surface-2); }
.cta-band h2 { color: #fff; max-width: 30ch; margin-inline: auto; }
[data-theme='dark'] .cta-band h2 { color: var(--color-text); }
.cta-band p { color: #c9dbd8; margin-top: var(--space-4); max-width: 52ch; margin-inline: auto; }
[data-theme='dark'] .cta-band p { color: var(--color-text-muted); }
.cta-band .btn-row { margin-top: var(--space-8); }

/* ---------- 20. Footer ---------- */
.footer {
  background: var(--color-primary);
  color: #c9dbd8;
  padding-block: var(--space-16) var(--space-8);
  font-size: var(--text-sm);
}
[data-theme='dark'] .footer { background: var(--color-surface); color: var(--color-text-muted); }
.footer a { color: #e8f0ee; text-decoration: none; }
[data-theme='dark'] .footer a { color: var(--color-text); }
.footer a:hover { color: var(--color-accent-bright); text-decoration: underline; }
.footer__grid { display: grid; gap: var(--space-10); }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer h4 {
  color: #fff;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}
[data-theme='dark'] .footer h4 { color: var(--color-text); }
.footer ul { list-style: none; padding: 0; display: grid; gap: var(--space-1); }
/* Footer nav links get a real touch target (~40px) instead of a bare text line. */
.footer ul a {
  display: inline-block;
  padding-block: var(--space-2);
  min-height: 40px;
}
.footer__brand .brand { color: #fff; margin-bottom: var(--space-5); }
[data-theme='dark'] .footer__brand .brand { color: var(--color-text); }
.footer__brand .brand__mark { color: var(--color-accent-bright); }
.footer__brand .brand__role { color: #94aeab; }
.footer__brand p { max-width: 34ch; }
.footer address { font-style: normal; display: grid; gap: var(--space-2); }

.footer__legal {
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.14);
  display: grid;
  gap: var(--space-6);
  font-size: var(--text-xs);
  line-height: 1.7;
  color: #a8c0bd;
}
[data-theme='dark'] .footer__legal { border-color: var(--color-divider); color: var(--color-text-faint); }
.footer__legal p { max-width: 90ch; }
.eho {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.eho svg { width: 40px; height: 40px; flex: none; color: #fff; }
[data-theme='dark'] .eho svg { color: var(--color-text); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  align-items: center;
  justify-content: space-between;
}

/* ---------- 21. Scroll reveal ---------- */
/* Progressive enhancement: .reveal only hides when JS is running (the `js`
   class is set by an inline script in <head>). If JS fails, content shows. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ---------- 22. Misc pages ---------- */
.error-page { display: grid; place-items: center; text-align: center; padding-block: var(--space-32); }
.error-page__code {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-accent-bright);
  line-height: 1;
}

.contact-grid { display: grid; gap: var(--space-12); }
@media (min-width: 920px) { .contact-grid { grid-template-columns: 1.25fr 1fr; gap: var(--space-16); } }

.contact-item { display: flex; gap: var(--space-4); margin-bottom: var(--space-8); }
.contact-item__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border-radius: var(--radius);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.contact-item__icon svg { width: 21px; height: 21px; }
.contact-item h3 { font-size: var(--text-base); margin-bottom: var(--space-1); }
.contact-item p, .contact-item a { font-size: var(--text-sm); color: var(--color-text-muted); }
.contact-item a { color: var(--color-accent); }

/* Wide data tables scroll sideways on phones instead of crushing every column
   into two-character-wide text. The fade hint shows there's more to the right. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.table-wrap + .table-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
@media (min-width: 820px) { .table-hint { display: none; } }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 760px; }
th, td { text-align: left; padding: var(--space-4); border-bottom: 1px solid var(--color-divider); vertical-align: top; }
th { font-weight: 700; color: var(--color-text); background: var(--color-surface-2); }
td { color: var(--color-text-muted); }

/* ---------- 24. Print / PDF ----------
   Used when the site is printed or exported to PDF. The main job is keeping
   cards, steps and quotes from being sliced in half across a page break. */
@media print {
  /* Always print the light theme — dark backgrounds waste ink and read badly. */
  html, [data-theme='dark'] { color-scheme: light; }

  /* Content must never be hidden by scroll animation in a printed document. */
  .reveal { opacity: 1 !important; transform: none !important; }

  /* Interface chrome has no meaning on paper. */
  .skip-link,
  .icon-btn,
  .nav-toggle,
  .mobile-nav,
  .theme-toggle { display: none !important; }

  .site-header { position: static; }

  /* Keep self-contained blocks whole. */
  .card,
  .step,
  .stage,
  .quote,
  .disclaimer,
  .placeholder-note,
  .contact-item,
  .stat,
  tr,
  figure { break-inside: avoid; page-break-inside: avoid; }

  /* A heading stranded alone at the foot of a page is worse than a shorter page. */
  h1, h2, h3, h4 { break-after: avoid; page-break-after: avoid; }

  /* Two-column image/text splits: Chrome's print engine drops an image that
     relies on height:100% inside a clipped, rounded container once the block
     crosses a page break, leaving an empty frame. Printing these stacked with
     an intrinsically sized image avoids that entirely. */
  .split { grid-template-columns: 1fr !important; gap: var(--space-8); }
  .split--reverse .split__media { order: 0; }
  .split__media { break-inside: avoid; page-break-inside: avoid; }
  .split__media img {
    height: auto !important;
    max-height: 105mm;
    object-fit: cover;
  }

  /* Let grids reflow rather than forcing four cramped columns onto A4. */
  .grid--4 { grid-template-columns: repeat(2, 1fr); }

  /* Tables print in full instead of hiding columns behind a scrollbar. */
  .table-wrap { overflow: visible; border: none; }
  table { min-width: 0; font-size: 9pt; }
  .table-hint { display: none; }

  /* Trim the generous screen rhythm so pages aren't mostly whitespace. */
  .section { padding-block: var(--space-10); }
  .hero { min-height: 0; }

  /* Spell out link destinations, which are invisible on paper. */
  main a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    word-break: break-all;
    color: var(--color-text-faint);
  }
  .btn::after { content: none !important; }
}
