/* Cucina Caterers — custom styles layered on top of Tailwind utility classes */

:root {
  --gold: #D4AF37;
  --gold-bright: #F2C230;
  --ink: #14120F;
  --cream: #FBF9F4;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  color: var(--ink);
  background-color: var(--cream);
}

.font-display {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Gold gradient text accent */
.text-gold-gradient {
  background: linear-gradient(90deg, #B8860B, #F2C230 50%, #B8860B);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Sticky header shadow on scroll */
#site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.nav-link.text-gold-active {
  color: var(--gold);
}

/* ---------- Mobile nav toggle (hamburger <-> X) ---------- */
#nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}
#nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Mobile nav overlay ---------- */
/* Explicit colors here (not just the Tailwind CDN bg-ink/text-cream utility
   classes) so the overlay is always opaque even if the Tailwind CDN's
   runtime JIT hasn't finished generating custom-color utilities yet when
   the menu is opened right after page load. */
#mobile-menu {
  background-color: var(--ink);
  color: var(--cream);
}
#mobile-menu.flex {
  animation: mobileMenuIn 0.25s ease forwards;
}

@keyframes mobileMenuIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Hero slider ---------- */
.hero-slider { position: relative; overflow: hidden; }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.2s ease, transform 6s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 1;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.3s ease, width 0.3s ease;
}

.hero-dot.active {
  background: var(--gold-bright);
  width: 28px;
  border-radius: 9999px;
}

/* ---------- Menu accordion ---------- */
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.accordion-item.open .accordion-panel {
  max-height: 1200px;
}

.accordion-icon {
  transition: transform 0.35s ease;
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

/* ---------- Gallery ---------- */
.gallery-item {
  overflow: hidden;
  position: relative;
}

.gallery-item img {
  transition: transform 0.6s ease, filter 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  opacity: 0;
  transition: opacity 0.4s ease;
  background: linear-gradient(to top, rgba(17, 17, 17, 0.85), rgba(17, 17, 17, 0));
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Lightbox ---------- */
#lightbox {
  background: rgba(10, 10, 10, 0.92);
}

/* ---------- Form focus state ---------- */
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

/* ---------- Form field sizing ----------
   Fields live in a CSS grid, whose items default to min-width:auto. Any control
   with a large intrinsic width therefore overflows its track instead of
   shrinking to it. Let every field shrink and stay inside its box. */
.form-input {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* iOS Safari gives input[type=date] a fixed intrinsic width and ignores
   width:100%, so the Function Date field rendered wider than its neighbours.
   Dropping the native appearance lets it size like the other inputs; tapping
   still opens the native date picker. */
input[type="date"].form-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  font: inherit;
  line-height: 1.5;
  text-align: left;
}

/* iOS renders the value inside a shadow element that carries its own
   alignment and spacing, and collapses the height while the field is empty. */
input[type="date"].form-input::-webkit-date-and-time-value {
  text-align: left;
  min-height: 1.5em;
  margin: 0;
}

input[type="date"].form-input::-webkit-calendar-picker-indicator {
  margin-left: auto;
}

/* Custom scrollbar for a premium touch */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1efe9; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 9999px; }

/* ---------- Customer review cards ----------
   Real Google reviews vary a lot in length. Cards sit in a CSS-columns
   (masonry) layout, and long quotes are clamped until the reader expands them
   so no single card dominates the grid. */
.review-card {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.review-text.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  line-clamp: 8;
  overflow: hidden;
}
