/* Muscle Manipulation Therapy — musclemanipulation.com
   Single stylesheet. No frameworks, no external font requests. */

:root {
  --ink:        #1B2A2F;   /* anatomy-plate ink */
  --ink-soft:   #46585E;
  --paper:      #F6F7F5;   /* cool clinical white */
  --paper-warm: #EDEFEA;
  --madder:     #8C2F2A;   /* muscle red, deep and desaturated */
  --madder-dk:  #6E241F;
  --sage:       #6E8570;
  --rule:       #D5D9D2;
  --white:      #FFFFFF;

  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;
  --gutter: 1.5rem;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.05rem); margin-top: 2.4rem; }
h3 { font-size: 1.2rem; margin-top: 1.9rem; letter-spacing: 0; }
h4 { font-size: 1.02rem; margin-top: 1.5rem; font-family: var(--sans); font-weight: 700; }

p, ul, ol, dl { max-width: var(--measure); }
p { margin: 0 0 1.1rem; }
ul, ol { margin: 0 0 1.2rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }

a { color: var(--madder); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--madder-dk); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 2px;
}

strong { font-weight: 650; }
em { font-style: italic; }

.lead {
  font-size: clamp(1.1rem, 2.1vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main { display: block; }

.section { padding: 3.2rem 0; }
.section--tint { background: var(--paper-warm); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink h2 { color: var(--white); }
.section--ink a { color: #E7B7A4; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--white);
  padding: .7rem 1rem; z-index: 100;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- Header / nav ---------- */

.site-head {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
}
.site-head__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .8rem 0;
}
.brand { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
.brand__text { display: flex; flex-direction: column; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.95rem;   /* fixed, so it is identical on every page */
  font-weight: 600; line-height: 1.08; letter-spacing: -0.015em;
}
.brand__sub { font-size: .82rem; color: var(--ink-soft); margin-top: .12rem; }
@media (max-width: 560px) {
  .brand__name { font-size: 1.5rem; }
  .brand__sub { display: none; }
}
@media (max-width: 460px) { .brand__sub { display: none; } }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--white); border: 1px solid var(--rule); border-radius: 3px;
  padding: .55rem .8rem; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
}
.nav-toggle__bars { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav ul { list-style: none; margin: 0; padding: 0; max-width: none; }
.nav a {
  display: block; text-decoration: none; color: var(--ink);
  font-size: .95rem; padding: .55rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--madder); }
.nav a[aria-current="page"] { color: var(--madder); border-bottom-color: var(--madder); }

/* mobile nav */
@media (max-width: 899px) {
  .nav { display: none; padding-bottom: .8rem; border-top: 1px solid var(--rule); }
  .nav.is-open { display: block; }
  .nav li { margin: 0; border-bottom: 1px solid var(--rule); }
  .nav a { padding: .8rem 0; border-bottom: none; }
  .nav a[aria-current="page"] { border-bottom: none; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav { display: block !important; }
  .nav ul { display: flex; flex-wrap: wrap; gap: 1.15rem; align-items: center; }
  .nav li { margin: 0; }
}

/* ---------- Hero (signature element) ---------- */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
/* muscle-fibre texture: fine angled lines, used once, only here */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    102deg,
    rgba(255,255,255,.055) 0px,
    rgba(255,255,255,.055) 1px,
    transparent 1px,
    transparent 7px
  );
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; padding: 4rem 0 3.4rem; }
.hero h1 { color: var(--white); max-width: 17ch; }
.hero p { color: #C9D2D0; max-width: 52ch; font-size: 1.12rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--madder); color: var(--white);
  padding: .8rem 1.35rem; border: 1px solid var(--madder); border-radius: 3px;
  font: inherit; font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--madder-dk); border-color: var(--madder-dk); color: var(--white); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: var(--white); color: var(--white); }
.btn--wide { width: 100%; max-width: 22rem; }

/* ---------- Cards / grids ---------- */

.grid { display: grid; gap: 1.6rem; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--madder);
  padding: 1.5rem 1.4rem 1.4rem;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card p, .card ul { max-width: none; }

/* condition columns */
.cols { columns: 2; column-gap: 2.2rem; max-width: none; padding-left: 1.1rem; }
@media (min-width: 780px) { .cols { columns: 3; } }
.cols li { break-inside: avoid; }

/* callout — scope / safety */
.note {
  border-left: 4px solid var(--sage);
  background: var(--white);
  padding: 1.1rem 1.3rem;
  margin: 1.8rem 0;
  max-width: var(--measure);
}
.note h3 { margin-top: 0; font-size: 1.05rem; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */

details.qa {
  border-bottom: 1px solid var(--rule);
  max-width: var(--measure);
  padding: .3rem 0;
}
details.qa summary {
  cursor: pointer;
  display: block;          /* removes the default marker in Firefox */
  list-style: none;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  padding: .95rem 2rem .95rem 0; position: relative;
}
details.qa summary::marker { content: ""; }
details.qa summary::-moz-list-bullet { list-style-type: none; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after {
  content: "+"; position: absolute; right: .2rem; top: .8rem;
  font-family: var(--sans); font-size: 1.4rem; color: var(--madder); line-height: 1;
}
details.qa[open] summary::after { content: "\2212"; }
details.qa > *:not(summary) { margin-left: 0; }
details.qa p:last-child { margin-bottom: 1.1rem; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 2.4rem; }
@media (min-width: 820px) { .contact-grid { grid-template-columns: 1fr 1.15fr; } }

.detail-list { list-style: none; padding: 0; }
.detail-list li { margin-bottom: 1.1rem; }
.detail-list .label { display: block; font-size: .8rem; color: var(--ink-soft); letter-spacing: .03em; }
.detail-list .value { font-family: var(--serif); font-size: 1.2rem; }

form label { display: block; font-size: .92rem; font-weight: 600; margin-bottom: .3rem; }
form input, form textarea {
  width: 100%; font: inherit;
  padding: .7rem .8rem;
  border: 1px solid #B9C0B8; border-radius: 3px;
  background: var(--white); color: var(--ink);
  margin-bottom: 1.1rem;
}
form textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */

.site-foot {
  background: var(--ink); color: #B9C4C2;
  padding: 2.6rem 0 2rem; margin-top: 3rem;
  font-size: .93rem;
}
.site-foot a { color: #E7B7A4; }
.site-foot h2 { font-size: 1rem; font-family: var(--sans); color: var(--white); margin: 0 0 .7rem; }
.foot-grid { display: grid; gap: 1.8rem; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.foot-grid ul { list-style: none; padding: 0; margin: 0; max-width: none; }
.foot-grid li { margin-bottom: .45rem; }
.foot-grid p { max-width: 36ch; }
.colophon {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 2rem; padding-top: 1.2rem;
  font-size: .85rem; color: #90A09E;
}
.colophon p { max-width: none; margin: 0 0 .4rem; }

/* ---------- Figures ---------- */

figure.shot { margin: 2.4rem 0; max-width: none; }
figure.shot img {
  display: block; width: 100%; height: auto;
  max-height: 460px;          /* keeps a tall diagram from dominating the page */
  object-fit: contain;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
}
figure.shot figcaption {
  font-size: .875rem; line-height: 1.5; color: var(--ink-soft);
  margin-top: .75rem; padding-left: .8rem;
  border-left: 2px solid var(--sage);
  max-width: 62ch;
}
figure.shot--wide img { aspect-ratio: 21 / 9; object-fit: cover; }
figure.shot--band { margin: 0; }
figure.shot--band img { aspect-ratio: 3 / 1; object-fit: cover; border-left: 0; border-right: 0; }

.media { display: grid; gap: 1.8rem; align-items: start; }
@media (min-width: 780px) { .media { grid-template-columns: 1fr 1fr; } }
.media figure.shot { margin: 0; }
.media img { aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Utilities ---------- */

.stack > * + * { margin-top: 1rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4rem 0; max-width: var(--measure); }


/* ---------- At-a-glance band ---------- */

.glance {
  background: var(--white);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.glance__grid { display: grid; gap: 1.6rem; padding: 2rem 0; }
@media (min-width: 700px) { .glance__grid { grid-template-columns: repeat(4, 1fr); } }
.glance__item { border-left: 2px solid var(--sage); padding-left: .9rem; }
.glance__k {
  display: block; font-family: var(--serif);
  font-size: 1.18rem; font-weight: 600; line-height: 1.2; color: var(--ink);
}
.glance__v { display: block; font-size: .88rem; color: var(--ink-soft); margin-top: .2rem; }

/* ---------- Prose polish ---------- */

.section > .wrap > h2:first-child { margin-top: 0; }
.cols li { padding-right: .6rem; }
main p a { text-decoration-thickness: 1px; }
.note { border-radius: 2px; }
.btn { letter-spacing: .01em; }
figure.shot + h2, figure.shot + h3 { margin-top: 2.4rem; }


/* ---------- Products and cart ---------- */

.product { display: grid; gap: 1.6rem; align-items: start; margin-bottom: 3rem; }
@media (min-width: 760px) { .product { grid-template-columns: 300px 1fr; } }
.product__img { border: 1px solid var(--rule); background: var(--paper); }
.product__img img { display: block; width: 100%; height: auto; }
.product h3 { margin-top: 0; font-size: 1.35rem; }
.product__price { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); margin: .4rem 0 1rem; }
.product__price .unit { font-family: var(--sans); font-size: .85rem; color: var(--ink-soft); }
.product ul { margin-bottom: 1rem; }

.warn {
  border-left: 4px solid var(--madder);
  background: #FBF4F3;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  max-width: var(--measure);
}
.warn h4 { margin-top: 0; color: var(--madder-dk); }
.warn ul, .warn p { margin-bottom: 0; font-size: .95rem; }

.cart-open-btn {
  position: relative; background: var(--white); border: 1px solid var(--rule);
  border-radius: 3px; padding: .5rem .8rem; font: inherit; font-size: .9rem;
  color: var(--ink); cursor: pointer;
}
.cart-count {
  display: inline-block; min-width: 1.35em; margin-left: .35rem; padding: 0 .35em;
  background: var(--madder); color: var(--white);
  border-radius: 1em; font-size: .78rem; font-weight: 700; text-align: center;
}

.cart-backdrop {
  position: fixed; inset: 0; background: rgba(27,42,47,.5); z-index: 90;
}
.cart-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
  background: var(--white); border-left: 1px solid var(--rule);
  padding: 1.4rem; overflow-y: auto; z-index: 91;
  display: flex; flex-direction: column;
}
.cart-panel h2 { margin-top: 0; }
.cart-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: 0; font: inherit; font-size: 1.5rem;
  line-height: 1; color: var(--ink-soft); cursor: pointer;
}
.cart-list { list-style: none; padding: 0; max-width: none; }
.cart-line {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: .5rem 1rem; align-items: center;
  padding: .8rem 0; border-bottom: 1px solid var(--rule);
}
.cart-line__name { font-weight: 600; }
.cart-line__qty { display: inline-flex; align-items: center; gap: .5rem; }
.qty {
  width: 1.9rem; height: 1.9rem; border: 1px solid var(--rule);
  background: var(--paper); border-radius: 3px; font: inherit; cursor: pointer;
}
.cart-remove {
  grid-column: 1 / -1; justify-self: start;
  background: none; border: 0; padding: 0;
  font: inherit; font-size: .82rem; color: var(--ink-soft);
  text-decoration: underline; cursor: pointer;
}
.cart-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 1.2rem 0 .4rem; font-family: var(--serif); font-size: 1.25rem;
}
#cart-checkout:disabled { opacity: .45; cursor: not-allowed; }
.cart-note { font-size: .82rem; color: var(--ink-soft); margin-top: .8rem; }
body.cart-open { overflow: hidden; }
