/* =========================================================
   Memo Coffee — Build Your Memories Here
   ========================================================= */
:root {
  --cream: #fff8f0;
  --cream-2: #fdeedb;
  --brown: #4a2c1a;
  --brown-2: #6f4e37;
  --caramel: #b87333;
  --caramel-2: #d99a5b;
  --ink: #2d1b10;
  --muted: #8a7466;
  --white: #fffdf9;
  --line: rgba(74, 44, 26, .12);
  --shadow: 0 18px 40px -18px rgba(74, 44, 26, .35);
  --radius: 20px;
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; }

.container { width: min(1160px, 92%); margin-inline: auto; }
.section { padding: 84px 0; }
.section--alt { background: linear-gradient(180deg, var(--cream-2), var(--cream)); }
.section__head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section__head p { color: var(--muted); margin-top: 10px; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; color: var(--brown); }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
h1 em, h2 em { font-style: italic; color: var(--caramel); }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--caramel); margin-bottom: 12px;
}
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  text-decoration: none; white-space: nowrap;
}
.btn--solid { background: var(--brown); color: var(--cream); box-shadow: 0 10px 22px -10px rgba(74,44,26,.6); }
.btn--solid:hover { background: var(--ink); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--brown); border: 1.6px solid rgba(74,44,26,.28); }
.btn--ghost:hover { border-color: var(--brown); background: rgba(74,44,26,.05); }
.btn--sm { padding: 9px 18px; font-size: .88rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.link-btn { color: var(--muted); font-size: .8rem; text-decoration: underline; }
.link-btn:hover { color: var(--brown); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 60; padding: 14px 0;
  transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
}
.header.is-scrolled {
  background: rgba(255, 248, 240, .88); backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px -18px rgba(74,44,26,.5); padding: 8px 0;
}
.header__inner { display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brown); color: var(--cream); font-family: var(--font-head);
  font-size: 1.3rem; font-weight: 700;
}
.logo__text { font-family: var(--font-head); font-size: 1.12rem; font-weight: 700; color: var(--brown); line-height: 1.1; display: flex; flex-direction: column; }
.logo__text em { font-style: normal; font-family: var(--font-body); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--caramel); font-weight: 700; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--brown); font-weight: 600; font-size: .93rem; opacity: .85; }
.nav a:hover { opacity: 1; color: var(--caramel); }
.header__actions { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); border: 1px solid var(--line); color: var(--brown); transition: .18s;
}
.icon-btn:hover { background: var(--cream-2); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn--plain { border: none; background: none; font-size: 1.7rem; line-height: 1; width: 36px; height: 36px; }
.badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--caramel); color: #fff; font-size: .7rem; font-weight: 800;
  display: grid; place-items: center;
}
.user-chip { display: flex; align-items: center; gap: 8px; }
.user-chip__avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--caramel); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .95rem;
}
.user-chip__menu { display: flex; align-items: center; gap: 6px; }
.user-chip__name { font-weight: 700; font-size: .9rem; color: var(--brown); }

.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 22px; height: 2px; background: var(--brown); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 150px 0 90px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 85% 20%, rgba(217,154,91,.25), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(184,115,51,.14), transparent 70%);
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; position: relative; }
.hero__sub { color: var(--muted); font-size: 1.05rem; margin: 18px 0 28px; max-width: 46ch; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 34px; list-style: none; margin-top: 42px; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-family: var(--font-head); font-size: 1.6rem; color: var(--brown); }
.hero__stats span { font-size: .8rem; color: var(--muted); font-weight: 600; }

.hero__visual { position: relative; }
.hero__img-wrap {
  border-radius: 32px; overflow: hidden; box-shadow: var(--shadow); transform: rotate(1.5deg);
  aspect-ratio: 4/4.4;
}
.hero__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero__float-card {
  position: absolute; left: -26px; bottom: 42px; display: flex; align-items: center; gap: 12px;
  background: var(--white); padding: 12px 18px 12px 12px; border-radius: 18px; box-shadow: var(--shadow);
  animation: floaty 5s ease-in-out infinite;
}
.hero__float-card img { width: 54px; height: 54px; border-radius: 13px; object-fit: cover; }
.hero__float-card strong { display: block; font-size: .92rem; color: var(--brown); }
.hero__float-card span { font-size: .76rem; color: var(--muted); }
.hero__price-chip {
  position: absolute; top: 22px; right: -12px; background: var(--brown); color: var(--cream);
  padding: 10px 18px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  box-shadow: var(--shadow); transform: rotate(3deg);
}
.hero__price-chip b { color: var(--caramel-2); }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Menu ---------- */
.menu__group-title { margin: 8px 0 22px; font-size: 1.35rem; }
.menu__group-title span { display: inline-flex; align-items: center; gap: 8px; }
.menu__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 44px; }
.menu__grid--coffee { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__tag {
  position: absolute; top: 12px; left: 12px; background: rgba(45,27,16,.82); color: var(--cream);
  padding: 5px 12px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  backdrop-filter: blur(6px);
}
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__body p { font-size: .86rem; color: var(--muted); flex: 1; }
.card__price { font-family: var(--font-head); font-size: 1.35rem; color: var(--brown); font-weight: 700; }
.card__price small { font-family: var(--font-body); font-size: .74rem; color: var(--muted); font-weight: 600; display: block; }
.card__actions { display: flex; gap: 8px; margin-top: 6px; }
.card__actions .btn { flex: 1; padding: 10px 12px; font-size: .82rem; }
.btn--caramel { background: var(--caramel); color: #fff; box-shadow: 0 10px 20px -12px rgba(184,115,51,.9); }
.btn--caramel:hover { background: #a36527; transform: translateY(-2px); }

.menu__banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: linear-gradient(120deg, var(--brown), #6b4326); color: var(--cream);
  padding: 26px 30px; border-radius: var(--radius); margin-bottom: 26px;
}
.menu__banner strong { font-family: var(--font-head); font-size: 1.3rem; display: block; }
.menu__banner p { opacity: .85; font-size: .92rem; margin-top: 4px; }
.menu__banner p b { color: var(--caramel-2); }
.menu__banner-chip {
  background: var(--caramel); color: #fff; font-weight: 800; font-size: .82rem;
  padding: 8px 18px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Steps ---------- */
.steps__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; text-align: center; transition: transform .2s;
}
.step:hover { transform: translateY(-4px); }
.step__num {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px;
  background: var(--cream-2); color: var(--caramel); font-family: var(--font-head); font-size: 1.3rem; font-weight: 700;
}
.step p { color: var(--muted); font-size: .9rem; margin-top: 8px; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: center; }
.about__img { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3.4; }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about__copy p { color: var(--muted); margin: 14px 0 18px; }
.about__list { list-style: none; display: grid; gap: 10px; margin-bottom: 26px; }
.about__list li { padding-left: 30px; position: relative; font-size: .94rem; }
.about__list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 21px; height: 21px; border-radius: 50%;
  background: var(--cream-2); color: var(--caramel); font-size: .72rem; font-weight: 800;
  display: grid; place-items: center;
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #e9dccb; padding: 64px 0 24px; margin-top: 20px; }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
.logo--light .logo__mark { background: var(--caramel); }
.logo--light .logo__text { color: var(--cream); }
.footer__tag { margin-top: 14px; font-size: .88rem; opacity: .7; max-width: 34ch; }
.footer h5 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--caramel-2); margin-bottom: 14px; }
.footer a { display: block; color: #e9dccb; text-decoration: none; font-size: .9rem; opacity: .8; margin-bottom: 9px; }
.footer a:hover { opacity: 1; }
.footer__hours { font-size: .85rem; opacity: .6; }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; margin-top: 44px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; opacity: .65;
}
.footer__bottom .link-btn { color: #e9dccb; }

/* ---------- Overlay / Drawer ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(30,18,10,.5); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: .25s; z-index: 70;
}
.overlay.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw); z-index: 80;
  background: var(--cream); box-shadow: -20px 0 50px -20px rgba(0,0,0,.4);
  transform: translateX(102%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.drawer__foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); background: var(--white); }
.drawer__total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer__total span { color: var(--muted); font-weight: 600; }
.drawer__total strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--brown); }

.cart-item {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 12px;
}
.cart-item img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; }
.cart-item__name { font-weight: 700; font-size: .88rem; color: var(--brown); line-height: 1.35; }
.cart-item__price { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.cart-item__note {
  width: 100%; margin-top: 8px; border: 1px dashed var(--line); border-radius: 10px; padding: 6px 9px;
  font-size: .78rem; background: var(--cream); resize: none;
}
.cart-item__qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn {
  width: 24px; height: 24px; border-radius: 8px; border: 1px solid var(--line); background: var(--cream);
  display: grid; place-items: center; font-weight: 800; color: var(--brown); font-size: .85rem;
}
.qty-btn:hover { background: var(--cream-2); }
.cart-item__qty span { font-weight: 700; font-size: .88rem; min-width: 16px; text-align: center; }
.cart-item__remove { color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 2px 4px; }
.cart-item__remove:hover { color: #c0392b; }
.empty { text-align: center; color: var(--muted); padding: 48px 10px; }
.empty__icon { font-size: 2.6rem; display: block; margin-bottom: 10px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
  background: rgba(30,18,10,.55); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: .22s; overflow-y: auto;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__box {
  background: var(--cream); border-radius: 26px; padding: 32px; width: min(440px, 100%);
  max-height: 92vh; overflow-y: auto; position: relative; transform: translateY(14px) scale(.98);
  transition: .25s; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5);
}
.modal.is-open .modal__box { transform: none; }
.modal__box--wide { width: min(620px, 100%); }
.modal__box--center { text-align: center; width: min(400px, 100%); }
.modal__close {
  position: absolute; top: 16px; right: 18px; font-size: 1.7rem; line-height: 1; color: var(--muted);
  width: 34px; height: 34px; border-radius: 50%;
}
.modal__close:hover { background: var(--cream-2); color: var(--brown); }
.modal h3 { margin-bottom: 4px; }
.modal .muted { margin-bottom: 18px; font-size: .9rem; }

/* ---------- Auth ---------- */
.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream-2); border-radius: 14px; padding: 5px; margin-bottom: 24px; }
.auth__tab { padding: 10px; border-radius: 10px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.auth__tab.is-active { background: var(--white); color: var(--brown); box-shadow: 0 4px 12px -6px rgba(74,44,26,.4); }
.auth__form label, .checkout__form label { display: block; margin-bottom: 14px; font-size: .84rem; font-weight: 700; color: var(--brown); }
.auth__form input, .checkout__form input[type="text"], .checkout__form input[type="tel"], .checkout__form input[type="email"], .checkout__form textarea {
  width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 13px;
  background: var(--white); font-size: .92rem; color: var(--ink); font-weight: 500;
}
.auth__form input:focus, .checkout__form input:focus, .checkout__form textarea:focus {
  outline: none; border-color: var(--caramel); box-shadow: 0 0 0 3px rgba(184,115,51,.15);
}

/* ---------- Checkout ---------- */
.checkout__summary {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  margin-bottom: 20px; display: grid; gap: 8px; max-height: 160px; overflow-y: auto;
}
.checkout__row { display: flex; justify-content: space-between; gap: 14px; font-size: .86rem; }
.checkout__row span:first-child { color: var(--brown); font-weight: 600; }
.checkout__row span:last-child { color: var(--muted); white-space: nowrap; }
.field { margin-bottom: 16px; }
.field__label { display: block; font-size: .84rem; font-weight: 700; color: var(--brown); margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg__btn { padding: 11px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--white); font-weight: 700; font-size: .88rem; color: var(--muted); }
.seg__btn.is-active { border-color: var(--brown); background: var(--brown); color: var(--cream); }
.pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay__opt span {
  display: block; text-align: center; padding: 11px 6px; border-radius: 13px; border: 1.5px solid var(--line);
  background: var(--white); font-weight: 700; font-size: .85rem; color: var(--muted); cursor: pointer;
}
.pay__opt input { display: none; }
.pay__opt input:checked + span { border-color: var(--caramel); background: #fff4e8; color: var(--caramel); }
.checkout__total {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
  background: var(--cream-2); border-radius: 14px; margin: 6px 0 16px;
}
.checkout__total span { font-weight: 700; color: var(--brown); }
.checkout__total strong { font-family: var(--font-head); font-size: 1.45rem; color: var(--brown); }

/* ---------- Success ---------- */
.success__icon { font-size: 3rem; margin-bottom: 12px; }
.success__code {
  font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--brown);
  background: var(--cream-2); border: 2px dashed var(--caramel-2); border-radius: 14px;
  padding: 12px; margin: 10px 0 14px; letter-spacing: .08em;
}
.modal__box--center .btn { margin-bottom: 10px; }

/* ---------- Orders ---------- */
.orders { display: grid; gap: 14px; }
.order {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px;
}
.order__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.order__code { font-family: var(--font-head); font-weight: 700; color: var(--brown); font-size: 1.05rem; }
.order__date { font-size: .76rem; color: var(--muted); }
.order__items { margin: 10px 0; display: grid; gap: 4px; }
.order__items li { list-style: none; font-size: .85rem; color: var(--muted); }
.order__items li b { color: var(--brown); font-weight: 600; }
.order__meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.order__total { font-weight: 800; color: var(--brown); }
.status { font-size: .72rem; font-weight: 800; padding: 5px 12px; border-radius: 999px; letter-spacing: .03em; }
.status--baru { background: #fff3d6; color: #a5761c; }
.status--proses { background: #e3f0ff; color: #2465a8; }
.status--selesai { background: #e2f7e8; color: #227a3e; }
.status--batal { background: #ffe4e0; color: #b3392c; }
.order__actions { display: flex; gap: 8px; margin-top: 12px; }
.order__actions .btn { padding: 7px 14px; font-size: .78rem; }
.admin-select {
  padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--cream);
  font-size: .8rem; font-weight: 700; color: var(--brown);
}
.admin-user { font-size: .78rem; color: var(--muted); margin-bottom: 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 80px); z-index: 120;
  background: var(--ink); color: var(--cream); padding: 13px 22px; border-radius: 999px;
  font-size: .88rem; font-weight: 600; opacity: 0; transition: .3s; box-shadow: var(--shadow);
  max-width: 90vw; text-align: center;
}
.toast.is-show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid, .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 120px; }
  .hero__visual { max-width: 460px; margin-inline: auto; width: 100%; }
  .menu__grid, .menu__grid--coffee, .steps__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav {
    position: fixed; top: 64px; right: 4%; left: 4%; background: var(--white); flex-direction: column;
    gap: 4px; padding: 14px; border-radius: 18px; box-shadow: var(--shadow); display: none; z-index: 65;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px 12px; border-radius: 10px; }
  .nav a:hover { background: var(--cream-2); }
  .burger { display: flex; }
  .user-chip__name { display: none; }
}
@media (max-width: 620px) {
  .section { padding: 60px 0; }
  .menu__grid, .menu__grid--coffee, .steps__grid, .footer__grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 22px; }
  .hero__float-card { left: -6px; }
  .menu__banner { flex-direction: column; align-items: flex-start; }
  .modal__box { padding: 26px 20px; }
  .pay { grid-template-columns: 1fr; }
}


/* ===== PWA ===== */
.install-btn[hidden] { display: none; }
@media (max-width: 520px) { .install-btn { padding: 7px 12px; font-size: .78rem; } }
body { padding-bottom: env(safe-area-inset-bottom); }
