/* ─────────────────────────────────────────────────────────────────────────────
   APEX FITNESS – Demo Site Styles
   ───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

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

:root {
  --brand:        #FD4F34;
  --brand-dark:   #d93d24;
  --dark:         #111111;
  --mid:          #2D2D2D;
  --muted:        #6B7280;
  --light-bg:     #F5F5F5;
  --white:        #FFFFFF;
  --border:       rgba(0,0,0,0.10);
  --font:         'Inter', sans-serif;
  --page-max:     1280px;
  --nav-height:   68px;
  --radius:       8px;
  --section-py:   80px;
}

/* ── CodexFit component theme tokens ── */
:root {
  --c-btn-background-color:  var(--brand);
  --c-btn-border-color:      var(--brand);
  --c-btn-text-color:        #ffffff;
  --c-checkbox-color:        var(--brand);
  --c-bookmark-color:        var(--brand);
  --c-bookmark-border-width: 0;
  --c-heading-font-family:   var(--font);
  --c-body-font-family:      var(--font);
  --c-card-border-radius:    var(--radius);
  --c-btn-border-radius:     var(--radius);
  --c-input-border-radius:   var(--radius);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--mid);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ─── UTILITY ──────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  text-align: center;
  line-height: 1.4;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-secondary:hover { background: var(--white); color: var(--dark); }

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline:hover { background: var(--brand); color: #fff; }

.btn-dark {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}
.btn-dark:hover { background: #333; border-color: #333; }

.section {
  padding: var(--section-py) 0;
}
.section--gray { background: var(--light-bg); }

/* ─── NAVIGATION ────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo-mark {
  width: 34px;
  height: 34px;
  background: var(--brand);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}
.nav-logo-text {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}
.nav-links a {
  display: block;
  padding: 8px 14px;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.nav-links a.active { color: var(--brand); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: rgba(255,255,255,0.75);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 20px;
}
.nav-icon-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-icon-btn i { pointer-events: none; }

.nav-join-btn {
  margin-left: 8px;
  padding: 8px 18px;
  font-size: 13px;
}

/* Mobile nav toggle */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 6px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s;
}

/* ─── PAGE HERO ──────────────────────────────────────────────────────────────── */
.page-hero {
  background: var(--dark);
  color: #fff;
  padding: 56px 0 48px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.page-hero .container { display: flex; flex-direction: column; gap: 12px; }
.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}
.page-hero__eyebrow i { font-size: 14px; }
.page-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.page-hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
}

/* ─── HOME HERO ──────────────────────────────────────────────────────────────── */
.home-hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
}
.home-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=1600&q=80');
  background-size: cover;
  background-position: center 30%;
  opacity: 0.25;
}
.home-hero__content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 680px;
}
.home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 20px;
}
.home-hero__eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--brand);
}
.home-hero h1 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.home-hero h1 span { color: var(--brand); }
.home-hero p {
  font-size: clamp(16px, 2vw, 18px);
  color: rgba(255,255,255,0.7);
  margin-bottom: 40px;
  line-height: 1.7;
}
.home-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.home-hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}
.home-hero__scroll i { font-size: 18px; animation: bounce 2s infinite; }

@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ─── STATS BAR ─────────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--brand);
  padding: 20px 0;
}
.stats-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
}
.stat-item__num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.stat-item__label {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── FEATURES GRID ─────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.feature-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
  transform: translateY(-3px);
}
.feature-card__img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
}
.feature-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feature-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(253,79,52,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--brand);
  margin-bottom: 4px;
}
.feature-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}
.feature-card__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}
.feature-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  margin-top: 8px;
}

/* ─── SECTION HEADER ─────────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}
.section-header__text { flex: 1; }
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.section-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
  max-width: 540px;
}

/* ─── CLASS TYPES GRID ──────────────────────────────────────────────────────── */
.classes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.class-card {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 3/4;
  cursor: pointer;
}
.class-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.class-card:hover .class-card__img { transform: scale(1.05); }
.class-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
}
.class-card__label {
  position: absolute;
  bottom: 20px;
  left: 16px;
  right: 16px;
  color: #fff;
}
.class-card__label h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
.class-card__label p {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 3px;
}
.class-card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── TESTIMONIALS ───────────────────────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.testimonial-stars {
  display: flex;
  gap: 3px;
  color: #FFAB1F;
  font-size: 14px;
}
.testimonial-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--mid);
  flex: 1;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.testimonial-author__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.testimonial-author__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}
.testimonial-author__role {
  font-size: 12px;
  color: var(--muted);
}

/* ─── CTA BAND ───────────────────────────────────────────────────────────────── */
.cta-band {
  background: var(--dark);
  color: #fff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: 'APEX';
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 200px;
  font-weight: 900;
  color: rgba(255,255,255,0.03);
  pointer-events: none;
  line-height: 1;
  letter-spacing: -0.05em;
}
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.cta-band__text {}
.cta-band h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.cta-band h2 span { color: var(--brand); }
.cta-band p {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  max-width: 480px;
}
.cta-band__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* ─── ABOUT SECTION ───────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-img-wrap {
  position: relative;
}
.about-img-main {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 4/3;
}
.about-img-accent {
  position: absolute;
  bottom: -24px;
  right: -24px;
  width: 45%;
  border-radius: 10px;
  border: 4px solid var(--white);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  aspect-ratio: 1;
  object-fit: cover;
}
.about-content { display: flex; flex-direction: column; gap: 20px; }
.about-content p { font-size: 16px; line-height: 1.8; color: var(--muted); }
.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
}
.about-list i {
  color: var(--brand);
  font-size: 18px;
  flex-shrink: 0;
}

/* ─── CODEX SECTION WRAPPER ──────────────────────────────────────────────────── */
.codex-section {
  padding: 64px 0;
}
.codex-section--wide { max-width: 100%; }

.codex-container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Stretch the codex component to fill */
[data-codex] {
  width: 100%;
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.65);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand {}
.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 280px;
  color: rgba(255,255,255,0.5);
}
.footer-socials {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  transition: background 0.2s, color 0.2s;
}
.footer-social-link:hover { background: var(--brand); color: #fff; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.3); }
.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  transition: color 0.2s;
}
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ─── ACCOUNT PAGE ──────────────────────────────────────────────────────────── */
.account-section {
  min-height: calc(100vh - var(--nav-height));
  padding: 0;
}
.account-section [data-codex] {
  min-height: calc(100vh - var(--nav-height));
}

/* ─── INSTRUCTOR / EVENT DETAIL ─────────────────────────────────────────────── */
.detail-section {
  padding: 48px 0 80px;
}

/* ─── NOTICE BANNER ──────────────────────────────────────────────────────────── */
.notice-banner {
  background: rgba(253,79,52,0.08);
  border-bottom: 1px solid rgba(253,79,52,0.15);
  padding: 12px 0;
  font-size: 13px;
  color: var(--mid);
  text-align: center;
}
.notice-banner strong { color: var(--brand); }
.notice-banner code {
  background: rgba(253,79,52,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  color: var(--brand-dark);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .classes-grid  { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-img-accent { display: none; }
  .cta-band .container { flex-direction: column; text-align: center; }
  .cta-band__actions { justify-content: center; }
}

@media (max-width: 768px) {
  :root { --section-py: 56px; }

  .nav-links, .nav-join-btn { display: none; }
  .nav-hamburger { display: flex; }

  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .classes-grid  { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .home-hero__actions { flex-direction: column; }
  .classes-grid { grid-template-columns: 1fr; }
  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }
}
