/* ==========================================================================
   1060 — Miele Ticinese di montagna
   ========================================================================== */

:root {
  --color-ink: #2c1e0f;
  --color-honey: #d98e2b;
  --color-honey-dark: #b06e15;
  --color-cream: #fdf6e8;
  --color-cream-2: #f6ead0;
  --color-white: #ffffff;
  --color-success-bg: #e7f5e6;
  --color-success-text: #2e6b2a;
  --color-error-bg: #fbe7e7;
  --color-error-text: #a32a2a;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(44, 30, 15, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-cream);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--color-honey-dark); }

.container {
  width: min(1080px, 92%);
  margin-inline: auto;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  backdrop-filter: none;
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.scrolled {
  background: rgba(44, 30, 15, 0.55);
  backdrop-filter: blur(6px);
}

.navbar {
  width: min(1080px, 92%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  height: 68px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--font-menu, var(--font-body));
  color: var(--color-white);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  font-size: 0.92rem;
}

.nav-links a:hover { color: var(--color-honey); }

.nav-cta {
  background: var(--color-honey);
  color: var(--color-ink) !important;
  padding: 8px 18px;
  border-radius: 0;
}

.nav-lang {
  position: relative;
  margin-left: 8px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 4px;
  color: var(--color-white);
  cursor: pointer;
  transition: color 0.15s ease;
}

.lang-toggle:hover,
.lang-toggle[aria-expanded="true"] { color: var(--color-honey); }

.lang-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: rgba(44, 30, 15, 0.97);
  box-shadow: var(--shadow);
  display: none;
}

.lang-menu.open { display: block; }

.lang-menu a {
  display: block;
  font-family: var(--font-menu, var(--font-body));
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 20px;
  white-space: nowrap;
}

.lang-menu a:hover,
.lang-menu a.nav-lang-attiva { color: var(--color-honey); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--color-white);
  display: block;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  color: var(--color-white);
  text-align: center;
  padding-bottom: 12vh;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(44,30,15,0.55) 0%, rgba(44,30,15,0.35) 45%, rgba(44,30,15,0.75) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 20px;
  max-width: 960px;
}

.hero h1 {
  font-size: clamp(1.6rem, 4.4vw, 3.4rem);
  margin-bottom: 0.3em;
  white-space: nowrap;
}

.hero-sub {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  margin: 0 0 0.2em;
}

.hero-tag {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-honey);
  margin: 0 0 1.6em;
}

/* ---------- Scia di api al passaggio del mouse (solo hero, desktop) ---------- */

.bee-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 59;
  will-change: transform, opacity;
  animation: bee-trail-fade 0.85s ease-out forwards;
}

.bee-trail svg { width: 100%; height: 100%; display: block; }

@keyframes bee-trail-fade {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(var(--bee-scale, 1)) rotate(var(--bee-rot, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(calc(var(--bee-scale, 1) * 0.4)) rotate(var(--bee-rot, 0deg))
      translateY(-22px);
  }
}

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

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 0;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--color-honey);
  color: var(--color-ink);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(44, 30, 15, 0.2);
}

/* ---------- Sections ---------- */

.section {
  padding: 96px 0;
}

.seo-intro {
  padding: 56px 0;
  text-align: center;
  background: var(--color-cream-2);
}

.seo-intro h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin-bottom: 0.4em;
}

.seo-intro p {
  max-width: 680px;
  margin: 0 auto;
  color: #6b5a3e;
  font-size: 1.05rem;
}

.chi-siamo { background: var(--color-white); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.chi-siamo-img {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.chi-siamo-img img {
  border-radius: 0;
  box-shadow: var(--shadow);
  object-fit: cover;
  width: 100%;
  height: 260px;
}

.chi-siamo-text p { font-size: 1.05rem; }

.highlight {
  background: var(--color-cream-2);
  border-left: 4px solid var(--color-honey);
  padding: 16px 20px;
  border-radius: 0;
}

/* ---------- Shop ---------- */

.shop { background: var(--color-cream); }

.shop h2 { text-align: center; margin-bottom: 0.8em; }

.shop-info {
  background: var(--color-white);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 28px 32px;
  max-width: 640px;
  margin: 0 auto 32px;
}

.shop-info ul {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}

.shop-note {
  font-size: 0.92rem;
  color: #6b5a3e;
  margin: 4px 0;
}

.valori-titolo {
  font-size: 1.15rem;
  font-family: var(--font-body);
  font-weight: 700;
  margin: 0 0 16px;
}

.btn-valori {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 22px;
  border-radius: 0;
  border: 1px solid var(--color-honey-dark);
  background: none;
  color: var(--color-honey-dark);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-valori:hover {
  background: var(--color-honey-dark);
  color: var(--color-white);
}

.valori-fonte {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: #9a8a6c;
}

.valori-fonte a {
  color: #9a8a6c;
  text-decoration: underline;
}

.valori-nutrizionali {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.valori-nutrizionali th,
.valori-nutrizionali td {
  text-align: left;
  font-weight: 400;
  padding: 8px 0;
  border-bottom: 1px solid #f0e3c8;
}

.valori-nutrizionali td {
  text-align: right;
  font-weight: 600;
}

.valori-nutrizionali tr:last-child th,
.valori-nutrizionali tr:last-child td {
  border-bottom: none;
}

.valori-nutrizionali .valori-sotto th,
.valori-nutrizionali .valori-sotto td {
  padding-left: 16px;
  color: #6b5a3e;
  font-weight: 400;
}

/* ---------- Popup valori nutrizionali ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(44, 30, 15, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay[hidden] { display: none; }

.modal-box {
  position: relative;
  background: var(--color-white);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 36px 32px 28px;
  max-width: 460px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 0;
  background: none;
  color: var(--color-ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { color: var(--color-honey-dark); }

.order-form {
  background: var(--color-white);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 32px;
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.form-row { display: grid; gap: 6px; }

.form-row label {
  font-weight: 700;
  font-size: 0.95rem;
}

.req { color: var(--color-error-text); }

.order-form input,
.order-form select,
.order-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #e3d5b8;
  border-radius: 0;
  background: var(--color-cream);
  color: var(--color-ink);
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
  outline: none;
  border-color: var(--color-honey);
  background: var(--color-white);
}

.order-form .btn { justify-self: start; }

/* Campo trappola per bot spam: invisibile e non raggiungibile da tastiera per una
   persona, ma i programmi automatici lo trovano e lo compilano quasi sempre */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  max-width: 640px;
  margin: 0 auto 24px;
  padding: 14px 18px;
  border-radius: 0;
  font-weight: 600;
}

.alert-success { background: var(--color-success-bg); color: var(--color-success-text); }
.alert-error { background: var(--color-error-bg); color: var(--color-error-text); }

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

.site-footer {
  background: var(--color-ink);
  color: var(--color-cream-2);
  padding: 28px 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  height: 56px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-credit {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(246, 234, 208, 0.6);
}

.footer-credit a {
  color: rgba(246, 234, 208, 0.75);
  text-decoration: underline;
}

.footer-credit a:hover { color: var(--color-honey); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .chi-siamo-img-2 { margin-top: 0; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 6.6vw; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(44, 30, 15, 0.97);
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 18px;
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-lang {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: center;
  }

  .lang-menu {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    text-align: center;
  }

  .section { padding: 64px 0; }

  .order-form, .shop-info { padding: 24px 20px; }
}
