/* =========================================================
   Warrington Chiropractors — "Woodland" styles
   Change the colours here to rebrand the whole site.
   ========================================================= */
:root {
  --forest: #1f3d33;      /* header, footer, headings */
  --sage: #f1f4ee;        /* page background */
  --sage-deep: #e3ebe4;   /* page headers, closing bands */
  --photo: #c6d4c9;       /* behind photos while loading */
  --line: #dbe3dc;
  --brass: #d4a24c;       /* booking buttons only */
  --brass-deep: #c08f37;
  --text: #24352e;
  --muted: #4f6159;
  --link: #2f6b55;
  --on-dark: #dfe8e2;
  --white: #ffffff;

  --font-head: "Young Serif", Georgia, serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1080px;
  --radius-lg: 20px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sage);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 400; color: var(--forest); line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 .6em; }
h3 { font-size: 1.3rem; margin: 0 0 .35em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 34px; border-radius: 999px;
  font-weight: 600; font-size: 1.05rem; text-decoration: none;
  transition: background .2s, transform .2s;
}
.btn-primary { background: var(--brass); color: var(--forest); }
.btn-primary:hover { background: var(--brass-deep); color: var(--forest); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--forest); color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: var(--white); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Logo ---------- */
.mark { width: 32px; height: 45px; flex: none; }
.mark rect { fill: var(--sage); }
.mark rect:nth-child(even) { fill: var(--brass); }

.brand-row { background: var(--forest); padding: 30px 20px 8px; }
.brand {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  text-decoration: none; color: var(--sage);
}
.brand:hover { color: var(--white); }
.wordmark { font-family: var(--font-head); font-size: clamp(1.6rem, 3.2vw, 2rem); line-height: 1; }

/* The vertebrae stack into place on load */
.brand-row .mark rect { animation: stack .7s cubic-bezier(.2,.8,.2,1) both; }
.brand-row .mark rect:nth-child(5) { animation-delay: .05s; }
.brand-row .mark rect:nth-child(4) { animation-delay: .15s; }
.brand-row .mark rect:nth-child(3) { animation-delay: .25s; }
.brand-row .mark rect:nth-child(2) { animation-delay: .35s; }
.brand-row .mark rect:nth-child(1) { animation-delay: .45s; }
@keyframes stack { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* ---------- Menu bar (sticks to the top) ---------- */
.nav-bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--forest);
  transition: box-shadow .25s;
}
.nav-bar.scrolled { box-shadow: 0 8px 24px rgba(15,32,26,.25); }
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 8px 20px 14px;
  display: flex; align-items: center; justify-content: center; min-height: 64px; position: relative;
}
.mini-brand {
  position: absolute; left: 20px; display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--sage); font-family: var(--font-head); font-size: 1.1rem;
  opacity: 0; pointer-events: none; transform: translateX(-6px); transition: opacity .25s, transform .25s;
}
.mini-brand .mark { width: 20px; height: 28px; }
.nav-bar.scrolled .nav-inner { justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.nav-bar.scrolled .mini-brand { position: static; opacity: 1; pointer-events: auto; transform: none; }

.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a {
  display: block; padding: 10px 16px; border-radius: 999px;
  text-decoration: none; color: var(--on-dark); font-weight: 500;
  transition: background .2s, color .2s;
}
.nav-links a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.nav-links a.active { background: var(--sage); color: var(--forest); font-weight: 600; }
.nav-links a.nav-book { background: var(--brass); color: var(--forest); font-weight: 600; }
.nav-links a.nav-book:hover { background: var(--brass-deep); }
.nav-links a.nav-book.active { box-shadow: inset 0 0 0 2px var(--sage); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 12px; color: var(--sage);
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px auto; border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) and (min-width: 901px) {
  .mini-brand span { display: none; }
}
@media (max-width: 900px) {
  .brand-row { display: none; }
  .nav-inner, .nav-bar.scrolled .nav-inner { justify-content: space-between; padding: 10px 16px 10px 20px; }
  .mini-brand { position: static; opacity: 1; pointer-events: auto; transform: none; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--forest); padding: 8px 16px 18px;
    box-shadow: 0 16px 24px rgba(15,32,26,.25);
    display: none;
  }
  .nav-links.open { display: flex; animation: drop .22s ease-out; }
  .nav-links a { padding: 13px 16px; border-radius: 12px; }
  .nav-links a.nav-book { text-align: center; margin-top: 6px; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Home: full-width photo ---------- */
.hero-photo img {
  width: 100%; height: clamp(300px, 38vw, 480px); object-fit: cover;
  background: var(--photo);
}

/* ---------- Home: welcome card over the photo ---------- */
.welcome { padding: 0 20px 88px; }
.welcome-card {
  position: relative; max-width: 880px; margin: -96px auto 0;
  background: var(--white); border-radius: var(--radius-lg);
  padding: 48px 56px; text-align: center;
  box-shadow: 0 20px 50px rgba(31,61,51,.14);
}
.welcome-card h1 { margin-bottom: 14px; }
.welcome .lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 30px; }
.principles {
  display: grid; grid-template-columns: 1fr 1fr;
  margin: 0 0 32px; text-align: left;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.principle { padding: 22px 24px 22px 0; }
.principle + .principle { padding: 22px 0 22px 24px; border-left: 1px solid var(--line); }
.principle p { margin: 0; font-family: var(--font-head); font-size: 1.25rem; line-height: 1.45; color: var(--forest); }
.welcome .follow { color: var(--muted); max-width: 600px; margin: 0 auto 30px; }
.welcome .hero-actions { justify-content: center; flex-direction: column; gap: 12px; }
.call-line { color: var(--muted); font-size: .98rem; }
.call-line a { color: var(--forest); font-weight: 600; }
@media (max-width: 700px) {
  .welcome { padding: 0 14px 56px; }
  .welcome-card { margin-top: -40px; padding: 32px 22px; }
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: 18px 0; border-left: 0; }
  .principle + .principle { border-top: 1px solid var(--line); }
}

/* ---------- Inner page header ---------- */
.page-head { background: var(--sage-deep); padding: 60px 0 52px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: 10px; }
.page-head p { color: var(--muted); margin: 0; max-width: 620px; font-size: 1.15rem; }

/* ---------- Cards & grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
}

/* ---------- Booking ---------- */
.booking-wrap {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 8px; overflow: hidden;
}
.booking-wrap iframe { display: block; width: 100%; border: 0; }
.placeholder-note {
  border: 2px dashed var(--brass); background: #fbf4e6; border-radius: var(--radius);
  padding: 24px; color: #5e4515;
}

/* ---------- Self help ---------- */
.tip { border-top: 4px solid var(--link); }
.tip ul { padding-left: 1.15em; margin: .5em 0 0; }
.tip li { margin-bottom: 4px; }
.notice {
  background: #f8ebe6; color: #4a2a22; padding: 22px 26px;
  border-radius: var(--radius); margin: 40px 0 0;
}
.notice a { color: #8a3a28; }

/* ---------- Reviews ---------- */
.review-grid { columns: 3 300px; column-gap: 22px; }
.review { break-inside: avoid; margin: 0 0 22px; }
.review blockquote { margin: 0 0 16px; font-family: var(--font-head); font-size: 1.1rem; line-height: 1.55; color: var(--forest); }
.review blockquote p { margin: 0 0 .7em; }
.review blockquote p:last-child { margin-bottom: 0; }
.review figcaption { color: var(--muted); font-weight: 600; }
.review figcaption::before { content: "— "; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list strong { display: block; font-family: var(--font-head); font-weight: 400; color: var(--forest); font-size: 1.15rem; }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; border-radius: var(--radius-lg); }
.hours td { padding: 4px 20px 4px 0; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- About me ---------- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.about-photo {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--photo);
  border-radius: var(--radius-lg); box-shadow: 0 20px 50px rgba(31,61,51,.14);
  position: sticky; top: 96px;
}
.about-text { max-width: 620px; }
.about-text p { font-size: 1.12rem; margin: 0 0 1.1em; }
.about-text p:first-of-type { font-family: var(--font-head); font-size: 1.35rem; line-height: 1.5; color: var(--forest); }
.facts { margin: 36px 0 0; padding: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; color: var(--forest); }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { position: static; max-width: 360px; margin: 0 auto; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Closing band ---------- */
.cta-band { background: var(--sage-deep); padding: 64px 0; text-align: center; border-top: 1px solid var(--line); }
.cta-band p { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: #c5d3ca; padding: 36px 0; font-size: .95rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-align: center; }
.site-footer .mark { width: 18px; height: 26px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; }
.reveal.d2 { transition-delay: .2s; }

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