/*
 * The console sign-in page: four kitchen scenes that rotate weekly
 * (console_signin.html, signInScene). Loaded only by that page.
 *
 * Phone first; the side-by-side layouts start at 56.25rem. Every animation runs
 * once (nothing loops), hover motion is gated on a real hover pointer, and
 * reduced motion turns all of it off.
 */

.signin {
  /* Scene-only colours with no brand token. */
  --sg-google-line: #747775; /* Google's button outline */
  --sg-google-ink: #1f1f1f;
  --sg-bulb: #f8c97a;
  --sg-chalk: #2b302c;
  --sg-grout: #e6ddd5;
  --sg-stamp: #b8351c; /* --error darkened to 5.9:1 on white for the kicker */

  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--ink);
}

.signin *,
.signin *::before,
.signin *::after { box-sizing: border-box; }

/* Shared pieces ------------------------------------------------------------ */
.signin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 1.25rem var(--space-6);
}

.signin-wordmark { display: block; height: 22px; color: inherit; }
.signin-wordmark svg { display: block; height: 100%; width: auto; }

.signin-tag,
.signin-eyebrow {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--claret);
}

.signin-h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 2.75rem;
  line-height: 1;
}

.signin-lede { margin: 0; line-height: var(--leading-normal); color: var(--grey-1); }

.signin-action { display: flex; flex-direction: column; gap: var(--space-4); }

.signin-msg {
  padding: var(--space-4);
  border: 2px solid var(--error);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  text-align: left;
  overflow-wrap: anywhere;
  animation: signin-stamp 0.5s var(--ease-door) both;
}
.signin-msg p { margin: 0; }
.signin-msg p + p { margin-top: var(--space-1); }
.signin-msg__kicker {
  margin-bottom: var(--space-2) !important;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-2xl);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--sg-stamp);
}
.signin-msg__title { font-size: var(--text-base); font-weight: var(--weight-semibold); }
.signin-msg__email { font-weight: var(--weight-semibold); }

/* Google's light button: white, grey outline, the full-colour G. */
.signin-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 1px solid var(--sg-google-line);
  border-radius: 999px;
  background: var(--white);
  color: var(--sg-google-ink);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1;
  text-decoration: none;
}
.signin-google:hover { background: var(--off-white); color: var(--sg-google-ink); }
.signin-google:focus-visible { outline: 2px solid var(--deep-grape); outline-offset: 3px; }
.signin-google svg { flex: none; width: 20px; height: 20px; }

/* A · Order ticket rail ------------------------------------------------------ */
.signin--ticket { background: var(--paper); }

.st-rail {
  flex: none;
  height: 14px;
  background: var(--grey-4);
  border-top: 2px solid var(--off-white);
  border-bottom: 3px solid var(--grey-3);
}

.st-slips {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-12);
  padding: 0 var(--space-4) var(--space-8);
}

.st-slip {
  position: relative;
  width: 100%;
  max-width: 25rem;
  margin-top: -6px;
  padding: 30px var(--space-6) 22px;
  background: var(--white);
  box-shadow: var(--shadow-pop);
  transform-origin: 50% 0;
  animation: st-drop 1.4s var(--ease-door) both;
}
/* The torn bottom edge. */
.st-slip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
  background: conic-gradient(from 135deg at 50% 0, var(--white) 90deg, transparent 0) 0 0 / 16px 8px repeat-x;
}

.st-clip {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 56px;
  height: 18px;
  margin-left: -28px;
  border-radius: 3px;
  background: var(--grey-1);
}

.st-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 0 var(--space-1);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--grey-1);
}

.st-dash { margin: 14px 0; border: 0; border-top: 2px dashed var(--line-strong); }
.signin--ticket .signin-h1 { margin: var(--space-1) 0 14px; }
.st-qty { margin: 0 0 var(--space-1); font-size: var(--text-lg); }
.st-qty b { margin-right: 6px; font-weight: var(--weight-semibold); }
.st-mod { margin: 0 0 var(--space-6); padding-left: 22px; font-weight: var(--weight-medium); color: var(--claret); }
.st-foot { margin: 0; text-align: center; font-family: var(--font-mono); font-size: 13px; color: var(--grey-1); }

.st-slip--ghost { display: none; max-width: 15rem; opacity: 0.6; animation: none; }
.st-slip--g1 { transform: rotate(-3deg); }
.st-slip--g2 { transform: rotate(2.5deg); }
.st-slip--ghost .st-mod { margin-bottom: 0; }

.st-base { margin: 0; padding: 0 var(--space-4) var(--space-6); text-align: center; font-size: 13px; color: var(--grey-1); }

/* B · Swing doors ------------------------------------------------------------ */
.signin--doors { background: var(--off-white); }

.sd-wall {
  position: relative;
  flex: none;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--deep-grape);
}

.sd-plate {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 3px;
  background: var(--claret);
  color: var(--off-white);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sd-doorway {
  display: flex;
  gap: 4px;
  padding: 8px 8px 0;
  border-radius: 6px 6px 0 0;
  background: var(--grey-1);
  perspective: 900px;
}

.sd-door {
  position: relative;
  width: 76px;
  height: 150px;
  border: 1px solid var(--grey-3);
  background: var(--grey-4);
  transition: transform 0.5s var(--ease-door);
  animation: sd-settle-l 1.8s var(--ease-door) 0.3s backwards;
}
.sd-door--l { transform-origin: 0 50%; border-radius: 3px 0 0 0; }
.sd-door--r { transform-origin: 100% 50%; border-radius: 0 3px 0 0; animation-name: sd-settle-r; }

.sd-port {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  border: 5px solid var(--grey-2);
  border-radius: 50%;
  background: var(--deep-lemon);
  box-shadow: inset -6px -4px 0 rgb(194 86 48 / 55%);
}
.sd-port::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(248 245 242 / 70%);
}

.sd-push { position: absolute; top: 80px; width: 5px; height: 34px; border-radius: 3px; background: var(--grey-2); }
.sd-door--l .sd-push { right: 8px; }
.sd-door--r .sd-push { left: 8px; }
.sd-kick { position: absolute; left: 6px; right: 6px; bottom: 8px; height: 26px; border-radius: 2px; background: var(--grey-3); }
.sd-floor { width: 100%; height: 8px; background: var(--grey-3); }

.signin--doors:has(.signin-google:focus-visible) .sd-door--l { transform: rotateY(-28deg); }
.signin--doors:has(.signin-google:focus-visible) .sd-door--r { transform: rotateY(28deg); }
@media (hover: hover) {
  .signin--doors:has(.signin-google:hover) .sd-door--l { transform: rotateY(-28deg); }
  .signin--doors:has(.signin-google:hover) .sd-door--r { transform: rotateY(28deg); }
}

.sd-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) var(--space-8);
}
.sd-copy .signin-wordmark { margin-bottom: var(--space-2); }
.sd-behind { margin: auto 0 0; font-size: 13px; color: var(--grey-1); }
.sd-behind b { font-weight: var(--weight-semibold); color: var(--ink); }

/* C · The pass + service bell ------------------------------------------------ */
.signin--pass { background: var(--black); color: var(--off-white); }
.signin--pass .signin-tag { color: var(--tint-peach); }

.sp-lamps { flex: none; display: flex; justify-content: center; height: 150px; }

/* One lamp: a cord (::before), a shade (::after), and the bulb and its glow
   drawn as background layers so the glow spills below the shade. */
.sp-lamp {
  position: relative;
  width: 180px;
  height: 230px;
  background:
    radial-gradient(ellipse 16px 6px at 50% 74px, var(--sg-bulb) 96%, transparent),
    radial-gradient(ellipse 90px 140px at 50% 74px, rgb(210 136 49 / 32%), transparent);
  animation: sp-glow 1.2s var(--ease-out) 0.2s both;
}
.sp-lamp::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 40px;
  margin-left: -1.5px;
  background: var(--grey-2);
}
.sp-lamp::after {
  content: "";
  position: absolute;
  top: 40px;
  left: 55px;
  width: 70px;
  height: 34px;
  background: var(--grey-2);
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
}
.sp-lamp--wide { display: none; }

.sp-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: 36rem;
  margin: -70px auto 0;
  padding: 0 var(--space-6);
  text-align: center;
}
.sp-bell { width: 72px; height: 57px; transform-origin: 50% 100%; animation: sp-ding 2.4s var(--ease-door) 0.6s backwards; }
.signin--pass .signin-h1 { font-size: clamp(3.5rem, 19vw, 4.75rem); line-height: 0.95; color: var(--off-white); }
.signin--pass .signin-lede { color: rgb(248 245 242 / 82%); }

.sp-pass { margin-top: auto; padding-top: var(--space-8); display: flex; flex-direction: column; align-items: center; }
.sp-pass .signin-action { width: 100%; max-width: 26rem; padding: 0 var(--space-6); }
.signin--pass .signin-google:focus-visible { outline-color: var(--off-white); }
.sp-shelf {
  width: 100%;
  height: 22px;
  margin-top: var(--space-3);
  background: var(--grey-4);
  border-top: 3px solid var(--off-white);
  box-shadow: 0 10px 0 var(--grey-2);
}
.sp-under {
  width: 100%;
  max-width: none;
  margin: 10px 0 0;
  padding: var(--space-6) var(--space-6) var(--space-8);
  background: var(--grey-1);
  text-align: center;
  font-size: 13px;
  color: rgb(248 245 242 / 76%);
}

/* D · Staff-only clocking in -------------------------------------------------- */
.signin--clock {
  background-color: var(--off-white);
  background-image:
    linear-gradient(var(--sg-grout) 2px, transparent 2px),
    linear-gradient(90deg, var(--sg-grout) 2px, transparent 2px);
  background-size: 60px 30px, 60px 60px;
}

.sc-plate {
  padding: 6px 12px;
  border-radius: 3px;
  background: var(--deep-lemon);
  box-shadow: inset 0 0 0 2px var(--deep-amber);
  color: var(--black);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sc-stage { flex: 1; display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-2) var(--space-6) var(--space-8); }
.sc-station { display: flex; flex-direction: column; align-items: center; }

.sc-clock {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 200px;
  padding: 14px 14px 22px;
  border-radius: 14px 14px 6px 6px;
  background: var(--grey-2);
  box-shadow: var(--shadow-container);
}
.sc-face {
  width: 100%;
  padding: 8px 0;
  border-radius: 6px;
  background: var(--black);
  color: var(--sg-bulb);
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: 0.2em;
  text-align: center;
}
.sc-slot { width: 130px; height: 8px; border-radius: 4px; background: var(--black); }

.sc-card {
  position: relative;
  z-index: 1;
  width: 160px;
  margin-top: -30px;
  padding: 38px 14px 14px;
  border: 1px solid var(--grey-4);
  border-top: 14px solid var(--tint-salmon);
  background: var(--white);
  box-shadow: var(--shadow-pop);
  transition: transform 0.45s var(--ease-door);
}
.signin--clock:has(.signin-google:focus-visible) .sc-card { transform: translateY(-20px); }
@media (hover: hover) {
  .signin--clock:has(.signin-google:hover) .sc-card { transform: translateY(-20px); }
}
.sc-card__h {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--claret);
}
.sc-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-strong);
  font-size: 12px;
  color: var(--grey-1);
}
.sc-line span:last-child { font-family: var(--font-mono); color: var(--ink); }
.sc-stamp {
  position: absolute;
  top: 84px;
  right: 8px;
  padding: 4px 8px;
  border: 2px solid var(--sg-stamp);
  background: rgb(255 255 255 / 85%);
  color: var(--sg-stamp);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-8deg);
  animation: sc-stamp 0.5s var(--ease-door) both;
}

.sc-copy { display: flex; flex-direction: column; gap: var(--space-4); }

.sc-chalk {
  display: none;
  width: 19rem;
  padding: 22px 26px;
  border: 10px solid var(--deep-amber);
  border-radius: 4px;
  background: var(--sg-chalk);
  box-shadow: var(--shadow-container);
  color: var(--off-white);
  transform: rotate(-1.5deg);
}
.sc-chalk__h { margin: 0 0 12px; font-family: var(--font-display); font-size: 2.1rem; font-weight: var(--weight-bold); line-height: 1; }
.sc-chalk ul { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 17px; }
.sc-chalk li span { color: var(--sg-bulb); }

/* Desktop ----------------------------------------------------------------- */
@media (min-width: 56.25rem) {
  .signin-top { padding: 1.75rem 2.5rem; }

  .st-slips { gap: 4.5rem; }
  .st-slip--ghost { display: block; }

  .sp-lamp--wide { display: block; }
  .sp-lamps { gap: 3rem; }
  .sp-bell { width: 96px; height: 76px; }
  .signin--pass .signin-h1 { font-size: 7.5rem; }
  .signin--pass .signin-lede { font-size: var(--text-lg); }

  .sc-stage { flex-direction: row; align-items: center; justify-content: center; gap: 4.5rem; padding: 0 4rem 3rem; }
  .sc-chalk { display: block; }
  .sc-copy { width: 24rem; gap: var(--space-6); }
  .signin--clock .signin-h1 { font-size: 4rem; }
  .sc-copy .signin-google { align-self: flex-start; }
  .sc-clock { width: 240px; }
  .sc-card { width: 200px; }
}

/* The doors need room for two full-height doors beside the copy, so they go
   side by side later than the other scenes. */
@media (min-width: 64rem) {
  .signin--doors { flex-direction: row; }
  .sd-copy { order: 1; flex: 0 0 34rem; justify-content: center; gap: var(--space-6); padding: 6rem 4.5rem 2rem; }
  .sd-copy .signin-wordmark { position: absolute; top: 2rem; left: 4.5rem; margin: 0; }
  .sd-copy .signin-google { align-self: flex-start; }
  .signin--doors .signin-h1 { font-size: 4rem; }
  .sd-wall { order: 2; flex: 1; height: auto; }
  .sd-plate { top: 60px; font-size: var(--text-sm); }
  .sd-door { width: 170px; height: 420px; }
  .sd-port { top: 70px; width: 88px; height: 88px; margin-left: -44px; border-width: 7px; }
  .sd-port::after { top: 10px; left: 12px; width: 12px; height: 12px; }
  .sd-push { top: 220px; width: 6px; height: 52px; }
  .sd-door--l .sd-push { right: 10px; }
  .sd-door--r .sd-push { left: 10px; }
  .sd-kick { left: 8px; right: 8px; bottom: 10px; height: 44px; }
}

/* Motion: each runs once. -------------------------------------------------- */
@keyframes signin-stamp { from { transform: scale(1.06); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes st-drop {
  0% { transform: translateY(-40px) rotate(-4deg); opacity: 0; }
  55% { transform: translateY(0) rotate(2deg); opacity: 1; }
  80% { transform: rotate(-0.8deg); }
  100% { transform: rotate(0); }
}
@keyframes sd-settle-l { 0% { transform: rotateY(-34deg); } 60% { transform: rotateY(6deg); } 100% { transform: rotateY(0); } }
@keyframes sd-settle-r { 0% { transform: rotateY(34deg); } 60% { transform: rotateY(-6deg); } 100% { transform: rotateY(0); } }
@keyframes sp-glow { from { opacity: 0.3; } to { opacity: 1; } }
@keyframes sp-ding {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(-9deg); }
  30% { transform: rotate(7deg); }
  45% { transform: rotate(-4deg); }
  60% { transform: rotate(2deg); }
}
/* The same ring under a second name, so a tap restarts it. */
@keyframes sp-ding-again {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(-9deg); }
  30% { transform: rotate(7deg); }
  45% { transform: rotate(-4deg); }
  60% { transform: rotate(2deg); }
}
@keyframes sc-stamp { from { transform: rotate(-8deg) scale(1.3); opacity: 0; } to { transform: rotate(-8deg); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .signin *,
  .signin *::before,
  .signin *::after { animation: none !important; transition: none !important; }
}

/* Easter eggs (signin-scenes.js) -------------------------------------------- */
@media (hover: hover) {
  .signin [data-egg] { cursor: pointer; }
}
.signin .is-settled { animation: none; }
.st-slip.is-swing { animation: st-swing 1.2s var(--ease-door) both; }
.st-slip--ghost.is-away { animation: st-away 2.6s var(--ease-door) both; }

.sd-port { overflow: hidden; }
.sd-chef {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 60%;
  height: 70%;
  margin-left: -30%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle 2.5px at 36% 42%, var(--black) 96%, transparent),
    radial-gradient(circle 2.5px at 64% 42%, var(--black) 96%, transparent),
    var(--tint-salmon);
  transform: translateY(170%);
  transition: transform 0.35s var(--ease-door);
}
/* The toque. */
.sd-chef::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: -45%;
  height: 55%;
  border-radius: 40% 40% 4px 4px;
  background: var(--white);
}
.sd-port.is-peek .sd-chef { transform: translateY(0); }
.sd-door.is-pushed { animation: sd-push 0.9s var(--ease-door) both; }

.sp-copy { position: relative; }
.sp-bell.is-ding { animation: sp-ding-again 0.9s var(--ease-door) both; }
.sp-shout {
  position: absolute;
  top: -8px;
  left: 50%;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--deep-lemon);
  color: var(--black);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  white-space: nowrap;
  opacity: 0;
  transform: translate(30px, 0);
  pointer-events: none;
}
.sp-shout.is-shout { animation: sp-shout 1.8s var(--ease-door) both; }
.sp-lamp.is-flicker { animation: sp-flicker 0.9s steps(1) both; }

.sc-card.is-punched { animation: sc-punch 0.9s var(--ease-door) both; }
.sc-chalk.is-wiped ul { animation: sc-wipe 0.6s var(--ease-out) both; }

@keyframes st-swing {
  0% { transform: rotate(0); }
  20% { transform: rotate(5deg); }
  45% { transform: rotate(-3.5deg); }
  70% { transform: rotate(1.5deg); }
  100% { transform: rotate(0); }
}
@keyframes st-away {
  0% { transform: none; opacity: 0.6; }
  30% { transform: translateY(-140%) rotate(-12deg); opacity: 0; }
  70% { transform: translateY(-140%); opacity: 0; }
  100% { transform: none; opacity: 0.6; }
}
@keyframes sd-push { 0%, 100% { transform: rotateY(0); } 35% { transform: rotateY(-40deg); } 65% { transform: rotateY(8deg); } }
.sd-door--r.is-pushed { animation-name: sd-push-r; }
@keyframes sd-push-r { 0%, 100% { transform: rotateY(0); } 35% { transform: rotateY(40deg); } 65% { transform: rotateY(-8deg); } }
@keyframes sp-shout {
  0% { opacity: 0; transform: translate(30px, 10px) scale(0.8); }
  20%, 75% { opacity: 1; transform: translate(30px, -10px) scale(1); }
  100% { opacity: 0; transform: translate(30px, -24px); }
}
@keyframes sp-flicker { 0%, 40%, 80% { opacity: 1; } 20%, 60% { opacity: 0.25; } }
@keyframes sc-punch { 0% { transform: none; } 40% { transform: translateY(-34px); } 100% { transform: none; } }
@keyframes sc-wipe { from { opacity: 0; } to { opacity: 1; } }
