/* =========================================================
   LANDING.CSS
   Page-specific styles for index.html
   ========================================================= */

/* Page background colour for the landing page */
.page-landing {
  background-color: var(--color-navy);
}

/* =========================================================
   HERO
   Desktop: full-bleed bg photo + navy panel on right half.
   Mobile:  bg photo fills top, panel sits inset over image.
   ========================================================= */
.hero {
  position: relative;
  background: var(--color-navy);
  overflow: hidden;
}

.hero__background {
  position: absolute;
  inset: 0;
  background-image: url('../img/hero-images/hero.jpg');
  background-image: image-set(
    url('../img/hero-images/hero.webp') type('image/webp'),
    url('../img/hero-images/hero.jpg') type('image/jpeg')
  );
  background-size: cover;
  background-position: center top;
}

/* Navy tint overlay at 50% opacity over the greyscale photo */
.hero__background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(4, 51, 108, 0.50);
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-top: var(--header-height);
}

.hero__panel {
  grid-column: 2 / 3;
  background: var(--color-navy);
  padding: var(--space-4xl) var(--space-3xl);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  min-height: 60vh;
}

/* Keep the CTA at content width rather than stretching in the flex column */
.hero__panel .btn {
  align-self: flex-start;
}

.hero__title {
  font-size: var(--fs-3xl);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

.hero__body {
  font-size: var(--fs-base);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-xl);
  max-width: 52ch;
}

/* =========================================================
   RESPONSIVE — TABLET AND BELOW (< 1024px)
   Nav collapses, hero panel tightens.
   ========================================================= */
@media (max-width: 1023px) {
  :root {
    --header-height: var(--header-height-mobile);
    --fs-3xl: 2.75rem;
  }

  /* Hide inline nav, show hamburger */
  .site-nav {
    position: fixed;
    inset: 0;
    background: var(--color-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-smooth);
    visibility: hidden;
    z-index: 99;
  }

  .site-nav[data-open="true"] {
    transform: translateX(0);
    visibility: visible;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
  }

  .site-nav__list a {
    font-size: var(--fs-xl);
    color: var(--color-white);
  }

  .menu-toggle {
    display: flex;
    z-index: 101;
  }

  .site-logo img {
    height: 40px;
  }
}

/* =========================================================
   RESPONSIVE — MOBILE (< 768px)
   Hero panel becomes inset card over photo, carousel becomes 2×2 grid.
   ========================================================= */
@media (max-width: 767px) {
  .site-header__inner {
    padding: 0 var(--gutter-mobile);
  }

  .site-logo img {
    height: 36px;
  }

  .menu-toggle {
    width: 48px;
    height: 48px;
  }

  /* Hero: single column, panel inset over photo (matches mobile SVG) */
  .hero__grid {
    grid-template-columns: 1fr;
    padding-top: var(--header-height-mobile);
    align-items: flex-start;
  }

  .hero__panel {
    grid-column: 1 / -1;
    /* Offset from top so the gymnast photo reads, then panel sits at ~right-aligned */
    margin: 32vh 0 var(--space-xl) auto;
    padding: var(--space-xl) var(--space-lg);
    min-height: auto;
    align-self: start;
    /* Inset from right edge; takes about 75% of width and right-aligns */
    width: 78%;
    max-width: 340px;
  }

  .hero__title {
    font-size: 1.9rem;
    margin-bottom: var(--space-md);
  }

  /* Mobile design hides the body copy — only title + CTA shown */
  .hero__body {
    display: none;
  }

  /* Smaller CTA on mobile */
  .hero__panel .btn {
    min-width: 0;
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--fs-xs);
  }

}

/* Very narrow phones */
@media (max-width: 380px) {
  .hero__title {
    font-size: 1.6rem;
  }

  .hero__panel {
    padding: var(--space-lg);
  }
}

/* =========================================================
   SHARED SECTION TITLE
   ========================================================= */
.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: var(--space-3xl);
  position: relative;
  padding-bottom: var(--space-lg);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 4px;
  background: var(--color-red);
}

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

/* =========================================================
   MISSION / VALUES
   ========================================================= */
.mission {
  background: var(--color-white);
  padding: var(--space-4xl) var(--gutter);
}

.mission__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.mission__heading {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-md);
}

.mission__heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 4px;
  background: var(--color-red);
}

.mission__statement {
  font-size: var(--fs-md);
  line-height: 1.8;
  color: var(--color-text);
  max-width: 58ch;
}

.values {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  list-style: none;
  padding: 0;
  margin: 0;
}

.values__item {
  display: grid;
  grid-template-columns: 14px 1fr;
  column-gap: var(--space-md);
  row-gap: 4px;
  align-items: start;
}

.values__item::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  background: var(--color-red);
  grid-row: 1 / span 2;
  margin-top: 0.55em;
}

.values__name {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-md);
  text-transform: uppercase;
  color: var(--color-navy);
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.values__desc {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-weight: 400;
  font-size: var(--fs-base);
  color: var(--color-text);
  line-height: 1.6;
  text-transform: none;
  letter-spacing: 0;
}

/* =========================================================
   PROGRAMMES GRID
   ========================================================= */
.programmes {
  background: var(--color-navy);
  padding: var(--space-4xl) var(--gutter);
}

.programmes__inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.programmes__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.prog-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background var(--transition), transform var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.prog-card:hover {
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-3px);
}

.prog-card__img-wrap {
  height: 200px;
  overflow: hidden;
  background: var(--color-lapis);
  flex-shrink: 0;
}

.prog-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Most photos crop fine from the centre. Where the subject sits high or
     low in the original, set --img-focus on that one card to move the crop:
     a smaller percentage shows more of the top, pushing the subject down. */
  object-position: center var(--img-focus, 50%);
  transition: transform 0.6s var(--ease-smooth);
  display: block;
}

.prog-card:hover .prog-card__img-wrap img {
  transform: scale(1.07);
}

.prog-card__content {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.prog-card__accent {
  width: 40px;
  height: 4px;
  background: var(--color-red);
  margin-bottom: var(--space-lg);
  flex-shrink: 0;
}

.prog-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.prog-card__body {
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: var(--space-xl);
}

.prog-card__link {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  padding-bottom: 2px;
}

.prog-card__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-red);
  transition: width var(--transition);
}

.prog-card:hover .prog-card__link::after {
  width: 100%;
}

/* =========================================================
   TERM DATES / GOOGLE CALENDAR
   ========================================================= */
.calendar-section {
  background: var(--color-off-white);
  padding: var(--space-4xl) var(--gutter);
}

.calendar-section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.calendar-section__header {
  margin-bottom: var(--space-3xl);
}

.calendar-section__sub {
  font-size: var(--fs-base);
  color: var(--color-text-muted);
  margin-top: calc(var(--space-3xl) * -0.6);
}

.calendar-embed {
  border: 3px solid var(--color-navy);
  overflow: hidden;
}

.calendar-embed iframe {
  width: 100%;
  height: 600px;
  display: block;
  border: none;
}

/* =========================================================
   BOOKING CTA BANNER
   ========================================================= */
.booking-cta {
  background: var(--color-red);
  padding: var(--space-4xl) var(--gutter);
}

.booking-cta__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3xl);
  align-items: center;
}

.booking-cta__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.booking-cta__body {
  font-size: var(--fs-base);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  max-width: 60ch;
}

.booking-cta__actions {
  display: flex;
  gap: var(--space-md);
  flex-shrink: 0;
}

.btn--booking-primary {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: transparent;
}

.btn--booking-primary:hover,
.btn--booking-primary:focus-visible {
  background: var(--color-lapis);
  transform: translateY(-1px);
}


/* =========================================================
   STATS BAR
   ========================================================= */
.stats-bar {
  background: var(--color-red);
  padding: var(--space-xl) var(--gutter);
}

.stats-bar__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.stats__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.stats__number {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1;
}

.stats__label {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.stats__divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

/* =========================================================
   PHOTO STRIP
   ========================================================= */
.photo-strip {
  height: 260px;
  overflow: hidden;
  position: relative;
}

.photo-strip__track {
  display: flex;
  height: 100%;
  gap: 4px;
  width: max-content;
  animation: photo-strip-scroll 40s linear infinite;
}

.photo-strip__track:hover {
  animation-play-state: paused;
}

.photo-strip__track img {
  height: 100%;
  width: auto;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  filter: grayscale(0.15);
  transition: filter 0.3s;
}

.photo-strip__track img:hover {
  filter: grayscale(0);
}

@keyframes photo-strip-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .photo-strip__track {
    animation: none;
  }
}

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonials {
  background: var(--color-navy);
  padding: var(--space-4xl) var(--gutter);
}

.testimonials__inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.testimonials__grid {
  display: grid;
  /* auto-fit so one or two reviews still fill the row; the media
     queries further down still cap this at 2 columns, then 1. */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.testimonial-card__stars {
  color: #f5c518;
  font-size: var(--fs-base);
  letter-spacing: 3px;
  line-height: 1;
}

.testimonial-card__quote {
  font-size: var(--fs-base);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  flex: 1;
  max-width: none;
}

.testimonial-card__author {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-md);
}

.testimonial-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.testimonial-card__role {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.testimonials__note {
  text-align: center;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.4);
  max-width: none;
}

.testimonials__note a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: underline;
  transition: color var(--transition);
}

.testimonials__note a:hover {
  color: var(--color-white);
}

/* =========================================================
   RESPONSIVE — TABLET (< 1024px)
   ========================================================= */
@media (max-width: 1023px) {
  .mission__inner {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
  }

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

  .booking-cta__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

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

}

/* =========================================================
   RESPONSIVE — MOBILE (< 768px)
   ========================================================= */
@media (max-width: 767px) {
  .stats-bar__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .stats__divider {
    display: none;
  }

  .photo-strip {
    height: 180px;
  }

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

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

  .booking-cta__actions {
    flex-direction: column;
  }

  .booking-cta__actions .btn {
    text-align: center;
  }

  .calendar-embed iframe {
    height: 450px;
  }
}
