/* Gymmit's site. The app's own look ("Instrument"): aluminium and graphite, paper cards, one signal orange,
   mono labels. Colours mirror apps/mobile/src/theme/tokens.ts; keep them in step. */

:root {
  --bg: #e8e7e3;
  --card: #fbfaf7;
  --raised: #f1f0ec;
  --field: #efeeea;
  --text: #1a1a18;
  --muted: #6a6861;
  --faint: #a3a098;
  --accent: #ff5b1f;
  --on-accent: #1a1a18;
  --accent-text: #c93e0a;
  --focus-edge: rgba(255, 91, 31, 0.7);
  --done: #1a1a18;
  --on-done: #fbfaf7;
  --border: rgba(26, 26, 24, 0.08);
  --rule: rgba(26, 26, 24, 0.14);
  --good: #1e7a47;
  --good-soft: rgba(30, 122, 71, 0.12);
  --warn: #9a5b00;
  --warn-soft: rgba(214, 140, 0, 0.16);
  --bad: #c2362b;
  --bad-soft: rgba(194, 54, 43, 0.11);
  --sticker: #ffd45c;
  --on-sticker: #2e2300;
  --card-shadow: 0 1px 2px rgba(26, 26, 24, 0.05), 0 8px 22px -14px rgba(26, 26, 24, 0.2);
  --phone-shadow: 0 2px 4px rgba(26, 26, 24, 0.06), 0 40px 80px -36px rgba(26, 26, 24, 0.45);
  --bezel: #1a1a18;

  --ui: 'Archivo', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --wide: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --card: #1c1c1a;
    --raised: #252523;
    --field: #282826;
    --text: #eeece6;
    --muted: #9d9a91;
    --faint: #5f5d57;
    --accent: #ff6a2c;
    --on-accent: #111110;
    --accent-text: #ff8350;
    --focus-edge: rgba(255, 106, 44, 0.75);
    --done: #eeece6;
    --on-done: #111110;
    --border: rgba(255, 255, 255, 0.07);
    --rule: rgba(255, 255, 255, 0.14);
    --good: #5ccb8a;
    --good-soft: rgba(92, 203, 138, 0.15);
    --warn: #f0b13e;
    --warn-soft: rgba(240, 177, 62, 0.15);
    --bad: #ff7a6b;
    --bad-soft: rgba(255, 122, 107, 0.15);
    --card-shadow: none;
    --phone-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
    --bezel: #3a3936;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

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

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Mono labels: column heads, captions, meta. */
.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sticker {
  display: inline-block;
  background: var(--sticker);
  color: var(--on-sticker);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ---------- Top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.brand svg {
  width: 36px;
  height: 36px;
  flex: none;
}

.mark-tile {
  fill: var(--card);
}

.mark-empty {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.4;
}

.mark-full {
  fill: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease-out;
}

.btn:active {
  transform: scale(0.97);
}

.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-ink {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--text);
}

.btn-big {
  min-height: 58px;
  padding: 0 30px;
  font-size: 18px;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(20px, 4vw, 48px);
  padding-bottom: clamp(56px, 8vw, 112px);
}

.hero h1 {
  font-weight: 800;
  font-stretch: 114%;
  font-size: clamp(40px, 7.7vw, 102px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hero h1 em {
  display: block;
  font-style: normal;
  color: var(--accent-text);
}

.hero-sub {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  gap: 20px clamp(24px, 5vw, 72px);
  align-items: end;
  margin-top: clamp(20px, 2.6vw, 36px);
}

.lede {
  max-width: 34em;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.45;
  color: var(--muted);
}

.lede strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.hero-note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- The stage: one real screen, and the coach's other answers cut from the same screen ---------- */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  margin-top: clamp(32px, 4.5vw, 64px);
  align-items: start;
}

.stage-phone {
  width: auto;
  /* Stays in view while the answers beside it scroll past. */
  position: sticky;
  top: 24px;
}

.answers {
  display: grid;
  gap: 18px;
  max-width: 560px;
}

.answer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.answer-list li {
  display: grid;
  gap: 10px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.answer-list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.said {
  font-size: 17px;
  color: var(--muted);
}

.said b {
  font-weight: 800;
  font-stretch: 108%;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* The banner as the app draws it, on the card it floats over there. */
.answer-list picture {
  display: block;
  padding: 10px;
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--card-shadow);
}

.answer-list img {
  display: block;
  width: 100%;
  height: auto;
}

.because {
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
}

.because b {
  color: var(--text);
}

.quiet {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Sections ---------- */

.band {
  padding: clamp(56px, 9vw, 128px) 0;
  border-top: 1px solid var(--rule);
}

.band-head {
  display: grid;
  gap: 16px;
  max-width: 46rem;
  margin-bottom: clamp(32px, 5vw, 64px);
}

.band h2 {
  font-weight: 800;
  font-stretch: 108%;
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.band-head p:not(.mono) {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--muted);
  max-width: 38em;
}

/* Screenshots: a strip of phones that scrolls sideways */

.strip {
  display: flex;
  gap: clamp(16px, 2.4vw, 32px);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 8px max(var(--gutter), calc((100vw - var(--wide)) / 2 + var(--gutter))) 28px;
  scrollbar-width: none;
}

.strip::-webkit-scrollbar {
  display: none;
}

.phone {
  flex: none;
  width: clamp(230px, 24vw, 300px);
  margin: 0;
  scroll-snap-align: center;
}

.phone-frame {
  border-radius: 13% / 6%;
  padding: 7px;
  background: var(--bezel);
  box-shadow: var(--phone-shadow);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 11.5% / 5.3%;
}

.phone figcaption {
  margin-top: 16px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--muted);
}

.phone:nth-child(even) {
  margin-top: clamp(20px, 3.5vw, 48px);
}

/* The Lock Screen card, in three states */

.live {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  align-items: start;
}

.live figure {
  margin: 0;
}

.live img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(26, 26, 24, 0.16));
}

.live figcaption {
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--muted);
}

/* Widgets */

.widgets {
  margin-top: clamp(56px, 8vw, 112px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.widgets .band-head {
  margin-bottom: 0;
}

.widgets h3 {
  font-weight: 800;
  font-stretch: 108%;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.widget-wall {
  display: grid;
  grid-template-columns: 364fr 170fr;
  grid-template-areas:
    'large small'
    'large .'
    'medium medium';
  gap: 14px;
  padding: clamp(16px, 2.6vw, 30px);
  border-radius: 32px;
  background: linear-gradient(160deg, var(--raised), var(--field));
  box-shadow: inset 0 0 0 1px var(--border);
  max-width: 560px;
  justify-self: end;
}

.widget-wall img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(26, 26, 24, 0.14));
}

.widget-wall picture:nth-child(1) {
  grid-area: large;
}

.widget-wall picture:nth-child(2) {
  grid-area: medium;
  width: calc(364 / 548 * 100%);
}

.widget-wall picture:nth-child(3) {
  grid-area: small;
}

/* Rows of phones: side by side when there's room, a sideways strip when there isn't */

.shots {
  display: grid;
  gap: clamp(20px, 3.4vw, 48px);
  justify-content: center;
}

.shots-3 {
  grid-template-columns: repeat(3, minmax(0, 300px));
}

.shots .phone,
.after .phone,
.import .phone {
  width: auto;
}

.shots .phone:nth-child(even) {
  margin-top: clamp(20px, 3.5vw, 48px);
}

.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(40px, 6vw, 80px);
}

.point h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.point p {
  margin-top: 6px;
  color: var(--muted);
  max-width: 32em;
}

.point .small {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.45;
}

/* Side by side */

.cmp {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15.5px;
  line-height: 1.35;
}

.cmp thead th {
  padding: 0 16px 14px;
  text-align: left;
  font-weight: 800;
  font-stretch: 108%;
  font-size: clamp(18px, 1.9vw, 24px);
  letter-spacing: -0.02em;
  color: var(--muted);
}

.cmp thead th:nth-child(2) {
  color: var(--text);
}

.cmp tbody th[scope='row'] {
  width: 31%;
  padding: 15px 16px 15px 0;
  text-align: left;
  vertical-align: top;
  font-weight: 600;
  border-top: 1px solid var(--rule);
}

.cmp td {
  width: 23%;
  padding: 15px 16px;
  vertical-align: top;
  color: var(--muted);
  border-top: 1px solid var(--rule);
}

/* Gymmit's column reads as one card running down the table. */
.cmp td:nth-child(2),
.cmp thead th:nth-child(2) {
  background: var(--card);
  color: var(--text);
}

.cmp thead th:nth-child(2) {
  padding-top: 18px;
  border-radius: 22px 22px 0 0;
}

.cmp tbody tr:last-child td:nth-child(2) {
  border-radius: 0 0 22px 22px;
  padding-bottom: 20px;
}

.cmp .cmp-group th {
  padding: 34px 0 10px;
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  /* The card behind Gymmit's column runs through the group rows too. */
  background: linear-gradient(to right, transparent 31%, var(--card) 31%, var(--card) 54%, transparent 54%);
}

.cmp tbody tr:first-child.cmp-group th {
  padding-top: 14px;
}

.cmp td span {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 9px;
  align-items: baseline;
}

/* A solid dot for yes, a ring for no, a half for partly, a dash for "not on their pages". No green or red: this
   isn't a scorecard. */
.cmp i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateY(0.5px);
}

.m-yes {
  background: currentColor;
}

.m-no {
  box-shadow: inset 0 0 0 1.5px currentColor;
  opacity: 0.6;
}

.m-part {
  background: linear-gradient(to right, currentColor 50%, transparent 50%);
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.cmp i.m-na {
  height: 1.5px;
  border-radius: 0;
  background: currentColor;
  opacity: 0.6;
  transform: translateY(-4px);
}

.cmp-note {
  margin-top: 24px;
  max-width: 62em;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.cmp-note a {
  color: var(--text);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Import */

.import {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
}

.import .band-head {
  margin-bottom: 0;
}

/* Sections arrive like new cards in the app: a short fade and rise, once (site.js adds the classes). */

.arrive {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.arrive.in {
  opacity: 1;
  transform: none;
}

/* Spec sheet */

.spec {
  width: 100%;
  border-collapse: collapse;
}

.spec th,
.spec td {
  text-align: left;
  vertical-align: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
}

.spec tr:last-child th,
.spec tr:last-child td {
  border-bottom: 1px solid var(--rule);
}

.spec th {
  width: 12em;
  padding-right: 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec td {
  font-size: clamp(18px, 1.9vw, 24px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.spec td small {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.spec .num {
  font-stretch: 112%;
  font-weight: 800;
}

/* After the workout */

.after {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px) minmax(0, 300px);
  gap: clamp(20px, 3.4vw, 48px);
  align-items: start;
}

.after-text {
  display: grid;
  gap: 32px;
  align-content: start;
}

/* A cut from further down a screen: no phone around it, since it isn't a whole one. */
.sheet {
  margin-top: clamp(20px, 3.5vw, 48px);
}

.sheet-frame {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--phone-shadow), 0 0 0 1px var(--border);
}

.sheet-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* Closing */

.close {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 24px;
}

.close h2 {
  max-width: 14em;
}

.close p {
  color: var(--muted);
  max-width: 34em;
}

footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0 44px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 14px;
  color: var(--muted);
}

.foot nav {
  display: flex;
  gap: 20px;
}

/* ---------- Privacy page ---------- */

.doc {
  max-width: 44rem;
  padding-top: clamp(24px, 5vw, 56px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.doc h1 {
  font-weight: 800;
  font-stretch: 108%;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.doc .mono {
  margin-top: 14px;
}

.doc h2 {
  margin-top: 40px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.doc p {
  margin-top: 10px;
  color: var(--muted);
}

.doc p.first {
  margin-top: 24px;
  font-size: 19px;
  color: var(--text);
}

.doc a {
  color: var(--accent-text);
  font-weight: 600;
}

/* ---------- Small screens ---------- */

@media (max-width: 1000px) {
  .after {
    grid-template-columns: repeat(2, minmax(0, 300px));
    justify-content: center;
  }

  .after-text {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .widgets {
    grid-template-columns: minmax(0, 1fr);
  }

  .widget-wall {
    justify-self: start;
  }

  .live {
    grid-template-columns: minmax(0, 373px);
    gap: 28px;
  }

  .hero-sub,
  .points {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .stage-phone {
    position: static;
    width: min(340px, 82vw);
  }

  .answers {
    width: 100%;
    justify-self: stretch;
    max-width: none;
  }

  .import {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .import .phone {
    width: min(320px, 82vw);
    justify-self: center;
  }

  .spec th {
    width: 8.5em;
  }
}

/* Three phones don't fit: they become a strip that scrolls sideways, edge to edge. */
@media (max-width: 760px) {
  .shots-3 {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    margin: 0 calc(-1 * var(--gutter));
    padding: 8px var(--gutter) 28px;
    scrollbar-width: none;
  }

  .shots-3::-webkit-scrollbar {
    display: none;
  }

  .shots-3 .phone {
    flex: none;
    width: min(270px, 70vw);
    scroll-snap-align: center;
  }

  .points {
    margin-top: 16px;
  }

  .after-text {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The table turns into one block per row: the question, then each app's answer on its own line. */
  .cmp thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .cmp,
  .cmp tbody,
  .cmp tr,
  .cmp th,
  .cmp td {
    display: block;
    width: auto;
  }

  .cmp tbody th[scope='row'] {
    width: auto;
    padding: 16px 0 8px;
  }

  .cmp td,
  .cmp td:nth-child(2) {
    display: grid;
    grid-template-columns: 5.2em minmax(0, 1fr);
    gap: 10px;
    width: auto;
    padding: 5px 0;
    border: 0;
    background: none;
    border-radius: 0;
  }

  .cmp tbody tr:last-child td:nth-child(2) {
    padding-bottom: 5px;
  }

  .cmp td::before {
    content: attr(data-app);
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 2px;
  }

  .cmp td:last-child {
    padding-bottom: 16px;
  }

  .cmp .cmp-group th {
    padding: 28px 0 8px;
    background: none;
    border-bottom: 1px solid var(--rule);
  }
}

@media (max-width: 520px) {
  .after {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .after .phone {
    width: min(300px, 82vw);
  }

  .sheet {
    margin-top: 0;
  }

  .top .btn {
    min-height: 42px;
    padding: 0 16px;
    font-size: 15px;
  }

  .spec th,
  .spec td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }

  .spec tr {
    display: block;
    padding: 14px 0;
    border-top: 1px solid var(--rule);
  }

  .spec td {
    margin-top: 4px;
  }

  .spec tr:last-child {
    border-bottom: 1px solid var(--rule);
  }

  .spec tr:last-child th,
  .spec tr:last-child td {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
