/* ============================================
   Ristorante PIAGGIO — Shared Stylesheet
   Tuscan Editorial Warmth
   ============================================ */

/* --- Custom Properties --- */
:root {
  --primary: #C85A24;
  --secondary: #3B2316;
  --accent: #D4722C;
  --bg: #FDF6EE;
  --surface: #F0E4D6;
  --text: #2C1810;
  --text-muted: #6B5244;
  --font-display: 'DM Serif Display', serif;
  --font-body: 'Crimson Pro', serif;
  --nav-height: 72px;
  --container-max: 1280px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-soft: 0 2px 16px rgba(44, 24, 16, 0.06);
  --shadow-card: 0 4px 24px rgba(44, 24, 16, 0.08);
  --shadow-elevated: 0 8px 40px rgba(44, 24, 16, 0.12);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

img {
  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(--secondary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  line-height: 1.05;
  margin-bottom: var(--space-md);
}

h2 {
  font-size: clamp(2rem, 3.5vw + 0.5rem, 3.25rem);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2.25rem);
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: clamp(1.25rem, 1.5vw + 0.25rem, 1.75rem);
  margin-bottom: var(--space-xs);
}

h5 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

h6 {
  font-size: 1.0625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: 1.25em;
  color: var(--text);
  font-size: 1.125rem;
  line-height: 1.75;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

/* --- Display & Section Typography --- */
.display-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw + 1rem, 5.5rem);
  line-height: 1.0;
  color: var(--secondary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.75rem);
  color: var(--secondary);
  margin-bottom: var(--space-sm);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background-color: var(--primary);
  margin-top: 0.75rem;
}

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

.body-text p:last-child {
  margin-bottom: 0;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

/* --- Editorial Grid Utilities --- */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

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

/* --- Navigation --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background-color: rgba(253, 246, 238, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(59, 35, 22, 0.08);
  transition: box-shadow var(--transition-base);
}

.site-nav.scrolled {
  box-shadow: var(--shadow-soft);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
  z-index: 1001;
}

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

.nav-logo span {
  font-family: var(--font-display);
  font-size: 1.375rem;
  color: var(--secondary);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: color var(--transition-base), background-color var(--transition-base);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary);
  background-color: rgba(200, 90, 36, 0.05);
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--primary);
  border-radius: 1px;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  gap: 5px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--secondary);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.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);
}

/* Mobile Menu */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg);
  z-index: 999;
  padding: calc(var(--nav-height) + var(--space-lg)) var(--space-md) var(--space-md);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-xs);
  overflow-y: auto;
}

.nav-mobile-menu.open {
  display: flex;
}

.nav-mobile-menu .nav-link {
  font-size: 1.5rem;
  font-family: var(--font-display);
  padding: 0.75rem 1.5rem;
  text-align: center;
  width: 100%;
  max-width: 320px;
}

.nav-mobile-menu .nav-link.active::after {
  bottom: 4px;
  left: 1.5rem;
  right: 1.5rem;
}

/* --- Inner Page Hero (Shared Compact Header Strip) --- */
.inner-hero {
  background-color: var(--secondary);
  padding: var(--space-lg) 0 var(--space-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.inner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200, 90, 36, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.inner-hero .section-title {
  color: var(--bg);
  margin-bottom: 0.25rem;
}

.inner-hero .section-title::after {
  margin-left: auto;
  margin-right: auto;
  background-color: var(--accent);
}

.inner-hero .body-text {
  color: rgba(253, 246, 238, 0.75);
  margin-left: auto;
  margin-right: auto;
}

/* --- Buttons --- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-base), color var(--transition-base),
              border-color var(--transition-base), transform var(--transition-base),
              box-shadow var(--transition-base);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

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

.btn-primary:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

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

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

/* --- Card --- */
.card {
  background-color: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-body {
  padding: var(--space-md);
}

.card-body h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.card-body p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0;
}

/* --- Signature Detail: Pull Quote --- */
.pull-quote {
  position: relative;
  padding: var(--space-xl) var(--space-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

.pull-quote-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pull-quote-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.3) contrast(0.9) brightness(0.55);
}

.pull-quote-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(59, 35, 22, 0.55) 0%,
    rgba(44, 24, 16, 0.35) 100%
  );
}

.pull-quote blockquote {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem);
  line-height: 1.2;
  color: var(--bg);
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  text-shadow: 0 2px 20px rgba(44, 24, 16, 0.3);
}

.pull-quote blockquote::before {
  content: '\201C';
  display: block;
  font-size: 5em;
  line-height: 0.5;
  color: var(--primary);
  opacity: 0.5;
  margin-bottom: 0.1em;
  font-style: normal;
}

.pull-quote cite {
  display: block;
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(253, 246, 238, 0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--space-sm);
  text-align: center;
}

/* --- Fade-In Animation --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(12px);
}

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

/* --- Language Flag 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;
  transition: border-color var(--transition-base), transform var(--transition-base);
  overflow: hidden;
  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.1);
}

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

/* --- Footer --- */
.site-footer {
  background-color: var(--secondary);
  color: rgba(253, 246, 238, 0.8);
  padding: var(--space-xl) 0 var(--space-md);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.site-footer a {
  color: rgba(253, 246, 238, 0.8);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(253, 246, 238, 0.1);
}

.footer-inner h5 {
  font-family: var(--font-display);
  color: var(--bg);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.footer-inner p {
  color: rgba(253, 246, 238, 0.65);
  font-size: 0.9375rem;
  margin-bottom: 0.5em;
}

.footer-inner ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-inner ul a {
  font-size: 0.9375rem;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding-top: var(--space-md);
  padding-bottom: var(--space-xs);
}

.footer-legal a {
  font-size: 0.8125rem;
  color: rgba(253, 246, 238, 0.5);
}

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

.footer-copy {
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(253, 246, 238, 0.4);
  padding-top: var(--space-xs);
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mx-auto { margin-left: auto; margin-right: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- Responsive: Tablet (768px) --- */
@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .container {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .section {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .pull-quote {
    min-height: 320px;
    padding: var(--space-lg) var(--space-sm);
  }

  .pull-quote blockquote {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
  }

  .pull-quote blockquote::before {
    font-size: 3.5em;
  }

  .inner-hero {
    padding: var(--space-md) 0 var(--space-sm);
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    width: 100%;
    justify-content: center;
  }
}

/* --- Responsive: Mobile (below 768px additional) --- */
@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: center;
  }

  .footer-inner ul {
    align-items: center;
  }

  .display-heading {
    font-size: clamp(2.25rem, 8vw, 3.25rem);
  }
}

/* --- Responsive: Desktop (1024px) --- */
@media (min-width: 1024px) {
  .nav-link {
    font-size: 0.9375rem;
    padding: 0.5rem 1.125rem;
  }

  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .editorial-grid {
    gap: var(--space-xl);
  }

  .pull-quote {
    min-height: 500px;
  }
}

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