/* ============================================================
   KauPi Cafe - Order Hub
   Palette: "healing cafe" - matcha/sage green + cream.
   (Sengaja lari dari territory dark-chocolate warm tone.)
   ============================================================ */

:root {
  --cream: #edf4ee;
  --cream-2: #dde9df;
  --ink: #1f2e24;
  --ink-soft: #4a5a4f;
  --matcha: #3e6b4a;
  --matcha-dark: #2c5138;
  --matcha-light: #dcead9;
  --accent: #e0b64b;
  --danger: #c0533f;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(31, 46, 36, 0.10);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

.wrap {
  width: min(100% - 2.5rem, 960px);
  margin-inline: auto;
}

a { color: var(--matcha); }

/* ---------- Status banner ---------- */
.status-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  background: var(--matcha);
  color: var(--white);
  transition: background 0.25s;
}
.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #9ff2b1;
  flex: none;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
body[data-status="soldout"] .status-banner { background: #a97e14; }
body[data-status="soldout"] .status-dot { background: #ffe08a; }
body[data-status="closed"] .status-banner { background: #8c3a2b; }
body[data-status="closed"] .status-dot { background: #ffb3a1; animation: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 37px;
  z-index: 50;
  background: rgba(237, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cream-2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.6rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-cup { color: var(--matcha); display: flex; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand-name em { color: var(--matcha); font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.12s, background 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--matcha);
  color: var(--white);
}
.btn-primary:hover { background: var(--matcha-dark); }
.btn-ghost {
  background: transparent;
  color: var(--matcha-dark);
  box-shadow: inset 0 0 0 2px var(--matcha);
}
.btn-small { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-big { padding: 0.9rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-notify {
  background: var(--accent);
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding: 2rem 0 2.5rem;
  background:
    radial-gradient(600px 300px at 85% -10%, var(--matcha-light), transparent 70%),
    var(--cream);
}
.hero-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--matcha);
  margin-bottom: 0.5rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}
.hl {
  color: var(--matcha);
  font-style: italic;
}
.hero-status-card {
  background: var(--white);
  border: 1.5px solid var(--cream-2);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.1rem;
}
.hero-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.hero-status-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.status-pill {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--matcha-light);
  color: var(--matcha-dark);
}
body[data-status="soldout"] .status-pill { background: #fbedc4; color: #7c5c0d; }
body[data-status="closed"] .status-pill { background: #f6d9d1; color: #7d2f20; }
.hero-status-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}
.hero-hours {
  font-size: 0.82rem;
  margin-top: 0.55rem;
  color: var(--ink-soft);
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}
.hero-cta-row .btn { flex: 1 1 auto; }
/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section-alt { background: var(--cream-2); }
.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.title-em {
  font-size: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink-soft);
}
.section-sub {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  max-width: 60ch;
}

.tag-ganti {
  display: inline-block;
  background: #fff3cd;
  color: #7c5c0d;
  border: 1px dashed #d8b448;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.05rem 0.4rem;
  border-radius: 6px;
  vertical-align: middle;
}

/* ---------- Cara Order ---------- */
.steps {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}
.step-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--cream-2);
  padding: 1.15rem 1.15rem 1.15rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.9rem;
}
.step-num {
  grid-row: span 2;
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--matcha);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: 12px;
}
.step-card h3 { font-size: 1rem; }
.step-card p { grid-column: 2; font-size: 0.9rem; color: var(--ink-soft); }

.callout {
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  margin-top: 0.8rem;
}
.callout-warn {
  background: #fdeee9;
  border: 1.5px solid #eec4b8;
}
.callout-soft {
  background: var(--white);
  border: 1.5px dashed var(--matcha);
}

/* ---------- Menu ---------- */
.menu-cat { margin-bottom: 1.6rem; }
.menu-cat-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.menu-items {
  display: grid;
  gap: 0.5rem;
  list-style: none;
}
.menu-item {
  background: var(--white);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: border-color 0.15s;
}
.menu-item.in-cart { border-color: var(--matcha); }
.menu-item-info { flex: 1; min-width: 0; }
.menu-item-name { font-weight: 700; font-size: 0.95rem; }
.menu-item-price {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 700;
}
.menu-item-desc {
  font-size: 0.76rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.soldout-tag {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.menu-item.is-soldout { opacity: 0.55; }
.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: none;
}
.qty-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: none;
  background: var(--matcha-light);
  color: var(--matcha-dark);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s;
}
.qty-btn:hover { background: #c9dfc4; }
.qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.qty-val {
  min-width: 26px;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---------- Order box / composer ---------- */
.order-box {
  background: var(--white);
  border-radius: var(--radius);
  border: 2px solid var(--matcha);
  box-shadow: var(--shadow);
  padding: 1.3rem;
  margin-top: 2rem;
  scroll-margin-top: 110px;
}
.order-box-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}
.order-empty {
  color: var(--ink-soft);
  font-size: 0.9rem;
  background: var(--cream);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}
.order-lines {
  list-style: none;
  margin-bottom: 0.75rem;
  display: grid;
  gap: 0.35rem;
}
.order-lines li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px dashed var(--cream-2);
}
.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.95rem;
  padding: 0.6rem 0;
  border-top: 2px solid var(--ink);
  margin-bottom: 1rem;
}
.order-total-row small { color: var(--ink-soft); font-weight: 400; }
.order-total-row strong { font-size: 1.25rem; font-family: var(--font-display); }

.order-fields { display: grid; gap: 0.8rem; margin-bottom: 1rem; }
.field { display: grid; gap: 0.3rem; }
.field-label { font-weight: 700; font-size: 0.85rem; }
.field input, .field select {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1.5px solid var(--cream-2);
  background: var(--cream);
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--matcha);
  border-color: var(--matcha);
}
.order-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.7rem;
  text-align: center;
}

/* Floating cart bar */
.cart-bar {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.3rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(31,46,36,0.35);
  cursor: pointer;
  white-space: nowrap;
}
.cart-bar-cta { color: #9ff2b1; }

/* ---------- Mini tour ---------- */
.tour-list { display: grid; gap: 0.7rem; }
.tour-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--cream-2);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.tour-day {
  flex: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  background: var(--matcha);
  color: var(--white);
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
}
.tour-card h3 { font-size: 1.05rem; }
.tour-card p { font-size: 0.85rem; color: var(--ink-soft); }
.tour-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Catering ---------- */
.catering-form {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem;
  display: grid;
  gap: 0.9rem;
  max-width: 560px;
}
.form-error {
  background: #fdeee9;
  border: 1.5px solid #eec4b8;
  color: #7d2f20;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
}

/* ---------- Kisah ---------- */
.story p { margin-bottom: 0.9rem; max-width: 62ch; }
.story-milestones {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.3rem;
}
.milestone {
  background: var(--white);
  border-left: 4px solid var(--matcha);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.milestone span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--matcha);
}

/* ---------- Social proof ---------- */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.proof-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--cream-2);
  padding: 1.1rem;
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.proof-link:hover { border-color: var(--matcha); }
.proof-big {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.7rem;
  color: var(--matcha-dark);
}
.review-sample {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  font-style: italic;
  color: var(--ink-soft);
  border-left: 4px solid var(--accent);
  font-size: 0.92rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 2.5rem 0 6rem;
  margin-top: 1rem;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  margin-bottom: 1.3rem;
}
.footer-brand em { color: #9ff2b1; }
.footer-cols {
  display: grid;
  gap: 1.3rem;
  margin-bottom: 1.6rem;
}
.footer-cols h4 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ab5a0;
  margin-bottom: 0.35rem;
}
.footer-cols a {
  display: block;
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 0.15rem;
}
.footer-cols a:hover { color: #9ff2b1; }
.footer-cols p { font-size: 0.8rem; color: #9ab5a0; }
.footer-legal {
  font-size: 0.75rem;
  color: #9ab5a0;
  border-top: 1px solid #35473b;
  padding-top: 1.1rem;
  line-height: 1.8;
}
.footer-legal .tag-ganti { background: #35473b; color: #ffe08a; border-color: #6a7c5f; }

/* ---------- Owner demo panel ---------- */
.owner-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}
.owner-fab {
  border: none;
  background: var(--ink);
  color: var(--cream);
  font: inherit;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(31,46,36,0.35);
}
.owner-controls {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--cream-2);
  box-shadow: var(--shadow);
  padding: 0.9rem;
  width: 230px;
}
.owner-hint { font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 0.6rem; }
.owner-btns { display: grid; gap: 0.35rem; }
.owner-btns button {
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  border: 1.5px solid var(--cream-2);
  background: var(--cream);
  cursor: pointer;
}
.owner-btns button.is-active {
  border-color: var(--matcha);
  background: var(--matcha-light);
}

/* Bila cart bar wujud, jangan bertindih dengan owner fab (mobile) */
.cart-bar:not([hidden]) ~ * .owner-panel,
body:has(.cart-bar:not([hidden])) .owner-panel { bottom: 4.5rem; }

/* ---------- Desktop ---------- */
@media (min-width: 700px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step-card { grid-template-columns: auto 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .menu-items { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 3.5rem 0 4rem; }
  .hero-cta-row .btn { flex: 0 1 auto; }
  .order-fields { grid-template-columns: 1fr 1fr; }
  .site-footer { padding-bottom: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-dot { animation: none; }
}
