/* Direction: retro diner arcade — cream paper, fat rounded headings,
   thick ink outlines with offset shadows, one ketchup red for timer + Serve */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #fff5e1;
  --surface: #fffdf5;
  --surface-2: #ffe9bd;
  --border: #221a14;
  --border-strong: #bcad9f;
  --ink: #221a14;
  --muted: #6d5b48;
  --accent: #d6251e;
  --accent-hover: #b61f1a;
  --accent-ink: #ffffff;
  --accent-text: #b61a14;
  --accent-strong: #991310;
  --accent-soft: #ffd8d3;
  --accent-border: #ed9789;
  --success: #2c7a4b;
  --success-ink: #ffffff;
  --success-soft: #e6e6cf;
  --success-strong: #287045;
  --warning: #b4740f;
  --warning-ink: #221a14;
  --warning-soft: #f6e6c8;
  --warning-strong: #8d5a0c;
  --danger: #bd2a20;
  --danger-ink: #ffffff;
  --danger-soft: #f7ddca;
  --danger-strong: #bd2a20;
  --chart-1: #d6251e;
  --chart-2: #aa8507;
  --chart-3: #157232;
  --chart-4: #079cad;
  --chart-5: #2f47d0;
  --chart-6: #cf52cc;

  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --display-weight: 800;
  --display-tracking: -0.01em;
  --radius-card: 22px;
  --radius-btn: 999px;
  --radius-input: 14px;
  --card-pad: 1.25rem;
  --x-ink: #221a14;
  --x-shadow: #221a14;
  --x-paper: #fffdf5;
  --x-tile: #ffe3a8;
  --x-mint: #7ed0bd;
  --x-mustard: #f0b31a;
  --x-gold: #f6c744;
  --x-gold-deep: #b98300;
  --x-on-dark: #fff6e3;
  --x-bun: #e9a94b;
  --x-bun-dark: #cd872f;
  --x-patty: #6b3a21;
  --x-cheese: #f7c23a;
  --x-lettuce: #76b94b;
  --x-tomato: #de4430;
  --x-onion: #f2e4f4;
  --x-bacon: #c4523a;
  --x-pickle: #93bb3d;
  --x-egg: #fdf2d4;
  --x-sauce: #e8a92c;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Nunito", system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #100303;
  --surface: #281c1c;
  --surface-2: #1c1010;
  --border: #312626;
  --border-strong: #584f4f;
  --ink: #fff5e1;
  --muted: #9f9488;
  --accent: #d6251e;
  --accent-hover: #dc4640;
  --accent-ink: #ffffff;
  --accent-text: #e2635e;
  --accent-strong: #e2635e;
  --accent-soft: #3c0a09;
  --accent-border: #69120f;
  --success: #2c7a4b;
  --success-ink: #ffffff;
  --success-soft: #161d13;
  --success-strong: #5b9872;
  --warning: #b4740f;
  --warning-ink: #ffffff;
  --warning-soft: #341c06;
  --warning-strong: #ba7f22;
  --danger: #bd2a20;
  --danger-ink: #ffffff;
  --danger-soft: #360c09;
  --danger-strong: #cf665f;
  --chart-1: #d6251e;
  --chart-2: #b08b17;
  --chart-3: #159a43;
  --chart-4: #079cad;
  --chart-5: #4e70fc;
  --chart-6: #cf52cc;
}

/* Bun Rush — chunky diner chrome and burgers drawn in code */

.hard {
  border: 3px solid var(--x-ink);
  box-shadow: 5px 5px 0 0 var(--x-shadow);
}
.hard-sm {
  border: 3px solid var(--x-ink);
  box-shadow: 3px 3px 0 0 var(--x-shadow);
}
.hard-lg {
  border: 4px solid var(--x-ink);
  box-shadow: 9px 9px 0 0 var(--x-shadow);
}
.squish {
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.squish:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 0 var(--x-shadow);
}
.stripes {
  background-image: repeating-linear-gradient(
    135deg,
    var(--x-tile) 0 16px,
    var(--surface) 16px 32px
  );
}
.checks {
  background-image: repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.06) 0 26px,
      rgba(0, 0, 0, 0) 26px 52px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.06) 0 26px,
      rgba(0, 0, 0, 0) 26px 52px
    );
}

/* ---------- ingredient pad ---------- */
.tile {
  @apply flex w-full flex-col items-center gap-1 rounded-2xl bg-surface px-2 py-2 font-display text-xs;
  border: 3px solid var(--x-ink);
  box-shadow: 3px 3px 0 0 var(--x-shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  color: var(--x-ink);
}
.tile:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 0 var(--x-shadow);
}
.tile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.sw {
  height: 15px;
  width: 100%;
  border: 2px solid var(--x-ink);
  border-radius: 7px;
}
.sw--patty { background: var(--x-patty); }
.sw--cheese { background: var(--x-cheese); }
.sw--lettuce { background: var(--x-lettuce); }
.sw--tomato { background: var(--x-tomato); }
.sw--onion { background: var(--x-onion); }
.sw--bacon { background: var(--x-bacon); }
.sw--pickle { background: var(--x-pickle); }
.sw--egg { background: var(--x-egg); }
.sw--sauce { background: var(--x-sauce); }

/* ---------- burger of the day ---------- */
.badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 3px solid var(--x-ink);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  background-color: var(--x-gold);
  color: var(--x-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.5;
  box-shadow: 2px 2px 0 0 var(--x-shadow);
}
.badge-gold .icon {
  height: 0.85rem;
  width: 0.85rem;
}
.badge-gold.hidden {
  display: none;
}
.tk-special,
.tk-special * {
  color: var(--x-ink);
}
.tk-special {
  background-color: var(--x-gold);
}
.pop-gold {
  animation: pop-gold 0.4s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes pop-gold {
  0% { transform: scale(0.82) rotate(-5deg); }
  60% { transform: scale(1.08) rotate(2deg); }
  100% { transform: none; }
}

/* ---------- the burger stack ---------- */
.stack {
  --ly-s: 1;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: calc(2px * var(--ly-s));
  width: calc(190px * var(--ly-s));
  margin: 0 auto;
}
.stack--sm {
  --ly-s: 0.52;
}
.ly {
  width: 100%;
  height: calc(16px * var(--ly-s));
  border: calc(3px * var(--ly-s)) solid var(--x-ink);
  border-radius: calc(10px * var(--ly-s));
  animation: ly-drop 0.36s cubic-bezier(0.22, 1.45, 0.5, 1) both;
}
.ly--bunb {
  height: calc(26px * var(--ly-s));
  border-radius: calc(8px * var(--ly-s)) calc(8px * var(--ly-s))
    calc(22px * var(--ly-s)) calc(22px * var(--ly-s));
  background: var(--x-bun-dark);
}
.ly--bunt {
  height: calc(40px * var(--ly-s));
  border-radius: 999px 999px calc(10px * var(--ly-s)) calc(10px * var(--ly-s));
  background-color: var(--x-bun);
  background-image: radial-gradient(
      circle at 26% 62%,
      var(--x-egg) 0 calc(3px * var(--ly-s)),
      transparent calc(3px * var(--ly-s))
    ),
    radial-gradient(
      circle at 52% 42%,
      var(--x-egg) 0 calc(3px * var(--ly-s)),
      transparent calc(3px * var(--ly-s))
    ),
    radial-gradient(
      circle at 76% 64%,
      var(--x-egg) 0 calc(3px * var(--ly-s)),
      transparent calc(3px * var(--ly-s))
    );
}
.ly--patty {
  height: calc(23px * var(--ly-s));
  border-radius: calc(12px * var(--ly-s));
  background: var(--x-patty);
}
.ly--cheese {
  height: calc(13px * var(--ly-s));
  width: 104%;
  border-radius: calc(4px * var(--ly-s));
  background: var(--x-cheese);
  animation-name: ly-drop-tilt;
}
.ly--lettuce {
  height: calc(17px * var(--ly-s));
  width: 106%;
  border-radius: 999px;
  background: var(--x-lettuce);
}
.ly--tomato {
  height: calc(17px * var(--ly-s));
  width: 98%;
  border-radius: 999px;
  background: var(--x-tomato);
}
.ly--onion {
  height: calc(13px * var(--ly-s));
  width: 96%;
  border-radius: 999px;
  background: var(--x-onion);
}
.ly--bacon {
  height: calc(14px * var(--ly-s));
  border-radius: calc(6px * var(--ly-s));
  background-color: var(--x-bacon);
  background-image: repeating-linear-gradient(
    90deg,
    var(--x-bacon) 0 15px,
    var(--x-egg) 15px 23px
  );
}
.ly--pickle {
  height: calc(12px * var(--ly-s));
  width: 70%;
  border-radius: 999px;
  background: var(--x-pickle);
}
.ly--egg {
  height: calc(18px * var(--ly-s));
  border-radius: calc(16px * var(--ly-s));
  background-color: var(--x-egg);
  background-image: radial-gradient(
    circle at 50% 55%,
    var(--x-mustard) 0 calc(7px * var(--ly-s)),
    transparent calc(7px * var(--ly-s))
  );
}
.ly--sauce {
  height: calc(10px * var(--ly-s));
  width: 92%;
  border-radius: 999px;
  background: var(--x-sauce);
}
.plate-line {
  height: 10px;
  border: 3px solid var(--x-ink);
  border-radius: 999px;
  background: var(--x-mint);
  width: 230px;
  margin: 6px auto 0;
}

/* ---------- motion ---------- */
@keyframes ly-drop {
  from { transform: translateY(-54px) scale(1.14); }
  60% { transform: translateY(3px) scale(0.97); }
  to { transform: none; }
}
@keyframes ly-drop-tilt {
  from { transform: translateY(-54px) rotate(-8deg); }
  60% { transform: translateY(3px) rotate(1deg); }
  to { transform: rotate(-1.2deg); }
}
.tk {
  animation: tk-in 0.42s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
@keyframes tk-in {
  from { transform: translateX(44px) rotate(2.5deg); }
  to { transform: none; }
}
.serve-ok {
  animation: serve-ok 0.44s cubic-bezier(0.3, 0.9, 0.2, 1) both;
}
@keyframes serve-ok {
  0% { transform: none; }
  28% { transform: translateY(-14px) scale(1.05); }
  100% { transform: translateY(-130px) scale(0.6); }
}
.serve-bad {
  animation: shake 0.52s ease both;
}
@keyframes shake {
  0%, 100% { transform: none; }
  18% { transform: translateX(-9px) rotate(-2.5deg); }
  38% { transform: translateX(9px) rotate(2.5deg); }
  58% { transform: translateX(-6px) rotate(-1.5deg); }
  78% { transform: translateX(5px) rotate(1deg); }
}
.serve-bad .ly {
  animation: scatter 0.52s ease-in both;
}
.serve-bad .ly:nth-child(odd) {
  animation-name: scatter-left;
}
@keyframes scatter {
  to { transform: translate(36px, 26px) rotate(22deg); }
}
@keyframes scatter-left {
  to { transform: translate(-36px, 30px) rotate(-24deg); }
}
.flash {
  animation: flash-up 0.95s ease-out both;
}
@keyframes flash-up {
  0% { transform: translateY(8px) scale(0.9); }
  25% { transform: translateY(-6px) scale(1.07); }
  100% { transform: translateY(-48px) scale(0.98); opacity: 0; }
}
.ticking {
  animation: ticking 0.7s steps(2, end) infinite;
}
@keyframes ticking {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.inv-up {
  transform: translateY(18px);
  transition: transform 0.55s cubic-bezier(0.2, 1, 0.3, 1);
}
.inv-up.in {
  transform: none;
}

html.reduced-motion .ly,
html.reduced-motion .tk,
html.reduced-motion .flash,
html.reduced-motion .serve-ok,
html.reduced-motion .serve-bad,
html.reduced-motion .serve-bad .ly,
html.reduced-motion .ticking,
html.reduced-motion .pop-gold {
  animation: none !important;
}
html.reduced-motion .inv-up,
html.reduced-motion .tile,
html.reduced-motion .squish {
  transform: none !important;
  transition: none !important;
}
