/* style.css */
:root {
  --primary: #B71C1C;
  --primary-dark: #71181e;
  --secondary: #FFC107;
  --bg: #F5F5F5;
  --text: #111318;
  --muted: rgba(17, 19, 24, .72);
  --card: #ffffff;
  --stroke: rgba(17, 19, 24, .10);
  --shadow: 0 10px 30px rgba(0, 0, 0, .12);
  --radius: 16px;
}

* {
  box-sizing: border-box
}

[hidden] {
  display: none !important;
}

/* FIX scroll + sticky:
   Evita html/body bloccati a 100% height che in alcuni browser mobile
   causa "stutter"/freeze con sticky + backdrop-filter */
html {
  height: 100%;
}

body {
  min-height: 100%;
}

body {
  margin: 0;
  position: relative;
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.35;
  text-rendering: optimizeLegibility;
}

/* BG coerente e uniforme su tutte le pagine (index + privacy + 404) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  height: 380px;
  background: linear-gradient(
    180deg,
    rgba(183, 28, 28, .10) 0%,
    rgba(245, 245, 245, 0) 78%
  );
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit
}

img {
  max-width: 100%;
  height: auto
}

.container {
  width: min(1100px, 100% - 32px);
  margin: 0 auto;
}

/* Accessibility */
.skip {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 9999;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 245, 245, .82);

  /* FIX iOS / mobile compositing:
     migliora fluidità e previene blocchi/lag durante lo scroll */
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  transform: translateZ(0);
  will-change: transform;

  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.brand__icon {
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  padding: 6px;
  flex: 0 0 auto;
}

.brand__name {
  font-weight: 900;
  letter-spacing: -.2px;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.nav__link {
  text-decoration: none;
  font-weight: 700;
  color: rgba(17, 19, 24, .78);
  padding: 8px 10px;
  border-radius: 12px;
}

.nav__link:hover {
  background: rgba(183, 28, 28, .06);
  color: rgba(17, 19, 24, .92);
}

.nav__link[aria-current="page"] {
  background: rgba(183, 28, 28, .10);
  color: rgba(17, 19, 24, .92);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-bottom: 24px;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 24px;
  align-items: stretch;
}

/* Title + Motto full width */
.hero__brandlockup {
  grid-column: 1 / -1;
  display: block;
  text-align: center;
  margin-bottom: 6px;
}

.hero__logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px 0 2px;
}

.hero__title {
  max-width: 620px;
  width: min(620px, 100%);
  display: block;
  margin: 0;
}

.hero__tagline {
  margin: 32px 0 6px;
  font-family: Oswald, Poppins, system-ui, sans-serif;
  font-size: 22px;
  letter-spacing: -.2px;
  color: rgba(17, 19, 24, .78);
  text-align: center;
}

.hero__lead {
  margin: 12px auto 0;
  width: min(820px, 100%);
  color: rgba(17, 19, 24, .78);
  font-weight: 650;
  line-height: 1.45;
}

.hero__copy {
  min-width: 0;
  display: flex;
  align-items: center;
}

.hero__card {
  width: 100%;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
  padding: 16px;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 540px) {
  .kpis {
    grid-template-columns: 1fr
  }
}

.kpi {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .06);
  padding: 12px;
  background: rgba(17, 19, 24, .02);
}

.kpi__label {
  font-weight: 800;
  font-size: 12px;
  color: rgba(17, 19, 24, .62);
}

.kpi__value {
  font-weight: 900;
  letter-spacing: -.2px;
  font-size: 18px;
  margin-top: 4px;
}

.kpi__note {
  font-weight: 700;
  font-size: 12px;
  color: rgba(17, 19, 24, .68);
  margin-top: 2px;
}

/* Mini info (estratto da "Info rapide") */
.miniInfo {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .miniInfo {
    grid-template-columns: 1fr;
  }
}

.miniInfo__item {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .06);
  background: rgba(17, 19, 24, .02);
  padding: 12px;
  min-width: 0;
}

.miniInfo__label {
  font-weight: 850;
  font-size: 12px;
  color: rgba(17, 19, 24, .62);
}

.miniInfo__value {
  margin-top: 4px;
  font-weight: 800;
  color: rgba(17, 19, 24, .90);
  line-height: 1.35;
  word-break: break-word;
}

.miniInfo__value a {
  color: rgba(17, 19, 24, .90);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.miniInfo__value--action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copyBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  color: rgba(17, 19, 24, .45);
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.copyBtn:hover {
  background: rgba(183, 28, 28, .07);
  color: var(--primary);
}
.copyBtn--copied {
  color: #2e7d32;
}
.copyBtn__check {
  display: none;
}
.copyBtn--copied .copyBtn__icon {
  display: none;
}
.copyBtn--copied .copyBtn__check {
  display: block;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  justify-content: center;
}

.hero__micro {
  margin: 12px 0 0;
  font-size: 12px;
  color: rgba(17, 19, 24, .62);
  font-weight: 750;
}

/* Stack column */
.stack-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Pills */
.pillRow {
  margin: 12px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: rgba(255, 255, 255, .70);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
  font-weight: 850;
  font-size: 12px;
  color: rgba(17, 19, 24, .82);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .08s ease, filter .12s ease, background .12s ease;
  will-change: transform;
}

.btn:active {
  transform: translateY(1px)
}

.btn--accent {
  background: var(--secondary);
  color: #111;
  border-color: rgba(0, 0, 0, .08);
}

.btn--accent:hover {
  filter: brightness(.98)
}

.btn--ghost {
  background: transparent;
  border-color: rgba(17, 19, 24, .14);
  color: rgba(17, 19, 24, .88);
}

.btn--ghost:hover {
  background: rgba(183, 28, 28, .05)
}

/* ---------- Visual card (logo) ---------- */
.hero__visual {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}

.visualCard {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.visualCard__logo {
  width: 72%;
  height: auto;
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr
  }

  .hero__visual {
    order: 2;
    justify-content: center;
    align-items: center;
  }

  .hero__copy {
    display: block;
  }

  .hero__card {
    display: block;
  }

  .visualCard {
    width: min(360px, 100%);
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 24px 0
}

.hero + .section {
  padding-top: 0;
}

.section--soft {
  padding: 0 0 30px
}

.section__title {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.2px;
  font-weight: 900;
}

.section__subtitle {
  margin: 6px 0 0;
  color: rgba(17, 19, 24, .72);
  font-weight: 700;
}

/* grid più “proporzionato” */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr
  }
}

.grid--balanced {
  grid-template-columns: 1.25fr .75fr
}

@media (max-width: 900px) {
  .grid--balanced {
    grid-template-columns: 1fr
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
}

.card--tall {
  padding: 18px
}

.card__title {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -.2px;
  font-weight: 900;
}

.card__text {
  margin: 0;
  color: rgba(17, 19, 24, .74);
  font-weight: 600;
}

/* feature list */
.featureList {
  display: grid;
  gap: 12px;
}

.feature {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .06);
  background: rgba(17, 19, 24, .02);
  padding: 12px;
}

.feature__title {
  font-weight: 950;
  letter-spacing: -.2px;
}

.feature__text {
  margin: 6px 0 0;
  color: rgba(17, 19, 24, .74);
  font-weight: 650;
  line-height: 1.45;
}

/* callout */
.callout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 14px;
  border: 1px dashed rgba(183, 28, 28, .35);
  background: rgba(183, 28, 28, .05);
  padding: 12px;
}

.callout--compact {
  margin-top: 12px;
}

.callout__badge {
  margin: auto 0;
  flex: 0 0 auto;
  font-weight: 950;
  font-size: 12px;
  letter-spacing: -.2px;
  color: rgba(183, 28, 28, .92);
  background: rgba(255, 255, 255, .80);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 999px;
  padding: 6px 10px;
}

.callout__text {
  margin: auto 0;
  font-weight: 750;
  color: rgba(17, 19, 24, .82);
}

/* ---------- DL ---------- */
.dl {
  margin: 0
}

.dl__row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(0, 0, 0, .06);
}

.dl__row:first-child {
  border-top: none;
  padding-top: 0;
}

.dl dt {
  font-weight: 900;
  color: rgba(17, 19, 24, .72);
}

.dl dd {
  margin: 0;
  font-weight: 700;
  color: rgba(17, 19, 24, .9);
}

@media (max-width: 520px) {
  .dl__row {
    grid-template-columns: 1fr
  }
}

.dl--allergeni dt {
  text-align: center;
}

.dl--allergeni .dl__row {
  grid-template-columns: 48px 1fr;
}

/* ---------- Product allergen cards ---------- */
.productsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 900px) {
  .productsGrid {
    grid-template-columns: 1fr;
  }
}

.productCard {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, .06);
  background: rgba(17, 19, 24, .02);
  padding: 14px;
}

.productCard__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.productCard__title {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.2px;
  font-weight: 900;
}

.productCard__desc {
  margin: 6px 0 0;
  color: rgba(17, 19, 24, .72);
  font-weight: 600;
  line-height: 1.45;
}

.productCard__category {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(0, 0, 0, .06);
  color: rgba(17, 19, 24, .78);
  font-size: 12px;
  font-weight: 850;
}

.productCard__label {
  margin: 12px 0 0;
  font-size: 12px;
  font-weight: 850;
  color: rgba(17, 19, 24, .62);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tagRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(183, 28, 28, .08);
  border: 1px solid rgba(183, 28, 28, .14);
  color: rgba(17, 19, 24, .88);
  font-size: 13px;
  font-weight: 850;
}

/* ---------- Download ---------- */
.download {
  display: grid;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .08);
  padding: 18px;
}

.download--center {
  width: min(780px, 100%);
  margin: 0 auto;
}

.download__head {
  min-width: 0
}

.storeRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.storeRow--center {
  justify-content: center
}

.storeBadge {
  width: 210px;
  max-width: 100%;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(17, 19, 24, .95), rgba(17, 19, 24, .88));
  border: 1px solid rgba(255, 255, 255, .10);
  color: #fff;
  text-decoration: none;
  padding: 10px 12px 10px;
  display: grid;
  gap: 2px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .14);
}

.storeBadge__top {
  font-size: 11px;
  font-weight: 700;
  opacity: .82;
  line-height: 1.1;
}

.storeBadge__bottom {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.2px;
  line-height: 1.1;
}

.storeBadge__note {
  font-size: 11px;
  font-weight: 800;
  opacity: .80;
  margin-top: 6px;
  line-height: 1.1;
}

.storeBadge:hover {
  filter: brightness(1.02)
}

.download__fine {
  margin: 2px 0 0;
  text-align: center;
  font-size: 12px;
  color: rgba(17, 19, 24, .62);
  font-weight: 750;
}

.download__fine a {
  color: rgba(17, 19, 24, .78);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- Helpers per pagine interne (Privacy / 404) ---------- */
.pageTitle {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -.2px;
  font-weight: 900;
}

.spacer {
  height: 16px
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, .06);
  padding: 16px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 56px;
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__brand {
  font-weight: 900;
  letter-spacing: -.2px;
}

.footer__meta {
  color: rgba(17, 19, 24, .68);
  font-weight: 700;
  font-size: 12px;
}

.footer__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__dot {
  color: rgba(17, 19, 24, .42)
}

.footer__copy {
  color: rgba(17, 19, 24, .62);
  font-weight: 850;
  font-size: 12px;
}

/* ---------- Hamburger menu ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  color: rgba(17, 19, 24, .78);
  flex: 0 0 auto;
}

.nav-toggle:hover {
  background: rgba(183, 28, 28, .06);
}

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

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 8px 16px 12px;
    background: rgba(245, 245, 245, .96);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    z-index: 49;
  }

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

@media (max-width: 480px) {
  .storeBadge {
    width: 100%;
  }
  .download__head {
    overflow-wrap: break-word;
  }
}

@media (max-width: 520px) {
  .footer__inner {
    flex-direction: column;
    gap: 4px;
    min-height: unset;
  }
  .footer__meta-sep  { display: none; }
  .footer__meta-addr { display: block; }
}

@media (max-width: 415px) {
  .pillRow {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
  }
  .pillRow .pill {
    justify-content: center;
  }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none
  }
}

/* ---------- Menu image error state ---------- */
.menu-img-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 15px;
  text-align: center;
  padding: 32px;
}
