/* =====================================================================
   BEASTIN GYM & FITNESS - STYLESHEET
   ---------------------------------------------------------------------
   Contents
   1.  Colour and design variables (change colours HERE only)
   2.  Reset and base styles
   3.  Layout helpers (container, sections, headings)
   4.  Buttons and links
   5.  Navigation bar
   6.  Hero section
   8.  About section
   9.  Facilities section
   10. Membership plans section
   12. Testimonials section
   13. Contact section
   14. Footer
   15. Privacy policy page
   16. Responsive rules (tablet and mobile)
   17. Reduced motion
   ===================================================================== */


/* =====================================================================
   1. COLOUR AND DESIGN VARIABLES
   Every colour used on the site is defined here once. To change a colour
   across the whole website, change it in this block only.
   ===================================================================== */
:root {
  --color-bg: #0B0B0B;            /* Main website background */
  --color-bg-alt: #151515;        /* Secondary background, used on every second section */
  --color-card: #1D1D1D;          /* Background of cards (plans, reviews, image frames) */
  --color-accent: #FF5A1F;        /* Primary accent: buttons, links, key highlights */
  --color-accent-hover: #FF7A45;  /* Lighter accent shown when hovering over accent buttons */
  --color-on-accent: #0B0B0B;     /* Dark text placed on top of orange buttons (readable) */
  --color-text: #FFFFFF;          /* Main text colour */
  --color-text-muted: #A3A3A3;    /* Secondary text colour for descriptions and small print */
  --color-border: #2E2E2E;        /* Thin dividing lines and card outlines */
  --color-hero-overlay: rgba(11, 11, 11, 0.72);  /* Dark layer over the hero photo so text is readable */

  /* Font: system fonts only, so no third-party font requests are made */
  --font-main: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;

  --radius: 6px;          /* Corner rounding for cards, buttons and images (small, not pill-shaped) */
  --header-height: 72px;  /* Height of the sticky navigation bar */
  --page-width: 1160px;   /* Maximum width of page content */
}


/* =====================================================================
   2. RESET AND BASE STYLES
   ===================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box; /* Padding and borders stay inside an element's width */
}

html {
  -webkit-text-size-adjust: 100%;
}

/* Smooth scrolling for the navigation links, but only for people who have not
   asked their device to reduce motion */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);             /* Main text colour */
  background-color: var(--color-bg);    /* Main website background */
}

img {
  display: block;
  max-width: 100%; /* Images never become wider than their container (prevents sideways scrolling) */
  height: auto;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul, dl, dd {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

/* Keyboard focus: a clear outline so people using a keyboard can see where they are */
:focus-visible {
  outline: 3px solid var(--color-accent); /* Orange focus outline */
  outline-offset: 3px;
}

/* Skip link: hidden until a keyboard user tabs to it */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background-color: var(--color-accent); /* Orange skip-link background */
  color: var(--color-on-accent);         /* Dark text on orange */
  font-weight: 700;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}


/* =====================================================================
   3. LAYOUT HELPERS
   ===================================================================== */

/* Centres content and keeps it from getting too wide on large screens */
.container {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

/* Every page section shares the same vertical spacing */
.section {
  padding-block: clamp(4rem, 9vw, 7rem);
  background-color: var(--color-bg); /* Default section background (main) */
  scroll-margin-top: var(--header-height); /* Stops the sticky menu covering the heading after a jump */
}

/* Alternate sections use the secondary background. It sits after .section in the file so it wins */
.section--alt {
  background-color: var(--color-bg-alt); /* Secondary section background */
}

.section h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  text-transform: uppercase;
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-head p {
  margin-top: 1rem;
  color: var(--color-text-muted); /* Muted intro text under section headings */
}


/* =====================================================================
   4. BUTTONS AND LINKS
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem; /* Comfortable tap size on phones */
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Main button: solid orange */
.btn--primary {
  background-color: var(--color-accent); /* Orange button fill */
  border-color: var(--color-accent);     /* Orange button edge */
  color: var(--color-on-accent);         /* Dark text on orange */
}

.btn--primary:hover {
  background-color: var(--color-accent-hover); /* Lighter orange on hover */
  border-color: var(--color-accent-hover);     /* Lighter orange edge on hover */
}

/* Secondary button: outline only */
.btn--outline {
  background-color: transparent;
  border-color: var(--color-text); /* White outline */
  color: var(--color-text);        /* White button text */
}

.btn--outline:hover {
  background-color: var(--color-text); /* White fill on hover */
  color: var(--color-bg);              /* Dark text on the white fill */
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--small {
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.btn-row--stack {
  flex-direction: column;
  align-items: stretch;
}

.text-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--color-accent); /* Orange link text */
  font-weight: 700;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--color-accent-hover); /* Lighter orange on hover */
}


/* =====================================================================
   5. NAVIGATION BAR
   Sticky at the top. On small screens the links collapse into a menu
   opened by the hamburger button (controlled by script.js).
   ===================================================================== */
.site-header {
  position: sticky; /* Stays at the top while scrolling */
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);              /* Navigation bar background */
  border-bottom: 1px solid var(--color-border);   /* Thin line under the bar */
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--color-text); /* White logo text */
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-list a:not(.btn) {
  padding-block: 0.5rem;
  color: var(--color-text-muted); /* Muted menu link colour */
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-list a:not(.btn):hover {
  color: var(--color-text);                  /* White on hover */
  border-bottom-color: var(--color-accent);  /* Orange underline on hover */
}

/* Hamburger button: hidden on desktop, shown in the mobile rules (section 16) */
.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  padding: 0;
  background-color: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 1.5rem;
  height: 2px;
  margin: 0.3rem auto;
  background-color: var(--color-text); /* White hamburger lines */
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* When the menu is open, the three lines turn into an X to show it can be closed */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(0.5rem) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-0.5rem) rotate(-45deg);
}


/* =====================================================================
   6. HERO SECTION
   Full-screen photo with a dark overlay so the white text stays readable.
   ===================================================================== */
.hero {
  position: relative;
  display: flex;
  min-height: calc(100vh - var(--header-height)); /* Fallback for older browsers */
  min-height: calc(100svh - var(--header-height)); /* Accurate height on phones with moving address bars */
  background-color: var(--color-bg-alt); /* Hero background (text-only version) */
  border-bottom: 1px solid var(--color-border); /* Line under the hero */
  overflow: hidden;
  scroll-margin-top: var(--header-height);
}

.hero-inner {
  position: relative; /* Keeps the text above the photo and overlay */
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  padding-block: clamp(3rem, 8vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.hero-content {
  max-width: 48rem;
  /* The only entrance animation on the site: the hero text fades in once on page load */
  animation: hero-in 0.6s ease-out both;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  text-transform: uppercase;
  line-height: 1;
}

.hero-text {
  max-width: 38rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--color-text); /* White supporting text on the photo */
}

/* Address and phone strip at the bottom of the hero */
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-text-muted); /* Thin grey line above the address strip */
  font-size: 0.9375rem;
  color: var(--color-text); /* White address text */
}

.hero-facts a {
  text-decoration: none;
  font-weight: 700;
}

.hero-facts a:hover {
  color: var(--color-accent); /* Orange phone number on hover */
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* =====================================================================
   8. ABOUT SECTION
   Text on the left, photo on the right (stacked on mobile).
   ===================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.about-text > p {
  margin-top: 1.5rem;
  max-width: 38rem;
  color: var(--color-text-muted); /* Muted body text */
}

.point-list {
  margin-block: 2rem;
  max-width: 38rem;
  border-top: 1px solid var(--color-border); /* Line above the first point */
}

.point-list li {
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--color-border); /* Line between points */
  color: var(--color-text-muted);              /* Muted description text */
}

.point-list strong {
  color: var(--color-text); /* White bold lead-in for each point */
}


/* =====================================================================
   9. FACILITIES SECTION
   Two columns of photo cards on desktop, one column on mobile.
   ===================================================================== */
.facility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}

.facility {
  padding-top: 1.5rem;
  border-top: 3px solid var(--color-accent); /* Orange line above each facility */
}

.facility h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.facility p {
  margin-top: 0.5rem;
  max-width: 30rem;
  color: var(--color-text-muted); /* Muted card description */
}


/* =====================================================================
   10. MEMBERSHIP PLANS SECTION
   ===================================================================== */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
  background-color: var(--color-card);       /* Plan card background */
  border: 1px solid var(--color-border);     /* Plan card outline */
  border-radius: var(--radius);
}

.plan h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.plan-term {
  margin-top: 0.25rem;
  font-weight: 700;
  color: var(--color-accent); /* Orange membership length */
}

.plan-desc {
  margin-top: 1rem;
  color: var(--color-text-muted); /* Muted plan description */
}

.plan-price {
  margin-block: 1.5rem;
  padding-block: 1.25rem;
  border-block: 1px solid var(--color-border); /* Lines above and below the price */
  font-size: 1.5rem;
  font-weight: 800;
}

.plan-list {
  flex-grow: 1; /* Pushes the button to the bottom so all three buttons line up */
  margin-bottom: 1.75rem;
}

.plan-list li {
  padding-block: 0.4rem;
  color: var(--color-text-muted); /* Muted benefit text */
}

.plan-note {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted); /* Muted small print */
}


/* =====================================================================
   12. TESTIMONIALS SECTION
   ===================================================================== */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review {
  margin: 0;
  padding: 1.75rem 0 0;
  border-top: 3px solid var(--color-accent); /* Orange line above each review */
}

.review blockquote {
  margin: 0;
}

.review blockquote p {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
}

.review figcaption {
  display: flex;
  flex-direction: column;
  margin-top: 1.25rem;
}

.review-name {
  font-weight: 700;
}

.review-source {
  font-size: 0.9375rem;
  color: var(--color-text-muted); /* Muted "Google review" label */
}


/* =====================================================================
   13. CONTACT SECTION
   ===================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-list {
  margin-top: 2rem;
  border-top: 1px solid var(--color-border); /* Line above the first contact row */
}

.contact-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--color-border); /* Line between contact rows */
}

.contact-row dt {
  font-weight: 700;
  color: var(--color-text-muted); /* Muted row label */
}

.contact-row a {
  color: var(--color-accent); /* Orange phone and Instagram links */
  font-weight: 700;
  text-underline-offset: 4px;
}

.contact-row a:hover {
  color: var(--color-accent-hover); /* Lighter orange on hover */
}

.contact-actions {
  padding: clamp(1.5rem, 3vw, 2rem);
  background-color: var(--color-card);       /* Action panel background */
  border: 1px solid var(--color-border);     /* Action panel outline */
  border-radius: var(--radius);
}

.contact-actions h3 {
  font-size: 1.5rem;
}

.contact-actions p {
  margin-block: 0.75rem 1.5rem;
  color: var(--color-text-muted); /* Muted panel text */
}


/* =====================================================================
   14. FOOTER
   ===================================================================== */
.site-footer {
  padding-top: clamp(3rem, 7vw, 4.5rem);
  background-color: var(--color-bg);             /* Footer background */
  border-top: 1px solid var(--color-border);     /* Line above the footer */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 2.5rem;
}

.footer-brand p {
  max-width: 22rem;
  margin-top: 1rem;
  color: var(--color-text-muted); /* Muted footer description */
}

.footer-title {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 700;
}

.footer-list li {
  padding-block: 0.25rem;
  color: var(--color-text-muted); /* Muted footer text */
}

.footer-list a,
.footer-bottom a {
  text-decoration: none;
}

.footer-list a:hover,
.footer-bottom a:hover {
  color: var(--color-accent); /* Orange footer links on hover */
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--color-border); /* Line above the copyright row */
  font-size: 0.9375rem;
  color: var(--color-text-muted);            /* Muted copyright text */
}


/* =====================================================================
   15. PRIVACY POLICY PAGE
   ===================================================================== */
.legal-inner {
  max-width: 46rem; /* Narrow column keeps long text easy to read */
}

.legal h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  text-transform: uppercase;
}

.legal-updated {
  margin-top: 0.75rem;
  margin-bottom: 2rem;
  color: var(--color-text-muted); /* Muted "last updated" date */
}

.legal h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
  line-height: 1.25;
}

.legal p,
.legal li {
  color: var(--color-text-muted); /* Muted policy body text */
}

.legal ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.legal li {
  padding-block: 0.25rem;
}

.legal a {
  color: var(--color-accent); /* Orange links inside the policy */
  text-underline-offset: 4px;
}


/* =====================================================================
   16. RESPONSIVE RULES
   Rules below only apply when the screen is narrower than the stated width.
   ===================================================================== */

/* ---- Tablet and smaller (up to 900px wide) ---- */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr; /* Stack text and image/panel */
  }

  .plan-grid,
  .review-grid {
    grid-template-columns: 1fr; /* One card per row */
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  /* Mobile navigation: show the hamburger, turn the links into a dropdown panel */
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none; /* Hidden until the hamburger is pressed */
    padding: 0.5rem clamp(1.25rem, 4vw, 2rem) 1.5rem;
    background-color: var(--color-bg);             /* Dropdown panel background */
    border-bottom: 1px solid var(--color-border);  /* Line under the dropdown panel */
  }

  .site-nav.is-open {
    display: block; /* script.js adds "is-open" when the hamburger is pressed */
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list li a:not(.btn) {
    display: block;
    padding-block: 0.9rem;
    border-bottom: 1px solid var(--color-border); /* Line between menu items */
  }

  .nav-cta {
    margin-top: 1rem;
  }

  .nav-cta .btn {
    width: 100%; /* Join Now button spans the full width of the mobile menu */
  }
}

/* ---- Mobile (up to 600px wide) ---- */
@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  .facility-grid {
    grid-template-columns: 1fr; /* One facility per row */
  }

  .btn-row:not(.btn-row--stack) .btn {
    width: 100%; /* Full-width buttons are easier to tap */
  }

  .contact-row {
    grid-template-columns: 1fr; /* Label above value */
    gap: 0.25rem;
  }

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


/* =====================================================================
   17. REDUCED MOTION
   Anyone who has asked their device to reduce motion gets no animation.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
