/* tastemaker build stamp
   macrostructure: Poster Fold (12) · nav N7 retracting announcement + hide-on-scroll bar + mega panel
   hero H3 photographic fold, bottom-left copy · features F7 product grid, lens lab (interactive), F4 workshop steps
   proof P3 single quote + review row · CTA lead form split · footer Ft4 statement close + contacts + legal
   mood: elegant/editorial leaning premium · palette: hand-directed (cobalt + tortoiseshell amber on sand), matrix checked
   contrast: ink/sand 15.63 · cobalt/sand 7.93 · white/cobalt 8.84 · ink/amber 7.80 · sand/petrol 13.26 · muted/sand 5.75
   type: Bodoni Moda (display) + Geist (text) + Geist Mono (spec labels only)
   critique: show-dont-tell 4 · hierarchy 4 · specificity 4 · restraint 4 · variety 4 · philosophy 4
             color 4 · mood 4 · typography 4 · spatial 4 · overall 4 */

/* Drako: foglio di stile principale. Solo tema chiaro.
   Sistema di forme: raggio 2 px su pulsanti, campi e schede. Motivo: la lente (maschera SVG) e l'orizzonte con il mezzo sole.
   Z-index: header 50, mega menu 51, menu mobile 60, carrello 70, finestra cookie 80, banner cookie 79. */

@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;

  --paper: #F6F2EB;
  --paper-2: #EEE8DD;
  --surface: #FFFFFF;
  --ink: #161A21;
  --ink-2: #353A44;
  --muted: #5A5F68;
  --line: #D9D1C4;
  --line-strong: #B4A995;
  --cobalt: #1D3FAE;
  --cobalt-deep: #152F86;
  --cobalt-tint: #E4E9F7;
  --amber: #E2A13B;
  --amber-soft: #F5E2BC;
  --petrol: #0F2A3D;
  --petrol-2: #183B53;
  --on-dark: #F6F2EB;
  --on-dark-muted: #B9C2CC;
  --error: #A3261B;
  --error-bg: #FBEDEA;
  --success: #1E6B47;
  --success-bg: #E7F2EC;

  --font-display: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-hero: clamp(2.45rem, 1.25rem + 3.4vw, 4.7rem);
  --fs-h2: clamp(2rem, 1.35rem + 2.2vw, 3.3rem);
  --fs-h3: clamp(1.35rem, 1.15rem + 0.6vw, 1.75rem);
  --fs-lead: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;
  --fs-label: 0.74rem;

  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem; --s-10: 8rem; --s-11: 10rem;
  --section: clamp(4.5rem, 2.6rem + 6.5vw, 8.5rem);
  --section-lg: clamp(5.5rem, 3rem + 8vw, 11rem);
  --gutter: clamp(1rem, 0.4rem + 3vw, 3rem);
  --wrap: 1320px;
  --radius: 2px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-micro: 160ms;
  --dur-ui: 220ms;
  --dur-panel: 320ms;

  --header-h: 72px;
  --ann-h: 36px;
  --shadow-card: 0 1px 2px rgba(22, 26, 33, 0.06), 0 8px 24px -12px rgba(22, 26, 33, 0.18);
  --shadow-pop: 0 2px 6px rgba(22, 26, 33, 0.08), 0 24px 48px -20px rgba(22, 26, 33, 0.35);

  --lens-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 72'%3E%3Cpath d='M9 5.5C31 0.5 69 0.5 91 5.5C98.5 7.3 100.4 14 98.8 23.5C96 41 87 62 63 68.5C54.5 70.8 45.5 70.8 37 68.5C13 62 4 41 1.2 23.5C-0.4 14 1.5 7.3 9 5.5Z'/%3E%3C/svg%3E");
}

/* ---------- Reset essenziale ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--cobalt-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.12; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: var(--radius); }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--amber); }
::selection { background: var(--amber-soft); color: var(--ink); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 100; background: var(--ink); color: var(--paper); padding: 0.7rem 1rem; border-radius: var(--radius); text-decoration: none; }
.skip-link:focus { top: 0.75rem; color: var(--paper); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 860px; }
.section { padding-block: var(--section); }
.section--lg { padding-block: var(--section-lg); }
.section--tint { background: var(--paper-2); }
.section--white { background: var(--surface); }
.section--dark { background: var(--petrol); color: var(--on-dark); }
.section--dark a:not(.btn) { color: var(--on-dark); }
.section + .section--tint, .section--tint + .section { border-top: 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Tipografia ---------- */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.012em; font-optical-sizing: auto; }
.h2 { font-family: var(--font-display); font-size: var(--fs-h2); letter-spacing: -0.01em; line-height: 1.08; }
.h3 { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.18; }
.h2 em, .h3 em, .hero__title em, .display em { font-style: italic; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.section--dark .lead { color: var(--on-dark-muted); }
.muted { color: var(--muted); }
.label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}
.section--dark .label { color: var(--on-dark-muted); }
.spec { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.box-glyph { display: inline-block; width: 0.62em; height: 0.62em; border: 1.5px solid currentColor; margin-inline: 0.12em; vertical-align: -0.02em; }
.num { font-variant-numeric: tabular-nums; }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem); margin-top: 2.2em; line-height: 1.15; }
.prose h3 { font-family: var(--font-sans); font-size: 1.12rem; font-weight: 600; margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.45em; }
.prose strong { font-weight: 600; }
.prose table { font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; background: var(--paper-2); }

/* Intestazioni di sezione (S1 sospesa, S4 etichetta impilata) */
.section-head { display: grid; gap: var(--s-4); margin-bottom: clamp(2.25rem, 1.5rem + 2.5vw, 4rem); max-width: 760px; }
.section-head--split { max-width: none; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s-5) var(--s-7); }
.section-head--split .lead { grid-column: 1; }
.section-head--split .section-head__aside { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
@media (max-width: 760px) {
  .section-head--split { grid-template-columns: 1fr; }
  .section-head--split .section-head__aside { grid-column: 1; grid-row: auto; }
}

/* ---------- Pulsanti ---------- */
.btn {
  --btn-bg: var(--cobalt); --btn-fg: #FFFFFF; --btn-bd: var(--cobalt);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px; padding: 0.8rem 1.4rem;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 500; letter-spacing: 0.01em; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-ui) var(--ease-out);
}
.btn:hover { --btn-bg: var(--cobalt-deep); --btn-bd: var(--cobalt-deep); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1.15em; height: 1.15em; flex: none; transition: transform var(--dur-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:hover .icon--arrow { transform: translateX(3px); } }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--ink); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink); }
.btn--light { --btn-bg: var(--on-dark); --btn-fg: var(--ink); --btn-bd: var(--on-dark); }
.btn--light:hover { --btn-bg: #FFFFFF; --btn-fg: var(--ink); --btn-bd: #FFFFFF; }
.btn--outline-light { --btn-bg: transparent; --btn-fg: var(--on-dark); --btn-bd: rgba(246, 242, 235, 0.7); }
.btn--outline-light:hover { --btn-bg: var(--on-dark); --btn-fg: var(--ink); --btn-bd: var(--on-dark); }
.btn--amber { --btn-bg: var(--amber); --btn-fg: var(--ink); --btn-bd: var(--amber); }
.btn--amber:hover { --btn-bg: #EDB357; --btn-fg: var(--ink); --btn-bd: #EDB357; }
.btn--sm { min-height: 40px; padding: 0.55rem 0.95rem; font-size: 0.88rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 500; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 0.15rem;
}
.link-arrow .icon { width: 1.05em; height: 1.05em; transition: transform var(--dur-ui) var(--ease-out); }
.link-arrow:hover { color: var(--cobalt); }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover .icon { transform: translate(2px, -2px); } }
.section--dark .link-arrow { color: var(--on-dark); }
.section--dark .link-arrow:hover { color: var(--amber); }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  transition: transform var(--dur-panel) var(--ease-out);
}
.site-header.is-compact { transform: translateY(calc(var(--ann-h) * -1)); }
.site-header.is-hidden { transform: translateY(-100%); }
.announce {
  background: var(--petrol); color: var(--on-dark);
  font-size: 0.8rem; letter-spacing: 0.01em;
  height: var(--ann-h); display: flex; align-items: center; overflow: hidden;
}
.announce__inner { display: flex; justify-content: center; gap: 2.25rem; white-space: nowrap; }
.announce__inner span { display: inline-flex; align-items: center; gap: 0.45rem; }
.announce__inner .icon { width: 1rem; height: 1rem; color: var(--amber); }
.announce a { color: var(--on-dark); }
@media (max-width: 900px) { .announce__inner span:not(:first-child) { display: none; } }

.bar {
  background: rgba(246, 242, 235, 0.94);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar__inner { height: var(--header-h); display: flex; align-items: center; gap: var(--s-5); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 30px; width: auto; }
.nav { margin-inline: auto; }
.nav__list { list-style: none; display: flex; align-items: center; gap: clamp(0.9rem, 0.2rem + 1.3vw, 1.9rem); }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.5rem 0; background: none; border: 0;
  color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 450;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.2rem; height: 1px; background: currentColor;
  opacity: 0; transform: scaleX(0.35); transform-origin: left; transition: transform var(--dur-ui) var(--ease-out), opacity var(--dur-micro) var(--ease-out);
}
.nav__link:hover, .nav__link[aria-current="page"], .nav__link[aria-expanded="true"] { color: var(--cobalt); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { opacity: 1; transform: scaleX(1); }
.nav__link .icon { width: 0.9rem; height: 0.9rem; transition: transform var(--dur-ui) var(--ease-out); }
.nav__link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.bar__actions { display: flex; align-items: center; gap: var(--s-2); flex: none; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-width: 44px; height: 44px; padding: 0 0.6rem;
  background: none; border: 1px solid transparent; border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-size: 0.92rem;
  transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
.icon-btn:hover { border-color: var(--line); background: var(--surface); color: var(--ink); }
.icon-btn .icon { width: 1.4rem; height: 1.4rem; }
.cart-count {
  display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 0.3rem;
  background: var(--ink); color: var(--paper); border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.72rem; font-variant-numeric: tabular-nums;
}
.cart-count[data-empty="true"] { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.cart-count.is-bumped { animation: bump 280ms var(--ease-out); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.3); } 100% { transform: scale(1); } }
.menu-toggle { display: none; }
@media (max-width: 1100px) {
  .nav, .mega { display: none; }
  .menu-toggle { display: inline-flex; }
  .bar__actions { margin-left: auto; }
  .cart-label { display: none; }
}

/* Mega pannello "Occhiali da sole" */
.mega {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 51;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out), visibility 0s linear var(--dur-ui);
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mega__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 1.1fr); gap: var(--s-7); padding-block: var(--s-6) var(--s-7); }
.mega h2 { margin-bottom: var(--s-4); }
.mega__list { list-style: none; display: grid; gap: 0.15rem; }
.mega__list--cols { grid-template-columns: 1fr 1fr; column-gap: var(--s-5); }
.mega__link {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.6rem; margin-inline: -0.6rem;
  color: var(--ink); text-decoration: none; border-radius: var(--radius);
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.mega__link:hover, .mega__link:focus-visible { background: var(--paper); color: var(--cobalt); }
.mega__link svg.shape-svg { width: 46px; height: 22px; color: var(--ink-2); }
.mega__link small { margin-left: auto; color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; white-space: nowrap; }
.mega__preview { display: grid; gap: var(--s-3); align-content: start; color: var(--ink); text-decoration: none; }
.mega__preview-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); border-radius: var(--radius); }
.mega__preview-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity var(--dur-ui) var(--ease-out); }
.mega__preview-img img.is-swapping { opacity: 0.2; }
.mega__preview strong { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; }

/* Menu mobile */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: var(--paper);
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 0.75rem) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
  transform: translateX(100%); visibility: hidden;
  transition: transform var(--dur-panel) var(--ease-out), visibility 0s linear var(--dur-panel);
  overflow-y: auto; overscroll-behavior: contain;
}
.mobile-menu.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; height: 56px; margin-bottom: var(--s-5); }
.mobile-menu__top img { height: 26px; width: auto; }
.mobile-menu__list { list-style: none; border-top: 1px solid var(--line); }
.mobile-menu__list li { border-bottom: 1px solid var(--line); }
.mobile-menu__list a {
  display: flex; align-items: center; justify-content: space-between; padding: 1rem 0;
  font-family: var(--font-display); font-size: 1.75rem; color: var(--ink); text-decoration: none;
}
.mobile-menu__list a .icon { width: 1.3rem; height: 1.3rem; color: var(--muted); }
.mobile-menu__shapes { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--s-5); }
.mobile-menu__contact { margin-top: auto; padding-top: var(--s-6); display: grid; gap: 0.35rem; font-size: 0.95rem; }
.mobile-menu__contact a { color: var(--ink); }
body.no-scroll { overflow: hidden; }

/* ---------- Breadcrumb ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--cobalt); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }

/* ---------- Chip e filtri ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px; padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent;
  color: var(--ink); text-decoration: none; font-size: 0.9rem; line-height: 1.2;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip svg.shape-svg { width: 30px; height: 15px; }
.tag {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.5rem;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
  background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.tag--amber { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.tag--cobalt { background: var(--cobalt-tint); border-color: var(--cobalt-tint); color: var(--cobalt-deep); }

/* ---------- Scheda prodotto (F7) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.75rem, 1rem + 2vw, 3rem) clamp(1rem, 0.5rem + 1.4vw, 1.75rem); }
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { position: relative; display: flex; flex-direction: column; gap: 0.85rem; }
.card__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--paper-2); border-radius: var(--radius); }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 420ms var(--ease-out), transform 700ms var(--ease-out); }
.card__media img + img { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card__media img:first-child { transform: scale(1.03); }
  .card:hover .card__media img + img { opacity: 1; }
}
.card__badge { position: absolute; top: 0.75rem; left: 0.75rem; z-index: 2; }
.card__body { display: grid; gap: 0.3rem; }
.card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.card__name { font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.55rem); line-height: 1.1; }
.card__name a { color: var(--ink); text-decoration: none; }
.card__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__name a:focus-visible { outline: none; }
.card:has(.card__name a:focus-visible) .card__media { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.card__price { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.card__meta { font-size: 0.86rem; color: var(--muted); line-height: 1.4; }
.card__add {
  position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 3;
  display: inline-flex; align-items: center; gap: 0.4rem; height: 40px; padding: 0 0.85rem;
  background: rgba(255, 255, 255, 0.94); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 500;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-ui) var(--ease-out);
}
.card__add:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card__add .icon { width: 1rem; height: 1rem; }
.card__add.is-added { background: var(--success); border-color: var(--success); color: #fff; }
@media (max-width: 560px) {
  .card__add { right: 0.5rem; bottom: 0.5rem; height: 36px; padding: 0 0.6rem; }
  .card__add span { display: none; }
  .card__meta { font-size: 0.8rem; }
  .card__top { flex-direction: column; gap: 0.15rem; }
}

/* ---------- Form ---------- */
.form { display: grid; gap: var(--s-5); }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }
.form__grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form__grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.4rem; }
.field label, .field .field__label { font-size: 0.9rem; font-weight: 500; }
.field .req { color: var(--error); margin-left: 0.15rem; }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 0.75rem 0.9rem;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 1rem; line-height: 1.4;
  transition: border-color var(--dur-micro) var(--ease-out);
}
.textarea { min-height: 140px; resize: vertical; }
.select { appearance: none; padding-right: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%23161A21' d='M212.24 100.24l-80 80a6 6 0 0 1-8.48 0l-80-80a6 6 0 0 1 8.48-8.48L128 167.51l75.76-75.75a6 6 0 0 1 8.48 8.48Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 1rem; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(29, 63, 174, 0.18); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--error); }
.field__error { color: var(--error); font-size: 0.85rem; display: flex; gap: 0.35rem; align-items: flex-start; }
.field__error .icon { width: 1rem; height: 1rem; margin-top: 0.15rem; }
.field__hint { font-size: 0.82rem; color: var(--muted); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; font-size: 0.92rem; line-height: 1.5; }
.check input { appearance: none; width: 22px; height: 22px; margin: 0.08rem 0 0; border: 1px solid var(--ink-2); border-radius: var(--radius); background: var(--surface); display: grid; place-items: center; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.check input::after { content: ""; width: 11px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--cobalt); border-color: var(--cobalt); }
.check input:checked::after { opacity: 1; }
.field.has-error .check input { border-color: var(--error); }
.radio-cards { display: grid; gap: 0.6rem; }
.radio-card { display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem; align-items: center; padding: 0.9rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color var(--dur-micro) var(--ease-out); }
.radio-card input { appearance: none; width: 20px; height: 20px; margin: 0; border: 1px solid var(--ink-2); border-radius: 50%; display: grid; place-items: center; }
.radio-card input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cobalt); opacity: 0; transform: scale(0.6); transition: transform var(--dur-micro) var(--ease-out), opacity var(--dur-micro) var(--ease-out); }
.radio-card input:checked { border-color: var(--cobalt); }
.radio-card input:checked::after { opacity: 1; transform: scale(1); }
.radio-card:has(input:checked) { border-color: var(--cobalt); box-shadow: 0 0 0 1px var(--cobalt); }
.radio-card small { display: block; color: var(--muted); font-size: 0.84rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { display: flex; gap: 0.75rem; padding: 1rem 1.1rem; border-radius: var(--radius); font-size: 0.95rem; }
.form-alert .icon { margin-top: 0.1rem; }
.form-alert--error { background: var(--error-bg); color: var(--error); }
.form-success {
  display: grid; gap: var(--s-4); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--success-bg); border: 1px solid #BFDCCB; border-radius: var(--radius); color: var(--ink);
}
.form-success__icon { width: 52px; height: 52px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; }
.form-success__icon .icon { width: 1.6rem; height: 1.6rem; }
.form-success h3 { font-family: var(--font-display); font-size: 1.7rem; }
.form-note { font-size: 0.85rem; color: var(--muted); }

/* ---------- Accordion ---------- */
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: 1.2rem 0; font-weight: 500; font-size: 1.05rem;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { color: var(--cobalt); }
.acc summary .acc__icon { position: relative; width: 18px; height: 18px; flex: none; }
.acc summary .acc__icon::before, .acc summary .acc__icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; transition: transform var(--dur-ui) var(--ease-out); }
.acc summary .acc__icon::after { transform: rotate(90deg); }
.acc details[open] summary .acc__icon::after { transform: rotate(0deg); }
.acc__body { padding: 0 0 1.4rem; color: var(--ink-2); max-width: 70ch; }
.acc__body > * + * { margin-top: 0.8em; }
.acc details[open] .acc__body { animation: accIn var(--dur-panel) var(--ease-out); }
@keyframes accIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.section--dark .acc, .section--dark .acc details { border-color: rgba(246, 242, 235, 0.18); }
.section--dark .acc__body { color: var(--on-dark-muted); }

/* ---------- Footer (Ft4) ---------- */
.site-footer { background: var(--petrol); color: var(--on-dark); padding-top: clamp(4rem, 3rem + 4vw, 7rem); }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--amber); }
.footer-statement { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-6); align-items: end; padding-bottom: clamp(3rem, 2rem + 3vw, 5rem); border-bottom: 1px solid rgba(246, 242, 235, 0.16); }
.footer-statement p { font-family: var(--font-display); font-size: clamp(2rem, 1.2rem + 3vw, 3.9rem); line-height: 1.08; max-width: 18ch; letter-spacing: -0.01em; }
.footer-statement em { color: var(--amber); }
@media (max-width: 760px) { .footer-statement { grid-template-columns: 1fr; } }
.footer-main { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: var(--s-7) var(--s-6); padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); }
@media (max-width: 960px) { .footer-main { grid-template-columns: 1fr 1fr; } .footer-contact { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-main { grid-template-columns: 1fr; } }
.footer-contact img { height: 30px; width: auto; margin-bottom: var(--s-5); }
.footer-contact address { font-style: normal; display: grid; gap: 0.85rem; font-size: 1.02rem; }
.footer-contact address a, .footer-contact address span { display: inline-flex; gap: 0.7rem; align-items: flex-start; text-decoration: none; }
.footer-contact address .icon { color: var(--amber); margin-top: 0.15rem; }
.footer-contact .footer-hours { margin-top: var(--s-4); color: var(--on-dark-muted); font-size: 0.9rem; }
.footer-col h2 { margin-bottom: var(--s-4); }
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col a, .footer-col button { text-decoration: none; font-size: 0.97rem; }
.footer-col button { background: none; border: 0; padding: 0; color: var(--on-dark); text-align: left; text-decoration: underline; text-underline-offset: 0.2em; }
.footer-col button:hover { color: var(--amber); }
.footer-legal { border-top: 1px solid rgba(246, 242, 235, 0.16); padding-block: var(--s-5) calc(var(--s-5) + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-6); font-size: 0.82rem; color: var(--on-dark-muted); }
.footer-legal p { max-width: 80ch; }

/* ---------- Carrello laterale ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 69; background: rgba(15, 26, 34, 0.42); opacity: 0; visibility: hidden; transition: opacity var(--dur-panel) var(--ease-out), visibility 0s linear var(--dur-panel); }
.drawer-backdrop.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(440px, 100%);
  background: var(--paper); display: flex; flex-direction: column; box-shadow: var(--shadow-pop);
  transform: translateX(100%); visibility: hidden;
  transition: transform var(--dur-panel) var(--ease-out), visibility 0s linear var(--dur-panel);
}
.drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem var(--s-5); border-bottom: 1px solid var(--line); padding-top: calc(1rem + env(safe-area-inset-top, 0px)); }
.drawer__head h2 { font-family: var(--font-display); font-size: 1.5rem; }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-5); overscroll-behavior: contain; }
.drawer__foot { border-top: 1px solid var(--line); padding: var(--s-5); padding-bottom: calc(var(--s-5) + env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--s-3); background: var(--surface); }
.drawer__row { display: flex; justify-content: space-between; font-size: 0.95rem; }
.drawer__row strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.drawer__empty { display: grid; gap: var(--s-4); justify-items: start; padding-block: var(--s-6); }
.drawer__empty p { color: var(--muted); }
.line-items { list-style: none; display: grid; }
.line-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 0.9rem; padding-block: 1rem; border-bottom: 1px solid var(--line); align-items: start; }
.line-item img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius); background: var(--paper-2); }
.line-item__name { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; }
.line-item__name a { color: var(--ink); text-decoration: none; }
.line-item__meta { font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; }
.line-item__price { font-variant-numeric: tabular-nums; font-weight: 500; text-align: right; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius); margin-top: 0.6rem; background: var(--surface); }
.qty button { width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 0; color: var(--ink); }
.qty button:hover { color: var(--cobalt); }
.qty button .icon { width: 0.95rem; height: 0.95rem; }
.qty output { min-width: 1.8rem; text-align: center; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.line-item__remove { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.6rem; background: none; border: 0; padding: 0.25rem 0; color: var(--muted); font-size: 0.82rem; text-decoration: underline; text-underline-offset: 0.2em; }
.line-item__remove:hover { color: var(--error); }

/* ---------- Banner e preferenze cookie ---------- */
.cookie-banner {
  position: fixed; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 79;
  width: min(410px, calc(100% - 2rem));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop);
  padding: 1.25rem 1.25rem 1.1rem; display: grid; gap: 0.85rem;
  transform: translateY(16px); opacity: 0; transition: transform var(--dur-panel) var(--ease-out), opacity var(--dur-panel) var(--ease-out);
}
.cookie-banner.is-visible { transform: none; opacity: 1; }
.cookie-banner__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cookie-banner__head h2 { font-family: var(--font-display); font-size: 1.3rem; display: flex; align-items: center; gap: 0.5rem; }
.cookie-banner__head h2 .icon { color: var(--amber); }
.cookie-banner p { font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); }
.cookie-banner__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.cookie-banner__more { justify-self: start; background: none; border: 0; padding: 0.2rem 0; color: var(--cobalt); font-size: 0.88rem; text-decoration: underline; text-underline-offset: 0.2em; }
.close-btn { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: var(--radius); color: var(--ink); flex: none; }
.close-btn:hover { border-color: var(--line); background: var(--paper); }
.close-btn .icon { width: 1.25rem; height: 1.25rem; }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(15, 26, 34, 0.5); display: grid; place-items: center; padding: 1rem; opacity: 0; visibility: hidden; transition: opacity var(--dur-panel) var(--ease-out), visibility 0s linear var(--dur-panel); }
.modal-backdrop.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.modal { width: min(560px, 100%); max-height: calc(100dvh - 2rem); overflow-y: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); display: grid; gap: var(--s-4); transform: translateY(10px); transition: transform var(--dur-panel) var(--ease-out); }
.modal-backdrop.is-open .modal { transform: none; }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.modal__head h2 { font-family: var(--font-display); font-size: 1.6rem; }
.pref { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.pref h3 { font-size: 1rem; font-weight: 600; font-family: var(--font-sans); }
.pref p { grid-column: 1 / -1; font-size: 0.88rem; color: var(--ink-2); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background-color var(--dur-ui) var(--ease-out); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform var(--dur-ui) var(--ease-out); }
.switch input:checked + span { background: var(--cobalt); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { background: var(--ink-2); opacity: 0.55; }
.switch input:disabled { cursor: not-allowed; }
.switch input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* ---------- Animazioni di comparsa (solo con JS e movimento consentito) ---------- */
.js-motion [data-reveal], .js-motion [data-reveal-group] > * { opacity: 0; }
.js-motion .hero [data-hero] { opacity: 0; }
.js-motion .hero [data-split] { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
