/* MUSQ exercise guide. Dark like the app: silver for anything you can press,
   orange only for worked muscles, yellow only for mistakes. */
:root {
  --bg: #08090a;
  --bg-2: #0c0e10;
  --surface: #121417;
  --surface-2: #181b1f;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f5f6f7;
  --text-2: #c9cdd2;
  --muted: #8e949c;
  --act: #ff5622;
  --act-2: #ff8c3c;
  --act-text: #ff7a45;
  --fault: #ffc61a;
  --good: #45c46b;
  --silver: linear-gradient(180deg, #ffffff 0%, #d9dde3 45%, #9ea4ac 100%);
  --studio: radial-gradient(120% 95% at 50% 32%, #a3a8b0 0%, #757a82 42%, #3f4349 82%, #2c2f33 100%);
  --radius: 22px;
  --wrap: 1160px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
h1, h2, h3 { line-height: 1.12; letter-spacing: -.022em; margin: 0; font-weight: 700; }
h1 { font-size: clamp(34px, 5.6vw, 58px); }
h2 { font-size: clamp(24px, 3.2vw, 34px); }
h3 { font-size: 18px; letter-spacing: -.01em; }
p { margin: 0; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); line-height: 1.6; }
.eyebrow {
  font: 600 11.5px/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot { color: var(--act); }

/* ---------- wordmark (the 3D models' own MUSQ) ---------- */
.wordmark {
  display: inline-block;
  width: 76px;
  aspect-ratio: 241.5 / 61.8;
  background: var(--silver);
  -webkit-mask: url(/musq/exercises/assets/musq-wordmark.svg) center / contain no-repeat;
  mask: url(/musq/exercises/assets/musq-wordmark.svg) center / contain no-repeat;
}

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 9, 10, .72);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14.5px; }
.site-nav a { color: var(--text-2); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.site-nav a.btn, .site-nav a.btn:hover { color: #0b0c0e; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 0;
  background: var(--text); color: #0b0c0e;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #fff; transform: translateY(-1px); }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .06); }
@media (max-width: 640px) { .site-nav a.hide-sm { display: none; } .site-nav { gap: 14px; } }
@media (max-width: 380px) { .brand .wordmark { display: none; } }

/* ---------- breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); padding: 22px 0 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span[aria-hidden] { opacity: .5; }

/* ---------- 3D viewer ---------- */
.viewer {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: var(--studio);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.viewer model-viewer {
  width: 100%; height: 100%;
  background: transparent;
  --poster-color: transparent;
  --progress-bar-color: transparent;
}
.viewer .chip, .viewer .ctl {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px;
  border-radius: 999px; border: 0;
  background: rgba(12, 13, 15, .62);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #fff; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
}
.viewer .chip { top: 14px; left: 14px; pointer-events: none; }
.viewer .mark { position: absolute; top: 16px; right: 16px; z-index: 2; width: 64px; opacity: .78; pointer-events: none; }
.viewer .ctls { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2; display: flex; gap: 8px; align-items: center; }
.viewer .ctl { position: static; cursor: pointer; }
.viewer .ctl:hover { background: rgba(12, 13, 15, .8); }
.viewer .ctl[aria-pressed="true"] { background: #fff; color: #0b0c0e; }
.viewer .ctl svg { width: 14px; height: 14px; }
.viewer .legend { margin-left: auto; pointer-events: none; }
.viewer .legend::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--act); box-shadow: 0 0 10px var(--act); }
.viewer .loading {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
  background-size: 40% 100%; background-repeat: no-repeat;
  animation: load 1.1s linear infinite;
}
.viewer.ready .loading { display: none; }
@keyframes load { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.viewer-note { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- exercise page ---------- */
.ex-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: 40px; }
@media (min-width: 960px) {
  .ex-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .ex-stage { position: sticky; top: 86px; }
}
.ex-head { display: grid; gap: 14px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 26px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.facts div { background: var(--bg-2); padding: 14px 16px; }
.facts dt { font: 600 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; font-weight: 600; font-size: 15px; }
.facts .wide { grid-column: 1 / -1; }
.section { margin-top: 52px; }
.section > h2 { margin-bottom: 18px; }
.section > .sub { color: var(--muted); margin: -8px 0 18px; font-size: 15px; }

.muscles { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.muscles li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.muscles .name { font-weight: 600; }
.muscles .rank { font: 600 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--act-text); }
.muscles .rank.secondary { color: var(--muted); }
.muscles .bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.muscles .bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--act), var(--act-2)); }
.muscles .secondary + .bar i, .muscles li.secondary .bar i { background: linear-gradient(90deg, rgba(255, 140, 60, .55), rgba(255, 140, 60, .35)); }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--text-2); }
.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 13px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--text); color: #0b0c0e; font: 700 14px/1 var(--sans);
}

.cues { display: grid; gap: 16px; }
.cue { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.cue h3 { margin-bottom: 6px; }
.cue > p { color: var(--text-2); }
.cue .rows { display: grid; gap: 10px; margin-top: 14px; }
.cue .row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); font-size: 15px; color: var(--text-2); }
.cue .row b { display: block; font: 600 10.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; color: var(--muted); }
.cue .row svg { width: 20px; height: 20px; margin-top: 2px; }
.cue .bad { background: rgba(255, 198, 26, .07); box-shadow: inset 3px 0 0 var(--fault); }
.cue .bad b, .cue .bad svg { color: var(--fault); }
.cue .good { background: rgba(69, 196, 107, .07); box-shadow: inset 3px 0 0 var(--good); }
.cue .good b, .cue .good svg { color: var(--good); }
.cue .why svg { color: var(--muted); }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 26px/1 var(--sans); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--text-2); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card { display: grid; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.card .pic { aspect-ratio: 1 / 1; background: var(--studio); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .meta { padding: 14px 16px 16px; display: grid; gap: 4px; }
.card .meta strong { font-size: 16px; letter-spacing: -.01em; }
.card .meta span { font-size: 13px; color: var(--muted); }
@media (max-width: 520px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .card .meta { padding: 12px; } .card .meta strong { font-size: 15px; } }

/* ---------- waitlist ---------- */
.waitlist {
  position: relative; overflow: hidden;
  display: grid; gap: 22px;
  margin-top: 56px; padding: clamp(24px, 4vw, 44px);
  border-radius: 28px;
  background: radial-gradient(90% 120% at 100% 0%, rgba(255, 86, 34, .16), transparent 55%), linear-gradient(180deg, #16191d, #0e1013);
  border: 1px solid var(--line-2);
}
.waitlist h2 { max-width: 18ch; }
.waitlist p.lead { max-width: 52ch; }
@media (min-width: 960px) { .waitlist.wide { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; } }
.wl-form { display: grid; gap: 12px; }
.wl-field { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line-2); }
.wl-field input {
  flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text); font: 16px var(--sans);
}
.wl-field input::placeholder { color: #7c828a; }
.wl-field input:focus { outline: none; }
.wl-field:focus-within { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.wl-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 420px) { .wl-field { flex-direction: column; border-radius: 22px; } .wl-field .btn { width: 100%; } }
.wl-count { font-size: 14.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; min-height: 22px; }
.wl-count strong { color: var(--text); font-variant-numeric: tabular-nums; }
.wl-count::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.wl-count a { color: var(--muted); font-size: 13px; }
.wl-msg { font-size: 14.5px; min-height: 0; }
.wl-msg.ok { color: var(--good); }
.wl-msg.err { color: var(--fault); }
.wl-fine { font-size: 12.5px; color: var(--muted); }
.wl-done .wl-field { display: none; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.feature { padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--muted); font-size: 14.5px; }
.feature .big { font: 700 32px/1 var(--sans); letter-spacing: -.03em; }

/* ---------- app demos: screen recordings in a phone ---------- */
.demos { margin-top: 72px; }
.demos-head { max-width: 640px; margin: 0 auto 34px; text-align: center; }
.demo-grid { display: grid; gap: 48px; }
@media (min-width: 760px) { .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; } }
.demo { margin: 0; display: grid; gap: 20px; justify-items: center; }
.demo figcaption { max-width: 340px; text-align: center; color: var(--text-2); font-size: 15px; }
.demo figcaption b { display: block; color: var(--text); font-size: 18px; letter-spacing: -.01em; margin-bottom: 6px; }
.phone {
  width: min(320px, 78vw); margin: 0 auto; padding: 10px;
  border-radius: 48px; background: linear-gradient(160deg, #3a3e44, #15171a 60%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.phone video { width: 100%; aspect-ratio: 720 / 1566; border-radius: 39px; background: #101113; object-fit: cover; }

/* ---------- hub ---------- */
.hero { display: grid; gap: 32px; padding: 34px 0 10px; }
@media (min-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 56px; } }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); letter-spacing: -.035em; }
.hero h1 em { font-style: normal; background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 18px 0 26px; max-width: 46ch; }
.stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; }
.stats div { display: grid; gap: 2px; }
.stats strong { font-size: 26px; letter-spacing: -.02em; }
.stats span { font-size: 12.5px; color: var(--muted); }
.group-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.group-head span { color: var(--muted); font-size: 14px; }

.stats a { display: grid; gap: 2px; color: inherit; }
.stats a span { color: var(--muted); font-size: 12.5px; }

/* ---------- library: every exercise in the app ---------- */
.lib-tools {
  position: sticky; top: 62px; z-index: 10;
  margin: 26px -20px 0; padding: 14px 20px 10px;
  background: rgba(8, 9, 10, .88);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.lib-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 999px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line-2); }
.lib-search:focus-within { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.lib-search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.lib-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font: 16px var(--sans); }
.lib-search input:focus { outline: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrapchips { flex-wrap: wrap; overflow: visible; }
.chips button, .chips a {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 0;
  background: rgba(255, 255, 255, .06); color: var(--text-2);
  font: 600 13.5px/34px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.chips button:hover, .chips a:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.chips button[aria-pressed="true"] { background: var(--text); color: #0b0c0e; }
.chips a span { color: var(--muted); font-weight: 500; margin-left: 3px; }
.chips.jump { margin-top: 22px; }
.chips.jump a { height: 30px; line-height: 30px; font-size: 12.5px; padding: 0 12px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.lib-tools { margin-top: 8px; }
.lib-group { margin-top: 42px; scroll-margin-top: 190px; }
.lib-group .group-head b { color: var(--text); font-weight: 600; }
.lib-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; }
.lib-row a, .lib-row button {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
  padding: 11px 12px 11px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.lib-row a:hover, .lib-row button:hover { border-color: var(--line-2); background: var(--surface-2); }
.lib-row .nm { grid-column: 1; font-weight: 600; font-size: 15px; line-height: 1.3; }
.lib-row .mt { grid-column: 1; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.lib-row .tag {
  grid-column: 2; grid-row: 1 / span 2;
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px;
  font: 600 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 255, 255, .05);
}
.lib-row .tag svg { width: 11px; height: 11px; }
.lib-row .tag.guide { color: #0b0c0e; background: var(--text); }
.lib-row.guide a { border-color: rgba(255, 255, 255, .24); }
.lib-empty { padding: 48px 0 8px; color: var(--muted); text-align: center; }
.lib-more { margin-top: 18px; font-size: 14.5px; }
.lib-more a { color: var(--text-2); }

/* ---------- "in the app" sheet ---------- */
.sheet {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto;
  padding: 30px 28px 26px; border: 1px solid var(--line-2); border-radius: 26px;
  background: radial-gradient(90% 120% at 100% 0%, rgba(255, 86, 34, .16), transparent 55%), linear-gradient(180deg, #16191d, #0e1013);
  color: var(--text); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9);
}
.sheet::backdrop { background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet h2 { margin: 10px 40px 10px 0; font-size: 26px; }
.sheet .lead { font-size: 16px; margin-bottom: 18px; }
.sheet form[method="dialog"] { position: absolute; top: 14px; right: 14px; }
.sheet-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: var(--text); font: 22px/1 var(--sans); cursor: pointer; }
.sheet-close:hover { background: rgba(255, 255, 255, .14); }

/* ---------- footer ---------- */
.site-foot { margin-top: 80px; border-top: 1px solid var(--line); padding: 30px 0 46px; color: var(--muted); font-size: 13.5px; }
.site-foot .wrap { display: grid; gap: 14px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-foot a { color: var(--text-2); text-decoration: none; }
.site-foot a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
