/* =====================================================================
   PULZ8: landing page
   Built on the Pulz8 design system foundations.
   One family, Satoshi (Fontshare, ITF Free Font License), self-hosted in
   assets/fonts: medium weights, generous radii, soft surfaces.
   COLOR LAW: the zone scale (gray, blue, green, orange, red; the same
   values as heartstream-web) is RESERVED for HR-zone semantics. Brand and
   chrome use ink neutrals plus Pulse magenta only.
   ===================================================================== */

@font-face {
  font-family: "Satoshi";
  src: url("./assets/fonts/Satoshi-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("./assets/fonts/Satoshi-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("./assets/fonts/Satoshi-700.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("./assets/fonts/Satoshi-900.woff2") format("woff2");
  font-weight: 800 900;
  font-display: swap;
}

:root {
  /* Type: one family; the role names say what a piece of text is. */
  --font-sans: "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-sans);
  --font-condensed: var(--font-sans);
  --font-ui: var(--font-sans);
  --font-mono: var(--font-sans);
  --num-feat: "tnum" 1, "lnum" 1;
  --tracking-display: -0.03em;

  /* Ink neutrals */
  --ink-900: #0c0d10;
  --ink-850: #101218;
  --ink-800: #15161b;
  --ink-700: #1e2028;
  --ink-600: #2a2d37;
  --line: #23252e;
  /* Background of the app screenshots, so frames add no second edge. */
  --screen-bg: #0b0d11;

  --fg-1: #f5f6f8;
  --fg-2: #9da1ad;
  --fg-3: #686c78;

  /* Brand: Pulse */
  --pulse-700: #b30e5c;
  --pulse-600: #e01773;
  --pulse-500: #ff2e88;
  --pulse-400: #ff5ba1;
  --pulse-300: #ff8fbf;
  --pulse-tint: #2a111f;
  --on-pulse: #0c0d10;

  /* HR-zone scale (functional only: board preview, legends, blog zone tags) */
  --zone-1: #a7adb9;
  --zone-2: #2e7cf6;
  --zone-3: #15c06d;
  --zone-4: #fb7a1e;
  --zone-5: #f23645;
  --on-zone-1: #0f1013;
  --on-zone-2: #0c0d10;
  --on-zone-3: #0c0d10;
  --on-zone-4: #1a0f04;
  --on-zone-5: #0c0d10;

  /* Spacing. Every margin, padding, gap and offset on the site comes from
     this scale. Each step is a whole multiple of the 8px unit, and the
     number in the name is the multiplier: --space-3 = 3 x 8 = 24px. */
  --space-unit: 8px;
  --space-1: calc(1 * var(--space-unit)); /* 8px */
  --space-2: calc(2 * var(--space-unit)); /* 16px */
  --space-3: calc(3 * var(--space-unit)); /* 24px */
  --space-4: calc(4 * var(--space-unit)); /* 32px */
  --space-5: calc(5 * var(--space-unit)); /* 40px */
  --space-6: calc(6 * var(--space-unit)); /* 48px */
  --space-8: calc(8 * var(--space-unit)); /* 64px */
  --space-10: calc(10 * var(--space-unit)); /* 80px */
  --space-12: calc(12 * var(--space-unit)); /* 96px */
  --space-16: calc(16 * var(--space-unit)); /* 128px */

  /* Crisp corners: inputs and buttons 8, cards 12, the board frame 16.
     Pills only for small tags and switches. */
  --r-sm: 8px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 999px;

  /* Surfaces and elevation: soft shadows and a faint hairline, not borders */
  --surface: var(--ink-800);
  --surface-raised: var(--ink-700);
  --hairline: rgba(245, 246, 248, 0.07);
  --tint-pulse: rgba(255, 46, 136, 0.14);
  /* Flat: a 1px hairline separates surfaces; shadows stay under 5%. */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.04);

  --glow-pulse: 0 0 0 4px rgba(255, 46, 136, 0.2);

  /* Motion */
  --dur-tick: 140ms;
  --dur-fast: 240ms;
  --dur-enter: 520ms;
  --dur-zone: 600ms;
  --dur-reveal: 820ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-zone: cubic-bezier(0.4, 0, 0.2, 1);
  /* komoot's sheet curve, and a touch of overshoot for presses */
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  /* Layout steps, all taken from the spacing scale.
     --gutter: screen edge to page content (also header, menu, cookie notice).
     --section-space: gap between landing sections.
     --page-top: header to a page's first content.
     --column-gap: between the pinned column and the content column. */
  --gutter: var(--space-2);
  --content-width: min(1180px, calc(100vw - 2 * var(--gutter)));
  --header-height: calc(9 * var(--space-unit)); /* 72px */
  /* app.js replaces this with the measured header height + --space-2. */
  --header-offset: calc(var(--header-height) + var(--space-2));
  --section-space: var(--space-16);
  --page-top: var(--space-10);
  --column-gap: var(--space-8);
}

@media (max-width: 1080px) {
  :root {
    --section-space: var(--space-12);
    --page-top: var(--space-4);
    --column-gap: var(--space-6);
  }
}

@media (max-width: 560px) {
  :root {
    --section-space: var(--space-10);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  scroll-padding-top: var(--header-offset);
  color: var(--fg-1);
  background: var(--ink-900);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.has-open-menu {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

::selection {
  background: var(--pulse-500);
  color: var(--on-pulse);
}

:focus-visible {
  outline: none;
  box-shadow: var(--glow-pulse);
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  z-index: 40;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--r-md);
  background: var(--pulse-500);
  color: var(--on-pulse);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

.page-shell {
  position: relative;
  width: var(--content-width);
  margin: 0 auto;
  padding: 0 0 var(--space-6);
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  min-height: var(--header-height);
  margin: 0 calc(-1 * var(--gutter));
  padding: var(--space-1) var(--gutter);
  border-bottom: 1px solid var(--hairline);
  background: rgba(12, 13, 16, 0.78);
  backdrop-filter: saturate(1.4) blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.brand__mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  background-image: url("./assets/pulz8-mark.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.brand__wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

/* The 8 of pulz8 lies on its side as an infinity sign, as in the app.
   Rotation doesn't change layout, so the margins make room for the glyph's
   wider footprint. */
.brand__wordmark span {
  display: inline-block;
  color: var(--pulse-500);
  line-height: 1;
  transform: translateY(0.06em) rotate(90deg);
  margin-inline: 0.1em 0.04em;
}

.site-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-raised);
  color: var(--fg-1);
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-spring);
}

.site-menu-toggle:hover {
  background: #2a2d37;
}

.site-menu-toggle:active {
  transform: scale(0.92);
}

.site-menu-toggle span {
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: var(--r-full);
  background: currentColor;
  transition:
    transform var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.site-menu-toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.site-menu-toggle span:nth-child(3) {
  transform: translateY(6px);
}

.site-menu-toggle.is-open span:nth-child(1) {
  transform: rotate(45deg);
}

.site-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.site-menu-toggle.is-open span:nth-child(3) {
  transform: rotate(-45deg);
}

.site-header__drawer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
}

.site-nav {
  display: flex;
  gap: 4px;
  color: var(--fg-2);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.site-nav a,
.site-header__signin {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  transition:
    color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.site-nav a:hover,
.site-header__signin:hover {
  background: var(--surface-raised);
}

.site-header__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  white-space: nowrap;
}

.site-header__signin {
  color: var(--fg-1);
  font-size: 0.95rem;
  font-weight: 700;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface);
}

.lang-switch__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--space-5);
  min-height: var(--space-4);
  padding: 0 var(--space-1);
  border-radius: var(--r-full);
  color: var(--fg-2);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.lang-switch__link:hover {
  color: var(--fg-1);
}

.lang-switch__link.is-active {
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  color: var(--fg-1);
}

.site-nav a:hover,
.site-header__signin:hover,
.site-footer__links a:hover,
.site-footer__button:hover {
  color: var(--pulse-300);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-3);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

/* Lift on hover, press down on click. */
.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0) scale(0.97);
  transition-duration: var(--dur-tick);
}

.button--primary {
  background: var(--pulse-500);
  color: var(--on-pulse);
}

.button--primary:hover {
  background: var(--pulse-400);
}

.button--secondary {
  border-color: var(--hairline);
  background: var(--surface-raised);
  color: var(--fg-1);
}

.button--secondary:hover {
  background: #2a2d37;
}

.button--compact {
  min-height: 40px;
  padding: 0 var(--space-2);
  font-size: 0.92rem;
}

.button--large {
  min-height: 54px;
  padding: 0 var(--space-4);
  font-size: 1.04rem;
}

/* ------------------------------------------------------------------ */
/* Shared section type                                                 */
/* ------------------------------------------------------------------ */

.section {
  padding: var(--section-space) 0 0;
}

/* Page head for the blog, articles and legal pages: label, title and an
   optional intro at the page's left edge, the same distance under the
   header as the landing hero. */
.page-head {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--page-top);
}

.page-head .eyebrow {
  margin: 0;
}

.page-head h1 {
  max-width: 24ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

/* Buttons in a page head (404): the head's gap plus this margin gives the
   same 32px between intro and buttons as the landing hero. */
.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* What follows a page head opens with the same hairline and step as a
   landing section, one step below the head. (Scoped to main so it outranks
   .section.pinned's section gap.) */
main .section.page-main {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--hairline);
}

.section[id],
main[id] {
  scroll-margin-top: var(--header-offset);
}

/* A tonal pill, sentence case: what the section is about. */
.eyebrow {
  justify-self: start;
  width: fit-content;
  margin: 0 0 var(--space-2);
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--tint-pulse);
  color: var(--pulse-400);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1,
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.section-title {
  max-width: 20ch;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.06;
}

.section-lede {
  margin: 0;
  max-width: 60ch;
  color: var(--fg-2);
  font-size: 1.08rem;
  line-height: 1.6;
}

h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

/* Content sections: a hairline opens each one; under it, a pinned text
   column (4 of 12) and the content column (8 of 12). Every section uses the
   same split, so the content column's edge never moves down the page. */
.section.pinned {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: var(--column-gap);
  align-items: start;
  margin-top: var(--section-space);
  padding-top: var(--space-6);
  border-top: 1px solid var(--hairline);
}

.pinned__head {
  position: sticky;
  top: calc(var(--header-offset) + var(--space-2));
  display: grid;
  gap: var(--space-2);
}

.pinned__head .section-title {
  font-size: clamp(2rem, 3.2vw, 2.7rem);
  line-height: 1.08;
}

.pinned__head .section-lede {
  font-size: 1rem;
}

.pinned__body {
  display: grid;
  gap: var(--space-6);
  min-width: 0;
}

/* The one list pattern: a 40px marker (icon or step number) beside a title
   and a short paragraph. */
.item-list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.item {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: var(--space-2);
}

.item__marker {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--tint-pulse);
  color: var(--pulse-400);
}

.item__marker--step {
  border: 1.5px solid var(--hairline);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--fg-1);
  font-family: var(--font-display);
  font-weight: 700;
  font-feature-settings: var(--num-feat);
}

.item h3 {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.item p {
  margin: 0;
  max-width: 60ch;
  color: var(--fg-2);
  line-height: 1.6;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--column-gap);
  /* Copy and board both start at --page-top, the same height every other
     page's head starts at. */
  align-items: start;
  padding: var(--page-top) 0 0;
}

.hero h1 {
  max-width: 16em;
  font-size: clamp(2.5rem, 4.8vw, 4.1rem);
  line-height: 1.02;
}

/* Keep compound words like "heart-rate" on one line. */
.hero h1 .nowrap {
  white-space: nowrap;
}

.hero__accent {
  display: block;
  color: var(--pulse-500);
}

.hero__lede {
  max-width: 46ch;
  margin: var(--space-3) 0 0;
  color: var(--fg-2);
  font-size: 1.12rem;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* ------------------------------------------------------------------ */
/* Live board preview: the app's tile, animated by app.js              */
/* ------------------------------------------------------------------ */

.live-board {
  padding: var(--space-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.live-board__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0 var(--space-1) var(--space-2);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
}

/* The one semantic status dot on the page: the board is live. */
.live-board__live {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--pulse-500);
}

.live-board__live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--pulse-500);
  animation: hs-beat 1.6s var(--ease-out) infinite;
}

.live-board__count {
  color: var(--fg-2);
}

.live-board__count b {
  color: var(--fg-1);
  font-size: 1.1em;
}

.live-board__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.tile {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 196px;
  padding: var(--space-2);
  border-radius: var(--r-lg);
  transition:
    background-color var(--dur-zone) var(--ease-zone),
    color var(--dur-zone) var(--ease-zone);
}

.zone-1 { background: var(--zone-1); color: var(--on-zone-1); }
.zone-2 { background: var(--zone-2); color: var(--on-zone-2); }
.zone-3 { background: var(--zone-3); color: var(--on-zone-3); }
.zone-4 { background: var(--zone-4); color: var(--on-zone-4); }
.zone-5 { background: var(--zone-5); color: var(--on-zone-5); }

.tile__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tile__pct {
  align-self: end;
  font-family: var(--font-condensed);
  font-size: clamp(3rem, 5.4vw, 4.2rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.05em;
  font-feature-settings: var(--num-feat);
  font-variant-numeric: tabular-nums;
}

.tile__pct small,
.tile__bpm small {
  font-size: 0.42em;
  letter-spacing: 0;
}

.tile__bpm small {
  margin-left: 0.1em;
  font-family: var(--font-display);
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tile__unit {
  margin-top: var(--space-1);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tile__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.tile__zone {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile__bpm {
  font-family: var(--font-condensed);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.tile b {
  font-weight: inherit;
}

/* ------------------------------------------------------------------ */
/* How it works: the real board, then the steps                        */
/* ------------------------------------------------------------------ */

.screen {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--ink-900);
  box-shadow: var(--shadow-lg);
}

/* A line joins each step number to the next, so the list reads as a sequence. */
.how__steps .item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(var(--space-5) + var(--space-1));
  bottom: calc(var(--space-1) - var(--space-4));
  left: calc(var(--space-5) / 2 - 0.5px);
  width: 1.5px;
  background: var(--hairline);
}

/* ------------------------------------------------------------------ */
/* After the session: two saved views on one screen                    */
/* ------------------------------------------------------------------ */

.showcase {
  display: grid;
  gap: var(--space-3);
}

/* Two captions side by side above the screen, like a segmented control. */
.showcase__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-3);
}

.showcase__tab {
  padding: 0 0 var(--space-2);
  border-bottom: 2px solid var(--hairline);
}

.showcase__tab h3 {
  font-size: 1.05rem;
  line-height: 1.3;
}

.showcase__tab p {
  margin: var(--space-1) 0 0;
  color: var(--fg-2);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* The screenshots sit on the app's own background, so the frame is the only
   edge: no panel inside a panel. */
.showcase__stage {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--screen-bg);
  box-shadow: var(--shadow-lg);
}

.showcase__panel {
  margin: 0;
}

/* athlete.webp draws its own bordered card (x 36-1643, y 35-1090 of
   1680x1128). Crop to just inside that border so the stage frame becomes the
   card's edge. Percentage margins resolve against width, so one value
   offsets both axes. */
.showcase__panel--crop {
  aspect-ratio: 1604 / 1050;
  overflow: hidden;
  background: #15161a;
}

.showcase__panel--crop img {
  width: calc(100% * 1680 / 1604);
  max-width: none;
  margin: calc(-100% * 38 / 1604) 0 0 calc(-100% * 38 / 1604);
}

/* overview.webp's last row is a stray border from the capture. Scaled down
   it blurs across neighbouring pixels, so crop a few rows of plain
   background along with it. */
.showcase__panel--overview {
  aspect-ratio: 1680 / 984;
  overflow: hidden;
}

.showcase__panel + .showcase__panel {
  border-top: 1px solid var(--hairline);
}

/* Tab mode, switched on by app.js. Both panels share one grid cell, so the
   stage keeps the taller screen's height and switching never shifts layout. */
.showcase.is-tabs .showcase__tab {
  cursor: pointer;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.showcase.is-tabs .showcase__tab[aria-selected="false"] {
  opacity: 0.55;
}

.showcase.is-tabs .showcase__tab[aria-selected="false"]:hover {
  opacity: 0.85;
}

.showcase.is-tabs .showcase__tab[aria-selected="true"] {
  border-bottom-color: var(--pulse-500);
}

.showcase.is-tabs .showcase__panel {
  grid-area: 1 / 1;
  align-self: center;
  border-top: 0;
  transition:
    opacity var(--dur-enter) var(--ease-out),
    transform var(--dur-reveal) var(--ease-sheet),
    visibility 0s linear 0s;
}

.showcase.is-tabs .showcase__panel:not(.is-active) {
  opacity: 0;
  transform: scale(0.985);
  visibility: hidden;
  transition:
    opacity var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    visibility 0s linear var(--dur-fast);
}

/* ------------------------------------------------------------------ */
/* Pricing                                                             */
/* ------------------------------------------------------------------ */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

/* Features take the spare height, so both plans' buttons line up at the
   bottom of their cards. */
.plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition:
    transform var(--dur-enter) var(--ease-out),
    box-shadow var(--dur-enter) var(--ease-out);
}

.plan:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* The gym plan is the one Pulz8 sells, so it carries the accent. */
.plan--team {
  border-color: rgba(255, 46, 136, 0.55);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 46, 136, 0.04), transparent 60%),
    var(--surface);
}

.plan__name {
  color: var(--fg-2);
  font-size: 1rem;
  font-weight: 700;
}

.plan__price {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tracking-display);
  font-feature-settings: var(--num-feat);
}

.plan__period {
  display: block;
  margin-top: var(--space-1);
  color: var(--fg-2);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
}

.plan--team .plan__price {
  color: var(--pulse-500);
}

.plan__note {
  margin: 0;
  color: var(--fg-2);
}

.plan__features {
  display: grid;
  flex: 1;
  align-content: start;
  gap: var(--space-2);
  margin: var(--space-2) 0;
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
}

.plan__features li {
  display: flex;
  gap: var(--space-1);
  line-height: 1.45;
}

.plan__features .icon {
  margin-top: calc((1.45em - 20px) / 2);
  color: var(--pulse-500);
}

.plan .button {
  align-self: flex-start;
}

.plan__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.plan__footnote {
  margin: 0;
  color: var(--fg-2);
  font-size: 0.9rem;
}

/* ------------------------------------------------------------------ */
/* What you need                                                       */
/* ------------------------------------------------------------------ */

.setup__notes ul {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}

.setup__notes li {
  max-width: 60ch;
  padding-left: var(--space-2);
  border-left: 2px solid var(--tint-pulse);
  color: var(--fg-2);
  line-height: 1.55;
}

/* ------------------------------------------------------------------ */
/* Device compatibility check                                          */
/* ------------------------------------------------------------------ */

/* One stacked module in the content column: what it is, then the test. */
.device-check {
  min-width: 0;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  scroll-margin-top: var(--header-offset);
}

.device-check__icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-2);
  border: 0;
  border-radius: var(--r-sm);
  background: var(--tint-pulse);
  color: var(--pulse-400);
}

.device-check__intro h3 {
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: var(--tracking-display);
}

.device-check p {
  margin: var(--space-1) 0 0;
  color: var(--fg-2);
  max-width: 60ch;
}

.device-check .device-check__privacy {
  margin-top: var(--space-2);
  font-size: 0.9rem;
}

.device-check__test {
  display: grid;
  min-width: 0;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--hairline);
}

.device-check__status h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
}

.device-check[data-state="success"] .device-check__status h4 {
  color: var(--pulse-400);
}

.device-check__actions {
  display: grid;
  gap: var(--space-2);
}

.device-check__actions [hidden] {
  display: none;
}

.device-check__actions .button:disabled {
  background: var(--surface-raised);
  box-shadow: none;
  color: var(--fg-2);
  cursor: default;
  transform: none;
}

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

/* The section's hairline already opens the list, so rows only divide. */
.faq-list {
  display: block;
}

.faq-list details {
  border-bottom: 1px solid var(--hairline);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color var(--dur-fast) var(--ease-out);
}

/* Every content column starts level with its section title. */
.faq-list details:first-child summary {
  padding-top: 0;
}

.faq-list summary:hover {
  color: var(--pulse-300);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

/* A plain + that becomes a - when the answer is open. The box is wider
   than the glyphs, so neither spills past the row's edge and the two are
   the same width. */
.faq-list summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 1.2em;
  color: var(--pulse-400);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.faq-list details[open] summary::after {
  content: "2";
}

.faq-list p {
  margin: 0;
  padding: 0 0 var(--space-3);
  max-width: 68ch;
  color: var(--fg-2);
  line-height: 1.65;
}

/* Answers slide open and closed where the browser can animate to auto
   height; elsewhere they simply appear. */
@supports (interpolate-size: allow-keywords) {
  .faq-list {
    interpolate-size: allow-keywords;
  }

  .faq-list details::details-content {
    block-size: 0;
    overflow: clip;
    transition:
      block-size var(--dur-enter) var(--ease-sheet),
      content-visibility var(--dur-enter) allow-discrete;
  }

  .faq-list details[open]::details-content {
    block-size: auto;
  }

  .faq-list details p {
    opacity: 0;
    transform: translate3d(0, -6px, 0);
    transition:
      opacity var(--dur-enter) var(--ease-out),
      transform var(--dur-enter) var(--ease-out);
  }

  .faq-list details[open] p {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ */
/* Final call to action                                                */
/* ------------------------------------------------------------------ */

/* Copy left, actions right, over a Pulse wash rising from the corner. */
.final-cta__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-4) var(--space-8);
  /* Same side inset and radius as every other card. */
  padding: var(--space-8) var(--space-4);
  border: 1px solid rgba(255, 46, 136, 0.28);
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 140% at 100% 100%, rgba(255, 46, 136, 0.05), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-lg);
}

.final-cta__copy {
  display: grid;
  gap: var(--space-2);
}

.final-cta .section-title {
  max-width: 16ch;
}

.final-cta .section-lede {
  max-width: 52ch;
}

.final-cta .hero__actions {
  margin-top: 0;
}

@media (max-width: 900px) {
  .final-cta__panel {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* ------------------------------------------------------------------ */
/* Email updates                                                       */
/* ------------------------------------------------------------------ */

.updates__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: var(--space-3) var(--space-8);
  padding: var(--space-4);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.updates__copy {
  display: grid;
  gap: var(--space-1);
  color: var(--fg-2);
}

.updates__copy > * {
  margin: 0;
}

.updates__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  color: var(--fg-1);
}

.updates__form {
  display: grid;
  gap: var(--space-1);
}

.updates__label {
  color: var(--fg-1);
  font-size: 0.9rem;
  font-weight: 700;
}

.updates__row {
  display: flex;
  gap: var(--space-1);
}

.updates__input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 var(--space-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-full);
  background: var(--surface-raised);
  color: var(--fg-1);
  font: inherit;
  font-size: 1rem;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.updates__input:focus-visible {
  border-color: var(--pulse-400);
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 46, 136, 0.18);
}

.updates__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.updates__status {
  color: var(--fg-1);
  font-weight: 600;
}

.updates__status.is-error {
  color: var(--pulse-300);
}

.updates__status,
.updates__privacy {
  margin: 0;
}

.updates__privacy {
  color: var(--fg-3);
  font-size: 0.85rem;
}

.updates__privacy a {
  color: var(--fg-2);
}

@media (max-width: 900px) {
  .updates__panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .updates__row {
    flex-direction: column;
  }
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-12);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
  color: var(--fg-2);
}

.site-footer .brand__wordmark {
  color: var(--fg-1);
}

.site-footer__brand p {
  margin: var(--space-1) 0 0;
  max-width: 44ch;
  line-height: 1.6;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  font-size: 0.92rem;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  transition: color var(--dur-fast) var(--ease-out);
}

.site-footer__button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}

/* ------------------------------------------------------------------ */
/* Analytics consent                                                   */
/* ------------------------------------------------------------------ */

.consent {
  position: fixed;
  inset: auto var(--gutter) var(--gutter) auto;
  z-index: 30;
  width: min(400px, calc(100vw - 2 * var(--gutter)));
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--fg-2);
  box-shadow: var(--shadow-lg);
}

/* The dialog takes focus only so Tab reaches its buttons next. */
.consent:focus {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.consent[open] {
  animation: consent-enter var(--dur-enter) var(--ease-sheet);
}

.consent__title {
  margin: 0;
  color: var(--fg-1);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

.consent__text {
  margin: var(--space-1) 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.consent__text a {
  color: var(--pulse-300);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

@keyframes consent-enter {
  from {
    opacity: 0;
    transform: translateY(var(--space-2));
  }
}

/* ------------------------------------------------------------------ */
/* Motion                                                              */
/* ------------------------------------------------------------------ */

@keyframes hs-beat {
  0%,
  100% {
    transform: scale(1);
  }

  18% {
    transform: scale(1.25);
  }

  32% {
    transform: scale(1);
  }
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

/* Content rises into place as it scrolls in. app.js staggers items that
   arrive together through --reveal-delay. */
[data-reveal].reveal-enabled {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity var(--dur-enter) var(--ease-out) var(--reveal-delay, 0ms),
    transform var(--dur-reveal) var(--ease-out) var(--reveal-delay, 0ms);
}

[data-reveal].reveal-enabled.is-visible {
  opacity: 1;
  transform: none;
}

/* The hero is on screen at load, so it plays once instead of waiting for a
   scroll: copy first, line by line, then the board. */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
}

@keyframes board-in {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.98);
  }
}

/* Page heads on the blog, articles and legal pages enter the same way. */
.hero__copy > *,
.page-head > * {
  animation: rise-in var(--dur-reveal) var(--ease-out) both;
}

.hero__copy > :nth-child(2),
.page-head > :nth-child(2) {
  animation-delay: 70ms;
}

.hero__copy > :nth-child(3),
.page-head > :nth-child(3) {
  animation-delay: 140ms;
}

.hero__copy > :nth-child(4),
.page-head > :nth-child(4) {
  animation-delay: 210ms;
}

.live-board {
  animation: board-in 1s var(--ease-out) 180ms both;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2);
  }

  .site-menu-toggle {
    position: relative;
    display: inline-flex;
    z-index: 2;
  }

  .site-header__drawer {
    position: fixed;
    inset: 0 0 auto;
    display: grid;
    /* The desktop drawer spaces nav and actions apart; here one full-width
       column stacks them. */
    justify-content: stretch;
    gap: var(--space-3);
    padding: calc(var(--header-height) + var(--space-2)) var(--gutter) var(--space-3);
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-bottom: 1px solid var(--hairline);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-16px);
    transition:
      opacity var(--dur-enter) var(--ease-out),
      visibility var(--dur-enter) var(--ease-out),
      transform var(--dur-enter) var(--ease-sheet);
  }

  .site-header__drawer.is-open {
    transition-property: opacity, transform;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav a {
    min-height: var(--space-6);
    font-size: 1.05rem;
  }

  /* Dim the page behind the open menu so it reads as a layer, not as page
     content running into the hero. */
  body.has-open-menu::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(12, 13, 16, 0.72);
    animation: scrim-in var(--dur-fast) var(--ease-out);
  }

  @keyframes scrim-in {
    from {
      opacity: 0;
    }
  }

  .site-header__actions {
    display: grid;
    grid-template-columns: auto 1fr;
    justify-content: stretch;
    gap: var(--space-2);
  }

  .site-header__actions .button {
    grid-column: 1 / -1;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  /* One column: nothing to pin beside, so headings scroll normally. */
  .section.pinned {
    grid-template-columns: 1fr;
    row-gap: var(--space-4);
  }

  .pinned__head {
    position: static;
  }
}

@media (max-width: 767px) {
  .plans {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .tile {
    min-height: 150px;
    padding: var(--space-1);
  }

  .tile__pct {
    font-size: 2.9rem;
  }

  .tile__zone {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
  }

  .tile__bpm {
    font-size: 1.05rem;
  }

  .button,
  .button--compact,
  .button--large {
    width: 100%;
  }

  .hero__actions,
  .page-head__actions {
    flex-direction: column;
  }

  .plan,
  .device-check {
    padding: var(--space-3);
  }

  .final-cta__panel {
    padding: var(--space-6) var(--space-3);
  }

  .plan .button {
    align-self: stretch;
  }

  /* On a phone the tab titles are enough; the screenshot below shows the
     rest. Without JavaScript both captions stay. */
  .showcase.is-tabs .showcase__tab p {
    display: none;
  }

  .lang-switch {
    justify-content: space-between;
  }

  .lang-switch__link {
    flex: 1 1 0;
  }
}

/* Narrow phones: the tile footer stacks so zone and BPM both fit, and
   buttons give their label more room (wrapping as a last resort) so long
   Slovak and Czech labels never widen the page. */
@media (max-width: 420px) {
  .tile__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
}

@media (max-width: 380px) {
  .button {
    padding-inline: var(--space-1);
    font-size: 0.92rem;
    white-space: normal;
    text-align: center;
  }
}
