/* public/css/blue-ribbon-story.css
   Page-specific styles for "Our Story" (/our-story).
   Reset, tokens, header/mobile-nav/footer, and the shared hover/badge
   utility classes live in blue-ribbon-home.css, loaded first on this
   page too - this file only adds what's unique to Our Story. */

/* Hero */
.brf-story-hero {
  position: relative;
}
.brf-story-hero__band {
  background: var(--brf-naranja);
  padding: 0.875rem 0 0;
  overflow: hidden;
}
.brf-story-hero__eyebrow {
  display: block;
  margin: 0 1.5rem 0.75rem;
  font-family: var(--brf-font-gothic);
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: var(--brf-track-wide);
  text-transform: uppercase;
  color: var(--brf-crema);
}
.brf-story-hero__frame {
  width: 100%;
  height: clamp(220px, 42vw, 560px);
  overflow: hidden;
}
.brf-story-hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
}
.brf-story-hero__marquee-mask {
  overflow: hidden;
  width: 100%;
  height: clamp(2.5rem, 7.6vw, 6.375rem);
  margin: 0.75rem 0 1.5rem;
}
.brf-story-hero__marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.875rem);
  width: max-content;
  height: 100%;
  white-space: nowrap;
  will-change: transform;
}
.brf-story-hero__marquee-text {
  font-family: var(--brf-font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 7.5rem);
  line-height: 0.85;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brf-crema);
}
.brf-story-hero__marquee-logo {
  width: clamp(28px, 4.5vw, 60px);
  height: clamp(28px, 4.5vw, 60px);
  flex: 0 0 auto;
}
.brf-story-hero__tagline {
  display: block;
  padding: 0.375rem 1.5rem;
  font-family: var(--brf-font-gothic);
  font-size: clamp(0.875rem, 1.4vw, 1.125rem);
  letter-spacing: 0.05em;
  text-align: right;
  text-transform: uppercase;
  color: var(--brf-naranja);
}
.brf-story-hero__rule {
  height: var(--brf-rule);
  background: var(--brf-naranja);
}

/* Intro */
.brf-story-intro {
  display: grid;
  grid-template-columns: minmax(160px, 320px) 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
  max-width: 75rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 1.5rem;
}
.brf-story-intro__media {
  position: relative;
  justify-self: center;
}
.brf-story-intro__img {
  display: block;
  width: clamp(160px, 20vw, 256px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
}
.brf-badge-fresh--story {
  position: absolute;
  right: -1.25rem;
  bottom: -0.5rem;
  padding: clamp(7px, 0.9vw, 12px) clamp(15px, 2vw, 22px);
  background: var(--brf-crema);
  border: 3px solid var(--brf-azul);
  color: var(--brf-azul);
  font-size: clamp(13px, 1.5vw, 18px);
}
.brf-story-intro__text {
  margin: 0;
  max-width: 43rem;
  font-family: var(--brf-font-body);
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  line-height: 1.5;
  color: var(--brf-azul);
}

/* Timeline */
.brf-timeline__rule {
  height: var(--brf-rule);
  background: var(--brf-naranja);
}
.brf-timeline {
  position: relative;
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1.5rem clamp(3rem, 6vw, 5rem);
}

/* Center rail: a faded track spanning the full timeline, with a solid
   fill on top that grows downward as the reader scrolls (see
   setupTimelineFill() in blue-ribbon-home.js), the "chicken" seal riding
   its leading edge. */
.brf-timeline__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 15px;
  transform: translateX(-50%);
  pointer-events: none;
}
.brf-timeline__line-track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 5px;
  transform: translateX(-50%);
  background: rgba(255, 76, 44, 0.5);
}
.brf-timeline__line-fill {
  position: absolute;
  left: 50%;
  top: 0;
  width: 15px;
  height: 0;
  transform: translateX(-50%);
  background: var(--brf-naranja);
}
.brf-timeline__line-tip {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  display: grid;
  place-items: center;
  width: clamp(44px, 5.5vw, 64px);
  height: clamp(44px, 5.5vw, 64px);
  background: var(--brf-naranja);
  border: 3px solid var(--brf-crema);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--brf-naranja);
}
.brf-timeline__line-tip-mark {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

.brf-timeline__stop {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  column-gap: clamp(2.5rem, 6vw, 5rem);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.brf-timeline__stop--left .brf-timeline__card {
  grid-column: 1;
  text-align: right;
}
.brf-timeline__stop--right .brf-timeline__card {
  grid-column: 2;
  text-align: left;
}
.brf-timeline__stop--center {
  grid-template-columns: 1fr;
  margin-top: clamp(1rem, 3vw, 2rem);
}
.brf-timeline__stop--center .brf-timeline__card {
  position: relative;
  z-index: 2;
  justify-self: center;
  max-width: 38rem;
  padding: clamp(1rem, 3vw, 2rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--brf-crema);
  text-align: center;
}

.brf-timeline__marker {
  position: absolute;
  left: 50%;
  top: clamp(2rem, 5vw, 3.5rem);
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--brf-crema);
  border: 3px solid var(--brf-naranja);
  border-radius: 50%;
  z-index: 1;
  transition: transform 300ms var(--brf-ease, ease);
}
.brf-timeline__stop:hover .brf-timeline__marker {
  transform: translateX(-50%) scale(1.35);
}
.brf-timeline__marker--passed {
  transform: translateX(-50%) scale(1.62);
  background: #fff;
  border-color: var(--brf-naranja);
}

.brf-timeline__card {
  display: grid;
  gap: 0.4rem;
}
.brf-timeline__card:hover .brf-timeline__img {
  transform: scale(1.04);
}
.brf-timeline__year {
  font-family: var(--brf-font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.75rem);
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--brf-naranja);
}
.brf-timeline__title {
  margin: 0;
  font-family: var(--brf-font-gothic);
  font-weight: 400;
  font-size: clamp(1.125rem, 1.8vw, 1.4375rem);
  line-height: 1.3;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brf-azul);
}
.brf-timeline__text {
  margin: 0;
  font-family: var(--brf-font-body);
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--brf-azul);
}
.brf-timeline__img {
  display: block;
  width: 100%;
  max-width: 18rem;
  height: auto;
  margin-top: 0.75rem;
  object-fit: cover;
  transition: transform 400ms var(--brf-ease, ease);
}
.brf-timeline__stop--left .brf-timeline__img {
  margin-left: auto;
}
.brf-timeline__stop--right .brf-timeline__img {
  margin-right: auto;
}

@media (max-width: 860px) {
  .brf-story-intro {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .brf-story-intro__text {
    text-align: left;
  }
  .brf-timeline__stop {
    grid-template-columns: 1fr;
    padding-left: 4.5rem;
  }
  .brf-timeline__marker {
    /* .brf-timeline__stop is the positioning context here, and it sits
       inside .brf-timeline's own 1.5rem padding — .brf-timeline__line
       below sits at 2rem, so 0.5rem (2rem - 1.5rem) here lands the
       marker on the rail instead of 1.5rem to its right. */
    left: 0.5rem;
    transform: none;
  }
  .brf-timeline__stop:hover .brf-timeline__marker {
    /* no translateX(-50%) here — the mobile marker centers via `left`,
       not a transform, so the desktop hover transform above would
       reintroduce a horizontal offset instead of just scaling. */
    transform: scale(1.35);
  }
  .brf-timeline__marker--passed {
    transform: scale(1.62);
    background: #fff;
    border-color: var(--brf-naranja);
  }
  .brf-timeline__line {
    left: 2rem;
    transform: none;
  }
  /* .brf-timeline__line-track, __line-fill, and __line-tip are nested
     INSIDE .brf-timeline__line (a 15px-wide box), not inside
     .brf-timeline itself — their desktop left:50%/translateX(-50%)
     already centers them correctly against that 15px box regardless of
     where the box sits, so they need no mobile override. Giving them
     the same 0.5rem correction as their .brf-timeline__line parent (as
     this used to do) double-applies the offset and pushes them off the
     rail. */
  .brf-timeline__stop--left .brf-timeline__card,
  .brf-timeline__stop--right .brf-timeline__card,
  .brf-timeline__stop--center .brf-timeline__card {
    grid-column: 1;
    text-align: left;
    justify-self: start;
    max-width: none;
  }
  .brf-timeline__stop--left .brf-timeline__img,
  .brf-timeline__stop--right .brf-timeline__img {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
