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

:root {
  --cream:    #fdf6ec;
  --wheat:    #f0ddb8;
  --brown:    #6b3f1e;
  --dark:     #2c1a0e;
  --amber:    #c8860a;
  --gold:     #e4a82e;
  --text:     #3d2409;
  --text-sm:  #7a5c3a;
  --white:    #ffffff;
  --shadow:   rgba(107,63,30,.15);

  --font-title: 'Playfair Display', Georgia, serif;
  --font-body:  'Lato', Arial, sans-serif;

  --nav-h: 72px;
  --radius: 8px;
  --transition: .3s ease;
}

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

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

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

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.25; color: var(--dark); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
p  { max-width: 70ch; }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: .6rem;
}

/* ===== LAYOUT ===== */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 90px 0; }
.section--dark  { background: var(--dark); color: var(--wheat); }
.section--dark h2,
.section--dark h3 { color: var(--wheat); }
.section--wheat { background: var(--wheat); }
.section--alt   { background: #fef9f2; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .03em;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--shadow); }
.btn-primary { background: var(--amber); color: var(--white); border-color: var(--amber); }
.btn-primary:hover { background: var(--brown); border-color: var(--brown); }
.btn-outline { background: transparent; color: var(--amber); border-color: var(--amber); }
.btn-outline:hover { background: var(--amber); color: var(--white); }
.btn-white   { background: var(--white); color: var(--brown); border-color: var(--white); }
.btn-white:hover { background: var(--wheat); border-color: var(--wheat); }

/* ===== NAVBAR ===== */
#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--white);
  box-shadow: 0 2px 16px var(--shadow);
  display: flex;
  align-items: center;
  transition: background var(--transition);
}
.nav-inner {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--brown);
  font-weight: 700;
}
.nav-logo span { color: var(--amber); }
.nav-logo img { width: 36px; height: 36px; }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .04em;
  color: var(--text);
  position: relative;
  padding-bottom: 3px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--amber);
  transition: width var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--amber); }

.nav-cta { margin-left: 1rem; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--brown);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--white);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.mobile-nav.open { opacity: 1; pointer-events: all; }
.mobile-nav a {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--dark);
}
.mobile-nav a.active { color: var(--amber); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .45;
  transition: transform 8s ease;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44,26,14,.85) 0%, rgba(107,63,30,.4) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  max-width: 720px;
}
.hero-content h1 { color: var(--white); margin-bottom: 1.2rem; }
.hero-content h1 em { color: var(--gold); font-style: normal; }
.hero-content p { font-size: 1.15rem; color: rgba(255,255,255,.88); margin-bottom: 2rem; max-width: 55ch; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  font-size: .8rem;
  letter-spacing: .1em;
  text-align: center;
  animation: bounce 2s infinite;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,.4);
  margin: .6rem auto 0;
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }

/* ===== INTRO STRIP ===== */
.intro-strip {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 0;
  text-align: center;
  background: var(--brown);
  color: var(--wheat);
}
.intro-strip__item {
  padding: 2.2rem 1.5rem;
  border-right: 1px solid rgba(255,255,255,.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.intro-strip__item:last-child { border-right: none; }
.intro-strip__icon { font-size: 2rem; }
.intro-strip__item strong { font-family: var(--font-title); font-size: 1.05rem; color: var(--gold); }
.intro-strip__item span { font-size: .9rem; opacity: .85; }

/* ===== ABOUT (HOME) ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 12px 12px 0 var(--wheat);
}
.about-img img { width: 100%; height: 420px; object-fit: cover; }
.about-text p { margin-bottom: 1.2rem; color: var(--text-sm); }
.about-text p:last-of-type { margin-bottom: 1.8rem; }

/* ===== PRODUCT CARDS ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px var(--shadow); }
.product-card__img { width: 100%; height: 220px; object-fit: cover; }
.product-card__body { padding: 1.4rem; }
.product-card__body h3 { margin-bottom: .5rem; }
.product-card__body p { font-size: .9rem; color: var(--text-sm); max-width: 100%; }
.product-card__tag {
  display: inline-block;
  margin-top: .8rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 20px;
  padding: .2rem .8rem;
}

/* ===== SECTION HEADER ===== */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { margin: .8rem auto 0; color: var(--text-sm); }

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 2rem;
  margin-top: 2rem;
}
.testimonial-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 2rem;
}
.testimonial-card__stars { color: var(--gold); font-size: 1.1rem; margin-bottom: .8rem; }
.testimonial-card p { font-size: .95rem; color: rgba(255,255,255,.85); margin: 0; max-width: 100%; font-style: italic; }
.testimonial-card__author { margin-top: 1.2rem; font-weight: 700; color: var(--gold); font-size: .9rem; }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--brown) 0%, var(--dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 80px 1.5rem;
}
.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p { margin: 0 auto 2rem; color: rgba(255,255,255,.82); font-size: 1.05rem; }

/* ===== CHI SIAMO PAGE ===== */
.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--brown) 100%);
  color: var(--white);
  padding: 100px 0 80px;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 1rem; }
.page-hero p { color: rgba(255,255,255,.82); margin: 0 auto; font-size: 1.1rem; max-width: 55ch; }

.story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}
.story-block:last-child { margin-bottom: 0; }
.story-block--reverse { direction: rtl; }
.story-block--reverse > * { direction: ltr; }
.story-block img { width: 100%; height: 380px; object-fit: cover; border-radius: var(--radius); box-shadow: 0 8px 32px var(--shadow); }
.story-block__text p { color: var(--text-sm); margin-bottom: 1rem; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.value-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 16px var(--shadow);
}
.value-card__icon { font-size: 2.2rem; margin-bottom: 1rem; }
.value-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.value-card p { font-size: .88rem; color: var(--text-sm); max-width: 100%; }

/* ===== SERVIZI / PRODOTTI PAGE ===== */
.services-intro { text-align: center; margin-bottom: 4rem; }
.services-intro p { margin: .8rem auto 0; color: var(--text-sm); }

.category-block { margin-bottom: 5rem; }
.category-block h2 { margin-bottom: 1.5rem; padding-bottom: .6rem; border-bottom: 3px solid var(--amber); display: inline-block; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 3px 16px var(--shadow);
  transition: transform var(--transition);
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card img { width: 100%; height: 200px; object-fit: cover; }
.cat-card__body { padding: 1.2rem; }
.cat-card__body h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.cat-card__body p { font-size: .88rem; color: var(--text-sm); max-width: 100%; }

/* ===== GALLERY PAGE ===== */
.gallery-grid {
  columns: 3;
  column-gap: 1rem;
  margin-top: 2.5rem;
}
.gallery-grid figure {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.gallery-grid img { width: 100%; display: block; transition: transform .4s ease; }
.gallery-grid figure:hover img { transform: scale(1.04); }
.gallery-grid figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(44,26,14,.85));
  color: var(--white);
  padding: 1.2rem .8rem .6rem;
  font-size: .85rem;
  transform: translateY(100%);
  transition: transform var(--transition);
}
.gallery-grid figure:hover figcaption { transform: translateY(0); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); }
.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* ===== CONTACT PAGE ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h2 { margin-bottom: 1.5rem; }
.contact-detail {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.8rem;
}
.contact-detail__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-detail__text strong { display: block; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: var(--amber); margin-bottom: .2rem; }
.contact-detail__text a { color: var(--text); }
.contact-detail__text a:hover { color: var(--amber); }

.hours-table { width: 100%; margin-top: .4rem; border-collapse: collapse; }
.hours-table td { padding: .3rem 0; font-size: .93rem; }
.hours-table td:first-child { font-weight: 700; width: 120px; }
.hours-table tr.closed td { color: #b0856a; }

.map-wrap {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
}
.map-wrap iframe { display: block; width: 100%; height: 280px; border: 0; }

/* Contact form */
.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 6px 28px var(--shadow);
}
.contact-form-wrap h3 { margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 700; margin-bottom: .4rem; color: var(--text); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid #e0cdb8;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--amber); }
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ===== 404 PAGE ===== */
.error-page {
  min-height: calc(100vh - var(--nav-h) - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.error-page__num { font-family: var(--font-title); font-size: clamp(6rem,18vw,12rem); color: var(--amber); line-height: 1; opacity: .25; }
.error-page h2 { margin: -.5rem 0 1rem; }
.error-page p { color: var(--text-sm); margin: 0 auto 2rem; }

/* ===== FOOTER ===== */
footer {
  background: var(--dark);
  color: rgba(255,255,255,.75);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand p { font-size: .9rem; margin-top: .8rem; max-width: 36ch; }
.footer-logo {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.footer-logo span { color: var(--gold); }
.footer-col h4 { color: var(--white); font-family: var(--font-title); margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul li a { font-size: .9rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom {
  text-align: center;
  padding: 1.2rem 0;
  font-size: .82rem;
  color: rgba(255,255,255,.45);
}

/* ===== WHATSAPP FLOAT ===== */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,.45);
  transition: transform var(--transition), box-shadow var(--transition);
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 10px 32px rgba(37,211,102,.6); }
.wa-float svg { width: 30px; height: 30px; fill: var(--white); }

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .products-grid      { grid-template-columns: repeat(2,1fr); }
  .testimonials-grid  { grid-template-columns: 1fr; }
  .about-grid         { grid-template-columns: 1fr; gap: 2.5rem; }
  .story-block        { grid-template-columns: 1fr; gap: 2rem; }
  .story-block--reverse { direction: ltr; }
  .values-grid        { grid-template-columns: repeat(2,1fr); }
  .contact-grid       { grid-template-columns: 1fr; }
  .footer-grid        { grid-template-columns: 1fr 1fr; }
  .gallery-grid       { columns: 2; }
}

@media (max-width: 640px) {
  .products-grid      { grid-template-columns: 1fr; }
  .values-grid        { grid-template-columns: 1fr; }
  .footer-grid        { grid-template-columns: 1fr; }
  .gallery-grid       { columns: 1; }
  .intro-strip        { grid-template-columns: 1fr; }
  .intro-strip__item  { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); }
  .hero-btns          { flex-direction: column; }
  .form-row           { grid-template-columns: 1fr; }
  .nav-links, .nav-cta { display: none; }
  .hamburger          { display: flex; }
  .mobile-nav         { display: flex; }
}
