/* CW Coffee home page: moving photo hero, "From green bean to bag" strip and roastery gallery.
   Loaded only by templates/public/home.html. Photos live in static/img/cw/. */
/* ---------------------------------------- homepage hero: moving photo background */
/* Roastery photos crossfade (with a slow zoom) behind the logo and text. A light wash
   keeps the dark text readable — lower the .80 / .66 / .52 values below to show more photo. */
.hero.hero-photos { isolation: isolate; background: #2a231c; }
.hero-photos .hero-plant { display: none; }
.hero-photo-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-photo-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255, 253, 249, .80) 0%, rgba(255, 253, 249, .66) 55%, rgba(255, 253, 249, .52) 100%); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.hero-slide.on { opacity: 1; }
.hero-slide picture, .hero-slide img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.hero-slide img { transform: scale(1); transition: transform 7s linear; }
.hero-slide.on img { transform: scale(1.08); }
.hero-photos .hero-logo { filter: drop-shadow(0 6px 22px rgba(255, 253, 249, .9)); }
@media (max-width: 820px) { .hero-photo-bg::after { background: rgba(255, 253, 249, .78); } }

/* --------------------------------------- homepage: from green bean to bag */
.bb-steps { list-style: none; margin: 20px 0 0; padding: 0 0 10px; counter-reset: step;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.bb-steps li { counter-increment: step; scroll-snap-align: start; min-width: 0; }
.bb-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-sm); background: var(--kraft-light); }
.bb-photo picture, .bb-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bb-photo::before { content: counter(step, decimal-leading-zero); position: absolute; z-index: 1; left: 10px; top: 6px;
  font-family: var(--serif); font-weight: 600; font-size: 2rem; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }
.bb-steps h3 { margin: .7rem 0 .2rem; font-size: 1.1rem; }
.bb-steps p { margin: 0; font-size: .93rem; color: var(--muted); }
@media (max-width: 700px) { .bb-steps { grid-auto-columns: 70%; } }

/* ------------------------------------------ homepage: roastery gallery */
.gallery-grid { columns: 3 240px; column-gap: 12px; margin-top: 20px; }
.gallery-item { display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0; background: none;
  break-inside: avoid; cursor: zoom-in; border-radius: var(--r-sm); overflow: hidden; }
.gallery-item img { width: 100%; height: auto; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1200px); max-height: 92vh; overflow: visible; }
.gallery-lightbox::backdrop { background: rgba(15, 12, 9, .88); }
.gallery-lightbox img { max-height: 84vh; width: auto; height: auto; margin: auto; border-radius: var(--r-sm); }
.gallery-lightbox p { color: #eee; text-align: center; font-size: .9rem; margin: .6rem 0 0; }
.gallery-lightbox form { position: absolute; top: 6px; right: 6px; margin: 0; }
.lightbox-close { background: rgba(0, 0, 0, .6); color: #fff; border: 0; font-size: 1.4rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
