:root {
  --brand-50: #ecfdf5;
  --brand-100: #d1fae5;
  --brand-500: #14b8a6;
  --brand-600: #0d9488;
  --brand-700: #0f766e;
  --brand-900: #134e4a;
  --ink-50: #f8fafc;
  --ink-200: #e2e8f0;
  --ink-500: #64748b;
  --ink-700: #334155;
  --ink-900: #0f172a;
  --accent: #f59e0b;
  --page-gutter: 20px;
  --content-width: 1120px;
  --section-space: 64px;
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

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

html {
  background: var(--ink-50);
  color: var(--ink-900);
  overflow-x: clip;
}

body {
  min-width: 320px;
  margin: 0;
  background: #fff;
  color: var(--ink-900);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

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

p {
  max-width: 65ch;
}

h1,
h2 {
  text-wrap: balance;
}

h1 {
  width: min(100%, 24ch);
  max-width: 24ch;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  max-width: 21ch;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.shell {
  width: min(calc(100% - (2 * var(--page-gutter))), var(--content-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 8px;
  left: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 6px;
  background: var(--ink-900);
  color: #fff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--ink-200);
  background: #fff;
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-logo {
  width: 118px;
  flex: none;
}

.login-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid var(--brand-700);
  border-radius: 8px;
  background: var(--brand-700);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.login-link:hover {
  background: var(--brand-900);
  border-color: var(--brand-900);
}

.login-link:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--brand-900);
  outline-offset: 3px;
}

.hero {
  display: grid;
  align-items: center;
  padding-block: 36px 48px;
  background: #fff;
}

.hero-copy {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  text-align: center;
}

.hero-copy h1 {
  margin-inline: auto;
}

.hero-title-line {
  display: block;
}

.hero .eyebrow {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  text-align: center;
}

.eyebrow,
.section-label {
  margin-bottom: 10px;
  color: var(--brand-700);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.015em;
}

.hero-summary {
  width: min(calc(100% - 32px), 42ch);
  max-width: 42ch;
  margin: 18px auto 0;
  color: var(--ink-700);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.product-figure {
  min-width: 0;
}

.product-frame img,
.product-frame video {
  width: 100%;
}

.product-frame,
.message-frame {
  overflow: hidden;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgb(15 23 42 / 10%);
}

.product-figure figcaption {
  max-width: 58ch;
  margin-top: 14px;
  color: var(--ink-500);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.story-section,
.analytics-section {
  padding-block: calc(var(--section-space) / 2);
}

.story-section {
  background: #fff;
}

.story-section-muted {
  background: var(--ink-50);
}

.story-copy {
  margin-bottom: 32px;
}

.story-copy h2,
.analytics-copy h2 {
  margin-bottom: 18px;
}

.story-copy p:not(.section-label) + p,
.analytics-copy p:not(.section-label) + p {
  margin-top: 14px;
}

.story-copy p:not(.section-label),
.analytics-copy p:not(.section-label) {
  color: var(--ink-700);
}

.story-media {
  max-width: 390px;
  margin-inline: auto;
}

.story-media-wide {
  width: 100%;
  max-width: 430px;
}

.workflow-frame,
.workflow-still,
.workflow-video {
  width: 100%;
}

.workflow-still,
.workflow-video {
  height: auto;
  object-fit: contain;
}

.desktop-workflow-video {
  display: none;
}

.attendance-captures {
  display: grid;
  justify-items: center;
  gap: 20px;
}

.attendance-video-frame {
  width: min(100%, 280px);
}

.members-frame {
  width: min(100%, 390px);
}

.message-frame {
  aspect-ratio: 4 / 5;
}

.message-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.analytics-section {
  background: #fff;
}

.analytics-product {
  max-width: 430px;
  margin-inline: auto;
}

.closing {
  padding-block: calc(var(--section-space) / 2);
  background: var(--brand-50);
}

.closing-inner {
  display: grid;
  gap: 24px;
}

.closing-logo {
  width: 180px;
}

.closing-copy h2 {
  margin-bottom: 14px;
}

.closing-copy p {
  color: var(--ink-700);
}

.login-link-large {
  min-width: 120px;
  margin-top: 24px;
}

.site-footer {
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ink-200);
  background: #fff;
  color: var(--ink-500);
  font-size: 15px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: no-preference) {
  .motion-ready [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 420ms ease-out,
      transform 520ms ease-out;
    transition-delay: calc(var(--reveal-delay, 0) * 70ms);
    will-change: opacity, transform;
  }

  .motion-ready [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
  }

  .motion-ready [data-reveal-delay="1"] {
    --reveal-delay: 1;
  }
}

@media (min-width: 768px) {
  .hero {
    padding-block: 48px;
    background-color: var(--ink-50);
    background-image: url("assets/hero-gym-workspace.webp");
    background-image: image-set(
      url("assets/hero-gym-workspace.webp") 1x,
      url("assets/hero-gym-workspace@2x.webp") 2x
    );
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }

  .hero-copy {
    max-width: none;
  }

  h1 {
    font-size: 2.75rem;
  }

  .closing-inner {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
    gap: 52px;
  }

  .closing-logo {
    width: 220px;
  }
}

@media (min-width: 1025px) {
  :root {
    --section-space: 96px;
  }

  h1 {
    max-width: 24ch;
    font-size: 3.5rem;
    line-height: 1.05;
  }

  h2 {
    font-size: 2.125rem;
    line-height: 1.16;
  }

  .header-inner {
    min-height: 80px;
  }

  .header-logo {
    width: 138px;
  }

  .hero {
    min-height: clamp(420px, calc(100svh - 330px), 500px);
  }

  .story-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    align-items: start;
    gap: clamp(64px, 9vw, 112px);
  }

  .story-grid-wide {
    grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
    gap: clamp(52px, 7vw, 88px);
  }

  .story-copy {
    position: sticky;
    top: 64px;
    margin-bottom: 0;
    padding-top: 24px;
  }

  .story-media {
    width: min(100%, 430px);
    max-width: none;
    margin-inline: auto;
  }

  .story-media-wide {
    width: 100%;
    max-width: none;
  }

  .workflow-still {
    display: none;
  }

  .desktop-workflow-video {
    display: block;
  }

  .attendance-captures {
    /* Source-ratio tracks give both uncropped captures the same rendered height. */
    grid-template-columns: minmax(0, 0.967033fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }

  .attendance-video-frame,
  .members-frame {
    width: 100%;
  }

  .attendance-video,
  .members-frame img {
    height: auto;
    object-fit: contain;
  }

  .story-grid-reverse .story-copy {
    grid-column: 2;
  }

  .story-grid-reverse .story-media {
    grid-row: 1;
    grid-column: 1;
  }

  .closing-inner {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 80px;
  }

  .closing-logo {
    width: 260px;
  }
}

@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .motion-ready [data-reveal="media"] {
    clip-path: inset(0 0 12% 0);
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    transition:
      clip-path 680ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 380ms ease-out,
      transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--reveal-delay, 0) * 70ms);
    will-change: clip-path, opacity, transform;
  }

  .motion-ready [data-reveal="media"].is-visible {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateY(0) scale(1);
    will-change: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
