/* ============================================
   HYPER COFFEE — Design System
   Palette: roast #2B1810, cream #F7EFE3, terracotta #C4622D,
            sage #8A9A7E, gold #D4A537
   Type: Fraunces (display) / Inter (body+ui) / JetBrains Mono (data)
   ============================================ */

:root {
  --roast: #2B1810;
  --roast-soft: #4A2E20;
  --cream: #F7EFE3;
  --cream-deep: #EFE2CC;
  --terracotta: #C4622D;
  --terracotta-deep: #9E4A1F;
  --sage: #8A9A7E;
  --gold: #D4A537;
  --ink: #1C1410;
  --line: rgba(43, 24, 16, 0.12);

  --serif: 'Fraunces', serif;
  --sans: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base reset ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Typography ---------- */
.h-display {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.04;
}

.h-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
}

.body-lg {
  font-size: 1.15rem;
  line-height: 1.7;
  font-weight: 400;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .wrap {
    padding: 0 2.5rem;
  }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(247, 239, 227, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--roast);
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}

.brand .brand-sub {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-top: -2px;
  line-height: 1;
}

/* Nav links */
.nav-links {
  display: none;
  gap: 2.25rem;
  font-size: 0.92rem;
  font-weight: 500;
  align-items: center;
}

@media (min-width: 880px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  position: relative;
  padding: 0.3rem 0;
  color: var(--roast-soft);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--terracotta);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--roast);
}

/* Nav cart button */
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--roast);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.25s;
}

.nav-cart:hover {
  background: var(--terracotta-deep);
}

.cart-badge {
  background: var(--gold);
  color: var(--roast);
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  padding: 0 4px;
}

/* Hamburger menu button */
.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--roast);
  display: block;
  transition: transform 0.3s, opacity 0.3s;
}

@media (min-width: 880px) {
  .menu-btn {
    display: none;
  }
}

/* Mobile panel */
.mobile-panel {
  position: fixed;
  inset: 76px 0 0 0;
  background: var(--cream);
  z-index: 55;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.mobile-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-panel a {
  font-family: var(--serif);
  font-size: 1.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--roast);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s;
  font-family: var(--sans);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--terracotta);
  color: var(--cream);
  box-shadow: 0 6px 20px -6px rgba(196, 98, 45, 0.55);
}

.btn-primary:hover {
  background: var(--terracotta-deep);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--roast);
  color: var(--roast);
}

.btn-outline:hover {
  background: var(--roast);
  color: var(--cream);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(247, 239, 227, 0.5);
  color: var(--cream);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Jebena pour scene (new hero) ---------- */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding-top: 76px;
  background: #1c1410;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3rem 4rem 4rem;
  background: radial-gradient(ellipse at 30% 50%, #2b1a14, #0f0b09);
  color: #f7efe3;
}
.hero-left .eyebrow-line .rule {
  background: #d4a537;
}
.hero-left .h-eyebrow {
  color: #d4a537;
}
.hero-left h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1rem;
  line-height: 1;
}
.hero-left p {
  max-width: 28rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(247, 239, 227, 0.75);
  margin-bottom: 2.5rem;
}
.hero-left .btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-left .btn-outline {
  border-color: rgba(247, 239, 227, 0.3);
  color: #f7efe3;
}
.hero-left .btn-outline:hover {
  background: #f7efe3;
  color: #1c1410;
}

.hero-right {
  position: relative;
  overflow: hidden;
  background: #1c1410;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-right .jebena-scene {
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
  position: relative;
  padding: 2rem;
}
.jebena-scene svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
}

/* Steam particles (CSS animated) */
.jebena-scene .steam-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.steam-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247,239,227,0.25) 0%, transparent 70%);
  animation: steamFloat 4s ease-in-out infinite;
}
.steam-particle:nth-child(1) {
  width: 80px; height: 80px;
  bottom: 70%; left: 30%;
  animation-delay: 0s;
}
.steam-particle:nth-child(2) {
  width: 100px; height: 100px;
  bottom: 75%; left: 55%;
  animation-delay: 1.2s;
}
.steam-particle:nth-child(3) {
  width: 60px; height: 60px;
  bottom: 60%; left: 10%;
  animation-delay: 2.4s;
}
.steam-particle:nth-child(4) {
  width: 90px; height: 90px;
  bottom: 65%; left: 70%;
  animation-delay: 0.8s;
}

@keyframes steamFloat {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  30% { opacity: 0.7; }
  100% { transform: translateY(-120px) scale(1.4); opacity: 0; }
}

/* Pour stream animation */
.pour-stream {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: pourFlow 2.5s ease-in-out infinite;
}
@keyframes pourFlow {
  0% { stroke-dashoffset: 400; opacity: 0.2; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.2; }
}

/* ---------- Three Rounds (abol/tona/baraka) ---------- */
.round-card {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.round-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.round-label .amh {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--terracotta);
  font-weight: 600;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(43, 24, 16, 0.06);
}

.menu-card {
  background: #fff;
  border-radius: 20px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -16px rgba(43, 24, 16, 0.22);
}

.menu-card .tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  background: var(--sage);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.06em;
}

.price-tag {
  font-family: var(--mono);
  color: var(--terracotta);
  font-weight: 600;
  font-size: 1.05rem;
}

/* ---------- Gallery lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

/* ---------- Event calendar ---------- */
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.85rem;
  cursor: default;
  position: relative;
  background: var(--cream-deep);
  color: var(--roast-soft);
}

.cal-day.empty {
  background: transparent;
}

.cal-day.has-event {
  background: #fff;
  border: 1.5px solid var(--terracotta);
  color: var(--roast);
  cursor: pointer;
  font-weight: 600;
}

.cal-day.has-event:hover {
  background: var(--terracotta);
  color: #fff;
}

.cal-day .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--terracotta);
  position: absolute;
  bottom: 6px;
}

.cal-day.has-event:hover .dot {
  background: #fff;
}

.cal-day.today {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.event-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
}

.event-date-chip {
  flex: 0 0 56px;
  height: 56px;
  background: var(--roast);
  color: var(--cream);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
}

.event-date-chip .num {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

.event-date-chip .mon {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ---------- Featured post (journal) ---------- */
.featured-post {
  transition: box-shadow 0.35s;
}

/* ---------- Cart drawer ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 20, 16, 0.5);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--cream);
  z-index: 90;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.25);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-line {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
}

.qty-stepper button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

/* ---------- Order page quantity pill ---------- */
.qty-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  background: var(--cream-deep);
  border-radius: 999px;
  padding: 0.25rem 0.4rem;
}

.qty-pill button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.add-btn {
  transition: transform 0.2s, background 0.2s;
}

.add-btn:active {
  transform: scale(0.95);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade"] {
  transform: none;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--roast);
  color: var(--cream-deep);
}

.site-footer a:hover {
  color: var(--gold);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--roast);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.4);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--roast-soft);
  opacity: 0.7;
}

/* ---------- Eyebrow line component ---------- */
.eyebrow-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.eyebrow-line .rule {
  width: 28px;
  height: 1.5px;
  background: var(--terracotta);
}

/* ---------- Utilities ---------- */
.text-roast {
  color: var(--roast);
}

.bg-roast {
  background: var(--roast);
}

.bg-cream-deep {
  background: var(--cream-deep);
}

/* ---------- Responsive grid overrides ---------- */
@media (min-width: 640px) {
  .menu-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

@media (min-width: 768px) {
  .rounds-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .location-grid {
    grid-template-columns: 1.1fr 1fr !important;
    align-items: center;
  }
  .footer-grid {
    grid-template-columns: 1.3fr 1fr !important;
  }
  .featured-post {
    grid-template-columns: 1fr 1fr !important;
  }
  #post-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (min-width: 900px) {
  #events-layout {
    grid-template-columns: 1.2fr 1fr !important;
    align-items: flex-start;
  }
}

@media (min-width: 960px) {
  #order-layout {
    grid-template-columns: 1fr 360px !important;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .hide-on-small {
    display: none !important;
  }
}

/* ---------- Hero responsive ---------- */
@media (max-width: 768px) {
  .hero-split {
    grid-template-columns: 1fr;
    padding-top: 76px;
  }
  .hero-left {
    padding: 3rem 1.5rem;
    text-align: center;
    align-items: center;
  }
  .hero-left p {
    max-width: 100%;
  }
  .hero-left .btn-group {
    justify-content: center;
  }
  .hero-right {
    min-height: 50vh;
  }
  .hero-right .jebena-scene {
    max-width: 300px;
  }
   }
