/* Hero: headline + live floor preview with the kitchen printer */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 520px at 78% 38%, rgba(48,140,105,.35), transparent 70%),
    var(--leaf-800);
  color: #fff;
}
.hero::before { /* faint table-plan grid, like a floor layout sheet */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-block: clamp(48px, 6vw, 96px) clamp(80px, 8vw, 128px);
}
.hero-title {
  font-size: var(--fs-6); font-weight: 780; line-height: .98;
  font-variation-settings: "wdth" 80; letter-spacing: -0.035em;
  text-wrap: balance; max-width: 13ch;
}
.hero-lead { font-size: var(--fs-3); line-height: 1.5; color: rgba(255,255,255,.82); margin: var(--s-5) 0 var(--s-6); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero-note { margin: var(--s-4) 0 0; font-size: var(--fs-1); color: rgba(255,255,255,.6); }

/* Device frame */
.hero-stage { position: relative; padding-bottom: 56px; }
.device {
  position: relative; background: var(--surface); color: var(--ink);
  border-radius: var(--r-device); box-shadow: var(--shadow-device);
  overflow: hidden; border: 1px solid rgba(255,255,255,.6);
}
.device-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line-soft); background: #FAFBFA;
  font-size: var(--fs-0);
}
.device-title { font-weight: 700; }
.device-tabs { display: flex; gap: 4px; margin-left: 8px; }
.device-tabs > * { padding: 3px 10px; border-radius: 999px; color: var(--muted); font-weight: 500; }
.device-tabs b { background: var(--leaf-100); color: var(--leaf-800); font-weight: 650; }
.device-clock { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.floor { padding: 14px 14px 16px; }
.floor-head { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-0); font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.floor-head-rooms { margin-top: 14px; }
.floor-legend { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--muted); font-size: 11px; }
.floor-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 6px; }
.dot.free { background: var(--state-free); } .dot.running { background: var(--state-running); } .dot.billed { background: var(--state-billed); }

.floor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tbl {
  --c: var(--state-free); --bg: var(--state-free-bg);
  position: relative; display: grid; gap: 1px; min-height: 76px;
  padding: 9px 10px; border-radius: var(--r-control);
  background: var(--bg); border: 1.5px solid color-mix(in srgb, var(--c) 35%, transparent);
  transition: background-color .45s, border-color .45s;
}
.tbl::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); transition: background-color .45s; }
.tbl[data-state="running"] { --c: var(--state-running); --bg: var(--state-running-bg); }
.tbl[data-state="billed"]  { --c: var(--state-billed); --bg: var(--state-billed-bg); }
.tbl-name { font-family: var(--font-display); font-weight: 750; font-size: 1.05rem; line-height: 1.1; }
.tbl-meta { font-size: 11px; color: var(--muted); }
.tbl-amt { font-weight: 700; font-size: var(--fs-0); color: var(--c); font-variant-numeric: tabular-nums; min-height: 1.2em; }
.tbl.is-pulse { animation: tbl-pulse .7s var(--ease-out); }
@keyframes tbl-pulse { 0% { transform: scale(1); } 35% { transform: scale(1.05); } 100% { transform: scale(1); } }

.room-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.room { display: flex; flex-direction: column; padding: 7px 10px; border-radius: var(--r-chip); background: var(--paper); border: 1px solid var(--line-soft); font-size: 11px; color: var(--muted); }
.room b { font-family: var(--font-display); font-size: var(--fs-1); color: var(--ink); }
.room[data-state="occupied"] { background: #EEF0FB; border-color: #D6DBF4; }
.room[data-state="cleaning"] { background: #FBF0E8; border-color: #F1DCCB; }
.room[data-state="free"] b { color: var(--state-free); }

.device-toast {
  position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; font-size: var(--fs-0); font-weight: 600;
  padding: 8px 14px 8px 32px; border-radius: 999px; white-space: nowrap;
  opacity: 0; transition: opacity .3s, transform .4s var(--ease-spring);
}
.device-toast::before { content: ""; position: absolute; left: 12px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--state-free); box-shadow: 0 0 0 3px rgba(31,157,97,.3); }
.device-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Kitchen printer with tickets coming out of the top */
.printer { position: absolute; right: -44px; bottom: -34px; width: 196px; z-index: 2; }
.printer-out { position: relative; height: 190px; overflow: hidden; margin: 0 14px -4px; display: flex; align-items: flex-end; justify-content: center; }
.printer-body {
  position: relative; z-index: 2; height: 56px; border-radius: 12px 12px 14px 14px;
  background: linear-gradient(180deg, #2B3934, #1A2420); box-shadow: 0 16px 30px -12px rgba(0,0,0,.6);
  display: flex; align-items: center; gap: 8px; padding: 14px 14px 0;
}
.printer-body::before { content: ""; position: absolute; left: 12px; right: 12px; top: 6px; height: 4px; border-radius: 4px; background: #0A100E; }
.printer-led { width: 7px; height: 7px; border-radius: 50%; background: var(--state-free); box-shadow: 0 0 8px var(--state-free); }
.printer-led.is-busy { background: var(--turmeric); box-shadow: 0 0 10px var(--turmeric); }
.printer-label { font-size: 10px; color: rgba(255,255,255,.55); font-weight: 600; }

.ticket {
  position: absolute; bottom: 0; width: 100%;
  background: var(--receipt); color: #1d1d1b;
  font-family: var(--font-receipt); font-size: 11px; line-height: 1.45;
  padding: 10px 12px 14px; box-shadow: 0 6px 16px -8px rgba(0,0,0,.4);
  /* torn top edge */
  clip-path: polygon(0 6px, 5% 0, 10% 6px, 15% 0, 20% 6px, 25% 0, 30% 6px, 35% 0, 40% 6px, 45% 0, 50% 6px, 55% 0, 60% 6px, 65% 0, 70% 6px, 75% 0, 80% 6px, 85% 0, 90% 6px, 95% 0, 100% 6px, 100% 100%, 0 100%);
}
.ticket-head { display: flex; justify-content: space-between; border-bottom: 1px dashed #9a9a92; padding: 4px 0 5px; margin-bottom: 5px; }
.ticket-head b { font-weight: 600; }
.ticket-row { display: grid; grid-template-columns: 20px 1fr; }
.ticket-note { padding-left: 20px; font-style: italic; color: #55554f; }
.ticket-foot { border-top: 1px dashed #9a9a92; margin-top: 5px; padding-top: 4px; color: #66665f; font-size: 10px; }
.ticket.is-void .ticket-head b { color: var(--state-void); }

/* Trust strip */
.proof { position: relative; border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.12); }
.proof-list { display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between; list-style: none; padding-block: 18px; font-size: var(--fs-1); color: rgba(255,255,255,.78); }
.proof-list li { display: flex; align-items: center; gap: 10px; }
.proof-list li::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--turmeric); transform: rotate(45deg); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-title { max-width: 16ch; }
  .hero-stage { max-width: 640px; }
}
@media (max-width: 640px) {
  .device-tabs { display: none; }
  .floor-legend { display: none; }
  .floor-grid, .room-strip { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .tbl { min-height: 66px; padding: 7px 7px 7px 9px; }
  .tbl-name { font-size: .95rem; }
  .tbl-meta { font-size: 10px; }
  .room span { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .printer { position: relative; right: auto; bottom: auto; width: 176px; margin: -26px 8px 0 auto; }
  .printer-out { height: 150px; }
  .hero-stage { padding-bottom: 0; }
  .proof-list { justify-content: flex-start; gap: 10px 22px; }
}
