/* Moe's — home page only: red hero with the pizza that splits on scroll, group section, visit section. */

/* ---------- Hero ---------- */
.pin { --p: 0; --q: min(1, calc(var(--p) * 1.5)); }
.pin__stage { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--red); color: var(--white); }
.hero__grid { flex: 1; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 1.5rem; align-items: center; padding-top: 9rem; padding-bottom: 2.5rem; }
.hero__copy { grid-column: 1 / span 6; display: grid; gap: 1.5rem; justify-items: start; }
.hero__copy .lede { max-width: 27rem; }
.hero__art { grid-column: 7 / -1; position: relative; aspect-ratio: 1; width: min(100%, calc(100svh - 15rem)); justify-self: center; }

/* Checker platter: white and a deeper red so its round edge still reads on the red hero. No outline. */
.hero__disc { position: absolute; inset: 4% 6% 4% -10%; border-radius: 50%; --check: 2.6rem; --a: var(--white); --b: var(--red-deep); transform: rotate(calc(-24deg + var(--q) * 14deg)) skewX(-8deg); }

/* Moe stands on the right, in front of the pizza and platter, behind the checker counter that hides where the drawing ends */
.hero__moe { position: absolute; z-index: 3; right: max(0.5rem, calc(50% - 41rem)); bottom: 1.25rem; width: 20.5rem; height: auto; filter: drop-shadow(0 0.5rem 0.5rem rgba(35,31,32,.3)); }
.pin__stage > .checker-band { position: relative; z-index: 4; flex: none; border-top: var(--line) solid var(--ink); }

/* The pizza: two halves that pull apart, with today's status in the gap */
.splitza { position: absolute; width: 76%; left: 0; top: 8%; aspect-ratio: 1; filter: drop-shadow(0 1.1rem 0.7rem rgba(35,31,32,.4)); }
/* One real pizza photo, cut in two along a jagged line. Closed, the halves are the whole photo. On scroll they pull apart and a cheese layer stretches across the gap. */
.tear { position: absolute; max-width: none; }
.tear--l, .tear--r { z-index: 3; inset: 0; width: 100%; height: 100%; }
.tear--l { transform: translateX(calc(var(--q) * -30%)); }
.tear--r { transform: translateX(calc(var(--q) * 30%)); }
.tear--cheese { z-index: 1; top: 2.7%; height: 94.6%; width: auto; left: 50%; transform: translateX(-50%) scaleX(calc(0.08 + var(--q) * 0.82)); }
.splitza__card { display: none; }

/* One load sequence */
.hero__copy > * { animation: rise .7s var(--ease-out) both; }
.hero__copy > :nth-child(2) { animation-delay: .08s; } .hero__copy > :nth-child(3) { animation-delay: .16s; } .hero__copy > :nth-child(4) { animation-delay: .24s; }
.hero__disc { animation: disc .9s var(--ease-out) .1s both; }
.splitza { animation: plate .9s var(--ease-out) .25s both; }
.hero__moe { animation: rise .7s var(--ease-out) .5s both; }
@keyframes rise { from { opacity: 0; transform: translateY(1rem); } }
@keyframes disc { from { opacity: 0; transform: rotate(-60deg) skewX(-8deg) scale(.9); } }
@keyframes plate { from { opacity: 0; transform: translateX(3rem) rotate(40deg); } }

.hero__hint { display: none; }

@media (min-width: 62em) {
  .pin { height: 185vh; }
  .pin__stage { position: sticky; top: 0; height: 100vh; height: 100svh; }
  .splitza__card { display: grid; gap: 0.35rem; position: absolute; z-index: 2; left: 50%; top: 50%; width: 12.5rem; padding: 1.25rem 1rem; text-align: center; background: var(--yellow); color: var(--ink);
    border: var(--line) solid var(--ink); border-radius: 1.25rem; text-decoration: none;
    transform: translate(-50%, -50%) scale(calc(0.7 + var(--q) * 0.3)); opacity: calc((var(--q) - 0.3) * 3); }
  .splitza__card b { font-weight: 800; font-size: 1.5rem; line-height: 1.05; }
  .splitza__card span { font-size: 1rem; line-height: 1.25; }
  .splitza__card u { font-weight: 700; text-decoration-thickness: 0.125rem; text-underline-offset: 0.2em; }
  .hero__hint { display: flex; align-items: center; gap: 0.5em; font-weight: 700; font-size: 1rem; opacity: calc(1 - var(--q) * 3); }
  .hero__hint svg { width: 1.1em; height: 1.1em; animation: nudge 1.4s ease-in-out infinite; }
  @keyframes nudge { 50% { transform: translateY(0.3rem); } }
}
/* Desktop on a short window (small laptops, Windows at 125% scaling, browser zoom).
   The pinned hero is exactly one screen tall, so everything in it scales with the window HEIGHT as well as its width.
   Without this the words push the checker counter off the bottom and Moe is left floating. */
@media (min-width: 62em) {
  .hero__grid { min-height: 0; padding-top: clamp(6.25rem, 17svh, 9rem); padding-bottom: clamp(0.75rem, 3svh, 2.5rem); }
  .hero__copy { gap: clamp(0.625rem, 2.4svh, 1.5rem); }
  .hero__copy h1 { font-size: clamp(2.75rem, min(7.2vw + 1rem, 15svh), 7rem); }
  .hero__art { width: min(100%, max(14rem, calc(100svh - 14rem))); container-type: inline-size; }
  .hero__moe { width: min(20.5rem, 40svh); }
  /* The sign always fits inside the gap between the two halves (the gap is 45% of the art's width) */
  .splitza__card { width: clamp(8rem, 36cqw, 12.5rem); padding: clamp(0.5rem, 3cqw, 1.25rem) clamp(0.5rem, 2.4cqw, 1rem); }
  .splitza__card b { font-size: clamp(1rem, 4.4cqw, 1.5rem); }
  .splitza__card span { font-size: clamp(0.875rem, 2.9cqw, 1rem); }
  .splitza__card u { font-size: clamp(0.875rem, 2.9cqw, 1rem); }
}
@media (min-width: 62em) and (max-height: 47rem) {
  .hero__hint { display: none; }
  .hero__copy .lede__more { display: none; }
  .hero__copy .lede__dot { display: inline; }
}
/* Very short window: stop pinning. The hero becomes a normal section as tall as it needs, and the whole pizza shows. */
@media (min-width: 62em) and (max-height: 33rem) {
  .pin { height: auto; }
  .pin__stage { position: relative; height: auto; min-height: 100svh; }
  .hero__grid { min-height: auto; }
}
/* Phone and tablet: three things only. Big headline, two buttons, one huge pizza on its checker paper coming in from the right.
   The paper starts below the paragraph, so the white text never sits on white checks. Only the buttons overlap it.
   The long lede, the address line, Moe, and the scroll tear stay off this layout. */
.lede__dot { display: none; }
@media (max-width: 61.99em) {
  .pin__stage { min-height: min(100svh, 46rem); }
  .hero__grid { display: flex; flex-direction: column; align-items: stretch; row-gap: 0; padding-top: 7rem; padding-bottom: 0; }
  .hero__copy { position: relative; z-index: 2; gap: 1rem; }
  .hero__copy h1 { font-size: clamp(3.75rem, 20vw, 7.25rem); line-height: 0.92; max-width: 5em; }
  .hero__copy .lede { font-size: clamp(1.1875rem, 3.2vw, 1.5rem); line-height: 1.3; max-width: clamp(13.5rem, 46vw, 22rem); }
  .hero__copy .lede__more, .hero__copy .address { display: none; }
  .hero__copy .lede__dot { display: inline; }
  .hero__copy .btn-row { flex-direction: column; flex-wrap: nowrap; width: clamp(13rem, 34vw, 16rem); gap: 0.75rem; }
  .hero__copy .btn-row .btn { flex: none; width: 100%; min-height: 3.25rem; font-size: 1rem; white-space: nowrap; padding-inline: 1em; }
  /* The art box starts half a rem below the top of the first button: 2 buttons (3.25rem each) + their gap (0.75rem) - 0.5rem */
  .hero__art { --d: min(112vw, 44rem); --x: 8vw; position: relative; z-index: 1; flex: 1; margin-top: -6.75rem; min-height: min(calc(var(--d) * 0.66), 44svh); width: auto; max-width: none; aspect-ratio: auto; }
  .hero__disc { inset: 0 auto auto var(--x); width: calc(var(--d) * 1.13); height: auto; aspect-ratio: 1; transform: rotate(-24deg) skewX(-8deg); --check: clamp(2rem, 6vw, 3rem); }
  .splitza { top: calc(var(--d) * 0.045); left: calc(var(--x) + var(--d) * 0.065); width: var(--d); }
  .tear--l, .tear--r { transform: none; }
  .tear--cheese, .hero__moe { display: none; }
}
@media (min-width: 48em) and (max-width: 61.99em) {
  .pin__stage { min-height: min(100svh, 58rem); }
  .hero__art { --x: 22vw; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 62em) { .pin { height: auto; --q: 1; } .hero__hint { display: none; } }

/* ---------- Bringing a group ---------- */
.group { position: relative; background: var(--red); color: var(--white); padding-block: 5.5rem 6rem; overflow: hidden; }
.group__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 1.5rem; row-gap: 3rem; align-items: center; }
.group__copy { grid-column: 1 / span 6; display: grid; gap: 1.5rem; justify-items: start; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; font-weight: 700; font-size: 1.25rem; }
.facts li { display: flex; align-items: center; gap: 0.75rem; }
.facts li::before { content: ""; flex: none; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--yellow); border: var(--line) solid var(--ink); }
.group__art { grid-column: 8 / -1; position: relative; aspect-ratio: 5 / 4; }
.frame { position: absolute; padding: 0.875rem; border: var(--line) solid var(--ink); border-radius: 1.5rem; --check: 0.875rem; --a: var(--white); --b: var(--red-deep); box-shadow: 0 0.5rem 0 var(--ink); }
.frame .ph { width: 100%; height: 100%; border-radius: 0.75rem; border-style: solid; border-color: var(--ink); }
.frame--a { inset: 0 18% 14% 0; rotate: -4deg; }
.frame--b { inset: 34% 0 0 34%; rotate: 5deg; }
.group__art.is-in .frame { animation: settle .8s var(--ease-bounce) both; }
.group__art.is-in .frame--b { animation-delay: .15s; }
@keyframes settle { from { opacity: 0; translate: 0 2.5rem; scale: .9; } }
.group__art:not(.is-in) .frame { opacity: 0; }

/* ---------- Locally owned + visit ---------- */
.visit { padding-block: 5.5rem 6.5rem; }
.visit__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 1.5rem; row-gap: 3rem; align-items: start; }
.visit__copy { grid-column: 1 / span 6; display: grid; gap: 1.5rem; justify-items: start; }
.visit__card { grid-column: 8 / -1; }

@media (max-width: 61.99em) {
  .group { padding-block: 3.5rem 4.5rem; }
  .group__copy, .group__art, .visit__copy, .visit__card { grid-column: 1 / -1; }
  .group__art { max-width: 28rem; width: 100%; margin-inline: auto; }
  .visit { padding-block: 3.5rem 4.5rem; }
  .facts { font-size: 1.125rem; }
}

/* ---------- Real photos: back room frames, owners ---------- */
.frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 0.75rem; border: var(--line) solid var(--ink); }
.owners { margin: 0; width: min(100%, 26rem); padding: 0.75rem; border: var(--line) solid var(--ink); border-radius: 1.5rem; --check: 0.875rem; --a: var(--white); --b: var(--red); box-shadow: 0 0.5rem 0 var(--ink); rotate: -2deg; }
.owners img { display: block; width: 100%; height: auto; border-radius: 0.75rem; border: var(--line) solid var(--ink); }
