/* Andrew M. Ayers, P.C. demo: "The Core Estate Plan".
   The page is a set of tab dividers in a folio: every section opens on a tab sitting on a rule,
   and the tabs step across the page (start, center, end) the way a real divider set does. */

@font-face { font-family: "Caslon"; src: url(fonts/caslon-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Caslon"; src: url(fonts/caslon-400i.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Public"; src: url(fonts/publicsans-var.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
/* Metric matched fallbacks (tools/font-metrics.mjs) so the swap to the web fonts barely moves text. */
@font-face { font-family: "Caslon Fallback"; src: local("Georgia"); size-adjust: 105.75%; ascent-override: 91.7%; descent-override: 24.6%; line-gap-override: 0%; }
@font-face { font-family: "Caslon Fallback"; src: local("Georgia Italic"), local("Georgia-Italic"); font-style: italic; size-adjust: 105.31%; ascent-override: 92.1%; descent-override: 24.7%; line-gap-override: 0%; }
@font-face { font-family: "Public Fallback"; src: local("Arial"); size-adjust: 104.9%; ascent-override: 90.6%; descent-override: 21.9%; line-gap-override: 0%; }

:root {
  --paper: #f6f1e7;
  --sheet: #fffdf8;
  --manila: #efe2c2;
  --ink: #1e2721;
  --ink-2: #4a554e;
  --rule: #dacfba;
  --green: #274533;
  --green-deep: #1b3024;
  --gold: #c99b3e;
  --sage: #a8b8a0;
  --kraft: #e2d2ab;
  --red: #972b21;
  --red-deep: #7a2119;
  --margin: #d58a7f;
  --serif: "Caslon", "Caslon Fallback", Georgia, serif;
  --sans: "Public", "Public Fallback", Arial, sans-serif;
  --pad: 20px;
}

*, *::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(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--serif);
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0 0 1em; }
figure { margin: 0; }
address { font-style: normal; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--ink); color: var(--sheet); padding: 10px 14px; font: 600 15px/1 var(--sans); }
.skip:focus { top: 12px; }

/* Buttons: squared like stationery, the red is reserved for the action. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 13px 22px;
  font: 600 16px/1.25 var(--sans); letter-spacing: .01em; text-decoration: none;
  border: 2px solid transparent; border-radius: 4px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--call { background: var(--red); color: var(--sheet); }
.btn--call:hover { background: var(--red-deep); color: var(--sheet); }
.btn--line { border-color: var(--green); color: var(--green); background: transparent; }
.btn--line:hover { background: var(--green); color: var(--sheet); }
.btn--paper { background: var(--sheet); color: var(--green); }
.btn--paper:hover { background: var(--manila); color: var(--green-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions .btn { flex: 1 1 230px; }
@media (min-width: 600px) { .actions .btn { flex: 0 0 auto; } }

/* Masthead */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.brand__name { font: 400 19px/1.1 var(--serif); }
.brand__sub { font: 500 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-top: 4px; }
.masthead__call { font: 600 15px/1 var(--sans); color: var(--green); text-decoration: none; padding: 14px 0 14px 8px; white-space: nowrap; }
.masthead__num { display: none; }
@media (min-width: 370px) { .masthead__word { display: none; } .masthead__num { display: inline; } }
.topnav { display: none; }
@media (min-width: 1000px) {
  .topnav { display: flex; gap: 26px; }
  .topnav a { font: 500 14.5px/1 var(--sans); color: var(--ink-2); text-decoration: none; padding: 10px 0; }
  .topnav a:hover { color: var(--ink); }
}

/* Hero: the cover sheet, with the double red margin rule of legal paper. */
.hero { padding: 40px 0 64px; }
.hero__grid { display: grid; gap: 36px; }
.hero__text { position: relative; padding-left: 22px; }
.hero__text::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; border-left: 3px double var(--margin); }
.eyebrow { font: 500 12.5px/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.hero h1 { font-size: clamp(46px, 13vw, 86px); line-height: 1; letter-spacing: -.01em; }
.lede { font-size: 21px; line-height: 1.45; margin: 20px 0 28px; max-width: 30ch; }
.fine { font: 500 14px/1.5 var(--sans); color: var(--ink-2); margin: 14px 0 0; }
.hero__photo { background: var(--sheet); padding: 10px; border: 1px solid var(--rule); box-shadow: 0 24px 40px -30px rgba(30, 39, 33, .55); }
@media (min-width: 960px) {
  .hero { padding: 72px 0 96px; }
  .hero__grid { grid-template-columns: 1fr 520px; gap: 64px; align-items: center; }
}

/* Section dividers: a tab sitting on a rule. */
.section { padding: 64px 0; }
@media (min-width: 960px) { .section { padding: 96px 0; } }
.divider { display: flex; border-bottom: 2px solid var(--ink); margin-bottom: 30px; }
.divider--center { justify-content: center; }
.divider--end { justify-content: flex-end; }
.tab {
  margin: 0; padding: 11px 16px 9px;
  font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  background: var(--gold); color: var(--ink); border-radius: 7px 7px 0 0;
}
.tab--sage { background: var(--sage); }
.tab--paper { background: var(--sheet); color: var(--green); }
h2 { font-size: clamp(31px, 7.6vw, 48px); line-height: 1.12; max-width: 22ch; margin-bottom: 18px; }
.intro { color: var(--ink-2); max-width: 38rem; }

/* The Core Estate Plan */
.core { background: linear-gradient(var(--paper), #f1eadb); }
.core__grid { display: grid; gap: 48px; }
.folio { margin-top: 28px; }
.folio img { border: 1px solid var(--rule); }
figcaption { font: 500 13px/1.45 var(--sans); color: var(--ink-2); margin-top: 10px; }
.sheets { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 52px; }
.sheet {
  position: relative; background: var(--sheet); border: 1px solid var(--rule);
  padding: 26px 22px 22px 48px; box-shadow: 0 22px 34px -30px rgba(30, 39, 33, .6);
}
.sheet::before { content: ""; position: absolute; left: 28px; top: 0; bottom: 0; border-left: 3px double var(--margin); }
.sheet__tab {
  position: absolute; top: -33px; height: 33px; padding: 10px 16px 0;
  font: 600 12.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
  border: 1px solid var(--rule); border-bottom: 0; border-radius: 7px 7px 0 0;
}
.sheet--1 .sheet__tab { left: -1px; background: var(--gold); }
.sheet--2 .sheet__tab { left: 50%; transform: translateX(-50%); background: var(--sage); }
.sheet--3 .sheet__tab { right: -1px; background: var(--kraft); }
.sheet h3 { font-size: 27px; line-height: 1.15; margin-bottom: 10px; }
.sheet p { margin: 0; }
@media (min-width: 960px) {
  .core__grid { grid-template-columns: 480px 1fr; gap: 72px; align-items: start; }
  .sheets { margin-top: 44px; }
}

.signing {
  position: relative; margin-top: 64px; background: var(--sheet); border: 1px solid var(--rule);
  padding: 34px 22px 30px 48px; box-shadow: 0 26px 40px -34px rgba(30, 39, 33, .6);
}
.signing::before { content: ""; position: absolute; left: 28px; top: 0; bottom: 0; border-left: 3px double var(--margin); }
.pledge { margin: 0 0 40px; }
.pledge p { font: italic 400 clamp(25px, 6.2vw, 38px)/1.3 var(--serif); margin: 0; max-width: 26ch; }
.signline { display: flex; align-items: flex-end; gap: 14px; max-width: 460px; border-bottom: 1.5px solid var(--ink); padding: 0 4px 6px; }
.signline__x { font: italic 400 30px/1 var(--serif); }
.signline__name { font: italic 400 26px/1.1 var(--serif); color: var(--green); }
.signline__label { font: 500 12.5px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 10px 0 30px; }
.signing .actions { max-width: 640px; }
@media (min-width: 960px) { .signing { padding: 56px 64px 52px 96px; } .signing::before { left: 56px; } }

/* Practice areas: manila folders with the name on the tab. */
.folders { display: grid; gap: 58px; margin-top: 56px; }
.folder { position: relative; background: var(--manila); border-radius: 0 7px 7px 7px; padding: 26px 22px 22px; }
.folder h3 {
  position: absolute; left: 0; top: -36px; height: 36px; padding: 12px 18px 0;
  background: var(--manila); border-radius: 7px 7px 0 0;
  font: 600 13.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
}
.folder p { margin: 0 0 .8em; }
.folder__list { color: var(--ink-2); font-size: 17px; margin: 0; }
.also { margin: 40px 0 0; font: 500 15px/1.5 var(--sans); color: var(--ink-2); }
@media (min-width: 900px) { .folders { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

/* About */
.about__grid { display: grid; gap: 36px; }
.portrait { background: var(--sheet); padding: 10px; border: 1px solid var(--rule); max-width: 300px; }
.about__text p { max-width: 38rem; }
.signoff { font: italic 400 26px/1 var(--serif); color: var(--green); margin: 6px 0 0; }
.record { margin: 36px 0 0; border-top: 1px solid var(--rule); max-width: 38rem; }
.record div { display: grid; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.record dt { font: 600 12.5px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.record dd { margin: 4px 0 0; }
@media (min-width: 600px) { .record div { grid-template-columns: 10rem 1fr; gap: 16px; } .record dd { margin: 0; } }
@media (min-width: 960px) { .about__grid { grid-template-columns: 320px 1fr; gap: 72px; align-items: start; } .portrait { max-width: none; } }

/* Reviews */
.reviews { background: #f1eadb; }
.rating { display: grid; gap: 6px; margin-bottom: 36px; }
.rating__score { display: flex; align-items: center; gap: 14px; margin: 0; font: 400 64px/1 var(--serif); }
.stars { font: 400 24px/1 var(--sans); letter-spacing: .12em; color: #a77a21; }
.rating__text { margin: 0; max-width: 40rem; }
.rating__date { color: var(--ink-2); font: 500 14.5px/1.5 var(--sans); margin: 4px 0 0; }
.quotes { display: grid; gap: 22px; }
.quote { background: var(--sheet); border: 1px solid var(--rule); padding: 26px 22px 22px; }
.quote blockquote { margin: 0 0 18px; }
.quote blockquote p { font-size: 18px; }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote figcaption { font: 600 15px/1.4 var(--sans); color: var(--ink); margin: 0; }
.quote figcaption span { display: block; font-weight: 500; font-size: 13.5px; color: var(--ink-2); }
@media (min-width: 960px) { .quotes { grid-template-columns: repeat(3, 1fr); align-items: start; } }

/* Office */
.lake { margin-bottom: 40px; }
.lake img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.office__grid { display: grid; gap: 36px; }
.office address { margin: 4px 0 24px; font-size: 20px; line-height: 1.5; }
.record--office { margin-top: 0; }
@media (min-width: 900px) {
  .office__grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
  .lake img { aspect-ratio: 21 / 8; object-position: center 55%; }
}

/* Contact: the back cover of the folio. */
.contact { background: var(--green); color: var(--sheet); padding: 64px 0 72px; }
@media (min-width: 960px) { .contact { padding: 96px 0 104px; } }
.contact .divider { border-bottom-color: var(--sheet); }
.contact .intro { color: #dbe4dc; }
.contact a { color: var(--sheet); }
.contact .btn--paper { color: var(--green); }
.contact .btn--paper:hover { color: var(--green-deep); }
.ways { list-style: none; margin: 32px 0 36px; padding: 0; border-top: 1px solid rgba(255, 253, 248, .28); max-width: 38rem; }
.ways li { display: grid; gap: 2px; padding: 15px 0; border-bottom: 1px solid rgba(255, 253, 248, .28); }
.ways__k { font: 600 12.5px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #cfdacf; }
.ways a, .ways__v { font: 400 clamp(20px, 6.2vw, 24px)/1.3 var(--serif); overflow-wrap: anywhere; }
@media (min-width: 600px) { .ways li { grid-template-columns: 9rem 1fr; align-items: baseline; } }

/* Footer */
.footer { background: var(--green-deep); color: #dbe3db; font: 400 14.5px/1.6 var(--sans); padding: 36px 0 40px; }
.footer p { max-width: 64ch; margin: 0 0 .8em; }
.footer strong { color: var(--sheet); }
.footer__demo { color: #b9c7bb; }

/* Mobile call bar: hidden while the hero's own call button is on screen. */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(246, 241, 231, .97); border-top: 1px solid var(--rule);
  transition: transform .25s ease;
}
.callbar .btn { width: 100%; }
.js .callbar.is-hidden { transform: translateY(110%); }
@media (prefers-reduced-motion: reduce) { .callbar { transition: none; } }
@media (max-width: 899px) { .footer { padding-bottom: 116px; } }
@media (min-width: 900px) { .callbar { display: none; } }
