/* =============================================================
   La Trinita — main stylesheet
   -------------------------------------------------------------
   Organised top to bottom as:
     1. Design tokens (colors, fonts) — edit brand colors here
     2. Base / reset
     3. Layout helpers
     4. Reusable components (buttons, tab-pills, cards, tricolor)
     5. Sections (hero, marquee, story, menu, gallery, reviews,
        contact, follow, footer, sticky CTA, music button)
     6. Animations
     7. Responsive tweaks
   ============================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  --background: #fdfaf6;
  --foreground: #2a1810;
  --card: #ffffff;
  --muted: #a89b8f;
  --muted-foreground: #6b5d52;
  --border: #e8dfd5;
  --cream: #f5efe6;
  --wine: #6b1e2b;
  --italy-green: #008C45;
  --italy-white: #ffffff;
  --italy-red: #CD212A;
  --terracotta: #c65d3a;
  --olive: #7a8c4a;
  --gold: #c9a961;
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.15);
}

/* ---------- 2. Base / reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px; /* room for sticky CTA */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-serif); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; }

/* ---------- 3. Layout helpers ---------- */
.container { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
.container-wide { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.section { padding: 4rem 0; }
.section-cream { background: var(--cream); }
.text-center { text-align: center; }
.eyebrow {
  margin-top: .5rem;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.section-title {
  font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
  font-weight: 700;
  color: var(--foreground);
}

/* Tricolor stripes */
.tricolor { display: inline-flex; gap: .375rem; margin-bottom: 1rem; }
.tricolor span {
  display: block;
  width: .5rem;
  height: 1.5rem;
  border-radius: 2px;
}
.tricolor span:nth-child(1) { background: var(--italy-green); }
.tricolor span:nth-child(2) { background: var(--italy-white); box-shadow: inset 0 0 0 1px var(--border); }
.tricolor span:nth-child(3) { background: var(--italy-red); }
.tricolor--lg span { width: .75rem; height: 2.5rem; }

/* ---------- 4. Reusable components ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.25rem;
  font-size: .875rem; font-weight: 600;
  border-radius: 9999px;
  box-shadow: var(--shadow-md);
  transition: filter .15s ease, transform .1s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.97); }
.btn-green { background: var(--italy-green); color: #fff; }
.btn-white { background: #fff; color: var(--wine); }
.btn-terracotta { background: var(--terracotta); color: #fff; }
.btn-red { background: var(--italy-red); color: #fff; }
.btn-facebook { background: #1877F2; color: #fff; }
.btn-instagram { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); color: #fff; }
.btn-sm { padding: .5rem 1rem; font-size: .75rem; }

.tab-pill {
  padding: .5rem 1rem;
  font-size: .875rem; font-weight: 500;
  border-radius: 9999px;
  background: #fff; color: var(--foreground);
  border: 1px solid var(--border);
  transition: background .15s, color .15s, box-shadow .15s;
}
.tab-pill:hover { background: rgba(255,255,255,.7); }
.tab-pill.is-active {
  background: var(--wine); color: #fff; border-color: var(--wine);
  box-shadow: var(--shadow-sm);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.flag {
    display: inline-block;
    width: 1em;
    height: auto;
    vertical-align: -0.125em;
    margin: 0 .15em;
}
/* ---------- 5. Sections ---------- */

/* Hero */
.hero {
  position: relative;
  min-height: 92vh; min-height: 92dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; text-align: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url("../images/hero-tomato.png");
  background-size: cover; background-position: center;
}
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.hero-inner {
  position: relative; z-index: 1;
  max-width: 44rem;
  animation: heroIn 1s ease-out both;
}
.hero-logo {
  width: 7rem; height: 7rem;
  border-radius: 50%; object-fit: cover;
  margin: 0 auto 1rem;
  border: 4px solid rgba(255,255,255,.3);
  box-shadow: var(--shadow-lg);
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.75rem, 6vw + 1rem, 4.5rem);
  font-weight: 700; line-height: 1.05;
}
.hero-place { color: rgba(255,255,255,.9); font-weight: 500; letter-spacing: .1em; margin-top: 1rem; }
.hero-lede {
  margin: 1.5rem auto 0; max-width: 32rem;
  color: rgba(255,255,255,.8); line-height: 1.6;
}
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.hero-chevron {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  font-size: 1.75rem;
  animation: bounce 1.6s infinite;
}

/* Marquee */
.marquee { background: var(--wine); padding: .75rem 0; overflow: hidden; }
.marquee-track { display: inline-flex; white-space: nowrap; animation: marquee 30s linear infinite; }
.marquee-track span {
  margin: 0 1.5rem;
  color: rgba(255,255,255,.9);
  font-size: .875rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
}

/* Story */
.story-grid { margin-top: 2rem; display: grid; gap: 2rem; }
@media (min-width: 640px) { .story-grid { grid-template-columns: 1fr 1fr; text-align: left; } }
.story-list { display: flex; flex-direction: column; gap: 1rem; }
.story-item { display: flex; gap: .75rem; align-items: flex-start; }
.story-item .icon { flex-shrink: 0; width: 1.25rem; height: 1.25rem; margin-top: .2rem; }
.story-item p { margin: 0; }
.story-item .label { font-weight: 600; }
.story-item .sub { font-size: .875rem; color: var(--muted-foreground); }
.icon-green { color: var(--italy-green); }
.icon-red { color: var(--italy-red); }
.icon-terracotta { color: var(--terracotta); }
.icon-olive { color: var(--olive); }
.icon-wine { color: var(--wine); }

/* Menu (used on index preview + full menu page) */
.menu-tabs { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.menu-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.menu-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(232,223,213,.6);
}
.menu-row .name { font-weight: 600; color: var(--foreground); }
.menu-row .desc { font-size: .875rem; color: var(--muted-foreground); margin-top: .125rem; }
.menu-row .price { flex-shrink: 0; font-weight: 500; color: var(--wine); }
.menu-panel { animation: fadeUp .35s ease-out both; }

/* Specials strip */
.specials-grid {
  margin-top: 2rem;
  display: grid; gap: 1rem;
}
@media (min-width: 640px) { .specials-grid { grid-template-columns: repeat(3, 1fr); } }
.special-card {
  background: #fff; border: 1px solid var(--border); border-radius: 1rem;
  padding: 1.25rem; box-shadow: var(--shadow-sm);
}
.special-card .name { font-weight: 700; color: var(--wine); font-family: var(--font-serif); font-size: 1.125rem; }
.special-card .desc { font-size: .875rem; color: var(--muted-foreground); margin-top: .25rem; }
.special-card .price { margin-top: .75rem; font-weight: 600; color: var(--foreground); }

.menu-cta { margin-top: 2.5rem; text-align: center; }
.link-inline { color: var(--wine); font-weight: 600; text-decoration: underline; }

/* Gallery */
.gallery-grid {
  margin-top: 2rem;
  display: grid; gap: .75rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 5fr); } } /* previous value repeat(3,1fr); */
@media (min-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 5fr); } } /* previous value repeat(4,1fr); */
.gallery-tile {
  position: relative; aspect-ratio: 1/1;
  overflow: hidden; border-radius: .875rem;
  background: var(--muted);
}
.gallery-tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.gallery-tile:hover img { transform: scale(1.08); }
.gallery-caption {
  position: absolute; inset: auto 0 0 0;
  padding: .75rem;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  color: #fff; font-size: .75rem;
}

/* Reviews */
.reviews-grid { margin-top: 2rem; display: grid; gap: 1rem; }
@media (min-width: 640px) { .reviews-grid { grid-template-columns: 1fr 1fr; } }
.review-head { display: flex; align-items: center; justify-content: space-between; }
.review-name { font-weight: 600; }
.review-comment { margin-top: .5rem; font-size: .875rem; color: var(--muted-foreground); line-height: 1.6; }
.stars { display: inline-flex; gap: 2px; }
.star { color: var(--muted); font-size: 1rem; line-height: 1; }
.star.on { color: var(--gold); }

/* Contact */
.contact-grid {
  margin-top: 2.5rem; display: grid; gap: 1.5rem;
}
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card { text-align: center; }
.contact-card .label { margin-top: .75rem; font-weight: 600; }
.contact-card .value { display: inline-block; margin-top: .25rem; font-weight: 700; font-size: 1.125rem; color: var(--wine); }
.contact-card .value:hover { text-decoration: underline; }
.contact-card .note { margin-top: .25rem; font-size: .75rem; color: var(--muted-foreground); }
.contact-card .icon { width: 1.5rem; height: 1.5rem; margin: 0 auto; display: block; }
.contact-map { margin-top: 2rem; text-align: center; }

/* Follow */
.follow-actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.follow-tag { margin-top: 1rem; font-size: .75rem; color: var(--muted-foreground); }

/* Footer */
.footer {
  background: var(--wine); color: #fff; text-align: center;
  padding: 2.5rem 1rem;
}
.footer .brand { font-family: var(--font-serif); font-weight: 700; font-size: 1.125rem; }
.footer .sub { margin-top: .25rem; font-size: .875rem; opacity: .8; }
.footer .tags { margin-top: 1rem; font-size: .75rem; opacity: .6; }
.footer .copy { margin-top: 1.5rem; font-size: .75rem; opacity: .5; }

/* Sticky CTA */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  padding: .75rem 1rem;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}

/* Music button */
.music-wrap {
  position: fixed; right: 1rem; bottom: 5.5rem; z-index: 50;
  display: flex; flex-direction: column; align-items: flex-end; gap: .5rem;
}
.music-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem; border-radius: 9999px;
  background: var(--wine); color: #fff;
  font-size: .875rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: float 2.5s ease-in-out infinite;
  transition: transform .15s;
  outline: .1rem solid #fff;
  
}
.music-btn:hover { transform: scale(1.05);
animation: paused;

}
.music-toggle {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--wine); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform .15s;
  outline: .1rem solid #fff;
}
.music-toggle:hover { transform: scale(1.05);
animation: paused;
}

/* Menu-page header */
.page-header {
  background: var(--wine); color: #fff;
  padding: 3rem 1rem 2.5rem; text-align: center;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
  color: #fff;
}
.page-header p { margin-top: .5rem; color: rgba(255,255,255,.85); }
.back-home {
  display: inline-block; margin-top: 1rem;
  font-size: .875rem; color: rgba(255,255,255,.85);
  text-decoration: underline;
}

/* Reveal-on-scroll (set by JS) */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 6. Animations ---------- */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes float { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-6px);} }
@keyframes bounce { 0%,100% { transform: translate(-50%, 0);} 50% { transform: translate(-50%, -8px);} }
@keyframes heroIn { from { opacity: 0; transform: scale(.9);} to { opacity: 1; transform: scale(1);} }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: none;} }

/* ---------- 7. Responsive tweaks ---------- */
@media (max-width: 480px) {
  .hero-actions .btn { padding: .5rem 1rem; font-size: .75rem; }
  .sticky-cta .btn { padding: .625rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
