/* ==========================================================================
   AyeTech theme - warm editorial design system
   Tokens and components for the redesigned pages. The homepage inlines a
   copy of the core of this file for first-paint speed; keep the two in sync.
   ========================================================================== */

@font-face {
  font-family: 'Bricolage Fallback';
  src: local('Arial Bold'), local('Arial');
  size-adjust: 102%;
  ascent-override: 93%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  --paper: #FAF7F2;
  --paper-2: #F3EDE4;
  --ink: #17130E;
  --ink-2: #5C544A;
  --line: rgba(23, 19, 14, 0.12);
  --line-soft: rgba(23, 19, 14, 0.08);
  --coral: #F06449;
  --coral-deep: #C8432B;
  --coral-deep-hover: #A33318;
  --dark: #161210;
  --dark-2: #211B16;
  --dark-text: #F5EFE6;
  --dark-muted: #B9AE9F;
  --dark-list: #DDD3C4;
  --footer-text: #CFC6B8;
  --green: #1E7F4F;
  --card: #fff;
  --field: #fff;
  --field-border: #857A6C;
  --on-coral: #17130E;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Bricolage Fallback', -apple-system, sans-serif;
  --header-h: 76px;
  --radius: 16px;
  color-scheme: light;
  accent-color: var(--coral-deep);
}

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

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-font-smoothing: antialiased;
  scrollbar-gutter: stable; /* no sideways shift when a half-loaded page first gets a scrollbar */
}
@media (prefers-reduced-motion: no-preference) {
  /* :focus-within keeps anchor clicks smooth while script/audit scrolls stay
     instant - an animated scroll makes axe sample backgrounds mid-flight. */
  html:focus-within { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
  padding-top: var(--header-h);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral-deep); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--coral-deep-hover); }

:focus-visible { outline: 2px solid var(--coral-deep); outline-offset: 3px; border-radius: 2px; }
.dark-band :focus-visible, .site-footer :focus-visible, .cta-panel :focus-visible { outline-color: var(--coral); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10001;
  background: var(--ink); color: var(--paper); padding: 12px 20px;
  border-radius: 0 0 12px 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: var(--paper); }

.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;
}

.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 32px; }

/* ---------- Header ----------
   Mirrored in styles.css for the blog and clients.html (same markup, same
   rules, light and dark) and in the homepage's inline CSS. Keep all in sync. */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 9999; height: var(--header-h);
  background: color-mix(in oklab, var(--paper) 86%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.navbar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.navbar-logo img { height: 48px; width: 64px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin-left: auto; }
.nav-link {
  display: block; color: var(--ink); font-size: 0.9375rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: background 0.15s ease;
}
.nav-link:hover { color: var(--ink); background: rgba(23, 19, 14, 0.05); }
.nav-link[aria-current="page"] { font-weight: 600; }
.nav-phone {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-size: 0.9375rem; font-weight: 600; padding: 8px 12px;
}
.nav-phone:hover { color: var(--coral-deep); }
.portal-btn {
  display: inline-block; background: var(--ink); color: var(--paper);
  border-radius: 999px; padding: 10px 22px; font-size: 0.875rem; font-weight: 600;
  transition: background 0.2s ease;
}
.portal-btn:hover { background: var(--coral-deep); color: #fff; }
.menu-btn {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: none; color: var(--ink); cursor: pointer; border-radius: 10px;
}
.menu-btn:hover { background: rgba(23, 19, 14, 0.05); }
.nav-actions { display: flex; align-items: center; gap: 2px; }
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer;
  color: var(--ink); border-radius: 999px; transition: background 0.15s ease;
}
.theme-btn:hover { background: rgba(23, 19, 14, 0.05); }
.theme-btn .i-sun { display: none; }
html:not([data-theme]) .theme-btn { display: none; }

/* ---------- Type ---------- */
h1, h2 {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance;
}
h2 { font-size: clamp(2rem, 1.6rem + 1.8vw, 3.25rem); }

.eyebrow, .section-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--coral-deep); margin-bottom: 14px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); flex-shrink: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-block: 72px 56px; }
.page-hero h1 {
  font-size: clamp(2.5rem, 1.9rem + 2.8vw, 4.25rem);
  line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 20px;
}
.page-hero h1 .mark { color: var(--coral); }
.page-hero .lede {
  font-size: 1.1875rem; color: var(--ink-2); max-width: 36em; text-wrap: pretty;
}

/* ---------- Sections ---------- */
.section { padding-block: 24px 96px; }
.section + .section { padding-top: 48px; }

.prose { max-width: 46em; }
.prose p { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.75; margin-bottom: 1.5rem; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }

/* Long-form article elements (guides, legal pages) */
.prose h2 { font-size: clamp(1.625rem, 1.4rem + 1vw, 2.125rem); margin: 3rem 0 1rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.3125rem;
  letter-spacing: -0.015em; line-height: 1.25; margin: 2.25rem 0 0.75rem; text-wrap: balance;
}
.prose h4 { font-weight: 600; font-size: 1.0625rem; margin: 1.75rem 0 0.5rem; }
.prose ul, .prose ol { margin: 0 0 1.5rem; padding-left: 1.5rem; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.7; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--coral-deep); font-weight: 600; }
.prose a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(200, 67, 43, 0.35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
/* Links inside running text need more than colour to stand out (axe link-in-text-block):
   same soft underline as .prose links. Buttons, cards and nav links all carry a class. */
main :is(p, li) a:not([class]) { text-decoration: underline; text-decoration-color: rgba(200, 67, 43, 0.35); text-underline-offset: 3px; }
main :is(p, li) a:not([class]):hover { text-decoration-color: currentColor; }
.prose strong { color: var(--ink); }
.prose blockquote {
  border-left: 3px solid var(--coral); padding: 4px 0 4px 20px;
  margin: 0 0 1.5rem; color: var(--ink-2);
}
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.875em;
  background: var(--paper-2); border-radius: 4px; padding: 1px 6px;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.75rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.prose th {
  text-align: left; font-weight: 600; padding: 10px 14px;
  background: var(--paper-2); border-bottom: 2px solid var(--ink); white-space: nowrap;
}
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); vertical-align: top; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.875rem; color: var(--ink-2); margin-top: 20px; }

/* Table of contents card */
.toc {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px 30px; margin-bottom: 2.75rem; max-width: 46em;
}
.toc > strong {
  display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px;
}
.toc ol { margin: 0; padding-left: 1.25rem; font-size: 0.9375rem; line-height: 1.6; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.toc a { font-weight: 500; }
.toc li::marker { color: var(--coral-deep); font-weight: 600; }

/* ---------- Dark band ---------- */
.dark-band { background: var(--dark); color: var(--dark-text); color-scheme: dark; }
.dark-band .section-eyebrow { color: var(--coral); }
.dark-band h2 { color: var(--dark-text); }
.dark-band p { color: var(--dark-list); }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper); border-radius: 999px;
  padding: 16px 32px; font-size: 1.0625rem; font-weight: 600;
  transition: background 0.2s ease, translate 0.15s ease; border: none; cursor: pointer;
  font-family: var(--font-body);
}
.btn-primary:hover { background: #2A241C; color: var(--paper); translate: 0 -1px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1.5px solid rgba(23, 19, 14, 0.3); color: var(--ink); border-radius: 999px;
  padding: 15px 28px; font-size: 1.0625rem; font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); background: rgba(23, 19, 14, 0.03); }
.btn-coral {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--coral); color: var(--ink); border: none; border-radius: 999px;
  padding: 16px 28px; font-size: 1.0625rem; font-weight: 600; font-family: var(--font-body);
  cursor: pointer; transition: background 0.2s ease;
}
.btn-coral:hover { background: #FF7257; color: var(--ink); }
.btn-ghost-dark {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1.5px solid rgba(245, 239, 230, 0.35); color: var(--dark-text);
  border-radius: 999px; padding: 15px 28px; font-size: 1.0625rem; font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.btn-ghost-dark:hover { color: #fff; border-color: rgba(245, 239, 230, 0.7); background: rgba(245, 239, 230, 0.06); }

.arrow-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.arrow-link svg { transition: translate 0.2s ease; }
.arrow-link:hover svg { translate: 3px 0; }

/* ---------- Cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column;
  transition: translate 0.2s ease, box-shadow 0.2s ease;
}
a.card { color: var(--ink); }
a.card:hover { color: var(--ink); translate: 0 -3px; box-shadow: 0 16px 36px rgba(23, 19, 14, 0.1); }
.card .tag {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--coral-deep); margin-bottom: 14px;
}
.card h2, .card h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.3125rem;
  letter-spacing: -0.015em; line-height: 1.25; margin-bottom: 10px; text-wrap: balance;
}
.card p { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.6; flex-grow: 1; margin-bottom: 20px; text-wrap: pretty; }
.card .arrow-link { margin-top: auto; font-size: 0.9375rem; }

/* ---------- Feature blocks (border-top editorial) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; margin-top: 56px; }
.feature { border-top: 2px solid var(--ink); padding-top: 24px; }
.feature .n {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 2.5rem; letter-spacing: -0.03em; margin-bottom: 12px;
}
.feature .n .mark { color: var(--coral); }
.feature h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.3125rem; margin-bottom: 10px; }
.feature p { font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }

/* ---------- Stats strip ---------- */
.stats { border-block: 1px solid var(--line); }
.stats-inner {
  display: flex; flex-wrap: wrap; gap: 40px; align-items: center;
  justify-content: space-between; padding-block: 36px;
}
.stats-nums { display: flex; gap: 56px; flex-wrap: wrap; }
.stat b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 2.375rem; letter-spacing: -0.03em; line-height: 1;
}
.stat span {
  display: block; font-size: 0.8125rem; color: var(--ink-2); font-weight: 500;
  margin-top: 6px; letter-spacing: 0.04em; text-transform: uppercase;
}
.stats-place { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--ink-2); }
.stats-place svg { stroke: var(--coral-deep); }

/* ---------- CTA panel ---------- */
.cta-panel {
  background: var(--ink); border-radius: 32px; padding: 64px; color-scheme: dark;
  display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start;
}
.cta-panel h2 { color: var(--paper); margin-bottom: 22px; }
.cta-panel h2 .mark { color: var(--coral); }
.cta-copy { flex: 1 1 440px; min-width: 0; }
.cta-lede { font-size: 1.0625rem; line-height: 1.65; color: var(--footer-text); max-width: 30em; margin-bottom: 28px; text-wrap: pretty; }
.cta-alt { font-size: 1rem; color: var(--footer-text); }
.cta-alt a { color: var(--paper); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.cta-panel .cta-alt a { text-decoration-color: currentColor; }
.cta-actions + .cta-alt { margin-top: 24px; }
/* Links inside a line of form intro text need more than colour (axe link-in-text-block). */
.inline-form-subtitle a { text-decoration: underline; text-underline-offset: 3px; }
.cta-alt a:hover { color: var(--coral); }
.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- Forms ---------- */
.f-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
/* Turnstile renders a 65px widget into this empty div after load; reserve it so a form in the hero doesn't re-centre the copy beside it. */
.cf-turnstile { min-height: 65px; }
.f-group { display: flex; flex-direction: column; gap: 6px; }
.f-group label { font-size: 0.875rem; font-weight: 600; }
.f-group input, .f-group textarea, .f-group select {
  padding: 12px 14px; border: 1.5px solid var(--field-border); border-radius: 10px;
  background: var(--field); font-size: 0.9375rem; font-family: var(--font-body); color: var(--ink);
}
.f-group textarea { resize: vertical; }
.f-group input::placeholder, .f-group textarea::placeholder { color: #8A8178; }
.f-group input:focus-visible, .f-group textarea:focus-visible, .f-group select:focus-visible {
  outline-offset: 0; border-color: var(--coral-deep);
}
.f-group input:user-invalid, .f-group textarea:user-invalid { border-color: #A5261C; }
.f-group select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235C544A' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.form-note { font-size: 0.8125rem; color: var(--ink-2); }
.form-error {
  background: #FBEAE7; border: 1px solid #D8A49A; color: #8C1F15;
  padding: 12px 14px; border-radius: 10px; font-size: 0.875rem; transition: opacity 0.3s ease;
}
.form-success { text-align: center; padding: 48px 16px; opacity: 0; transition: opacity 0.4s ease; }
.form-success svg { margin: 0 auto 16px; }
.form-success h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.form-success p { color: var(--ink-2); }

/* ---------- Contact info card ---------- */
.info-card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 20px;
  padding: 36px; display: flex; flex-direction: column; gap: 28px;
}
.info-item { display: flex; gap: 14px; align-items: flex-start; }
.info-item svg { color: var(--coral-deep); flex-shrink: 0; margin-top: 2px; }
.info-item strong { display: block; font-size: 0.9375rem; margin-bottom: 2px; }
.info-item p { font-size: 0.9375rem; color: var(--ink-2); margin: 0; }
.info-item .note { font-size: 0.8125rem; color: var(--coral-deep); font-weight: 500; }

/* ---------- Proof cards ("the work you never see") ---------- */
.page-hero-split { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding-block: 72px 64px; }
.page-hero-split .hero-copy { flex: 1 1 540px; min-width: 0; }
.page-hero-split h1 {
  font-size: clamp(2.5rem, 1.9rem + 2.8vw, 4.25rem);
  line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 20px;
}
.page-hero-split h1 .mark { color: var(--coral); }
.page-hero-split .lede {
  font-size: 1.1875rem; color: var(--ink-2); max-width: 34em;
  margin-bottom: 32px; text-wrap: pretty;
}
.hero-proof { flex: 1 1 380px; max-width: 460px; min-width: 0; }
.proof-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); text-align: center; margin-bottom: 18px;
}
.proof-cards { display: flex; flex-direction: column; gap: 14px; }
.proof-card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start;
  box-shadow: 0 12px 32px rgba(23, 19, 14, 0.08);
}
.proof-card .ico {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.proof-card strong { display: block; font-size: 0.9375rem; font-weight: 600; }
.proof-card span { display: block; font-size: 0.8125rem; color: var(--ink-2); margin-top: 2px; }
.proof-card.pc-1 { rotate: -1.5deg; margin-right: 36px; }
.proof-card.pc-2 {
  rotate: 1.25deg; margin-left: 32px; background: var(--ink); border-color: transparent;
  color: var(--dark-text); box-shadow: 0 16px 36px rgba(23, 19, 14, 0.18);
}
.proof-card.pc-2 span { color: var(--dark-muted); }
.proof-card.pc-3 { rotate: -0.75deg; margin-right: 20px; }
.proof-card.pc-4 { rotate: 1.5deg; margin-left: 44px; }
.proof-tail { font-size: 0.8125rem; color: var(--ink-2); text-align: center; margin-top: 18px; }

/* Proof row - widget cards used mid-page, and small variant */
.proof-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.tilt-l { rotate: -1deg; }
.tilt-r { rotate: 1deg; }
.proof-card.sm { padding: 14px 16px; }
.proof-card.sm .ico { width: 30px; height: 30px; border-radius: 8px; }

/* Icon tints for proof cards */
.ico-green { background: #E8F2EA; }
.ico-green svg { stroke: var(--green); }
.ico-coral { background: #FDEBE6; }
.ico-coral svg { stroke: var(--coral-deep); }
.ico-coral-dark { background: rgba(240, 100, 73, 0.18); }
.ico-coral-dark svg { stroke: var(--coral); }
.ico-violet { background: #EEEAF7; }
.ico-violet svg { stroke: #4A3FA3; }

/* ---------- FAQ (native details) ---------- */
.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 4px; font-family: var(--font-display); font-weight: 700;
  font-size: 1.0625rem; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-family: var(--font-body); font-weight: 400; font-size: 1.5rem;
  color: var(--coral-deep); line-height: 1; flex-shrink: 0;
}
.faq details[open] summary::after { content: '–'; }
.faq .faq-a { padding: 0 4px 20px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.7; max-width: 60ch; text-wrap: pretty; }

/* ---------- Pricing ---------- */
.price {
  font-family: var(--font-display); font-weight: 800; font-size: 2.25rem;
  letter-spacing: -0.03em; line-height: 1;
}
.price .per { font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.card.featured { border: 2px solid var(--ink); position: relative; }
.card .plan-tag {
  position: absolute; top: -12px; left: 24px; background: var(--coral); color: var(--ink);
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 12px;
}
.check-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9375rem; color: var(--ink-2); }
.check-list li svg { flex-shrink: 0; margin-top: 3px; stroke: var(--coral-deep); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--footer-text); color-scheme: dark; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 56px; padding-block: 72px 0; }
.footer-brand { flex: 2 1 300px; min-width: 0; }
.footer-brand img { height: 56px; width: 75px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.9; margin-bottom: 16px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; max-width: 26em; }
.footer-col { flex: 1 1 150px; }
.footer-col.wide { flex: 1 1 220px; }
.footer-col h3 {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--paper); margin-bottom: 18px; font-family: var(--font-body);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 0.875rem; }
.footer-col a { color: var(--footer-text); }
.footer-col a:hover { color: var(--paper); }
.footer-bottom {
  border-top: 1px solid rgba(245, 239, 230, 0.1); margin-top: 56px;
  padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 16px; font-size: 0.8125rem;
}
.footer-bottom a { color: var(--footer-text); }
.footer-bottom a:hover { color: var(--paper); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-legal a { white-space: nowrap; }

/* ---------- Mobile CTA bar ---------- */
.mobile-cta {
  display: none; position: fixed; inset: auto 0 0 0; z-index: 9998;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-soft); padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.mobile-cta .row { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.mobile-cta a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border-radius: 999px; font-size: 0.875rem; font-weight: 600;
}
.mobile-cta .call { background: var(--paper-2); color: var(--ink); }
.mobile-cta .assess { flex: 2; background: var(--ink); color: var(--paper); }

/* ---------- Reveal on scroll: progressive, content visible by default ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      /* No fill mode: off-screen elements must render at full opacity so
         contrast/visibility audits (and no-JS paints) see the real colors. */
      animation: rise;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}
@keyframes rise {
  from { translate: 0 24px; }
  to { translate: 0 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .wrap { padding-inline: 20px; }
  body { padding-bottom: 76px; }
  .navbar-logo img { height: 42px; width: 56px; }
  .menu-btn { display: flex; }
  .nav-links {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--paper); flex-direction: column; align-items: stretch; gap: 0;
    padding-block: 8px; box-shadow: 0 16px 32px rgba(23, 19, 14, 0.12);
    transform: translateY(-110%); visibility: hidden; opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }
  .nav-links.open { transform: translateY(0); visibility: visible; opacity: 1; }
  .nav-link, .nav-links .portal-btn {
    width: 100%; padding: 14px 24px; border-radius: 0; background: none;
    color: var(--ink); font-size: 0.9375rem;
  }
  .nav-links .portal-btn { color: var(--coral-deep); font-weight: 600; }
  .nav-phone { display: none; }
  .page-hero { padding-block: 44px 36px; }
  .page-hero-split { padding-block: 44px 40px; gap: 40px; }
  .proof-card.pc-1 { margin-right: 18px; }
  .proof-card.pc-2 { margin-left: 18px; }
  .proof-card.pc-3 { margin-right: 10px; }
  .proof-card.pc-4 { margin-left: 22px; }
  .section { padding-block: 16px 64px; }
  .stats-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; }
  .stat b { font-size: 1.875rem; }
  .cta-panel { padding: 36px 24px; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn-coral, .cta-actions .btn-ghost, .cta-actions .btn-ghost-dark { justify-content: center; }
  .mobile-cta { display: block; }
  .site-footer { padding-bottom: 76px; }
  .footer-grid { gap: 36px; padding-block: 48px 0; }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .nav-links { transition: none; }
}

/* ==========================================================================
   Dark mode (html[data-theme="dark"], set pre-paint by the inline head script)
   Warm "espresso" inversion of the editorial palette. Light mode is untouched.
   ========================================================================== */

/* Brief whole-page transition while the toggle flips (script adds .theming) */
html.theming, html.theming *, html.theming *::before, html.theming *::after {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease !important;
}

[data-theme="dark"] {
  --paper: #14110C;
  --paper-2: #1E1913;
  --card: #1D1913;
  --field: #211C15;
  --field-border: #655B4E;
  --ink: #F2EBE1;
  --ink-2: #B5A896;
  --line: rgba(242, 235, 225, 0.15);
  --line-soft: rgba(242, 235, 225, 0.09);
  --coral-deep: #FF8A6E;
  --coral-deep-hover: #FFA78F;
  --dark: #1C1711;
  --dark-2: #292218;
  --green: #4CAF7D;
  --footer-text: #C6BCAE;
  color-scheme: dark;
}

/* Header & nav */
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .menu-btn:hover,
[data-theme="dark"] .theme-btn:hover { background: rgba(242, 235, 225, 0.08); }
[data-theme="dark"] .portal-btn:hover { background: var(--coral); color: var(--on-coral); }
[data-theme="dark"] .navbar-logo img { filter: invert(1) hue-rotate(180deg); }
[data-theme="dark"] .theme-btn .i-sun { display: block; }
[data-theme="dark"] .theme-btn .i-moon { display: none; }

/* Buttons - primary inverts to cream; coral always keeps dark text */
[data-theme="dark"] .btn-primary:hover { background: #E3D8C7; }
[data-theme="dark"] .btn-ghost { border-color: rgba(242, 235, 225, 0.35); }
[data-theme="dark"] .btn-ghost:hover { border-color: var(--ink); background: rgba(242, 235, 225, 0.05); }
[data-theme="dark"] .btn-coral,
[data-theme="dark"] .btn-coral:hover,
[data-theme="dark"] .card .plan-tag { color: var(--on-coral); }

/* Icon tints */
[data-theme="dark"] .ico-green { background: rgba(76, 175, 125, 0.16); }
[data-theme="dark"] .ico-green svg { stroke: #6FCB97; }
[data-theme="dark"] .ico-coral { background: rgba(240, 100, 73, 0.15); }
[data-theme="dark"] .ico-coral svg { stroke: var(--coral-deep); }
[data-theme="dark"] .ico-violet { background: rgba(138, 121, 230, 0.16); }
[data-theme="dark"] .ico-violet svg { stroke: #A99BF0; }

/* Inverse proof card (pc-2): ink surface turns cream, so flip its text */
[data-theme="dark"] .proof-card.pc-2 { color: #17130E; }
[data-theme="dark"] .proof-card.pc-2 span { color: #5C544A; }
[data-theme="dark"] .proof-card.pc-2 .ico-coral-dark svg { stroke: #C8432B; }

/* CTA panel inverts to cream (its --ink background flips automatically) */
[data-theme="dark"] .cta-panel { color-scheme: light; }
[data-theme="dark"] .cta-panel h2 { color: #17130E; }
[data-theme="dark"] .cta-lede, [data-theme="dark"] .cta-alt { color: #4F4639; }
[data-theme="dark"] .cta-alt a { color: #17130E; }
[data-theme="dark"] .cta-alt a:hover { color: #C8432B; }
[data-theme="dark"] .cta-panel :focus-visible { outline-color: #C8432B; }
[data-theme="dark"] .cta-panel .btn-ghost-dark,
[data-theme="dark"] .cta-panel .btn-ghost {
  color: #17130E; border-color: rgba(23, 19, 14, 0.35);
}
[data-theme="dark"] .cta-panel .btn-ghost-dark:hover,
[data-theme="dark"] .cta-panel .btn-ghost:hover {
  color: #17130E; border-color: #17130E; background: rgba(23, 19, 14, 0.04);
}

/* Forms */
[data-theme="dark"] .f-group input::placeholder,
[data-theme="dark"] .f-group textarea::placeholder { color: #8F8575; }
[data-theme="dark"] .f-group input:user-invalid,
[data-theme="dark"] .f-group textarea:user-invalid { border-color: #E76A52; }
[data-theme="dark"] .f-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B5A896' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}
[data-theme="dark"] .form-error { background: #3B1812; border-color: #7A3A2E; color: #FFB3A3; }

/* Footer stays a dark band (its --ink background would otherwise flip cream) */
[data-theme="dark"] .site-footer { background: var(--dark); }
[data-theme="dark"] .footer-col h3 { color: var(--dark-text); }
[data-theme="dark"] .footer-col a:hover,
[data-theme="dark"] .footer-bottom a:hover { color: var(--dark-text); }

/* Long-form article components (PR #74) */
[data-theme="dark"] .prose a { text-decoration-color: rgba(255, 138, 110, 0.4); }
[data-theme="dark"] main :is(p, li) a:not([class]) { text-decoration-color: rgba(255, 138, 110, 0.4); }
