/* Vertex Resolution — landing page.
   Same "evergreen ledger" system as css/styles.css: deep pine + warm paper +
   a recurring ember accent; Fraunces for the voice, Public Sans for the rest.
   Editorial and print-calm — generous whitespace, hairline rules, restrained
   ember. Self-sufficient: tokens and fonts are redeclared here so the page
   works with this file alone. All motion gated behind prefers-reduced-motion. */

/* ---------- Fonts (self-hosted latin subsets, shared with the wizard) ---------- */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/fraunces-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900; /* variable file — full wght axis, so <strong> gets true 700 */
  font-display: swap;
  src: url('/fonts/public-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens (identical to styles.css; all text pairs ≥ 4.5:1 AA) ---------- */

:root {
  --paper: #f6f1e7;        /* warm paper page ground */
  --surface: #fffcf6;      /* raised card/input surface */
  --ink: #212b23;          /* 13.0:1 on paper */
  --ink-soft: #45564b;     /* 6.95:1 on paper */
  --ink-faint: #5b6b60;    /* 5.02:1 on paper, 5.52:1 on surface */
  --pine: #1c4f3c;         /* brand green — white on it: 9.4:1 */
  --pine-deep: #123528;    /* footer / hover ground */
  --pine-tint: #e2ebe1;
  --ember: #b25c2f;        /* the recurring accent — rules, halos, numerals */
  --ember-text: #9c4a1f;   /* 5.47:1 on paper when ember must be text */
  --ember-tint: #f5e3d2;
  --cream: #fdf9ef;        /* text on pine: 8.94:1 */
  --border: #ded2b8;
  --border-strong: #c9bda2;
  --error: #a3271f;        /* 6.51:1 on paper */
  --error-tint: #f9e5e0;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-rest: 0 1px 2px rgba(33, 43, 35, 0.05), 0 2px 10px rgba(33, 43, 35, 0.05);
  --shadow-lift: 0 2px 4px rgba(33, 43, 35, 0.07), 0 10px 26px rgba(33, 43, 35, 0.10);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-text: 'Public Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 0.85, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--paper);
  /* quiet pine wash at the top + the same fine paper grain as the wizard,
     so / → /start reads as one continuous surface */
  background-image:
    radial-gradient(1100px 460px at 50% -8%, rgba(28, 79, 60, 0.07), transparent 62%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.032'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
}

::selection { background: var(--ember-tint); color: var(--ink); }

a { color: var(--pine); text-underline-offset: 3px; }

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

img, svg { max-width: 100%; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.visually-hidden {
  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: 12px;
  top: -60px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--pine);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.skip-link:focus-visible {
  top: 0;
  outline: 3px solid var(--cream);
  outline-offset: -6px;
}

/* ---------- Shared type patterns ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 0.875rem; /* 14px floor for legibility */
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ember-text);
}

/* the small ember dash — the accent that runs through the whole system */
.eyebrow::before {
  content: '';
  flex: none;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: var(--ember);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 2.6vw + 0.85rem, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
  max-width: 26ch;
  text-wrap: balance;
}

.section-sub {
  margin: 0 0 42px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 56ch;
}

.section { padding: 64px 0; }

.section.ruled { border-top: 1px solid var(--border); }

/* anchored sections land clear of the sticky header */
#services, #how-it-works, #why, #faq { scroll-margin-top: 78px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 14px 28px;
  font: inherit;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.22s ease;
}

.btn-primary {
  background: var(--pine);
  color: var(--cream);
  box-shadow: 0 2px 6px rgba(18, 53, 40, 0.22);
}

.btn-primary:hover {
  background: var(--pine-deep);
  box-shadow: 0 4px 14px rgba(18, 53, 40, 0.28);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 3px;
}

.btn-compact {
  min-height: 44px;
  padding: 9px 20px;
  font-size: 0.95rem;
}

.btn-cream {
  background: var(--cream);
  color: var(--pine-deep);
  box-shadow: 0 2px 8px rgba(9, 26, 19, 0.3);
}

.btn-cream:hover { background: #ffffff; }

.btn-cream:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
}

.btn-quiet {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 4px;
  font-weight: 600;
  color: var(--pine);
  text-decoration: underline;
  text-decoration-color: rgba(28, 79, 60, 0.35);
  text-underline-offset: 4px;
}

.btn-quiet:hover { text-decoration-color: var(--ember); }

.btn-quiet:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 241, 231, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(28, 79, 60, 0.16);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 44px; /* full-size tap target for the home link */
  text-decoration: none;
  color: var(--ink);
}

.brand:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 3px;
  border-radius: 6px;
}

.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 8px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.14rem;
  letter-spacing: 0.002em;
}

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

.hero { padding: 48px 0 56px; }

.hero-grid { display: grid; gap: 44px; align-items: center; }

.hero-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.35rem, 5vw + 0.7rem, 3.9rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
  margin: 0 0 18px;
  max-width: 15ch;
  text-wrap: balance;
}

.hero-sub {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 0.4vw + 0.95rem, 1.15rem);
  line-height: 1.65;
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-bottom: 28px;
}

.trust-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.tick { width: 18px; height: 18px; flex: none; }
.tick circle { fill: var(--pine-tint); }
.tick path {
  fill: none;
  stroke: var(--pine);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* hero figure — the ledger line-work */

.hero-figure { margin: 0; max-width: 480px; }

.hero-art { display: block; width: 100%; height: auto; }

.hero-art .ln { stroke: var(--border); stroke-width: 1; }
.hero-art .bl { stroke: var(--border-strong); stroke-width: 1.5; }
.hero-art .curve {
  fill: none;
  stroke: var(--pine);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-art .start { fill: var(--ember); }
.hero-art .dot {
  fill: var(--surface);
  stroke: var(--pine);
  stroke-width: 2;
}
.hero-art .halo { fill: var(--ember-tint); opacity: 0.55; }
.hero-art .done-circle { fill: var(--pine-tint); }
.hero-art .done-check {
  fill: none;
  stroke: var(--pine);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-figure figcaption {
  margin-top: 12px;
  font-size: 0.875rem; /* 14px floor for legibility */
  color: var(--ink-faint);
  max-width: 46ch;
}

/* hero stats — structural facts, set like a ledger footer */

.stats {
  list-style: none;
  margin: 52px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 24px;
}

.stat-num {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.3rem;
  line-height: 1;
  color: var(--ember-text);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 30ch;
}

/* ---------- Services ---------- */

.svc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.svc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-rest);
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.svc-card:hover {
  border-color: var(--pine);
  box-shadow: var(--shadow-lift);
}

.svc-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--ember-tint);
  color: var(--ember-text);
  display: grid;
  place-items: center;
  transition: background-color 0.25s ease;
}

.svc-card:hover .svc-icon { background: #f0d9c1; }

.svc-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svc-icon .fill { fill: currentColor; stroke: none; }

.svc-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin: 4px 0 0;
}

.svc-blurb {
  margin: 0;
  flex-grow: 1;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.svc-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 44px;
  margin-top: 2px;
  font-weight: 600;
  color: var(--pine);
  text-decoration: none;
}

/* the whole card is the target; the link text is the label */
.svc-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.svc-card:hover .svc-cta {
  color: var(--pine-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.svc-cta:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 3px;
  border-radius: 4px;
}

.svc-card:has(.svc-cta:focus-visible) {
  outline: 3px solid var(--pine);
  outline-offset: 3px;
}

.svc-cta .arrow {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- How it works ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 34px;
}

.step {
  border-top: 2px solid var(--border-strong);
  padding-top: 20px;
}

.step-num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--ember-text);
  font-variant-numeric: tabular-nums;
}

.step-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.24rem;
  letter-spacing: -0.005em;
  line-height: 1.25;
  margin: 0 0 8px;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 38ch;
}

.steps-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 38px 0 0;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- Why Vertex ---------- */

.why-grid { display: grid; gap: 36px; align-items: start; }

.why-intro .section-heading { margin-bottom: 18px; }

.why-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 44ch;
}

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.why-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.why-list li:last-child { border-bottom: 1px solid var(--border); }

/* small ember diamond — a ledger tick for each commitment */
.why-list li::before {
  content: '';
  width: 9px;
  height: 9px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--ember);
  transform: rotate(45deg);
  justify-self: center;
}

.why-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 58ch;
}

.why-list strong { color: var(--ink); }

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

.faq-wrap { max-width: 780px; }

.faq-wrap details { border-top: 1px solid var(--border); }

.faq-wrap details:last-child { border-bottom: 1px solid var(--border); }

.faq-wrap summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 44px;
  padding: 19px 2px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.35;
}

.faq-wrap summary::-webkit-details-marker { display: none; }

.faq-wrap summary:hover .faq-mark { border-color: var(--pine); }

.faq-wrap summary:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 2px;
  border-radius: 6px;
}

.faq-mark {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.faq-mark::before,
.faq-mark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 1px;
  background: var(--pine);
  transform: translate(-50%, -50%);
}

.faq-mark::before { width: 12px; height: 2px; }
.faq-mark::after { width: 2px; height: 12px; }

.faq-wrap details[open] .faq-mark {
  background: var(--pine-tint);
  border-color: var(--pine);
}

/* the vertical bar folds into the horizontal one: + becomes − */
.faq-wrap details[open] .faq-mark::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-a {
  margin: 0;
  padding: 0 48px 24px 2px;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.7;
  max-width: 66ch;
}

/* ---------- Final CTA band ---------- */

.cta-band {
  margin-top: 64px;
  padding: 72px 0 78px;
  background-color: var(--pine);
  background-image: radial-gradient(900px 340px at 50% 0%, rgba(253, 249, 239, 0.07), transparent 60%);
  border-top: 4px solid var(--ember);
  color: var(--cream);
}

.cta-inner { max-width: 720px; text-align: center; }

.cta-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw + 1rem, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
  color: var(--cream);
  text-wrap: balance;
}

.cta-sub {
  margin: 0 auto 30px;
  max-width: 46ch;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(253, 249, 239, 0.88);
}

.cta-fine {
  margin: 18px 0 0;
  font-size: 0.875rem; /* 14px floor for legibility */
  letter-spacing: 0.02em;
  color: rgba(253, 249, 239, 0.75);
}

/* ---------- Footer (matches the wizard verbatim) ---------- */

.site-footer {
  margin-top: 0;
  padding: 30px 0 44px;
  background: var(--pine-deep);
  color: var(--cream);
  border-top: 4px solid var(--ember);
}

.footer-links { margin: 0 0 6px; font-size: 0.9rem; }

.footer-links a {
  display: inline-block;
  padding: 11px 0; /* lifts each legal link to a ≥44px tap target */
  color: var(--cream);
  text-decoration-color: rgba(253, 249, 239, 0.45);
  text-underline-offset: 3px;
}

.footer-links a:hover { text-decoration-color: var(--ember); }

/* Pine outline vanishes on the pine-deep footer — use cream there. */
.site-footer a:focus-visible { outline-color: var(--cream); }

.footer-links span { margin: 0 8px; color: rgba(253, 249, 239, 0.45); }

.footer-legal {
  margin: 0;
  font-size: 0.875rem; /* 14px floor for legibility */
  line-height: 1.65;
  color: #b7c9ba; /* 7.7:1 on pine-deep */
  max-width: 640px;
}

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  .container { padding-left: 28px; padding-right: 28px; }

  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }

  .stats li + li { border-left: 1px solid var(--border); padding-left: 28px; }

  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

  .svc-card { padding: 30px 28px 24px; }

  .hero-figure { margin: 0 auto; }
}

@media (min-width: 900px) {
  .section { padding: 92px 0; }

  .hero { padding: 76px 0 64px; }

  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 64px;
  }

  .hero-figure { max-width: none; margin: 0; }

  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }

  .why-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 72px;
  }

  .why-list { margin-top: 8px; }

  .cta-band { padding: 92px 0 98px; }
}

/* ---------- Motion (all gated on reduced-motion preference) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* the hero settles in — one quiet rise, no theatrics */
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }

  .hero-copy { animation: rise 0.5s var(--ease-out) both; }
  .hero-figure { animation: rise 0.55s var(--ease-out) 0.1s both; }
  .stats { animation: rise 0.55s var(--ease-out) 0.18s both; }

  .btn {
    transition: background-color 0.18s ease, box-shadow 0.22s ease,
      transform 0.18s var(--ease-out);
  }
  .btn-primary:hover, .btn-cream:hover { transform: translateY(-1px); }
  .btn-primary:active, .btn-cream:active { transform: translateY(0) scale(0.99); }

  .svc-card {
    transition: border-color 0.2s ease, box-shadow 0.25s ease,
      transform 0.22s var(--ease-out);
  }
  .svc-card:hover { transform: translateY(-3px); }

  .svc-icon {
    transition: background-color 0.25s ease, transform 0.25s var(--ease-spring);
  }
  .svc-card:hover .svc-icon { transform: rotate(-3deg) scale(1.05); }

  .svc-cta .arrow { transition: transform 0.22s var(--ease-out); }
  .svc-card:hover .svc-cta .arrow { transform: translateX(4px); }

  .faq-mark::after { transition: transform 0.25s var(--ease-out); }
}

/* ---------- Forced colors (Windows High Contrast) ---------- */

@media (forced-colors: active) {
  .btn { border-color: currentColor; }
  .faq-mark { border-color: currentColor; }
  .faq-mark::before, .faq-mark::after { background: CanvasText; }
}
