/* The Sports Therapy Clinic, Weymouth
   Tokens are sampled from the clinic's own logo; see _brief.md for the sampling and the roles. */

:root {
  --ink:     #0A2A35;
  --deep:    #00607A;
  --deep-dk: #004A5E;
  --teal:    #48C0CC;
  --leaf:    #5E9426;
  --surface: #FFFFFF;
  --mist:    #EDF5F7;
  --mist-dk: #DCEBEF;
  --muted:   #4A6975;

  --display: "Sora", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --body:    "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1160px;
  --gut: clamp(1.15rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.35rem + 3.3vw, 3.7rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.12rem, 1.03rem + 0.4vw, 1.3rem); font-weight: 600; letter-spacing: -0.012em; }

p { margin: 0 0 1.05em; max-width: 68ch; }

a { color: var(--deep); }
a:hover { color: var(--deep-dk); }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.8rem 1.15rem; z-index: 60;
  text-decoration: none; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

.eyebrow {
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--deep);
  margin: 0 0 0.85rem;
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--leaf); display: inline-block; flex: none;
}

.section-lede { color: var(--muted); max-width: 58ch; }

.fine { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn-sm { min-height: 44px; padding: 0.55rem 1.15rem; font-size: 0.88rem; }

.btn-primary { background: var(--deep); color: #fff; }
.btn-primary:hover { background: var(--deep-dk); color: #fff; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--deep); border-color: var(--mist-dk); }
.btn-ghost:hover { background: var(--mist); color: var(--deep-dk); border-color: var(--deep); }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mist-dk);
}
.head-inner {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  padding-block: 0.7rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--display); font-weight: 600; font-size: 0.98rem; letter-spacing: -0.015em; }
.brand-text span { font-size: 0.78rem; color: var(--muted); }

.nav { display: none; gap: 1.4rem; }
.nav a {
  font-family: var(--display); font-size: 0.9rem; font-weight: 500;
  color: var(--ink); text-decoration: none; padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}
.nav a:hover { color: var(--deep); border-bottom-color: var(--teal); }

.head-cta { display: flex; align-items: center; gap: 0.9rem; }
.phone-link {
  display: none;
  font-family: var(--display); font-weight: 600; font-size: 0.92rem;
  text-decoration: none; color: var(--ink);
  padding-block: 0.65rem;
}
.phone-link:hover { color: var(--deep); }

/* Below the nav breakpoint the CTA wraps onto its own line anyway, so it is made a deliberate
   two-up action bar: booking and the phone, both permanently in reach. The phone being one tap
   away on a mobile is the whole point on this lead. */
@media (max-width: 899px) {
  .head-cta { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .head-cta .btn { width: 100%; }
  .phone-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding-block: 0;
    border: 2px solid var(--mist-dk); border-radius: 999px;
    color: var(--deep); font-size: 0.9rem;
  }
  .phone-link:hover { background: var(--mist); border-color: var(--deep); }
}

@media (min-width: 900px) {
  .nav { display: flex; }
  .phone-link { display: inline-block; }
  .head-inner { padding-block: 0.85rem; gap: 1.8rem; }
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(2.5rem, 1.5rem + 4vw, 5.5rem); }
.hero-grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 3.5rem); align-items: center; }

.hero h1 { margin-bottom: 0.55em; }
.lede { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem); color: var(--muted); max-width: 48ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.7rem 0 2.1rem; }

.hero-facts {
  display: grid; gap: 1.1rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--mist-dk);
}
.hero-facts dt {
  font-family: var(--display); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 0.25rem;
}
.hero-facts dd { margin: 0; font-size: 1.02rem; }
.hero-facts strong { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--deep); }

.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  border-radius: 28px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 62%;
}
.hero-figure figcaption {
  margin-top: 0.85rem;
  font-size: 0.86rem; color: var(--muted); line-height: 1.5;
  padding-left: 1rem;
  border-left: 3px solid var(--teal);
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .hero-figure img { aspect-ratio: 3 / 4; max-height: 560px; }
}

/* ---------- the spine rail (signature) ---------- */

.path {
  background: var(--mist);
  padding-block: clamp(3rem, 2rem + 4.5vw, 5.5rem);
}
.path h2 { margin-bottom: 0.4em; }

.rail {
  list-style: none;
  margin: 2.6rem 0 0;
  padding: 0 0 0 2.9rem;
  position: relative;
  display: grid;
  gap: clamp(2rem, 1.3rem + 2.6vw, 3.2rem);
}
/* The dotted column echoes the vertebrae in the clinic's logo mark. */
.rail::before {
  content: "";
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 3px;
  background-image: linear-gradient(var(--teal) 55%, transparent 0);
  background-size: 3px 13px;
  border-radius: 2px;
}
.rail li { position: relative; }
.rail li::before {
  content: "";
  position: absolute;
  left: -2.9rem; top: 0.34rem;
  width: 19px; height: 19px;
  margin-left: -0.5px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 5px var(--mist);
}
.rail-num {
  display: block;
  font-family: var(--display); font-weight: 700; font-size: 0.76rem;
  letter-spacing: 0.14em; color: var(--deep);
  margin-bottom: 0.3rem;
}
.rail h3 { margin-bottom: 0.35em; }
.rail p { margin: 0; color: var(--muted); max-width: 56ch; }

@media (min-width: 900px) {
  .rail { grid-template-columns: repeat(3, 1fr); gap: 2.6rem; padding: 3.2rem 0 0; }
  .rail::before {
    left: 0; right: 0; top: 9px; bottom: auto; width: auto; height: 3px;
    background-image: linear-gradient(90deg, var(--teal) 55%, transparent 0);
    background-size: 13px 3px;
  }
  .rail li { padding-top: 2.6rem; }
  .rail li::before { left: 0; top: 0; margin-left: 0; }
}

/* ---------- treatments ---------- */

.treatments { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }

.cards {
  display: grid; gap: 1.15rem;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  margin-top: 2.2rem;
}
.card {
  border: 1px solid var(--mist-dk);
  border-radius: 14px;
  padding: 1.5rem 1.4rem 1.25rem;
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.card:hover { border-color: var(--teal); box-shadow: 0 10px 30px -22px rgba(10, 42, 53, 0.55); }
.card h3 { margin-bottom: 0.45em; }
.card p { color: var(--muted); font-size: 0.96rem; }
.card-price {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin: 0; padding-top: 0.6rem;
  border-top: 1px dashed var(--mist-dk);
  font-size: 0.92rem;
}
.card-price + .card-price { margin-top: 0.4rem; }
.card-price strong { font-family: var(--display); font-size: 1.12rem; font-weight: 700; color: var(--ink); }

.also {
  margin-top: 1.9rem;
  padding: 1.05rem 1.25rem;
  background: var(--mist);
  border-left: 4px solid var(--leaf);
  border-radius: 0 10px 10px 0;
  max-width: none;
  font-size: 0.98rem;
}

/* ---------- fees + reviews ---------- */

.fees-reviews { background: var(--mist); padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.fr-grid { display: grid; gap: clamp(2.4rem, 1.5rem + 4vw, 4rem); }

.fees { width: 100%; border-collapse: collapse; margin: 1.6rem 0 1.1rem; }
.fees caption {
  caption-side: bottom; text-align: left;
  font-size: 0.83rem; color: var(--muted); padding-top: 0.85rem;
}
.fees th, .fees td {
  text-align: left; padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--mist-dk);
  vertical-align: baseline;
}
.fees th {
  font-weight: 600; font-size: 0.97rem;
  padding-left: 0;
}
.fees th span { display: block; font-weight: 400; font-size: 0.83rem; color: var(--muted); }
.fees td {
  text-align: right; padding-right: 0;
  font-family: var(--display); font-weight: 700; font-size: 1.14rem;
  white-space: nowrap;
}
.fees tbody tr:first-child th, .fees tbody tr:first-child td { border-top: 2px solid var(--ink); }

.quote {
  margin: 0 0 1.4rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border-radius: 4px 14px 14px 4px;
  border-left: 4px solid var(--teal);
}
.quote blockquote { margin: 0 0 0.7rem; font-size: 0.98rem; line-height: 1.6; }
.quote blockquote::before { content: "\201C"; }
.quote blockquote::after { content: "\201D"; }
.quote figcaption {
  font-family: var(--display); font-weight: 600; font-size: 0.9rem;
}
.quote figcaption span {
  display: block; font-family: var(--body); font-weight: 400;
  font-size: 0.81rem; color: var(--muted);
}

@media (min-width: 920px) {
  .fr-grid { grid-template-columns: 0.92fr 1.08fr; }
}

/* ---------- therapist ---------- */

.therapist { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.th-grid { display: grid; gap: clamp(1.8rem, 1rem + 3.5vw, 3.4rem); align-items: start; }
.th-photo { margin: 0; }
.th-photo img {
  width: 100%; max-width: 430px;
  border-radius: 18px 18px 60px 18px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 22%;
}
.th-role {
  font-family: var(--display); font-weight: 600; color: var(--deep);
  margin-top: -0.5rem; margin-bottom: 1.2rem;
}
.creds { margin: 1.4rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.creds li {
  position: relative; padding-left: 1.6rem;
  font-size: 0.94rem; color: var(--muted);
}
.creds li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--leaf);
}

@media (min-width: 860px) {
  .th-grid { grid-template-columns: 0.8fr 1.2fr; }
}

/* ---------- visit ---------- */

.visit { background: var(--ink); color: #E8F2F5; padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.visit h2, .visit h3 { color: #fff; }
.visit .eyebrow { color: var(--teal); }
.visit a { color: var(--teal); }
.visit a:hover { color: #fff; }
.visit .fine { color: #A9C4CD; }

.visit-grid {
  display: grid; gap: 1.15rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2.2rem;
}
.visit-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.6rem 1.45rem;
}
.visit-card h3 {
  font-size: 0.76rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 1rem;
}
.visit-card address { font-style: normal; line-height: 1.75; margin-bottom: 0.9rem; }
.visit-card .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.28); margin-top: 0.55rem; }
.visit-card .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: var(--teal); }
.visit-card p { color: #D3E4E9; }

.hours { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.hours th, .hours td { padding: 0.34rem 0; text-align: left; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; color: #fff; }
.hours th { color: #A9C4CD; }

.visit-book { background: rgba(72, 192, 204, 0.1); border-color: rgba(72, 192, 204, 0.34); }
.visit-book .btn-primary { background: var(--teal); color: var(--ink); width: 100%; }
.visit-book .btn-primary:hover { background: #6FD3DD; color: var(--ink); }

.contact-list { list-style: none; margin: 1.15rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.contact-list a { font-size: 0.94rem; word-break: break-word; }

/* ---------- footer ---------- */

.site-foot { background: var(--mist); padding-block: 2.6rem 1.6rem; }
.foot-grid {
  display: grid; gap: 1.9rem;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.foot-logo { width: 52px; height: 52px; margin-bottom: 0.7rem; }
.foot-name { font-family: var(--display); font-weight: 600; margin: 0 0 0.25rem; }
.site-foot nav { display: grid; gap: 0.45rem; align-content: start; }
.site-foot nav a { font-size: 0.92rem; text-decoration: none; }
.site-foot nav a:hover { text-decoration: underline; }
.social { display: flex; gap: 1.1rem; }
.foot-legal {
  margin-top: 2rem; padding-top: 1.1rem;
  border-top: 1px solid var(--mist-dk);
}
.foot-legal p { margin: 0; font-size: 0.82rem; color: var(--muted); }

/* ---------- 404 ---------- */

.nf {
  min-height: 74vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 3rem var(--gut);
}
.nf img { width: 82px; height: 82px; margin-bottom: 1.6rem; }
.nf h1 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.7rem); }
.nf p { color: var(--muted); max-width: 42ch; }
.nf .nf-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.4rem; }

/* ---------- motion ---------- */

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