:root {
  color-scheme: dark;
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  letter-spacing: 0;
  background: #0c0d0b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #f8f5ec;
  background: #0c0d0b;
}

button,
input,
select {
  font: inherit;
}

button {
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

.fitness-site {
  --ink: #141614;
  --paper: #fbf8ed;
  --paper-soft: #eee8d9;
  --text: #f8f5ec;
  --muted: rgba(248, 245, 236, 0.72);
  --line: rgba(248, 245, 236, 0.16);
  --dark: #0c0d0b;
  --charcoal: #171b18;
  --lime: #c9ff3d;
  --green: #43d979;
  --amber: #f0b94c;
  --rust: #d96645;
  --sky: #86c7ff;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--dark);
  color: var(--text);
}

.site-top-wrap {
  position: fixed;
  top: 16px;
  right: 0;
  left: 0;
  z-index: 80;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.site-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(248, 245, 236, 0.16);
  border-radius: 8px;
  background: rgba(12, 13, 11, 0.74);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  transition: min-height 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.fitness-site.is-scrolled .site-top {
  min-height: 62px;
  background: rgba(12, 13, 11, 0.88);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.site-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: #11140d;
  background: var(--lime);
  box-shadow: 0 14px 34px rgba(201, 255, 61, 0.2);
  font-weight: 950;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 17px;
  font-weight: 950;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.site-links,
.site-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-links {
  justify-content: center;
  color: rgba(248, 245, 236, 0.72);
  font-size: 15px;
}

.site-links a {
  padding: 10px 8px;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-links a:hover,
.site-links a.is-active {
  color: var(--lime);
}

.site-actions {
  justify-content: flex-end;
}

.site-phone,
.site-cta,
.site-admin,
.btn,
.trial-form button,
.price-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(248, 245, 236, 0.16);
  border-radius: 999px;
  color: var(--text);
  background: rgba(248, 245, 236, 0.08);
  text-decoration: none;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.site-cta,
.site-admin,
.btn.primary,
.trial-form button,
.price-card.featured a {
  color: #11140d;
  border-color: transparent;
  background: var(--lime);
  box-shadow: 0 16px 38px rgba(201, 255, 61, 0.2);
}

.site-phone,
.btn.ghost,
.price-card a {
  color: var(--text);
  background: rgba(248, 245, 236, 0.1);
}

.site-cta:hover,
.site-phone:hover,
.site-admin:hover,
.btn:hover,
.trial-form button:hover,
.price-card a:hover,
.back-top:hover {
  transform: translateY(-2px);
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: calc(100svh - 118px);
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-media img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -2;
  background: #111;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 10, 9, 0.9) 0%, rgba(8, 10, 9, 0.68) 38%, rgba(8, 10, 9, 0.18) 72%, rgba(8, 10, 9, 0.08) 100%),
    linear-gradient(180deg, rgba(8, 10, 9, 0.42) 0%, rgba(8, 10, 9, 0.1) 46%, rgba(8, 10, 9, 0.74) 100%);
}

.hero-copy {
  width: min(860px, 100%);
  padding: clamp(112px, 10vw, 148px) clamp(22px, 6vw, 88px) clamp(32px, 5vw, 60px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--text);
  font-size: clamp(46px, 7.4vw, 96px);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(248, 245, 236, 0.86);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 700px;
  margin: 34px 0 0;
}

.hero-stats div {
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(248, 245, 236, 0.18);
  border-radius: 8px;
  background: rgba(248, 245, 236, 0.08);
  backdrop-filter: blur(14px);
}

.hero-stats dt {
  color: rgba(248, 245, 236, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.hero-stats dd {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
}

.opening-strip,
.section,
.site-footer {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.opening-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid rgba(248, 245, 236, 0.12);
  border-radius: 8px;
  background: rgba(248, 245, 236, 0.12);
  box-shadow: var(--shadow);
}

.opening-strip div {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 18px;
  background: #171b18;
}

.opening-strip strong {
  color: var(--lime);
  font-size: 15px;
}

.opening-strip span {
  color: var(--muted);
  line-height: 1.55;
}

.section {
  padding: clamp(72px, 8vw, 116px) 0 0;
  scroll-margin-top: 110px;
}

.section-light {
  color: var(--ink);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 72px);
  align-items: end;
  margin-bottom: 28px;
}

.section-heading.compact {
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 1fr);
}

.section-light .section-heading,
.section-light .program-grid,
.section-light .filter-row,
.section-light .class-grid {
  color: var(--ink);
}

.section-heading h2,
.space-copy h2,
.builder-panel h2,
.summary-panel h2 {
  margin: 10px 0 0;
  font-size: clamp(34px, 5vw, 72px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.section-heading p,
.space-copy p,
.builder-panel p,
.summary-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.section-light .section-heading {
  padding: clamp(24px, 4vw, 44px);
  border-radius: 8px;
  background: var(--paper);
}

.section-light .section-heading p {
  color: #596055;
}

.section-light .eyebrow {
  color: #47720d;
}

.program-grid,
.class-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.program-card,
.class-card,
.price-card,
.builder-panel,
.summary-panel,
.space-copy,
.space-photo {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.program-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 300px;
  padding: 22px;
  color: var(--ink);
  border: 1px solid rgba(20, 22, 20, 0.12);
  background: var(--paper);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.program-card:hover,
.class-card:hover,
.price-card:hover {
  transform: translateY(-6px);
}

.program-card span,
.class-card span,
.price-card span {
  color: #47720d;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.program-card h3,
.class-card h3,
.price-card h3 {
  margin: 16px 0 0;
  font-size: 27px;
  line-height: 1.1;
}

.program-card p,
.class-card p,
.price-card p {
  margin: 14px 0 0;
  color: #596055;
  line-height: 1.72;
}

.program-card strong {
  margin-top: 22px;
  color: #11140d;
  font-size: 17px;
}

.training-system {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(480px, 1fr);
  gap: 18px;
}

.space-copy {
  display: grid;
  align-content: center;
  min-height: 520px;
  padding: clamp(26px, 4vw, 52px);
  border: 1px solid rgba(248, 245, 236, 0.14);
  background: #171b18;
}

.space-copy p {
  margin-top: 22px;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  color: rgba(248, 245, 236, 0.76);
  line-height: 1.7;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
}

.space-photo {
  min-height: 520px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(248, 245, 236, 0.14);
  background: #111;
}

.space-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% center;
  transition: transform 900ms ease;
}

.space-photo:hover img {
  transform: scale(1.04);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-row button,
.segmented button {
  min-height: 42px;
  border: 1px solid rgba(20, 22, 20, 0.14);
  border-radius: 999px;
  padding: 0 15px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.filter-row button:hover,
.segmented button:hover {
  transform: translateY(-2px);
}

.filter-row button.is-active,
.segmented button.is-active {
  color: #11140d;
  border-color: transparent;
  background: var(--lime);
}

.class-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.class-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 240px;
  padding: 22px;
  color: var(--ink);
  border: 1px solid rgba(20, 22, 20, 0.12);
  background: var(--paper);
  transition: transform 220ms ease, opacity 180ms ease;
}

.class-card.is-hidden {
  display: none;
}

.class-card time {
  color: #8a4c1b;
  font-size: 14px;
  font-weight: 950;
}

.class-card span {
  width: fit-content;
  margin-top: 20px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #11140d;
  background: #f0b94c;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  min-height: 360px;
  padding: 24px;
  border: 1px solid rgba(248, 245, 236, 0.14);
  background: #171b18;
  transition: transform 220ms ease, border-color 220ms ease;
}

.price-card.featured {
  border-color: rgba(201, 255, 61, 0.72);
  background:
    linear-gradient(160deg, rgba(201, 255, 61, 0.12), transparent 50%),
    #171b18;
}

.price-card span {
  color: var(--amber);
}

.price-card strong {
  margin-top: 14px;
  color: var(--lime);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
}

.price-card p {
  color: var(--muted);
}

.price-card a {
  width: fit-content;
  margin-top: 24px;
}

.booking-section {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  gap: 18px;
}

.builder-panel,
.summary-panel {
  border: 1px solid rgba(248, 245, 236, 0.14);
  background: #171b18;
}

.builder-panel {
  padding: clamp(24px, 4vw, 46px);
}

.builder-panel > p {
  max-width: 780px;
  margin-top: 18px;
}

.builder-controls {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.control-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(248, 245, 236, 0.12);
  border-radius: 8px;
  background: rgba(248, 245, 236, 0.06);
}

.control-group strong {
  color: var(--text);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.segmented button {
  color: var(--text);
  border-color: rgba(248, 245, 236, 0.16);
  background: rgba(248, 245, 236, 0.08);
}

.trial-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 22px;
}

.trial-form label {
  display: grid;
  grid-column: span 2;
  gap: 8px;
  color: rgba(248, 245, 236, 0.72);
  font-size: 14px;
  font-weight: 900;
}

.trial-form .coach-field {
  grid-column: span 3;
}

.trial-form input,
.trial-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(248, 245, 236, 0.16);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(248, 245, 236, 0.08);
}

.trial-form input::placeholder {
  color: rgba(248, 245, 236, 0.42);
}

.trial-form select option {
  color: #11140d;
  background: #f8f5ec;
}

.trial-form button {
  grid-column: span 3;
  min-width: 154px;
  cursor: pointer;
}

.summary-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(24px, 4vw, 40px);
}

.summary-panel h2 {
  font-size: clamp(32px, 4vw, 54px);
}

.summary-panel dl {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(248, 245, 236, 0.12);
  border-radius: 8px;
  background: rgba(248, 245, 236, 0.12);
}

.summary-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 14px;
  background: rgba(248, 245, 236, 0.07);
}

.summary-panel dt {
  color: rgba(248, 245, 236, 0.6);
  font-weight: 900;
}

.summary-panel dd {
  margin: 0;
  text-align: right;
  font-weight: 950;
}

.progress-wrap {
  display: grid;
  gap: 10px;
}

.progress-wrap span {
  color: rgba(248, 245, 236, 0.7);
  font-weight: 900;
}

.progress-wrap div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(248, 245, 236, 0.12);
}

.progress-wrap i {
  display: block;
  width: 74%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), var(--green), var(--sky));
  transition: width 260ms ease;
}

.form-status {
  min-height: 52px;
  padding: 14px;
  border: 1px solid rgba(201, 255, 61, 0.26);
  border-radius: 8px;
  color: var(--lime) !important;
  background: rgba(201, 255, 61, 0.08);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(72px, 8vw, 112px);
  padding: 32px 0 52px;
  color: var(--muted);
  border-top: 1px solid rgba(248, 245, 236, 0.14);
}

.site-footer a {
  text-decoration: none;
  font-weight: 900;
}

.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #11140d;
  background: var(--lime);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 620ms ease, transform 620ms ease;
}

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

.site-phone:focus-visible,
.site-cta:focus-visible,
.site-admin:focus-visible,
.site-links a:focus-visible,
.btn:focus-visible,
.filter-row button:focus-visible,
.segmented button:focus-visible,
.trial-form input:focus,
.trial-form select:focus,
.trial-form button:focus-visible,
.price-card a:focus-visible,
.back-top:focus-visible {
  outline: 3px solid rgba(201, 255, 61, 0.28);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .site-top {
    grid-template-columns: 1fr auto;
  }

  .site-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .program-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-system,
  .booking-section,
  .section-heading,
  .section-heading.compact {
    grid-template-columns: 1fr;
  }

  .space-copy,
  .space-photo {
    min-height: 420px;
  }

  .trial-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trial-form label,
  .trial-form .coach-field {
    grid-column: span 1;
  }

  .trial-form button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 820px) {
  .site-top-wrap,
  .opening-strip,
  .section,
  .site-footer {
    width: min(100% - 24px, 1480px);
  }

  .site-top {
    gap: 12px;
  }

  .brand-copy strong {
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: end;
  }

  .site-phone {
    display: none;
  }

  .hero {
    min-height: calc(100svh - 84px);
  }

  .hero-media img {
    object-position: 62% center;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(8, 10, 9, 0.82) 0%, rgba(8, 10, 9, 0.58) 48%, rgba(8, 10, 9, 0.82) 100%);
  }

  .hero-copy {
    padding: 142px 20px 36px;
  }

  .hero h1 {
    font-size: clamp(42px, 14vw, 64px);
  }

  .hero-stats,
  .opening-strip,
  .program-grid,
  .class-grid,
  .pricing-grid,
  .trial-form {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-stats div {
    min-height: 72px;
    padding: 10px;
  }

  .hero-stats dt {
    font-size: 11px;
  }

  .hero-stats dd {
    margin-top: 6px;
    font-size: 15px;
  }

  .section-light .section-heading {
    padding: 22px;
  }

  .section-heading h2,
  .space-copy h2,
  .builder-panel h2,
  .summary-panel h2 {
    font-size: clamp(33px, 10vw, 48px);
  }

  .section-heading p,
  .space-copy p,
  .builder-panel p,
  .summary-panel p {
    font-size: 16px;
  }

  .space-copy,
  .space-photo {
    min-height: auto;
  }

  .space-photo {
    aspect-ratio: 4 / 3;
  }

  .segmented button,
  .filter-row button {
    flex: 1 1 auto;
  }

  .site-footer {
    flex-direction: column;
  }
}

@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;
  }
}
