/* ============================================
   Vecchia Cantina — Rustic Trattoria Editorial
   ============================================ */

:root {
  --primary: #B5541A;
  --secondary: #5C6B3C;
  --accent: #8B2635;
  --bg: #F5EDE0;
  --surface: #E8DACE;
  --text: #2C1810;
  --text-muted: #6B5744;
  --font-display: 'Instrument Serif', serif;
  --font-body: 'Crimson Pro', serif;
  --nav-height: 72px;
  --container-pad: 24px;
  --radius: 4px;
  --shadow-soft: 0 2px 16px rgba(44, 24, 16, 0.08);
  --shadow-card: 0 4px 24px rgba(44, 24, 16, 0.1);
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.8rem, 6vw, 5.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h4 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-body); font-weight: 600; }

p {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 68ch;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section {
  padding-top: clamp(64px, 10vw, 120px);
  padding-bottom: clamp(64px, 10vw, 120px);
}

/* ---------- Utility Typography ---------- */

.display-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1em;
}

.body-text {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text);
}

/* ---------- Navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background-color: rgba(245, 237, 224, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(44, 24, 16, 0.08);
  transition: background-color 0.3s ease;
}

.site-nav > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  z-index: 1001;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.25s ease;
}

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

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-link.active::after {
  width: 100%;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  background-color: var(--bg);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 80px 24px 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-mobile-menu.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile-menu .nav-link {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text);
}

/* ---------- Buttons ---------- */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 14px 36px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFF8F0;
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: #9A4615;
  border-color: #9A4615;
  color: #FFF8F0;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: #FFF8F0;
  transform: translateY(-1px);
}

/* ---------- Card ---------- */

.card {
  background-color: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.card-body {
  padding: 28px 24px;
}

/* ---------- Inner Hero (Shared Strip) ---------- */

.inner-hero {
  position: relative;
  padding: clamp(48px, 8vw, 80px) 0 clamp(40px, 6vw, 64px);
  background-color: var(--surface);
  overflow: hidden;
}

.inner-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: -5%;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, rgba(181, 84, 26, 0.06), transparent 70%);
  pointer-events: none;
}

.inner-hero .section-title {
  margin-bottom: 0.3em;
}

.inner-hero .body-text {
  color: var(--text-muted);
  max-width: 52ch;
}

/* ------------------------------------------------
   SIGNATURE: Oversized Pull-Quote
   Italic serif in terracotta, bleeds past container,
   evokes hand-painted Italian market signage
   ------------------------------------------------ */

.pull-quote {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.2;
  color: var(--primary);
  max-width: 110%;
  margin-left: -5%;
  margin-right: -5%;
  padding: clamp(32px, 5vw, 56px) 0;
  text-wrap: balance;
  z-index: 2;
}

.pull-quote::before {
  content: '\201C';
  position: absolute;
  top: -0.15em;
  left: -0.03em;
  font-size: 6em;
  line-height: 1;
  color: var(--primary);
  opacity: 0.1;
  font-style: normal;
  pointer-events: none;
}

/* Pull-quote over full-bleed photography */
.pull-quote-hero {
  position: relative;
  width: 100%;
  overflow: visible;
}

.pull-quote-hero img {
  width: 100%;
  height: clamp(360px, 50vw, 600px);
  object-fit: cover;
  filter: saturate(0.55) contrast(1.05);
}

.pull-quote-hero .pull-quote {
  position: absolute;
  bottom: -1.5em;
  left: 5%;
  right: 10%;
  max-width: 70%;
  padding: 20px 28px;
  text-shadow: 0 2px 20px rgba(245, 237, 224, 0.7);
  z-index: 3;
}

/* ---------- Full-Bleed Image ---------- */

.full-bleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
}

.full-bleed img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---------- Asymmetric Two-Column ---------- */

.asym-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.asym-grid.reverse {
  grid-template-columns: 1fr 1.4fr;
}

.asym-grid img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

/* ---------- Fade-in Animation ---------- */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.35s ease-out forwards;
}

/* ---------- Language Switcher ---------- */

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.15s ease;
  background: none;
  padding: 0;
}

.lang-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.lang-flag:hover {
  border-color: var(--primary);
  transform: scale(1.08);
}

.lang-flag.active {
  border-color: var(--primary);
}

/* ---------- Footer ---------- */

.site-footer {
  background-color: var(--text);
  color: var(--surface);
  padding: clamp(48px, 6vw, 80px) 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  padding-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid rgba(232, 218, 206, 0.12);
}

.footer-inner a {
  color: var(--surface);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.footer-inner a:hover {
  opacity: 1;
  color: var(--surface);
}

.footer-inner h6 {
  color: var(--surface);
  margin-bottom: 16px;
  font-size: 0.85rem;
  opacity: 0.5;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  font-size: 0.85rem;
  opacity: 0.45;
}

.footer-legal a {
  color: var(--surface);
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.45;
}

/* ---------- Responsive: Tablet (768px) ---------- */

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
    --container-pad: 20px;
  }

  body {
    font-size: 16px;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-mobile-menu {
    display: flex;
    opacity: 0;
    pointer-events: none;
  }

  .nav-mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
  }

  .asym-grid,
  .asym-grid.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pull-quote {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .pull-quote-hero .pull-quote {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    max-width: 100%;
    padding: 24px var(--container-pad);
    text-shadow: none;
    background-color: rgba(245, 237, 224, 0.92);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Responsive: Small (below 1024px) ---------- */

@media (max-width: 1024px) {
  .nav-links {
    gap: 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* Ensure 1024 overrides don't conflict with 768 */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-hamburger {
    display: none;
  }

  .nav-links {
    display: flex;
  }
}

/* ── Image quality defaults ── */
img { object-fit: cover; max-width: 100%; height: auto; }
img[class*="logo"], img[class*="icon"], img[class*="flag"] { object-fit: contain; }
