/* Flex Fitness homepage — premium performance pass */
html.home-polished {
  --flex-red: #e50914;
  --flex-red-bright: #ff3340;
  --flex-ink: #050505;
  --flex-line: rgba(255, 255, 255, 0.12);
}

html.home-polished .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #030303;
}

html.home-polished .hero::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.027) 1px, transparent 1px),
    radial-gradient(circle at 17% 34%, rgba(229, 9, 20, 0.2), transparent 29%),
    radial-gradient(circle at 83% 65%, rgba(229, 9, 20, 0.1), transparent 28%);
  background-size: 58px 58px, 58px 58px, auto, auto;
  content: "";
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.7) 65%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.7) 65%, transparent 100%);
}

html.home-polished .hero::after {
  position: absolute;
  z-index: 0;
  top: -28%;
  left: 51%;
  width: 2px;
  height: 155%;
  background: linear-gradient(to bottom, transparent, rgba(229, 9, 20, 0.7), transparent);
  box-shadow: 0 0 80px 30px rgba(229, 9, 20, 0.08);
  content: "";
  opacity: 0.65;
  pointer-events: none;
  transform: rotate(14deg);
}

html.home-polished .hero-container,
html.home-polished .hero-points,
html.home-polished .div-block-68.vertical.mobile {
  position: relative;
  z-index: 1;
}

.home-hero-eyebrow {
  display: inline-flex;
  width: fit-content;
  gap: 0.6rem;
  align-items: center;
  margin: 0.9rem 0 1rem;
  padding: 0.52rem 0.75rem;
  border: 1px solid rgba(229, 9, 20, 0.55);
  border-radius: 999px;
  background: rgba(229, 9, 20, 0.09);
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.home-hero-eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--flex-red-bright);
  box-shadow: 0 0 0 5px rgba(229, 9, 20, 0.12), 0 0 15px rgba(255, 51, 64, 0.9);
  content: "";
}

html.home-polished .hero .heading {
  position: relative;
  max-width: 840px;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
  line-height: 0.94;
  text-wrap: balance;
}

html.home-polished .hero .paragraph {
  max-width: 610px;
  margin-bottom: 1.15rem;
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: clamp(0.98rem, 1.25vw, 1.18rem);
  line-height: 1.6;
}

.home-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
}

.home-proof-item {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.46rem 0.66rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.48);
  color: rgba(255, 255, 255, 0.78) !important;
  font-family: "Plus Jakarta Sans", Montserrat, sans-serif;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.home-proof-item svg {
  width: 14px;
  height: 14px;
  color: var(--flex-red-bright) !important;
  flex: none;
}

html.home-polished .div-block-130 {
  gap: 10px !important;
}

html.home-polished .home-primary-cta {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background: linear-gradient(135deg, #f20b18 0%, #b70009 100%) !important;
  box-shadow: 0 16px 42px rgba(229, 9, 20, 0.24), inset 0 1px rgba(255, 255, 255, 0.2);
}

html.home-polished .home-primary-cta::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.23) 48%, transparent 64%);
  content: "";
  pointer-events: none;
  transform: translateX(-120%);
  transition: transform 600ms ease;
}

html.home-polished .home-primary-cta:hover::after {
  transform: translateX(120%);
}

.home-hero-actions-secondary {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 10px;
}

.home-hero-actions-secondary .hero-button.call {
  min-width: 0;
  min-height: 52px;
  padding-right: 1rem;
  padding-left: 1rem;
  background: rgba(0, 0, 0, 0.46) !important;
  font-size: 0.86rem;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.home-tour-button {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 52px;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(229, 9, 20, 0.14), rgba(255, 255, 255, 0.055));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  color: #fff !important;
  font-family: Oswald, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.home-tour-button svg {
  width: 19px;
  height: 19px;
  color: var(--flex-red-bright) !important;
  flex: none;
}

.home-tour-button:hover,
.home-tour-button:focus-visible {
  border-color: var(--flex-red);
  background: rgba(229, 9, 20, 0.17);
  color: #fff;
  transform: translateY(-2px);
}

html.home-polished .hero-video-wrapper.desktop {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48), 0 0 55px rgba(229, 9, 20, 0.1);
}

html.home-polished .hero-point {
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 200ms ease, transform 200ms ease;
}

html.home-polished .hero-point:hover {
  border-color: rgba(229, 9, 20, 0.5);
  transform: translateY(-4px);
}

html.home-polished .ticker {
  position: relative;
  z-index: 2;
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.42), 0 12px 36px rgba(0, 0, 0, 0.42);
}

/* Cinematic 3D-tour feature */
.home-tour-showcase {
  position: relative;
  z-index: 1;
  padding: clamp(70px, 8vw, 118px) clamp(18px, 4vw, 60px);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 48%, rgba(229, 9, 20, 0.14), transparent 30%),
    #050505;
  color: #fff;
}

.home-tour-showcase::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  content: "";
  opacity: 0.2;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 55%);
  mask-image: linear-gradient(90deg, #000, transparent 55%);
}

.home-tour-card {
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  display: grid;
  width: min(1340px, 100%);
  min-height: 560px;
  grid-template-columns: minmax(360px, 0.84fr) minmax(0, 1.16fr);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: #0a0a0a;
  box-shadow: 0 38px 110px rgba(0, 0, 0, 0.58), 0 0 90px rgba(229, 9, 20, 0.07);
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  transition: opacity 750ms ease, transform 750ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 250ms ease;
}

.home-tour-card::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: radial-gradient(460px circle at var(--spot-x) var(--spot-y), rgba(229, 9, 20, 0.13), transparent 56%);
  content: "";
  pointer-events: none;
}

.home-tour-showcase.is-visible .home-tour-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.home-tour-card:hover {
  border-color: rgba(229, 9, 20, 0.42);
}

.home-tour-content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 72px);
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.08), transparent 42%);
}

.home-tour-kicker {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--flex-red-bright);
  font-family: Montserrat, sans-serif;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.home-tour-kicker::before {
  width: 28px;
  height: 2px;
  background: var(--flex-red);
  box-shadow: 0 0 13px rgba(229, 9, 20, 0.75);
  content: "";
}

.home-tour-heading {
  max-width: 7.5em;
  margin: 0;
  color: #fff;
  font-family: Oswald, sans-serif;
  font-size: clamp(3rem, 5vw, 5.65rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.94;
  text-transform: uppercase;
  text-wrap: balance;
}

.home-tour-heading span {
  color: var(--flex-red-bright);
}

.home-tour-body {
  max-width: 48ch;
  margin: 1.25rem 0 1.5rem;
  color: rgba(255, 255, 255, 0.68);
  font-family: "Plus Jakarta Sans", Montserrat, sans-serif;
  font-size: 0.95rem;
  line-height: 1.75;
}

.home-tour-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.65rem;
}

.home-tour-feature {
  padding: 0.48rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-family: Montserrat, sans-serif;
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.home-tour-launch {
  display: inline-flex;
  width: fit-content;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: linear-gradient(135deg, #ed0a16, #b60009);
  box-shadow: 0 14px 36px rgba(229, 9, 20, 0.24), inset 0 1px rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.home-tour-launch svg {
  width: 18px;
  height: 18px;
}

.home-tour-launch:hover,
.home-tour-launch:focus-visible {
  box-shadow: 0 18px 46px rgba(229, 9, 20, 0.38), inset 0 1px rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px);
}

.home-tour-visual {
  position: relative;
  z-index: 1;
  min-height: 460px;
  overflow: hidden;
  background: #111;
}

.home-tour-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.08) brightness(0.76);
  transform: scale(1.025);
  transition: filter 600ms ease, transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-tour-card:hover .home-tour-visual img {
  filter: saturate(0.9) contrast(1.08) brightness(0.85);
  transform: scale(1.065);
}

.home-tour-visual::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, #0a0a0a 0%, transparent 25%),
    linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent 46%);
  content: "";
  pointer-events: none;
}

.home-tour-scanline {
  position: absolute;
  z-index: 2;
  top: -12%;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 49, 60, 0.85), transparent);
  box-shadow: 0 0 28px 6px rgba(229, 9, 20, 0.2);
  animation: home-scan 5.5s ease-in-out infinite;
}

@keyframes home-scan {
  0%, 12% { top: -8%; opacity: 0; }
  20% { opacity: 0.8; }
  78% { opacity: 0.8; }
  88%, 100% { top: 108%; opacity: 0; }
}

.home-tour-cube {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(3, 3, 3, 0.62);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.035), 0 0 50px rgba(229, 9, 20, 0.24);
  color: #fff;
  pointer-events: none;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.home-tour-cube svg {
  width: 42px;
  height: 42px;
  color: var(--flex-red-bright);
}

.home-hotspot {
  position: absolute;
  z-index: 3;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--flex-red);
  box-shadow: 0 0 0 7px rgba(229, 9, 20, 0.18), 0 0 22px rgba(229, 9, 20, 0.9);
  animation: home-hotspot-pulse 2.2s ease-in-out infinite;
}

.home-hotspot.one { top: 26%; left: 24%; }
.home-hotspot.two { top: 66%; right: 19%; animation-delay: 0.75s; }
.home-hotspot.three { right: 30%; bottom: 18%; animation-delay: 1.35s; }

@keyframes home-hotspot-pulse {
  50% { box-shadow: 0 0 0 12px rgba(229, 9, 20, 0), 0 0 28px rgba(229, 9, 20, 0.95); }
}

.home-tour-visual-label {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 20px;
  padding: 0.55rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: rgba(255, 255, 255, 0.85);
  font-family: Montserrat, sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Light refinement for the sections after the feature */
html.home-polished .services-section,
html.home-polished .trainer-section,
html.home-polished .reviews-section,
html.home-polished .about-section {
  position: relative;
  isolation: isolate;
}

html.home-polished .services-section::before,
html.home-polished .trainer-section::before {
  position: absolute;
  z-index: -1;
  width: min(620px, 65vw);
  height: min(620px, 65vw);
  border-radius: 50%;
  background: rgba(229, 9, 20, 0.055);
  content: "";
  filter: blur(100px);
  pointer-events: none;
}

html.home-polished .services-section::before { top: 4%; right: -20%; }
html.home-polished .trainer-section::before { bottom: 6%; left: -20%; }

@media (max-width: 991px) {
  .home-tour-card {
    grid-template-columns: 1fr;
  }

  .home-tour-visual {
    min-height: 390px;
  }

  .home-tour-visual::before {
    background: linear-gradient(to bottom, #0a0a0a 0%, transparent 26%), linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 48%);
  }
}

@media (max-width: 767px) {
  html.home-polished .hero::before {
    background-size: 38px 38px, 38px 38px, auto, auto;
  }

  .home-hero-eyebrow {
    margin-top: 0.55rem;
    font-size: 0.57rem;
  }

  .home-proof-row {
    gap: 0.4rem;
  }

  .home-proof-item {
    padding: 0.42rem 0.56rem;
    font-size: 0.62rem;
  }

  .home-hero-actions-secondary {
    grid-template-columns: 1fr;
  }

  .home-tour-showcase {
    padding-right: 12px;
    padding-left: 12px;
  }

  .home-tour-card {
    min-height: 0;
    border-radius: 20px;
  }

  .home-tour-content {
    padding: 34px 24px 38px;
  }

  .home-tour-heading {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  .home-tour-visual {
    min-height: 310px;
  }

  .home-tour-cube {
    width: 78px;
    height: 78px;
  }

  .home-tour-cube svg {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-tour-card,
  .home-tour-visual img,
  .home-primary-cta::after,
  .home-tour-button,
  .home-tour-launch,
  html.home-polished .hero-point {
    transition: none !important;
  }

  .home-tour-scanline,
  .home-hotspot {
    animation: none !important;
  }
}
