/* ===================================================
   CSS RESET & NORMALIZATION
   =================================================== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
  min-height: 100%;
}
body {
  min-height: 100vh;
  line-height: 1.6;
  font-family: 'Roboto', Arial, sans-serif;
  color: #4A3221;
  background-color: #FAF7F3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ol, ul {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}
input, button, textarea, select {
  font-family: inherit;
  font-size: 1em;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}
button {
  cursor: pointer;
}

/* SCROLLBAR STYLES */
::-webkit-scrollbar {
  width: 10px;
  background: #EAE5DF;
}
::-webkit-scrollbar-thumb {
  background: #D1B295;
  border-radius: 5px;
}

/* ===================================================
   BRAND COLORS AS CSS VARIABLES
   =================================================== */
:root {
  --primary: #4A3221;      /* Marrone scuro */
  --secondary: #D1B295;    /* Beige caldo */
  --accent: #EAE5DF;       /* Avorio chiaro */
  --background: #FAF7F3;
  --white: #fff;
  --black: #23180f;
  --shadow: rgba(74, 50, 33, 0.10);
  --shadow-lg: 0 4px 20px 0 rgba(74,50,33,0.11);
  --radius: 14px;
  --radius-card: 18px;
  --cta-gradient: #4A3221;
}

/* ===================================================
   TYPOGRAPHY - GEOMETRIC & STRUCTURED
   =================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Roboto:wght@400;700&display=swap');

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.13;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}
h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
h4 {
  font-size: 1.25rem;
}
h5, h6 {
  font-size: 1rem;
}

p, li, ul, ol, a, span, label {
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--primary);
  font-size: 1rem;
}
p {
  margin-bottom: 16px;
}
strong {
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.005em;
}

/* Visual hierarchy for headings and callouts */
.section h2 {
  font-size: 2rem;
  border-left: 6px solid var(--secondary);
  padding-left: 18px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

/* Geometric underline for h1 in .hero section */
.hero h1 {
  position: relative;
  padding-bottom: 18px;
}
.hero h1:after {
  content: '';
  display: block;
  width: 80px;
  height: 5px;
  background: var(--secondary);
  border-radius: 0 0 7px 7px;
  margin-top: 12px;
}

/* ===================================================
   LAYOUT & GEOMETRIC STRUCTURED SPACING
   =================================================== */
.container {
  width: 100%;
  max-width: 1212px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 16px var(--shadow);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 20px;
  padding: 24px 20px;
  position: relative;
  min-width: 250px;
  flex: 1 1 320px;
  transition: box-shadow 0.2s;
  border: 2px solid var(--accent);
}
.card:hover {
  box-shadow: 0 4px 20px var(--shadow-lg);
  border-color: var(--secondary);
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 28px;
  margin-bottom: 20px;
  background: var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--shadow);
  border-left: 6px solid var(--secondary);
  font-size: 1.1rem;
  transition: box-shadow 0.2s, border-color 0.18s;
}
.testimonial-card:hover {
  box-shadow: 0 4px 22px var(--shadow-lg);
  border-color: var(--primary);
}
.testimonial-card p {
  color: #311D10;
}
.testimonial-card span {
  color: var(--primary);
  font-size: 0.97rem;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: var(--accent);
  border-radius: var(--radius);
  min-width: 240px;
  box-shadow: 0 2px 10px var(--shadow);
}

/* Custom: features in index */
.features ul,
.services-list ul,
.service-advantages ul,
.catalog-preview ul,
.catalog-filter ul,
.collections ul,
.unique-selling ul,
.value-points ul,
.about-mission ul,
.history ul,
.contact-info ul,
.contact-message ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
}
.features ul li,
.services-list ul li,
.service-advantages ul li,
.collections ul li,
.unique-selling ul li,
.value-points ul li,
.about-mission ul li,
.history ul li,
.catalog-preview ul li,
.catalog-filter ul li,
.contact-info ul li,
.contact-message ul li {
  flex: 1 1 260px;
  margin-bottom: 20px;
  background: var(--accent);
  border-radius: var(--radius);
  padding: 18px 16px 16px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 215px;
  justify-content: flex-start;
  align-items: flex-start;
}
.features ul li img,
.services-list ul li img,
.service-advantages ul li img,
.collections ul li img {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 6px var(--shadow);
  object-fit: contain;
}
.features ul li strong,
.services-list ul li strong,
.collections ul li strong {
  font-size: 1.18rem;
  margin-bottom: 6px;
  color: var(--primary);
  font-family: 'Montserrat', Arial, sans-serif;
}

/* Cards on hover pop slightly */
.features ul li:hover,
.services-list ul li:hover,
.service-advantages ul li:hover {
  box-shadow: 0 6px 26px var(--shadow-lg);
  background: var(--white);
  border-left: 4px solid var(--secondary);
  transition: box-shadow 0.15s, background 0.13s ease;
}

/* About - Timeline (Geometric marker) */
.timeline ul {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}
.timeline ul li {
  position: relative;
  padding-left: 36px;
  font-size: 1.06rem;
  color: var(--primary);
}
.timeline ul li:before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 18px;
  height: 18px;
  background: var(--secondary);
  border-radius: 5px;
  border: 3px solid var(--primary);
  box-sizing: border-box;
}

.founders-note {
  margin-top: 30px;
  padding: 16px 22px;
  background: var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 1px 7px var(--shadow);
  border-left: 5px solid var(--secondary);
}
.founders-note h3 {
  margin-bottom: 8px;
}

/* CTA Section */
.cta, .cta section {
  background: var(--secondary);
  color: var(--primary);
  padding: 36px 0;
  border-radius: var(--radius);
  box-shadow: 0 2px 14px var(--shadow);
}
.cta .content-wrapper {
  align-items: center;
  text-align: center;
}
.cta h2, .cta p {
  color: var(--primary);
}

/* Catalog preview cards/list */
.catalog-preview ul {
  margin-bottom: 28px;
}
.catalog-preview ul li {
  background: var(--accent);
  border-radius: 10px;
  padding: 11px 18px;
}

/* Footer */
footer {
  background: var(--primary);
  color: var(--accent);
  padding: 40px 0 18px 0;
}
footer .container {
  flex-direction: column;
  align-items: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--secondary);
  font-size: 1rem;
  font-family: 'Roboto', Arial, sans-serif;
  transition: color 0.18s;
  font-weight: 500;
}
.footer-links a:hover {
  color: #fff;
}
.brand-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.97rem;
  margin-top: 13px;
}
.brand-footer img {
  width: 32px;
  height: 32px;
}

/* ===================================================
   HEADER, NAVBAR, AND MOBILE MENU
   =================================================== */
header {
  width: 100%;
  background: var(--white);
  box-shadow: 0 2px 13px var(--shadow);
  position: sticky;
  top: 0; left: 0;
  z-index: 100;
  display: flex;
  flex-shrink: 0;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}
.logo img {
  height: 48px;
  width: auto;
  display: block;
}
.main-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.main-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--primary);
  padding: 10px 6px;
  border-radius: 7px;
  transition: color 0.18s, background 0.15s;
  position: relative;
}
.main-nav a.active,
.main-nav a:hover {
  color: var(--secondary);
  background: var(--accent);
}
.main-nav .cta-primary {
  background: var(--secondary);
  color: var(--primary);
  border-radius: 8px;
  font-weight: 900;
  padding: 10px 20px;
  margin-left: 9px;
  box-shadow: 0 2px 9px var(--shadow);
  transition: background 0.18s, color 0.18s;
}
.main-nav .cta-primary:hover,
.main-nav .cta-primary.active {
  background: var(--primary);
  color: var(--accent);
}

/* Hamburger Menu Button */
.mobile-menu-toggle {
  display: none;
  background: var(--secondary);
  color: var(--primary);
  font-size: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: none;
  align-items: center;
  justify-content: center;
  margin-left: 22px;
  transition: background 0.18s;
  z-index: 99;
}
.mobile-menu-toggle:hover {
  background: var(--primary);
  color: var(--accent);
}

/* MOBILE MENU OVERLAY */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: 0;
  background: rgba(74,50,33,0.97);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 14px 0 0 0;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.68, -0.3, 0.32, 1.3);
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}
.mobile-menu-close {
  background: var(--secondary);
  color: var(--primary);
  font-size: 2rem;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 12px;
  margin-left: 20px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.mobile-menu-close:hover {
  background: var(--primary);
  color: var(--accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 40px;
  margin-top: 30px;
  width: 100%;
}
.mobile-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--accent);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: none;
  padding: 12px 0;
  border-radius: 4px;
  transition: background 0.15s, color 0.13s;
}
.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--secondary);
  color: var(--primary);
}


/*
   Hide Desktop Main Nav on mobile, show .mobile-menu-toggle
   --------------------------------------------------------
*/
@media (max-width: 991px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}
@media (min-width: 992px) {
  .mobile-menu {
    display: none !important;
  }
}


/* ===================================================
   CTA BUTTONS & INTERACTIVE ELEMENTS
   =================================================== */
.cta-primary, .cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.07rem;
  font-weight: 800;
  padding: 14px 30px;
  border-radius: 10px;
  margin-top: 12px;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
  border: none;
  text-transform: none;
  box-shadow: 0 2px 8px var(--shadow);
  cursor: pointer;
  transition: background 0.18s, color 0.14s, box-shadow 0.17s;
  outline: none;
}
.cta-primary {
  background: var(--secondary);
  color: var(--primary);
  border: 2px solid var(--secondary);
}
.cta-primary:hover, .cta-primary:focus {
  background: var(--primary);
  color: var(--accent);
  border-color: var(--primary);
}
.cta-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--secondary);
}
.cta-secondary:hover, .cta-secondary:focus {
  background: var(--secondary);
  color: var(--primary);
}

/* ===================================================
   HERO SECTIONS
   =================================================== */
.hero {
  padding: 60px 0 44px 0;
  background: var(--accent);
  border-radius: 0 0 38px 38px;
  box-shadow: 0 3px 20px var(--shadow);
  margin-bottom: 60px;
}
.hero .container {
  align-items: center;
  justify-content: center;
}
.hero .content-wrapper {
  align-items: center;
  text-align: center;
}
.hero p {
  color: #733e23;
  font-size: 1.14rem;
}

/* ===================================================
   FORMS (used in preventivo, contatti)
   =================================================== */
input, textarea {
  border: 2px solid var(--secondary);
  border-radius: var(--radius);
  padding: 14px 12px;
  background: var(--accent);
  margin-bottom: 16px;
  font-size: 1rem;
  color: var(--primary);
  outline: none;
  transition: border-color 0.15s, background 0.17s;
}
input:focus, textarea:focus {
  border-color: var(--primary);
  background: #fff;
}

form label {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--primary);
  display: block;
}
form .cta-primary {
  margin-top: 8px;
}

/*
   Cookie Consent Banner (Fixed bottom)
   -------------------------------------
*/
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--primary);
  color: var(--accent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 22px 18px;
  z-index: 9998;
  box-shadow: 0 -1px 12px var(--shadow-lg);
  justify-content: space-between;
  gap: 18px;
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  transition: transform 0.32s, opacity 0.25s;
  font-size: 1rem;
}
.cookie-banner.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.cookie-banner-message {
  flex: 1 1 300px;
  font-size: 1.04rem;
}
.cookie-banner-actions {
  display: flex;
  gap: 13px;
  align-items: center;
}
.cookie-btn {
  background: var(--secondary);
  color: var(--primary);
  font-family: 'Montserrat', Arial, sans-serif;
  border-radius: 8px;
  border: none;
  font-weight: 800;
  font-size: 1rem;
  padding: 11px 24px;
  margin: 0;
  transition: background 0.18s, color 0.17s, border-color 0.14s;
  box-shadow: 0 1px 8px var(--shadow);
}
.cookie-btn.settings {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--primary);
  color: var(--accent);
  border-color: var(--primary);
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: var(--secondary);
  color: var(--primary);
}

/* -------------------
   Cookie Preferences Modal
   ------------------- */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(74,50,33,0.88);
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s;
}
.cookie-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal {
  background: var(--accent);
  color: var(--primary);
  min-width: 360px;
  max-width: 94vw;
  padding: 36px 34px 28px 34px;
  border-radius: 20px;
  box-shadow: 0 8px 32px var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-modal h2 {
  font-size: 1.42rem;
  margin-bottom: 12px;
}
.cookie-category {
  display: flex;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 10px;
}
.cookie-category label {
  font-weight: 700;
  min-width: 125px;
}
.cookie-toggle {
  width: 45px;
  height: 24px;
  border-radius: 12px;
  background: #e4dacb;
  border: 2px solid var(--secondary);
  position: relative;
  cursor: pointer;
  margin-right: 8px;
  display: flex;
  align-items: center;
  transition: background 0.18s;
}
.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cookie-toggle span {
  background: var(--secondary);
  width: 21px;
  height: 21px;
  border-radius: 50%;
  position: absolute;
  left: 2px; top: 2px;
  transition: left 0.18s, background 0.14s;
}
.cookie-toggle input:checked + span {
  background: var(--primary);
  left: 20px;
}
.cookie-modal .cookie-btn {
  margin-top: 18px;
}
.cookie-modal .close-cookie-modal {
  position: absolute;
  top: 12px; right: 18px;
  background: transparent;
  color: var(--primary);
  font-size: 2.1rem;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s;
  padding: 0 8px;
}
.close-cookie-modal:hover {
  background: var(--accent);
  color: var(--secondary);
}

/* Essential cookies - greyed out toggle, always checked */
.cookie-category.essential .cookie-toggle {
  background: #cfc1ae;
  border: 2px solid var(--accent);
  pointer-events: none;
}
.cookie-category.essential label {
  color: #9f7f56;
}

/* ===================================================
   RESPONSIVENESS
   =================================================== */
@media (max-width: 768px) {
  html, body {
    font-size: 97%;
  }
  .container {
    padding: 0 7vw;
  }
  .section {
    padding: 30px 4vw;
    margin-bottom: 38px;
  }
  .hero {
    padding: 35px 0 21px 0;
    margin-bottom: 36px;
    border-radius: 0 0 24px 24px;
  }
  .card-container, .content-grid, .features ul,
  .services-list ul, .service-advantages ul, .collections ul,
  .catalog-preview ul, .unique-selling ul, .value-points ul,
  .about-mission ul, .history ul, .policy ul, .contact-info ul, .contact-message ul {
    flex-direction: column;
    gap: 15px;
  }
  .testimonial-card {
    padding: 16px 10px;
    margin-bottom: 18px;
  }
  .brand-footer {
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }
  .text-image-section {
    flex-direction: column;
    gap: 22px;
  }
}
/*
   Responsive: compact nav, footer, button size
*/
@media (max-width: 480px) {
  .cta-primary, .cta-secondary {
    font-size: 1rem;
    padding: 12px 13px;
  }
  .footer-links {
    gap: 8px;
    font-size: .97rem;
  }
  .policy ul li {
    font-size: 0.97rem;
  }
}

/* ===================================================
   ANIMATIONS & MICRO-INTERACTIONS
   =================================================== */
.section, .card, .testimonial-card, .feature-item, .about-mission ul li, .policy, .cookie-banner, .brand-footer {
  transition: box-shadow 0.18s cubic-bezier(.81,-0.21,.26,1.18), background 0.18s, border-color 0.14s;
}
.cta-primary, .cta-secondary, .cookie-btn {
  transition: background 0.15s, color 0.15s, border-color 0.12s, box-shadow 0.13s;
}
.testimonial-card {
  transition: box-shadow 0.22s cubic-bezier(.7,-0.14,1,1.01), border-color 0.18s;
}
.mobile-menu {
  transition: transform 0.35s cubic-bezier(0.68, -0.3, 0.32, 1.3), opacity 0.25s;
}


/* ===================================================
   MISCELLANEA
   =================================================== */
.policy h1, .policy h2 {
  margin-bottom: 14px;
  font-family: 'Montserrat', Arial, sans-serif;
}
.policy ul {
  margin-left: 16px;
  margin-bottom: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.policy ul li {
  line-height: 1.7;
  font-size: 1rem;
}

section.thank-you, .thank-you {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  padding: 60px 0;
  border-radius: var(--radius-card);
  box-shadow: 0 2px 16px var(--shadow);
}
.thank-you h1 {
  font-size: 2.2rem;
  margin-bottom: 17px;
}

/*
   Utility: Hide visually
*/
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/*
   For better focus on links and buttons (a11y)
*/
a, button, .cta-primary, .cta-secondary {
  outline: none;
}
a:focus, button:focus, .cta-primary:focus, .cta-secondary:focus {
  box-shadow: 0 0 0 2.5px var(--secondary);
  outline: none;
}
