@import "tailwindcss";

:root {
  --color-espresso: #2a160d;
  --color-espresso-light: #3d2314;
  --color-cream: #f7ecd8;
  --color-cream-dim: #edd9b3;
  --color-tomato: #bc4128;
  --color-tomato-dark: #92321e;
  --color-terracotta: #c17240;
  --color-olive: #707a44;
  --color-italia-green: #1f5c3f;
  --color-brass: #b8904f;
  --color-ink: #2c1a10;

  /* Aliases kept for existing markup — same warm-cream tokens. */
  --color-ivory: var(--color-cream);
  --color-ivory-dim: var(--color-cream-dim);
}

@theme inline {
  --color-espresso: var(--color-espresso);
  --color-espresso-light: var(--color-espresso-light);
  --color-cream: var(--color-cream);
  --color-cream-dim: var(--color-cream-dim);
  --color-ivory: var(--color-ivory);
  --color-ivory-dim: var(--color-ivory-dim);
  --color-tomato: var(--color-tomato);
  --color-tomato-dark: var(--color-tomato-dark);
  --color-terracotta: var(--color-terracotta);
  --color-olive: var(--color-olive);
  --color-italia-green: var(--color-italia-green);
  --color-brass: var(--color-brass);
  --color-ink: var(--color-ink);
  --font-serif: var(--font-fraunces);
  --font-sans: var(--font-inter);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Layered (not bare) so page-specific Tailwind utility classes — e.g. the
   admin dashboard's light theme — can still override this default. An
   unlayered `body {}` rule would otherwise always win over utility classes
   regardless of specificity, per the CSS cascade-layers spec. */
@layer base {
  body {
    background: var(--color-espresso);
    color: var(--color-ivory);
    font-family: var(--font-sans);
  }
}

.scrollbar-none {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* Layered so utility classes (e.g. a responsive text-[10px] override) can
   still win — see the note on the body rule above for why this matters. */
@layer components {
  .eyebrow {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
  }
}

/* A slim tricolor rule — a restrained nod to the flag, used as a signature
   accent line rather than a literal striped flag. */
.tricolor-rule {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-italia-green) 0%,
    var(--color-italia-green) 33.33%,
    var(--color-cream) 33.33%,
    var(--color-cream) 66.66%,
    var(--color-tomato) 66.66%,
    var(--color-tomato) 100%
  );
}

/* Menu-line dotted leader: name ..... price, like a printed menu. */
.leader {
  flex: 1;
  border-bottom: 1px dotted currentColor;
  opacity: 0.3;
  margin: 0 0.75em;
  transform: translateY(-0.35em);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popup-in {
  0% { opacity: 0; transform: scale(0.9) translateY(18px); }
  60% { opacity: 1; transform: scale(1.015) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes popup-out {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.94) translateY(10px); }
}

@keyframes glow-drift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
  50% { transform: translate(-3%, 3%) scale(1.08); opacity: 0.8; }
}

@keyframes ribbon-shine {
  0% { transform: translateX(-120%) rotate(0deg); }
  100% { transform: translateX(220%) rotate(0deg); }
}

.animate-backdrop-in {
  animation: backdrop-in 0.35s ease forwards;
}

.animate-popup-in {
  animation: popup-in 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.1) forwards;
}

.animate-popup-out {
  animation: popup-out 0.25s ease forwards;
}

.animate-glow-drift {
  animation: glow-drift 7s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .animate-backdrop-in,
  .animate-popup-in,
  .animate-popup-out,
  .animate-glow-drift {
    animation: none;
  }
}
