/* West Lethbridge Family Chiropractic: site.css
   One stylesheet, no framework. Tokens: DESIGN.md (v2, "The Coulee Lookout, turned up").
   Mobile first; breakpoints 480 / 768 / 900 / 960 / 1024 / 1100. */

/* ---------- Fonts (self-hosted, Latin subset, OFL: see /fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/poppins-latin-900-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lora-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lora-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lora-latin-700-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  /* colour (unchanged from v1; every pair checked in scripts/contrast.mjs) */
  --lake: #1bbfe2;
  --lake-ink: #0f2e38;
  --lake-deep: #0b6e86;
  --lake-deep-hover: #095a6e;
  --raspberry: #ff3367; /* photo rings only: no text or button role */
  --ink: #1d2b30;
  --muted: #4f5f64;
  --band: #f3f8f9;
  --paper: #ffffff;
  --footer: #242424;
  --footer-text: #c9d2d5;
  --footer-link: #1bbfe2;
  --line: #c6d3d7;

  /* type: Poppins 900 for every heading, Lora for reading and for the warm italic voice */
  --font-head: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --fs-display: clamp(2rem, 1.2rem + 2.2vw, 2.875rem);
  --fs-h2: clamp(1.875rem, 1.35rem + 1.8vw, 2.5rem);
  --fs-h3: clamp(1.3125rem, 1.15rem + 0.5vw, 1.5rem);
  --fs-h3-lead: clamp(1.625rem, 1rem + 1.6vw, 2.25rem);
  --fs-pull: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem);
  --fs-lead: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  --fs-body: 1.125rem;
  --fs-small: 0.9375rem;
  --fs-phone: clamp(1.125rem, 0.9rem + 1vw, 1.5rem);
  --measure: 65ch;

  /* space (4px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --section-y: clamp(56px, 9vw, 112px);
  --gutter: 16px;
  --max: 1080px;
  /* side padding that centres a --max column without a wrapper element */
  --inline: max(var(--gutter), (100% - var(--max)) / 2);
  /* depth of the swoosh curve on the hero's bottom edge and the contact field's top edge */
  --curve: clamp(28px, 6vw, 88px);

  /* shape, depth, motion */
  --r-btn: 6px;
  --r-card: 10px;
  --r-tile: 20px;
  --shadow-nav: 0 2px 8px rgba(15, 46, 56, 0.12);
  --shadow-lift: 0 10px 22px -10px rgba(15, 46, 56, 0.55);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;

  --header-h: 64px;
  --call-bar-h: 72px;
}
@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --header-h: 80px;
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
  scrollbar-color: var(--lake-deep) var(--band);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  caret-color: var(--lake-deep);
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--lake);
  color: var(--lake-ink);
}
img,
svg,
iframe {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 900;
  color: inherit;
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h2 {
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
}
p {
  margin: 0 0 var(--s-4);
  max-width: var(--measure);
  text-wrap: pretty;
}
p:last-child {
  margin-bottom: 0;
}
a {
  color: var(--lake-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--t-fast) ease, text-decoration-thickness var(--t-fast) ease;
}
a:hover {
  color: var(--lake-deep-hover);
  text-decoration-thickness: 2px;
}
address {
  font-style: normal;
}
small {
  font-size: var(--fs-small);
}

/* Focus: one ring everywhere, darker on the lake fields */
:focus-visible {
  outline: 3px solid var(--lake-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero :focus-visible,
.doctors__band :focus-visible,
.contact :focus-visible {
  outline-color: var(--lake-ink);
}
body > footer :focus-visible {
  outline-color: var(--footer-link);
}
main:focus {
  outline: none;
}

/* Skip link (visible on focus) */
.skip-link {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--lake-ink);
  color: var(--paper);
  font-family: var(--font-head);
  font-weight: 900;
  border-radius: var(--r-btn);
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}
.skip-link,
.skip-link:hover {
  color: var(--paper);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  min-height: 48px;
  min-width: 48px;
  padding: var(--s-3) var(--s-5);
  border: 2px solid transparent;
  border-radius: var(--r-btn);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease,
    border-color var(--t-fast) ease, transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.btn:active {
  transform: none;
  box-shadow: none;
}
.btn svg {
  flex: none;
  width: 1.1em;
  height: 1.1em;
}
.btn-lg {
  min-height: 60px;
  padding: var(--s-4) var(--s-6);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  font-variant-numeric: tabular-nums;
}
.btn-primary {
  background: var(--lake-deep);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--lake-deep-hover);
  color: var(--paper);
}
.btn-on-lake {
  background: var(--lake-ink);
  color: var(--paper);
}
.btn-on-lake:hover {
  background: #071d24;
  color: var(--paper);
}
.btn-outline {
  background: var(--paper);
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-call {
  font-size: var(--fs-phone);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Under 480px the label reads "Call": aria-label keeps the full number */
@media (max-width: 479.98px) {
  .btn-call .btn-call__number {
    display: none;
  }
}

/* Text link with an icon (hero "Directions") */
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 48px;
  font-family: var(--font-head);
  font-weight: 900;
}
.icon-link svg {
  width: 1.2em;
  height: 1.2em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: var(--header-h);
  padding: var(--s-2) var(--inline);
  background: var(--paper);
  box-shadow: var(--shadow-nav);
}
.site-header img {
  width: clamp(120px, 34vw, 180px);
  height: auto;
}
.site-header .btn-call {
  padding-inline: var(--s-4);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
/* "Forms" shortcut for returning patients, from tablet up (phones get the call bar) */
.header-link {
  display: none;
}
@media (min-width: 768px) {
  .header-link {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    font-family: var(--font-head);
    font-weight: 900;
    color: var(--ink);
    text-decoration: none;
  }
  .header-link:hover {
    color: var(--lake-deep);
    text-decoration: underline;
  }
}

/* ---------- Lake fields (hero, doctors band, contact) ---------- */
.hero,
.doctors__band,
.contact {
  background-color: var(--lake);
  background-image: url("../assets/contours.svg");
  background-size: 600px 600px;
  color: var(--lake-ink);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: var(--s-6);
  padding: clamp(32px, 4.5vw, 64px) var(--inline) calc(var(--s-8) + var(--curve) * 0.5);
  /* the bottom edge bows like the logo's swoosh */
  border-radius: 0 0 50% 50% / 0 0 var(--curve) var(--curve);
}
.hero__photo {
  justify-self: center;
  width: min(52vw, 220px);
}
/* phones: the call button comes up under the pull line so it lands on the first screen */
@media (max-width: 959.98px) {
  .hero__copy {
    display: flex;
    flex-direction: column;
  }
  .hero .hero__copy .cta-row {
    order: 1;
    margin: var(--s-5) 0;
  }
  .hero__copy > p:not(.pull) {
    order: 2;
  }
}
.hero h1 {
  max-width: 20ch;
}
.hero p {
  font-size: 1.1875rem;
}
.hero .pull {
  margin-top: var(--s-5);
  font-style: italic;
  font-size: var(--fs-pull);
  line-height: 1.4;
}
.hero .cta-row {
  margin-top: var(--s-6);
}
.hero a:not(.btn),
.hero a:not(.btn):hover {
  color: var(--lake-ink);
}
@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    column-gap: clamp(40px, 5vw, 72px);
    align-items: center;
  }
  .hero__photo {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }
  .hero__copy {
    grid-column: 1;
    grid-row: 1;
  }
}
/* the one authored moment: the doctors' photo settles into place on load */
@media (prefers-reduced-motion: no-preference) {
  .hero__photo img {
    animation: settle 1100ms var(--ease) both;
  }
}
@keyframes settle {
  from {
    transform: translateY(18px) rotate(-4deg) scale(0.96);
  }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-6);
}
@media (max-width: 479.98px) {
  .hero .btn-lg {
    width: 100%;
  }
}

/* Hours (kept for when the clinic confirms hours) */
.hours-card {
  width: 100%;
  max-width: 26rem;
  padding: var(--s-5);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--r-card);
}
.hours {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
}
.hours th,
.hours td {
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.hours th {
  font-family: var(--font-head);
  font-weight: 900;
  padding-right: var(--s-4);
}
.hours td {
  text-align: right;
}

/* ---------- Medallion (ringed photos; rings are painted into the images) ---------- */
.medallion {
  margin: 0;
  flex: none;
}
.medallion img {
  width: 100%;
  height: auto;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section-y) var(--inline);
  background: var(--paper);
}
.section--band {
  background: var(--band);
}
.section-head {
  max-width: 40rem;
  margin-bottom: clamp(var(--s-6), 4vw, 56px);
}
.lead {
  margin: var(--s-3) 0 0;
  font-style: italic;
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--muted);
}

/* ---------- Services: one lead tile, two beside it ---------- */
.services-grid {
  display: grid;
  gap: var(--s-5);
}
.service {
  padding: clamp(20px, 3.4vw, 44px);
  background: var(--band);
  border-radius: var(--r-tile);
}
.service__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
  margin-bottom: var(--s-5);
}
.service .medallion {
  width: clamp(80px, 24vw, 112px);
}
.service h3 {
  flex: 1 1 11rem;
}
.reassure {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 3px solid var(--lake);
  font-style: italic;
  font-size: var(--fs-pull);
  line-height: 1.4;
}
/* the lead tile runs full width with the reassurance as its own column; the other two sit side by side below */
@media (min-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-6);
  }
  .service--lead {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19rem;
    column-gap: clamp(40px, 5vw, 72px);
  }
  .service--lead .service__head,
  .service--lead .service__body {
    grid-column: 1;
  }
  .service--lead .reassure {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    margin-top: 0;
    font-size: clamp(1.5rem, 1rem + 1vw, 1.875rem);
    line-height: 1.35;
  }
  .service--lead .medallion {
    width: 160px;
  }
  .service--lead h3 {
    font-size: var(--fs-h3-lead);
  }
}

/* ---------- Doctors: a lake band, the two of them side by side over its edge ---------- */
.doctors {
  --med: clamp(200px, 22vw, 260px);
  background: var(--paper);
}
.doctors__band {
  padding: var(--section-y) var(--inline) calc(var(--med) / 2 + var(--s-7));
  text-align: center;
  border-radius: 0 0 50% 50% / 0 0 var(--curve) var(--curve);
}
.doctors__band .section-head {
  margin: 0 auto;
}
.doctors__band .lead {
  color: var(--lake-ink);
}
.doctors__grid {
  display: grid;
  gap: var(--s-8);
  margin-top: calc(var(--med) / -2);
  padding: 0 var(--inline) var(--section-y);
}
/* a paper disc behind each photo keeps the painted rings clear of the lake band */
.doctor .medallion {
  width: var(--med);
  margin: 0 auto var(--s-5);
  padding: 10px;
  background: var(--paper);
  border-radius: 50%;
  box-shadow: 0 18px 36px -24px rgba(15, 46, 56, 0.55);
}
.doctor h3 {
  margin-bottom: var(--s-5);
  text-align: center;
  font-size: var(--fs-h3-lead);
}
@media (min-width: 960px) {
  .doctors__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(40px, 6vw, 88px);
    align-items: start;
  }
}

/* ---------- New patients: compact strip ---------- */
.newpt {
  display: grid;
  gap: var(--s-6);
  padding-top: clamp(48px, 7vw, 80px);
  padding-bottom: clamp(48px, 7vw, 80px);
}
.newpt .section-head {
  margin-bottom: 0;
}
.downloads {
  display: grid;
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.downloads li {
  display: grid;
  gap: var(--s-1);
}
.downloads .btn {
  justify-content: flex-start;
  min-height: 60px;
  text-align: left;
}
.btn-file small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
  font-weight: 400;
  color: inherit;
}
@media (min-width: 900px) {
  .newpt {
    grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
    column-gap: var(--s-8);
    align-items: center;
  }
}

/* ---------- FAQ: heading column + hairline list ---------- */
.faq-section {
  display: grid;
}
.qa {
  padding: var(--s-6) 0;
  border-top: 1px solid var(--line);
}
.qa:first-child {
  padding-top: 0;
  border-top: 0;
}
.qa:last-child {
  padding-bottom: 0;
}
.qa h3 {
  margin-bottom: var(--s-3);
  max-width: 32ch;
}
@media (min-width: 1024px) {
  .faq-section {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    column-gap: var(--s-8);
    align-items: start;
  }
  .faq-section .section-head {
    position: sticky;
    top: calc(var(--header-h) + var(--s-6));
  }
}

/* ---------- Contact: the closing lake field ---------- */
.contact {
  padding: calc(var(--section-y) + var(--curve) * 0.4) var(--inline) var(--section-y);
  border-radius: 50% 50% 0 0 / var(--curve) var(--curve) 0 0;
}
.contact .lead {
  color: var(--lake-ink);
}
.contact .btn-outline {
  background: transparent;
  border-color: var(--lake-ink);
  color: var(--lake-ink);
}
.contact .btn-outline:hover {
  background: var(--lake-ink);
  color: var(--paper);
}
.contact-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  margin-bottom: var(--s-7);
}
.contact-grid h3 {
  margin-bottom: var(--s-3);
  font-size: 1.125rem;
}
.contact-grid address {
  font-size: 1.1875rem;
}
.contact .icon-link,
.contact .icon-link:hover {
  margin-top: var(--s-2);
  color: var(--lake-ink);
}
.contact-grid .btn {
  width: 100%;
  max-width: 22rem;
}
.map {
  height: clamp(280px, 40vw, 400px);
  overflow: hidden;
  border: 4px solid var(--paper);
  border-radius: var(--r-tile);
  background: var(--band);
  box-shadow: 0 22px 44px -22px rgba(15, 46, 56, 0.6);
}
.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
/* phones: the map is a picture, so it can't trap the page scroll; "Directions" opens Maps */
@media (max-width: 767.98px) {
  .map iframe {
    pointer-events: none;
  }
}

/* ---------- Footer ---------- */
body > footer {
  padding: var(--s-8) var(--inline);
  background: var(--footer);
  color: var(--footer-text);
  font-size: 1rem;
  line-height: 1.6;
}
body > footer a {
  display: inline-block;
  padding-block: 10px;
  color: var(--footer-link);
}
body > footer a:hover {
  color: var(--paper);
}
body > footer strong {
  color: var(--paper);
  font-family: var(--font-head);
  font-weight: 900;
}
body > footer p {
  max-width: none;
}

/* ---------- Mobile call bar ---------- */
.call-bar {
  display: none;
}
@media (max-width: 767.98px) {
  .call-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    display: block;
    padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom));
    background: var(--paper);
    box-shadow: 0 -2px 8px rgba(15, 46, 56, 0.12);
  }
  .call-bar .btn {
    width: 100%;
  }
  body:has(.call-bar) {
    padding-bottom: calc(var(--call-bar-h) + env(safe-area-inset-bottom));
  }
  .js .call-bar {
    transform: translateY(110%);
    transition: transform 320ms var(--ease);
  }
  .js .call-bar.is-on {
    transform: none;
  }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover {
    transform: none;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header {
    position: static;
    box-shadow: none;
  }
  .call-bar,
  .skip-link,
  .map {
    display: none !important;
  }
  body {
    color: #000;
    font-size: 11pt;
  }
  .hero,
  .doctors__band,
  .contact,
  .section,
  .service,
  body > footer {
    background: none;
    color: #000;
    border-radius: 0;
    padding-block: 12pt;
  }
  .doctors__grid {
    margin-top: 0;
  }
  .btn {
    border: 1px solid #000;
    color: #000;
    background: none;
    box-shadow: none;
  }
  .service,
  .doctor,
  .qa {
    break-inside: avoid;
  }
}
