/* All in the Family Bookkeeping: site styles */

:root {
  --navy: #1f2a44;
  --navy-2: #2b3a5c;
  --gold: #d4b04c;
  --gold-ink: #8a6d14;     /* gold dark enough for text on light backgrounds */
  --bg: #fbfaf6;
  --bg-alt: #f3efe4;
  --surface: #ffffff;
  --text: #24262b;
  --muted: #5b606b;
  --line: #e4ded0;
  --btn-bg: var(--navy);
  --btn-text: #ffffff;
  --shadow: 0 1px 2px rgba(20, 24, 35, .06), 0 8px 24px rgba(20, 24, 35, .06);
  --radius: 14px;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161f;
    --bg-alt: #181d29;
    --surface: #1d2331;
    --text: #e8e6e1;
    --muted: #a4a9b4;
    --line: #2c3344;
    --gold-ink: #e0c26a;
    --btn-bg: var(--gold);
    --btn-text: #1a1f2c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

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

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }

.eyebrow {
  font: 700 .8rem/1.2 var(--font-head);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: .9rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--btn-bg); color: var(--btn-text);
  font: 700 1rem/1 var(--font-head);
  padding: .95rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-small { padding: .65rem 1.1rem; font-size: .92rem; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { flex: none; }
.brand-name { font: 800 1rem/1.05 var(--font-head); color: var(--text); }
.brand-name span { display: block; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a:not(.btn) { text-decoration: none; font: 600 .95rem/1 var(--font-head); color: var(--muted); }
.site-nav a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px; cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 16px 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: .95rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-nav .btn { margin-top: 1rem; justify-content: center; }
}

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2rem; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--muted); font-size: .95rem; }
.trust li { display: flex; align-items: center; gap: .45rem; }
.trust li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.hero-media { position: relative; }
.hero-media::before {
  content: ""; position: absolute; inset: 8% -6% -8% 10%;
  background: var(--gold); border-radius: 24px; opacity: .25; z-index: -1;
}
.hero-media img { border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media::before { inset: 6% -3% -5% 6%; }
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head p:last-child { color: var(--muted); }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; box-shadow: var(--shadow);
}
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold-ink); margin-bottom: 1.1rem;
}
.card .icon svg, .contact-list svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .98rem; }
.card li { padding: .35rem 0 .35rem 1.3rem; position: relative; }
.card li::before {
  content: ""; position: absolute; left: 0; top: .85em; width: 9px; height: 5px;
  border-left: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: rotate(-45deg);
}

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.chips { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .95rem; font-size: .95rem; }
.area { color: var(--muted); font-style: italic; }
.stats { margin: 0; display: grid; gap: 1rem; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 1.1rem 1.4rem; }
.stats dt { color: var(--muted); font-size: .9rem; }
.stats dd { margin: 0; font: 800 1.9rem/1.2 var(--font-head); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* Team */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.person { display: flex; gap: 1.25rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.avatar {
  flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--gold); font: 800 1.35rem/1 var(--font-head); letter-spacing: .03em;
}
.person h3 { margin-bottom: .15rem; }
.role { color: var(--gold-ink); font-weight: 700; font-size: .95rem; margin-bottom: .6rem; }
.person p:last-child { margin: 0; color: var(--muted); }
@media (max-width: 420px) { .team { grid-template-columns: 1fr; } .person { flex-direction: column; } }

/* Testimonial */
.testimonial { background: var(--navy); color: #f2efe6; padding: clamp(3.5rem, 8vw, 6rem) 0; }
.testimonial figure { margin: 0 auto; max-width: 820px; }
.quote-mark { width: 48px; height: 36px; fill: var(--gold); margin-bottom: 1.25rem; }
.testimonial blockquote { margin: 0; font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.7; }
.testimonial figcaption { margin-top: 1.25rem; font: 700 1rem/1 var(--font-head); color: var(--gold); }
.testimonial figcaption::before { content: "— "; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-grid > div > p { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: .8rem; }
.contact-list svg { color: var(--gold-ink); flex: none; }
.contact-list a { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; }

.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); box-shadow: var(--shadow); display: grid; gap: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form label { display: grid; gap: .35rem; font-weight: 700; font-size: .92rem; }
.contact-form input, .contact-form textarea {
  font: inherit; font-weight: 400; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; min-height: 1.5em; font-weight: 700; }
.cf-turnstile { min-height: 65px; }
.form-success { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); box-shadow: var(--shadow); margin: 0; font-weight: 700; color: #2e7d4f; align-self: start; }
.form-success:focus { outline: none; }
@media (prefers-color-scheme: dark) { .form-success { color: #6fcf97; } }
.form-status.ok { color: #2e7d4f; }
.form-status.err { color: #b3402f; }
@media (prefers-color-scheme: dark) { .form-status.ok { color: #6fcf97; } .form-status.err { color: #f08a7a; } }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } .contact-form .btn { justify-self: stretch; justify-content: center; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--muted); font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.fineprint { width: 100%; font-size: .85rem; }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.notfound img { margin: 0 auto 1.5rem; }
