/* =========================================================
   MUSCLEFIT GYM — STYLESHEET
   Design tokens live at the top. Change colors/fonts here
   and they update everywhere.
   ========================================================= */

:root {
  /* --- Color --- */
  --ink:        #131210;   /* near-black, warm iron */
  --ink-soft:   #1d1c19;
  --paper:      #F4F1E8;   /* warm off-white */
  --paper-dim:  #E7E2D4;
  --steel:      #565b66;   /* muted steel grey-blue */
  --steel-dim:  #8b8f97;
  --forge:      #D8302A;   /* forged red accent */
  --forge-dark: #A6221D;
  --line:       #2c2a25;   /* hairline on dark */
  --line-light: #ddd7c6;   /* hairline on light */

  /* --- Type --- */
  --font-display: 'Archivo Black', 'Archivo', sans-serif;
  --font-head:    'Archivo', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* --- Layout --- */
  --max-w: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 2px; /* near-zero radius: iron / hard-edge aesthetic */
}

/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--forge); outline-offset: 2px; }

.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }

h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-lead { max-width: 60ch; color: var(--steel); font-size: 1.05rem; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--forge); color: #fff; }
.btn-primary:hover { background: var(--forge-dark); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { border-color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline-light:hover { border-color: #fff; }
.btn-outline-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: var(--paper); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-soft); }
.btn-small { padding: 10px 18px; font-size: 0.85rem; }
.btn-full { width: 100%; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.971);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  background: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #37dc47;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}
/* Fallback styling if the <img> fails to load and shows its alt text */
.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.logo-img {
  height: 40px;
  width: auto;
  display: block;
}
.logo-img--footer { height: 55px; }
.logo span { color: var(--forge); }

.main-nav { display: flex; gap: 28px; }
.main-nav a {
  color: rgba(255,255,255,0.85);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { color: #fff; border-color: var(--forge); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: none; background: transparent;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 22px; height: 2px; background: #fff; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13,12,10,0.55) 0%, rgba(13,12,10,0.35) 35%, rgba(13,12,10,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 140px var(--pad) 72px;
  color: #fff;
}
.hero-eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--forge);
  font-size: 0.95rem;
  margin-bottom: 14px;
  opacity: 0;
  animation: reveal-up 0.7s ease 0.1s forwards;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.6vw, 4.6rem);
  line-height: 1.02;
  max-width: 15ch;
  margin-bottom: 22px;
  opacity: 0;
  animation: reveal-up 0.8s ease 0.22s forwards;
}
.hero-desc {
  max-width: 46ch;
  font-size: 1.08rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 32px;
  opacity: 0;
  animation: reveal-up 0.8s ease 0.36s forwards;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
  opacity: 0;
  animation: reveal-up 0.8s ease 0.48s forwards;
}
.hero-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  border-top: 1px solid rgba(255,255,255,0.18);
  padding-top: 22px;
  opacity: 0;
  animation: reveal-up 0.8s ease 0.6s forwards;
}
.hero-quicklinks a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  transition: color 0.15s ease;
}
.hero-quicklinks a:hover { color: var(--forge); }

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about { padding: 96px 0; background: var(--paper); }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.about-media img { width: 100%; height: 480px; object-fit: cover; }
.about-copy h2 { max-width: 14ch; }
.about-copy p { color: var(--steel); font-size: 1.05rem; max-width: 52ch; }
.about-goals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin: 28px 0 32px;
}
.about-goals li {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 0 12px 18px;
  border-left: 3px solid var(--forge);
}

/* =========================================================
   FACILITIES
   ========================================================= */
.facilities { padding: 96px 0; background: var(--ink); color: var(--paper); }
.facilities h2 { color: #fff; }
.facilities .section-lead { color: var(--steel-dim); margin-bottom: 48px; }
.facility-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.facility-card {
  background: var(--ink);
  padding: 32px 26px;
  transition: background 0.2s ease;
}
.facility-card:hover { background: var(--ink-soft); }
.facility-card--wide { grid-column: span 2; }
.facility-card svg { color: var(--forge); margin-bottom: 18px; }
.facility-card h3 { font-family: var(--font-head); font-size: 1.12rem; margin-bottom: 8px; color: #fff; }
.facility-card p { color: var(--steel-dim); font-size: 0.95rem; margin: 0; }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery { padding: 96px 0; background: var(--paper); }
.gallery .section-lead { margin-bottom: 40px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.gallery-item {
  border: none; padding: 0; background: none;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item::after {
  content: '+';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: #fff;
  background: rgba(19,18,16,0);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}
.gallery-item:hover::after { opacity: 1; background: rgba(19,18,16,0.35); }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,9,8,0.94);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 20px; right: 28px;
  background: none; border: none; color: #fff;
  font-size: 2.4rem; line-height: 1;
}

/* =========================================================
   WHY CHOOSE
   ========================================================= */
.why { padding: 96px 0; background: var(--paper-dim); }
.why-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.why-copy h2 { max-width: 12ch; }
.why-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.why-card { border-top: 1px solid var(--line-light); padding-top: 16px; }
.why-card h3 { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 6px; }
.why-card p { color: var(--steel); font-size: 0.94rem; margin: 0; }

/* =========================================================
   APPOINTMENT FORM
   ========================================================= */
.appointment { padding: 96px 0; background: var(--ink); color: #fff; }
.appointment-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; }
.appointment-intro h2 { color: #fff; max-width: 12ch; }
.appointment-intro p { color: var(--steel-dim); font-size: 1.05rem; max-width: 40ch; }
.appointment-points { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.appointment-points li {
  padding-left: 18px;
  border-left: 3px solid var(--forge);
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
}

.appointment-form { background: var(--paper); color: var(--ink); padding: 36px; border-radius: var(--radius); }
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; }
.form-row--half { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 0; }
.form-row--half > div { display: flex; flex-direction: column; margin-bottom: 18px; }
label { font-family: var(--font-head); font-weight: 700; font-size: 0.88rem; margin-bottom: 7px; }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 13px 14px;
  border: 1.5px solid var(--line-light);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--forge); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--forge-dark); background: #fff5f4; }
.field-error { color: var(--forge-dark); font-size: 0.82rem; min-height: 1.1em; margin-top: 5px; }
.form-row--consent { flex-direction: row; align-items: flex-start; gap: 10px; }
.form-row--consent input { width: auto; margin-top: 3px; }
.form-row--consent label { font-weight: 500; font-size: 0.9rem; }
.form-status { margin-top: 14px; font-size: 0.92rem; min-height: 1.2em; }
.form-status.success { color: #1c7a3b; font-weight: 600; }
.form-status.error { color: var(--forge-dark); font-weight: 600; }
.btn[disabled] { opacity: 0.65; pointer-events: none; }

/* =========================================================
   INSTAGRAM CTA
   ========================================================= */
.instagram-cta { padding: 64px 0; background: var(--forge); color: #fff; }
.instagram-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.instagram-inner h2 { color: #fff; margin-bottom: 4px; }
.instagram-inner p { color: rgba(255,255,255,0.9); margin: 0; }

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonials { padding: 96px 0; background: var(--paper); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.testimonial-card { background: #fff; border: 1px solid var(--line-light); padding: 28px; }
.stars { color: var(--forge); letter-spacing: 2px; margin-bottom: 14px; }
.testimonial-card p { color: var(--ink); font-size: 0.98rem; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testimonial-author img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.testimonial-author span { font-family: var(--font-head); font-weight: 700; font-size: 0.92rem; }

/* =========================================================
   FAQ
   ========================================================= */
.faq { padding: 96px 0; background: var(--paper-dim); }
.faq-inner { max-width: 820px; }
.accordion { margin-top: 32px; border-top: 1px solid var(--line-light); }
.accordion-item { border-bottom: 1px solid var(--line-light); }
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 4px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.02rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
}
.accordion-trigger::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--forge);
  transition: transform 0.2s ease;
  margin-left: 16px;
}
.accordion-trigger[aria-expanded="true"]::after { transform: rotate(45deg); }
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.accordion-panel p { color: var(--steel); padding: 0 4px 20px; margin: 0; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { padding: 96px 0; background: var(--paper); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; }
.contact-info h2 { max-width: 12ch; }
.contact-list { display: flex; flex-direction: column; gap: 20px; margin: 28px 0 32px; }
.contact-list li { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line-light); padding-top: 14px; }
.contact-list strong { font-family: var(--font-head); font-size: 0.85rem; text-transform: none; color: var(--steel); }
.contact-list span a:hover { color: var(--forge); }
.contact-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-map { min-height: 340px; border: 1px solid var(--line-light); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.85); padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.footer-brand p { color: var(--steel-dim); font-size: 0.92rem; max-width: 34ch; margin: 16px 0 22px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s ease;
}
.footer-social a:hover { border-color: var(--forge); color: var(--forge); }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: 12px; }
.footer-links h3, .footer-contact h3 { font-family: var(--font-head); font-size: 0.9rem; color: #fff; margin-bottom: 6px; }
.footer-links a, .footer-contact a { color: var(--steel-dim); font-size: 0.92rem; }
.footer-links a:hover, .footer-contact a:hover { color: var(--forge); }
.footer-contact p { color: var(--steel-dim); font-size: 0.92rem; margin: 0; }
.footer-gbp { margin-top: 8px; font-weight: 600; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { text-align: center; padding: 24px var(--pad); font-size: 0.82rem; color: var(--steel-dim); }

/* =========================================================
   STICKY MOBILE BAR
   ========================================================= */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 400;
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: 10px var(--pad);
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  gap: 10px;
}
.mobile-bar-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 12px 6px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
}
.mobile-bar-btn--primary { background: var(--forge); border-color: var(--forge); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-small { display: none; }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ink);
    padding: 8px var(--pad) 24px;
    gap: 4px;
    border-top: 1px solid var(--line);
  }
  .site-header.nav-open .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }

  .about-grid, .why-grid, .appointment-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media img { height: 320px; }
  .why-cards { grid-template-columns: 1fr; }
  .form-row--half { grid-template-columns: 1fr; }

  .facility-grid { grid-template-columns: repeat(2, 1fr); }
  .facility-card--wide { grid-column: span 2; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .mobile-bar { display: flex; }
  body { padding-bottom: 64px; }
}

@media (max-width: 560px) {
  .about-goals { grid-template-columns: 1fr; }
  .instagram-inner { flex-direction: column; align-items: flex-start; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
}
