
/* ============================================
   HOMEPAGE STYLES - Clean & Simple
   ============================================ */

/* Layout cleanup */
html.is-home .md-content {
  max-width: 100%;
  padding: 0;
  background: transparent;
}

html.is-home .md-content__inner {
  margin: 0;
  max-width: none;
  background: transparent;
}

html.is-home .md-main {
  background: transparent;
}

html.is-home .md-container {
  background: transparent;
}

html.is-home main {
  background: transparent;
}

html.is-home article {
  background: transparent;
}

html.is-home .md-header {
  background: transparent;
  border-bottom: none;
}

html.is-home .md-tabs {
  background: transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--md-primary-fg-color) 30%, transparent);
}

/* Dark background for homepage only */
html.is-home body {
  background: #0a0a0a;
  color: #ffffff;
  position: relative;
}

/* Subtle grid pattern overlay */
html.is-home body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  background-image: 
    linear-gradient(color-mix(in srgb, var(--md-primary-fg-color) 2%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--md-primary-fg-color) 2%, transparent) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -2;
  pointer-events: none;
}

/* Theme-specific hero background images */
html.is-home body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-position: 50% 25%;
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-attachment: scroll;
  opacity: 1;
  z-index: -3;
  pointer-events: none;
  filter: none;
}

@media (max-width: 768px) {
  html.is-home body::before {
    height: 100vh;
    background-position: center;
    background-size: cover;
  }
}

/* Light mode hero */
html.is-home body[data-md-color-scheme="default"]::before {
  background-image: url("../assets/images/hero_light.png");
}

/* Light mode: ensure hero copy is readable on the bright illustration */
html.is-home body[data-md-color-scheme="default"] {
  color: var(--md-default-fg-color, #111111);
}

html.is-home body[data-md-color-scheme="default"] .home-hero h1 {
  color: var(--md-default-fg-color, #111111);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 2px 10px rgba(255, 255, 255, 0.55);
}

html.is-home body[data-md-color-scheme="default"] .home-hero .homepage-subhead {
  color: var(--md-default-fg-color--light, rgba(0, 0, 0, 0.78));
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 2px 10px rgba(255, 255, 255, 0.45);
}

html.is-home body[data-md-color-scheme="default"] .home-hero strong {
  /* Keep your accent color, but give it a little help in light mode */
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 2px 10px rgba(255, 255, 255, 0.45);
}

/* Dark mode hero */
html.is-home body[data-md-color-scheme="slate"]::before {
  background-image: url("../assets/images/hero_dark.png");
}

/* ============================================
   HERO SECTION
   ============================================ */

.home-hero {
  text-align: left;
  /* Position hero copy within the illustrated "window" area of the background */
  padding: clamp(4.75rem, 10vh, 7.25rem) clamp(1.25rem, 4vw, 3rem) 12vh;
  max-width: 42rem;
  margin: 0 auto 0 2%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  position: relative;
  top: -6rem;
}

@media (max-width: 1024px) {
  .home-hero {
    margin-left: clamp(1.25rem, calc(10vw - 3rem), 5rem);
  }
}

@media (max-width: 768px) {
  .home-hero {
    top: 0;
    padding-top: clamp(5.25rem, 11vh, 7rem);
    margin-left: auto;
    margin-right: auto;
    max-width: 34rem;
  }
}

.home-hero h1 {
  font-size: clamp(1.75rem, 3.25vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 1.25rem 0;
  color: #ffffff;
  text-shadow: none;
  border-bottom: none;
  padding-bottom: 0;
}

.home-hero strong {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 500;
  display: block;
  margin-bottom: 1rem;
  color: rgba(255,255,255,0.65);
}

html.is-home body[data-md-color-scheme="default"] .home-hero strong {
  color: rgba(0,0,0,0.55);
}

.homepage-subhead {
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  font-weight: 400;
  color: #c0c0c0;
  max-width: 60ch;
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.homepage-links {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 1.25rem 0 0;
}

.cta-link {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  background: #00897b;
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 2px solid #00897b;
}

@media (max-width: 768px) {
  .cta-link {
    padding: 0.65rem 1.4rem;
    font-size: 0.9rem;
  }
}

.cta-link:hover {
  background: #26a69a;
  border-color: #26a69a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--md-primary-fg-color) 30%, transparent);
}

.cta-link--secondary {
  background: transparent;
  color: #00897b !important;
  border: 2px solid #00897b;
}

.cta-link--secondary:hover {
  background: color-mix(in srgb, var(--md-primary-fg-color) 10%, transparent);
  color: #26a69a !important;
  border-color: #26a69a;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: bounce 2.5s infinite;
  z-index: 10;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  stroke: #888;
  stroke-width: 1.5;
  fill: none;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50% { transform: translateX(-50%) translateY(10px); opacity: 1; }
}

/* ============================================
   IMPACT SECTION
   ============================================ */

.impact-section {
  background: rgba(20, 20, 20, 0.9);
  padding: 4rem 2rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

.impact-section h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 2.5rem 0;
  text-transform: none;
  letter-spacing: 0.01em;
  border-bottom: none;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Metric Cards */
.metric-card {
  background: color-mix(in srgb, var(--md-primary-fg-color) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-primary-fg-color) 25%, transparent);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.metric-card:hover {
  background: color-mix(in srgb, var(--md-primary-fg-color) 15%, transparent);
  border-color: color-mix(in srgb, var(--md-primary-fg-color) 50%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--md-primary-fg-color) 20%, transparent);
}

.metric-card h3 {
  font-size: 2.25rem;
  font-weight: 600;
  color: #00897b;
  margin: 0 0 0.5rem 0;
  line-height: 1;
  border-bottom: none;
}

.metric-card p {
  font-size: 0.9rem;
  color: #b0b0b0;
  margin: 0;
  line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .impact-section {
    padding: 3rem 1.5rem;
  }

  .home-hero {
    padding: 6vh 1.5rem 4vh;
  }
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.home-about {
  width: 100%;
  max-width: 100%;
  margin: -8rem auto 0;
  padding: 1.5rem 2rem 4rem;
  position: relative;
  z-index: 1;
  text-align: left;
}

.home-about p {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.85;
  color: #c0c0c0;
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

html.is-home body[data-md-color-scheme="default"] .home-about p {
  color: rgba(0, 0, 0, 0.72);
}

@media (max-width: 768px) {
  .home-about {
    padding: 3rem 1.5rem 2rem;
  }
}
