/* =========================================================
   Trattoria Venezia custom styles
   Everything Tailwind can't do cleanly lives here.
   ========================================================= */

:root {
  --espresso: #1A1410;
  --cream:    #F5EFE6;
  --plaster:  #EBE2D3;
  --lagoon:   #1F4842;
  --brass:    #B08A4A;
  --cocoa:    #2B1F16;
  --bone:     #EFE7D8;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--cocoa);
  background: var(--cream);
}

/* Display serif utility used on massive headings */
.font-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
}

/* Script accent used sparingly */
.font-script {
  font-family: 'Italianno', cursive;
}

/* --- Hero wordmark, huge responsive serif --- */
.hero-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(3rem, 13vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
}

/* --- Warm image grading (applied via class) --- */
.img-warm {
  filter: contrast(1.05) saturate(0.92) brightness(0.96) sepia(0.06);
}

.img-dim {
  filter: brightness(0.55) contrast(1.05) saturate(0.9);
}

/* --- Cinematic vignette on hero images --- */
.hero-vignette::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(26,20,16,0.55) 100%),
    linear-gradient(to bottom, rgba(26,20,16,0.25) 0%, transparent 30%, transparent 60%, rgba(26,20,16,0.85) 100%);
}

/* --- Film grain overlay for dark sections --- */
.grain::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* --- Brass ornamental divider (fleuron) --- */
.brass-divider {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--brass);
  font-size: 1.25rem;
}
.brass-divider::before,
.brass-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* --- Menu dotted leader (classic printed menu style) --- */
.menu-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.menu-row .menu-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(43,31,22,0.35);
  transform: translateY(-0.3em);
  min-width: 1rem;
}
.on-dark .menu-row .menu-dots {
  border-bottom-color: rgba(239,231,216,0.3);
}

/* --- Button styles --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: all 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
}
.btn-primary {
  background: var(--lagoon);
  color: var(--bone);
}
.btn-primary:hover {
  background: var(--brass);
  color: var(--espresso);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: currentColor;
  border-color: currentColor;
}
.btn-outline:hover {
  background: currentColor;
  color: var(--cream);
}
.btn-brass {
  background: var(--brass);
  color: var(--espresso);
}
.btn-brass:hover {
  background: var(--bone);
}

/* --- Section eyebrow label --- */
.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass);
}

/* --- Link underline animation --- */
.link-underline {
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 0;
  background: currentColor;
  transition: width 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.link-underline:hover::after {
  width: 100%;
}

/* --- Nav link --- */
.nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 220ms ease;
}

/* --- Site header ---
   Always visible: solid espresso with a brass hairline at the bottom
   so the navbar never blends into dark hero sections. A slightly
   stronger shadow kicks in on scroll for depth. */
[data-header] {
  background: rgba(26, 20, 16, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(176, 138, 74, 0.28);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}
[data-header].is-scrolled {
  background: rgba(26, 20, 16, 0.98);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

/* --- Header logo --- */
.header-logo {
  height: 52px;
  width: auto;
  display: block;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.header-logo:hover {
  transform: scale(1.03);
}
@media (max-width: 768px) {
  .header-logo { height: 44px; }
}

/* --- Dish card hover --- */
.dish-card .dish-img {
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dish-card:hover .dish-img {
  transform: scale(1.05);
}

/* --- Scroll-triggered fade-in ---
   Elements are VISIBLE by default (no-JS fallback). JS adds .pending
   to below-the-fold elements, the observer removes it when they
   scroll into view. */
.reveal {
  transition: opacity 900ms cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.pending {
  opacity: 0;
  transform: translateY(30px);
}

/* --- Language toggle --- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.lang-toggle button {
  opacity: 0.5;
  transition: opacity 220ms ease;
  cursor: pointer;
  padding: 0.25rem;
}
.lang-toggle button.is-active {
  opacity: 1;
}
.lang-toggle .sep {
  opacity: 0.3;
}

/* --- Drop cap for editorial paragraphs --- */
.drop-cap::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 5.5rem;
  line-height: 0.85;
  float: left;
  margin: 0.25rem 0.6rem 0 0;
  color: var(--brass);
}

/* --- Hide scrollbar on language swap --- */
html.lang-swapping {
  overflow: hidden;
}

/* --- Mobile menu --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--espresso);
  color: var(--bone);
  z-index: 90;
  transform: translateX(100%);
  transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 6rem 2rem 3rem;
}
.mobile-menu.is-open {
  transform: translateX(0);
}
.mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(239,231,216,0.1);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
