/* =========================================================
   RECREA — our-story.css (COMPLETE / STANDALONE)
   For the Our Story page only. Nav + footer come from the
   WordPress theme, so they are NOT included here.
   Palette:
     Espresso:   #1C0E06
     Brown:      #3D1F0E
     Coffee-mid: #8B5E3C
     Tan:        #C8A882
     Linen:      #F5EFE6
     Cream:      #FDFAF6
   ========================================================= */

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: #FDFAF6;
  color: #1C0E06;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

#main {
  padding-bottom: 0 !important;
  padding-top: 0 !important;
}

img { display: block; max-width: 100%; }

a { text-decoration: none; color: inherit; }

.container {
  width: 90%;
  max-width: 1160px;
  margin-inline: auto;
}

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

em {
  font-style: italic;
  font-weight: 300;
}

.hero__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8B5E3C;
  margin-bottom: 1.25rem;
}

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8B5E3C;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  color: #1C0E06;
}

.section-sub {
  font-size: 1rem;
  color: #5a3e2b;
  max-width: 520px;
  margin-bottom: 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.3s ease, transform 1.3s ease;
}

.section-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-header .section-sub {
  margin-inline: auto;
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: 2px;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background-color: #1C0E06;
  color: #F5EFE6;
}
.btn--primary:hover {
  background-color: #3D1F0E;
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: transparent;
  color: #1C0E06;
  border: 1.5px solid #1C0E06;
}
.btn--secondary:hover {
  background-color: #1C0E06;
  color: #F5EFE6;
}

/* ─────────────────────────────────────────
   STORY HERO (text left, image right)
───────────────────────────────────────── */
.story-hero {
  background-color: #F5EFE6;
	padding:20px;
	margin-bottom:0!important;
}

.story-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  text-align: left;
}

.story-hero__headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #1C0E06;
  margin-bottom: 1.5rem;
  /* scroll-reveal removed in favor of load-triggered fade-in (see below) */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.story-hero__headline.visible {
  opacity: 1;
  transform: translateY(0);
}

.story-hero__sub {
  font-size: 1.05rem;
  color: #5a3e2b;
  max-width: 460px;
  line-height: 1.75;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.story-hero__sub.visible {
  opacity: 1;
  transform: translateY(0);
}

.story-hero__image {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: #3D1F0E;
  /* Load-triggered fade-in: starts slightly zoomed in, settles
     to full size. (Previously also animated `filter: blur()`
     alongside transform/opacity — that combination renders
     inconsistently in some browsers, especially inside an
     overflow:hidden container, which is why it sometimes
     didn't visibly fade at all. Dropped for reliability.) */
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease, transform 1.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.story-hero__image.visible {
  opacity: 1;
  transform: scale(1);
}

.story-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─────────────────────────────────────────
   INTRO QUOTE
───────────────────────────────────────── */
.story-intro {
	margin-top:0!important;
  background-color: #1C0E06;
  padding: 5rem 0;
}

.story-intro__inner {
  max-width: 720px;
  text-align: center;
  margin-inline: auto;
}

.story-intro__quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  line-height: 1.5;
  color: #C8A882;
  position: relative;
  padding: 0 1rem;
  /* Scroll-triggered fade + rise, matching .section-header's feel */
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.5s ease, transform 1.5s ease;
}

.story-intro__quote.visible {
  opacity: 1;
  transform: translateY(0);
}

.story-intro__quote::before {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background-color: #C8A882;
  margin: 0 auto 1.75rem;
}
/* ─────────────────────────────────────────
   TIMELINE
───────────────────────────────────────── */
.timeline {
  background-color: #FDFAF6;
  padding: 2rem 0 7rem;
}
 
.timeline__track {
  position: relative;
  max-width: 1040px;
  margin-inline: auto;
}
 
/* Center spine — base track (faint, always visible) */
.timeline__spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background-color: rgba(200, 168, 130, 0.25);
  transform: translateX(-50%);
  z-index: 1;
}
 
/* Center spine — fill that draws downward as you scroll.
   FIX: this previously had `left: 0; width: 100%`, which made it
   a full-width block instead of a thin line overlapping the spine.
   It now matches .timeline__spine's positioning exactly (50% + 1px
   + translateX(-50%)) so only its HEIGHT animates. */
.timeline__spine-fill {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 0%;
  background-color: #8B5E3C;
  transform: translateX(-50%);
  transform-origin: top;
  transition: height 0.15s linear;
  z-index: 2;
}
 
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 3.5rem 0;
}
 
.timeline__item--reverse .timeline__image { order: 2; }
.timeline__item--reverse .timeline__text  { order: 1; }
 
/* Center marker */
.timeline__marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #1C0E06;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 0 0 6px #FDFAF6;
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
 
.timeline__marker.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
 
/* One-shot pulse ring when a marker activates */
.timeline__marker.visible::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid #8B5E3C;
  opacity: 0;
  animation: timelinePulse 0.9s ease-out 0.2s 1;
}
 
@keyframes timelinePulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
 
.timeline__marker span {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #C8A882;
}
 
.timeline__image {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: #3D1F0E;
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  transition: opacity 1.4s ease, transform 1.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
 
.timeline__image.visible { opacity: 1; transform: translateY(0) scale(1); }
 
.timeline__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
 
.timeline__image:hover img { transform: scale(1.04); }
 
.timeline__text {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.4s ease 0.12s, transform 1.4s ease 0.12s;
}
 
.timeline__text.visible { opacity: 1; transform: translateY(0); }
 
.timeline__title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: #1C0E06;
  margin-bottom: 0.85rem;
  line-height: 1.2;
}
 
.timeline__text p {
  font-size: 0.97rem;
  color: #5a3e2b;
  line-height: 1.8;
}
/* ─────────────────────────────────────────
   IMPACT STATS
───────────────────────────────────────── */
.impact {
  background-color: #1C0E06;
  padding: 6rem 0;
}

.impact .section-label { color: #8B5E3C; }
.impact .section-title { color: #F5EFE6; }
.impact .section-title em { color: #C8A882; }

.impact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}

.impact__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem 1rem;
  border-left: 1px solid rgba(200, 168, 130, 0.18);
}

.impact__stat:first-child { border-left: none; }

.impact__number {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  color: #F5EFE6;
  line-height: 1;
}

.impact__percent {
  font-size: 0.55em;
  color: #C8A882;
}

.impact__unit {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C8A882;
}

/* ─────────────────────────────────────────
   STORY CTA
───────────────────────────────────────── */
.story-cta {
  background-color: #F5EFE6;
  padding: 6rem 0;
  text-align: center;
}

.story-cta__inner { max-width: 560px; margin-inline: auto; }

.story-cta .section-title { margin-bottom: 2rem; }

/* ─────────────────────────────────────────
   RESPONSIVE — 900px
───────────────────────────────────────── */
@media (max-width: 900px) {
  .story-hero { padding: 9rem 0 4rem; }

  .story-hero__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .story-hero__sub { margin-inline: auto; }

  .story-hero__image {
    aspect-ratio: 16 / 10;
    order: -1; /* image shows above text on mobile */
  }

  /* FIX: this previously targeted `.timeline__track::before`, a
     pseudo-element that doesn't exist — the spine is built from
     real .timeline__spine / .timeline__spine-fill divs, so this
     rule never matched anything and the spine stayed at its
     desktop left:50% position on mobile. Now correctly moves
     both spine elements to align with the marker's left:32px. */
  .timeline__spine,
  .timeline__spine-fill {
    left: 32px;
  }

  .timeline__item,
  .timeline__item--reverse {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2.5rem 0 2.5rem 4.5rem;
  }

  .timeline__item--reverse .timeline__image,
  .timeline__item--reverse .timeline__text {
    order: initial;
  }

  .timeline__marker {
    top: 2.5rem;
    left: 32px;
    transform: translate(-50%, 0);
    width: 44px;
    height: 44px;
  }

  .timeline__marker span { font-size: 0.95rem; }

  .impact__grid { grid-template-columns: 1fr; gap: 0; }
  .impact__stat { border-left: none; border-top: 1px solid rgba(200, 168, 130, 0.18); }
  .impact__stat:first-child { border-top: none; }
}

/* ─────────────────────────────────────────
   RESPONSIVE — 600px
───────────────────────────────────────── */
@media (max-width: 600px) {
  .story-hero { padding: 8rem 0 3rem; }
  .story-intro { padding: 3.5rem 0; }
  .timeline { padding: 1rem 0 4rem; }
  .timeline__item, .timeline__item--reverse { padding: 2rem 0 2rem 3.75rem; }
  .timeline__spine,
  .timeline__spine-fill { left: 26px; }
  .timeline__marker { left: 26px; width: 38px; height: 38px; }
  .impact { padding: 4rem 0; }
  .story-cta { padding: 4.5rem 0; }
}

/* ─────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .section-header,
  .timeline__image,
  .timeline__text,
  .story-hero__headline,
  .story-hero__sub,
  .story-hero__image,
  .story-intro__quote {
    opacity: 1;
    transform: none;
    transition: none;
  }
}