/* Joanna Cocking, McTimoney Chiropractic. No frameworks, no JavaScript. */
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

@view-transition { navigation: auto; }

:root {
  --slate: #2b1030;      /* aubergine, from the McTimoney colours */
  --ink: #20101f;
  --mist: #f5f1f4;
  --paper: #ffffff;
  --fog: #e2d8df;
  --crimson: #a81d3f;    /* maroon red, from the McTimoney colours */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 1.125rem; line-height: 1.6; color: var(--ink); background: var(--paper); }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); font-variation-settings: "opsz" 72; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-variation-settings: "opsz" 40; }
h3 { font-size: 1.5rem; }
p, ul, dl, figure, blockquote { margin: 0; }
a { color: var(--crimson); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--crimson); outline-offset: 3px; border-radius: 2px; }
address { font-style: normal; }

.wrap { max-width: 76rem; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: 0.75rem 1rem; z-index: 20; }
.skip:focus { left: 0; }

/* header */
.top { background: linear-gradient(100deg, #5a1630, var(--slate) 55%); color: #fff; }
.top-in { display: flex; align-items: center; gap: 1.5rem; min-height: 5rem; }
.brand img { width: 168px; }
.top nav { margin-left: auto; }
.top nav ul { list-style: none; display: flex; gap: 0.25rem; padding: 0; margin: 0; }
.top nav a { color: #fff; text-decoration: none; padding: 0.5rem 0.8rem; border-radius: 999px; display: block; }
.top nav a:hover { background: rgb(255 255 255 / 0.12); }
.top nav a[aria-current="page"] { background: #fff; color: var(--slate); }
.top-tel { color: #fff; background: var(--crimson); font-weight: 700; text-decoration: none; white-space: nowrap; padding: 0.5rem 1.1rem; border-radius: 999px; }
.top-tel:hover { background: #84152f; }
.menu-btn { display: none; }

@media (min-width: 62rem) {
  .top nav[popover] { display: block; position: static; inset: auto; border: 0; padding: 0; background: none; color: inherit; overflow: visible; width: auto; height: auto; margin: 0 0 0 auto; }
}
@media (max-width: 61.99rem) {
  .menu-btn { display: block; margin-left: auto; font: inherit; font-weight: 700; color: #fff; background: none; border: 1.5px solid rgb(255 255 255 / 0.6); border-radius: 999px; padding: 0.45rem 1.1rem; cursor: pointer; }
  .top-tel { display: none; }
  .top nav[popover] { inset: 5rem 0 auto 0; width: 100%; max-width: none; margin: 0; border: 0; padding: 0.5rem var(--gutter) 1.25rem; background: var(--slate); box-shadow: 0 18px 30px rgb(32 16 31 / 0.35); }
  .top nav[popover]::backdrop { background: rgb(32 16 31 / 0.35); }
  .top nav ul { flex-direction: column; gap: 0; }
  .top nav a { font-family: var(--serif); font-size: 1.6rem; padding: 0.6rem 0.9rem; border-radius: 0.6rem; }
}

/* hero */
.hero { background: var(--mist); overflow: clip; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) clamp(3.5rem, 20vw, 15rem); gap: clamp(1rem, 5vw, 5rem); align-items: center; padding-block: clamp(2.5rem, 7vw, 6rem); }
.lede { font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.45; max-width: 36rem; margin-top: 1.5rem; }
.intro { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.75rem; }
.intro picture { flex: none; }
.intro img { width: 132px; flex: none; border-radius: 0.9rem; box-shadow: 0 0 0 4px var(--paper); }
.intro .lede { margin-top: 0; }
@media (max-width: 30rem) { .intro { align-items: flex-start; gap: 1rem; } .intro img { width: 96px; } }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn { display: inline-block; text-wrap: balance; background: var(--crimson); color: #fff; font-weight: 700; text-decoration: none; padding: 0.9rem 1.4rem; border-radius: 999px; border: 2px solid var(--crimson); }
.btn:hover { background: #84152f; border-color: #84152f; }
.btn-slate { background: var(--slate); border-color: var(--slate); }
.btn-slate:hover { background: var(--ink); border-color: var(--ink); }
.who { list-style: none; padding: 0; margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; color: var(--slate); font-size: 1rem; }
.who li { padding-left: 1.1rem; position: relative; }
.who li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--slate); }

.spine { width: 100%; fill: var(--slate); align-self: stretch; max-height: 34rem; margin-inline: auto; }
.spine .v { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .spine .v-out { animation: settle 1.6s cubic-bezier(0.3, 0.9, 0.3, 1) both; animation-delay: calc(0.7s + var(--i) * 45ms); }
}
@keyframes settle {
  from { transform: translateX(var(--dx)) rotate(var(--rot)); fill: var(--crimson); }
  to { transform: none; fill: var(--slate); }
}

/* page heads */
.pagehead { background: var(--mist); padding-block: clamp(2.5rem, 6vw, 5rem); }
.pagehead h1 { max-width: 18ch; }

/* bands: heading left, text right */
.band { padding-block: clamp(2.5rem, 6vw, 5rem); }
.band + .band, .covid + .band { border-top: 1px solid var(--fog); }
.band-tint { background: var(--mist); }
.band-in { display: grid; gap: 1.25rem clamp(2rem, 6vw, 6rem); }
@media (min-width: 56rem) { .band-in { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); align-items: start; } }
.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1.1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.4rem; }
.prose li::marker { color: var(--crimson); }

.covid { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.notice { background: var(--mist); border-radius: 0.9rem; padding: 1.1rem 1.4rem; font-size: 1rem; line-height: 1.5; display: grid; gap: 0.6rem 2rem; }
@media (min-width: 56rem) { .notice { grid-template-columns: 12rem minmax(0, 1fr); align-items: start; } }
.notice h2 { font-family: var(--sans); font-size: 1rem; font-weight: 700; letter-spacing: 0; line-height: 1.5; display: flex; align-items: center; gap: 0.55rem; }
.notice h2::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--crimson); flex: none; }
.notice-body > * + * { margin-top: 0.6rem; }
.notice ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.notice li { background: var(--paper); border-radius: 999px; padding: 0.25rem 0.85rem; }

.conditions { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0; border-top: 1px solid var(--fog); }
.conditions li { display: flex; align-items: center; gap: 0.8rem; padding: 0.85rem 0; margin: 0 !important; border-bottom: 1px solid var(--fog); font-family: var(--serif); font-size: 1.3rem; }
.mark { width: 1.6rem; flex: none; fill: none; stroke: var(--slate); stroke-width: 1.2; }
.mark .dot { fill: var(--crimson); stroke: none; }

.quote blockquote { font-family: var(--serif); font-size: 1.3rem; line-height: 1.5; }
.quote blockquote p + p { margin-top: 1rem; }
.quote figcaption { margin-top: 0.75rem; font-weight: 700; color: var(--slate); }
.quote + .quote { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--fog); }
.longquotes { max-width: 52rem; }
.longquotes .quote blockquote { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }

.portrait img { width: 144px; border-radius: 0.5rem; float: right; margin: 0.3rem 0 1rem 1.5rem; }

.prices, .contacts { border-top: 1px solid var(--fog); }
.prices div, .contacts div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 2rem; padding: 0.9rem 0; border-bottom: 1px solid var(--fog); }
.prices dt, .contacts dt { font-weight: 700; }
.prices dd, .contacts dd { margin: 0; font-family: var(--serif); font-size: 1.4rem; }
.contacts dd a { overflow-wrap: anywhere; }

/* clinics */
.clinics { display: grid; gap: 2.5rem clamp(2rem, 6vw, 6rem); }
@media (min-width: 44rem) { .clinics { grid-template-columns: 1fr 1fr; } }
.clinic > * + * { margin-top: 0.75rem; }
.clinic .tel { font-family: var(--serif); font-size: 1.6rem; }
.clinic .tel a { white-space: nowrap; }

.map { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 0.9rem; margin-top: 1.5rem !important; background: var(--mist); }

/* footer */
.foot { background: var(--slate); color: #fff; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.foot h2 { margin-bottom: 2rem; }
.foot a { color: #fff; }
.foot .small:first-child { margin-top: 0; }
.foot .small { font-size: 1rem; margin-top: 2rem; color: rgb(255 255 255 / 0.85); }
.foot .small + .small { margin-top: 0.5rem; }
.foot .small a { margin-right: 0.75rem; }

/* phone bar on small screens */
.callbar { display: none; }
@media (max-width: 44rem) {
  body { padding-bottom: 4.25rem; }
  .callbar { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; position: fixed; inset: auto 0 0 0; z-index: 10; background: #fff; box-shadow: 0 -6px 20px rgb(32 16 31 / 0.18); }
  .callbar a { background: var(--crimson); color: #fff; font-weight: 700; text-decoration: none; text-align: center; padding: 1.05rem 0.5rem calc(1.05rem + env(safe-area-inset-bottom)); }
  .callbar a + a { background: var(--slate); }
  .actions .btn { width: 100%; text-align: center; }
}

@media print { .top nav, .menu-btn, .callbar, .spine { display: none; } }

/* small screens: the spine sits beside the headline only, everything else runs full width */
@media (max-width: 40rem) {
  .hero-in { grid-template-columns: minmax(0, 1fr) 3rem; gap: 0 1rem; align-items: start; }
  .hero-text { display: contents; }
  .hero-text h1 { grid-column: 1; grid-row: 1; }
  .hero-text > :not(h1) { grid-column: 1 / -1; }
  .spine { grid-column: 2; grid-row: 1; align-self: center; max-height: 15rem; }
}

/* contact page */
.lede.wide { max-width: 46rem; }
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; margin-top: 2rem; max-width: 54rem; }
.way { display: block; padding: 1.3rem 1.5rem 1.4rem; border: 1.5px solid var(--fog); border-radius: 0.9rem; text-decoration: none; color: var(--ink); }
.way:hover { border-color: var(--slate); }
.way span { display: block; font-size: 1rem; font-weight: 700; }
.way strong { display: block; margin-top: 0.35rem; font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.15; color: var(--crimson); white-space: nowrap; }
.way strong.email { font-size: 1.35rem; white-space: normal; overflow-wrap: anywhere; padding-block: 0.3rem; }
.way-main { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.way-main strong { color: #fff; }
.way-main:hover { background: #84152f; border-color: #84152f; }
