/* ==========================================================================
   Marsh Law Office — portfolio piece 01 (solo practice, estate planning)
   Single stylesheet. No external requests: no webfonts, no CDN, no icons.
   System font stacks keep first paint effectively instant.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
  --ink: #15242b;
  --ink-soft: #2b3d45;
  --body: #4d5c63;
  --muted: #7b8890;
  --brass: #8f6d38;
  --brass-soft: #b08f52;
  --paper: #faf8f4;
  --paper-2: #f3efe7;
  --card: #ffffff;
  --line: #e6dfd3;
  --line-soft: #f0eae0;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.75rem, 8vw, 6.5rem);
  --r: 3px;
  --r-lg: 6px;
}

/* --- 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; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem;
}
.skip:focus { left: 0; }

/* --- Layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tint { background: var(--paper-2); }
.section--ink { background: var(--ink); color: #c4ced3; }
.section--ink h2, .section--ink h3 { color: #fff; }

.lede { font-size: clamp(1.075rem, 1.7vw, 1.25rem); color: var(--ink-soft); line-height: 1.6; }
.measure { max-width: 62ch; }
.center { text-align: center; margin-inline: auto; }

.eyebrow {
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
  margin: 0 0 1rem;
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: .975rem;
  padding: .95rem 1.6rem;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #0c181e; color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); background: rgba(21,36,43,.03); }
.btn--brass { background: var(--brass); color: #fff; }
.btn--brass:hover { background: #7a5c2e; color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--paper-2); color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* --- Header --------------------------------------------------------------- */
.topbar {
  background: var(--ink);
  color: #b9c5cb;
  font-size: .8125rem;
  letter-spacing: .01em;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: var(--brass-soft); }
.topbar__note { color: #93a2aa; }
@media (max-width: 660px) { .topbar__note { display: none; } .topbar .wrap { justify-content: center; } }

.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,244,.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }

.brand { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; margin-right: auto; }
.brand__mark { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); letter-spacing: .01em; }
.brand__sub {
  font-size: .625rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}

.nav { display: flex; align-items: center; gap: 1.85rem; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding-block: .35rem; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brass); }

.header .btn { padding: .7rem 1.2rem; font-size: .9rem; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--r);
  padding: .55rem .8rem; cursor: pointer; font: inherit; font-size: .875rem; font-weight: 600;
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav-toggle { display: block; margin-left: auto; }
  .header .wrap > .btn { display: none; }
  /* Anchored to the header itself rather than a hardcoded offset — the header
     is sticky, so it forms the containing block and this stays exact whatever
     the topbar and header end up measuring. */
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.5rem;
    display: none;
    max-height: 70vh; overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line-soft); color: var(--brass); }
  .nav .btn { margin-top: 1rem; width: 100%; }
}

/* --- Hero ----------------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 4.5rem); }
.hero__grid {
  display: grid; gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: 1.15fr .85fr; align-items: center;
}
@media (max-width: 880px) { .hero__grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: .45em; }
.hero .lede { max-width: 46ch; }
.hero .btn-row { margin-top: 2rem; }

.trustbar {
  display: flex; flex-wrap: wrap; gap: clamp(1.25rem, 4vw, 2.75rem);
  margin-top: 2.75rem; padding-top: 1.75rem; border-top: 1px solid var(--line);
}
.trustbar div { min-width: 0; }
.trustbar strong {
  display: block; font-family: var(--serif); font-size: 1.55rem; color: var(--ink); font-weight: 400;
}
.trustbar span { font-size: .8125rem; color: var(--muted); letter-spacing: .02em; }

/* Portrait placeholder — swap the .portrait block for <img> when real photography exists. */
.portrait {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 70% 10%, #f7f1e6 0%, #ece2d2 55%, #ddd0ba 100%);
  aspect-ratio: 4 / 5;
  display: grid; place-items: center;
}
.portrait::after {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(143,109,56,.28); border-radius: 3px;
}
.portrait__initials {
  font-family: var(--serif); font-size: clamp(3.5rem, 8vw, 5rem);
  color: rgba(21,36,43,.34); letter-spacing: .04em;
}
.portrait__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(21,36,43,.88); color: #fff;
  padding: .9rem 1.15rem;
  font-size: .8125rem; letter-spacing: .02em;
}
.portrait__cap b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.05rem; }

/* --- Cards ---------------------------------------------------------------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.6vw, 2rem);
}
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .975rem; }
.card--link { text-decoration: none; color: inherit; display: block; transition: border-color .18s ease, transform .18s ease; }
.card--link:hover { border-color: var(--brass-soft); transform: translateY(-2px); color: inherit; }
.card__more { display: inline-block; margin-top: 1rem; font-size: .875rem; font-weight: 600; color: var(--brass); }

.num {
  font-family: var(--serif); font-size: 1.1rem; color: var(--brass);
  border: 1px solid var(--line); border-radius: 50%;
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center; margin-bottom: 1.1rem;
}

/* --- Problem list --------------------------------------------------------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative; padding: 0 0 1rem 1.75rem; font-size: 1.0125rem;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--brass);
}

/* --- Testimonials --------------------------------------------------------- */
.quote {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.6vw, 2rem);
  display: flex; flex-direction: column;
}
.quote blockquote {
  margin: 0 0 1.25rem; font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; color: var(--ink);
}
.quote figcaption { margin-top: auto; font-size: .8125rem; color: var(--muted); letter-spacing: .02em; }
.quote figcaption b { display: block; color: var(--ink-soft); font-size: .9375rem; font-weight: 600; letter-spacing: 0; }

.disclaimer {
  font-size: .8125rem; color: var(--muted); line-height: 1.55;
  border-left: 2px solid var(--line); padding-left: 1rem; margin-top: 2rem;
}

/* --- FAQ ------------------------------------------------------------------ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.4rem 2.5rem 1.4rem 0; position: relative;
  font-family: var(--serif); font-size: 1.15rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--brass); line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 2.5rem 1.6rem 0; font-size: 1rem; }

/* --- CTA band ------------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 54ch; margin-inline: auto; color: #b6c2c8; }
.cta-band .btn-row { justify-content: center; margin-top: 2rem; }

/* --- Forms ---------------------------------------------------------------- */
.form-grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field--full { grid-column: 1 / -1; }

.field label {
  display: block; font-size: .8125rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: .45rem;
}
.field .req { color: var(--brass); }

.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: .8rem .9rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(143,109,56,.13);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] {
  border-color: #a33a2c; box-shadow: 0 0 0 3px rgba(163,58,44,.1);
}
.field .err { display: none; font-size: .8125rem; color: #a33a2c; margin-top: .4rem; }
.field .err.is-shown { display: block; }
.hint { font-size: .8125rem; color: var(--muted); margin-top: .5rem; }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .875rem; color: var(--body); }
.consent input { width: auto; margin-top: .25rem; flex: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  margin-top: 1.5rem; padding: 1rem 1.15rem; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: .8125rem; color: var(--muted); line-height: 1.55;
}

.success {
  display: none;
  background: #fff; border: 1px solid var(--brass-soft); border-radius: var(--r-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem); text-align: center;
}
.success.is-shown { display: block; }
.success h3 { color: var(--ink); }

/* --- Contact detail panel ------------------------------------------------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.6vw, 2rem);
}
.panel dl { margin: 0; display: grid; gap: 1.15rem; }
.panel dt {
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: .3rem;
}
.panel dd { margin: 0; color: var(--ink-soft); }
.panel dd a { font-weight: 600; text-decoration: none; }

/* --- Footer --------------------------------------------------------------- */
.footer { background: var(--ink); color: #9fadb4; font-size: .9375rem; padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer a { color: #dfe6e9; text-decoration: none; }
.footer a:hover { color: var(--brass-soft); }
.footer h4 {
  color: #fff; font-family: var(--sans); font-size: .75rem; letter-spacing: .16em;
  text-transform: uppercase; margin: 0 0 1.1rem; font-weight: 600;
}
.footer__grid { display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.footer__brand { font-family: var(--serif); font-size: 1.35rem; color: #fff; margin-bottom: .9rem; }

.legal {
  margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .8125rem; color: #7d8b93; line-height: 1.6;
}
.legal p + p { margin-top: .8rem; }
.legal__row { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; margin-top: 1.25rem; }

.demo-note {
  margin-top: 1.25rem; padding: .8rem 1rem;
  border: 1px dashed rgba(255,255,255,.22); border-radius: var(--r);
  color: #8e9ca3; font-size: .8125rem;
}

/* --- Page header (interior pages) ----------------------------------------- */
.pagehead { background: var(--paper-2); border-bottom: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 4.5rem); }
.pagehead h1 { margin-bottom: .35em; }
.pagehead .lede { max-width: 60ch; }

.crumbs { font-size: .8125rem; color: var(--muted); margin-bottom: 1.5rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin-inline: .5rem; }

/* --- Article / practice-area body ----------------------------------------- */
.split { display: grid; gap: clamp(2.5rem, 5vw, 4rem); grid-template-columns: 1.5fr .8fr; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2rem; font-size: 1.25rem; }
.prose ul { padding-left: 1.15rem; margin: 0 0 1.15em; }
.prose li { margin-bottom: .6rem; }

.aside {
  position: sticky; top: 100px;
  background: var(--ink); color: #c4ced3; border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.6vw, 2rem);
}
.aside h3 { color: #fff; font-size: 1.3rem; }
.aside p { font-size: .9375rem; }
.aside .btn { width: 100%; margin-top: 1.25rem; }
@media (max-width: 900px) { .aside { position: static; } }
