/* Handmade for Christmas – stili e movimento della pagina.
   Gli stati nascosti valgono solo sotto .hfc-js (messa dallo script, mai con «riduci movimento»)
   e solo finché l'elemento non ha .hfc-in; le animazioni usano fill «backwards», così a fine corsa
   tornano gli stili normali (passaggio del mouse compreso). */
:root { --hfc-curva: cubic-bezier(.2,.7,.2,1); --hfc-molla: cubic-bezier(.34,1.56,.64,1); }
@keyframes hfc-su { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }

/* entrata generica */
.hfc-js .hfc-m-su:not(.hfc-in) { opacity: 0; transform: translate3d(0, 18px, 0); }
.hfc-js .hfc-m-su.hfc-in { animation: hfc-su .8s var(--hfc-curva) var(--hfc-d, 0ms) backwards; }

/* neve */
.hfc-neve { isolation: isolate; overflow: hidden; }
.hfc-neve-tela { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* 1 · testata */
.hfc-testata::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: .33; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .55  0 0 0 0 .62  0 0 0 0 .68  0 0 0 .55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }
.hfc-testata .hfc-neve-tela { z-index: 3; }
.hfc-scena { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); }
.hfc-tagline span { color: #33424C; font-weight: 400; }
.hfc-cta span { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 18px; padding-left: 12px; margin-left: 2px; border-left: 1px solid rgba(255,255,255,.4); }
.hfc-cta::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); transform: skewX(-18deg); }
.hfc-js .hfc-cta:hover::after { animation: hfc-lucida .9s var(--hfc-curva); }
@keyframes hfc-lucida { to { left: 130%; } }
.hfc-js .hfc-scena { animation: hfc-sale-scena 1.7s var(--hfc-curva) .1s backwards; }
@keyframes hfc-sale-scena { from { opacity: 0; transform: translate3d(-50%, 7%, 0) scale(1.02); } to { opacity: 1; transform: translateX(-50%); } }
.hfc-js .hfc-lettering { animation: hfc-emerge 1.1s var(--hfc-curva) .35s backwards; }
@keyframes hfc-emerge { from { opacity: 0; transform: scale(.965); filter: blur(7px); } to { opacity: 1; transform: none; filter: none; } }
.hfc-testata .hfc-m-su:nth-child(1) { --hfc-d: 250ms; }
.hfc-testata .hfc-m-su:nth-child(4) { --hfc-d: 700ms; }
.hfc-testata .hfc-m-su:nth-child(5) { --hfc-d: 820ms; }
.hfc-testata .hfc-m-su:nth-child(6) { --hfc-d: 940ms; }
.hfc-testata .hfc-m-su:nth-child(7) { --hfc-d: 1060ms; }

/* 2 · quattro fatti, con il cumulo di neve che sale sulla testata */
.hfc-cumulo-sopra::before { content: ""; position: absolute; left: 0; right: 0; top: -91px; height: 92px; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1280 92' preserveAspectRatio='none'><path fill='%23F8F5EF' d='M0,58 C90,40 170,62 260,52 C360,40 420,22 520,34 C610,45 660,64 760,56 C860,48 930,26 1030,32 C1120,38 1190,58 1280,50 L1280,92 L0,92 Z'/><path fill='%23F8F5EF' fill-opacity='.55' d='M0,46 C120,30 210,50 330,42 C450,34 520,14 640,24 C760,34 840,52 960,44 C1080,36 1170,20 1280,30 L1280,92 L0,92 Z'/></svg>") no-repeat 0 0 / 100% 100%; }
.hfc-fatto h3 span { color: #C81808; }
.hfc-fatto img { filter: drop-shadow(0 8px 10px rgba(30,42,51,.14)); }
.hfc-js .hfc-m-pacco:not(.hfc-in) img { opacity: 0; transform: translate3d(0, -26px, 0) rotate(-9deg) scale(.9); }
.hfc-js .hfc-m-pacco.hfc-in img { animation: hfc-atterra .9s var(--hfc-molla) var(--hfc-d, 0ms) backwards; }
@keyframes hfc-atterra { from { opacity: 0; transform: translate3d(0, -26px, 0) rotate(-9deg) scale(.9); } to { opacity: 1; transform: none; } }
.hfc-js .hfc-m-pacco:not(.hfc-in) h3, .hfc-js .hfc-m-pacco:not(.hfc-in) p { opacity: 0; }
.hfc-js .hfc-m-pacco.hfc-in h3, .hfc-js .hfc-m-pacco.hfc-in p { animation: hfc-su .7s var(--hfc-curva) calc(var(--hfc-d, 0ms) + 300ms) backwards; }

/* 3 · banchi: l'inchiostro che si posa */
.hfc-banco img { transition: transform .45s var(--hfc-curva); }
.hfc-banco p { transition: color .3s; }
.hfc-banco:hover img { transform: translateY(-5px) rotate(-2deg); }
.hfc-banco:hover p { color: #C81808; }
.hfc-js .hfc-m-inchiostro img, .hfc-js img.hfc-m-inchiostro {
  -webkit-mask-image: linear-gradient(100deg, #000 45%, transparent 55%); mask-image: linear-gradient(100deg, #000 45%, transparent 55%);
  -webkit-mask-size: 240% 100%; mask-size: 240% 100%; -webkit-mask-position: 0 0; mask-position: 0 0; }
.hfc-js .hfc-m-inchiostro:not(.hfc-in) img, .hfc-js img.hfc-m-inchiostro:not(.hfc-in) { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
.hfc-js .hfc-m-inchiostro.hfc-in img, .hfc-js img.hfc-m-inchiostro.hfc-in { animation: hfc-inchiostro 1.15s var(--hfc-curva) var(--hfc-d, 0ms) backwards; }
@keyframes hfc-inchiostro { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
.hfc-js .hfc-m-inchiostro:not(.hfc-in) p { opacity: 0; }
.hfc-js .hfc-m-inchiostro.hfc-in p { animation: hfc-su .6s var(--hfc-curva) calc(var(--hfc-d, 0ms) + 450ms) backwards; }

/* 4 · workshop: la scheda che si posa come un foglio */
.hfc-attesa { transition: transform .5s var(--hfc-curva), box-shadow .5s var(--hfc-curva); }
.hfc-attesa:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -20px rgba(30,42,51,.42); }
.hfc-js .hfc-m-carta:not(.hfc-in) { opacity: 0; transform: translate3d(0, 26px, 0) rotate(.8deg); }
.hfc-js .hfc-m-carta.hfc-in { animation: hfc-carta .9s var(--hfc-curva) var(--hfc-d, 0ms) backwards; }
@keyframes hfc-carta { from { opacity: 0; transform: translate3d(0, 26px, 0) rotate(.8deg); } to { opacity: 1; transform: none; } }

/* 5 · archi, stampa, biglietto */
.hfc-arco img, .hfc-stampa img { will-change: transform; }
.hfc-js .hfc-m-arco:not(.hfc-in) { clip-path: inset(100% 0 0 0 round 215px 215px 18px 18px); }
.hfc-js .hfc-m-arco.hfc-in { animation: hfc-apri 1.3s var(--hfc-curva) var(--hfc-d, 0ms) backwards; }
@keyframes hfc-apri { from { clip-path: inset(100% 0 0 0 round 215px 215px 18px 18px); } to { clip-path: inset(0 0 0 0 round 215px 215px 18px 18px); } }
.hfc-js .hfc-m-arco.hfc-in img { animation: hfc-fuoco 1.6s var(--hfc-curva) backwards; }
@keyframes hfc-fuoco { from { scale: 1.12; } to { scale: 1; } }
.hfc-js .hfc-m-stampa:not(.hfc-in) { opacity: 0; }
.hfc-js .hfc-m-stampa.hfc-in { animation: hfc-posa 1s var(--hfc-molla) .55s backwards; }
@keyframes hfc-posa { from { opacity: 0; transform: translate3d(30px, 40px, 0) rotate(9deg); } to { opacity: 1; transform: rotate(3deg); } }
.hfc-biglietto { filter: drop-shadow(0 18px 26px rgba(30,42,51,.18)); }
.hfc-js .hfc-m-biglietto:not(.hfc-in) { opacity: 0; }
.hfc-js .hfc-m-biglietto.hfc-in { animation: hfc-biglietto 1.05s var(--hfc-molla) .45s backwards; }
@keyframes hfc-biglietto { from { opacity: 0; transform: translate3d(60px, 0, 0) rotate(5deg); } to { opacity: 1; transform: rotate(-1.2deg); } }
.hfc-bg-main {
  -webkit-mask: radial-gradient(circle 11px at 100% 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 11px at 100% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 11px at 100% 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 11px at 100% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; }
.hfc-bg-stub {
  -webkit-mask: radial-gradient(circle 11px at 0 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 11px at 0 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 11px at 0 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 11px at 0 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; }
.hfc-spunta::before { content: "✓"; color: #2F5D3A; font-weight: 600; margin-right: 8px; }

/* 6 · food & wine: dentellatura sopra e sotto */
.hfc-dentellato::before, .hfc-dentellato::after { content: ""; position: absolute; left: 0; right: 0; height: 12px; pointer-events: none; z-index: 1; }
.hfc-dentellato::before { top: -1px; background: radial-gradient(circle at 11px 0, #E6EEF1 9px, transparent 9.5px) 0 0 / 22px 12px repeat-x; }
.hfc-dentellato::after { bottom: -1px; background: radial-gradient(circle at 11px 12px, #F8F5EF 9px, transparent 9.5px) 0 0 / 22px 12px repeat-x; }
.hfc-riga.hfc-m-su:nth-child(1) { --hfc-d: 300ms; }
.hfc-riga.hfc-m-su:nth-child(2) { --hfc-d: 420ms; }
.hfc-riga.hfc-m-su:nth-child(3) { --hfc-d: 540ms; }

/* 7 · come arrivare: mappa, targhetta, icone a tratto (maschere SVG, niente file da caricare) */
.hfc-js .hfc-m-mappa:not(.hfc-in) { clip-path: inset(0 0 100% 0 round 22px); }
.hfc-js .hfc-m-mappa.hfc-in { animation: hfc-mappa 1.2s var(--hfc-curva) backwards; }
@keyframes hfc-mappa { from { clip-path: inset(0 0 100% 0 round 22px); } to { clip-path: inset(0 0 0 0 round 22px); } }
.hfc-mappa .hfc-m-carta { --hfc-d: 800ms; }
.hfc-mappa iframe { filter: saturate(.55) contrast(.96) brightness(1.03); }
.hfc-ico { background-color: #2F5D3A; -webkit-mask: var(--hfc-ico) center / contain no-repeat; mask: var(--hfc-ico) center / contain no-repeat; }
.hfc-ico-auto { --hfc-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M5 17l2-6a3 3 0 0 1 2.8-2h8.4A3 3 0 0 1 21 11l2 6'/><rect x='3.5' y='16' width='21' height='6' rx='2'/><circle cx='8.5' cy='19' r='1'/><circle cx='19.5' cy='19' r='1'/><path d='M6 22v2M22 22v2'/></svg>"); }
.hfc-ico-treno { --hfc-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><rect x='7' y='3.5' width='14' height='17' rx='3'/><path d='M7 12h14M10.5 17h.01M17.5 17h.01M10 20.5 7.5 24.5M18 20.5l2.5 4'/></svg>"); }
.hfc-ico-accessibilita { --hfc-ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><circle cx='14' cy='5' r='2'/><path d='M14 8v7h6l2.5 6'/><path d='M14 11h5'/><path d='M10.5 12.5a6.5 6.5 0 1 0 8 8.2'/></svg>"); }
.hfc-modo.hfc-m-su:nth-child(1) { --hfc-d: 300ms; }
.hfc-modo.hfc-m-su:nth-child(2) { --hfc-d: 420ms; }
.hfc-modo.hfc-m-su:nth-child(3) { --hfc-d: 540ms; }

/* 8 · domande frequenti */
.hfc-divisore::before, .hfc-divisore::after { content: ""; flex: 1; height: 1px; background: #E7E1D7; }
.hfc-faq details { border-top: 1px solid #E7E1D7; }
.hfc-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 4px; cursor: pointer; list-style: none; }
.hfc-faq summary::-webkit-details-marker { display: none; }
.hfc-faq summary::after { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid #1E2A33; box-sizing: border-box;
  background: linear-gradient(#1E2A33, #1E2A33) center / 12px 1.6px no-repeat, linear-gradient(#1E2A33, #1E2A33) center / 1.6px 12px no-repeat;
  transition: transform .45s var(--hfc-curva); }
.hfc-faq details[open] summary::after { transform: rotate(135deg); border-color: #C81808;
  background: linear-gradient(#C81808, #C81808) center / 12px 1.6px no-repeat, linear-gradient(#C81808, #C81808) center / 1.6px 12px no-repeat; }
.hfc-faq summary:hover .hfc-faq-domanda { color: #C81808; }
.hfc-faq summary:focus-visible { outline: 2px solid #C81808; outline-offset: 4px; border-radius: 4px; }
.hfc-js .hfc-faq details[open] > :not(summary) { animation: hfc-risposta .5s var(--hfc-curva); }
@keyframes hfc-risposta { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.hfc-faq > .hfc-m-su:nth-child(1) { --hfc-d: 200ms; } .hfc-faq > .hfc-m-su:nth-child(2) { --hfc-d: 260ms; }
.hfc-faq > .hfc-m-su:nth-child(3) { --hfc-d: 320ms; } .hfc-faq > .hfc-m-su:nth-child(4) { --hfc-d: 380ms; }
.hfc-faq > .hfc-m-su:nth-child(5) { --hfc-d: 440ms; } .hfc-faq > .hfc-m-su:nth-child(6) { --hfc-d: 500ms; }
.hfc-faq > .hfc-m-su:nth-child(7) { --hfc-d: 560ms; } .hfc-faq > .hfc-m-su:nth-child(8) { --hfc-d: 620ms; }

/* 9 · acquisto: cumulo capovolto, cassa, pacchetti, schede dei giorni, widget «Aggiungi al Carrello TJ» */
.hfc-acquisto { scroll-margin-top: 90px; }
html.hfc-js { scroll-behavior: smooth; }
.hfc-cumulo-capovolto::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 92px; pointer-events: none; z-index: 0; transform: scaleY(-1);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1280 92' preserveAspectRatio='none'><path fill='%23F8F5EF' d='M0,58 C90,40 170,62 260,52 C360,40 420,22 520,34 C610,45 660,64 760,56 C860,48 930,26 1030,32 C1120,38 1190,58 1280,50 L1280,92 L0,92 Z'/><path fill='%23F8F5EF' fill-opacity='.55' d='M0,46 C120,30 210,50 330,42 C450,34 520,14 640,24 C760,34 840,52 960,44 C1080,36 1170,20 1280,30 L1280,92 L0,92 Z'/></svg>") no-repeat 0 0 / 100% 100%; }
.hfc-pacco-s, .hfc-pacco-d { filter: drop-shadow(0 10px 12px rgba(30,42,51,.2)); }
.hfc-js .hfc-m-sale:not(.hfc-in) { opacity: 0; transform: translate3d(0, 40px, 0) scale(.98); }
.hfc-js .hfc-m-sale.hfc-in { animation: hfc-sale 1.1s var(--hfc-curva) .1s backwards; }
@keyframes hfc-sale { from { opacity: 0; transform: translate3d(0, 40px, 0) scale(.98); } to { opacity: 1; transform: none; } }
.hfc-js .hfc-m-sale:not(.hfc-in) .hfc-pacco-s, .hfc-js .hfc-m-sale:not(.hfc-in) .hfc-pacco-d { opacity: 0; }
.hfc-js .hfc-m-sale.hfc-in .hfc-pacco-s { animation: hfc-cade-s 1s var(--hfc-molla) .7s backwards; }
.hfc-js .hfc-m-sale.hfc-in .hfc-pacco-d { animation: hfc-cade-d 1s var(--hfc-molla) .85s backwards; }
@keyframes hfc-cade-s { from { opacity: 0; transform: translate3d(0, -40px, 0) rotate(-24deg); } to { opacity: 1; transform: rotate(-10deg); } }
@keyframes hfc-cade-d { from { opacity: 0; transform: translate3d(0, -40px, 0) rotate(22deg); } to { opacity: 1; transform: rotate(8deg); } }
.hfc-giorni [role="tablist"] { display: inline-flex; flex-direction: row; gap: 0; width: auto; align-self: flex-start; background: #F1EEE8; border-radius: 999px; padding: 4px; }
.hfc-giorni [role="tab"] { all: unset; cursor: pointer; font: 600 14px/1.2 Inter, system-ui, sans-serif; padding: 10px 18px; border-radius: 999px; color: #566570; transition: background-color .35s var(--hfc-curva), color .35s; }
.hfc-giorni [role="tab"][aria-selected="true"] { background: #1E2A33; color: #FFFFFF; }
.hfc-giorni [role="tab"]:focus-visible { outline: 2px solid #C81808; outline-offset: 2px; }
.hfc-js .hfc-giorni [role="tabpanel"].e--selected { animation: hfc-scambio .5s var(--hfc-curva); }
@keyframes hfc-scambio { from { opacity: 0; transform: translate3d(12px, 0, 0); } to { opacity: 1; transform: none; } }
.hfc-acquisto .my-custom-quantity { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 0; border-bottom: 1px solid #E7E1D7; font-family: Inter, system-ui, sans-serif; }
.hfc-acquisto .my-custom-quantity > div:first-child { flex: 1 1 260px; min-width: 0; }
.hfc-acquisto .my-custom-quantity .product-title { display: block; font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 17px; line-height: 1.3; color: #1E2A33; }
.hfc-acquisto .my-custom-quantity small { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: #566570; }
.hfc-acquisto .meta-informations { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hfc-acquisto .quantity { display: inline-flex; align-items: center; border: 1px solid #DCD5CA; border-radius: 999px; overflow: hidden; font-size: 0; color: transparent; }
.hfc-acquisto .quantity button { all: unset; cursor: pointer; width: 36px; height: 38px; text-align: center; font: 500 18px/38px Inter, system-ui, sans-serif; color: #1E2A33; }
.hfc-acquisto .quantity button:hover { background: #F1EEE8; }
.hfc-acquisto .quantity input { width: 34px !important; height: 38px; border: 0; padding: 0; text-align: center; font: 600 15px Inter, system-ui, sans-serif; color: #1E2A33; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.hfc-acquisto .quantity input::-webkit-inner-spin-button, .hfc-acquisto .quantity input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.hfc-acquisto .add-to-cart-button { all: unset; cursor: pointer; background: #C81808; color: #FFFFFF; font: 600 14px/1.2 Inter, system-ui, sans-serif; padding: 11px 18px; border-radius: 999px; transition: background-color .25s; }
.hfc-acquisto .add-to-cart-button:hover { background: #A3120A; }
.hfc-acquisto .add-to-cart-button:focus-visible, .hfc-acquisto .quantity button:focus-visible { outline: 2px solid #1E2A33; outline-offset: 2px; }
