/* home.css */

/* Base document background */

html {
  background-color: #fff;
}

/* Overall home page shell and scroll settings */
/*
  Home layout narrates two full-viewport panels stacked vertically. Because the
  header uses z-index 3000 and floats above the hero image, we set the body as
  a positioning context so the footer (which also floats over photography) can
  be absolutely positioned later without affecting other pages.
*/
body.home-page {
  background-color: #fff;
  color: #f6f5f0;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  --home-ribbon-height: 70px;
  --home-footer-height: 70px;
  --section-padding: clamp(2rem, 5vw, 5rem);
  scroll-padding-top: var(--home-ribbon-height); /* offset sticky top ribbon */
  position: relative;
}

/* Wrapper for all home sections */
.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Generic section block with snap behavior */
.home-section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--section-padding);
  box-sizing: border-box;
}

/* Hero with background photo */
.hero-section {
  background-image: url("../assets/logos/home_background.JPG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  padding-top: calc(var(--section-padding) + var(--home-ribbon-height));
  position: relative;
}

/* Gradient overlay to keep hero text readable */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(5, 27, 16, 0.25), rgba(8, 66, 37, 0.15));
}

/* Stack that houses hero headline, subhead, and CTA */
.hero-content {
  position: relative;
  max-width: clamp(320px, 75vw, 860px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: center;
  align-items: center;
}

/* Main hero headline */
.hero-content h1 {
  font-size: clamp(2.6rem, 4.5vw, 3.6rem);
  line-height: 1.08;
  margin: 0;
  max-width: 48ch;
  text-wrap: balance;
}

/* Hero supporting copy */
.hero-subheading {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  margin: 0;
  color: #f1efe6;
  max-width: 60ch;
}

/* Primary CTA positioning inside hero */
.hero-content .primary-cta {
  align-self: center;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: clamp(1.75rem, 3vw, 3.25rem);
}

.hero-actions .home-cta {
  min-width: 150px;
}

/* Eyebrow label used in story copy */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f8d8a6;
  margin: 0;
}

/* Shared CTA button style */
.home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* CTA hover lift */
.home-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Solid CTA flavor */
.primary-cta {
  background-color: #f6a756;
  color: #1d271f;
}

/* Outlined CTA flavor */
.secondary-cta {
  background-color: transparent;
  border: 2px solid #a7e1c0;
  color: #a7e1c0;
}

/*
  Story section explanation:
  - It must consume an entire viewport to mirror the hero above.
  - We pad the bottom by the footer's height so the overlay footer never hides
    the last line of copy.
  - The background image deliberately spans both the section and the footer, so
    we keep the image on the section and float the footer above it rather than
    duplicating gradients.
*/
.story-section {
  background-image: url("../assets/logos/home_background_2.JPG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 4vw, 3.25rem);
  padding: clamp(3.5rem, 9vh, 6rem) var(--section-padding) calc(clamp(2rem, 4vh, 3rem) + var(--home-footer-height));
  min-height: 100vh;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  isolation: isolate;
}

.story-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.story-cta {
  margin-top: clamp(2rem, 4vw, 3rem);
  min-width: 170px;
}



.story-title {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin: 0;
  color: #f7fbf2;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.feature-grid {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(1rem, 2vw, 1.75rem);
}

/* Individual feature block */
.feature-item {
  text-align: center;
  color: #f7fbf2;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
}

.feature-text {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.6;
  color: #f3efe5;
}

/* Icon wrapper to keep stroke weight consistent */
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(167, 225, 192, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a7e1c0;
  background: rgba(8, 66, 37, 0.35);
}

.feature-icon svg {
  width: 70%;
  height: 70%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon .icon-fill {
  fill: currentColor;
  stroke: none;
}

/* Section navigation arrows inviting users to scroll between panels */
.section-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  z-index: 2000;
  transition: background 0.2s ease, transform 0.2s ease;
}

.section-nav span {
  font-size: 1.35rem;
  line-height: 1;
}

.section-nav:hover {
  background: rgba(0, 0, 0, 0.3);
}

.section-nav--down {
  bottom: clamp(1.5rem, 5vh, 2.5rem);
  animation: navBounceDown 3s ease-in-out infinite;
}

.section-nav--up {
  top: clamp(1.25rem, 4vh, 2.5rem);
  animation: navBounceUp 3s ease-in-out infinite;
}

@keyframes navBounceDown {
  0%, 70%, 100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, 6px);
  }
}

@keyframes navBounceUp {
  0%, 70%, 100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, -6px);
  }
}


/* Footer ribbon styling when on home page */
/* Shared footer styles remain, but the home footer floats over imagery.
   The z-index places it below the header but above the background so links
   stay accessible without re-theming other pages' footers. */
.home-page .bottom-ribbon {
  background-color: transparent;
  border-top: none;
  color: #f7fbf2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.home-page .bottom-ribbon a {
  color: #f7fbf2;
}

.home-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2500; /* keep below the header (3000) yet above background imagery */
  padding: 0.75em 1.5em;
}


/* Transparent top ribbon variant over hero */
.home-page #topRibbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  z-index: 3000;
}

/* Tablet adjustments */
@media (max-width: 960px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* Small screen adjustments */
@media (max-width: 640px) {
  /* Reduce padding on the body for smaller screens */
  body.home-page {
    --section-padding: 1.5rem;
  }

  /* Keep hero copy centered on phones */
  .hero-content {
    text-align: center;
  }

  /* Make CTAs span full width for thumb reach */
  .home-cta {
    width: 100%;
  }

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