/* =========================================================
   SUNRISE COFFEE ROASTERS — theme
   Palette/font overrides only. Structure, spacing and every
   component pattern come from ../../_starter-kit/base.css.
   ========================================================= */

:root {
  --color-accent: #e08a1e;
  --color-accent-dark: #b96f14;
  --color-dark: #2e2013;
  --color-cream: #fdf8f0;
  --color-cream-alt: #f7ead4;
  --color-text: #3a2a1c;
  --color-text-light: #8a7461;
  --color-white: #ffffff;
  --color-border: #ecdfc7;

  --font-heading: "Bricolage Grotesque", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1, h2, h3, h4 {
  letter-spacing: -0.01em;
}


.nav-logo img {
  height: 150px;
  width: auto;
  display: block;
}

/* The header is position:fixed (base.css), so a taller logo makes the whole
   nav taller without pushing page content down on its own — bump the hero's
   top padding to clear it (keep this 150px in sync with .nav-logo img's
   height above), since the hero is the only section that sits directly
   under the fixed header. The extra 40vh beyond that is just breathing
   room: it pushes the hero's total height past its 100vh min, giving more
   scroll distance while it's still in view — so the drum rotation/sweep/
   bean animations stay visible for longer before the hero scrolls out of
   frame. */
.hero {
  padding-top: calc(150px + 2.2rem + 2rem + 40vh);
}


/* ---------------------------------------------------------
   Hero drum (the whole hero IS the top-down roaster view).
   A big rake arm pivots from --pivot-x/--pivot-y and sweeps
   around as you scroll; when it swings past the text, the
   text gets shoved aside and springs back once it's clear.
   --------------------------------------------------------- */
.hero .container {
  position: relative;
}

.hero-drum {
  --pivot-x: 66%;
  --pivot-y: 46%;
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: repeating-radial-gradient(
    circle at var(--pivot-x) var(--pivot-y),
    rgba(255, 255, 255, 0.05) 0px 2px,
    transparent 2px 54px
  );
}

.drum-pivot {
  position: absolute;
  left: var(--pivot-x);
  top: var(--pivot-y);
  width: 0;
  height: 0;
  transform: rotate(var(--arm-rotate, 0deg));
}

.drum-pivot::before {
  content: "";
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent-dark);
  border: 2px solid var(--color-cream);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.4);
}

.drum-arm {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: min(52vw, 620px);
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent-dark), var(--color-accent));
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.35);
}

/* Beans sitting inside the drum — each rests at its own --orbit-offset
   angle until the arm catches up to it, then JS drives --bean-angle to
   match the arm's rotation exactly (carried along) for as long as it's
   within reach. Once the arm outruns it, the bean just stays put at
   that advanced angle — no snap back — until the arm laps around again. */
.bean-orbit {
  position: absolute;
  left: var(--pivot-x);
  top: var(--pivot-y);
  width: 0;
  height: 0;
  transform: rotate(var(--bean-angle, var(--orbit-offset, 0deg)));
}

.bean {
  position: absolute;
  left: var(--orbit-radius, 100px);
  top: 0;
  width: 13px;
  height: 8px;
  margin: -4px 0 0 -6.5px;
  border-radius: 50%;
  background-color: var(--color-accent);
  background-image: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.4) 40% 60%, transparent 60%);
  transform: rotate(var(--bean-tilt, 0deg));
  opacity: 0.85;
}

.bean-dark {
  background-color: var(--color-accent-dark);
  opacity: 0.65;
}

.hero-content {
  position: relative;
  z-index: 1;
  transform: translate(var(--sweep-x, 0px), var(--sweep-y, 0px));
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content {
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .bean-orbit {
    transition: transform 0.06s linear;
  }
}

@media (max-width: 720px) {
  .hero-drum {
    --pivot-x: 50%;
    --pivot-y: 20%;
  }

  .drum-arm {
    width: min(80vw, 420px);
  }
}

/* ---------------------------------------------------------
   Brew process (cup fills with scroll)
   --------------------------------------------------------- */
.cup-fill-wrap {
  display: flex;
  justify-content: center;
}

.cup-svg {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
}

.cup-liquid {
  fill: var(--color-accent);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(var(--cup-fill, 0));
}

.cup-outline {
  fill: none;
  stroke: var(--color-dark);
  stroke-width: 4;
  stroke-linejoin: round;
}

.cup-handle {
  fill: none;
  stroke: var(--color-dark);
  stroke-width: 4;
  stroke-linecap: round;
}

.cup-rim {
  fill: var(--color-cream);
  stroke: var(--color-dark);
  stroke-width: 4;
}

@media (prefers-reduced-motion: no-preference) {
  .cup-liquid {
    transition: transform 0.05s linear;
  }
}

/* ---------------------------------------------------------
   Gallery — 4 images in a single row on desktop/tablet. Scoped to
   min-width so base.css's own max-width:720px rule (1 column) still
   wins the cascade on mobile — an unscoped rule here would otherwise
   beat it, since theme.css loads after base.css regardless of which
   media query is narrower.
   --------------------------------------------------------- */
@media (min-width: 721px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
