/* Homepage hero: wave photograph (the only moving layer), logo + CTA right, Philly cutout bottom-left. Loaded after styles.css. */
.hero { position: relative; overflow: hidden; background: #0d2f2c; color: #fff; isolation: isolate; }
.hero-b { --food-w: 60vw; --edge-h: clamp(30px, 4.4vw, 68px); }

/* Wave photograph; the only moving layer. Origin sits near the curl. */
.hero-wave { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; z-index: -2; transform-origin: 46% 60%; }
/* Localized contrast behind the copy only; the rest of the photograph stays rich */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 52% 46% at 20% 30%, rgba(6,28,26,.34) 0%, rgba(6,28,26,0) 100%); }
/* The single wave-shaped transition into the cream content */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: var(--edge-h); z-index: -1; background: url("img/wave-edge.svg") center bottom / 100% 100% no-repeat; pointer-events: none; }

/* Food: absolute, bleeds past the left and bottom edges, always behind the text */
.hero-food { position: absolute; z-index: 0; left: -8vw; bottom: -7vw; width: var(--food-w); pointer-events: none; }
.hero-food img { display: block; width: 100%; height: auto; max-width: none; filter: drop-shadow(0 20px 22px rgba(4,20,18,.4)) drop-shadow(0 4px 6px rgba(4,20,18,.3)); }

/* Layout: copy left, logo + CTA stacked on the right */
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30vw); grid-template-areas: "copy logo" "copy cta"; grid-template-rows: auto 1fr; column-gap: 4vw; align-items: start; min-height: clamp(560px, 48vw, 740px); padding-top: clamp(32px, 3.4vw, 50px); padding-bottom: 40px; }
.hero-logo { grid-area: logo; justify-self: end; width: 100%; max-width: 430px; height: auto; margin: 0; box-shadow: 0 6px 24px rgba(0,0,0,.28); }
.hero-copy { grid-area: copy; align-self: start; padding-top: clamp(24px, 5.2vw, 84px); }
.hero h1 { margin: 0 0 14px; font: 400 clamp(38px, 4.6vw, 66px)/1.02 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.hero h1 span { display: block; }
.hero h1, .hero p { text-shadow: 0 2px 3px rgba(4,20,18,.55), 0 2px 18px rgba(4,20,18,.45); }
.hero-copy p { margin: 0; max-width: 31ch; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; }
.hero-cta { grid-area: cta; justify-self: center; width: min(256px, 100%); margin-top: clamp(24px, 4.2vw, 62px); }
.hero-cta .btn { display: block; padding: 24px 28px; font-size: 18px; border-radius: 4px; }
.hero-cta .btn-light:hover { background: #F6F2E9; color: var(--ink); }

/* Background animation control: shown only once script has enabled motion (see .motion-ready) */
.hero-motion { display: none; position: absolute; z-index: 2; right: max(var(--gutter), calc((100% - var(--max)) / 2)); bottom: calc(var(--edge-h) + 12px); align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 16px 0 13px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; background: rgba(6,28,26,.62); color: #fff; font: 700 12px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background .15s; }
.hero-motion:hover { background: rgba(6,28,26,.85); }
.hero-motion:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.hero-motion svg { width: 12px; height: 12px; fill: currentColor; }
.hero-motion .i-play { display: none; }
.hero-motion[data-paused] .i-play { display: block; }
.hero-motion[data-paused] .i-pause { display: none; }

/* Slow push-in toward the viewer, aimed at the wave curl. ~10s forward, smooth alternating return (no jump).
   Scale stays >= 1, so no edge is ever exposed. Static unless script adds .motion-ready; script also toggles
   .is-paused (manual) and .is-away (hero off-screen or tab hidden) independently. */
@media (prefers-reduced-motion: no-preference) {
  .hero.motion-ready .hero-motion { display: inline-flex; }
  .hero.motion-ready .hero-wave { animation: wave-push 10s cubic-bezier(.35, .05, .45, 1) infinite alternate; }
  .hero.motion-ready:not(.is-paused):not(.is-away) .hero-wave { will-change: transform; }
  .hero.motion-ready.is-paused .hero-wave, .hero.motion-ready.is-away .hero-wave { animation-play-state: paused; }
}
@keyframes wave-push {
  from { transform: scale(1); }
  to   { transform: scale(1.09); }
}

/* Keep the food row on the intro section unchanged */
.hero ~ .intro .food-feature { grid-template-columns: 1fr 1fr; gap: 12px; }

@media (min-width: 1500px) { .hero-food { left: -6vw; width: 56vw; } }
@media (max-width: 1000px) {
  .hero-food { --food-w: 76vw; left: -12vw; bottom: -8vw; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 34vw); min-height: 640px; }
  .hero h1 { font-size: clamp(36px, 5.6vw, 52px); }
}
@media (max-width: 760px) {
  .hero-wave { object-position: 50% 40%; }
  .hero::before { background: radial-gradient(ellipse 90% 40% at 30% 42%, rgba(6,28,26,.3) 0%, rgba(6,28,26,0) 100%); }
  .hero-food { left: -30vw; bottom: -10vw; width: 142vw; }
  .hero-inner { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding-top: 28px; padding-bottom: calc(56vw + 24px); }
  .hero-logo { align-self: center; width: 100%; max-width: 460px; }
  .hero-copy { padding-top: clamp(28px, 9vw, 52px); }
  .hero h1 { font-size: clamp(36px, 11vw, 52px); }
  .hero-copy p { max-width: 24ch; font-size: 18px; }
  .hero-cta { align-self: flex-start; justify-self: auto; width: min(216px, 100%); margin-top: clamp(22px, 7vw, 40px); }
  .hero-cta .btn { padding: 20px 24px; font-size: 17px; }
  .hero-motion { right: var(--gutter); bottom: calc(56vw + 24px); width: 44px; padding: 0; }
  .hero-motion span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
