/* ---------------------------------------------------------
   Motion - strength training gym
   Design tokens
--------------------------------------------------------- */
:root {
  --black: #000;
  --surface-1: #0d0d0d;
  --surface-2: #141414;
  --surface-3: #1c1c1c;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.5);
  --white: #fff;
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-body: rgba(255, 255, 255, 0.68);
  --text-muted: rgba(255, 255, 255, 0.52);

  --font-sans: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;

  --nav-height: 76px;
  --container: 1280px;
  --gutter: clamp(1.5rem, 5vw, 4rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------------------------------------------------
   Reset
--------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

body {
  background: var(--black);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

::selection {
  background: var(--white);
  color: var(--black);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.section-head h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.section-head p {
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 46ch;
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

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

.btn-solid {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--white);
}

.btn-solid:hover {
  background: transparent;
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.btn-block {
  width: 100%;
}

/* ---------------------------------------------------------
   Navigation
--------------------------------------------------------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

.nav.is-scrolled {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.nav__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__links a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  position: relative;
  padding-bottom: 4px;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width 0.3s var(--ease-out);
}

.nav__links a:hover {
  color: var(--white);
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__links .btn-solid {
  display: none;
}

.nav__cta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav .btn-ghost {
  padding: 0.7rem 1.5rem;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  z-index: 110;
}

.nav__toggle span {
  height: 1px;
  width: 100%;
  background: var(--white);
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 30%;
  transform: scale(1.08);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 30%, rgba(0, 0, 0, 0.85) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 55%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-top: var(--nav-height);
}

.hero__body {
  max-width: 620px;
}

.hero__body h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1.75rem;
}

.hero__body p {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.78);
  max-width: 46ch;
  margin-bottom: 2.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* ---------------------------------------------------------
   Programs
--------------------------------------------------------- */
.programs {
  padding-block: clamp(5rem, 10vw, 8rem);
  background: var(--black);
}

.programs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.program-card {
  background: var(--surface-1);
  padding: clamp(2rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 340px;
  position: relative;
}

.program-card--featured {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 100%;
  background-size: cover;
  background-position: center;
}

.program-card--image {
  background-size: cover;
  background-position: center;
}

.program-card--image::before,
.program-card--featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.88) 100%);
}

.program-card__index {
  position: relative;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: auto;
}

.program-card__body {
  position: relative;
}

.program-card__body h3 {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.program-card__body p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
  max-width: 34ch;
}

/* ---------------------------------------------------------
   Membership
--------------------------------------------------------- */
.membership {
  padding-block: clamp(5rem, 10vw, 8rem);
  background: var(--surface-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.membership__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tier {
  border: 1px solid var(--line);
  padding: clamp(2rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
  background: var(--black);
}

.tier--featured {
  border-color: var(--white);
  background: var(--surface-2);
  transform: translateY(-0.5rem);
}

.tier__badge {
  align-self: flex-start;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--white);
  padding: 0.3rem 0.65rem;
  margin-bottom: 1.5rem;
}

.tier__name {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tier__price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.tier__price .amount {
  font-size: clamp(2.5rem, 4vw, 3.25rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.tier__price .period {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.tier__features {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
  flex-grow: 1;
}

.tier__features li {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.tier__features li:first-child {
  border-top: none;
  padding-top: 0;
}

/* ---------------------------------------------------------
   Locations
--------------------------------------------------------- */
.locations {
  padding-block: clamp(5rem, 10vw, 8rem);
  background: var(--black);
}

.locations__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.locations__list {
  display: flex;
  flex-direction: column;
}

.location-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}

.location-item:last-child {
  border-bottom: 1px solid var(--line);
}

.location-item__info h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.location-item__info p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.location-item .btn-ghost {
  padding: 0.75rem 1.5rem;
}

.locations__media {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface-1);
}

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

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.site-footer {
  background: var(--black);
  border-top: 1px solid var(--line);
  padding-block: clamp(3.5rem, 7vw, 5rem) 2rem;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.footer__brand .nav__logo {
  display: block;
  margin-bottom: 1.25rem;
}

.footer__brand p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 32ch;
}

.footer__heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer__col a,
.footer__col address {
  font-size: 0.9375rem;
  font-style: normal;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s var(--ease-out);
}

.footer__col a:hover {
  color: var(--white);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer__bottom a {
  color: var(--text-muted);
  transition: color 0.2s var(--ease-out);
}

.footer__bottom a:hover {
  color: var(--white);
}

/* ---------------------------------------------------------
   Scroll-reveal base state (GSAP toggles .is-visible)
--------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 1024px) {
  .programs__grid {
    grid-template-columns: 1fr 1fr;
  }

  .program-card--featured {
    grid-column: span 2;
    min-height: 380px;
  }

  .membership__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .tier--featured {
    transform: none;
    order: -1;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
    row-gap: 2.5rem;
  }
}

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

  .locations__media {
    position: static;
    aspect-ratio: 16 / 10;
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    inset: 0;
    top: var(--nav-height);
    height: calc(100dvh - var(--nav-height));
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    padding: 2.5rem var(--gutter);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
  }

  .nav__links.is-open {
    transform: translateX(0);
  }

  .nav__links a {
    font-size: 1.5rem;
  }

  .nav__cta .btn-ghost {
    display: none;
  }

  .nav__links .btn-solid {
    display: inline-flex;
    margin-top: 1rem;
  }

  .nav__toggle {
    display: flex;
  }

  .programs__grid {
    grid-template-columns: 1fr;
  }

  .program-card--featured {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 320px;
  }

  .footer__top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-height: 68px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .location-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
