/* ============= TOKENS ============= */
:root {
  --bg: #F5EDE0;
  --bgAlt: #EFE4D2;
  --ink: #2A1810;
  --inkSoft: #5C3A1E;
  --accent: #C9A063;
  --accentDark: #A8824A;
  --line: #D9C9AE;
  --paper: #FBF6EC;
  --warn: #A6402C;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
  --maxw: 1380px;
  --pad: clamp(20px, 5vw, 80px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Scorrimento "a scatti gentili": ogni sezione si allinea sotto la barra
   quando le passi vicino, cosi' non si resta mai a meta' tra due sezioni.
   "proximity" (non "mandatory") lascia libero lo scroll dentro le sezioni lunghe. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  scroll-snap-type: y proximity;
}
.hero, .section, .footer { scroll-snap-align: start; }
@media (max-width: 1024px) {
  html { scroll-snap-type: y mandatory; }
  .hero, .section, .footer { scroll-snap-stop: always; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 68px; }
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga", "kern";
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* clip (non hidden) per non creare uno scrollport: serve a far funzionare
   position: sticky nei figli. */
.page { overflow-x: clip; }

/* ============= TYPE PRIMITIVES ============= */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--inkSoft);
  font-weight: 500;
}
.eyebrow--light { color: rgba(255,255,255,0.85); }

.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, min(4.4vw, 7vh), 76px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 18px 0 0;
  color: var(--ink);
  text-wrap: balance;
}
.section__title em {
  font-style: italic;
  color: var(--accentDark);
  font-weight: 400;
}
.section__title--light { color: #FBF6EC; }
.section__title--light em { color: var(--accent); }

/* ============= BUTTONS ============= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accentDark); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { background: #FBF6EC; color: #1A0F08; }
.btn--light:hover { background: var(--accent); }
.btn--block { width: 100%; justify-content: center; text-align: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding: 0 0 4px;
  transition: gap .25s ease, color .25s ease;
}
.link-arrow:hover { gap: 14px; color: var(--accentDark); }

/* ============= NAV ============= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px var(--pad);
  transition: background .3s ease, padding .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 14px; padding-bottom: 14px;
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.nav__right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__link {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right .3s ease;
}
.nav__link:hover::after { right: 0; }

.nav__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.nav__brand-name {
  font-family: var(--font-display);
  font-size: 56px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.nav__brand-est {
  font-size: 16px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--inkSoft);
  margin-left: 8px;
}
.nav__cta {
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.nav__cta:hover { background: var(--ink); color: var(--paper); }
.nav__ig { display: inline-flex; align-items: center; gap: 7px; }
.ig-icon { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ig-icon .ig-dot { fill: currentColor; stroke: none; }

/* When nav sits over the dark hero image (top of page) */
.nav--on-dark .nav__link,
.nav--on-dark .nav__brand-name { color: #FBF6EC; }
.nav--on-dark .nav__brand-est { color: rgba(251,246,236,0.65); }
.nav--on-dark .nav__cta {
  color: #FBF6EC;
  border-color: rgba(251,246,236,0.7);
  background: rgba(20,17,14,0.25);
  backdrop-filter: blur(6px);
}
.nav--on-dark .nav__cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #1A0F08;
}

/* ============= HERO COMMON ============= */
.hero { position: relative; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--inkSoft);
  margin-bottom: 40px;
}
.hero__eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.hero__sub {
  font-size: 17px;
  line-height: 1.55;
  max-width: 540px;
  margin: 24px 0 36px;
  text-wrap: pretty;
}
.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============= HERO FULL BLEED ============= */
.hero--full {
  height: 100vh;
  min-height: 820px;
  color: var(--ink);
  padding: 160px var(--pad) 60px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero--full .hero__sub { color: var(--inkSoft); }
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  object-fit: cover;
  object-position: 55% 50%;
  z-index: 0;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}
/* Mobile-only photo card. Hidden on desktop/tablet -- the media query at the
   bottom of the file flips this on under 760px and hides the video. The
   photos inside are stacked and crossfaded by app.js (HERO photo rotation). */
.hero__photos { display: none; }
/* Ken Burns zoom kept for image-based heroes; disabled on the video bg
   because re-scaling each video frame causes subpixel jitter. */
.hero__bg:not(video) {
  animation: heroZoom 16s ease-out forwards;
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero__scrim {
  position: absolute; inset: 0;
  /* Two stacked gradients (first listed = on top):
     1. Cream veil under the nav band: il logo e i link sono scuri, quindi
        serve schiarire (non scurire) la fascia alta della foto.
     2. Cream fade-to-bottom: the video washes into the page background by the
        bottom of the hero, where the dark title and meta sit on near-solid
        cream. Base color is --bg so the fade blends with the body. */
  background:
    linear-gradient(180deg,
      rgba(245,237,224, 0.55) 0%,
      rgba(245,237,224, 0.26) 12%,
      rgba(245,237,224, 0.00) 26%),
    linear-gradient(180deg,
      rgba(245,237,224, 0.00) 0%,
      rgba(245,237,224, 0.35) 55%,
      rgba(245,237,224, 0.95) 100%),
    /* 3. Cream wash from the text side, so title and eyebrow keep contrast
          over bright pastry on the right of the frame. */
    linear-gradient(100deg,
      rgba(245,237,224, 0.92) 0%,
      rgba(245,237,224, 0.66) 42%,
      rgba(245,237,224, 0.00) 72%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, min(7.5vw, 11.5vh), 116px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}
.hero__title-line {
  display: block;
  animation: rise .9s cubic-bezier(.2,.7,.2,1) both;
}
.hero__title-line:nth-child(1) { animation-delay: 0s; }
.hero__title-line:nth-child(2) { animation-delay: .12s; padding-left: 1.2em; }
.hero__title-line:nth-child(3) { animation-delay: .24s; padding-left: 0.4em; }
.hero__title-line:nth-child(4) { animation-delay: .36s; padding-left: 1.6em; }
.hero__title-italic {
  font-style: italic;
  color: var(--accent);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__meta {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 56px auto 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.hero__meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero__meta-k {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--inkSoft);
}
.hero__meta-v {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
}

/* ============= MARQUEE ============= */
.marquee {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 22px 0;
  border-top: 1px solid var(--accentDark);
  border-bottom: 1px solid var(--accentDark);
}
.marquee__track {
  display: flex;
  gap: 60px;
  animation: scroll 40s linear infinite;
  white-space: nowrap;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee__item {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  display: inline-flex;
  align-items: center;
  gap: 60px;
  flex-shrink: 0;
}
.marquee__star { color: var(--accent); font-style: normal; }

/* ============= SECTIONS ============= */
.section {
  padding: 120px var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
}
.section__head {
  margin-bottom: 80px;
  max-width: 880px;
}

/* ============= SPECIALITÀ ============= */
.specialita__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}
.specialita__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.specialita__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 28px 4px;
  border: 0;
  background: transparent;
  text-align: left;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: padding-left .35s ease, color .35s ease;
}
.specialita__row:hover, .specialita__row.is-active {
  padding-left: 18px;
  color: var(--accentDark);
}
.specialita__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--accent);
}
.specialita__name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.005em;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.specialita__sub {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--inkSoft);
}
.specialita__row.is-active .specialita__sub { color: var(--accentDark); }
.specialita__arrow {
  font-size: 22px;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .3s ease, transform .3s ease;
}
.specialita__row:hover .specialita__arrow,
.specialita__row.is-active .specialita__arrow {
  opacity: 1;
  transform: translateX(0);
}

.specialita__feature {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.specialita__media {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bgAlt);
}
.specialita__media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Le foto di un prodotto sono impilate: si incrociano in dissolvenza,
   i pallini le scelgono a mano (app.js). */
.specialita__shot { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.specialita__shot.is-active { opacity: 1; }
.specialita__dots {
  position: absolute; left: 50%; bottom: 14px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20,17,14,.42);
  backdrop-filter: blur(6px);
}
.specialita__dots button {
  width: 7px; height: 7px;
  padding: 0; border: 0; border-radius: 50%;
  cursor: pointer;
  background: rgba(255,255,255,.45);
  transition: background .25s ease, transform .25s ease;
}
.specialita__dots button:hover { background: rgba(255,255,255,.8); }
.specialita__dots button.is-on { background: #fff; transform: scale(1.35); }
@keyframes fade { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
.specialita__tag {
  position: absolute;
  top: 20px; left: 20px;
  background: var(--paper);
  padding: 8px 14px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--inkSoft);
}
.specialita__detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fade .6s ease;
}
.specialita__detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.specialita__detail-head h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  margin: 0;
}
.specialita__price {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--accentDark);
}
.specialita__detail p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--inkSoft);
  max-width: 540px;
  margin: 0;
}

/* ============= STORIA ============= */
.storia { background: var(--bgAlt); max-width: none; }
.storia__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.storia__media {
  position: relative;
  aspect-ratio: 4/5;
}
.storia__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.storia__img--small {
  width: 50%;
  height: 45%;
  inset: auto -30px -30px auto;
  border: 8px solid var(--bgAlt);
}
.storia__stamp {
  position: absolute;
  top: -20px; left: -20px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(-8deg);
}
.storia__stamp strong {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 36px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-transform: none;
  margin: 4px 0;
}
.storia__text { display: flex; flex-direction: column; gap: 24px; }
.storia__lede {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink);
  margin: 12px 0 0;
  text-wrap: pretty;
}
.storia__text p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--inkSoft);
  margin: 0;
  text-wrap: pretty;
}
.storia__signature {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.storia__sig-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
}
.storia__sig-role {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--inkSoft);
}

/* ============= EVENTI ============= */
.eventi { padding: 0; max-width: none; }
.eventi__inner {
  background-size: cover;
  background-position: center;
  padding: 140px var(--pad);
  position: relative;
  overflow: hidden;
}
/* Le foto si incrociano in dissolvenza dietro allo scrim (app.js). */
.eventi__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.eventi__bg.is-active { opacity: 1; }
.eventi__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,17,14,0.25), rgba(20,17,14,0.68));
}
.eventi__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  color: #FBF6EC;
}
.eventi__sub {
  font-size: 17px;
  line-height: 1.55;
  margin: 28px 0 36px;
  color: rgba(251,246,236,0.88);
  text-wrap: pretty;
  max-width: 580px;
}
.eventi__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.pill {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(251,246,236,0.35);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #FBF6EC;
  backdrop-filter: blur(6px);
}

/* ============= GALLERY ============= */
.gallery__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: end;
  margin-bottom: 60px;
}
.gallery__head .eyebrow { grid-column: 1; }
.gallery__head .section__title { grid-column: 1 / 3; grid-row: 2; margin-top: 18px; }
.gallery__ig {
  grid-column: 3; grid-row: 2;
  font-size: 14px;
  color: var(--inkSoft);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  align-self: end;
  transition: color .25s ease;
}
.gallery__ig:hover { color: var(--accentDark); }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
}
.gallery__cell {
  position: relative;
  overflow: hidden;
  background: var(--bgAlt);
}
.gallery__cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.gallery__cell:hover img { transform: scale(1.06); }
.gallery__cell-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(20,17,14,0.6));
  opacity: 0;
  transition: opacity .3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px;
  color: #FBF6EC;
  font-size: 22px;
}
.gallery__cell:hover .gallery__cell-overlay { opacity: 1; }
.gallery__cell--0 { grid-row: span 2; }
.gallery__cell--3 { grid-row: span 2; }

/* ============= FORM FIELDS ============= */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--inkSoft);
}
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  transition: border-color .25s ease;
  resize: vertical;
  width: 100%;
  min-width: 0;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accentDark);
}
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* ============= PANETTONI (ordini online) ============= */
.panettoni { display: flex; flex-direction: column; position: relative; }
.panettoni__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; max-width: 46ch; }
.panettoni__head .section__title { margin: 0; }
.panettoni__sub { font-size: 16px; line-height: 1.55; color: var(--inkSoft); margin: 0; text-wrap: pretty; }
.panettoni__inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: start; }
.panettoni__right { min-width: 0; }
.panettoni__media {
  margin: 0; min-width: 0; width: 100%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}
.panettoni__media img { grid-area: 1 / 1; width: 100%; aspect-ratio: 1/1; object-fit: cover; background: var(--bgAlt); transition: opacity .45s ease; }
.panettoni__media figcaption { grid-area: 2 / 1; text-align: center; font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--inkSoft); }
/* Un PNG trasparente per gusto (dal progetto, .pnt-img): tutti nella stessa
   cella, solo quello scelto e' visibile; sotto resta la foto generica, che
   app.js spegne con data-foto="gusto" appena ha un livello da mostrare. */
.panettoni__media .pnt-img {
  object-fit: contain; background: none;
  opacity: 0; transform: scale(.96) translateY(8px); pointer-events: none;
  transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.3,1);
}
.panettoni__media .pnt-img.is-on { opacity: 1; transform: none; pointer-events: auto; }
.panettoni__media[data-foto="gusto"] > img:not(.pnt-img) { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .panettoni__media img, .panettoni__media .pnt-img { transition: none; transform: none; }
}

/* Le scatole: polaroid inclinata, appoggiata sull'angolo in alto a destra.
   Il progetto ha cinque varianti dietro data-scatole; qui vive solo quella
   scelta come predefinita. */
.panettoni__scatole { margin: 0; position: relative; overflow: hidden; }
.panettoni__scatole img { width: 100%; height: 100%; object-fit: cover; display: block; }
.panettoni__scatole figcaption { display: none; }
.panettoni[data-scatole="polaroid"] .panettoni__scatole {
  position: absolute;
  top: 56px; right: calc(var(--pad) + 40px);
  width: clamp(300px, 30vw, 430px);
  margin: 0;
  padding: 18px 18px 54px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(0,0,0,.16);
  transform: rotate(-3.5deg);
  overflow: visible;
  z-index: 2;
}
.panettoni[data-scatole="polaroid"] .panettoni__scatole img { aspect-ratio: 1/1; height: auto; }
/* La polaroid sta in alto a destra: la colonna della foto parte appena
   sotto il suo bordo inferiore. */
@media (min-width: 1025px) {
  .panettoni[data-scatole="polaroid"] .panettoni__media { padding-top: calc(clamp(300px, 30vw, 430px) - 232px); }
}
.ordine {
  min-width: 0;
  background: var(--paper);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line);
}
/* display:flex beats the hidden attribute, so the rule has to be explicit,
   otherwise the form stays visible behind the confirmation panel. */
.ordine[hidden], .ordine [hidden] { display: none; }
.ordine__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 21px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.ordine__est {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--inkSoft);
}
.ordine__group { border: 0; margin: 0; padding: 0; min-width: 0; }
.ordine__group legend {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--inkSoft);
  margin-bottom: 9px;
}
.ordine__opt-note { text-transform: none; letter-spacing: 0.04em; font-style: italic; opacity: 0.75; }
.ordine__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.opt {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease;
}
.opt:hover { border-color: var(--accent); }
.opt.is-on { border-color: var(--accentDark); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.opt:focus-within { outline: 2px solid var(--accentDark); outline-offset: 2px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.opt__name { font-family: var(--font-display); font-size: 17px; line-height: 1.15; }
.opt__sub { font-family: var(--font-body); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--inkSoft); }
.opt__price { font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--accentDark); white-space: nowrap; }
.ordine__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 18px; }
.ordine__total span { font-family: var(--font-body); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--inkSoft); }
.ordine__total strong { font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.ordine__status { margin: 0; font-size: 13px; line-height: 1.5; color: var(--warn); min-height: 1em; }
.ordine__fineprint { font-size: 11px; color: var(--inkSoft); margin: 0; line-height: 1.5; }
.ordine--unavailable { font-size: 15px; line-height: 1.6; color: var(--inkSoft); margin: 0; }
/* Avviso "ordini non ancora attivi": si vede, ma non urla come un errore. */
.ordine__avviso {
  margin: 0;
  padding: 12px 14px;
  /* Stessa grammatica di .opt.is-on: filetto sottile piu' fondo tinto,
     non una barra d'accento laterale. */
  border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line));
  background: color-mix(in srgb, var(--warn) 6%, transparent);
  font-size: 13px;
  line-height: 1.55;
  color: var(--inkSoft);
}
.ordine__avviso strong { display: block; color: var(--warn); font-weight: 600; margin-bottom: 2px; }
.ordine__avviso a { border-bottom: 1px solid var(--accent); white-space: nowrap; }
.btn--solid:disabled { background: var(--line); color: var(--inkSoft); cursor: not-allowed; }
.btn--solid:disabled:hover { background: var(--line); transform: none; }
.ordine--sent p { font-size: 15px; line-height: 1.6; color: var(--inkSoft); margin: 0; }

/* ============= FOOTER ============= */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px var(--pad) 30px;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(251,246,236,0.18);
}
.footer__brand { display: flex; flex-direction: column; gap: 8px; }
.footer__mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 60px;
  line-height: 1;
  color: var(--accent);
}
.footer__name {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.02em;
}
.footer__tag {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: rgba(251,246,236,0.65);
  margin-top: 8px;
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer__col h4 {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(251,246,236,0.55);
  margin: 0 0 8px;
  font-weight: 500;
}
.footer__col a {
  font-size: 14px;
  color: rgba(251,246,236,0.88);
  transition: color .25s ease;
}
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  max-width: var(--maxw);
  margin: 30px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(251,246,236,0.55);
}
.footer__motto {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--accent);
}

/* ============= MOBILE NAV (burger + drawer) ============= */
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.nav__burger span {
  display: block;
  width: 16px; height: 1.5px;
  background: currentColor;
  transition: transform .3s ease, opacity .3s ease;
}
.nav--on-dark .nav__burger { color: #FBF6EC; border-color: rgba(251,246,236,0.7); }
.nav--open .nav__burger { color: var(--ink); border-color: var(--ink); }
.nav--open .nav__burger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav--open .nav__burger span:nth-child(2) { opacity: 0; }
.nav--open .nav__burger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav__drawer {
  position: fixed;
  inset: 0;
  background: rgba(20,17,14,0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  z-index: -1;
}
.nav--open .nav__drawer { opacity: 1; pointer-events: auto; z-index: 1; }
.nav__drawer-inner {
  position: absolute;
  top: 0; right: 0;
  height: 100vh;
  width: min(420px, 100%);
  background: var(--paper);
  padding: 100px 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  overflow-y: auto;
}
.nav--open .nav__drawer-inner { transform: translateX(0); }
.nav__drawer-inner > a {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: color .25s ease, padding-left .25s ease;
}
.nav__drawer-inner > a:hover {
  color: var(--accentDark);
  padding-left: 8px;
}
.nav__drawer-cta {
  margin-top: 24px;
  font-style: italic;
  color: var(--accentDark) !important;
  border-bottom: 1px solid var(--accent) !important;
}
.nav__drawer-meta {
  margin-top: auto;
  padding-top: 32px;
  display: grid;
  gap: 20px;
}
.nav__drawer-meta > div { display: flex; flex-direction: column; gap: 4px; }
.nav__drawer-meta span {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--inkSoft);
}
.nav__drawer-meta strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
}
.nav__drawer-meta a { color: inherit; border-bottom: 1px solid currentColor; }

/* ============= LOGO ============= */
.nav__logo { display: block; height: auto; width: auto; }
.nav__logo--heart { height: 62px; transition: height .35s cubic-bezier(.2,.7,.3,1); }
.nav--scrolled .nav__logo--heart { height: 34px; }
.nav__brand--cuore-testo { align-items: center; gap: 12px; }
.nav--on-dark .nav__logo { filter: brightness(0) invert(1); }
.footer__logo { display: block; width: 100%; max-width: 280px; height: auto; filter: brightness(0) invert(1); opacity: .94; }
.footer__brand .footer__tag { margin-top: 4px; }

/* Wordmark: Cinzel, il carattere piu' vicino alle capitali del logo */
.brand-serif { font-family: 'Cinzel', serif; text-transform: uppercase; font-weight: 500; letter-spacing: 0.045em; font-size: 0.56em; }
/* Il marchio parte grande e si stringe appena la pagina scorre. */
.nav__brand-name.brand-serif { font-size: 46px; line-height: 1; transition: font-size .35s cubic-bezier(.2,.7,.3,1); }
.nav--scrolled .nav__brand-name.brand-serif { font-size: 28px; }
.nav__brand-est { white-space: nowrap; transition: font-size .35s cubic-bezier(.2,.7,.3,1), opacity .3s ease; }
.nav--scrolled .nav__brand-est { font-size: 13px; }

/* ============= RESPONSIVE ============= */
@media (max-width: 1024px) {
  .nav__inner { gap: 16px; }
  .nav__right { gap: 18px; }
  .nav__right a:not(.nav__cta):not(:nth-last-of-type(2)):not(:nth-last-of-type(3)) { display: none; }
  /* Marchio piu' contenuto: il progetto lo fa a 1080 e nasconde "est. 1978"
     a 960, qui i due passaggi sono ripiegati sul breakpoint 1024 del sito. */
  .nav__logo--heart { height: 46px; }
  .nav__brand-name.brand-serif { font-size: 34px; }
  .nav__brand-est { display: none; }
  .specialita__grid { grid-template-columns: 1fr; gap: 40px; }
  .specialita__feature { position: static; }
  /* When JS moves the feature inside the list on mobile, render it as the
     expanded panel of the active row -- image + detail directly under the tap. */
  .specialita__list .specialita__feature {
    padding: 18px 0 28px;
    gap: 22px;
    border-bottom: 1px solid var(--line);
    animation: fade .45s ease;
  }
  .specialita__list .specialita__media { aspect-ratio: 5/4; }
  .storia__inner { grid-template-columns: 1fr; gap: 50px; }
  .panettoni__inner { grid-template-columns: 1fr; gap: 24px; }
  .panettoni__media { order: -1; width: min(320px, 100%); justify-self: center; }
  /* La polaroid si stende: diventa una banda a tutta larghezza sotto il form. */
  .panettoni[data-scatole] .panettoni__head,
  .panettoni[data-scatole] .panettoni__inner { max-width: none; }
  .panettoni[data-scatole] .panettoni__scatole {
    position: static;
    width: auto;
    height: clamp(180px, 42vw, 300px);
    transform: none;
    box-shadow: none;
    padding: 0;
    display: block;
    margin: 40px calc(var(--pad) * -1) 0;
  }
  .panettoni[data-scatole] .panettoni__scatole img { height: 100%; aspect-ratio: auto; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery__cell--0, .gallery__cell--3 { grid-row: auto; }
}

@media (max-width: 760px) {
  :root { --pad: 20px; }
  .nav { padding: 16px var(--pad); }
  .nav--scrolled { padding-top: 12px; padding-bottom: 12px; }
  .nav__brand-est { display: none; }
  .nav__right { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__brand-name { font-size: 42px; }
  .nav__brand-name.brand-serif { font-size: 30px; }
  .nav--scrolled .nav__brand-name.brand-serif { font-size: 23px; }
  .nav__logo--heart { height: 42px; }
  .nav--scrolled .nav__logo--heart { height: 28px; }

  .section { padding: 80px var(--pad); }
  .section__head { margin-bottom: 50px; }
  .section__title { font-size: clamp(36px, 9vw, 56px); }

  /* Nav -- on-dark treatment is dropped on mobile because the hero is no
     longer a full-bleed dark video; nav now sits on cream like the rest. */
  .nav--on-dark .nav__brand-name { color: var(--ink); }
  .nav--on-dark .nav__burger { color: var(--ink); border-color: var(--ink); }

  /* Hero -- photo on top, text below on cream (mobile reflow).
     Drops the full-bleed video + scrim + overlay-text composition. */
  .hero--full {
    height: auto;
    min-height: 0;
    padding: 96px var(--pad) 40px;
    display: block;
  }
  .hero__bg { display: none; }
  .hero__scrim { display: none; }
  .hero__photos {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    margin-bottom: 36px;
    overflow: hidden;
    background: var(--bgAlt);
  }
  .hero__photo {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.4s ease;
  }
  .hero__photo.is-active { opacity: 1; }
  @media (prefers-reduced-motion: reduce) {
    .hero__photo { transition: none; }
  }
  .hero__content {
    position: static;
    z-index: auto;
    padding: 0;
  }
  .hero__title { font-size: clamp(44px, 12vw, 72px); }
  .hero__title-line:nth-child(2) { padding-left: 0.6em; }
  .hero__title-line:nth-child(3) { padding-left: 0.2em; }
  .hero__title-line:nth-child(4) { padding-left: 0.8em; }
  .hero__title-italic { color: var(--inkSoft); }
  .hero__sub { font-size: 15px; margin: 18px 0 28px; }
  .hero__eyebrow { margin-bottom: 28px; font-size: 12px; letter-spacing: 0.16em; }
  .hero__meta { position: static; grid-template-columns: 1fr; gap: 14px; margin: 36px 0 0; padding-top: 18px; }
  .hero__meta-v { font-size: 18px; }

  /* Marquee */
  .marquee { padding: 16px 0; }
  .marquee__item { font-size: 20px; gap: 36px; }
  .marquee__track { gap: 36px; }

  /* Specialità */
  .specialita__row { grid-template-columns: auto 1fr auto; gap: 14px; padding: 20px 4px; }
  .specialita__name { font-size: 22px; }
  .specialita__sub { font-size: 10px; }
  .specialita__num { font-size: 14px; }
  .specialita__detail-head h3 { font-size: 26px; }
  .specialita__price { font-size: 18px; }

  /* Storia */
  .storia__inner { gap: 40px; }
  .storia__media { aspect-ratio: 4/4.4; }
  .storia__stamp { width: 96px; height: 96px; font-size: 9px; top: -12px; left: -12px; }
  .storia__stamp strong { font-size: 26px; }
  .storia__lede { font-size: 18px; }
  .storia__img--small { width: 55%; height: 45%; inset: auto -16px -16px auto; border-width: 6px; }

  /* Eventi */
  .eventi__inner { padding: 80px var(--pad); }
  .eventi__sub { font-size: 15px; margin: 20px 0 28px; }
  .pill { padding: 8px 14px; font-size: 12px; }

  /* Gallery */
  .gallery__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: 8px; }
  .gallery__cell--0, .gallery__cell--3 { grid-row: auto; grid-column: auto; }
  .gallery__head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 32px; }
  .gallery__ig { font-size: 13px; }

  /* Panettoni */
  .panettoni__sub { font-size: 15px; margin: 20px 0 26px; }
  .ordine { padding: 20px 16px; gap: 14px; }
  .ordine__head { font-size: 19px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .ordine__opts { grid-template-columns: 1fr; }
  .opt { padding: 10px 12px; }
  .opt__name { font-size: 16px; }
  .ordine__total strong { font-size: 26px; }

  /* Footer */
  .footer { padding: 60px var(--pad) 28px; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 36px; padding-bottom: 36px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__logo { max-width: 210px; }
  .footer__mark { font-size: 48px; }
  .footer__name { font-size: 26px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; font-size: 10px; }
  .footer__motto { font-size: 13px; }

  /* Btn smaller */
  .btn { padding: 14px 22px; font-size: 13px; }
}

@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
}

/* Laptop piccoli (13-14"): titoli e respiro delle sezioni ridotti
   (821px del progetto ripiegato su 761px, sopra il breakpoint mobile) */
@media (min-width: 761px) and (max-height: 860px) {
  .section { padding: 82px var(--pad); }
  .section__head { margin-bottom: 52px; max-width: 760px; }
  .section__title { font-size: clamp(34px, 4vw, 58px); }
}
@media (min-width: 761px) and (max-width: 1400px) {
  .section__head { margin-bottom: 58px; }
}

/* ============= EMBED INSTAGRAM (galleria) ============= */
.gallery__embeds { column-count: 3; column-gap: 10px; }
.ig-card { margin: 0 0 10px; display: inline-block; width: 100%; break-inside: avoid; background: var(--bgAlt); }
/* altezze alternate: la griglia si incastra come un masonry */
.ig-card:nth-child(5n+1) .ig-card__crop { aspect-ratio: 1/1; }
.ig-card:nth-child(5n+2) .ig-card__crop { aspect-ratio: 4/5; }
.ig-card:nth-child(5n+3) .ig-card__crop { aspect-ratio: 5/4; }
.ig-card:nth-child(5n+4) .ig-card__crop { aspect-ratio: 3/4; }
.ig-card:nth-child(5n) .ig-card__crop { aspect-ratio: 1/1; }
.ig-card--reel .ig-card__crop { aspect-ratio: 2/3; }
/* zoom dell'iframe calibrato sull'altezza del riquadro: solo quanto serve
   perche' la foto copra il ritaglio e la cornice Instagram resti fuori */
.ig-card:nth-child(5n+3) .ig-card__frame { width: 106%; left: -3%; }
.ig-card:nth-child(5n+2) .ig-card__frame { width: 134%; left: -17%; }
.ig-card:nth-child(5n+4) .ig-card__frame { width: 142%; left: -21%; }
.ig-card--reel .ig-card__frame { width: 160%; left: -30%; }
/* L'embed ufficiale porta con se' header e pulsanti Instagram: li ritagliamo,
   resta solo la foto. Il rimando al post e' il nostro link overlay. */
.ig-card__crop { position: relative; overflow: hidden; aspect-ratio: 1/1; background: var(--bgAlt); }
/* iframe piu' largo del riquadro: la foto copre sempre tutta l'area, cosi'
   header e pulsanti Instagram restano fuori dal ritaglio in ogni formato. */
.ig-card__frame { position: absolute; top: -58px; left: -6%; width: 112%; height: calc(100% + 460px); border: 0; display: block; background: var(--paper); }
/* Il link copre la tessera: click sempre al post, niente barra sotto la foto */
.ig-card__link { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; padding: 14px; text-decoration: none; background: linear-gradient(to top, rgba(20,17,14,.55), rgba(20,17,14,0) 45%); opacity: 0; transition: opacity .35s ease; }
.ig-card__link span { color: #FBF6EC; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.ig-card:hover .ig-card__link { opacity: 1; }
@media (max-width: 1024px) { .gallery__embeds { column-count: 2; } }
@media (max-width: 760px) { .gallery__embeds { column-count: 1; } }

/* ============= SPECIALITÀ: CAROSELLO MOBILE ============= */
/* Sotto i 1024px la griglia lascia il posto a un carosello di schede
   (costruito da app.js: data-specm arriva solo se il JS gira). */
.spec-m { display: none; }
@media (max-width: 1024px) {
  .specialita[data-specm="carosello"] .specialita__grid { display: none; }
  .spec-m { display: block; }

  .spec-m--carosello { margin: 0 calc(var(--pad) * -1); }
  .spec-m__track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px var(--pad) 18px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .spec-m__track::-webkit-scrollbar { display: none; }
  .spec-card {
    flex: 0 0 78%;
    max-width: 340px;
    scroll-snap-align: center;
    background: var(--paper);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
  }
  .spec-card .specialita__media { aspect-ratio: 4/3; }
  .spec-card__body { padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 8px; }
  .spec-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .spec-card__head h3 { font-family: var(--font-display); font-size: 24px; font-weight: 400; margin: 0; line-height: 1.1; }
  .spec-card__sub { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accentDark); margin: 0; }
  .spec-card__body p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--inkSoft); }
  .spec-m__hint { margin: 0 var(--pad); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--inkSoft); }
}

/* ============= ORDINE: FORM COMPATTO SOTTO I 1024px ============= */
/* Gusto e crema diventano due tendine, cosi' la foto del panettone resta
   visibile insieme alle scelte, e i campi si affiancano a due a due. */
.field--mobile { display: none; }
@media (max-width: 1024px) {
  .field--mobile { display: flex; }
  .ordine__opts--desk { display: none; }
  /* La foto del gusto e' il fulcro del form su mobile: tenuta piu' grande
     della polaroid delle scatole (era min(240px, 62%), +30% dal 02/09/2026). */
  .panettoni[data-scatole] .panettoni__media { width: min(312px, 82%); justify-self: center; }
  .panettoni[data-scatole] .panettoni__media figcaption { font-size: 17px; }
  .ordine__group legend { margin-bottom: 7px; }

  .panettoni[data-ord="card"] .ordine { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 16px; }
  /* display:grid batterebbe l'attributo hidden: senza questa riga il form
     resterebbe in pagina accanto al messaggio "ordini non disponibili". */
  .panettoni[data-ord="card"] .ordine[hidden] { display: none; }
  .panettoni[data-ord="card"] .ordine > * { grid-column: 1 / -1; }
  .panettoni[data-ord="card"] .ordine .field-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .panettoni[data-ord="card"] .ordine__head { padding-bottom: 10px; }
  .panettoni[data-ord="card"] .ordine__total { padding-top: 12px; }
}

/* Mobile: il marchio del footer va centrato. */
@media (max-width: 760px) {
  .footer__brand { align-items: center; text-align: center; }
  .footer__logo { margin: 0 auto; }
  .footer__brand .footer__tag { text-align: center; }
}

/* ============= NOTCH / SAFE AREA (iPhone e Android con tacca) ============= */
@media (max-width: 1024px) {
  .nav { padding-top: max(16px, calc(env(safe-area-inset-top) + 8px)); padding-left: max(var(--pad), env(safe-area-inset-left)); padding-right: max(var(--pad), env(safe-area-inset-right)); }
  .nav--scrolled { padding-top: max(12px, calc(env(safe-area-inset-top) + 4px)); }
  .nav__drawer-inner { padding-top: max(24px, calc(env(safe-area-inset-top) + 24px)); padding-bottom: max(24px, calc(env(safe-area-inset-bottom) + 24px)); }
  .section, .footer { padding-left: max(var(--pad), env(safe-area-inset-left)); padding-right: max(var(--pad), env(safe-area-inset-right)); }
  .footer { padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px)); }
  .hero--full .hero__content { padding-top: max(0px, env(safe-area-inset-top)); }
}

/* ============= MOBILE: FOTO PIU' BASSE, CTA SUBITO VISIBILI ============= */
@media (max-width: 760px) {
  .hero__photos { aspect-ratio: auto; height: min(26vh, 180px); margin-bottom: 18px; }
  .hero--full { padding-top: 84px; }
  .hero__eyebrow { margin-bottom: 12px; font-size: 11px; }
  .hero__title { font-size: clamp(30px, 8.2vw, 42px); }
  .hero__sub { font-size: 14px; line-height: 1.5; margin: 10px 0 14px; }
  .hero__actions { gap: 10px; }
  .hero__meta { margin: 26px 0 0; padding-top: 16px; gap: 10px; }
  .hero__meta-v { font-size: 16px; }

  /* Tutte le altre foto: formato orizzontale, mai colonne alte */
  .specialita__list .specialita__media { aspect-ratio: 16/11; }
  .spec-card .specialita__media { aspect-ratio: 16/10; }
  .storia__media { aspect-ratio: 4/3.2; }
  .ig-card__crop,
  .ig-card:nth-child(5n+1) .ig-card__crop,
  .ig-card:nth-child(5n+2) .ig-card__crop,
  .ig-card:nth-child(5n+3) .ig-card__crop,
  .ig-card:nth-child(5n+4) .ig-card__crop,
  .ig-card:nth-child(5n) .ig-card__crop { aspect-ratio: 1/1; }
  .ig-card--reel:nth-child(n) .ig-card__crop { aspect-ratio: 4/5; }
}

/* ============= MOBILE: HERO CON FOTO DI FONDO ============= */
/* Come in desktop: le foto stanno dietro al testo, velate di crema, e si
   alternano in dissolvenza. Niente card fotografica sopra il titolo. */
@media (max-width: 760px) {
  .hero--full { position: relative; overflow: hidden; padding-top: 104px; padding-bottom: 34px; }
  .hero__photos { position: absolute; inset: 0; height: auto; width: 100%; margin: 0; z-index: 0; background: none; }
  .hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .hero__scrim {
    display: block; position: absolute; inset: 0; z-index: 1;
    /* Velo piu' fitto a sinistra, dove sta il testo, e sempre piu' aperto
       verso destra, dove la foto resta leggibile. */
    background:
      linear-gradient(90deg,
        rgba(245,237,224, 0.96) 0%,
        rgba(245,237,224, 0.90) 40%,
        rgba(245,237,224, 0.62) 74%,
        rgba(245,237,224, 0.36) 100%),
      linear-gradient(180deg,
        rgba(245,237,224, 0.48) 0%,
        rgba(245,237,224, 0.26) 45%,
        rgba(245,237,224, 0.68) 100%);
  }
  .hero__photo { filter: saturate(0.92) brightness(1.02); }
  .hero__content, .hero__meta { position: relative; z-index: 2; }
  .hero__title { font-size: clamp(32px, 8.8vw, 46px); }
  .hero__meta { border-top: 1px solid rgba(42,24,16,0.16); }
}

/* ============= GALLERIA: "MOSTRA ALTRI POST" ============= */
.gallery__more { display: none; }
.ig-card[hidden] { display: none; }
@media (max-width: 760px) {
  .gallery__more {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 15px 20px;
    background: none;
    border: 1px solid var(--line);
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    transition: border-color .2s ease, background .2s ease;
  }
  .gallery__more[hidden] { display: none; }
  .gallery__more:hover, .gallery__more:active { border-color: var(--accentDark); background: color-mix(in srgb, var(--accent) 10%, transparent); }
  .gallery__more span { color: var(--inkSoft); letter-spacing: 0.1em; }
}

/* ============= MOBILE: LANDING A TUTTA ALTEZZA ============= */
/* L'hero occupa la schermata meno la barra scorrevole, che resta cosi'
   appoggiata al bordo inferiore della prima videata. */
@media (max-width: 760px) {
  .marquee { height: 56px; padding: 0; display: flex; align-items: center; }
  .hero--full {
    min-height: calc(100vh - 56px);
    display: flex; flex-direction: column; justify-content: center;
    padding-top: 96px; padding-bottom: 22px;
  }
  .hero__photos, .hero__scrim { z-index: 0; }
  .hero__scrim { z-index: 1; }
  .hero__meta { margin-top: auto; padding-top: 18px; }
}
@supports (height: 100dvh) {
  @media (max-width: 760px) {
    .hero--full { min-height: calc(100dvh - 56px); }
  }
}

@media (max-width: 760px) {
  .hero--full .hero__sub { display: none; }
}

/* ============= MOBILE: HERO RICOMPOSTO (senza paragrafo) ============= */
@media (max-width: 760px) {
  .hero--full { justify-content: flex-start; padding-top: 130px; padding-bottom: 20px; }
  .hero--full .hero__content { display: flex; flex-direction: column; flex: 1 1 auto; }
  .hero__eyebrow { margin-bottom: 20px; }
  .hero__title { font-size: clamp(38px, 10.6vw, 58px); line-height: 0.98; }
  .hero__actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 40px; }
  .hero__actions .btn { width: 100%; justify-content: center; text-align: center; padding: 16px 22px; }
  .hero__meta { margin-top: 28px; grid-template-columns: 1fr 1fr; gap: 12px 18px; padding-top: 20px; }
  .hero__meta-k { font-size: 9.5px; }
  .hero__meta-v { font-size: 15px; }
}
