/* ==========================================================================
   Luke Bramhall Physiotherapy
   Hand-written stylesheet. Replaces the compiled Tailwind bundle.

   Dark mode is CLASS based (html.dark), not media-query based. The previous
   build compiled dark: utilities inside @media (prefers-color-scheme: dark),
   so the toggle flipped a class no rule responded to. That is fixed here.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --text-faint: #64748b;
  --line: #e2e8f0;
  --brand: #1d4ed8;
  --brand-soft: #2563eb;
  --brand-ink: #ffffff;
  --brand-wash: #eff6ff;
  --dark-band: #0f172a;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .06), 0 18px 40px -16px rgba(15, 23, 42, .28);
  --radius: 16px;
  --maxw: 1180px;
  --read: 72ch;
}

html.dark {
  --bg: #020618;
  --bg-alt: #0f172a;
  --bg-card: #0f172a;
  --text: #f8fafc;
  --text-soft: #94a3b8;
  --text-faint: #94a3b8;
  --line: #1e2a3b;
  --brand: #5b9bff;
  --brand-soft: #7cb0ff;
  --brand-ink: #02122e;
  --brand-wash: #0d1f3c;
  --dark-band: #0d1b33;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px -12px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .5), 0 18px 40px -16px rgba(0, 0, 0, .8);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; letter-spacing: -.018em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.45rem, 2.9vw, 2.05rem); }
h3 { font-size: clamp(1.17rem, 2vw, 1.4rem); font-weight: 700; }
p { margin: 0 0 1.05em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
strong { font-weight: 700; color: var(--text); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-in { display: flex; align-items: center; gap: 18px; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; }
.brand span { font-size: 1.02rem; }
.brand small { display: block; font-size: .7rem; font-weight: 600; color: var(--text-faint); letter-spacing: .04em; text-transform: uppercase; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { padding: 9px 13px; border-radius: 9px; font-weight: 600; font-size: .94rem; color: var(--text-soft); }
.nav a:hover { background: var(--bg-alt); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-wash); }
.nav a.btn { color: var(--brand-ink); padding: 11px 20px; }
.nav a.btn:hover { background: var(--brand); color: var(--brand-ink); }

.has-menu { position: relative; }
.has-menu > button {
  display: flex; align-items: center; gap: 5px; padding: 9px 13px; border: 0; border-radius: 9px;
  background: none; font: inherit; font-weight: 600; font-size: .94rem; color: var(--text-soft); cursor: pointer;
}
.has-menu > button:hover { background: var(--bg-alt); color: var(--text); }
.has-menu > button svg { width: 14px; height: 14px; transition: transform .2s; }
.has-menu[data-open="true"] > button svg { transform: rotate(180deg); }
.menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 440px;
  display: none; grid-template-columns: 1fr 1fr; gap: 2px; padding: 10px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg);
}
.has-menu[data-open="true"] .menu { display: grid; }
.menu a { display: block; padding: 9px 11px; border-radius: 9px; font-size: .9rem; font-weight: 600; color: var(--text-soft); }
.menu a:hover { background: var(--bg-alt); color: var(--brand); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 700; font-size: .94rem; cursor: pointer;
  background: var(--brand); color: var(--brand-ink);
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; transform: translateY(-1px); }
.btn-lg { padding: 14px 26px; font-size: 1.03rem; }
.btn-ghost { background: var(--bg-alt); color: var(--text); border: 1px solid var(--line); }
.btn-light { background: #fff; color: #1d4ed8; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 1px solid var(--line);
  border-radius: 999px; background: var(--bg-card); color: var(--text-soft); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-alt); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
html.dark .moon { display: none; }
html:not(.dark) .sun { display: none; }

.burger { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 84px; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(2, 6, 24, .9) 0%, rgba(2, 6, 24, .72) 48%, rgba(2, 6, 24, .42) 100%);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-in { position: relative; z-index: 2; max-width: 46rem; color: #fff; }
.hero-in h1 { color: #fff; }
.hero-in h1 em { font-style: normal; color: #93c4fe; display: block; }
.hero-in p { font-size: 1.16rem; color: #cfdeea; max-width: 38rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  padding: 7px 15px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  background: rgba(147, 196, 254, .15); color: #93c4fe; border: 1px solid rgba(147, 196, 254, .3);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.page-head { padding: 72px 0 8px; }
.page-head .eyebrow { background: var(--brand-wash); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.crumb { font-size: .86rem; color: var(--text-faint); margin-bottom: 18px; }
.crumb a { color: var(--text-faint); font-weight: 600; }
.crumb a:hover { color: var(--brand); }
.crumb span { margin: 0 7px; opacity: .5; }
.lede { font-size: 1.16rem; color: var(--text-soft); max-width: var(--read); }

/* ---------- sections ---------- */
section { padding: 60px 0; }
.band { background: var(--bg-alt); }
.sec-head { max-width: var(--read); margin-bottom: 34px; }
.sec-head p { color: var(--text-soft); margin: 0; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  display: flex; flex-direction: column; padding: 24px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
a.card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.card h3 { margin-bottom: 8px; color: var(--text); }
a.card:hover h3 { color: var(--brand); }
.card p { color: var(--text-soft); font-size: .96rem; margin-bottom: 14px; }
.card .more { margin-top: auto; font-weight: 700; font-size: .9rem; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }

/* sport tiles */
.tile {
  position: relative; display: block; height: 240px; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.06); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(2, 6, 24, .92) 8%, rgba(2, 6, 24, .15) 62%, transparent 100%); }
.tile-txt { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 20px; }
.tile-txt h3 { color: #fff; margin: 0 0 3px; font-size: 1.22rem; }
.tile-txt p { color: #c3d4e2; font-size: .83rem; margin: 0; }
.tile:hover { text-decoration: none; }

/* ---------- prose ---------- */
.prose { max-width: var(--read); }
.prose h2 { margin-top: 0; }
.prose h3 { margin-top: 2.1em; padding-top: .2em; }
.prose p, .prose li { color: var(--text-soft); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--brand); }
.prose > ul > li > strong:first-child { color: var(--text); }
.jump {
  display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 34px;
  padding: 18px 20px; background: var(--bg-alt);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.jump b { width: 100%; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.jump a {
  padding: 7px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--text-soft);
}
.jump a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.svc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.svc-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 12px; font-weight: 650; color: var(--text);
}
.svc-list a:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); background: var(--brand-wash); }
.svc-list svg { width: 17px; height: 17px; flex: none; opacity: .5; }

/* ---------- facts / contact ---------- */
.facts { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.fact { padding: 22px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); }
.fact dt { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); font-weight: 700; margin-bottom: 7px; }
.fact dd { margin: 0; font-weight: 600; }
.fact dd a { color: var(--text); }

.cta-band { background: var(--dark-band); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #b7c9d8; max-width: 44rem; margin: 0 auto 26px; }

.note {
  padding: 18px 22px; border-radius: 12px; margin: 0 0 24px;
  background: var(--brand-wash); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.note p:last-child { margin: 0; }
.note b { color: var(--brand); }

details.faq {
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px;
  background: var(--bg-card); overflow: hidden;
}
details.faq > summary {
  padding: 18px 22px; font-weight: 700; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--brand); flex: none; }
details.faq[open] > summary::after { content: "\2212"; }
details.faq > div { padding: 0 22px 6px; }
details.faq p { color: var(--text-soft); }

/* ---------- footer ---------- */
.ftr { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 56px 0 26px; }
.ftr-grid { display: grid; gap: 34px; grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.ftr h4 { font-size: .76rem; letter-spacing: .11em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.ftr ul { list-style: none; padding: 0; margin: 0; }
.ftr li { margin-bottom: 8px; }
.ftr a, .ftr address { color: var(--text-soft); font-size: .93rem; font-style: normal; line-height: 1.75; }
.ftr a:hover { color: var(--brand); }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--text-soft);
}
.socials a:hover { color: var(--brand); border-color: var(--brand); }
.socials svg { width: 18px; height: 18px; }
.ftr-base {
  margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .85rem; color: var(--text-faint);
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr !important; }
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: 70px; left: 0; right: 0; max-height: calc(100vh - 70px);
    overflow-y: auto; padding: 14px 20px 22px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  }
  .nav.open .has-menu > button { width: 100%; justify-content: space-between; }
  .nav.open .menu { position: static; min-width: 0; grid-template-columns: 1fr; box-shadow: none; border: 0; padding: 2px 0 8px 10px; }
  .nav.open .btn { margin-top: 10px; }
  .burger { display: inline-flex; margin-left: auto; }
  .g3, .g2, .facts { grid-template-columns: 1fr; }
  .hero { padding: 68px 0 60px; }
  section { padding: 46px 0; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr; }
  body { font-size: 1.03rem; }
}

@media print {
  .hdr, .ftr, .hero-cta, .cta-band { display: none; }
  body { color: #000; background: #fff; }
}
