/* =========================================================
   FIVE GOATS COFFEE SHOP — Digital Menu
   Palette derived from the source menu artwork:
   maroon #2A1414 (ink/cover), cream #F7EBCA (paper),
   warm cocoa #8B5E34 (accent, lifted from the coffee photography)
   ========================================================= */

:root {
  --maroon: #2a1414;
  --maroon-soft: #3d2020;
  --cream: #f7ebca;
  --cream-dim: #efe0b8;
  --cream-line: rgba(42, 20, 20, 0.14);
  --cocoa: #8b5e34;
  --cocoa-light: #b8834f;
  --shadow-soft: 0 20px 45px -20px rgba(42, 20, 20, 0.35);
  --shadow-card: 0 12px 30px -12px rgba(42, 20, 20, 0.22);
  --radius-lg: 28px;
  --radius-md: 18px;
  --font-display: "Anton", sans-serif;
  --font-head: "Poppins", sans-serif;
  --font-body: "Poppins", sans-serif;
  --ease: cubic-bezier(.22,.9,.32,1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--maroon);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--maroon);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-mark {
  animation: loaderPulse 1.1s ease-in-out infinite;
}
.loader-mark img { opacity: 0.95; }
@keyframes loaderPulse {
  0%, 100% { transform: scale(0.92); opacity: .7; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* ---------- Decorative floating blobs ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
  background: radial-gradient(circle at 30% 30%, rgba(139,94,52,0.16), rgba(42,20,20,0.05) 70%);
  filter: blur(2px);
  animation: drift 22s ease-in-out infinite;
}
.blob-1 { width: 420px; height: 420px; top: -120px; left: -140px; animation-duration: 26s; }
.blob-2 { width: 300px; height: 300px; top: 40%; right: -120px; animation-duration: 20s; animation-delay: -6s; }
.blob-3 { width: 260px; height: 260px; bottom: -80px; left: 30%; animation-duration: 24s; animation-delay: -12s; }
@keyframes drift {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  33% { transform: translate(30px,-25px) rotate(8deg); }
  66% { transform: translate(-20px,20px) rotate(-6deg); }
}

/* ---------- Sticky Nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(247, 235, 202, 0);
  backdrop-filter: blur(0px);
  transition: background .4s var(--ease), box-shadow .4s var(--ease), backdrop-filter .4s var(--ease);
}
.site-nav.is-scrolled {
  background: rgba(247, 235, 202, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px -14px rgba(42,20,20,0.3);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: 1.05rem;
  color: var(--maroon);
  flex-shrink: 0;
}
.nav-brand img { border-radius: 50%; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 20;
}
.nav-toggle span {
  width: 24px; height: 2.5px;
  background: var(--maroon);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-weight: 600;
  font-size: 0.92rem;
}
.nav-links a {
  position: relative;
  padding: 6px 2px;
  opacity: 0.85;
  transition: opacity .25s var(--ease), color .25s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--cocoa);
  transition: right .3s var(--ease);
  border-radius: 2px;
}
.nav-links a:hover, .nav-links a:focus-visible { opacity: 1; }
.nav-links a:hover::after, .nav-links a:focus-visible::after { right: 0; }
.nav-links a.active { opacity: 1; color: var(--cocoa); }
.nav-links a.active::after { right: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--maroon);
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: -10%;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 20%, rgba(139,94,52,0.35), transparent 55%),
    radial-gradient(circle at 82% 78%, rgba(184,131,79,0.25), transparent 50%);
  will-change: transform;
}
.hero-content {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-logo {
  width: min(190px, 42vw);
  height: auto;
  margin-bottom: 8px;
  animation: heroFadeUp 1s var(--ease) both;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 14vw, 7.5rem);
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 0.95;
  color: var(--cream);
  animation: heroFadeUp 1s var(--ease) .12s both;
}
.hero-tagline {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: clamp(0.95rem, 2.4vw, 1.3rem);
  margin: 10px 0 30px;
  color: var(--cream-dim);
  animation: heroFadeUp 1s var(--ease) .24s both;
}
.hero-tagline .dots { color: var(--cocoa-light); }
.hero-cta {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--maroon);
  background: var(--cream);
  padding: 15px 34px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease);
  animation: heroFadeUp 1s var(--ease) .36s both;
}
.hero-cta:hover, .hero-cta:focus-visible {
  transform: translateY(-3px) scale(1.03);
  background: var(--cocoa-light);
  color: var(--cream);
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(247,235,202,0.55);
  border-radius: 20px;
}
.hero-scroll-cue span {
  display: block;
  width: 4px; height: 8px;
  background: var(--cream-dim);
  border-radius: 3px;
  margin: 7px auto 0;
  animation: scrollCue 1.8s ease-in-out infinite;
}
@keyframes scrollCue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Main sections ---------- */
main { position: relative; z-index: 1; }

.menu-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px 20px 40px;
}
.menu-page.alt-bg { background: var(--cream-dim); max-width: none; }
.menu-page.alt-bg > * { max-width: 1180px; margin-left: auto; margin-right: auto; }

.page-eyebrow {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-align: center;
  margin: 0 0 56px;
  position: relative;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.page-eyebrow.in-view { opacity: 1; transform: translateY(0); }
.page-eyebrow::after {
  content: "";
  display: block;
  width: 64px; height: 3px;
  background: var(--cocoa);
  margin: 14px auto 0;
  border-radius: 3px;
}

/* ---------- Category card ---------- */
.category {
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(0,1.3fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: 44px 0;
  border-bottom: 1px solid var(--cream-line);
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.menu-page.alt-bg .category { border-bottom-color: rgba(42,20,20,0.1); }
.category.in-view { opacity: 1; transform: translateY(0); }
.category:last-child { border-bottom: none; padding-bottom: 8px; }
.category.reverse { grid-template-columns: minmax(0,1.3fr) minmax(0,1.05fr); }
.category.reverse .category-media { order: 2; }
.category.reverse .category-content { order: 1; }

.category-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-card);
  background: var(--cream-dim);
}
.category-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.category-media:hover img { transform: scale(1.08) rotate(0.3deg); }
.category-media::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(42,20,20,0.06);
  pointer-events: none;
}

.cat-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin: 0 0 18px;
  position: relative;
  padding-bottom: 12px;
}
.cat-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 46px; height: 3px;
  background: var(--maroon);
  border-radius: 3px;
}

.item-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dotted var(--cream-line);
  font-size: 0.98rem;
}
.item-list li:last-child { border-bottom: none; }
.item-name {
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.item-list.has-notes .item-name small {
  font-weight: 400;
  font-size: 0.78rem;
  opacity: 0.62;
  line-height: 1.35;
}
.item-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--maroon);
  background: rgba(139,94,52,0.12);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.item-list li:hover .item-price {
  background: var(--cocoa);
  color: var(--cream);
  transform: translateY(-1px);
}

/* Chicha pricing table */
.chicha-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.chicha-table th, .chicha-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px dotted var(--cream-line);
}
.chicha-table thead th {
  font-family: var(--font-head);
  font-weight: 700;
  border-bottom: 2px solid var(--maroon);
}
.chicha-table td { font-weight: 700; font-variant-numeric: tabular-nums; }
.chicha-table tbody th { font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--maroon);
  color: var(--cream);
  text-align: center;
  padding: 64px 20px 40px;
  position: relative;
  z-index: 1;
}
.footer-logo {
  margin: 0 auto 18px;
  border-radius: 50%;
}
.footer-tagline {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 26px;
  color: var(--cream-dim);
}
.footer-tagline .dots { color: var(--cocoa-light); }
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-bottom: 30px;
  font-size: 0.9rem;
  font-weight: 500;
}
.footer-socials a {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.85;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.footer-socials a:hover, .footer-socials a:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
  color: var(--cocoa-light);
}
.footer-copy {
  font-size: 0.78rem;
  opacity: 0.55;
  margin: 0;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--cream);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease), background .3s var(--ease);
  z-index: 400;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-to-top:hover, .back-to-top:focus-visible { background: var(--cocoa); }

/* ---------- Focus states for accessibility ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cocoa);
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .category, .category.reverse {
    grid-template-columns: 1fr;
  }
  .category .category-media, .category.reverse .category-media { order: 0; }
  .category .category-content, .category.reverse .category-content { order: 1; }
  .category-media { aspect-ratio: 16/11; max-width: 520px; margin: 0 auto; width: 100%; }
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100svh;
    width: min(78vw, 320px);
    background: var(--cream);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 22px;
    padding: 40px 36px;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    box-shadow: -20px 0 40px -20px rgba(42,20,20,0.3);
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; }
  .nav-brand span { display: none; }
}

@media (max-width: 480px) {
  .menu-page { padding: 60px 16px 24px; }
  .category { padding: 32px 0; gap: 20px; }
  .item-list li { font-size: 0.92rem; }
}
