/* Saltlane rework 5, lane B: the inner pages' first screens and repairs. Linked after the other sheets on the six inner
   pages and the credits page (lane A links it on home for the "More from Saltlane" tiles). html.mo = motion; html.rm = still. */

/* ---------- first screen: the asset is the ground ---------- */
.p5h { position: relative; isolation: isolate; overflow: hidden; margin-top: -73px; min-height: 100vh; min-height: 100svh;
  display: grid; color: var(--cream); background: var(--char); }
.p5h > * { grid-area: 1 / 1; }
.p5h-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--char) center / cover no-repeat; }
.p5h-media img, .p5h-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.p5h-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.p5h-copy { position: relative; align-self: end; padding-top: 140px; padding-bottom: clamp(32px, 6vh, 64px); }
.p5h .kicker { display: inline-block; background: var(--char); color: var(--turmeric); padding: 9px 13px 8px; border-radius: 4px; box-shadow: 4px 5px 0 var(--field, #b8281a); margin: 0 0 18px; }
.p5h .h-page { color: var(--cream); max-width: 18ch; text-shadow: 0 2px 18px rgb(20 14 10 / .55); }
.p5h .h-page em { color: var(--turmeric); }
.p5h .lede { color: var(--cream); max-width: 46ch; text-shadow: 0 1px 10px rgb(20 14 10 / .8); }
.p5h .hero-row { margin: clamp(18px, 2.6vw, 30px) 0 0; }
/* the headline rises line by line on arrival */
.mo .p5h .h-page .line { display: block; overflow: hidden; padding-bottom: .04em; }
.mo .p5h .h-page .line > span { display: inline-block; animation: p5rise .9s var(--e-out) both; }
.mo .p5h .h-page .line + .line > span { animation-delay: .12s; }
.mo .p5h .kicker, .mo .p5h .hero-row { animation: p5fade .7s var(--e-out) .25s both; }
@keyframes p5rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes p5fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- menu: dish photographs travelling under the words ---------- */
.p5h-menu .p5h-media { background: #6d1a10; }
.p5-rows { position: absolute; inset: -12% -10%; display: grid; grid-auto-rows: 1fr; gap: 14px; transform: rotate(-7deg); align-content: center; }
.p5-row { display: flex; gap: 14px; width: max-content; }
.p5-row img { width: auto; height: clamp(150px, 26vh, 260px); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; box-shadow: 6px 7px 0 rgb(31 24 20 / .55); flex: none; }
.p5-row img.t { aspect-ratio: 4 / 5; }
.mo .p5-row { animation: p5slide 70s linear infinite; }
.mo .p5-row.r2 { animation-duration: 84s; animation-direction: reverse; }
.mo .p5-row.r3 { animation-duration: 62s; }
@keyframes p5slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.p5h-menu .p5h-shade { background: linear-gradient(90deg, rgb(110 22 12 / .92) 0, rgb(110 22 12 / .78) 38%, rgb(110 22 12 / .25) 70%, rgb(110 22 12 / .1) 100%), linear-gradient(0deg, rgb(31 24 20 / .55), rgb(31 24 20 / 0) 50%); }
.p5h-menu .p5h-copy { align-self: center; }

/* ---------- catering: three films of food being served, side by side ---------- */
.p5-tri { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--char); }
.p5-tri > div { position: relative; overflow: hidden; background: var(--char) center / cover no-repeat; }
.mo .p5-tri > div { animation: p5panel 1.1s var(--e-out) both; }
.mo .p5-tri > div:nth-child(2) { animation-delay: .12s; } .mo .p5-tri > div:nth-child(3) { animation-delay: .24s; }
@keyframes p5panel { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.p5h-cat .p5h-shade { background: linear-gradient(0deg, rgb(20 14 10 / .94) 0, rgb(20 14 10 / .78) 34%, rgb(20 14 10 / .2) 62%, rgb(20 14 10 / .35) 100%); }
.p5h-cat .p5-phone { display: none; }

/* ---------- office lunches: the boxed lunch arrives in slats, then a slow push ---------- */
.p5-slats { position: absolute; inset: 0; }
.p5-slats > div { position: absolute; top: 0; bottom: 0; width: 25.2%; overflow: hidden; }
.p5-slats > div:nth-child(1) { left: 0; } .p5-slats > div:nth-child(2) { left: 25%; } .p5-slats > div:nth-child(3) { left: 50%; } .p5-slats > div:nth-child(4) { left: 75%; }
.p5-slats img { position: absolute; top: 0; height: 100%; width: 400%; max-width: none; object-fit: cover; }
.p5-slats > div:nth-child(1) img { left: 0; } .p5-slats > div:nth-child(2) img { left: -100%; } .p5-slats > div:nth-child(3) img { left: -200%; } .p5-slats > div:nth-child(4) img { left: -300%; }
.mo .p5-slats > div { animation: p5slatd 1.2s var(--e-out) both; }
.mo .p5-slats > div:nth-child(even) { animation-name: p5slatu; }
.mo .p5-slats > div:nth-child(2) { animation-delay: .08s; } .mo .p5-slats > div:nth-child(3) { animation-delay: .16s; } .mo .p5-slats > div:nth-child(4) { animation-delay: .24s; }
@keyframes p5slatd { from { transform: translateY(-30%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes p5slatu { from { transform: translateY(30%); opacity: 0; } to { transform: none; opacity: 1; } }
.mo .p5-slats { animation: p5push 18s 1.2s cubic-bezier(.3, 0, .2, 1) both; transform-origin: 60% 50%; }
@keyframes p5push { from { transform: scale(1); } to { transform: scale(1.09); } }
.p5h-office .p5h-shade { background: linear-gradient(90deg, rgb(31 24 20 / .9) 0, rgb(31 24 20 / .7) 36%, rgb(31 24 20 / .1) 66%, rgb(31 24 20 / 0) 100%), linear-gradient(180deg, rgb(31 24 20 / .5) 0, rgb(31 24 20 / 0) 30%); }
.p5h-office .p5h-copy { align-self: start; padding-top: clamp(130px, 18vh, 190px); }

/* ---------- our kitchen: one film of the pan, full bleed ---------- */
.p5h-kit .p5h-shade { background: radial-gradient(120% 90% at 70% 30%, rgb(20 14 10 / 0) 30%, rgb(20 14 10 / .55) 100%), linear-gradient(0deg, rgb(20 14 10 / .92) 0, rgb(20 14 10 / .7) 30%, rgb(20 14 10 / 0) 60%); }
.p5h-kit .h-page { max-width: none; font-size: clamp(56px, 10.4vw, 168px); }
.p5h-kit .p5-phone { display: none; }
.mo .p5h-kit .p5h-media video { animation: p5open 1.4s var(--e-out) both; }
@keyframes p5open { from { clip-path: inset(18% 0 18% 0); transform: scale(1.08); } to { clip-path: inset(0 0 0 0); transform: none; } }

/* ---------- visit: the room, panned slowly under a warm lamp light ---------- */
.p5h-visit .p5h-media img { object-position: 30% 50%; transform: scale(1.12); }
.mo .p5h-visit .p5h-media img { animation: p5pan 26s ease-in-out infinite alternate; }
@keyframes p5pan { from { object-position: 18% 50%; transform: scale(1.16) translateX(1.5%); } to { object-position: 70% 50%; transform: scale(1.1) translateX(-1.5%); } }
.p5-lamp { position: absolute; inset: 0; background: radial-gradient(40% 50% at 28% 24%, rgb(255 190 90 / .32), rgb(255 190 90 / 0) 70%); mix-blend-mode: screen; }
.mo .p5-lamp { animation: p5lamp 7s ease-in-out infinite alternate; }
@keyframes p5lamp { from { opacity: .55; transform: translateX(-2%); } to { opacity: 1; transform: translateX(3%); } }
.p5h-visit .p5h-shade { background: linear-gradient(270deg, rgb(31 24 20 / .9) 0, rgb(31 24 20 / .72) 40%, rgb(31 24 20 / .1) 72%), linear-gradient(0deg, rgb(31 24 20 / .5), rgb(31 24 20 / 0) 40%); }
@media (min-width: 901px) { .p5h-visit .p5h-copy { justify-self: end; width: min(48%, 640px); margin-right: var(--pad); padding-left: 0; padding-right: 0; } }

/* ---------- credits: the site's own photographs as a moving wall ---------- */
.p5-wall { position: absolute; inset: -6% -2%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.p5-col { display: flex; flex-direction: column; gap: 10px; }
.p5-col img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; flex: none; }
.mo .p5-col { animation: p5up 60s linear infinite; }
.mo .p5-col:nth-child(even) { animation-direction: reverse; animation-duration: 74s; }
@keyframes p5up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.p5h-credits .p5h-shade { background: radial-gradient(70% 70% at 50% 55%, rgb(31 24 20 / .9) 0, rgb(31 24 20 / .78) 45%, rgb(31 24 20 / .35) 100%); }
.p5h-credits .p5h-copy { align-self: center; text-align: center; }
.p5h-credits .h-page, .p5h-credits .lede { margin-left: auto; margin-right: auto; }
.p5h-credits .hero-row { justify-content: center; flex-direction: column; align-items: center; }

/* reduced motion: every first screen sits still on its end frame */
.rm .p5h * { animation: none !important; }

/* ---------- phone ---------- */
@media (max-width: 700px) {
  .p5h { min-height: 100svh; }
  .p5h-copy { padding-bottom: calc(72px + 26px); } /* clears the WhatsApp / Call bar */
  .p5h .h-page { font-size: clamp(46px, 14vw, 64px); }
  .p5h .lede { font-size: 16px; line-height: 1.45; }
  .p5h .hero-row { gap: 16px; }
  .p5-tri { display: none; } .p5h-cat .p5-phone { display: block; }
  .p5h-cat .p5h-shade { background: linear-gradient(0deg, rgb(20 14 10 / .95) 0, rgb(20 14 10 / .8) 42%, rgb(20 14 10 / .1) 72%, rgb(20 14 10 / .3) 100%); }
  .p5h-kit .p5-desk { display: none; } .p5h-kit .p5-phone { display: block; }
  .p5h-kit .h-page { font-size: clamp(50px, 15vw, 70px); }
  .p5-row img { height: 120px; }
  .p5-rows { inset: -6% -30%; align-content: start; transform: rotate(-7deg) translateY(4%); }
  .p5h-menu .p5h-shade { background: linear-gradient(0deg, rgb(110 22 12 / .96) 0, rgb(110 22 12 / .86) 46%, rgb(110 22 12 / .1) 78%); }
  .p5h-menu .p5h-copy { align-self: end; }
  .p5h-office .p5h-copy { align-self: end; padding-top: 140px; }
  .p5h-office .p5h-shade { background: linear-gradient(0deg, rgb(31 24 20 / .95) 0, rgb(31 24 20 / .8) 46%, rgb(31 24 20 / .05) 74%); }
  .p5h-visit .p5h-shade { background: linear-gradient(0deg, rgb(31 24 20 / .95) 0, rgb(31 24 20 / .78) 46%, rgb(31 24 20 / .05) 76%); }
  .p5-wall { grid-template-columns: repeat(3, 1fr); }
  .p5-wall .p5-col:nth-child(n+4) { display: none; }
}

/* ---------- S12: "More from Saltlane" tiles show the whole piece, never cut through its words ---------- */
.strip .frame { aspect-ratio: 808 / 632 !important; background: var(--cream); }
.strip .frame img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- s9: the sample-site notices are readable at once ---------- */
.notice, .samplenote { opacity: 1 !important; }
.quote .notice { color: var(--ink) !important; background: var(--turmeric-pale) !important; }

/* ---------- s11: "Room for a sweet?" sits clear of its paragraph ---------- */
.menu-end h2 { margin-bottom: 18px; line-height: .95; }

/* ---------- s14: the printed card, large enough to read ---------- */
.p5-print { grid-template-columns: 1fr 1fr; }
.p5-print .ph .frame { aspect-ratio: auto !important; }
@media (max-width: 700px) { .p5-print { grid-template-columns: 1fr; } }

/* ---------- S11: full rows ---------- */
.p5-feed { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 22px); }
.p5-feed .film { margin: 0; }
@media (max-width: 860px) { .p5-feed { grid-template-columns: 1fr 1fr; } }
.p5-tawa { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: clamp(12px, 1.6vw, 22px); }
@media (max-width: 700px) { .p5-tawa { grid-template-columns: 1fr; } }
.film-wide .frame { aspect-ratio: 16 / 9 !important; }
.film-wide video, .p5-tawa video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- credits page: a readable table at every width ---------- */
.p5-cred { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.p5-cred th, .p5-cred td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-top: 1px solid rgb(246 238 221 / .18); word-break: normal; overflow-wrap: normal; hyphens: manual; }
.p5-cred th { font: 800 13px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--turmeric); }
.p5-cred td:first-child { width: 30%; } .p5-cred td:nth-child(2) { width: 12%; white-space: nowrap; }
.p5-cred a { color: var(--cream); overflow-wrap: anywhere; }
.p5-cred-sec { padding: clamp(40px, 6vw, 80px) 0; background: var(--char); color: var(--cream); }
.p5-cred-sec h2 { font-size: clamp(34px, 4vw, 56px); margin: 0 0 10px; }
.p5-cred-sec h2 + p { max-width: 70ch; margin: 0 0 24px; color: rgb(246 238 221 / .86); }
.p5-cred-sec + .p5-cred-sec { padding-top: 0; }
@media (max-width: 700px) {
  .p5-cred thead { display: none; }
  .p5-cred tr { display: block; border-top: 1px solid rgb(246 238 221 / .18); padding: 12px 0; }
  .p5-cred td { display: block; width: auto !important; border: 0; padding: 2px 0; white-space: normal !important; }
  .p5-cred td:first-child { font-weight: 700; }
  .p5-cred td:nth-child(2) { color: var(--turmeric); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
}

/* s9: the form sheet (with its notice) is not held back by a scroll reveal */
.mo .quote .sheet.rv { opacity: 1; transform: none; transition: none; }

/* catering "What leaves the kitchen": the film beside two stacked pieces, no hole in the grid */
.p5-stackgal { grid-template-columns: 2fr 1fr; align-items: stretch; }
.p5-stackgal > .wide { grid-column: 1; grid-row: span 2; display: flex; flex-direction: column; }
.p5-stackgal > .wide .frame { flex: 1; aspect-ratio: auto !important; min-height: 320px; }
@media (max-width: 860px) { .p5-stackgal { grid-template-columns: 1fr 1fr; } .p5-stackgal > .wide { grid-column: 1 / -1; grid-row: auto; } .p5-stackgal > .wide .frame { aspect-ratio: 16 / 9 !important; min-height: 0; } }

/* first-screen fixes after the first look (r1 frames): the media fills the whole section, padding included; the base
   "section" padding does not apply here */
.p5h { padding: 0; }
.p5h > .p5h-media, .p5h > .p5h-shade { grid-area: auto; }
.p5h .btn.yel { background: var(--turmeric); color: var(--ink); border-color: var(--turmeric); }
.p5h-office .p5h-shade { background: linear-gradient(90deg, rgb(31 24 20 / .94) 0, rgb(31 24 20 / .84) 40%, rgb(31 24 20 / .35) 62%, rgb(31 24 20 / 0) 82%), linear-gradient(180deg, rgb(31 24 20 / .5) 0, rgb(31 24 20 / 0) 30%); }
@media (min-width: 901px) {
  .p5h-visit .p5h-copy { width: min(44%, 600px); }
  .p5h-visit .h-page { font-size: clamp(56px, 5.8vw, 100px); }
}
@media (max-width: 700px) {
  .p5h-office .p5h-shade { background: linear-gradient(0deg, rgb(31 24 20 / .97) 0, rgb(31 24 20 / .9) 58%, rgb(31 24 20 / .35) 80%, rgb(31 24 20 / .1) 100%); }
}
/* menu tiles: each tile appears when its photograph has arrived, so no tile is ever an empty box */
.p5w .p5-row img { opacity: 0; transition: opacity .5s ease; }
.p5w .p5-row img.ld { opacity: 1; }
/* kitchen "Clean, and checked": the photograph runs the full width under the words and the grade card */
.hyg > figure { grid-column: 1 / -1; max-width: none; }
.hyg > figure .frame { aspect-ratio: 1280 / 520 !important; }
.hyg > figure .frame img { width: 100%; height: 100%; object-fit: cover; }
/* an image that has not arrived draws nothing: the tile shadow is a drop-shadow of the picture itself, not a box */
.p5-row img { box-shadow: none; filter: drop-shadow(6px 7px 0 rgb(31 24 20 / .55)); }
/* lane A, five-second look: on office lunches the end of the headline ("FLOOR.") ran over the busy green and white of the
   tray; the shade now reaches further right behind the headline's band */
@media (min-width: 701px) {
  .p5h-office .p5h-shade { background: linear-gradient(90deg, rgb(31 24 20 / .92) 0, rgb(31 24 20 / .8) 45%, rgb(31 24 20 / .55) 75%, rgb(31 24 20 / .15) 100%), linear-gradient(180deg, rgb(31 24 20 / .5) 0, rgb(31 24 20 / 0) 30%); }
  .p5h-office h1 { text-shadow: 0 2px 22px rgb(20 12 8 / .55); }
}
/* lane A, site check S1 at 360: nothing of the moving rows and the wall may stand past the right edge of the screen.
   On a phone the dish rows are laid from the right edge and run leftward (nothing past the right edge at any moment),
   unturned; the credits wall keeps inside the width */
@media (max-width: 700px) {
  .p5-rows { inset: -4% 0; transform: none; direction: rtl; }
  .p5-row { direction: ltr; margin-left: auto; }
  .p5-wall { inset: -6% 0; }
}
/* lane A, site check S10: no text under 14 px on the credits table */
.p5-cred th, .p5-cred td, .p5-cred td:nth-child(2) { font-size: max(14px, 1em); }
@media (max-width: 700px) { .p5-cred td:nth-child(2) { font-size: 14px; } }
/* lane A, site check S1: the slow pushes and pans zoom INSIDE each image box (object-view-box), so no box ever grows
   past the right edge of the screen; the credits wall keeps inside the width at every size */
@keyframes p5push { from { object-view-box: inset(0% 0% 0% 0%); } to { object-view-box: inset(4% 4% 4% 4%); } }
@keyframes p5pan { from { object-position: 18% 50%; object-view-box: inset(6% 10% 6% 2%); } to { object-position: 70% 50%; object-view-box: inset(5% 2% 5% 10%); } }
@keyframes p5open { from { clip-path: inset(18% 0 18% 0); } to { clip-path: inset(0 0 0 0); } }
.p5-wall { inset: -6% 0; }
.mo .p5-slats { animation-name: p5pushr; transform-origin: 100% 50%; } /* grows leftward from the right edge, never past it */
@keyframes p5pushr { from { transform: scale(1); } to { transform: scale(1.09); } }
/* lane A, S1 at every width: the menu's dish rows are slanted by a skew (which keeps them inside the width), laid from the
   right edge and run leftward; the visit photograph pans inside its box without a scale; the office slats sit inside */
.p5-rows { inset: -12% 0; transform: skewY(-7deg); direction: rtl; }
.p5-row { direction: ltr; margin-left: auto; }
@media (max-width: 700px) { .p5-rows { inset: -4% 0; transform: skewY(-7deg) translateY(4%); } }
.p5h-visit .p5h-media img { transform: none !important; }
.p5-slats { right: 4px; }
/* each slat is now the whole picture cut by a clip to its quarter (the same look), so no image box reaches past the edge */
.p5-slats { right: 0; }
.p5-slats > div, .p5-slats > div:nth-child(n) { left: 0; width: 100%; overflow: visible; }
.p5-slats > div:nth-child(1) { clip-path: inset(0 74.8% 0 0); } .p5-slats > div:nth-child(2) { clip-path: inset(0 49.8% 0 25%); }
.p5-slats > div:nth-child(3) { clip-path: inset(0 24.8% 0 50%); } .p5-slats > div:nth-child(4) { clip-path: inset(0 0 0 75%); }
.p5-slats img, .p5-slats > div:nth-child(n) img { left: 0; width: 100%; }
/* the rows are laid from the right edge, so each runs between -50% and 0 (each half of a row is wider than the screen,
   so the screen is always covered and nothing passes the right edge) */
@keyframes p5slide { from { transform: translateX(-50%); } to { transform: translateX(0); } }
/* lane A: a sideways-running row of real tiles must, at some moment, either pass the right edge of the screen or leave a
   gap (site check S1 counts every box). So the rows stand still sideways, laid from the right edge so they always cover
   the screen, and move the other way: each row rises or sinks slowly against its neighbours, and every photograph in
   them pushes in slowly inside its own frame */
.mo .p5-row, .mo .p5-row.r2, .mo .p5-row.r3 { animation: p5bob 11s ease-in-out infinite alternate; transform: none; }
.mo .p5-row.r2 { animation-duration: 13s; animation-direction: alternate-reverse; }
.mo .p5-row.r3 { animation-duration: 9.5s; }
@keyframes p5bob { from { transform: translateY(-14%); } to { transform: translateY(14%); } }
.mo .p5-row img.ld { animation: p5tile 7s ease-in-out infinite alternate; }
.mo .p5-row img.ld:nth-child(odd) { animation-delay: -3.5s; }
@keyframes p5tile { from { object-view-box: inset(0 0 0 0); } to { object-view-box: inset(6% 6% 6% 6%); } }
@media (max-width: 700px) { .p5h-menu .p5h-shade { background: linear-gradient(0deg, rgb(110 22 12 / .96) 0, rgb(110 22 12 / .86) 44%, rgb(110 22 12 / .2) 60%, rgb(110 22 12 / 0) 80%); } }
/* steer of 21 Nov (60 fps on the Iris Xe): the menu tiles no longer repaint every frame (their slow push is off); the rows'
   rise and sink run on the compositor */
.mo .p5-row img.ld, .mo .p5-row img.ld:nth-child(odd) { animation: none; }
/* lane A (steer of 21 Nov): lighter menu rows (half the tiles: the rows no longer run sideways, so the second copy of each
   row was never seen; no drop-shadow filter on each tile) and a visit lamp that only breathes (opacity), inside the screen */
.p5-row img:nth-child(n+8) { display: none; }
.p5-row img { filter: none; box-shadow: 4px 5px 0 rgb(31 24 20 / .5); }
.mo .p5-row { will-change: transform; }
@keyframes p5lamp { from { opacity: .55; } to { opacity: 1; } }
