/* ============================================
   AMISTADE — Stylesheet
   Palette: Vino profondo · Crema · Terracotta
   ============================================ */

@font-face {
  font-family: 'Gaqun';
  src: url('fonts/Gaqun.otf') format('opentype'),
       url('fonts/Gaqun.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette estratta dal brand reale */
  --wine:       #5a1020;
  --wine-light: #7a1e32;
  --wine-dark:  #3d0a14;
  --cream:      #f5f0e8;
  --cream-dark: #ede5d5;
  --terra:      #c4703a;
  --terra-light:#d98a58;
  --sand:       #b8a98a;
  --text:       #1a1209;
  --text-soft:  #5c4a35;
  --text-muted: #9a8870;
  --white:      #ffffff;

  --font-serif: 'Gaqun', 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --shadow-sm:  0 2px 8px rgba(74,28,44,0.08);
  --shadow-md:  0 8px 32px rgba(74,28,44,0.14);
  --shadow-lg:  0 20px 60px rgba(74,28,44,0.18);
}

/* ——— RESET & BASE ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ——— TYPOGRAPHY ——— */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: 1.1rem; font-weight: 600; }

em { font-style: italic; color: var(--terra); }

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1rem;
}

/* ——— BUTTONS ——— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--terra);
  color: var(--white);
  border: 2px solid var(--terra);
}
.btn-primary:hover { background: var(--terra-light); border-color: var(--terra-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); }

.btn-outline {
  background: transparent;
  color: var(--wine);
  border: 2px solid var(--wine);
  padding: 12px 22px;
}
.btn-outline:hover { background: var(--wine); color: var(--white); }

.btn-whatsapp {
  background: #25d366;
  color: var(--white);
  border: 2px solid #25d366;
  padding: 12px 22px;
}
.btn-whatsapp svg { width: 18px; height: 18px; }
.btn-whatsapp:hover { background: #1ebe5d; border-color: #1ebe5d; transform: translateY(-1px); }

.link-arrow {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--terra);
  letter-spacing: 0.02em;
  transition: gap 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.link-arrow:hover { gap: 8px; }

/* ——— HEADER / NAV ——— */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 0;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(74, 28, 44, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 52px;
  width: auto;
  display: block;
  /* Il logo ha sfondo bianco: mix-blend-mode lo rende visibile su scuro */
  mix-blend-mode: screen;
  transition: opacity 0.2s;
  filter: brightness(1.1) contrast(1.05);
}

.logo-img:hover { opacity: 0.85; }

.footer-logo {
  height: 48px;
  margin-bottom: 0.75rem;
  mix-blend-mode: screen;
  filter: brightness(1.1) contrast(1.05);
  opacity: 0.9;
}

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

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--white); }

.nav-cta {
  background: var(--terra);
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--terra-light); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ——— HERO ——— */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  /* Fallback se l'immagine non è ancora caricata */
  background: var(--wine-dark);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* Immagine hero: sfondo bordeaux con foglie di vite */
  background: url('img/hero-bg.png') center top / cover no-repeat;
  /* Leggero scurimento per garantire leggibilità del testo */
  opacity: 0.92;
}

/* Gradiente sulla parte bassa per far "emergere" il testo */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(61,10,20,0.6), transparent);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 700px;
  padding: 120px 24px 80px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terra-light);
  margin-bottom: 1.5rem;
}

.hero-title {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero-title em {
  color: var(--terra-light);
  display: block;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
  z-index: 3;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ——— INTRO BRAND ——— */
.intro-brand {
  background: var(--cream-dark);
  padding: 80px 0;
  border-bottom: 1px solid rgba(74,28,44,0.08);
}

.intro-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.intro-line {
  flex-shrink: 0;
  width: 3px;
  height: 80px;
  background: linear-gradient(to bottom, var(--terra), transparent);
  border-radius: 2px;
}

.intro-text {
  max-width: 680px;
}

.intro-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--wine);
  margin-bottom: 1rem;
}

.intro-text p {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.8;
}

/* ——— PRODOTTI ——— */
.prodotti {
  padding: 100px 0;
  background: var(--cream);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  color: var(--wine);
  max-width: 600px;
  margin: 0 auto;
}

.prodotti-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.prodotto-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.prodotto-card.featured {
  background: var(--wine);
}

.prodotto-visual {
  height: 240px;
  overflow: hidden;
  background: var(--cream-dark);
}

.prodotto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.prodotto-card:hover .prodotto-img {
  transform: scale(1.04);
}

.prodotto-body {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prodotto-numero {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--terra);
}

.prodotto-card.featured .prodotto-numero { color: var(--terra-light); }

.prodotto-body h3 {
  font-size: 1.4rem;
  color: var(--wine);
  line-height: 1.2;
}

.prodotto-card.featured .prodotto-body h3 { color: var(--cream); }
.prodotto-card.featured .prodotto-body h3 em { color: var(--terra-light); }

.prodotto-body p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.75;
  flex: 1;
}

.prodotto-card.featured .prodotto-body p { color: rgba(245,240,232,0.75); }
.prodotto-card.featured .link-arrow { color: var(--terra-light); }

/* ——— TRUST ——— */
.trust {
  background: var(--wine);
  padding: 100px 0;
  color: var(--white);
}

.trust-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.trust-text .section-label { color: var(--terra-light); }

.trust-text h2 { color: var(--white); margin-bottom: 1.5rem; }
.trust-text h2 em { color: var(--terra-light); }

.trust-text p {
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  line-height: 1.8;
}

.trust-pillars {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pillar {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.pillar-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(196,112,58,0.2);
  border: 1px solid rgba(196,112,58,0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pillar-icon svg {
  width: 22px;
  height: 22px;
  color: var(--terra-light);
}

.pillar h4 {
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.pillar p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
}

/* ——— CHI SIAMO ——— */
.chi-siamo {
  padding: 100px 0;
  background: var(--white);
}

.storia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.storia-foto {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: contain;
  border-radius: var(--radius-lg);
  display: block;
  background: var(--cream-dark);
}

.storia-text h2 { color: var(--wine); margin-bottom: 0.75rem; }

.storia-sub {
  font-size: 1.05rem;
  color: var(--terra);
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(74,28,44,0.1);
}

.storia-corpo p {
  font-size: 0.97rem;
  color: var(--text-soft);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

.storia-chiusura {
  font-family: var(--font-serif);
  font-size: 1.1rem !important;
  color: var(--wine) !important;
}

/* ——— CONTATTI ——— */
.contatti {
  padding: 100px 0;
  background: var(--cream);
}

.contatti-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contatti-text h2 { color: var(--wine); margin-bottom: 1.25rem; }
.contatti-text h2 em { color: var(--terra); }

.contatti-text > p {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.contatti-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem !important;
  color: var(--wine) !important;
  margin-bottom: 2.5rem !important;
}

.orari {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: var(--cream-dark);
  border-radius: var(--radius-md);
  border: 1px solid rgba(74,28,44,0.08);
}

.orari h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1rem;
  font-family: var(--font-sans);
}

.orari-grid { display: flex; flex-direction: column; gap: 0.6rem; }

.orario-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-soft);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(74,28,44,0.06);
}
.orario-row:last-child { border-bottom: none; padding-bottom: 0; }
.orario-row.chiuso { color: var(--text-muted); }

.contatti-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contatti-ctas .btn { justify-content: center; }

.mappa-iframe {
  width: 100%;
  aspect-ratio: 4/5;
  border: none;
  border-radius: var(--radius-lg);
  display: block;
  box-shadow: var(--shadow-md);
}

/* ——— FOOTER ——— */
.site-footer {
  background: var(--wine-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 30px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}

.footer-brand a {
  display: inline-block;
}

.footer-brand p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.footer-social a:hover { background: var(--terra); }
.footer-social svg { width: 18px; height: 18px; color: rgba(255,255,255,0.8); }

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer-bottom a:hover { color: var(--white); }

/* ——— SCROLL ANIMATIONS ——— */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE — Mobile first corrections
   Breakpoints: 1024 / 768 / 480 / 360
   ============================================ */

/* ——— Tablet landscape (max 1024px) ——— */
@media (max-width: 1024px) {
  .prodotti-grid       { grid-template-columns: repeat(2, 1fr); }
  .trust-inner         { gap: 3rem; }
  .storia-grid         { gap: 3rem; }
  .contatti-inner      { gap: 3rem; }
}

/* ——— Tablet portrait / Mobile large (max 768px) ——— */
@media (max-width: 768px) {

  /* Tipografia */
  h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  h3 { font-size: clamp(1.2rem, 4vw, 1.6rem); }

  /* ——— Navbar ——— */
  .logo-img { height: 42px; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--wine-dark);
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 24px 2rem;
    gap: 0;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s ease, opacity 0.35s ease;
    border-top: 1px solid rgba(255,255,255,0.08);
    overflow-y: auto;
    z-index: 99;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li {
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
  }

  .nav-links li:last-child { border-bottom: none; }

  .nav-cta {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    padding: 14px 24px !important;
    border-radius: var(--radius-sm);
  }

  /* ——— Bottoni: permettere wrap su mobile ——— */
  .btn { white-space: normal; text-align: center; }

  /* ——— Hero ——— */
  .hero-content  { padding: 110px 20px 80px; }
  .hero-sub      { font-size: 1rem; max-width: 100%; }
  .hero-ctas     { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }

  /* ——— Intro ——— */
  .intro-brand  { padding: 60px 0; }
  .intro-inner  { flex-direction: column; gap: 1.5rem; }
  .intro-line   { width: 40px; height: 3px; }
  .intro-title  { font-size: clamp(1.5rem, 5vw, 2rem); }

  /* ——— Prodotti ——— */
  .prodotti        { padding: 70px 0; }
  .prodotti-grid   { grid-template-columns: 1fr; }
  .section-header  { margin-bottom: 2.5rem; }

  /* ——— Trust ——— */
  .trust       { padding: 70px 0; }
  .trust-inner { grid-template-columns: 1fr; gap: 3rem; }

  /* ——— Chi siamo ——— */
  .chi-siamo    { padding: 70px 0; }
  .storia-grid  { grid-template-columns: 1fr; }
  .storia-media { display: none; }

  /* ——— Contatti ——— */
  .contatti       { padding: 70px 0; }
  .contatti-inner { grid-template-columns: 1fr; gap: 0; }
  .contatti-map   { display: none; }

  .orario-row {
    flex-direction: column;
    gap: 2px;
    padding-bottom: 0.75rem;
  }

  .orario-row span:last-child {
    font-size: 0.85rem;
    color: var(--text-muted);
  }

  .contatti-ctas { margin-top: 0.5rem; }

  /* ——— Footer ——— */
  .footer-inner  { flex-direction: column; gap: 2rem; align-items: flex-start; }
  .footer-bottom { flex-direction: column; text-align: center; align-items: center; gap: 0.5rem; }
}

/* ——— Mobile small (max 480px) ——— */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  h1 { font-size: clamp(1.75rem, 7vw, 2.2rem); }
  h2 { font-size: clamp(1.4rem, 5.5vw, 1.8rem); }

  .hero-content  { padding: 90px 16px 70px; }
  .hero-eyebrow  { font-size: 0.65rem; letter-spacing: 0.12em; }

  .logo-img { height: 38px; }

  .prodotti    { padding: 56px 0; }
  .trust       { padding: 56px 0; }
  .chi-siamo   { padding: 56px 0; }
  .contatti    { padding: 56px 0; }
  .intro-brand { padding: 48px 0; }

  .prodotto-body     { padding: 1.25rem; }
  .prodotto-body h3  { font-size: 1.2rem; }

  .trust-pillars { gap: 1.5rem; }
  .pillar-icon   { width: 38px; height: 38px; }

  .orari { padding: 1.25rem; }

  .contatti-ctas .btn { padding: 12px 16px; font-size: 0.85rem; }

  .site-footer { padding: 48px 0 24px; }
  .footer-logo { height: 38px; }
  .footer-inner { gap: 1.5rem; }
}

/* ——— Mobile XS (max 360px) ——— */
@media (max-width: 360px) {
  .container { padding: 0 12px; }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.35rem; }

  .hero-content { padding: 80px 12px 60px; }
  .hero-sub     { font-size: 0.95rem; }

  .nav-container { padding: 0 12px; }
  .nav-links     { padding: 0 12px 2rem; }

  .prodotto-body { padding: 1rem; }
  .contatti-ctas .btn { font-size: 0.82rem; padding: 11px 12px; }
}

/* ——— Blocca scroll body quando nav mobile è aperta ——— */
body.nav-open { overflow: hidden; }
