/* =========================================================
   CrossFit Mercia | Brand Stylesheet
   Navy #132341 | Gold #C8A24A | Grey #5B6670 | White #F4F4F4
   Fonts: Bebas Neue (headlines) | Montserrat (body)
   ========================================================= */

:root {
  --navy:  #132341;
  --gold:  #C8A24A;
  --grey:  #5B6670;
  --stone: #F4F4F4;
  --white: #ffffff;
  --black: #0b1828;
  --nav-h: 72px;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Montserrat', sans-serif; background: var(--white); color: var(--navy); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.02em; line-height: 1.05; }
h1 { font-size: clamp(2.8rem, 8vw, 7rem); }
h2 { font-size: clamp(2rem, 5vw, 4rem); }
h3 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
p  { line-height: 1.75; color: var(--grey); }
strong { font-weight: 600; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-gold:hover { background: transparent; color: var(--gold); }
.btn-outline-white { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline-white:hover { background: var(--white); color: var(--navy); }
.btn-outline-navy { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }
.btn-navy { background: var(--navy); border-color: var(--navy); color: var(--stone); }
.btn-navy:hover { background: transparent; color: var(--navy); }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(19, 35, 65, 0.97);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6%;
  z-index: 1000;
  border-bottom: 1px solid rgba(200, 162, 74, 0.25);
}
.nav-logo img { height: 38px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--stone);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links .btn { padding: 10px 22px; font-size: 0.9rem; margin-left: 0.5rem; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--stone); transition: all 0.3s; }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 6%;
    gap: 1.5rem;
    border-top: 1px solid rgba(200,162,74,0.25);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.4rem; }
  .nav-links .btn { margin-left: 0; }
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(19,35,65,0.80) 0%,
    rgba(19,35,65,0.55) 45%,
    rgba(19,35,65,0.90) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
  padding: 0 6%;
}
.hero-eyebrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}
.hero h1 { color: var(--white); margin-bottom: 1.5rem; }
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 500;
  color: rgba(244,244,244,0.85);
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(244,244,244,0.8);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  animation: nudge 2.4s ease-in-out infinite;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(200,162,74,0.6), transparent);
}
@keyframes nudge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* --- Page hero (inner pages) --- */
.page-hero {
  background: var(--navy);
  padding: calc(var(--nav-h) + 3rem) 6% 3rem;
}
.page-hero .label { color: var(--gold); }
.page-hero h1 { color: var(--stone); margin-top: 0.5rem; }
.page-hero p {
  color: rgba(244,244,244,0.7);
  margin-top: 1.25rem;
  max-width: 580px;
  font-size: 1.05rem;
}

/* --- Sections --- */
.section { padding: 4.5rem 6%; }
.section-sm { padding: 3rem 6%; }
.section-navy { background: var(--navy); }
.section-navy h2, .section-navy h3 { color: var(--stone); }
.section-navy p { color: rgba(244,244,244,0.72); }
.section-stone { background: var(--stone); }
.section-black { background: var(--black); }
.section-black h2, .section-black h3 { color: var(--stone); }
.section-black p { color: rgba(244,244,244,0.6); }

.label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  display: block;
  margin-bottom: 0.6rem;
}
.section-intro { max-width: 620px; font-size: 1.05rem; margin-bottom: 3rem; }
.text-center { text-align: center; }
.text-center .section-intro { margin-left: auto; margin-right: auto; }

/* --- Brand pillars --- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.pillar {
  padding: 2.5rem 2rem;
  border-top: 2px solid var(--gold);
  background: rgba(255,255,255,0.04);
}
.section-stone .pillar { background: var(--white); }
.pillar-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: var(--gold);
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.pillar h3 { margin-bottom: 0.8rem; font-size: 1.8rem; }
.section-navy .pillar h3 { color: var(--stone); }
.pillar p { font-size: 0.95rem; }

/* --- Stats bar --- */
.stats-bar {
  background: var(--gold);
  padding: 3.5rem 6%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  text-align: center;
}
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: var(--navy);
  line-height: 1;
  display: block;
}
.stat-lbl {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(19,35,65,0.7);
  margin-top: 0.25rem;
  display: block;
}

/* --- Heritage quote band --- */
.heritage-band {
  background: var(--navy);
  padding: 4rem 6%;
  border-top: 3px solid var(--gold);
}
.heritage-quote {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.2rem, 6vw, 5.5rem);
  color: var(--stone);
  line-height: 1.05;
  max-width: 900px;
}
.heritage-quote span { color: var(--gold); }
.heritage-body {
  max-width: 560px;
  margin-top: 2rem;
  color: rgba(244,244,244,0.7);
  font-size: 1.05rem;
}

/* --- Two-col layout --- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.two-col-img { width: 100%; height: 480px; object-fit: cover; object-position: center; }
@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .two-col-img { height: 320px; }
}

/* --- Photo grid --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 4px;
}
.photo-grid img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.photo-grid .wide { grid-column: span 2; }
@media (max-width: 640px) {
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid .wide { grid-column: span 1; }
}

/* --- Class type cards --- */
.classes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; }
@media (max-width: 980px) { .classes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .classes-grid { grid-template-columns: 1fr; } }
.class-card {
  background: var(--navy);
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}
.class-card:hover { transform: translateY(-3px); }
.class-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.class-card:hover::after { transform: scaleX(1); }
.class-tag {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  border: 1px solid rgba(200,162,74,0.4);
  padding: 3px 10px;
  display: inline-block;
  margin-bottom: 1.25rem;
}
.class-card h3 { color: var(--stone); margin-bottom: 0.75rem; font-size: 1.6rem; }
.class-card p { color: rgba(244,244,244,0.65); font-size: 0.9rem; line-height: 1.65; }

/* --- TeamUp timetable --- */
.teamup-section { background: var(--stone); }
.teamup-wrapper { padding: 2rem 0; min-height: 500px; }

/* --- Coach cards --- */
.coaches-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
@media (max-width: 900px) { .coaches-grid { grid-template-columns: 1fr; } }
.coach-card { display: flex; flex-direction: column; }
.coach-info { flex: 1; }
.coach-card img { width: 100%; height: 380px; object-fit: cover; object-position: top; }
.coach-info { background: var(--navy); padding: 1.75rem; }
.coach-info h3 { color: var(--stone); font-size: 1.8rem; margin-bottom: 0.25rem; }
.coach-role { font-family: 'Bebas Neue', sans-serif; font-size: 0.85rem; letter-spacing: 0.15em; color: var(--gold); display: block; margin-bottom: 0.8rem; }
.coach-bio { font-size: 0.9rem; color: rgba(244,244,244,0.65); line-height: 1.65; }

/* --- Pricing cards --- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 2rem; margin-top: 3rem; align-items: start; }
.price-card {
  border: 2px solid rgba(19,35,65,0.12);
  padding: 2.5rem 2rem;
  position: relative;
  transition: border-color 0.2s;
}
.price-card:hover { border-color: rgba(19,35,65,0.3); }
.price-card.featured { border-color: var(--gold); background: var(--navy); }
.price-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--navy);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  padding: 4px 16px;
  white-space: nowrap;
}
.price-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--grey);
}
.price-card.featured .price-name { color: rgba(244,244,244,0.6); }
.price-amount {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: var(--navy);
  line-height: 1;
  margin: 0.5rem 0 0.2rem;
}
.price-card.featured .price-amount { color: var(--gold); }
.price-period { font-size: 0.82rem; color: var(--grey); margin-bottom: 2rem; }
.price-card.featured .price-period { color: rgba(244,244,244,0.55); }
.price-features li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(19,35,65,0.08);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.price-card.featured .price-features li { border-color: rgba(255,255,255,0.1); color: rgba(244,244,244,0.8); }
.price-features li::before { content: '✓'; color: var(--gold); font-weight: 700; flex-shrink: 0; }
.price-card h3 { font-size: 1.6rem; }
.price-features { margin-bottom: 2.5rem; }

/* --- Shop / products --- */
.shop-products-section { border-top: 3px solid var(--gold); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.shop-card { border: 2px solid rgba(19,35,65,0.12); transition: border-color 0.2s; }
.shop-card:hover { border-color: rgba(19,35,65,0.3); }
.shop-card-info { padding: 1.75rem; }
.shop-card-info h3 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.shop-card-buy { margin-top: 0.5rem; }

/* --- CTA band --- */
.cta-band {
  background: var(--navy);
  padding: 4.5rem 6%;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.cta-band h2 { color: var(--stone); margin-bottom: 1rem; }
.cta-band p { color: rgba(244,244,244,0.7); margin-bottom: 2.5rem; max-width: 520px; margin-left: auto; margin-right: auto; font-size: 1.05rem; }
.cta-band .btn-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- Footer --- */
.footer { background: var(--black); padding: 5rem 6% 2.5rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.footer-brand img { height: 34px; margin-bottom: 1.25rem; }
.footer-brand p { font-size: 0.88rem; color: rgba(244,244,244,0.5); max-width: 260px; line-height: 1.75; }
.footer-col-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--stone);
  margin-bottom: 1.1rem;
  display: block;
}
.footer-links li { margin-bottom: 0.55rem; }
.footer-links a { font-size: 0.88rem; color: rgba(244,244,244,0.5); transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: rgba(244,244,244,0.35);
}
.footer-bottom a { color: rgba(200,162,74,0.7); }

/* --- Intro section on homepage --- */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
@media (max-width: 820px) { .intro-grid { grid-template-columns: 1fr; gap: 2rem; } }
.intro-text h2 { margin-bottom: 1.25rem; }
.intro-text p { margin-bottom: 1.5rem; }
.intro-image img { width: 100%; height: 500px; object-fit: cover; }

/* --- Gallery strip --- */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  height: 280px;
  overflow: hidden;
  gap: 3px;
}
.gallery-strip img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
@media (max-width: 640px) { .gallery-strip { grid-template-columns: repeat(3, 1fr); height: 200px; } }

/* --- Divider line --- */
.gold-rule { border: none; border-top: 2px solid var(--gold); opacity: 0.3; margin: 2rem 0; }

/* --- Contact detail links (Find Us section) --- */
.contact-link { color: var(--grey); transition: color 0.2s; }
.contact-link:hover { color: var(--navy); }

/* --- Social icon links in footer --- */
.footer-social-row { display: flex; gap: 0.75rem; align-items: center; }
.footer-social-link { display: inline-flex; align-items: center; color: rgba(244,244,244,0.5); transition: color 0.2s; }
.footer-social-link:hover { color: var(--gold); }
.footer-social-link svg { display: block; }

/* --- Misc --- */
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 3rem; }

/* --- Logo placements --- */
.hero-logo { display: block; height: 120px; width: auto; margin: 0 auto 1.25rem; }
.block-logo { display: block; height: 64px; width: auto; margin-bottom: 1.5rem; }

/* --- Free first class code --- */
.free-code {
  max-width: 620px;
  margin: 0 auto 2rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
  background: var(--navy);
  color: var(--stone);
  border: 2px solid var(--gold);
  border-radius: 4px;
}
.free-code-label { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.2em; color: var(--gold); font-size: 1rem; }
.free-code p { margin: 0.35rem 0 0; color: var(--stone); }
.free-code-value { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; letter-spacing: 0.1em; color: var(--gold); }

/* --- Classes: get started options --- */
.start-options { display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; max-width:980px; margin:3rem auto 0; }
.start-card { background:var(--navy); color:var(--stone); border-top:3px solid var(--gold); padding:2.25rem 2rem; display:flex; flex-direction:column; align-items:flex-start; }
.start-card h3 { color:var(--white); font-size:2rem; margin:0.4rem 0 0.75rem; }
.start-card p { color:rgba(244,244,244,0.85); margin-bottom:1.25rem; }
.start-card .start-note { font-size:0.9rem; color:var(--gold); margin-top:auto; padding-top:0.5rem; }
.start-card .btn { margin-top:1rem; }
.start-stack { display:flex; flex-direction:column; gap:1rem; margin-top:1.5rem; }
.start-stack .start-card { padding:1.5rem 1.5rem; }
.start-stack .start-card h3 { font-size:1.7rem; margin:0.3rem 0 0.5rem; }
.start-stack .start-card p { margin-bottom:0.5rem; font-size:0.95rem; }
@media (max-width:820px) { .start-options { grid-template-columns:1fr; } }

/* --- Nav: tighter spacing so the longer button labels fit on mid-size screens --- */
@media (min-width: 821px) and (max-width: 1180px) {
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: 0.95rem; letter-spacing: 0.06em; }
  .nav-links .btn { padding: 8px 12px; font-size: 0.8rem; margin-left: 0; }
}

/* --- Classes: photo matches the height of the two option boxes --- */
.start-grid { align-items: stretch; margin-top: 2.5rem; }
.start-grid .start-stack { margin-top: 0; }
.start-photo { position: relative; min-height: 320px; }
.start-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (max-width: 820px) { .start-photo { height: 320px; } }

/* --- Mobile fixes --- */
@media (max-width: 820px) {
  /* inline gap:4rem/5rem on some .two-col blocks was beating the mobile gap */
  .two-col { gap: 2.5rem !important; }
}
@media (max-width: 640px) {
  /* gallery strip: two readable rows instead of two 100px slivers */
  .gallery-strip { height: auto; grid-auto-rows: 150px; overflow: visible; }
  .gallery-strip img:nth-child(5) { grid-column: span 2; }
}

/* --- Mobile hero: logo + three buttons + scroll cue must fit a phone screen --- */
@media (max-width: 640px) {
  .hero-logo { height: 80px; margin-bottom: 0.75rem; }
  .hero-eyebrow { letter-spacing: 0.2em; font-size: 0.9rem; }
  .hero h1 { margin-bottom: 1rem; }
  .hero-subtitle { margin-bottom: 1.5rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .hero-ctas .btn { width: 100%; text-align: center; }
  .hero-scroll { font-size: 0.9rem; bottom: 1rem; }
  .hero-scroll::after { height: 28px; }
}
@media (max-width: 640px) and (max-height: 700px) { .hero-scroll { display: none; } }

/* --- Mobile: stats bar as 2 columns, with the odd fifth stat centred on its own row --- */
@media (max-width: 640px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stats-bar > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* --- Hero: keep content clear of the scroll cue at every size --- */
.hero { padding-bottom: 5.5rem; }
@media (max-width: 640px) { .hero { padding-bottom: 4rem; } }
/* short screens (phones in landscape, small windows): no room for the cue */
@media (max-height: 760px) { .hero-scroll { display: none; } }
