/* Sage Fitness landing page. Brand tokens live in brand.css. */

:root {
  --page-pad: clamp(1.25rem, 4vw, 4.5rem);
  --max: 72rem;
  --measure: 36rem;
  --hairline: color-mix(in srgb, var(--sage-charcoal) 14%, transparent);
  --shadow: 0 18px 40px color-mix(in srgb, var(--sage-charcoal) 18%, transparent);
  --ease: 150ms ease;
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-move: cubic-bezier(0.45, 0, 0.55, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sage-site,
  .sage-site *,
  .sage-site *::before,
  .sage-site *::after {
    animation: none !important;
    transition: none !important;
  }
}

body.sage-site,
.sage-site {
  margin: 0;
  background: var(--sage-stone);
  color: var(--sage-charcoal);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.sage-site {
  font-family: var(--brand-font);
}

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

.sage-site a {
  color: var(--sage-action);
  text-underline-offset: 0.22em;
  text-decoration-thickness: from-font;
}

.sage-site a:hover { color: var(--sage-action-hover); }

.sage-site :focus-visible {
  outline: 3px solid var(--sage-charcoal);
  outline-offset: 3px;
}

.sage-site ::selection {
  background: color-mix(in srgb, var(--sage-sage) 55%, var(--sage-stone));
  color: var(--sage-on-sage);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.25rem;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 150ms ease,
    color 150ms ease,
    transform 150ms var(--ease-out);
}

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

.sage-site a.btn-primary {
  background: var(--sage-action);
  color: var(--sage-chalk);
}

@media (hover: hover) and (pointer: fine) {
  .sage-site a.btn-primary:hover {
    background: var(--sage-action-hover);
    color: var(--sage-chalk);
  }
}

.sage-site a.btn-ghost {
  background: transparent;
  color: var(--sage-charcoal);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

@media (hover: hover) and (pointer: fine) {
  .sage-site a.btn-ghost:hover {
    background: var(--sage-light-surface);
    color: var(--sage-charcoal);
  }
}

.sage-site a.btn-on-dark {
  background: var(--sage-chalk);
  color: var(--sage-on-sage);
}

@media (hover: hover) and (pointer: fine) {
  .sage-site a.btn-on-dark:hover {
    background: var(--sage-stone);
    color: var(--sage-on-sage);
  }
}

.btn-lg {
  min-height: 3.15rem;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

.sage-site a.btn-store {
  gap: 0.65rem;
  min-height: 3.15rem;
  padding: 0.45rem 1.05rem 0.45rem 0.8rem;
  border-radius: 0.7rem;
  background: #1d1d1f;
  color: #fff;
  white-space: normal;
  text-align: start;
  line-height: 1.05;
}

@media (hover: hover) and (pointer: fine) {
  .sage-site a.btn-store:hover {
    background: #000;
    color: #fff;
  }
}

.btn-store-logo {
  width: 1.15rem;
  height: auto;
  flex: 0 0 auto;
  display: block;
}

.sage-site .app a.btn-store {
  background: var(--sage-chalk);
  color: #1d1d1f;
}

@media (hover: hover) and (pointer: fine) {
  .sage-site .app a.btn-store:hover {
    background: #fff;
    color: #000;
  }
}

.btn-store-text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.btn-store-kicker {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.btn-store-name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero {
  display: grid;
}

.hero-copy {
  padding: 2.5rem var(--page-pad) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.15rem;
}

.hero-copy p {
  max-width: var(--measure);
  margin: 0;
  color: var(--sage-muted);
}

.hero-photo {
  aspect-ratio: 16 / 9;
  min-height: 12rem;
  background: var(--sage-light-surface);
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(22rem, 0.92fr) 1.08fr;
    min-height: 36rem;
  }

  .hero-copy {
    padding: 3rem var(--page-pad) 4rem clamp(1.5rem, 3vw, 3rem);
  }

  .hero-photo {
    aspect-ratio: auto;
    min-height: 100%;
    height: 100%;
  }

  .hero-photo img {
    min-height: 100%;
    height: 100%;
  }
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-muted);
}

.sage-site h1, .sage-site h2, .sage-site h3 {
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: var(--sage-charcoal);
}

.hero-copy p,
.section-intro p,
.program-copy p,
.app p,
.close p,
.faq details p,
.class-caption p {
  text-wrap: pretty;
}

.sage-site h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
}

.sage-site h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  line-height: 1.12;
}

.sage-site h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.hero-note {
  font-size: 0.9375rem;
}

@keyframes rise-in {
  to {
    opacity: 1;
    translate: 0 0;
  }
}

html[data-intro="play"] .hero-copy > * {
  opacity: 0;
  translate: 0 8px;
  animation: rise-in 380ms var(--ease-out) forwards;
}

html[data-intro="play"] .hero-copy > *:nth-child(1) { animation-delay: 0ms; }
html[data-intro="play"] .hero-copy > *:nth-child(2) { animation-delay: 80ms; }
html[data-intro="play"] .hero-copy > *:nth-child(3) { animation-delay: 160ms; }
html[data-intro="play"] .hero-copy > *:nth-child(4) { animation-delay: 240ms; }
html[data-intro="play"] .hero-copy > *:nth-child(5) { animation-delay: 320ms; }

html[data-intro="play"] .hero-photo {
  opacity: 0;
  translate: 0 8px;
  animation: rise-in 400ms var(--ease-out) 100ms forwards;
}

.class-band {
  margin: 0;
  overflow: hidden;
}

.class-band img {
  width: 100%;
  height: clamp(16rem, 52vw, 34rem);
  object-fit: cover;
}

.class-caption {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  padding: 1.35rem var(--page-pad) 1.6rem;
  background: var(--sage-charcoal);
  color: var(--sage-chalk);
}

.class-caption p {
  margin: 0;
  max-width: 40rem;
  color: color-mix(in srgb, var(--sage-chalk) 82%, var(--sage-sage));
}

.class-caption strong {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.sage-site section[id],
.sage-site #train,
.sage-site #app,
.sage-site #plans {
  scroll-margin-top: 1rem;
}

.section {
  padding: 4.5rem var(--page-pad);
}

.section-intro {
  max-width: 38rem;
  margin-bottom: 2.25rem;
}

.section-intro p {
  margin: 0.6rem 0 0;
  color: var(--sage-muted);
}

.train-grid {
  display: grid;
  gap: 1rem;
}

.photo-card {
  margin: 0;
  position: relative;
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid rgb(0 0 0 / 10%);
  outline-offset: -1px;
}

.photo-card figcaption {
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: 0;
  padding: 1.1rem 1.15rem;
  color: var(--sage-chalk);
  background: linear-gradient(to top, rgb(32 38 32 / 72%), rgb(32 38 32 / 0%));
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.train-lead img { height: 22rem; }

.train-grid .photo-card:not(.train-lead) img { height: 16rem; }

@media (min-width: 800px) {
  .train-grid {
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.1rem;
    min-height: 38rem;
  }

  .train-lead {
    grid-row: 1 / span 2;
  }

  .train-lead img,
  .train-grid .photo-card:not(.train-lead) img {
    height: 100%;
    min-height: 18rem;
  }
}

.program {
  display: grid;
  gap: 0;
  align-items: center;
  background: var(--sage-chalk);
  padding: 0;
  overflow: hidden;
}

.program img {
  width: 100%;
  height: clamp(16rem, 42vw, 28rem);
  object-fit: cover;
}

.program-copy {
  padding: 2.5rem var(--page-pad) 3rem;
}

@media (min-width: 900px) {
  .program {
    grid-template-columns: 1.15fr 0.95fr;
    padding-inline-end: var(--page-pad);
  }

  .program img {
    height: 100%;
    min-height: 28rem;
  }

  .program-copy {
    padding: 3rem 0 3rem clamp(1.75rem, 4vw, 3.5rem);
  }
}

.app {
  display: grid;
  gap: 2.5rem;
  background: var(--sage-dark-background);
  color: var(--sage-chalk);
}

.app h2,
.app .eyebrow { color: var(--sage-chalk); }

.app p {
  margin: 0.7rem 0 0;
  color: var(--sage-dark-link);
  max-width: var(--measure);
}

.app-copy,
.app-device {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.device {
  margin: 0 auto;
  width: min(17.5rem, 78vw);
  padding: 0.55rem;
  background: #111411;
  border-radius: 2.1rem;
  box-shadow: var(--shadow);
  user-select: none;
  pointer-events: none;
}

.device img {
  width: 100%;
  border-radius: 1.55rem;
}

@media (min-width: 880px) {
  .app {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .device { margin-inline: 0 1rem; }
}

.plans-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .plans-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
  }
}

.plan {
  margin: 0;
  padding: 1.6rem 1.5rem 1.5rem;
  background: var(--sage-chalk);
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.plan p { margin: 0; color: var(--sage-muted); }

.plan .btn { margin-top: 0.9rem; align-self: start; }

.plan-year {
  background: var(--sage-sage);
}

.plan-year h3,
.plan-year p { color: var(--sage-on-sage); }

.price-pending {
  font-size: 0.95rem;
}

.faq-section .section-intro,
.faq-section .faq {
  width: min(100%, 44rem);
  margin-inline: auto;
}

.faq {
  max-width: 44rem;
}

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

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.02em;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  font-weight: 500;
  color: var(--sage-muted);
  transform: rotate(0deg);
  transition: transform 150ms var(--ease-out);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer p {
  margin: 0.7rem 0 0.2rem;
  color: var(--sage-muted);
  max-width: 38rem;
  opacity: 0;
  translate: 0 6px;
}

.faq details[open] .faq-answer p {
  opacity: 1;
  translate: 0;
}

html[data-motion="ready"] .faq-answer p {
  transition:
    opacity 200ms var(--ease-out),
    translate 200ms var(--ease-out);
}

.close {
  text-align: start;
  background: var(--sage-charcoal);
  color: var(--sage-chalk);
}

.close h2 { color: var(--sage-chalk); }

.close p {
  margin: 0.7rem 0 1.4rem;
  color: color-mix(in srgb, var(--sage-chalk) 78%, var(--sage-sage));
  max-width: var(--measure);
}

@media (hover: hover) and (pointer: fine) {
  .hero-photo img,
  .class-band img,
  .photo-card img,
  .program img {
    transition: transform 400ms var(--ease-move);
  }

  .hero-photo:hover img,
  .class-band:hover img,
  .photo-card:hover img,
  .program:hover img {
    transform: scale(1.035);
  }
}
