/* Berry's shared visual system: brand colors stay authoritative. */
:root {
  --brand-mauve: #b997a3;
  --brand-mauve-deep: #a37f8c;
  --brand-slate: #456574;
  --brand-slate-deep: #314d5a;
  --brand-plum: #6e3f59;
  --brand-cream: #f5f0ec;
  --brand-mushroom: #b7aca4;
  --surface-raised: #fffdfb;
  --surface-tinted: #eee5e2;
  --surface-plum-soft: #f1e7eb;
  --text-strong: #314d5a;
  --text-muted: #66757c;
  --line-soft: rgba(69, 101, 116, .16);
  --shadow-sm: 0 4px 14px rgba(49, 77, 90, .08);
  --shadow-md: 0 12px 34px rgba(49, 77, 90, .13);
  --shadow-lg: 0 24px 60px rgba(49, 77, 90, .18);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --space-1: .35rem;
  --space-2: .65rem;
  --space-3: 1rem;
  --space-4: 1.4rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --content-wide: 1080px;
  --content-reading: 760px;
  --primary: var(--brand-slate);
  --accent: var(--brand-plum);
  --surface: var(--brand-cream);
  --surface-soft: var(--surface-tinted);
  --secondary-surface: var(--surface-tinted);
  --border-color: var(--line-soft);
  --box-shadow: var(--shadow-md);
}

html { scroll-behavior: smooth; }
body {
  color: var(--text-strong);
  background: var(--brand-mauve);
  text-rendering: optimizeLegibility;
}
.cocoon {
  background:
    radial-gradient(circle at 8% 2%, rgba(255,255,255,.2), transparent 24rem),
    linear-gradient(180deg, #c3a4af 0, var(--brand-mauve) 22rem, #b38f9c 100%);
}
p, li, dd { color: inherit; }
h1, h2, h3, h4, h5 { letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.18; }
h3 { font-size: clamp(1.08rem, 2vw, 1.3rem); line-height: 1.3; }
.eyebrow, .event-kicker, .more-group-title {
  letter-spacing: .14em;
  font-size: .74rem;
  font-weight: 800;
}

/* Controls */
button, .form-button, .button-link, .primary-action, .more-sign-in, .deal-link {
  border-radius: 999px;
  min-height: 48px;
  padding: .72rem 1.3rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  background: var(--brand-slate);
  color: var(--brand-cream);
  box-shadow: 0 7px 18px rgba(49,77,90,.2);
}
button:hover:not(:disabled), .form-button:hover, .button-link:hover, .primary-action:hover, .more-sign-in:hover {
  background: var(--brand-slate-deep);
  transform: translateY(-2px);
  box-shadow: 0 11px 24px rgba(49,77,90,.24);
}
button:active:not(:disabled), .form-button:active, .button-link:active { transform: translateY(0); }
button:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.account-secondary, .guest-button, .sign-out-row button {
  background: rgba(255,253,251,.75) !important;
  color: var(--brand-slate-deep) !important;
  border: 1px solid rgba(69,101,116,.28) !important;
  box-shadow: none !important;
}
input, select, textarea, .panel-input, .dropdown {
  min-height: 48px;
  padding: .72rem .9rem;
  border: 1px solid rgba(69,101,116,.26);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
textarea { min-height: 8rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: rgba(69,101,116,.46); }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-slate);
  box-shadow: 0 0 0 4px rgba(69,101,116,.16);
}
label, legend, .sq-label { color: var(--brand-slate-deep); }

/* Shared surfaces */
.account-card, .feature-card, .event-card, .bar-info-card, .staff-record,
.panel, .product, .category-card, .more-row, .analytics-card, .analytics-panel,
.current-orders-panel, .status-card, .brews-offers {
  border: 1px solid rgba(69,101,116,.14);
  border-radius: var(--radius-md);
  background: rgba(255,253,251,.94);
  box-shadow: var(--shadow-sm);
}
.account-card:hover, .feature-card:hover, a.category-card:hover, a.more-row:hover,
a.home-destination-card:hover, a.current-orders-panel:hover {
  border-color: rgba(69,101,116,.27);
  box-shadow: var(--shadow-md);
}
.safe-note {
  border: 0 !important;
  border-left: 4px solid var(--brand-plum) !important;
  border-radius: var(--radius-sm);
  background: rgba(255,253,251,.68);
  color: var(--brand-slate-deep) !important;
  box-shadow: var(--shadow-sm);
}
.status-pill {
  padding: .3rem .75rem;
  border: 1px solid rgba(110,63,89,.18);
  background: var(--surface-plum-soft);
}

/* Navigation and brand */
.app-header { padding: 22px 0 20px; }
.brand-logo-surface { width: clamp(148px, 17vw, 188px); }
.brand-subtitle {
  padding: .35rem .8rem;
  border: 1px solid rgba(69,101,116,.12);
  background: rgba(255,253,251,.86);
  box-shadow: var(--shadow-sm);
}
.main-sections { gap: .6rem; }
.main-sections a {
  min-height: 42px;
  padding: .48rem 1rem;
  display: inline-flex;
  align-items: center;
  border-color: rgba(69,101,116,.16);
  background: rgba(255,253,251,.84);
  box-shadow: 0 2px 8px rgba(49,77,90,.06);
}
.main-sections a[aria-current='page'] {
  background: var(--brand-slate-deep);
  border-color: var(--brand-slate-deep);
  box-shadow: 0 7px 18px rgba(49,77,90,.22);
}
.organization-footer {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 1px solid rgba(69,101,116,.14);
  border-radius: var(--radius-lg);
  background: rgba(255,253,251,.58);
  backdrop-filter: blur(12px);
}

/* Page rhythm */
.home-page, .cafe-page, .account-shell, .form-page, .event-shell, .bar-info-page, .more-page {
  animation: berrys-page-in .32s ease-out both;
}
.account-shell, .form-page, .event-shell, .more-page { padding-top: var(--space-3); }
.account-card, .feature-card, .event-card, .bar-info-card, .staff-record, .analytics-panel { padding: var(--space-4); }
.home-section { margin-block: var(--space-6); }
.home-section > h2, .category-landing-title, .form-page > h1, .account-shell > h1,
.event-shell > h1, .more-page > h1 { margin-bottom: var(--space-3); }
.feature-grid, .home-perks-grid, .analytics-grid { gap: var(--space-4); }

/* Home and image-led cards */
.hero-card {
  border-radius: var(--radius-lg);
  padding: clamp(1.35rem, 4vw, 2.4rem);
  gap: clamp(1.4rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 8% 10%, rgba(255,255,255,.12), transparent 15rem),
    linear-gradient(135deg, var(--brand-slate-deep), var(--brand-slate) 48%, var(--brand-plum));
  box-shadow: var(--shadow-lg);
}
.hero-image, .hero-brand-art { height: clamp(230px, 32vw, 360px); border-radius: calc(var(--radius-lg) - 8px); }
.hero-card .button-link { background: var(--brand-cream); color: var(--brand-slate-deep); }
.deal-card { border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); }
.home-destination-grid { gap: var(--space-4); }
.home-destination-card { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.home-destination-card img { transition: transform .45s ease; }
.home-destination-card:hover img { transform: scale(1.025); }
.home-destination-overlay { padding: 4.5rem 1.35rem 1.25rem; }
.home-destination-overlay strong { font-size: 1.18rem; }

/* Checkout and account flows */
.page-title { height: auto; margin: .25rem auto var(--space-5); font-size: clamp(1.7rem,4vw,2.4rem); }
.checkout-step, .checkout-grid { gap: var(--space-4); }
.panel { padding: var(--space-4); }
.panel .panel-title { margin-bottom: var(--space-3); }
.line-item { padding-block: .8rem; }
.account-nav {
  gap: .65rem;
  margin-bottom: var(--space-3);
  padding: .8rem;
  border: 1px solid rgba(69,101,116,.13);
  border-radius: 999px;
  background: rgba(255,253,251,.6);
  box-shadow: var(--shadow-sm);
}
.account-nav a { border: 0; background: transparent; }
.account-nav a.active { box-shadow: var(--shadow-sm); }

/* More, forms, events, and bar */
.more-list { gap: .8rem; }
.more-row { min-height: 82px; padding: .8rem 1rem; }
.more-icon { border-radius: 50%; background: var(--surface-tinted); }
.form-page form { padding: clamp(1rem, 4vw, 2rem); border-radius: var(--radius-lg); background: rgba(255,253,251,.88); box-shadow: var(--shadow-md); }
.form-page fieldset { padding: 1rem; border: 1px solid rgba(69,101,116,.14); border-radius: var(--radius-md); }
.event-hero { padding: clamp(1.25rem, 4vw, 2rem); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.event-hero-image { border-radius: calc(var(--radius-lg) - 8px); }
.bar-info-hero { padding-block: var(--space-5); }
.specials-grid article, .bar-option, .in-house-choice { border-radius: var(--radius-sm); }

/* Staff surfaces use the same system at a denser scale. */
.staff-surface .cocoon {
  padding-top: 1.2rem;
  background: linear-gradient(180deg, #c4a8b2, var(--brand-mauve));
}
.staff-surface .account-shell, .staff-surface .form-page, .staff-surface .event-shell { max-width: 1080px; }
.staff-surface .account-card, .staff-surface .staff-record, .staff-surface .analytics-panel { padding: 1.15rem 1.25rem; }
.staff-surface table { font-variant-numeric: tabular-nums; }
.staff-surface .analytics-table-scroll { border-color: rgba(69,101,116,.16); border-radius: var(--radius-sm); background: var(--surface-raised); }
.staff-surface .analytics-table th { background: var(--surface-tinted); color: var(--brand-slate-deep); }
.staff-surface .analytics-table td { background: rgba(255,253,251,.88); }
.staff-surface .staff-form { padding: 1rem 0; }
.staff-surface .ticket-heading, .staff-surface .cash-shift-grid { gap: 1rem; }
.staff-surface .queue-section-title {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(255,253,251,.62);
}

@keyframes berrys-page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 700px) {
  :root { --space-5: 1.6rem; --space-6: 2.25rem; --radius-lg: 24px; }
  .cocoon { padding-inline: clamp(12px, 4vw, 18px); }
  .app-header { padding-top: 12px; }
  .brand-logo-surface { width: 156px; }
  .account-card, .feature-card, .event-card, .bar-info-card, .staff-record, .analytics-panel, .panel { padding: 1rem; }
  .hero-card { padding: 1.15rem; }
  .hero-image, .hero-brand-art { height: 210px; }
  .deal-card { padding: 1.1rem; }
  .home-destination-card { min-height: 210px; }
  .home-destination-overlay { padding: 3.5rem 1rem 1rem; }
  .form-page form { padding: 1rem; }
  .form-page fieldset { padding: .85rem; }
  .account-nav { border-radius: var(--radius-md); }
  .mobile-bottom-nav {
    min-height: 72px;
    padding: 8px 9px max(8px, env(safe-area-inset-bottom));
    border-color: rgba(69,101,116,.14);
    background: rgba(255,253,251,.92);
    box-shadow: 0 -10px 34px rgba(49,77,90,.14);
  }
  .mobile-bottom-nav a { border-radius: 16px; }
  .mobile-bottom-nav a[aria-current='page'] { background: var(--brand-slate-deep); }
  .organization-footer { padding: 1.3rem 1rem; border-radius: var(--radius-md); }
}
