/* =========================================================
   Brew & Bean – Coffee Loyalty App
   style.css
   ========================================================= */

/* ── Reset & Variables ──────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --espresso:    #1C0A00;
  --dark-brown:  #2C1810;
  --mid-brown:   #5C3317;
  --light-brown: #8B5A2B;
  --caramel:     #C8860A;
  --gold:        #D4A017;
  --cream:       #F5E6D3;
  --off-white:   #FFF8F0;
  --success:     #4CAF50;
}
html { scroll-behavior: smooth; }
body {
  font-family: Georgia, serif;
  background: var(--off-white);
  color: var(--dark-brown);
  line-height: 1.6;
}

/* ── Navigation ─────────────────────────────────────────── */
nav {
  background: var(--espresso);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.nav-logo { color: var(--caramel); font-size: 1.55rem; font-weight: bold; letter-spacing: 1px; }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a { color: var(--cream); text-decoration: none; font-size: .95rem; transition: color .25s; }
.nav-links a:hover { color: var(--caramel); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--cream); border-radius: 2px; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--espresso) 0%, var(--mid-brown) 55%, var(--dark-brown) 100%);
  color: var(--cream);
  padding: 7rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(200,134,10,.12) 0%, transparent 60%);
  animation: glow 5s ease-in-out infinite;
}
@keyframes glow {
  0%,100% { transform: scale(1) translate(0,0); }
  50%      { transform: scale(1.1) translate(3%,3%); }
}
.hero-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: var(--caramel);
  color: var(--espresso);
  padding: .25rem 1rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.hero h1 { font-size: 3.4rem; margin-bottom: 1rem; text-shadow: 2px 2px 6px rgba(0,0,0,.3); }
.hero p  { font-size: 1.15rem; opacity: .88; max-width: 480px; margin: 0 auto 2.2rem; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary {
  background: var(--caramel);
  color: var(--espresso);
  padding: .85rem 2.4rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all .25s;
}
.btn-primary:hover { background: var(--gold); transform: translateY(-2px); box-shadow: 0 5px 18px rgba(200,134,10,.4); }

/* ── Shared Section Styles ──────────────────────────────── */
section { padding: 5rem 2rem; }
.section-title { text-align: center; font-size: 2.1rem; color: var(--dark-brown); margin-bottom: .4rem; }
.divider { width: 55px; height: 3px; background: var(--caramel); margin: .4rem auto 1rem; border-radius: 2px; }
.section-sub { text-align: center; color: var(--light-brown); font-size: .95rem; margin-bottom: 2.8rem; }

/* ── About ──────────────────────────────────────────────── */
#about { background: var(--cream); }
.about-body { max-width: 680px; margin: 0 auto; text-align: center; font-size: 1.05rem; line-height: 1.85; }
.stats { display: flex; justify-content: center; gap: 3rem; margin-top: 2.8rem; flex-wrap: wrap; }
.stat-num   { font-size: 2.4rem; font-weight: bold; color: var(--caramel); display: block; }
.stat-label { font-size: .82rem; color: var(--light-brown); text-transform: uppercase; letter-spacing: 1px; }

/* ── Menu ───────────────────────────────────────────────── */
#menu { background: var(--off-white); }
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.4rem;
  max-width: 960px;
  margin: 0 auto;
}
.menu-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(200,134,10,.1);
  box-shadow: 0 3px 14px rgba(44,24,16,.07);
  transition: transform .3s, box-shadow .3s;
}
.menu-card:hover { transform: translateY(-5px); box-shadow: 0 8px 24px rgba(44,24,16,.14); }
.menu-icon  { font-size: 2.4rem; margin-bottom: .7rem; }
.menu-name  { font-size: 1.05rem; font-weight: bold; color: var(--dark-brown); margin-bottom: .25rem; }
.menu-desc  { font-size: .82rem; color: var(--light-brown); margin-bottom: .75rem; }
.menu-price { font-size: 1.15rem; font-weight: bold; color: var(--caramel); }

/* ── Loyalty Card ───────────────────────────────────────── */
#loyalty { background: var(--dark-brown); color: var(--cream); }
#loyalty .section-title { color: var(--cream); }
#loyalty .section-sub   { color: var(--caramel); }
.loyalty-wrap { max-width: 580px; margin: 0 auto; }
.steps { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2.8rem; flex-wrap: wrap; }
.step { text-align: center; flex: 1; min-width: 110px; max-width: 150px; }
.step-icon {
  width: 58px; height: 58px;
  background: rgba(200,134,10,.15);
  border: 2px solid var(--caramel);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .7rem;
  font-size: 1.4rem;
}
.step-text { font-size: .82rem; opacity: .88; }

.lookup-box {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(200,134,10,.2);
  border-radius: 14px;
  padding: 1.8rem;
  margin-bottom: 2rem;
}
.lookup-box h3 { color: var(--caramel); font-size: 1rem; margin-bottom: 1rem; }
.input-row { display: flex; gap: .8rem; }
.input-row input {
  flex: 1;
  padding: .85rem 1.2rem;
  border: 2px solid rgba(200,134,10,.3);
  border-radius: 30px;
  background: rgba(255,255,255,.09);
  color: var(--cream);
  font-size: .98rem;
  outline: none;
  transition: border-color .25s;
}
.input-row input::placeholder { color: rgba(245,230,211,.4); }
.input-row input:focus { border-color: var(--caramel); }
.btn-find {
  padding: .85rem 1.7rem;
  background: var(--caramel);
  color: var(--espresso);
  border: none;
  border-radius: 30px;
  font-size: .98rem;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s;
}
.btn-find:hover { background: var(--gold); }

.loyalty-card {
  background: linear-gradient(135deg, #140600 0%, #3D1A00 100%);
  border: 2px solid var(--caramel);
  border-radius: 20px;
  padding: 1.8rem;
  display: none;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.loyalty-card.show { display: block; animation: slideUp .4s ease; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.free-banner {
  background: linear-gradient(135deg, var(--gold), var(--caramel));
  color: var(--espresso);
  text-align: center;
  padding: .9rem;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  display: none;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.02); } }

.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.4rem; }
.cust-name  { font-size: 1.15rem; font-weight: bold; color: var(--cream); }
.cust-phone { font-size: .82rem; color: var(--caramel); margin-top: .2rem; }
.card-meta  { text-align: right; }
.meta-total { font-size: .78rem; color: rgba(245,230,211,.55); }
.meta-free  { font-size: .82rem; color: var(--caramel); }

.stamp-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; margin: 1.3rem 0; }
.stamp {
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  border: 2px dashed rgba(200,134,10,.35);
  background: rgba(255,255,255,.03);
  position: relative;
  transition: all .35s;
}
.stamp.filled {
  background: rgba(200,134,10,.18);
  border: 2px solid var(--caramel);
  animation: pop .35s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes pop { 0% { transform: scale(.8); } 65% { transform: scale(1.15); } 100% { transform: scale(1); } }
.stamp-num   { position: absolute; bottom: 4px; right: 6px; font-size: .58rem; font-family: sans-serif; color: rgba(200,134,10,.45); }
.stamp-empty { opacity: .2; }

.progress-wrap { text-align: center; margin: .6rem 0 1.4rem; }
.progress-bar-bg { background: rgba(255,255,255,.1); border-radius: 8px; height: 7px; margin: .45rem 0; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--caramel), var(--gold)); border-radius: 8px; transition: width .5s ease; }
.progress-label { font-size: .88rem; color: var(--caramel); }

.card-btns { display: flex; gap: .9rem; }
.btn-stamp {
  flex: 1; padding: .85rem;
  background: var(--caramel); color: var(--espresso);
  border: none; border-radius: 30px; font-size: .98rem; font-weight: bold;
  cursor: pointer; transition: all .25s;
}
.btn-stamp:hover { background: var(--gold); transform: translateY(-2px); }
.btn-redeem {
  flex: 1; padding: .85rem;
  background: var(--success); color: #fff;
  border: none; border-radius: 30px; font-size: .98rem; font-weight: bold;
  cursor: pointer; transition: all .25s; display: none;
}
.btn-redeem:hover { background: #43a047; transform: translateY(-2px); }

/* ── Team ───────────────────────────────────────────────── */
#team { background: var(--cream); }
.team-grid { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; max-width: 760px; margin: 0 auto; }
.team-card {
  background: #fff;
  border-radius: 18px;
  padding: 2rem 1.8rem;
  text-align: center;
  max-width: 280px; width: 100%;
  box-shadow: 0 3px 18px rgba(44,24,16,.09);
  border: 1px solid rgba(200,134,10,.12);
  transition: transform .3s, box-shadow .3s;
}
.team-card:hover { transform: translateY(-5px); box-shadow: 0 10px 28px rgba(44,24,16,.15); }
.team-photo {
  width: 120px; height: 120px;
  border-radius: 50%; overflow: hidden;
  margin: 0 auto 1.2rem;
  border: 3px solid var(--caramel);
  box-shadow: 0 4px 14px rgba(200,134,10,.25);
}
.team-photo svg { width: 100%; height: 100%; display: block; }
.team-name { font-size: 1.15rem; font-weight: bold; color: var(--dark-brown); margin-bottom: .25rem; }
.team-role {
  display: inline-block;
  background: var(--caramel); color: var(--espresso);
  font-size: .72rem; font-weight: bold; letter-spacing: 1px; text-transform: uppercase;
  padding: .2rem .8rem; border-radius: 20px; margin-bottom: .9rem;
}
.team-bio { font-size: .88rem; color: var(--light-brown); line-height: 1.75; }

/* ── Pre-Order ──────────────────────────────────────────── */
#preorder { background: var(--off-white); }
.preorder-form { max-width: 520px; margin: 0 auto; }
.po-label {
  font-size: .82rem; color: var(--light-brown);
  font-weight: bold; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: .5rem; display: block;
}
.po-select, .po-input {
  width: 100%; padding: .85rem 1.2rem;
  border: 2px solid rgba(200,134,10,.25); border-radius: 12px;
  font-family: Georgia, serif; font-size: .98rem; color: var(--dark-brown);
  background: #fff; outline: none;
  transition: border-color .25s; margin-bottom: 1.4rem; appearance: none;
}
.po-select:focus, .po-input:focus { border-color: var(--caramel); }

.drink-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .8rem; margin-bottom: 1rem; }
.drink-card {
  background: #fff;
  border: 2px solid rgba(200,134,10,.2);
  border-radius: 14px; padding: .9rem .5rem;
  text-align: center; transition: border-color .25s, background .25s;
}
.drink-card.drink-active { border-color: var(--caramel); background: rgba(200,134,10,.08); }
.drink-emoji { font-size: 1.55rem; margin-bottom: .3rem; }
.drink-label {
  font-size: .76rem; font-weight: bold; color: var(--dark-brown);
  margin-bottom: .6rem; line-height: 1.3; min-height: 2em;
  display: flex; align-items: center; justify-content: center;
}
.size-rows  { display: flex; flex-direction: column; gap: .35rem; }
.size-row   { display: flex; align-items: center; justify-content: center; gap: .3rem; }
.size-tag   { font-size: .65rem; font-weight: bold; color: var(--light-brown); text-transform: uppercase; width: 22px; text-align: left; }
.sz-btn {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--caramel); background: none;
  color: var(--caramel); font-size: .95rem; line-height: 1;
  cursor: pointer; transition: all .2s; padding: 0;
}
.sz-btn:hover { background: var(--caramel); color: var(--espresso); }
.sz-count { font-size: .85rem; font-weight: bold; color: var(--dark-brown); min-width: 16px; text-align: center; }

.po-summary {
  background: rgba(200,134,10,.08);
  border: 1px solid rgba(200,134,10,.3);
  border-radius: 12px; padding: .9rem 1.1rem;
  margin-bottom: 1.4rem; display: none;
}
.po-summary-lbl {
  font-size: .78rem; font-weight: bold; color: var(--light-brown);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: .55rem;
}
.order-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.order-tag {
  background: var(--caramel); color: var(--espresso);
  font-size: .78rem; font-weight: bold;
  padding: .2rem .7rem; border-radius: 20px;
}

.loc-cards { display: flex; gap: 1rem; margin-bottom: 1.4rem; }
.loc-card {
  flex: 1;
  border: 2px solid rgba(200,134,10,.25); border-radius: 14px;
  padding: 1.1rem .9rem; cursor: pointer;
  transition: all .25s; text-align: center;
}
.loc-card:hover    { border-color: var(--caramel); }
.loc-card.selected { border-color: var(--caramel); background: rgba(200,134,10,.09); }
.loc-name { font-weight: bold; font-size: .95rem; color: var(--dark-brown); margin-bottom: .25rem; }
.loc-addr { font-size: .78rem; color: var(--light-brown); }
.po-note  { font-size: .78rem; color: var(--light-brown); text-align: center; margin-top: .9rem; line-height: 1.6; }

/* ── Contact ────────────────────────────────────────────── */
#contact { background: var(--off-white); }
.contact-body { text-align: center; max-width: 480px; margin: 0 auto; font-size: 1rem; line-height: 2; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--espresso);
  color: rgba(245,230,211,.65);
  text-align: center; padding: 1.6rem; font-size: .88rem;
}

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed; top: 74px; left: 50%;
  transform: translateX(-50%) translateY(-14px);
  background: var(--success); color: #fff;
  padding: .85rem 2rem; border-radius: 30px;
  font-weight: bold; opacity: 0;
  transition: all .3s; z-index: 3000;
  white-space: nowrap; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Admin Cog ──────────────────────────────────────────── */
.admin-cog {
  position: fixed; bottom: 18px; right: 18px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--espresso); border: 1px solid rgba(200,134,10,.3);
  color: rgba(200,134,10,.5); font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .25s; z-index: 500;
}
.admin-cog:hover { border-color: var(--caramel); color: var(--caramel); }

/* ── Overlay / Modal ────────────────────────────────────── */
.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.72); z-index: 1000;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.overlay.open { display: flex; }
.modal {
  background: var(--espresso);
  border: 2px solid var(--caramel);
  border-radius: 20px; padding: 2.4rem;
  max-width: 370px; width: 92%;
  text-align: center; animation: modalIn .28s ease;
}
@keyframes modalIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h2 { color: var(--caramel); font-size: 1.35rem; margin-bottom: .45rem; }
.modal p  { color: var(--cream); font-size: .88rem; opacity: .8; margin-bottom: 1.4rem; }

.pin-row { display: flex; gap: .75rem; justify-content: center; margin-bottom: 1.2rem; }
.pin-digit {
  width: 54px; height: 62px;
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(200,134,10,.3);
  border-radius: 12px; font-size: 1.7rem;
  text-align: center; color: var(--cream); outline: none;
  transition: border-color .25s;
}
.pin-digit:focus { border-color: var(--caramel); background: rgba(200,134,10,.12); }
.pin-err { color: #ff6b6b; font-size: .82rem; margin-bottom: .9rem; display: none; }

.modal-input {
  width: 100%; padding: .85rem 1.1rem;
  border: 2px solid rgba(200,134,10,.3); border-radius: 12px;
  background: rgba(255,255,255,.1); color: var(--cream);
  font-size: .98rem; outline: none; margin-bottom: 1.4rem;
}
.modal-input:focus { border-color: var(--caramel); }
.modal-input::placeholder { color: rgba(245,230,211,.38); }

.modal-btns { display: flex; gap: .9rem; }
.btn-cancel {
  flex: 1; padding: .78rem;
  background: transparent; color: var(--cream);
  border: 2px solid rgba(245,230,211,.28); border-radius: 30px;
  font-size: .93rem; cursor: pointer; transition: border-color .25s;
}
.btn-cancel:hover { border-color: var(--cream); }
.btn-ok {
  flex: 1; padding: .78rem;
  background: var(--caramel); color: var(--espresso);
  border: none; border-radius: 30px;
  font-size: .93rem; font-weight: bold; cursor: pointer; transition: background .25s;
}
.btn-ok:hover { background: var(--gold); }

/* ── Admin Modal ────────────────────────────────────────── */
.modal-admin { max-width: 560px; max-height: 82vh; overflow-y: auto; text-align: left; }
.admin-lbl   { color: var(--caramel); font-size: .88rem; margin-bottom: .55rem; }
.admin-pin-row { display: flex; gap: .7rem; margin-bottom: .4rem; }
.admin-pin-row input {
  flex: 1; padding: .65rem .9rem;
  border: 1px solid rgba(200,134,10,.3); border-radius: 8px;
  background: rgba(255,255,255,.08); color: var(--cream);
  font-size: .88rem; outline: none;
}
.admin-pin-row input:focus { border-color: var(--caramel); }
.btn-save-pin {
  padding: .65rem 1rem; background: var(--caramel); color: var(--espresso);
  border: none; border-radius: 8px; font-size: .88rem; font-weight: bold; cursor: pointer;
}
.pin-msg { font-size: .78rem; min-height: 1rem; margin-bottom: 1.2rem; }

table { width: 100%; border-collapse: collapse; margin-top: .5rem; font-size: .83rem; color: var(--cream); }
th { background: rgba(200,134,10,.18); padding: .45rem .6rem; text-align: left; color: var(--caramel); border-bottom: 1px solid rgba(200,134,10,.3); }
td { padding: .45rem .6rem; border-bottom: 1px solid rgba(255,255,255,.05); }
.del-btn { background: none; border: none; color: #ff6b6b; cursor: pointer; font-size: .9rem; }

/* ── Confetti canvas ────────────────────────────────────── */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 999; display: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero h1 { font-size: 2.1rem; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--espresso); padding: 1rem 2rem; gap: 1rem;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .input-row, .card-btns { flex-direction: column; }
}
