/* Merit Bookkeeping site styles
   Palette pulled from the logo: olive #4a4f33, cream #e9e4d7 */

:root {
  --olive: #4a4f33;
  --olive-deep: #2f3320;
  --olive-soft: #5c6242;
  --cream: #e9e4d7;
  --cream-soft: #f1ede3;
  --white: #f7f4ee;
  --sage: #8a9068;
  --sage-light: #cfd1bf;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max: 1080px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--olive-deep);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--olive); }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.6em;
  color: var(--olive-deep);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.2rem; color: var(--olive-soft); max-width: 40ch; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1.2rem;
  display: block;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.section { padding: 5rem 0; }
.section.cream { background: var(--cream); }
.section.olive { background: var(--olive); color: var(--cream); }
.section.olive h1, .section.olive h2, .section.olive h3 { color: var(--cream); }
.section.olive .eyebrow { color: var(--sage-light); }
.section.olive a { color: var(--cream); }
.center { text-align: center; }
.narrow { max-width: 62ch; margin-left: auto; margin-right: auto; }
.narrow.left { margin-left: 0; }

/* Logo: real artwork, cream on olive bands and olive on cream sections */
.logo { display: inline-block; line-height: 0; }
.site-footer .logo img { height: 96px; width: auto; }

/* Header wordmark: the real "merit" letterforms cropped from the logo */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--cream);
  line-height: 1;
}
.brand img { height: 30px; width: auto; position: relative; top: 4px; }
.brand span {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Header */
.site-header {
  background: var(--olive);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(233,228,215,0.12);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.nav a:hover, .nav a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-color: var(--sage-light);
}
.nav .btn { opacity: 1; text-decoration: none; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--sage-light);
  color: var(--cream);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 1.5px solid var(--olive);
  background: var(--olive);
  color: var(--cream);
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
}
.btn:hover { background: var(--olive-deep); border-color: var(--olive-deep); }
.btn.ghost { background: transparent; color: var(--olive); }
.btn.ghost:hover { background: var(--olive); color: var(--cream); }
.btn.cream, .section.olive .btn.cream, .site-header .btn.cream { background: var(--cream); color: var(--olive); border-color: var(--cream); }
.btn.cream:hover, .section.olive .btn.cream:hover { background: var(--white); border-color: var(--white); color: var(--olive); }
.btn.cream-ghost { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn.cream-ghost:hover { background: var(--cream); color: var(--olive); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.btn-row.center { justify-content: center; }

/* Hero */
.hero { background: var(--cream); padding: 6rem 0 5rem; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.hero .wrap.single { grid-template-columns: 1fr; }
.hero-mark { display: flex; justify-content: center; padding: 1rem 0; }
.hero-mark img { width: 100%; max-width: 440px; height: auto; }
.hero h1 { margin-bottom: 0.5em; }

/* Grids and cards */
.grid { display: grid; gap: 1.5rem; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--sage-light);
  padding: 2rem;
  border-radius: var(--radius);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.cream .card { background: var(--cream-soft); }
.step-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--sage);
  line-height: 1;
  margin-bottom: 0.6rem;
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.chip {
  border: 1px solid var(--sage);
  color: var(--olive);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--white);
}

/* Lists */
.checklist { list-style: none; padding: 0; margin: 1rem 0 0; }
.checklist li { position: relative; padding-left: 1.6rem; margin-bottom: 0.55rem; }
.checklist li::before {
  content: '';
  position: absolute; left: 0; top: 0.55em;
  width: 0.7rem; height: 0.7rem;
  border-radius: 50%;
  background: var(--sage);
}
.olive .checklist li::before { background: var(--sage-light); }

/* FAQ */
.faq details { border-top: 1px solid var(--sage-light); padding: 1.1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--sage-light); }
.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.45rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--sans); color: var(--sage); font-size: 1.4rem; }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { margin: 0.8rem 0 0; max-width: 65ch; color: var(--olive-soft); }

/* Split layout (about, contact, services) */
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: start; }
.headshot {
  aspect-ratio: 4 / 5;
  background: var(--cream);
  border: 1px solid var(--sage-light);
  overflow: hidden;
}
.headshot img { width: 100%; height: 100%; object-fit: cover; }

/* Forms */
form.contact { display: grid; gap: 1rem; }
form.contact label { display: grid; gap: 0.35rem; font-size: 0.9rem; letter-spacing: 0.02em; }
form.contact input, form.contact select, form.contact textarea {
  font: inherit;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--sage-light);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--olive-deep);
  width: 100%;
}
form.contact input:focus, form.contact select:focus, form.contact textarea:focus {
  outline: 2px solid var(--sage);
  outline-offset: 1px;
  border-color: var(--sage);
}
form.contact textarea { min-height: 140px; resize: vertical; }
.hidden { display: none !important; }
.fine { font-size: 0.85rem; color: var(--olive-soft); margin: 0; }
.contact-info dl { margin: 0; }
.contact-info dt {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: 1.2rem;
}
.contact-info dd { margin: 0.2rem 0 0; font-size: 1.1rem; }
.contact-info dd small { display: block; font-size: 0.95rem; color: var(--olive-soft); }

/* Footer */
.site-footer {
  background: var(--olive);
  color: var(--cream);
  padding: 4rem 0 2rem;
  font-size: 0.92rem;
}
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
.site-footer a { color: var(--cream); text-decoration: none; opacity: 0.85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.site-footer h4 {
  color: var(--sage-light);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.site-footer p { margin-top: 1.2rem; max-width: 34ch; opacity: .85; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer .legal {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(233,228,215,0.15);
  padding-top: 1.4rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  opacity: 0.7;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
}

/* Responsive */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-mark { order: -1; }
  .grid.three, .grid.two, .split { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; gap: 1.8rem; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--olive);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem 1rem 1.6rem;
    gap: 1.1rem;
    border-bottom: 1px solid rgba(233,228,215,0.15);
  }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .section { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
