/* Saltlane rework 5: the home first screen, read whole and whole from its first frame.
   - The plate's centre and size come from r1.js (--plx, --pw, --cy): its far rim crosses only the plain stems of the
     A and the N of LANE, so no L, T or E loses the part that gives it its shape.
   - No opening choreography: the first painted frame is the finished screen. A still of the finished 3D plate and
     props (cut from the 3D itself, same light, same size) holds the plate's place until the 3D draws its first frame,
     then gives way without a change of size or light (.slh-still, html.has3d).
   - The badges belong to the plate and the routes; on scroll they fade where they stand (never fly into the header).
   - The brass pot and onion stand left of the plate, clear of the line and both buttons. */

.slh-rim, .slh-flat { display: none !important; }
.slh .slh-pin :is(.slh-stk .stk, .slh-name span, .slh-plate, .c-mid, .c-back, .c-front, .slh-rim) { animation: none !important; }
.mo .slh:not(.op-run):not(.op-done) :is(.slh-stk, .slh-name, .slh-plate, .c-mid, .c-back, .c-front) { opacity: 1; }

/* the still: the finished 3D, its box in plate widths (offsets written by build-r5/still.mjs into the custom properties) */
.slh-still { position: absolute; z-index: 5; pointer-events: none; display: block; max-width: none;
  left: calc(var(--plx, 50%) + var(--sx) * var(--pw)); top: calc(var(--cy) + var(--sy) * var(--pw)); width: calc(var(--sw) * var(--pw)); height: auto;
  transition: opacity .18s linear; }
.has3d .slh-still { opacity: 0; }
.rm .slh-still { opacity: 1; }
.slh-still.ph { display: none; }
@media (max-width: 700px) { .slh-still.dt { display: none; } .slh-still.ph { display: block; } }

/* the badges: fade on scroll where they stand */
.slh-stk .stk { transform: translate3d(calc(var(--px) * 10px), calc(var(--py) * 8px), 0) rotate(var(--r)); opacity: calc(1 - var(--k) * 5); }

@media (min-width: 701px) {
  .slh-plate { left: var(--plx, 50%); }
  /* the line, the prices and both routes in one column at the lower left; the plate holds the right */
  .slh-copy { left: 4vw; right: auto; width: auto; grid-template-columns: auto; grid-template-areas: "h" "p" "b"; row-gap: 14px; }
  .slh-h1, .slh-copy .price { max-width: min(27vw, 420px); }
  .slh-copy .routes-btns { position: relative; flex-wrap: nowrap; }
  .slh-copy .routes-btns { justify-self: start; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
  .slh-stk .stk-b { left: calc(var(--plx) - 0.5 * var(--pw) - 10px); top: calc(var(--cy) - 0.02 * var(--pw)); }
  .slh-stk .stk-a { left: calc(var(--plx) + 0.5 * var(--pw) - 96px); top: calc(var(--cy) + 0.05 * var(--pw)); }
  /* "50 to 500 guests" is the catering route's own badge: it sits on the catering button's corner */
  .slh-stk .stk-c { display: none; }
  .slh-copy .routes-btns .btn { position: relative; }
  .slh-copy .routes-btns .stk-c2 { position: absolute; right: -22px; top: -30px; padding: 6px 10px 5px; border-radius: 8px; background: var(--turmeric); color: var(--char); border: 3px solid var(--char); box-shadow: 3px 4px 0 var(--char);
    font: 900 15px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; transform: rotate(6deg); white-space: nowrap; pointer-events: none; }
}
@media (max-width: 700px) {
  .slh-plate { left: var(--plx, 50%); }
  .slh-copy .routes-btns .stk-c2 { display: none; }
  .slh-stk .stk-b { left: calc(var(--plx) - 0.5 * var(--pw) - 4px); top: calc(var(--cy) + 0.06 * var(--pw)); }
  .slh-stk .stk-a, .slh-stk .stk-a[class] { left: calc(var(--plx) + 0.5 * var(--pw) - 78px); right: auto; top: calc(var(--cy) + 0.02 * var(--pw)); }
}

/* paint nothing until the finished first screen can be painted (cleared by r1.js) */
html.st-hold body { visibility: hidden; }

/* S15: the order section's ground moves. The photograph keeps its slow push; over it, the same photograph, masked to
   the flame and the air above it, runs through a moving heat displacement and a flame flicker, so the gas flame burns
   and the air over the grill shimmers (built in the browser from the one licensed photograph) */
.order-bg .flick { position: absolute; inset: 0; pointer-events: none; -webkit-mask: radial-gradient(28% 46% at 49% 40%, #000 35%, transparent 100%); mask: radial-gradient(28% 46% at 49% 40%, #000 35%, transparent 100%); }
.order-bg .flick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mo .order-bg .flick { filter: url(#sl-heat); }
.mo .order-bg .flick img { animation: push8 8s cubic-bezier(.45, 0, .55, 1) infinite alternate, flick 1.7s steps(9, jump-none) infinite; }
.flick-defs { position: absolute; }
@keyframes flick { 0% { filter: brightness(1) saturate(1); } 20% { filter: brightness(1.18) saturate(1.15); } 35% { filter: brightness(.96); } 55% { filter: brightness(1.24) saturate(1.2); } 70% { filter: brightness(1.05); } 85% { filter: brightness(1.15) saturate(1.1); } 100% { filter: brightness(1); } }
.rm .order-bg .flick { display: none; }

/* S7 (home): the line under the first screen is no longer words on a still ground: three of the kitchen's dishes,
   photographs cut as tilted cards, drift past it at three speeds as the page scrolls (--f from r1.js) and breathe */
.slh-lede { overflow: hidden; }
.lede-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 4vw; }
.lede-cards { position: relative; height: clamp(300px, 30vw, 460px); }
.lede-cards .lc { position: absolute; margin: 0; width: 46%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 4px solid var(--cream); box-shadow: 8px 10px 0 rgb(40 8 4 / .55); }
.lede-cards .lc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lede-cards .lc1 { left: 0; top: 8%; --r: -7deg; --sp: 1; }
.lede-cards .lc2 { left: 30%; top: 30%; --r: 5deg; --sp: 1.8; z-index: 2; }
.lede-cards .lc3 { left: 56%; top: 0; --r: -3deg; --sp: 1.3; }
.lede-cards .lc { transform: translate3d(calc((var(--f) - .5) * -120px * var(--sp)), calc((var(--f) - .5) * -90px * var(--sp)), 0) rotate(var(--r)); }
.mo .lede-cards .lc img { animation: push8 7s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
.mo .lede-cards .lc2 img { animation-delay: -2.5s; } .mo .lede-cards .lc3 img { animation-delay: -4.6s; }
@media (max-width: 700px) { .lede-grid { grid-template-columns: 1fr; gap: 28px; } .lede-cards { height: 64vw; } }

@media (max-width: 700px) { .slh { --lt: calc(76px + 1.06 * var(--nh, 110px)); } }

/* the hold shows the browser's own blank (as before any page paints), never a plain red field */
html.st-hold { background: #fff !important; }
/* the two routes side by side on the narrowest phones too, so the plate keeps its size */
@media (max-width: 379px) {
  .slh-copy .routes-btns { flex-direction: row; flex-wrap: nowrap; width: auto; gap: 6px; }
  .slh-copy .routes-btns .btn { padding: 9px 9px; gap: 3px; letter-spacing: -.015em; min-height: 42px; }
}
/* on a phone the three dish cards drift up and down only, inside the width */
@media (max-width: 700px) {
  .lede-cards .lc { width: 42%; transform: translate3d(0, calc((var(--f) - .5) * -70px * var(--sp)), 0) rotate(var(--r)); }
  .lede-cards .lc1 { left: 2%; } .lede-cards .lc2 { left: 29%; } .lede-cards .lc3 { left: 54%; }
}
/* s13: no plain bands of ground between sections: tighter feet under the routes, the four dishes and the kitchen facts */
.home .r1-routes { padding-bottom: clamp(40px, 5vw, 72px); }
.home .dishes { padding-bottom: clamp(20px, 2.5vw, 40px); }
.home .proof { padding-top: clamp(20px, 2.5vw, 40px); padding-bottom: clamp(36px, 4vw, 64px); }

/* steer of 21 Nov (60 fps on the Iris Xe, lighter and sharp): nothing on the home page repaints a photograph every frame.
   The order ground's push and flicker run on the compositor (transform from the right edge, so no box passes the edge;
   brightness steps), the heat displacement filter is off, the line's dish cards move with scroll only */
.mo .lede-cards .lc img { animation: none; }
.mo .order-bg img { animation: sl-pushr 9s cubic-bezier(.45, 0, .55, 1) infinite alternate; transform-origin: 100% 50%; }
.mo .order-bg .flick { filter: none; }
.mo .order-bg .flick img { animation: sl-pushr 9s cubic-bezier(.45, 0, .55, 1) infinite alternate, flick 1.7s steps(9, jump-none) infinite; }
@keyframes sl-pushr { from { transform: scale(1); } to { transform: scale(1.07); } }
.flick-defs { display: none; }
