/* The Healthy Hive member app — brand palette (logo gold / black / cream) */
:root {
  --gold: #e5b318;
  --gold-light: #f8d54a;
  --gold-dark: #c99a0f;
  --amber: #e8941a;
  --cream: #fff9eb;
  --cream-dark: #f5edd8;
  --black: #1a1a1a;
  --ink: #1a1a1a;
  --muted: #5c574c;
  --white: #ffffff;
  --panel: #ffffff;
  --line: rgba(26, 26, 26, 0.1);
  --line-gold: rgba(229, 179, 24, 0.45);
  --shadow: 0 8px 28px rgba(26, 26, 26, 0.08);
  --shadow-sm: 0 2px 10px rgba(26, 26, 26, 0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 70px;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  background-color: var(--cream);
  background-image:
    url("data:image/svg+xml,%3Csvg width='56' height='64' viewBox='0 0 56 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28 2l24 14v28L28 58 4 44V16z' fill='none' stroke='%23e5b318' stroke-opacity='0.14' stroke-width='1'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(229, 179, 24, 0.28), transparent 60%),
    linear-gradient(180deg, #fff6dc 0%, var(--cream) 38%, #fff9eb 100%);
  background-attachment: fixed;
}

body { min-height: 100dvh; }

.app-shell {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 16px calc(var(--tabbar-h) + var(--safe-bottom) + 14px);
  position: relative;
}

/* —— Top bar —— */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0 10px;
  position: sticky;
  top: 0;
  z-index: 8;
  background: linear-gradient(to bottom, rgba(255, 249, 235, 0.97), rgba(255, 249, 235, 0.88) 75%, transparent);
  backdrop-filter: blur(10px);
}

.topbar-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gold);
  border: 2px solid var(--black);
  box-shadow: var(--shadow-sm);
}

.eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 700;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--black);
}

.screen { display: none; animation: rise 0.32s ease; }
.screen.active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes float-in {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes shimmer {
  0%, 100% { box-shadow: 0 10px 30px rgba(229, 179, 24, 0.25); }
  50% { box-shadow: 0 14px 36px rgba(229, 179, 24, 0.4); }
}

/* —— Home hero (brand first) —— */
.hero {
  margin: 4px 0 16px;
  padding: 20px 16px 18px;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(165deg, #ffe56a 0%, #e5b318 45%, #c99a0f 100%);
  border: 2.5px solid var(--black);
  box-shadow: 0 12px 32px rgba(201, 154, 15, 0.35);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,0.45), transparent 38%),
    radial-gradient(circle at 85% 0%, rgba(255,255,255,0.22), transparent 32%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero-logo {
  width: min(58vw, 180px);
  height: min(58vw, 180px);
  margin: 0 auto 12px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--black);
  background: #fff9eb;
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.18);
  animation: float-in 0.55s ease, shimmer 3.2s ease-in-out infinite;
}

.hero-kicker {
  margin: 0 0 6px;
  color: var(--black);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 800;
  opacity: 0.85;
}

.hero h2 {
  margin: 0;
  font-size: clamp(1.85rem, 7vw, 2.35rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--black);
}

.hero-sub {
  margin: 10px auto 16px;
  max-width: 28ch;
  color: rgba(26, 26, 26, 0.82);
  line-height: 1.4;
  font-weight: 500;
  font-size: 0.95rem;
}

.hero-actions {
  display: grid;
  gap: 8px;
}

.points-actions, .visit-actions {
  display: grid;
  gap: 10px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.full { width: 100%; display: block; }

.btn-gold {
  background: var(--black);
  color: var(--gold);
  box-shadow: 0 4px 14px rgba(26, 26, 26, 0.2);
}

.btn-gold:hover { filter: brightness(1.05); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--black);
  border: 2px solid var(--black);
}

.hero .btn-ghost {
  background: rgba(255, 249, 235, 0.9);
}

.card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.feature-card {
  text-align: left;
  border: 2px solid var(--black);
  background: var(--white);
  color: inherit;
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.feature-card:active { transform: scale(0.98); }

.visual-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}

.visual-strip--menu {
  grid-template-columns: repeat(3, 1fr);
}

.visual-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid var(--black);
  background: var(--cream-dark);
}

.website-banner {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--black);
  background: linear-gradient(135deg, #ffe56a, #e5b318);
  border: 2px solid var(--black);
  box-shadow: var(--shadow-sm);
}

.wb-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}

.wb-url {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wb-cta {
  margin-top: 4px;
  font-size: 0.88rem;
  font-weight: 700;
}

.square-note {
  background: linear-gradient(160deg, rgba(229, 179, 24, 0.12), #fff);
}

.fc-label {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.fc-copy {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.promo {
  margin: 0 0 12px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line-gold);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

a.promo {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.promo:active {
  transform: scale(0.99);
}

.promo-alt {
  background: linear-gradient(135deg, rgba(229, 179, 24, 0.16), var(--white) 60%);
  border-color: var(--black);
}

.promo h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.promo p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  font-weight: 500;
  font-size: 0.92rem;
}

.screen-title {
  margin: 10px 0 6px;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.screen-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}

.menu-list { display: grid; gap: 10px; margin-bottom: 14px; }

.menu-item {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.menu-item--accent {
  border-color: var(--black);
  background: linear-gradient(160deg, rgba(229, 179, 24, 0.18), var(--white) 55%);
}

.menu-item h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.02em;
}

.menu-item p {
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
  font-size: 0.9rem;
}

.menu-item .price {
  margin-top: 8px;
  margin-bottom: 0;
  color: var(--black);
  font-weight: 700;
  font-size: 0.92rem;
}

.menu-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 8px;
  font-size: 0.86rem;
}

.menu-table th,
.menu-table td {
  padding: 6px 4px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.menu-table th {
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.menu-table td:not(:first-child),
.menu-table th:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

.menu-table td {
  color: var(--black);
  font-weight: 600;
}

.menu-table td:first-child {
  color: var(--muted);
  font-weight: 500;
}

.flavor-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.flavor-list li {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.86rem;
  line-height: 1.35;
}

.flavor-list strong {
  color: var(--black);
  font-weight: 700;
}

.flavor-group-label {
  margin: 12px 0 4px !important;
  color: var(--gold-dark) !important;
  font-weight: 800 !important;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.menu-details summary {
  cursor: pointer;
  color: var(--black);
  font-weight: 700;
  font-size: 0.92rem;
  list-style: none;
}

.menu-details summary::-webkit-details-marker { display: none; }
.menu-details summary::after {
  content: " ▾";
  color: var(--gold-dark);
  font-size: 0.75em;
}
.menu-details[open] summary::after { content: " ▴"; }
.menu-details p {
  margin-top: 8px;
  font-size: 0.86rem;
}

/* —— Loyalty —— */
.loyalty-card {
  padding: 22px 16px;
  border-radius: 24px;
  background: var(--white);
  border: 2px solid var(--black);
  text-align: center;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.loyalty-ring {
  width: 150px;
  height: 150px;
  margin: 0 auto 12px;
  position: relative;
}

.loyalty-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.loyalty-ring circle {
  fill: none;
  stroke-width: 9;
}

.loyalty-ring .track { stroke: rgba(26, 26, 26, 0.08); }
.loyalty-ring .progress {
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.5s ease;
}

.loyalty-score {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
}

.loyalty-score span {
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.loyalty-score small {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.loyalty-status {
  margin: 0 0 8px;
  font-weight: 700;
}

.loyalty-note, .fine-print {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
}

.fine-print { margin-top: 14px; }

.field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.field input {
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 600;
  background: var(--white);
  color: var(--black);
}

.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(229, 179, 24, 0.25);
}

/* —— Visit —— */
.visit-card {
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 2px solid var(--black);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  color: var(--black);
}

.visit-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--black);
}

.visit-card p {
  margin: 0;
  color: #3d3a32;
  font-weight: 600;
  line-height: 1.45;
}

.visit-card .meta {
  margin-top: 8px;
  color: var(--gold-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.hours {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hours li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  color: var(--muted);
}

.hours li:last-child { border-bottom: 0; }
.hours span:last-child { color: var(--black); font-weight: 700; }

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.social-row a {
  text-decoration: none;
  color: var(--black);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1.5px solid var(--line);
}

.install-box {
  margin-top: 8px;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(229, 179, 24, 0.22), var(--white));
  border: 2px solid var(--black);
}

.install-box h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
}

.install-box p {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.45;
}

.install-help ol {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.88rem;
  line-height: 1.45;
}

.install-help li {
  margin-bottom: 0.35rem;
}

.install-help .install-more {
  margin-top: 4px;
}

.install-help a {
  color: var(--black);
  font-weight: 700;
  text-decoration: underline;
}

/* —— Tab bar —— */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(440px, 100%);
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 8px 6px calc(8px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: rgba(255, 249, 235, 0.96);
  border-top: 2px solid var(--black);
  backdrop-filter: blur(12px);
  z-index: 20;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  gap: 2px;
  cursor: pointer;
  border-radius: 12px;
  padding: 6px 2px;
}

.card-box {
  min-height: 90px;
  margin: 12px 0;
  padding: 10px;
  border-radius: 14px;
  border: 2px solid var(--black);
  background: #fff;
}

.field select,
.field input[type="text"],
.field input[type="tel"],
.field input[type="number"] {
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 600;
  background: var(--white);
  color: var(--black);
  width: 100%;
}

.addon-list {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
}

.addon-heading {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.addon-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.92rem;
}

.addon-row:last-child { border-bottom: 0; }
.addon-row em { font-style: normal; color: var(--muted); font-weight: 700; }

.tax-breakdown {
  display: grid;
  gap: 6px;
  margin: 8px 0 4px;
  padding: 0 2px;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.92rem;
}

.tax-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.tax-breakdown strong {
  color: var(--black);
  font-weight: 800;
}

.order-total-box {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 12px 0 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--black);
  background: linear-gradient(135deg, rgba(229, 179, 24, 0.2), #fff);
  font-weight: 700;
}

.order-total-box strong {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.cart-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cart-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
}

.cart-list strong { display: block; font-size: 0.92rem; }
.cart-list small { color: var(--muted); font-weight: 600; }
.cart-empty { color: var(--muted); font-weight: 600; justify-content: center; }

.cart-line-right {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-weight: 800;
}

.cart-line-right button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.lookup-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
}

.lookup-result p { margin: 0 0 8px; font-weight: 600; color: var(--muted); }
.lookup-linked { color: var(--black) !important; }

.lookup-pick {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid var(--black);
  background: var(--cream);
  cursor: pointer;
  font: inherit;
}

.lookup-pick strong { font-weight: 800; }
.lookup-pick span { color: var(--muted); font-weight: 600; font-size: 0.88rem; }

.tab-icon { font-size: 1.15rem; line-height: 1; }
.tab.active {
  color: var(--black);
  background: var(--gold);
}

.screen .btn-ghost {
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
}

.screen .btn-gold {
  background: var(--black);
  color: var(--gold);
}

@media (min-width: 480px) {
  .app-shell { padding-left: 20px; padding-right: 20px; }
}
