/**
 * REFINED_MOVEMENT - Homepage Styles
 * Luxury minimalist design matching brand guidelines
 */

/* ========================================
   HERO SECTION (Coming Soon Style)
   ======================================== */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: calc(var(--header-height) + var(--marquee-height));
  z-index: 1;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-background picture,
.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  /* No filter — let the bright, airy hero image show naturally */
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 720px;
  max-width: 90%;
  min-height: 520px;
  background: rgba(26, 29, 35, 0.42);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xxl) 70px;
  box-sizing: border-box;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: var(--color-white);
  padding: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-logo {
  margin-bottom: var(--space-xl);
}

.hero-logo h1 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);  /* 700 */
  font-size: var(--font-size-h1);  /* Fluid 36px → 72px */
  color: var(--color-white);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
  line-height: var(--line-height-tight);  /* 1.1 */
  /* Logo displays as: REFINED MOVEMENT */
}

.hero-logo .location {
  font-family: var(--font-location);
  font-size: var(--font-size-body-large);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  opacity: 0.95;
  display: block;
  line-height: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem);
  color: var(--color-white);
  margin: 0 0 var(--space-lg);
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-transform: uppercase;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  hyphens: none;
}

.hero-tagline {
  font-family: var(--font-location);
  font-size: var(--font-size-body-large);
  color: var(--accent-secondary);
  font-weight: 400;
  margin-bottom: var(--space-xl);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-cta {
  display: flex;
  flex-direction: row;
  gap: var(--space-md);
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  flex-wrap: wrap;
}

.hero-cta .btn {
  padding: var(--space-sm) var(--space-xl);
  font-size: var(--font-size-medium);
  font-weight: 600;
  white-space: nowrap;
  box-sizing: border-box;
}

/* ========================================
   INTRO SECTION
   ======================================== */

.homepage-intro {
  background: var(--bg-primary);
  padding: var(--space-xxxl) var(--container-padding);
}

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

.intro-text {
  padding-right: var(--space-xl);
}

.intro-eyebrow {
  font-family: var(--font-location);
  font-size: var(--font-size-small);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-primary);
  display: block;
  margin-bottom: var(--space-md);
}

.intro-text h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: var(--line-height-heading);
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.intro-text p {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.intro-image {
  position: relative;
  overflow: hidden;
}

.intro-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* ========================================
   CLASS HIGHLIGHTS SECTION
   ======================================== */

.homepage-classes {
  background: var(--bg-secondary);
  padding: var(--space-xxxl) var(--container-padding);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-xxl);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: var(--line-height-heading);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--text-secondary);
}

.class-cards {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  padding: var(--space-xxl) 0;
}

.class-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
  position: relative;
}

.class-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.class-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}

.class-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.class-card:hover .class-card-image img {
  transform: scale(1.08);
}

.class-card-content {
  flex: 1;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.class-card-content h3 {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-heading);
  color: var(--text-primary);
  margin: 0;
}

.class-card-content p {
  font-family: var(--font-body);
  font-size: var(--font-size-medium);
  line-height: var(--line-height-body);
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.class-duration {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  font-weight: 500;
  margin: var(--space-xs) 0 0;
}

.class-duration::before {
  content: "⏱";
  font-size: 1rem;
  opacity: 0.7;
}

.class-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--font-size-small);
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: auto;
  padding-top: var(--space-xs);
}

.class-link::after {
  content: "→";
  transition: transform 0.2s ease;
}

.class-link:hover {
  color: var(--text-primary);
  gap: var(--space-sm);
}

.class-link:hover::after {
  transform: translateX(var(--space-xs));  /* 8px subtle shift */
}

.section-cta {
  text-align: center;
  margin-top: var(--space-xxl);
  padding-bottom: var(--space-xxxl);
}

/* ========================================
   GALLERY SECTION - Swiper Carousel
   ======================================== */

.homepage-gallery {
  background: var(--bg-primary);
  padding: var(--space-xxxl) var(--container-padding);
}

.gallery-carousel {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 0 var(--space-xxl) 0;
  position: relative;
}

.gallery-carousel .swiper-slide {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
}

.gallery-carousel .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow);
}

.gallery-carousel .swiper-slide:hover img {
  transform: scale(1.05);
}

/* Swiper Navigation */
.gallery-carousel .swiper-button-prev,
.gallery-carousel .swiper-button-next {
  color: var(--accent-primary);
  width: var(--space-xl);
  height: var(--space-xl);
  background: var(--color-white);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.gallery-carousel .swiper-button-prev:hover,
.gallery-carousel .swiper-button-next:hover {
  background: var(--accent-primary);
  color: var(--color-white);
  transform: scale(1.1);
}

.gallery-carousel .swiper-button-prev::after,
.gallery-carousel .swiper-button-next::after {
  font-size: var(--font-size-body-large);
  font-weight: bold;
}

/* Swiper Pagination */
.gallery-carousel .swiper-pagination {
  bottom: 0;
}

.gallery-carousel .swiper-pagination-bullet {
  background: var(--text-secondary);
  opacity: 0.5;
  width: var(--space-sm);
  height: var(--space-sm);
  transition: all var(--transition-base);
}

.gallery-carousel .swiper-pagination-bullet-active {
  background: var(--accent-primary);
  opacity: 1;
  width: 30px;
  border-radius: var(--radius-sm);
}

/* ========================================
   FEATURED OFFER SECTION
   ======================================== */

.homepage-offer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: var(--space-xxxl) var(--container-padding);
  text-align: center;
}

.offer-content {
  max-width: 700px;
  margin: 0 auto;
}

.offer-eyebrow {
  font-family: var(--font-location);
  font-size: var(--font-size-small);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-primary);
  display: block;
  margin-bottom: var(--space-md);
}

.offer-content h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: var(--line-height-heading);
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.offer-content p {
  font-family: var(--font-body);
  font-size: var(--font-size-body-large);
  line-height: var(--line-height-body);
  margin-bottom: var(--space-xl);
}

.offer-smallprint {
  margin-top: var(--space-lg);
  font-size: var(--font-size-small);
  opacity: 0.8;
  margin-bottom: 0;
}

/* ========================================
   TESTIMONIALS SECTION
   ======================================== */

.homepage-testimonials {
  background: var(--bg-primary);
  padding: var(--space-xxxl) var(--container-padding);
}

.testimonials-grid {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.testimonial-card {
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.testimonial-card p {
  font-family: var(--font-body);
  font-size: var(--font-size-body-large);
  line-height: var(--line-height-body);
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  font-style: italic;
}

.testimonial-card cite {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  font-style: normal;
}

/* ========================================
   FINAL CTA SECTION
   ======================================== */

.homepage-final-cta {
  background: var(--bg-secondary);
  padding: var(--space-xxxl) var(--container-padding);
  text-align: center;
}

.final-cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.final-cta-content h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: var(--line-height-heading);
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.final-cta-content p {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.final-cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 1023px) {
  .intro-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .intro-text {
    padding-right: 0;
  }

  .class-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .class-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Fix orphaned last card - make it full width and centered */
  .class-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 400px;
    justify-self: center;
  }
}

@media (max-width: 599px) {
  .class-cards {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* H3 uses fluid clamp() - no override needed */

  /* Uses CSS variable - no override needed */
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-overlay {
    width: 640px;
    max-width: 88%;
    min-height: 480px;
    padding: 50px var(--space-xl);
  }

  .hero-logo {
    margin-bottom: var(--space-lg);
  }

  .hero-logo h1 {
    font-size: clamp(1.75rem, 3vw + 0.5rem, 2.25rem);
  }

  /* Uses CSS variable - no override needed */

  .hero-title {
    font-size: clamp(1.5rem, 2vw + 0.75rem, 2rem);
    margin-bottom: var(--space-md);
    line-height: 1.2;
  }

  /* Uses CSS variable - no override needed for hero-tagline (intentionally 20px) */

  /* Uses CSS variable - no override needed */
}

/* ========================================
   RESPONSIVE - LARGE MOBILE / SMALL TABLET (600-767px)
   Bridge zone: smooth transition from mobile to tablet
   ======================================== */

@media (min-width: 600px) and (max-width: 767px) {
  .hero-overlay {
    width: 78%;
    max-width: 78%;
    min-height: 380px;
    background: var(--overlay-dark-light);
    padding: var(--space-lg) var(--space-md);
  }

  .hero-content {
    padding: var(--space-md);
  }

  .hero-logo {
    margin-bottom: var(--space-md);
  }

  .hero-logo h1 {
    font-size: var(--font-size-h4);
  }

  .hero-logo .location {
    font-size: var(--font-size-tiny);
    letter-spacing: 0.35em;
  }

  .hero-title {
    font-size: clamp(1.625rem, 7vw, 3.125rem);
    margin-bottom: var(--space-sm);
  }

  .hero-tagline {
    font-size: var(--font-size-medium);
    margin-bottom: var(--space-md);
  }

  .hero-cta {
    flex-direction: row;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-cta .btn {
    width: auto;
    min-width: 145px;
    flex: 0 1 auto;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-small);
  }

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

  .intro-text {
    padding-right: 0;
  }

  .class-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .schedule-section {
    padding: var(--space-xxl) var(--space-md);
  }

  .trainin-iframe {
    height: 700px;
  }
}

/* ========================================
   RESPONSIVE - MOBILE (Stacked Layout)
   Full-width image top, solid dark content block below
   ======================================== */

@media (max-width: 599px) {
  /* STACKED LAYOUT: Full-width image on top, solid dark content block below
     Matches coming-soon.css pattern — Solidcore-inspired */
  .hero {
    min-height: calc(100vh - var(--header-height) - var(--marquee-height));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-bottom: 0;
    background-color: var(--bg-dark);
  }

  @supports (min-height: 100svh) {
    .hero {
      min-height: calc(100svh - var(--header-height) - var(--marquee-height));
    }
  }

  .hero-background {
    position: relative;
    flex: 1 1 auto;
    min-height: 40vh;
    width: 100%;
  }

  .hero-background picture,
  .hero-background img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-position: center 30%;
  }

  .hero-overlay {
    display: none;
  }

  .hero-content {
    background-color: var(--bg-dark);
    padding: var(--space-lg) var(--space-md);
    padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0));
    width: 100%;
    max-width: 100%;
    text-align: center;
    flex-shrink: 0;
  }

  .hero-logo {
    display: block;
    margin-bottom: var(--space-sm);
  }

  .hero-logo h1 {
    display: none;
  }

  .hero-logo .location {
    display: block;
    font-family: var(--font-location);
    font-size: var(--font-size-small);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent-primary);
    opacity: 1;
    line-height: 1;
  }

  .hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 10vw, 3rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-md);
    letter-spacing: 0.05em;
    line-height: 1.05;
    color: var(--color-white);
    text-transform: uppercase;
    text-shadow: none;
  }

  .hero-tagline {
    font-family: var(--font-body);
    font-size: var(--font-size-small);
    margin-bottom: var(--space-md);
    line-height: 1.5;
    color: var(--text-on-dark);
    font-weight: var(--font-weight-light);
    letter-spacing: 1px;
    opacity: 0.85;
    text-transform: none;
    text-shadow: none;
  }

  .hero-cta {
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 300px;
    width: 90%;
    margin: 0 auto;
  }

  .hero-cta .btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-small);
    width: 100%;
  }

  .intro-content {
    gap: var(--space-lg);
  }

  /* Section padding rhythm: mobile uses consistent 64px 24px */
  .homepage-intro,
  .homepage-classes,
  .homepage-gallery,
  .homepage-offer,
  .homepage-testimonials,
  .homepage-final-cta {
    padding: var(--space-xxl) var(--space-md);
  }

  /* H2 uses fluid clamp() - no override needed */

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

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

  .final-cta-buttons {
    flex-direction: column;
  }

  .final-cta-buttons .btn {
    width: 100%;
  }
}

/* ========================================
   SCHEDULE SECTION
   ======================================== */

.schedule-section {
  background: var(--gradient-section-fade);
  padding: var(--space-xxxl) var(--container-padding);
  position: relative;
}

.schedule-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 600px;
  height: 1px;
  background: var(--gradient-accent-line);
  opacity: 0.3;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: var(--line-height-heading);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

/* Trainin Booking Widget */
.trainin-widget-container {
  max-width: 1200px;
  margin: 0 auto;
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.trainin-iframe {
  width: 100%;
  height: 650px;
  border: none;
  display: block;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .trainin-iframe {
    height: 650px;
  }
}

@media (max-width: 599px) {
  .trainin-iframe {
    height: 600px;
  }
}

.schedule-fallback {
  text-align: center;
  margin-top: var(--space-sm);
  font-size: var(--font-size-small);
  color: var(--text-secondary);
}

.schedule-fallback a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.schedule-fallback a:hover {
  color: var(--text-primary);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@media (prefers-reduced-motion: no-preference) {
  .hero,
  .homepage-intro,
  .homepage-classes,
  .schedule-section,
  .homepage-gallery,
  .homepage-offer,
  .homepage-testimonials,
  .homepage-final-cta {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
  }

  .hero { animation-delay: 0.1s; }
  .homepage-intro { animation-delay: 0.2s; }
  .homepage-classes { animation-delay: 0.3s; }
  .schedule-section { animation-delay: 0.35s; }
  .homepage-gallery { animation-delay: 0.4s; }
  .homepage-offer { animation-delay: 0.5s; }
  .homepage-testimonials { animation-delay: 0.6s; }
  .homepage-final-cta { animation-delay: 0.7s; }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(var(--space-md));
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
