/* ---------------------------------------------------------------------
   Fixed site header. Invisible during the intro frame sequence; faded in
   by CoffeeHero as the sequence crossfades into the hero banner, then it
   persists as a normal sticky-feeling nav for the rest of the page.
--------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  /* Vertical spacing only -- horizontal inset comes from .site-header-inner's
     .container class, not padding here. */
  padding: 1.15rem 0;
  opacity: 0;
  pointer-events: none;
  /* A frosted glass panel (not a fade-to-transparent gradient) so the header
     stays legible over whatever scrolls beneath it -- hero banner, journey
     section, or anything added later -- instead of text behind it bleeding
     through and colliding with the nav once the page scrolls far enough. */
  background: rgba(10, 8, 6, 0.55);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border-bottom: 1px solid rgba(200, 168, 118, 0.22);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.2);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--coffee-cream);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  color: #e7ddcd;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--coffee-tan);
}

.site-header-cta {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--coffee-black);
  background: linear-gradient(135deg, #e3c393, #b8894f);
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.site-header-cta:hover {
  box-shadow: 0 6px 18px rgba(184, 137, 79, 0.4);
  transform: translateY(-1px);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hamburger toggle -- hidden entirely above the 900px breakpoint where
   .site-nav renders inline; below it, it's what reveals .site-nav as a
   full-width dropdown (see that breakpoint below) since there's no room
   for the links inline anymore. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--coffee-cream);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Morphs into an X when open -- driven by the aria-expanded state JS
   already has to maintain for accessibility, rather than a separate
   class doing the same job. */
.nav-toggle[aria-expanded='true'] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  /* Below 900px .site-nav stops being an inline row and becomes a
     full-width dropdown anchored under the (position:fixed) header --
     collapsed via max-height/opacity rather than display:none so the
     open/close has something to actually transition. */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background: rgba(10, 8, 6, 0.97);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    border-bottom: 1px solid rgba(200, 168, 118, 0.22);
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }

  .site-nav.site-nav--open {
    max-height: 20rem;
    opacity: 1;
  }

  .site-nav a {
    padding: 1rem 6.5%;
    /* Matches .container's own 6.5% half-gutter ((100-87)/2) so the link
       text lines up with the logo/CTA above it instead of hugging the
       dropdown's true edge. */
    border-bottom: 1px solid rgba(200, 168, 118, 0.12);
    font-size: 1rem;
  }

  .site-nav a:last-child {
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav {
    transition: none;
  }
}

/* ---------------------------------------------------------------------
   Scroll Section > Sticky Viewport
   The section owns the scroll distance (its height, set in JS from the
   frame count + reveal/hold budget); the sticky child pins to the
   viewport for that entire distance, then releases naturally into the
   next section once the reveal has fully settled.
--------------------------------------------------------------------- */
.hero-scroll-section {
  position: relative;
  width: 100%;
  background: #000;
}

.hero-sticky {
  position: sticky;
  top: 0;
  left: 0;
  /* 100% (of the already full-width .hero-scroll-section), not 100vw --
     vw includes the vertical scrollbar's width, so on a page this tall
     100vw is a few pixels wider than the visible viewport and causes a
     horizontal scrollbar of its own. */
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* Pure frame sequence -- no header, no copy, nothing but the canvas until
   the reveal crossfade begins. Opacity is written every tick from JS as
   the crossfade progresses, fading the canvas out in favor of the banner.
   inset:0 alone fills .hero-sticky exactly -- no width/height needed (or
   wanted; see the 100vw note above). */
.hero-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  /* Explicit, or a canvas takes its height from its buffer's aspect ratio
     -- CanvasRenderer.resize() sizes the buffer from this CSS box. */
  height: 100%;
  z-index: 1;
}

/* ---------------------------------------------------------------------
   Loading state: a minimal label + thin progress bar, not a spinner.
--------------------------------------------------------------------- */
.hero-loader {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--coffee-black);
  transition: opacity 0.5s ease;
}

.hero-loader--hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-loader-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coffee-tan-dim);
  margin: 0;
}

.hero-loader-track {
  width: 160px;
  height: 1px;
  background: rgba(200, 168, 118, 0.25);
}

.hero-loader-bar {
  height: 100%;
  width: 0%;
  background: var(--coffee-tan);
  transition: width 0.2s ease;
}

/* ---------------------------------------------------------------------
   Scroll cue over the first frames. JS writes its opacity (fades out on
   scroll); the label/arrow animations are pure CSS.
--------------------------------------------------------------------- */
.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2.5rem;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--coffee-cream);
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-scroll-cue--inline {
  position: static;
  transform: none;
  margin-top: 1.75rem;
}

.hero-scroll-cue-label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  animation: hero-scroll-cue-pulse 2s ease-in-out infinite;
}

.hero-scroll-cue-arrow {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.45rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: var(--coffee-tan);
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.6));
  animation: hero-scroll-cue-bounce 1.6s ease-in-out infinite;
}

/* Centered intro headline; JS drives opacity/transform/letter-spacing. */
.hero-intro-text {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: min(90vw, 56rem);
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--coffee-cream);
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
  will-change: transform, opacity;
}

/* Soft dark overlay behind the text; fades/scales with it since it's a child. */
.hero-intro-text::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 160vw;
  height: 160vh;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(10, 7, 5, 0.6) 0%, rgba(10, 7, 5, 0.35) 35%, rgba(10, 7, 5, 0.15) 65%);
}

.hero-intro-eyebrow {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--coffee-tan);
}

.hero-intro-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 4.75rem);
  line-height: 1.1;
}

/* Entrance waits for .hero-ready so it isn't spent behind the loader. */
.hero-intro-eyebrow,
.hero-intro-letter {
  opacity: 0;
}

.hero-ready .hero-intro-eyebrow {
  animation: hero-intro-rise 1s ease-out both;
}

.hero-intro-word {
  display: inline-block;
  white-space: nowrap;
}

/* Letters drop in one by one from a blur, then ride a slow looping wave. */
.hero-intro-letter {
  display: inline-block;
}

.hero-ready .hero-intro-letter {
  animation:
    hero-intro-letter-in 0.7s calc(var(--i) * 45ms) cubic-bezier(0.2, 0.8, 0.2, 1) both,
    hero-intro-letter-wave 3s calc(1.2s + var(--i) * 80ms) ease-in-out infinite;
}

@keyframes hero-intro-letter-in {
  from { opacity: 0; transform: translateY(-0.6em) rotate(-8deg); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes hero-intro-letter-wave {
  0%, 100% { transform: translateY(0); color: var(--coffee-cream); }
  50% { transform: translateY(-0.08em); color: var(--coffee-tan); }
}

@keyframes hero-intro-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes hero-scroll-cue-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

@keyframes hero-scroll-cue-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---------------------------------------------------------------------
   Hero banner layer -- the "real website" reveal underneath the frame
   sequence. `.hero-banner-layer` itself is a solid coffee-colored backdrop
   (what the canvas fades into first); `.hero-banner-bg-image` is a separate
   child that crossfades the farm photo in on top of it afterward, as its
   own beat. CoffeeHero drives both opacities from JS.
--------------------------------------------------------------------- */
.hero-banner-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: var(--coffee-black-soft);
  /* No flex here -- the copy card, product and features strip are each
     positioned independently so the copy can sit higher and the features
     can live in their own full-width strip pinned to the very bottom. */
  overflow: hidden;
}

.hero-banner-bg-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  /* A slow, subtle living/cinematic drift on hover -- purely decorative,
     clipped by .hero-sticky's overflow:hidden so it never spills out. */
  transition: transform 1.2s ease;
}

.hero-sticky:hover .hero-banner-bg-image {
  transform: scale(1.03);
}

/* JS animates this wrapper's transform (the center -> right slide). The
   floating idle animation below lives on the inner <img> instead, so the
   two transforms never fight over the same element. */
.hero-banner-product-wrap {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 40vw;
  max-width: 620px;
  z-index: 3;
}

.hero-banner-product {
  display: block;
  width: 100%;
  height: auto;
  /* Warm amber shadow (echoing the roast) plus a tighter contact shadow
     for grounding, instead of a flat neutral drop-shadow. */
  filter: drop-shadow(0 26px 38px rgba(140, 82, 24, 0.4)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4));
  /* Soft top/bottom fade so the cutout blends into whatever's behind it
     (solid backdrop or photo) instead of showing a hard rectangular edge. */
  mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 100%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 100%, transparent 100%);
  animation: hero-product-float 5.5s ease-in-out infinite;
}

@keyframes hero-product-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-banner-product {
    animation: none;
  }
}

.hero-banner-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 17vh;
  z-index: 4;
}

/* The glass text card -- separates the headline/description from the busy
   foliage behind it, per the "elevate the banner" brief. */
.hero-banner-card {
  max-width: 30rem;
  /* background: linear-gradient(135deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.22));
  border: 1px solid rgba(200, 168, 118, 0.35);
  border-radius: 18px;
  padding: 2rem 2.25rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); */
}

.hero-banner-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coffee-tan);
  border: 1px solid rgba(200, 168, 118, 0.4);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  margin-bottom: 1.25rem;
}

.hero-banner-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.6vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
}

.hero-title-main {
  color: var(--coffee-cream);
}

.hero-title-accent {
  color: var(--coffee-tan);
  font-style: italic;
}

.hero-banner-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: #e7ddcd;
  margin: 0;
}

/* Deliberately outside the card, with generous whitespace above -- keeps
   the CTAs feeling roomy and premium rather than crowding the copy. */
.hero-banner-ctas {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 2.25rem 0 0;
}

.hero-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  border: 1px solid rgba(231, 221, 205, 0.4);
  color: var(--coffee-cream);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hero-banner-cta:hover {
  transform: translateY(-2px);
}

.hero-banner-cta--primary {
  background: linear-gradient(135deg, #e3c393, #b8894f);
  border-color: transparent;
  color: var(--coffee-black);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 24px rgba(184, 137, 79, 0.32);
}

.hero-banner-cta--primary:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 14px 30px rgba(184, 137, 79, 0.48);
}

.hero-cta-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.hero-banner-cta--primary:hover .hero-cta-arrow {
  transform: translateX(4px);
}

/* Value-prop ribbon -- a dedicated full-width strip at the very bottom of
   the banner, separated from the photo by a thin gold accent line, instead
   of sitting inside the text card. */
.hero-features-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  background: linear-gradient(180deg, rgba(10, 7, 5, 0) 0%, rgba(8, 6, 4, 0.88) 45%, rgba(8, 6, 4, 0.96) 100%);
  border-top: 1px solid rgba(200, 168, 118, 0.28);
  padding: 1.35rem 0;
}

.hero-banner-features {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-banner-feature {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-feature-icon {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--coffee-tan);
}

.hero-feature-icon svg {
  width: 100%;
  height: 100%;
}

.hero-feature-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.hero-feature-text strong {
  font-size: 0.82rem;
  color: var(--coffee-cream);
  font-weight: 600;
}

.hero-feature-text small {
  font-size: 0.72rem;
  color: #b9ac99;
}

@media (max-width: 640px) {
  .hero-banner-product-wrap {
    width: 58vw;
    top: 60%;
  }
  .hero-banner-copy {
    bottom: 24vh;
  }
  .hero-banner-card {
    /* Narrower than the 95% mobile container so the card doesn't run
       under the product -- leaves a clear gap between text and packet. */
    max-width: 78%;
    padding: 1.5rem 1.4rem;
    border-radius: 14px;
  }
  .hero-banner-features {
    gap: 1.25rem;
  }
}

/* ---------------------------------------------------------------------
   Reduced motion: static composition, no canvas, no scrubbing, header and
   banner both settled in their final state immediately.
--------------------------------------------------------------------- */
.hero-sticky--static {
  position: relative;
  height: 100vh;
}

@media (prefers-reduced-motion: reduce) {
  .hero-loader {
    display: none;
  }
}
