/* ===========================================================================
   Coopersburg Family Chiropractic — one shared stylesheet for every page.
   Identity: a Main Street family practice run by a married couple. Warm cream
   canvas, deep-pine ink, a clay accent, and a signature italic ampersand that
   carries the "Anthony & Patricia" story through the whole site.
   Type is an explicit 8-step scale (13/16/18/22/28/32/40/56px); spacing on a
   4px base. Dark sections restate their background on every light-text rule so
   contrast resolves per-rule.
   =========================================================================== */
:root {
  --bone: #f4efe3;          /* page canvas */
  --bone-warm: #efe7d6;     /* second warm tone for quiet bands */
  --ink: #1f2e28;           /* primary text — high contrast on bone */
  --muted: #4b554d;         /* secondary text — AA on bone */
  --accent: #9a4422;        /* clay — links, marks, the ampersand */
  --accent-soft: #e8b489;   /* warm tint for use ON the deep band only */
  --deep: #18271f;          /* dark band / footer background */
  --pine: #274034;          /* mid pine for the duo panels */
  --measure: 38rem;
  --gap: 1rem;
  --gap-2: 1.5rem;
  --gap-3: 2rem;
  --gap-4: 3rem;
  --gap-5: 4.5rem;
  --edge: clamp(1.25rem, 5vw, 4rem);
  --rule: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  --hair: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- type: explicit 8-step scale -> 13 / 16 / 18 / 22 / 28 / 32 / 40 / 56 px ---- */
h1 { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem;
     line-height: 1.04; letter-spacing: -0.015em; margin: 0 0 1rem; color: var(--ink); }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.75rem;
     line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.75rem; color: var(--ink); }
h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.375rem;
     line-height: 1.3; margin: 0 0 0.5rem; color: var(--ink); }
p  { margin: 0 0 1rem; max-width: var(--measure); }
.lede { font-family: var(--font-display); font-weight: 400; font-size: 1.375rem;
        line-height: 1.5; color: var(--muted); max-width: 36rem; }
.kicker { font-family: var(--font-body); text-transform: uppercase;
          letter-spacing: 0.18em; font-size: 0.8125rem; font-weight: 700;
          color: var(--accent); margin: 0 0 0.75rem; }
.measure { max-width: var(--measure); }
strong { font-weight: 700; }

/* signature ampersand mark — Fraunces italic, clay, reuses the 56px step */
.amp { font-family: var(--font-display); font-style: italic; font-weight: 400;
       font-size: 3.5rem; line-height: 0.8; color: var(--accent); display: inline-block; }

/* ---- links & buttons (hover + focus on everything interactive) ---- */
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
    text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background-color: var(--ink); color: var(--bone);
              padding: 0.5rem 1rem; z-index: 30; text-decoration: none; }

.btn {
  display: inline-block; font-family: var(--font-body); font-weight: 700;
  font-size: 1rem; text-decoration: none; cursor: pointer; line-height: 1.2;
  background-color: var(--accent); color: var(--bone);
  border: 2px solid var(--accent); border-radius: 2px;
  padding: 0.75rem 1.5rem; transition: transform .12s ease, background-color .12s ease;
}
.btn:hover { transform: translateY(-2px); background-color: var(--ink);
             border-color: var(--ink); color: var(--bone); }

/* ---- sticky header: wordmark, identical nav, and an always-present action set ---- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem 1.5rem;
  padding: 1rem var(--edge); background-color: var(--bone); border-bottom: var(--rule);
}
.brand { display: flex; align-items: baseline; gap: 0.5rem; text-decoration: none; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 1.375rem;
            color: var(--ink); text-decoration: none; letter-spacing: -0.01em; line-height: 1.1; }
.brand .amp { font-size: 1.375rem; line-height: 1; }
.site-head nav ul { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.site-head nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem; }
.site-head nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.head-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.call { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem;
        color: var(--ink); text-decoration: none; white-space: nowrap; }
.call:hover { color: var(--accent); }
.call .lab { display: block; font-family: var(--font-body); font-weight: 700; font-size: 0.8125rem;
             text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.head-actions .btn { padding: 0.5rem 1rem; }

main { display: block; }
section { padding: var(--gap-5) var(--edge); border-bottom: var(--rule); }

/* a thin double-stitch divider used as a recurring craft detail */
.seam { height: 0; border: none; border-top: 3px double color-mix(in srgb, var(--accent) 55%, transparent);
        max-width: 4rem; margin: 0 0 1.5rem; }

/* asymmetric masthead — deliberately NOT a centered hero */
.masthead { display: grid; grid-template-columns: 3fr 2fr; gap: var(--gap-4); align-items: end; }
.masthead-lead { min-width: 0; }
.masthead-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1rem; }
.masthead-actions .quiet-link { font-weight: 700; }

/* the "name plate" — the couple, front and centre, as the masthead aside */
.plate { min-width: 0; border-left: 3px solid var(--accent); padding: 0.5rem 0 0.5rem 1.5rem; }
.plate .amp { margin-bottom: 0.5rem; }
.plate .names { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem;
                line-height: 1.3; margin: 0 0 0.75rem; color: var(--ink); }
.plate dl { margin: 0; }
.plate dt { font-weight: 700; font-size: 0.8125rem; text-transform: uppercase;
            letter-spacing: 0.1em; color: var(--muted); margin-top: 1rem; }
.plate dd { margin: 0.25rem 0 0; font-size: 1.125rem; }
.plate dd a { font-weight: 700; }

/* quiet warm band for the story / voice stretches */
.band-quiet { background-color: var(--bone-warm); }
.band-quiet .lede { color: var(--ink); }
.voice { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem;
         line-height: 1.4; color: var(--ink); max-width: 30rem; margin: 0; }
.voice-by { display: block; margin-top: 1rem; font-family: var(--font-body);
            font-size: 1rem; font-weight: 700; color: var(--muted); }

/* reflowing list — auto-fit, never a fixed 3-col card grid; children unclassed */
.reflow { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid;
          grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--gap-3); }
.reflow li { padding: 1.5rem; border: var(--rule); border-radius: 3px;
             border-top: 3px solid var(--accent);
             background-color: color-mix(in srgb, var(--bone) 50%, #ffffff); }
.reflow li p { margin-bottom: 0; }

/* two-up "duo" — the husband-and-wife structure, exactly two panels */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-4); align-items: stretch; }
.duo-card { background-color: var(--pine); border-radius: 4px; padding: 2rem; }
.duo-card h3 { color: #f4efe3; background-color: var(--pine); font-family: var(--font-display);
               font-weight: 600; font-size: 1.375rem; }
.duo-card p { color: #f4efe3; background-color: var(--pine); max-width: none; }
.duo-card .role { color: #e8b489; background-color: var(--pine); font-size: 0.8125rem;
                  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; margin-bottom: 0.5rem; }

/* generic content split (3fr / 2fr) */
.split { display: grid; grid-template-columns: 3fr 2fr; gap: var(--gap-4); align-items: start; }
.side-note { border-top: 3px solid var(--accent); padding-top: 1rem; }
.side-note h3 { font-size: 1.375rem; }
.ticks { margin: 0; padding-left: 1.1rem; }
.ticks li { margin-bottom: 0.5rem; }

/* numbered first-visit walkthrough — ordered list, children unclassed */
.steps { counter-reset: step; list-style: none; margin: 1.5rem 0 0; padding: 0;
         display: grid; gap: var(--gap-2); max-width: 44rem; }
.steps li { position: relative; padding: 0.25rem 0 1.25rem 3.25rem; border-bottom: var(--hair); }
.steps li:last-child { border-bottom: none; }
.steps li::before { counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  font-family: var(--font-display); font-weight: 600; font-size: 1.375rem;
  color: var(--accent); width: 2.25rem; height: 2.25rem; border: 2px solid var(--accent);
  border-radius: 50%; display: grid; place-items: center; }
.steps li h3 { margin-bottom: 0.25rem; }
.steps li p { margin-bottom: 0; }

/* address / locator panel on Contact (no filler imagery — a real, useful card) */
.locator { background-color: var(--bone-warm); border: var(--rule);
           border-left: 3px solid var(--accent); border-radius: 3px; padding: 1.75rem; max-width: 30rem; }
.locator h3 { font-size: 1.375rem; }
.locator address { font-style: normal; font-size: 1.125rem; line-height: 1.6; }

/* dark invitation band — light text RESTATES the dark background in-rule */
.invite { background-color: var(--deep); }
.invite .kicker { color: #e8b489; background-color: var(--deep); }
.invite h2 { color: #f4efe3; background-color: var(--deep); }
.invite p  { color: #f4efe3; background-color: var(--deep); max-width: var(--measure); }
.invite .amp { color: #e8b489; background-color: var(--deep); }
.invite .invite-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.btn-on-dark { background-color: var(--accent-soft); color: #18271f; border-color: var(--accent-soft); }
.btn-on-dark:hover { background-color: #f4efe3; border-color: #f4efe3; color: #18271f; }
.call-on-dark { color: #f4efe3; background-color: var(--deep); font-family: var(--font-display);
                font-weight: 600; font-size: 1.125rem; text-decoration: underline; text-underline-offset: 3px; }

.page-intro { padding-top: var(--gap-5); }
.page-intro .lede { color: var(--muted); }

/* contact — fields are unclassed <p> styled via parent>child */
.contact-grid { display: grid; grid-template-columns: 3fr 2fr; gap: var(--gap-4); align-items: start; }
.contact-form { display: grid; gap: var(--gap-2); max-width: 32rem; }
.contact-form p { margin: 0; display: grid; gap: 0.5rem; max-width: none; }
.contact-form label { font-weight: 700; font-size: 1rem; }
.form-note { background-color: color-mix(in srgb, var(--accent) 12%, var(--bone));
             border: var(--rule); border-left: 3px solid var(--accent);
             padding: 0.75rem 1rem; font-size: 1rem; color: var(--ink); }
input, select, textarea {
  font: inherit; color: var(--ink); background-color: #ffffff;
  border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  border-radius: 2px; padding: 0.5rem 0.75rem; width: 100%;
}
textarea { min-height: 7rem; resize: vertical; }

/* footer — light text RESTATES the dark background in-rule */
.site-foot { background-color: var(--deep); color: #f4efe3; padding: var(--gap-4) var(--edge);
             border-bottom: none; display: grid; gap: 1rem; }
.site-foot p { color: #f4efe3; background-color: var(--deep); max-width: none; margin: 0; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: baseline; }
.foot-mark { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; }
.foot-mark .amp { font-size: 1.375rem; color: #e8b489; background-color: var(--deep); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot-nav a { color: #f4efe3; background-color: var(--deep); font-weight: 500; text-decoration: none; }
.foot-nav a:hover { color: #e8b489; background-color: var(--deep); text-decoration: underline; text-underline-offset: 3px; }
.foot-contact a { color: #e8b489; background-color: var(--deep); font-weight: 700; }
.foot-fine { color: #e8b489; background-color: var(--deep); font-size: 0.8125rem; }

/* ---- responsive: collapse to one column, scale display type up on wide ---- */
@media (max-width: 760px) {
  .masthead, .split, .contact-grid, .duo { grid-template-columns: 1fr; }
  .masthead { align-items: start; }
  section { padding-top: var(--gap-4); padding-bottom: var(--gap-4); }
  .site-head { gap: 0.5rem 1rem; }
}
@media (min-width: 1000px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
