:root {
  color-scheme: light;
  --yellow: #ffc928;
  --sun: #ffd95d;
  --gold: #d8940d;
  --ink: #16120d;
  --charcoal: #282017;
  --cream: #fff8e7;
  --paper: #ffffff;
  --green: #0d7a3f;
  --mint: #eaf8ec;
  --accent: #ef7d23;
  --danger: #b42318;
  --muted: #766b5d;
  --line: #eadfca;
  --shadow: 0 22px 60px rgba(70, 43, 0, 0.16);
  --tight-shadow: 0 12px 32px rgba(35, 24, 8, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 222, 97, 0.6), transparent 30%),
    linear-gradient(180deg, #fff4c6 0%, #fffaf0 34%, #ffffff 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.42;
  background-image:
    linear-gradient(30deg, rgba(255,255,255,0.5) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.5) 87.5%, rgba(255,255,255,0.5)),
    linear-gradient(150deg, rgba(255,255,255,0.5) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.5) 87.5%, rgba(255,255,255,0.5)),
    linear-gradient(30deg, rgba(255,255,255,0.5) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.5) 87.5%, rgba(255,255,255,0.5)),
    linear-gradient(150deg, rgba(255,255,255,0.5) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.5) 87.5%, rgba(255,255,255,0.5));
  background-position: 0 0, 0 0, 18px 31px, 18px 31px;
  background-size: 36px 62px;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(255, 250, 236, 0.9);
  border-bottom: 1px solid rgba(40, 32, 23, 0.08);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 8px 0 rgba(0,0,0,0.08);
  animation: logoBob 4.5s ease-in-out infinite;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand strong, .brand small { display: block; }
.brand strong { font-weight: 950; letter-spacing: 0; }
.brand small { color: var(--muted); font-size: 12px; font-weight: 800; }
nav { display: flex; gap: 8px; }
nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 900;
}
nav a.active { background: var(--ink); color: var(--yellow); }

main { width: min(1220px, calc(100% - 28px)); margin: 0 auto; padding: 24px 0 52px; }
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: center;
  min-height: 520px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 62px);
  border: 3px solid var(--ink);
  border-radius: 18px;
  background:
    linear-gradient(115deg, rgba(255, 201, 40, 0.96), rgba(255, 231, 132, 0.9)),
    url("https://images.unsplash.com/photo-1543352634-a1c51d9f1fa7?auto=format&fit=crop&w=1800&q=80") center/cover;
  box-shadow: 0 12px 0 var(--ink), var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 84% 18%, rgba(255,255,255,0.48), transparent 24%),
    linear-gradient(120deg, rgba(255,255,255,0.28), transparent 48%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -70px;
  bottom: -90px;
  border: 30px solid rgba(22, 18, 13, 0.08);
  border-radius: 50%;
}
.hero-copy, .hero-brand-card { position: relative; z-index: 1; }
.hero-copy { animation: slideUp 700ms ease both; }
.hero h1 {
  max-width: 720px;
  margin: 8px 0 14px;
  color: var(--ink);
  font-size: clamp(42px, 6.6vw, 82px);
  line-height: 0.94;
  letter-spacing: 0;
  text-wrap: balance;
}
.hero p {
  max-width: 590px;
  margin: 0;
  color: rgba(22, 18, 13, 0.82);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
  font-weight: 750;
}
.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.hero-ghost { background: rgba(255,255,255,0.7); color: var(--ink); border-color: var(--ink); }
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.trust-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgba(22,18,13,0.16);
  border-radius: 999px;
  background: rgba(255,255,255,0.52);
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 950;
}
.hero-brand-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: rgba(255,255,255,0.76);
  box-shadow: 0 10px 0 rgba(22, 18, 13, 0.92), var(--tight-shadow);
  text-align: center;
  animation: floatIn 850ms ease both 120ms;
}
.hero-brand-card strong { font-size: 22px; }
.hero-brand-card span { color: var(--muted); font-weight: 850; }
.logo-orbit {
  position: relative;
  display: grid;
  width: min(310px, 68vw);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
}
.logo-orbit::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px dashed rgba(22,18,13,0.34);
  border-radius: 50%;
  animation: spin 24s linear infinite;
}
.logo-orbit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 12px 0 rgba(22,18,13,0.92);
  animation: logoPulse 3.8s ease-in-out infinite;
}
.steam-lines {
  display: flex;
  justify-content: center;
  gap: 7px;
  height: 22px;
  margin-top: -6px;
}
.steam-lines span {
  width: 8px;
  height: 20px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.75;
  animation: steam 1.7s ease-in-out infinite;
}
.steam-lines span:nth-child(2) { animation-delay: 0.24s; }
.steam-lines span:nth-child(3) { animation-delay: 0.48s; }

.promo-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}
.promo-band article {
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 8px 0 rgba(22,18,13,0.92);
}
.promo-band strong { display: block; margin-bottom: 6px; font-size: 18px; }
.promo-band span { color: var(--muted); font-weight: 750; line-height: 1.4; }

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 28px;
}
.sidebar { position: sticky; top: 88px; display: grid; gap: 14px; }
.cart, .login-box, .order-card, .menu-form {
  background: rgba(255,255,255,0.95);
  border: 2px solid rgba(22,18,13,0.14);
  border-radius: 14px;
  box-shadow: var(--tight-shadow);
}
.cart {
  padding: 16px;
  border-color: var(--ink);
  box-shadow: 0 8px 0 rgba(22,18,13,0.92);
}
.cart h3, .checkout h3 { margin: 0 0 12px; }
.cart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.qty { display: flex; align-items: center; gap: 8px; }
.qty button, .icon-btn {
  width: 32px;
  height: 32px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  font-weight: 950;
}
.total-row { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; font-size: 18px; font-weight: 950; }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 12px 0 16px; }
.section-head h1, .section-head h2 { margin: 0; }
.section-head h2 { font-size: clamp(28px, 4vw, 46px); letter-spacing: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green);
  font-weight: 950;
  font-size: 13px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.menu-card {
  display: grid;
  grid-template-columns: 155px 1fr;
  min-height: 178px;
  overflow: hidden;
  background: white;
  border: 2px solid rgba(22,18,13,0.14);
  border-radius: 14px;
  box-shadow: var(--tight-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.menu-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: 0 10px 0 rgba(22,18,13,0.92), var(--shadow);
}
.menu-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--yellow);
}
.menu-body { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.menu-body h3 { margin: 0; font-size: 19px; letter-spacing: 0; }
.menu-body p { margin: 0; color: var(--muted); line-height: 1.4; font-weight: 650; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.price { font-weight: 950; color: var(--green); }
.unavailable { filter: grayscale(1); opacity: 0.62; }
.field { display: grid; gap: 7px; }
label { color: var(--muted); font-size: 13px; font-weight: 900; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
}
textarea { min-height: 84px; resize: vertical; }
.checkout { display: grid; gap: 12px; margin-top: 10px; }
.radio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-grid label, .checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}
.radio-grid input, .checkline input { width: auto; min-height: auto; }
.primary, .secondary, .ghost, .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 950;
  text-decoration: none;
}
.primary {
  background: var(--ink);
  color: var(--yellow);
  box-shadow: 0 6px 0 rgba(22,18,13,0.22);
}
.add-button {
  min-width: 104px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}
.add-button.has-items {
  background: var(--green);
  color: white;
}
.add-button:active { transform: translateY(2px); }
.secondary { background: var(--accent); color: white; }
.ghost { background: white; color: var(--ink); border-color: var(--line); }
.danger { background: #fff2f0; color: var(--danger); border-color: #ffd6d0; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.45; }
.notice { padding: 12px; border-radius: 10px; background: #fff6d4; color: #735105; line-height: 1.45; font-weight: 750; }
.confirmation {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 28px auto;
  padding: 22px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 8px 0 rgba(22,18,13,0.92), var(--shadow);
}
.confirmation h1 { margin: 0; }
.receipt-table { width: 100%; border-collapse: collapse; }
.receipt-table td, .receipt-table th { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.receipt-table td:last-child, .receipt-table th:last-child { text-align: right; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.admin-shell { padding-top: 10px; }
.login-box { max-width: 430px; margin: 34px auto; padding: 22px; }
.stack { display: grid; gap: 14px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  padding: 15px;
  border-radius: 14px;
  background: white;
  border: 1px solid var(--line);
}
.stat span { display: block; color: var(--muted); font-size: 13px; font-weight: 900; }
.stat strong { font-size: 24px; }
.tabs, .toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.tabs button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-weight: 950;
}
.tabs button.active { background: var(--ink); color: var(--yellow); border-color: var(--ink); }
.orders-list, .admin-menu-list { display: grid; gap: 12px; }
.order-card { padding: 16px; }
.order-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.order-top h3 { margin: 0; }
.order-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.mini { font-size: 13px; color: var(--muted); }
.status-pending { background: #fff8e6; color: #8a5a00; }
.status-accepted, .status-preparing { background: var(--mint); color: var(--green); }
.status-ready { background: #e8f2ff; color: #1559a6; }
.status-delayed { background: #fff0e2; color: #9a4d00; }
.status-denied { background: #fff2f0; color: var(--danger); }
.status-completed { background: #f0f2f5; color: #344054; }
.status-controls {
  display: grid;
  grid-template-columns: 160px 120px minmax(160px, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}
.menu-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
}
.menu-form .wide { grid-column: span 2; }
.admin-menu-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.admin-menu-item img { width: 88px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--yellow); }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--yellow);
  box-shadow: var(--shadow);
  z-index: 20;
  font-weight: 900;
}

@keyframes logoBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-3px) rotate(1deg); }
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}
@keyframes steam {
  0%, 100% { transform: translateY(6px) scaleY(0.72); opacity: 0.25; }
  50% { transform: translateY(-6px) scaleY(1); opacity: 0.8; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 940px) {
  .hero, .layout, .promo-band { grid-template-columns: 1fr; }
  .sidebar { position: static; order: 2; }
  .menu-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-controls, .menu-form { grid-template-columns: 1fr; }
  .menu-form .wide { grid-column: auto; }
  .hero { min-height: auto; }
}

@media (max-width: 560px) {
  .topbar { align-items: flex-start; }
  .brand-mark { width: 46px; height: 46px; }
  .brand small { display: none; }
  nav a { padding: 8px; }
  main { width: min(100% - 20px, 1220px); padding-top: 12px; }
  .hero { padding: 22px; border-width: 2px; box-shadow: 0 8px 0 var(--ink), var(--shadow); }
  .hero h1 { font-size: 42px; }
  .hero-actions .primary, .hero-actions .ghost { width: 100%; }
  .logo-orbit { width: min(265px, 78vw); }
  .menu-card { grid-template-columns: 1fr; }
  .menu-card img { height: 190px; }
  .radio-grid, .stats-grid { grid-template-columns: 1fr; }
  .order-top, .section-head { align-items: flex-start; flex-direction: column; }
  .admin-menu-item { grid-template-columns: 74px 1fr; }
  .admin-menu-item .actions { grid-column: 1 / -1; }
}
