/* --- Global Variables & Resets --- */
:root {
  --color-primary: #082D0F;
  --color-secondary: #424940;
  --color-bg: #F8FAF9;
  --white: #FFFFFF;
  --black: #000000;

  --radius: 6px;
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Lora', serif;

  --transition-speed: 0.8s;
  --transition-curve: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Neutralize browser heading defaults so only .bold spans show weight */
h1, h2, h3, h4 {
  font-weight: 300;
}

body {
  background-color: var(--color-bg);
  font-family: var(--font-main);
  color: var(--color-secondary);
  line-height: 1.5;
  overflow-x: hidden;
}

/* --- Layout Strategy: Full-Width Sections --- */
section {
  width: 100%;
}

/* Background Assignments for edge-to-edge color */
.hero,
.feature:not(.feature-alt) {
  background-color: var(--color-bg);
}

.intro,
.feature-alt,
.learning-modes {
  background-color: var(--white);
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 100px 40px;
}

/* --- Reusable Elements --- */
.btn-primary {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--white);
  padding: 20px 48px;
  font-size: 24px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.responsive-img {
  max-width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border-radius: var(--radius);
}

/* Global Bold Utility */
.bold { font-weight: 700 !important; }
.italic { font-style: italic; font-weight: 500; }

/* --- Header & Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(248, 250, 249, 0.95); /* Using var(--color-bg) with alpha */
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(66, 73, 64, 0.1);
}

.header-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px !important; /* Overriding global container padding */
}

.main-nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  color: var(--color-secondary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  padding: 8px 0;
  /* Smooth transition for both color and the underline */
  transition: color 0.3s ease;
}

/* Hover effect: Darken the text */
.nav-link:hover {
  color: var(--color-primary);
}

/* The Underline Logic */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  /* Use your custom transition curve for a premium feel */
  transition: width 0.4s var(--transition-curve);
}

/* Active/Selected state: Full underline overrides the hover state */
.nav-link.active::after {
  width: 100%;
}



.btn-nav-cta {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 1;
  visibility: visible;
}

.btn-nav-cta.hidden {
  opacity: 0;
  visibility: hidden;
}

/* --- Mobile Menu Elements --- */
.menu-trigger {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 10px;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: var(--color-primary);
  transition: transform 0.3s ease;
}

.menu-close {
  display: none;
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 40px;
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
}

/* --- Responsive States --- */
@media (max-width: 992px) {
  .main-nav {
  display: none;

}}

/* Offset for fixed header so anchor links don't hide section titles */
section {
  scroll-margin-top: 80px;
}

@media (max-width: 768px) {
  .main-nav { display: none; } /* Hide complex nav on mobile for now */
}

/* --- Hero Section --- */
.hero-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-areas: "text image" "cta image";
  gap: 40px 80px;
  align-items: center;
}

.hero-text-content { grid-area: text; }
.hero-image-container { grid-area: image; }
.hero-actions { grid-area: cta; }

.hero-heading {
  font-family: var(--font-heading);
  font-size: 96px;
  line-height: 1.1;
  color: var(--color-primary);
  margin-bottom: 32px;
}

.hero-description { font-size: 24px; max-width: 650px; }

/* --- Intro / Paradigm Section --- */
.intro { text-align: center; }
.intro-content { max-width: 900px; margin: 0 auto; }

.intro-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 24px;
}

.intro-heading {
  font-family: var(--font-heading);
  font-size: 48px;
  color: var(--color-primary);
  margin-bottom: 48px;
}

.intro-text-wrapper { display: flex; flex-direction: column; gap: 32px; }
.intro-description { font-size: 20px; line-height: 1.6; }

/* --- Feature Sections --- */
.feature-layout {
  display: flex;
  align-items: center;
  gap: 80px;
}

/* Desktop Alignment Logic */
@media (min-width: 769px) {
  .text-left .feature-text-content { order: 1; flex: 1.2; }
  .text-left .feature-image-container { order: 2; flex: 0.8; }

  .text-right .feature-text-content { order: 2; flex: 1.2; text-align: right; }
  .text-right .feature-image-container { order: 1; flex: 0.8; }
  .text-right .feature-heading, .text-right .feature-description { margin-left: auto; }
}

.feature-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.feature-heading {
  font-family: var(--font-heading);
  font-size: 48px;
  line-height: 1.2;
  color: var(--color-primary);
  margin-bottom: 32px;
  max-width: 700px;
}

.feature-description {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 650px;
}

/* Feature Lists */
.feature-list { padding-left: 24px; margin-bottom: 32px; }
.feature-list li { font-size: 20px; margin-bottom: 16px; }

.feature-list-icons { list-style: none; }
.feature-list-icons li { display: flex; gap: 16px; margin-bottom: 24px; text-align: left; }

.list-icon-wrapper { flex-shrink: 0; width: 24px; height: 24px; color: var(--color-primary); }
.list-icon-wrapper svg { width: 100%; height: auto; fill: currentColor; }

.list-title { display: block; color: var(--color-primary); margin-bottom: 4px; }

/* Performance Tracking Specifics */
.split-images { display: flex; gap: 24px; justify-content: center; }
.split-image-wrapper { flex: 1; }

/* --- Learning Modes (Centered Block) --- */
.learning-modes { text-align: center; }
.modes-intro { margin-bottom: 80px; }
.modes-main-heading, .modes-main-desc { margin-left: auto; margin-right: auto; }

.modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.mode-card {
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-icon-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(14, 31, 16, 0.1);
  width: 100%;
}

.card-icon-header svg {width: auto;  height: 46px; fill: currentColor; }

.card-label { font-size: 14px; font-weight: 600; letter-spacing: 0.1em; }
.card-title { font-family: var(--font-heading); font-size: 32px; margin-bottom: 20px; }
.card-description { font-size: 18px; line-height: 1.6; }

/* --- Final CTA Section --- */
.final-cta {
  background-color: var(--white);
  text-align: center;
}

.final-cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 120px;
}

.final-cta-heading {
  font-family: var(--font-heading);
  font-size: 80px; /* Large heading as seen in the image */
  color: var(--color-primary);
  margin-bottom: 32px;
  line-height: 1.1;
}

.final-cta-description {
  font-size: 24px;
  color: var(--color-secondary);
  max-width: 600px;
  margin-bottom: 48px;
}

.app-badges {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.app-badge-link {
  transition: transform 0.2s ease;
}

.app-badge-link:hover {
  transform: scale(1.05);
}

.app-badge-link img {
  height: 60px; /* Standard badge height */
  width: auto;
}

/* Ensure the image hugs the 'inner' edge in text-right sections */
.text-right .feature-image-container {
  display: flex;
  justify-content: center; /* Pushes the image to the right side of its column */
}

/* Ensure the image hugs the 'inner' edge in text-left sections (just in case) */
.text-left .feature-image-container {
  display: flex;
  justify-content: center; /* Pushes the image to the left side of its column */
}

/* --- Footer Styles --- */
.site-footer {
  background-color: var(--white);
  border-top: 1px solid rgba(66, 73, 64, 0.1);
  padding: 40px 0;
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  flex-wrap: wrap;
  gap: 32px;
}

.logo-text {
  color: var(--color-primary);
  font-family: var(--font-heading); /* Changed to Lora */
  font-weight: 600; /* Lora looks better slightly lighter than Inter Bold */
  font-size: 24px;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
}

.footer-logo-text {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.05em;
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  text-decoration: none;
  color: var(--color-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--color-primary);
}

.footer-copyright {
  color: var(--color-secondary);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
  .footer-layout {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .footer-nav {
    justify-content: center;
  }
}



/* Mobile adjustments for the CTA */
@media (max-width: 768px) {
  .final-cta-heading {
    font-size: 48px;
  }

  .final-cta-description {
    font-size: 18px;
  }
}

/* Card Colors */
.card-basic { background-color: #E8EDE9; color: var(--color-primary); }
.card-coach { background-color: var(--color-primary); color: #FFFFFF; }
.card-challenge { background-color: #0E1F10; color: #FFFFFF; }

/* --- Responsiveness --- */
@media (max-width: 1024px) {
  .hero-heading { font-size: 64px; }
}

@media (max-width: 900px) {
  .modes-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 80px 24px; }


  /* Hero Mobile Fix: Flatten grid to stack vertically */
  .hero-layout {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 32px;
  }

  .hero-text-content, .hero-image-container, .hero-actions {
    width: 100%;
    grid-area: auto;
  }

  .hero-image-container { order: 2; }
  .hero-actions {
    order: 3;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .feature-layout { flex-direction: column; text-align: left; }
  .feature-image-container { order: 2; margin-top: 40px; width: 100%; }
  .text-right .feature-text-content { text-align: left; }

  .hero-heading { font-size: 48px; }
  .responsive-img { max-height: 45vh; margin: 0 auto; }}

/* Update these specific rules in your style.css */

@media (min-width: 769px) {
  /* 1. Force the text container to anchor everything to the right */
  .text-right .feature-text-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Pushes all children (h3, p, ul) to the right edge */
    text-align: right;
  }

  /* 2. The List: Move the whole block right, but keep internal alignment left */
  .text-right .feature-list-icons {
    align-self: flex-end;   /* Pushes the UL block to the right */
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Keeps the LI items starting from the left edge of the UL */
    width: fit-content;      /* Ensures the block is only as wide as its longest item */
  }

  .text-right .feature-list-icons li {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Icons stay on the left */
    text-align: left;            /* Text flows to the right from the icon */
    width: 100%;
  }

  /* 3. Ensure icons have the correct spacing when text is right-aligned */
  .text-right .list-icon-wrapper {
    margin-right: 16px;
    margin-left: 0;
  }
}

/* --- Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-speed) var(--transition-curve), transform var(--transition-speed) var(--transition-curve);
  will-change: transform, opacity;
}

.reveal.active { opacity: 1; transform: translateY(0); }
