/* Blooming Chiropractic. Components. Tokens only, see theme.css.
   Written for 390 px first, then widened. Motion is opacity and transform only. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--ink); color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--text); font-size: var(--body); line-height: 1.65; font-weight: 400;
  color: var(--ink); background: var(--page);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.on-ink :focus-visible, .nav :focus-visible, .foot :focus-visible { outline-color: var(--accent); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; padding: 12px 16px; background: var(--cream); color: var(--ink); z-index: 50; }
.skip:focus { left: 12px; top: 12px; }

/* type */
.eyebrow {
  font-family: var(--text); font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mute);
}
.on-ink .eyebrow { color: var(--on-ink-mute); }
h1, h2, h3, .display {
  font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; line-height: 1.04; text-wrap: balance;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); line-height: 1.12; }
h1 em, h2 em, h3 em, .display em { font-style: italic; font-weight: 400; padding-right: 0.04em; }
.lede { color: var(--mute); max-width: 58ch; text-wrap: pretty; font-size: 17.5px; }
.on-ink .lede { color: var(--on-ink-mute); }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* controls: one radius scale, --r-lg on every control */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px;
  font-family: var(--text); font-size: 15px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
  color: var(--ink); background: var(--accent); border-radius: var(--r-lg);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--accent-lt); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.link {
  display: inline-block; padding: 6px 0; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--hair-2); transition: border-color var(--dur) var(--ease);
}
.link:hover { border-color: var(--accent-text); }
.on-ink .link { color: var(--on-ink); border-color: rgb(var(--cream-rgb) / 0.32); }
.on-ink .link:hover { border-color: var(--accent); }

/* nav: sits over the dark hero or the ink page head on every page */
.nav { position: absolute; z-index: 20; top: 0; left: 0; right: 0; color: var(--on-ink); }
.nav-bar { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; margin-right: auto; }
.brand img { width: 168px; height: auto; }
.nav-links { display: none; }
.nav-cta { display: none; }
.lang { display: inline-flex; align-items: center; border: 1px solid rgb(var(--cream-rgb) / 0.3); border-radius: var(--r-lg); }
.lang button {
  min-width: 40px; min-height: 36px; padding: 0 8px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--on-ink-mute); transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.lang button[aria-pressed="true"] { color: var(--ink); background: var(--cream); }
.lang button:not([aria-pressed="true"]):hover { color: var(--on-ink); }
.menu-btn { min-height: 44px; padding: 0 2px; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink); }
.menu { display: none; background: var(--glass); border-top: 1px solid var(--hair-ink); border-bottom: 1px solid var(--hair-ink); }
.menu.open { display: block; }
.menu ul { padding-block: 6px 22px; }
.menu li + li { border-top: 1px solid var(--hair-ink); }
.menu a { display: block; padding: 14px 0; font-size: 18px; font-weight: 500; }
.menu .menu-cta { border-top: 0; padding-top: 16px; }
.menu .menu-cta a { display: inline-flex; padding: 0 24px; font-size: 15px; }

/* hero: their photograph, a soft ink scrim only where the text sits */
.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100svh; overflow: hidden; background: var(--ink); color: var(--on-ink); }
.hero-media { position: absolute; z-index: -2; inset: 0 0 auto 0; height: 58%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero-scrim {
  position: absolute; z-index: -1; inset: 0 0 auto 0; height: 58%; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(var(--ink-rgb) / 0.66) 0%, rgb(var(--ink-rgb) / 0) 30%),
    linear-gradient(180deg, rgb(var(--ink-rgb) / 0) 50%, rgb(var(--ink-rgb) / 0.75) 80%, var(--ink) 100%);
}
.hero-copy { padding-top: 96px; padding-bottom: 40px; }
.hero h1 { margin-top: 14px; max-width: 15ch; }
.hero .lede { margin-top: 18px; max-width: 44ch; color: rgb(var(--cream-rgb) / 0.86); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 28px; }

/* interior pages: typographic head on ink */
.page-head { background: var(--ink); color: var(--on-ink); padding: 120px 0 52px; }
.page-head h1 { margin-top: 14px; max-width: 18ch; }
.page-head .lede { margin-top: 18px; max-width: 54ch; }
.nav-links a[aria-current="page"], .menu a[aria-current="page"] { color: var(--on-ink); box-shadow: inset 0 -1px 0 var(--accent); }

/* sections */
.section { padding: var(--section) 0; }
.section + .section { border-top: 1px solid var(--hair); }
.section.alt { background: var(--page-2); border-top: 0; }
.section.alt + .section { border-top: 0; }
.head h2 { margin-top: 14px; max-width: 18ch; }
.head h2:first-child { margin-top: 0; }
.head .lede { margin-top: 18px; }
.head .link { margin-top: 22px; }

/* approach statement: type is the design */
.statement p.display { font-size: clamp(30px, 4.2vw, 56px); line-height: 1.12; max-width: 24ch; }
.statement .by { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; color: var(--mute); }
.statement .by strong { font-weight: 600; color: var(--ink); }

/* new patient offer */
.offer { display: grid; grid-template-columns: 1fr; gap: 40px; }
.price { font-family: var(--display); font-weight: 500; font-size: clamp(110px, 18vw, 230px); line-height: 0.82; letter-spacing: -0.03em; color: var(--accent-text); }
.price small { font-size: 0.42em; vertical-align: 0.9em; margin-right: 0.04em; }
.offer h2 { margin-top: 22px; max-width: 14ch; }
.offer .lede { margin-top: 14px; }
.included { border-bottom: 1px solid var(--hair-2); counter-reset: inc; }
.included li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 18px 0; border-top: 1px solid var(--hair-2); font-size: 18px; font-weight: 500; }
.included li::before { counter-increment: inc; content: counter(inc, decimal-leading-zero); font-size: 13px; font-weight: 600; color: var(--mute); padding-top: 4px; font-variant-numeric: tabular-nums; }
.included small { display: block; font-size: 14.5px; font-weight: 400; color: var(--mute); }
.offer .actions { margin-top: 30px; }
.fine { margin-top: 14px; font-size: 14px; color: var(--mute); }

/* doctors on the home page */
.docs { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.doc img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: 50% 18%; border-radius: var(--r-xl); background: var(--page-2); }
.doc h3 { margin-top: 16px; font-size: clamp(22px, 2.2vw, 32px); }
.doc p { margin-top: 4px; font-size: 14.5px; color: var(--mute); }

/* services on the home page: photo held beside a numbered list */
.svc-wrap { display: grid; grid-template-columns: 1fr; gap: 40px; }
.svc-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-xl); }
.svc-list { counter-reset: svc; border-bottom: 1px solid var(--hair); }
.svc-list a { display: grid; grid-template-columns: 40px 1fr; align-items: baseline; gap: 10px; padding: 16px 0; border-top: 1px solid var(--hair); }
.svc-list a::before { counter-increment: svc; content: counter(svc, decimal-leading-zero); font-size: 13px; font-weight: 600; color: var(--mute); font-variant-numeric: tabular-nums; }
.svc-list span { font-family: var(--display); font-size: clamp(23px, 2.2vw, 30px); font-weight: 500; line-height: 1.15; transition: color var(--dur) var(--ease); }
.svc-list a:hover span { color: var(--accent-text); }

/* conditions on the home page: names as a flowing line of type */
.cloud { margin-top: 36px; font-family: var(--display); font-size: clamp(26px, 3vw, 42px); line-height: 1.32; max-width: 30ch; color: var(--ink); }
.cloud span { white-space: nowrap; }
.cloud i { font-style: normal; color: var(--taupe); padding: 0 0.28em; }

/* two locations */
.locs { margin-top: 48px; display: grid; grid-template-columns: 1fr; gap: 48px; }
.loc h3 { font-size: clamp(32px, 3.6vw, 50px); }
.loc address { margin-top: 10px; font-style: normal; color: var(--mute); }
.loc .tel { display: inline-block; margin-top: 12px; font-size: 20px; font-weight: 500; border-bottom: 1px solid var(--hair-2); }
.loc .tel:hover { border-color: var(--accent-text); }
.hours { margin-top: 22px; border-bottom: 1px solid var(--hair); }
.hours > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--hair); font-size: 15.5px; }
.hours dt { color: var(--mute); }
.hours dd { font-variant-numeric: tabular-nums; }
.loc .link { margin-top: 18px; }
.loc dl.meta { margin-top: 14px; font-size: 15.5px; }
.loc dl.meta div { display: flex; gap: 10px; }
.loc dl.meta dt { color: var(--mute); }

/* closing band */
.close { background: var(--ink); color: var(--on-ink); text-align: center; }
.close h2 { margin: 0 auto; max-width: 16ch; }
.close .lede { margin: 18px auto 0; max-width: 46ch; }
.close .actions { justify-content: center; }

/* footer */
.foot { background: var(--ink); color: var(--on-ink-mute); border-top: 1px solid var(--hair-ink); padding: 56px 0 40px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.foot-logo { width: 116px; height: auto; }
.foot .name { margin-top: 16px; font-family: var(--display); font-size: 24px; line-height: 1.2; color: var(--on-ink); max-width: 18ch; }
.foot h4 { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-ink-mute); margin-bottom: 10px; }
.foot address { font-style: normal; }
.foot a:hover { color: var(--on-ink); }
.foot ul li + li { margin-top: 6px; }
.foot .tel { display: inline-block; margin-top: 6px; color: var(--on-ink); }
.foot-base { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--hair-ink); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 13.5px; }

/* about: doctors */
.doctor { display: grid; grid-template-columns: 1fr; gap: 32px; }
.doctor + .doctor { margin-top: var(--section); }
.portrait { background: var(--page-2); border-radius: var(--r-xl); overflow: hidden; }
.portrait img { width: 100%; aspect-ratio: 6 / 7; object-fit: cover; object-position: 50% 0; }
.doctor h2 { margin-top: 12px; }
.doctor .role { margin-top: 8px; font-size: 16px; color: var(--mute); }
.facts { margin-top: 28px; border-bottom: 1px solid var(--hair); }
.facts > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 14px 0; border-top: 1px solid var(--hair); }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.facts dd { font-size: 17px; }
.cbp { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
.cbp img { width: 100%; border-radius: var(--r-xl); aspect-ratio: 7 / 6; object-fit: cover; }
.cbp h2 { max-width: 16ch; }
.cbp p:not(.eyebrow) { margin-top: 16px; color: var(--mute); max-width: 54ch; }
.mission { font-family: var(--display); font-size: clamp(30px, 4vw, 54px); line-height: 1.14; max-width: 22ch; }

/* services page: numbered editorial entries, each with its photo */
.services { counter-reset: srv; }
.service { display: grid; grid-template-columns: 1fr; gap: 22px; padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--hair); scroll-margin-top: 24px; }
.service:first-child { border-top: 0; padding-top: 0; }
.service .n { font-size: 13px; font-weight: 600; color: var(--mute); font-variant-numeric: tabular-nums; }
.service .n::before { counter-increment: srv; content: counter(srv, decimal-leading-zero); }
.service h2 { margin-top: 10px; font-size: clamp(32px, 3.6vw, 50px); max-width: 16ch; }
.service p.body { margin-top: 14px; color: var(--mute); max-width: 52ch; }
.service img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-xl); background: var(--page-2); }
.service img.contain { object-position: 50% 45%; }

/* conditions page */
.cond-wrap { display: grid; grid-template-columns: 1fr; gap: 48px; }
.cond-photo img { width: 100%; max-width: 240px; border-radius: var(--r-xl); }
@media (min-width: 1000px) { .cond-photo img { max-width: 360px; } }
.groups { display: grid; gap: 48px; }
.group h2 { font-size: clamp(30px, 3.2vw, 44px); }
.group ul { margin-top: 18px; display: grid; grid-template-columns: 1fr; column-gap: 32px; border-top: 1px solid var(--hair); }
.group li { padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: 17px; }
.note { margin-top: 32px; color: var(--mute); max-width: 60ch; font-size: 15.5px; }

/* new patients: first visit */
.visit { display: grid; grid-template-columns: 1fr; gap: 40px; }
.steps { counter-reset: st; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 6px 14px; padding: 22px 0; border-top: 1px solid var(--hair); }
.steps li:last-child { border-bottom: 1px solid var(--hair); }
.steps li::before { counter-increment: st; content: counter(st, decimal-leading-zero); grid-row: span 2; font-size: 13px; font-weight: 600; color: var(--mute); padding-top: 8px; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: clamp(24px, 2.2vw, 30px); }
.steps p { color: var(--mute); max-width: 52ch; }

/* booking form */
.book { display: grid; grid-template-columns: 1fr; gap: 56px; }
.form { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 32px; }
.field { display: grid; gap: 8px; min-width: 0; border: 0; }
.field > label, .field legend { font-size: 15px; font-weight: 600; color: var(--ink); padding: 0; }
.field small { font-size: 13.5px; font-weight: 400; color: var(--mute); }
.field input:not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 14px; font: inherit; font-size: 17px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--hair-2); border-radius: var(--r-lg);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px var(--ring); }
.field [aria-invalid="true"] { border-color: var(--error); }
.err { font-size: 14px; font-weight: 500; color: var(--error); }
.err:empty { display: none; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; font-size: 15.5px; font-weight: 500;
  border: 1px solid var(--hair-2); border-radius: var(--r-lg); background: var(--cream); cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.choice input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.form-msg { padding: 14px 16px; border: 1px solid var(--error); border-left-width: 3px; border-radius: var(--r-lg); background: var(--cream); color: var(--ink); }
.form-msg:empty { display: none; }
.form-msg a { font-weight: 600; border-bottom: 1px solid currentColor; }
.form .btn { justify-self: start; min-height: 54px; padding: 0 30px; font-size: 16px; }
.form .btn[disabled] { opacity: 0.6; cursor: default; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.done { padding: 32px 0; border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); margin-top: 32px; }
.done:focus { outline: 0; }
.done h3 { font-size: clamp(30px, 3vw, 42px); }
.done p { margin-top: 12px; color: var(--mute); max-width: 48ch; }
.aside-call h3 { font-size: 26px; }
.aside-call p { margin-top: 6px; color: var(--mute); }
.aside-call .loc-line { padding: 18px 0; border-top: 1px solid var(--hair); }
.aside-call .loc-line:last-child { border-bottom: 1px solid var(--hair); }
.aside-call .tel { display: inline-block; margin-top: 6px; font-size: 20px; font-weight: 500; border-bottom: 1px solid var(--hair-2); }

/* contact page */
.reach { margin-top: 48px; display: grid; grid-template-columns: 1fr; gap: 10px 48px; }
.reach a { font-size: 18px; border-bottom: 1px solid var(--hair-2); justify-self: start; }
.reach a:hover { border-color: var(--accent-text); }

/* entry reveal. Only armed when the script is running. */
.js .rv { opacity: 0; transform: translateY(14px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); }
.js .rv.in { opacity: 1; transform: none; }

@media (min-width: 700px) {
  .docs { gap: 24px; }
  .locs { grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
  .facts > div { grid-template-columns: 170px 1fr; gap: 16px; align-items: baseline; }
  .group ul { grid-template-columns: 1fr 1fr; border-top: 0; }
  .group ul li:nth-child(-n+2) { border-top: 1px solid var(--hair); }
  .form { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .form .wide { grid-column: 1 / -1; }
  .page-head { padding: 148px 0 64px; }
  .reach { grid-template-columns: repeat(3, auto); justify-content: start; }
}

@media (min-width: 1000px) {
  .nav-bar { min-height: 80px; }
  .brand img { width: 196px; }

  /* split at desktop: ink column holds the type, the photograph keeps the faces clear */
  .hero-media, .hero-scrim { height: 100%; left: 44%; }
  .hero-media img { object-position: 50% 40%; }
  .hero-scrim {
    background:
      linear-gradient(180deg, rgb(var(--ink-rgb) / 0.5) 0%, rgb(var(--ink-rgb) / 0) 18%),
      linear-gradient(90deg, var(--ink) 0%, rgb(var(--ink-rgb) / 0.55) 9%, rgb(var(--ink-rgb) / 0) 26%);
  }
  .hero { justify-content: center; }
  .hero-copy { padding-top: 112px; padding-bottom: 64px; }
  .hero h1 { max-width: 15ch; font-size: clamp(44px, 4.4vw, 66px); }
  .hero .lede { max-width: 34ch; }
  .hero .lede { font-size: 19px; }

  .page-head { padding: 176px 0 76px; }

  .offer { grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 140px); align-items: start; }
  .svc-wrap { grid-template-columns: 1fr 1.1fr; gap: clamp(48px, 7vw, 120px); align-items: start; }
  .svc-photo { position: sticky; top: 32px; }
  .svc-photo img { aspect-ratio: 4 / 5; }
  .docs { grid-template-columns: 1fr 1fr; max-width: 920px; gap: 32px; }

  .doctor { grid-template-columns: 0.85fr 1.15fr; gap: clamp(48px, 7vw, 120px); align-items: center; }
  .doctor.flip .portrait { order: 2; }
  .cbp { grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 120px); }

  .service { grid-template-columns: 1.1fr 0.9fr; gap: clamp(40px, 6vw, 110px); align-items: center; }

  .cond-wrap { grid-template-columns: 0.6fr 1.4fr; gap: clamp(48px, 7vw, 120px); align-items: start; }
  .cond-photo { position: sticky; top: 32px; }
  .group ul { grid-template-columns: 1fr 1fr 1fr; }
  .group ul li:nth-child(-n+3) { border-top: 1px solid var(--hair); }

  .visit { grid-template-columns: 0.9fr 1.1fr; gap: clamp(48px, 7vw, 120px); align-items: start; }
  .book { grid-template-columns: 1.5fr 1fr; gap: clamp(56px, 8vw, 130px); align-items: start; }
}

@media (min-width: 1200px) {
  .nav-bar { gap: 26px; }
  .menu-btn, .menu, .menu.open { display: none; }
  .nav-links { display: flex; gap: clamp(16px, 1.7vw, 30px); }
  .nav-links a { font-size: 14.5px; font-weight: 500; color: rgb(var(--cream-rgb) / 0.86); white-space: nowrap; padding: 6px 0; transition: color var(--dur) var(--ease); }
  .nav-links a:hover { color: var(--on-ink); }
  .nav-cta { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; }
}
