/* Routine — gymloggerapp.com
   One stylesheet, no build.

   The palette is the app icon's, so the site and the thing it's selling agree:
   the two grounds the icon ships on — #F4F1EB light, #0E0D0C dark — and the
   blue ramp the mark is drawn in. The green this replaced belonged to an
   earlier identity and appeared nowhere in the product. */

:root {
  --page: #f4f1eb;          /* the light icon's ground */
  --surface: #ffffff;
  --ink: #141414;
  --subtle: #6b6b6b;
  --hairline: rgba(20, 20, 20, 0.12);
  /* The saturated end of the mark's ramp. Used for rules and accents, never
     for small text on the page: at 3.2:1 against white it clears large-text
     contrast and nothing narrower. */
  --accent: #0a84ff;
  /* The pale end, which is a *fill* and carries ink rather than white. */
  --accent-soft: #a9d9ff;
  /* The mark's own gradient, top to bottom, used once — see .feature. */
  --ramp: linear-gradient(180deg, #0a84ff 0%, #6fbbff 62%, #a9d9ff 100%);
  --radius: 14px;
  --gutter: 20px;
  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e0d0c;        /* the dark icon's ground */
    --surface: #1a1918;
    --ink: #f4f1eb;
    --subtle: #9a9795;
    --hairline: rgba(244, 241, 235, 0.14);
    /* A step along the ramp rather than the same blue: #0a84ff on near-black
       is 3.4:1, which is thin for a hairline you're meant to notice. */
    --accent: #6fbbff;
    --accent-soft: #123a5e;
    --ramp: linear-gradient(180deg, #6fbbff 0%, #4a9ae0 62%, #2c6ea8 100%);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

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

.brand img { width: 32px; height: 32px; border-radius: 8px; }

.site-nav a {
  text-decoration: none;
  color: var(--subtle);
  margin-left: 18px;
  font-size: 15px;
}

.site-nav a:hover { color: var(--ink); }

/* Hero */

.hero {
  padding: 56px 0 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  /* Sized down from 58 at the top end: the headline is now nine words rather
     than six, and at the old size it ran to four lines on a laptop and pushed
     the buttons below the fold. */
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.hero p.lede {
  font-size: 20px;
  color: var(--subtle);
  max-width: 38ch;
  margin: 0 0 28px;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  width: min(280px, 60vw);
  height: auto;
  /* The app icon as a tile, masked the way iOS masks it. It used to be the
     bare mark with a drop shadow under it, which is a shadow cast by nothing —
     and it showed people a logo rather than the thing they're about to tap on
     a home screen. */
  border-radius: 22%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--page);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border: 0;
}

.button:hover { opacity: 0.9; }

.button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.button-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.fine { font-size: 14px; color: var(--subtle); margin-top: 12px; }

/* Sections */

section { padding: 48px 0; }

section h2 {
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

section .sub {
  color: var(--subtle);
  max-width: var(--measure);
  margin: 0 0 28px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 14px;
}

.step h3, .feature h3 { margin: 0 0 6px; font-size: 18px; }
.step p, .feature p { margin: 0; color: var(--subtle); font-size: 15px; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  padding: 22px;
  /* The mark's ramp, used once. `border-image` rather than a pseudo-element:
     a gradient border is the whole reason the rule is 3px instead of 2 — at 2
     the three stops are indistinguishable from a flat blue. */
  border-top: 3px solid var(--accent);
  border-image: var(--ramp) 1;
}

.principles {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
}

.principles ul {
  columns: 2;
  column-gap: 32px;
  padding-left: 18px;
  margin: 0;
}

.principles li { break-inside: avoid; margin-bottom: 8px; color: var(--subtle); }
.principles li strong { color: var(--ink); }

/* Legal / prose pages */

.prose {
  max-width: var(--measure);
  padding: 40px 0 64px;
}

.prose h1 { font-size: 36px; letter-spacing: -0.02em; margin: 0 0 6px; }
.prose .updated { color: var(--subtle); margin: 0 0 32px; font-size: 15px; }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose h3 { font-size: 17px; margin: 24px 0 6px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose .callout {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 20px 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 44px;
  color: var(--subtle);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a { text-decoration: none; margin-right: 16px; }
.site-footer a:hover { text-decoration: underline; }

/* Responsive */

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; text-align: center; }
  .hero p.lede { margin-left: auto; margin-right: auto; }
  .button-row { justify-content: center; }
  /* No longer hoisted above the copy. That was right for a 280px icon and
     wrong for a phone-shaped video: 585 points of it before the headline puts
     the headline below the fold on the device most visitors are holding. */
  .hero-art { order: 0; margin-top: 8px; }
  .preview { width: min(240px, 58vw); }
  .steps, .features { grid-template-columns: 1fr; }
  .principles ul { columns: 1; }
  .site-nav a { margin-left: 12px; }
}

/* The exercise reel */

.reel {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.move {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 10px 10px 12px;
  text-align: center;
}

/* Square, and reserved before the animation lands — a Lottie mounts into a
   zero-height box otherwise and the whole section jumps when six of them
   arrive at once. */
.move-art {
  aspect-ratio: 1;
  width: 100%;
}

.move figcaption {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--subtle);
}

@media (max-width: 900px) { .reel { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .reel { grid-template-columns: repeat(2, 1fr); } }

/* The hero preview */

.preview {
  /* Same mask the icon tile uses, at the ratio a phone screen actually is —
     the recording is 886×1920, so a fixed height would letterbox it. */
  width: min(270px, 62vw);
  height: auto;
  aspect-ratio: 886 / 1920;
  border-radius: 34px;
  background: #000;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  display: block;
  /* It's a picture, not a player. Nothing to tap, nothing to focus, and no
     long-press "Save Video" sheet on iOS. */
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Safari draws its own start-playback button over a video it declined to
   autoplay — Low Power Mode, a data-saver setting, a strict policy — even
   with no `controls` attribute anywhere. That button is the thing being
   complained about: it makes a decorative loop look like a player that's
   waiting on you. Hidden, so a refusal falls back to the poster frame and
   the script's retries get on with it quietly. */
.preview::-webkit-media-controls,
.preview::-webkit-media-controls-panel,
.preview::-webkit-media-controls-overlay-play-button,
.preview::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
}

/* There is deliberately no reduced-motion exception here any more. It used to
   pause the video on frame 0 and give it controls, which is how a decorative
   loop turned into a dead player — including for renderers that report the
   preference by default rather than because anyone set it. */
