/* ===========================
   TEST CAFE — Custom Styles
   Tailwind handles utilities.
   This file: animations, custom
   properties, keyframes, and
   rules Tailwind can't express.
   =========================== */

/* ── CSS Custom Properties ── */
:root {
  --espresso: #2C1A0E;
  --mocha: #4A2C17;
  --latte: #C9A87C;
  --cream: #F5EFE6;
  --parchment: #FAF6F0;
  --sage: #7A8C6E;
  --foam: #EDE3D4;
  --transition-base: 200ms ease;
}

/* ── Font rendering ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ── Hero overlay gradient ── */
.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(44, 26, 14, 0.55) 0%,
    rgba(44, 26, 14, 0.40) 50%,
    rgba(44, 26, 14, 0.70) 100%
  );
}

/* ── Header scroll state ── */
#site-header {
  background: transparent;
  color: #F5EFE6;
}

#site-header.scrolled {
  background: rgba(250, 246, 240, 0.96);
  color: var(--espresso);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(44, 26, 14, 0.08);
}

#site-header.scrolled .nav-link {
  color: var(--espresso);
}

#site-header.scrolled a[href="#hero"] span:last-child {
  color: var(--espresso);
}

/* ── Hero animations ── */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-sub {
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.3s;
}

.hero-title {
  animation: heroFadeUp 0.9s ease forwards;
  animation-delay: 0.55s;
}

.hero-desc {
  animation: heroFadeUp 0.9s ease forwards;
  animation-delay: 0.75s;
}

.hero-cta {
  animation: heroFadeUp 0.9s ease forwards;
  animation-delay: 0.95s;
}

/* ── Scroll indicator ── */
@keyframes scrollPulse {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

.scroll-dot-inner {
  animation: scrollPulse 1.6s ease-in-out infinite;
}

/* ── Fade-in on scroll ── */
.fade-in-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside a parent */
.fade-in-item:nth-child(1) { transition-delay: 0ms; }
.fade-in-item:nth-child(2) { transition-delay: 80ms; }
.fade-in-item:nth-child(3) { transition-delay: 160ms; }
.fade-in-item:nth-child(4) { transition-delay: 240ms; }
.fade-in-item:nth-child(5) { transition-delay: 320ms; }
.fade-in-item:nth-child(6) { transition-delay: 400ms; }

/* ── Menu Tabs ── */
.menu-tab {
  color: var(--mocha);
  background: transparent;
}

.menu-tab:hover {
  background: rgba(201, 168, 124, 0.2);
  color: var(--espresso);
}

.menu-tab.active-tab {
  background: var(--espresso);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(44, 26, 14, 0.25);
}

/* ── Menu card hover state ── */
.menu-card {
  cursor: default;
}

/* ── Mobile menu open / hamburger X ── */
#mobile-menu-btn.is-open .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#mobile-menu-btn.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#mobile-menu-btn.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ── Toast ── */
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

.toast-msg {
  animation: toastIn 0.3s ease forwards;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--espresso);
  color: var(--cream);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(44, 26, 14, 0.3);
  z-index: 9999;
}

.toast-msg.hiding {
  animation: toastOut 0.3s ease forwards;
}

/* ── Open/Closed status badge ── */
.status-open {
  background: rgba(122, 140, 110, 0.2);
  color: #5C6E52;
}

.status-closed {
  background: rgba(201, 168, 124, 0.2);
  color: #8A6040;
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .fade-in-item {
    opacity: 1;
    transform: none;
  }
}

/* ── Print ── */
@media print {
  #site-header,
  #hero,
  .scroll-dot,
  footer {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
