/* ---------------------------------------------------------------
   Larchmont Bookkeeping — shared stylesheet

   Tokens and shared components for every page. Page-specific rules
   stay in a <style> block on the page that needs them.

   Shape rule:  buttons are pills, cards and photos are 16px.
   Colour rule: one blue does every clickable thing. Mint is the
                included-tick only; the warm gold is the
                text-selection highlight. Neither ever appears
                on a control.
----------------------------------------------------------------- */

:root {
  color-scheme: light;

  --page:        #ffffff;
  --tint:        #e5f7ff;
  --tint-2:      #f3fafd;
  --card:        #ffffff;

  --ink:         #1d2a33;
  --ink-2:       #3a4b57;
  --muted:       #5d6e79;

  --line:        #d7e6ee;
  --line-soft:   #e8f2f7;

  --accent:      #0a6fa8;
  --accent-ink:  #ffffff;
  --accent-dim:  #085a8a;
  --check:       #1a9b81;
  --error:       #b3261e;

  --brand:       #0a5e85;
  --brand-text:  #eaf6fc;
  --brand-muted: #a6cbe0;
  --brand-line:  rgba(234, 246, 252, .22);

  --warm:        #f0b755;

  --shadow-sm:   0 1px 2px rgba(20, 35, 45, .05), 0 4px 14px rgba(20, 35, 45, .06);
  --shadow-md:   0 2px 6px rgba(20, 35, 45, .07), 0 16px 40px rgba(20, 35, 45, .11);

  --display: "Plus Jakarta Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --body: "Source Sans 3", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --r: 16px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .8, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page:        #0e161c;
    --tint:        #14212a;
    --tint-2:      #121c24;
    --card:        #16232c;
    --ink:         #e6f1f7;
    --ink-2:       #c2d4de;
    --muted:       #92a7b3;
    --line:        #253945;
    --line-soft:   #1d2d37;
    --accent:      #4db4e8;
    --accent-ink:  #04121a;
    --accent-dim:  #6dc4f0;
    --check:       #46c2a6;
    --error:       #ff9a92;
    --brand:       #0b3950;
    --brand-text:  #e6f1f7;
    --brand-muted: #9ec2d6;
    --brand-line:  rgba(230, 241, 247, .2);
    --warm:        #f0b755;
    --shadow-sm:   0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md:   0 16px 40px rgba(0, 0, 0, .5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page:        #0e161c;
  --tint:        #14212a;
  --tint-2:      #121c24;
  --card:        #16232c;
  --ink:         #e6f1f7;
  --ink-2:       #c2d4de;
  --muted:       #92a7b3;
  --line:        #253945;
  --line-soft:   #1d2d37;
  --accent:      #4db4e8;
  --accent-ink:  #04121a;
  --accent-dim:  #6dc4f0;
  --check:       #46c2a6;
  --error:       #ff9a92;
  --brand:       #0b3950;
  --brand-text:  #e6f1f7;
  --brand-muted: #9ec2d6;
  --brand-line:  rgba(230, 241, 247, .2);
  --warm:        #f0b755;
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md:   0 16px 40px rgba(0, 0, 0, .5);
}

/* ---------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--warm); color: #1d2a33; }

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

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; background: var(--ink); color: var(--page); padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; top: .5rem; }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- type ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  margin: 0;
  letter-spacing: -.022em;
  text-wrap: balance;
  color: inherit;
}

.display { font-size: clamp(2.25rem, 4.2vw, 3.2rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; font-weight: 800; }
.h3 { font-size: 1.28rem; line-height: 1.3; }
.h4 { font-size: 1.06rem; line-height: 1.35; }

.lead { font-size: 1.14rem; line-height: 1.6; margin: 0; }
.body { color: var(--muted); margin: 0; }
.body + .body { margin-top: 1rem; }

.eyebrow {
  font-family: var(--display); font-weight: 700; font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .7rem;
}

/* ---------- sections ---------- */

.section { padding-block: clamp(3.5rem, 6.5vw, 6rem); }
.section-tint { background: var(--tint); }
.section-tint-2 { background: var(--tint-2); }
.section-head { max-width: 42rem; margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .body { margin-top: .9rem; font-size: 1.06rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  padding: .95rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn svg { flex: none; }

.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }

.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-quiet:active { transform: translateY(0); }

.btn-onband { background: var(--page); color: var(--accent); border-color: var(--page); box-shadow: var(--shadow-sm); }
.btn-onband:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-onband:active { transform: translateY(0); }

.btn-onband-quiet { background: transparent; color: var(--brand-text); border-color: var(--brand-line); }
.btn-onband-quiet:hover { border-color: var(--brand-text); transform: translateY(-2px); }
.btn-onband-quiet:active { transform: translateY(0); }

.btn-sm { padding: .65rem 1.3rem; font-size: .95rem; }
.btn-block { width: 100%; }

@media (prefers-reduced-motion: reduce) { .btn, .btn:hover, .btn:active { transition: none; transform: none; } }

.textlink { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

.arrowlink {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--accent); font-family: var(--display); font-weight: 700;
  font-size: .98rem; text-decoration: none;
}
.arrowlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.arrowlink svg { transition: transform .18s var(--ease); }
.arrowlink:hover svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .arrowlink svg, .arrowlink:hover svg { transition: none; transform: none; } }

/* ---------- nav ---------- */

#top-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }

.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.nav.stuck { border-bottom-color: var(--line); }
@media (prefers-reduced-transparency: reduce) { .nav { background: var(--page); backdrop-filter: none; -webkit-backdrop-filter: none; } }

.nav-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; flex: none; color: var(--ink); }
.brand-mark {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--brand); color: var(--brand-text);
  font-family: var(--display); font-size: .84rem; font-weight: 800; letter-spacing: -.02em;
}
.brand-name { font-family: var(--display); font-size: 1.05rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }

.nav-right { display: flex; align-items: center; gap: 1.75rem; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-family: var(--display); font-size: .97rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }

.nav-phone {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; text-decoration: none; white-space: nowrap;
  font-family: var(--display); font-size: .97rem; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.nav-phone svg { color: var(--accent); flex: none; }
.nav-phone:hover { color: var(--accent); }

@media (max-width: 1180px) { .nav-links { display: none; } }
@media (max-width: 1320px) { .nav-right, .nav-links { gap: 1.25rem; } }
@media (max-width: 560px) {
  .nav-inner { gap: .75rem; }
  .nav-right { gap: .5rem; }
  .nav-phone { justify-content: center; min-width: 44px; }
  .nav-phone-num { display: none; }
}
@media (max-width: 460px) { .brand-name { display: none; } }

/* ---------- brand band ---------- */

.band { background: var(--brand); color: var(--brand-text); }
.band .body, .band .lead { color: var(--brand-muted); }

/* ---------- breadcrumbs ---------- */

.crumbs { font-size: .92rem; color: var(--muted); padding-block: 1.25rem 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li::after { content: "›"; margin-left: .4rem; color: var(--line); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- cards and ticks ---------- */

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; max-width: 60rem; margin-inline: auto; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 2rem 1.85rem;
  display: flex; flex-direction: column; gap: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.card .body { font-size: 1.01rem; }
.card .arrowlink { margin-top: auto; align-self: flex-start; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; color: var(--ink-2); font-size: 1rem; }
.ticks li { display: grid; grid-template-columns: 1.3rem 1fr; gap: .6rem; align-items: start; }
.ticks svg { margin-top: .34rem; color: var(--check); }

@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* ---------- guarantee ---------- */

.guarantee {
  display: grid; grid-template-columns: 1.4rem 1fr; gap: .85rem; align-items: start;
  max-width: 46rem; margin: 0 auto;
  background: color-mix(in srgb, var(--check) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--check) 32%, transparent);
  border-radius: var(--r);
  padding: 1.1rem 1.4rem;
  color: var(--muted); font-size: 1rem;
}
.guarantee svg { margin-top: .18rem; color: var(--check); }
.guarantee b { color: var(--ink); font-weight: 700; font-family: var(--display); }

/* ---------- form ---------- */

.form-card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  padding: clamp(1.5rem, 3vw, 2rem);
  color: var(--ink);
}
.form-title {
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: -.02em; color: var(--ink); margin: 0 0 .35rem;
}
.form-note { color: var(--muted); font-size: .95rem; margin: 0 0 1.35rem; }

.field { display: grid; gap: .4rem; margin-bottom: .95rem; }
.field > label { font-family: var(--display); font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.field > label .optional { font-family: var(--body); font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--body); font-size: 1.02rem; color: var(--ink);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem .9rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .75; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field input:user-invalid, .field textarea:user-invalid, .field select:user-invalid { border-color: var(--error); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 55%, calc(100% - .8rem) 55%; background-size: .35rem .35rem; background-repeat: no-repeat; padding-right: 2.25rem; }
.field .opt { font-weight: 400; color: var(--muted); }

.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: start; }
.two-up .field { margin-bottom: .95rem; }
@media (max-width: 540px) { .two-up { grid-template-columns: 1fr; gap: 0; } }

.form-legal { color: var(--muted); font-size: .88rem; margin: 1rem 0 0; text-align: center; }
.form-legal a { color: var(--muted); }

/* Spam trap. Never shown, never tabbed to. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- portrait ---------- */

.portrait-frame {
  width: 160px; margin: 0 auto 1.25rem;
  border-radius: var(--r); overflow: hidden;
  background: var(--tint); box-shadow: var(--shadow-md);
}
.portrait-frame img { width: 100%; aspect-ratio: 1 / 1.08; object-fit: cover; object-position: 50% 18%; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); padding-block: clamp(2.75rem, 5vw, 4rem) 1.75rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .7fr)) minmax(15rem, .9fr); gap: clamp(1.75rem, 4vw, 3rem); }
.footer-about .body { margin-top: .9rem; max-width: 32ch; font-size: .97rem; }
.footer h2 { font-size: .97rem; font-weight: 700; margin-bottom: .9rem; color: var(--ink); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer ul a, .footer ul span { text-decoration: none; color: var(--muted); font-size: .97rem; }
.footer-grid > div { min-width: 0; }
.footer ul a[href^="mailto"] { white-space: nowrap; }
.footer ul a:hover { color: var(--accent); }
.footer-base {
  margin-top: clamp(2.5rem, 4vw, 3.5rem); padding-top: 1.4rem; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; color: var(--muted); font-size: .91rem;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-about, .footer-grid > div:last-child { grid-column: span 2; } }

/* ---------- reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0ms); }
  .reveal.in { opacity: 1; transform: none; }
}
