/* ==========================================================================
   Ventiquattro — design system
   Notte di Natale: verde abete profondo, velluto rosso, foglia d'oro, carta crema
   ========================================================================== */

@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Pinyon'; src: url('/fonts/pinyon.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --night-900: #04100b;
  --night-800: #071a12;
  --night-700: #0b2519;
  --night-600: #123524;
  --pine: #1d4a33;
  --pine-light: #2f6b4a;
  --red-900: #3d0710;
  --red-700: #6e0e1d;
  --red-600: #8f1426;
  --red-500: #c8102e;
  --red-400: #e0384f;
  --gold-100: #fff3d1;
  --gold-200: #f6dfa0;
  --gold-300: #ecc56c;
  --gold-400: #d6a646;
  --gold-500: #b5852c;
  --gold-600: #8a6420;
  --cream-50: #fffcf5;
  --cream-100: #fbf5e9;
  --cream-200: #f3e8d2;
  --cream-300: #e7d6b5;
  --ink: #23170f;
  --ink-soft: #5a4636;
  --ink-mute: #8a7562;
  --snow: #f7fbff;

  --gold-foil: linear-gradient(135deg, #fff3d1 0%, #ecc56c 22%, #b5852c 45%, #f6dfa0 62%, #c99a3c 80%, #8a6420 100%);
  --gold-text: linear-gradient(120deg, #fff1c9 0%, #f1cd75 30%, #c99a3c 55%, #f9e3a6 75%, #d6a646 100%);
  --red-velvet: radial-gradient(120% 140% at 30% 20%, #b3152c 0%, #7a0f1f 45%, #3d0710 100%);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-script: 'Pinyon', 'Snell Roundhand', cursive;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 10px 30px -12px rgba(20, 10, 0, .25);
  --shadow-deep: 0 30px 80px -20px rgba(0, 0, 0, .55);
  --glow-gold: 0 0 0 1px rgba(246, 223, 160, .35), 0 0 40px -6px rgba(236, 197, 108, .55);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--night-800);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--gold-300); color: var(--night-900); }
:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.015em; font-variation-settings: 'SOFT' 100, 'WONK' 0, 'opsz' 144; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 400; }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
p { margin: 0 0 1em; }
em, .italic { font-style: italic; }
.gold-text {
  background: var(--gold-text); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.script { font-family: var(--font-script); font-weight: 400; letter-spacing: 0; font-size: 1.3em; line-height: .8; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-body); font-size: .76rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-400);
}
.eyebrow::before, .eyebrow::after { content: ''; width: 26px; height: 1px; background: currentColor; opacity: .6; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; }
.dark .lead { color: rgba(251, 245, 233, .78); }

/* ---------- Pulsanti ---------- */
.btn {
  --bg: var(--red-500);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .95em 1.7em; border-radius: 999px; border: 0;
  background: var(--bg); color: #fff; text-decoration: none; font-weight: 700; font-size: .98rem; letter-spacing: .01em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 -2px 0 rgba(0, 0, 0, .2) inset, 0 12px 28px -10px rgba(200, 16, 46, .7);
  transition: transform .35s var(--ease-spring), box-shadow .3s, filter .3s;
  overflow: hidden; isolation: isolate; white-space: nowrap;
}
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .9s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-gold { background: var(--gold-foil); background-size: 160% 160%; color: var(--night-900); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 12px 30px -10px rgba(214, 166, 70, .8); }
.btn-ghost { background: transparent; color: currentColor; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.light .btn-ghost:hover { background: rgba(0, 0, 0, .04); }
.btn-dark { background: var(--night-700); box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .6); }
.btn-sm { padding: .6em 1.15em; font-size: .88rem; }
.btn-lg { padding: 1.1em 2.1em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.link { color: var(--red-600); font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.dark .link { color: var(--gold-300); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .4s, backdrop-filter .4s, box-shadow .4s, padding .4s;
  padding: 18px 0;
}
/* lo sfondo sfocato sta in uno pseudo-elemento: backdrop-filter sul genitore romperebbe il menu mobile (position: fixed) */
.site-header::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: rgba(5, 18, 12, .8); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 rgba(246, 223, 160, .12); }
.site-header.scrolled::before { opacity: 1; }
.site-header.scrolled { padding: 10px 0; }
.site-header .container { display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream-100); font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -.01em; }
.logo-mark { width: 36px; height: 36px; flex: none; }
.logo b { font-weight: 500; }
.logo i { font-family: var(--font-script); font-style: normal; color: var(--gold-300); font-size: 1.15em; margin-left: -2px; }
.nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav a:not(.btn) { color: rgba(251, 245, 233, .82); text-decoration: none; font-size: .93rem; font-weight: 600; position: relative; }
.nav a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--gold-300); transform: scaleX(0); transition: transform .35s var(--ease-out); }
.nav a:not(.btn):hover { color: #fff; }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--cream-100); padding: 8px; }
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: 0; z-index: 60; flex-direction: column; justify-content: center; gap: 30px; background: rgba(4, 16, 11, .98); transform: translateY(-100%); visibility: hidden; transition: transform .5s var(--ease-out), visibility .5s; }
  .nav a:not(.btn) { font-size: 1.4rem; font-family: var(--font-display); }
  .nav.open { transform: none; visibility: visible; }
  .nav-close { position: absolute; top: 20px; right: 20px; background: none; border: 0; color: #fff; font-size: 2rem; }
}
@media (min-width: 921px) { .nav-close { display: none; } }

/* ---------- Sezioni ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.dark { color: var(--cream-100); }
.light { background: var(--cream-100); color: var(--ink); }
.light-paper {
  background:
    radial-gradient(1200px 400px at 50% 0%, rgba(255, 255, 255, .7), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E"),
    var(--cream-100);
  color: var(--ink);
}
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(48px, 6vw, 80px); }
.section-head .lead { margin-inline: auto; }
.section-head h2 { margin-top: .35em; }

/* Bordo festonato tra sezioni */
.scallop-top::before, .scallop-bottom::after {
  content: ''; position: absolute; left: 0; right: 0; height: 22px; z-index: 2;
  background: radial-gradient(circle at 15px -4px, transparent 16px, var(--cream-100) 17px) repeat-x;
  background-size: 30px 22px;
}
.scallop-top::before { top: -21px; transform: scaleY(-1); }
.scallop-bottom::after { bottom: -21px; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden;
  padding: 130px 0 90px;
  background:
    radial-gradient(900px 600px at 78% 40%, rgba(214, 166, 70, .16), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(200, 16, 46, .18), transparent 60%),
    radial-gradient(1200px 800px at 50% -10%, #154030 0%, var(--night-800) 55%, var(--night-900) 100%);
}
.hero::after { /* collina innevata */
  content: ''; position: absolute; left: -5%; right: -5%; bottom: -1px; height: 120px; z-index: 1;
  background: radial-gradient(120% 140px at 50% 140px, var(--cream-100) 98%, transparent 100%);
}
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.hero h1 { color: var(--cream-50); margin: .3em 0 .35em; }
.hero h1 .script { display: inline-block; font-size: 1.15em; transform: translateY(.08em) rotate(-4deg); margin: 0 .05em; }
.hero .lead { color: rgba(251, 245, 233, .78); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin: 34px 0 22px; }
.hero-note { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: rgba(251, 245, 233, .65); }
.hero-note .stars { color: var(--gold-300); letter-spacing: 2px; }
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 30px; font-size: .84rem; color: rgba(251, 245, 233, .65); }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { width: 16px; height: 16px; color: var(--gold-300); }
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-ctas, .hero-note, .trust-row { justify-content: center; }
}

/* Ghirlanda di luci */
.garland { position: absolute; top: 74px; left: 0; right: 0; height: 70px; z-index: 1; pointer-events: none; opacity: .9; }
.garland svg { width: 100%; height: 100%; }
.bulb { animation: twinkle 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bulb:nth-child(3n) { animation-delay: .6s; }
.bulb:nth-child(3n+1) { animation-delay: 1.3s; }
.bulb:nth-child(4n) { animation-delay: 1.9s; }
@keyframes twinkle { 0%, 100% { opacity: 1; filter: drop-shadow(0 0 6px currentColor); } 50% { opacity: .45; filter: none; } }

/* Neve */
#snow { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.hero #snow, .snow-local { position: absolute; }

/* Calendario 3D dell'hero */
.hero-visual { position: relative; perspective: 1600px; }
.hero-cal {
  position: relative; aspect-ratio: 4 / 5; max-width: 470px; margin: 0 auto;
  border-radius: 26px; padding: 22px;
  background:
    radial-gradient(140% 100% at 30% 0%, #1c5139 0%, #0e2d20 60%, #081d14 100%);
  box-shadow: 0 0 0 1px rgba(246, 223, 160, .25), 0 0 0 9px rgba(11, 37, 25, .9), 0 0 0 10px rgba(246, 223, 160, .4), var(--shadow-deep), 0 0 120px -20px rgba(236, 197, 108, .35);
  transform: rotateY(-14deg) rotateX(6deg); transform-style: preserve-3d;
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty { 0%, 100% { transform: rotateY(-14deg) rotateX(6deg) translateY(0); } 50% { transform: rotateY(-10deg) rotateX(4deg) translateY(-12px); } }
.hero-cal .cal-title { text-align: center; color: var(--gold-200); font-family: var(--font-script); font-size: 2.2rem; line-height: 1; margin: 2px 0 14px; text-shadow: 0 0 20px rgba(236, 197, 108, .5); }
.hero-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 9px; height: calc(100% - 56px); }
.hero-door {
  position: relative; border-radius: 10px; perspective: 600px;
  background: radial-gradient(circle at 50% 50%, #fff3d1, #f1cd75 40%, #c99a3c 100%);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .35);
}
.hero-door .leaf {
  position: absolute; inset: 0; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.35rem; color: var(--gold-200);
  background: linear-gradient(160deg, #a3182d, #6e0e1d);
  box-shadow: inset 0 0 0 1px rgba(246, 223, 160, .35), inset 0 0 0 4px rgba(0, 0, 0, .12), inset 0 0 0 5px rgba(246, 223, 160, .25);
  transform-origin: left center; transition: transform 1.1s var(--ease-out); backface-visibility: hidden;
}
.hero-door:nth-child(3n) .leaf { background: linear-gradient(160deg, #24603f, #12351f); }
.hero-door:nth-child(4n+1) .leaf { background: linear-gradient(160deg, #f8efdc, #e3d0aa); color: var(--red-600); }
.hero-door .peek { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; }
.hero-door.open .leaf { transform: rotateY(-115deg); box-shadow: -8px 0 18px rgba(0, 0, 0, .4); }
.hero-door.big { grid-column: span 2; grid-row: span 2; }
.hero-door.big .leaf { font-size: 2.6rem; background: var(--red-velvet); }
.hero-door.big .leaf::before, .hero-door.big .leaf::after { content: ''; position: absolute; background: var(--gold-foil); }
.hero-door.big .leaf::before { left: 50%; top: 0; bottom: 0; width: 12px; transform: translateX(-50%); }
.hero-door.big .leaf::after { top: 50%; left: 0; right: 0; height: 12px; transform: translateY(-50%); }
.hero-door.big .leaf span { position: relative; z-index: 1; background: var(--red-600); padding: 2px 12px; border-radius: 8px; box-shadow: 0 0 0 2px var(--gold-300); }
.hero-tag {
  position: absolute; z-index: 4; padding: 12px 16px; border-radius: 16px; font-size: .86rem; line-height: 1.35;
  background: rgba(255, 252, 245, .96); color: var(--ink); box-shadow: var(--shadow-deep); max-width: 220px;
  animation: bob 5s ease-in-out infinite;
}
.hero-tag b { font-family: var(--font-display); font-weight: 600; display: block; font-size: 1rem; }
.hero-tag.t1 { left: -30px; top: 16%; }
.hero-tag.t2 { right: -24px; bottom: 14%; animation-delay: -2.5s; }
.hero-tag .tag-ico { font-size: 1.4rem; float: left; margin-right: 10px; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@media (max-width: 560px) { .hero-tag { display: none; } .hero-cal { transform: none; animation: none; } }

/* ---------- Marquee ---------- */
.marquee { background: var(--cream-100); padding: 18px 0 40px; overflow: hidden; color: var(--ink-mute); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; font-family: var(--font-display); font-style: italic; font-size: 1.3rem; }
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; white-space: nowrap; }
.marquee-track span::after { content: '✦'; color: var(--gold-400); font-style: normal; font-size: .9rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Griglia caratteristiche ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  position: relative; padding: 34px 30px 30px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff, var(--cream-50));
  box-shadow: 0 0 0 1px rgba(181, 133, 44, .14), var(--shadow-soft);
  transition: transform .5s var(--ease-out), box-shadow .5s;
  overflow: hidden;
}
.feature:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px rgba(181, 133, 44, .3), 0 30px 60px -25px rgba(60, 30, 0, .35); }
.feature-ico {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 20px;
  background: var(--red-velvet); color: var(--gold-200); box-shadow: 0 10px 22px -8px rgba(143, 20, 38, .7);
}
.feature:nth-child(3n+2) .feature-ico { background: linear-gradient(150deg, var(--pine-light), var(--night-700)); box-shadow: 0 10px 22px -8px rgba(18, 53, 36, .7); }
.feature:nth-child(3n) .feature-ico { background: var(--gold-foil); color: var(--red-700); box-shadow: 0 10px 22px -8px rgba(181, 133, 44, .7); }
.feature-ico svg { width: 28px; height: 28px; }
.feature h3 { margin-bottom: .4em; }
.feature p { color: var(--ink-soft); font-size: .97rem; margin: 0; }
.feature .new { position: absolute; top: 22px; right: 22px; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: var(--red-500); color: #fff; padding: 4px 9px; border-radius: 99px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* ---------- Demo interattiva ---------- */
.demo-section { background: radial-gradient(1000px 700px at 50% 30%, #123524, var(--night-800) 70%); }
.demo-wrap { display: grid; grid-template-columns: 330px 1fr; gap: 50px; align-items: start; }
.demo-controls { position: sticky; top: 100px; display: grid; gap: 26px; }
.control-group label.group-label { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 0; padding: .6em 1.05em; border-radius: 999px; font-size: .88rem; font-weight: 600;
  background: rgba(255, 255, 255, .06); color: rgba(251, 245, 233, .85); box-shadow: inset 0 0 0 1px rgba(246, 223, 160, .2);
  transition: all .3s;
}
.chip:hover { background: rgba(255, 255, 255, .1); }
.chip[aria-pressed='true'] { background: var(--gold-foil); color: var(--night-900); box-shadow: 0 6px 16px -6px rgba(214, 166, 70, .8); }
.light .chip { background: #fff; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--cream-300); }
.light .chip[aria-pressed='true'] { background: var(--night-700); color: var(--gold-200); box-shadow: none; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { width: 54px; height: 54px; border-radius: 16px; border: 0; position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); transition: transform .3s var(--ease-spring); }
.swatch:hover { transform: translateY(-3px); }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--night-800), 0 0 0 4px var(--gold-300); }
.light .swatch[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--cream-100), 0 0 0 4px var(--red-500); }
.swatch .sw-name { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: .68rem; margin-top: 6px; white-space: nowrap; opacity: .75; }
.swatches { padding-bottom: 18px; }
.sw-notte { background: radial-gradient(circle at 30% 30%, #1f3a5a, #0a1626); }
.sw-velluto { background: var(--red-velvet); }
.sw-bosco { background: radial-gradient(circle at 30% 30%, #2f6b4a, #0e2d20); }
.sw-kraft { background: radial-gradient(circle at 30% 30%, #d7b48a, #a87f55); }
.sw-neve { background: radial-gradient(circle at 30% 30%, #ffffff, #cfe1f0); }
.demo-hint { font-size: .9rem; color: rgba(251, 245, 233, .65); display: flex; gap: 10px; align-items: center; }
.demo-hint .pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold-300); box-shadow: 0 0 0 0 rgba(236, 197, 108, .7); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { to { box-shadow: 0 0 0 14px rgba(236, 197, 108, 0); } }
@media (max-width: 960px) { .demo-wrap { grid-template-columns: 1fr; } .demo-controls { position: static; } }

/* ---------- Come funziona ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; counter-reset: s; position: relative; }
.steps::before { content: ''; position: absolute; top: 46px; left: 12%; right: 12%; border-top: 2px dashed rgba(181, 133, 44, .4); }
.step { text-align: center; position: relative; }
.step-num {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; position: relative;
  background: #fff; box-shadow: 0 0 0 1px rgba(181, 133, 44, .25), 0 0 0 8px var(--cream-100), 0 0 0 9px rgba(181, 133, 44, .2), var(--shadow-soft);
  font-size: 2.2rem;
}
.step-num::after { counter-increment: s; content: counter(s); position: absolute; top: -4px; right: -4px; width: 30px; height: 30px; border-radius: 50%; background: var(--red-500); color: #fff; font-size: .85rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--cream-100); }
.step h3 { font-size: 1.3rem; }
.step p { color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .steps::before { display: none; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Cosa regalare (tabs + cards) ---------- */
.gift-types { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.gift {
  border-radius: var(--radius-lg); padding: 28px 22px; min-height: 260px; position: relative; overflow: hidden; color: var(--cream-100);
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .6s var(--ease-out);
}
.gift:hover { transform: translateY(-8px) rotate(-.6deg); }
.gift .g-ico { position: absolute; top: 20px; left: 22px; font-size: 2.4rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
.gift h3 { font-size: 1.35rem; margin-bottom: .3em; }
.gift p { font-size: .9rem; opacity: .85; margin: 0; }
.gift:nth-child(1) { background: linear-gradient(160deg, #8f1426, #3d0710); }
.gift:nth-child(2) { background: linear-gradient(160deg, #2f6b4a, #0b2519); }
.gift:nth-child(3) { background: linear-gradient(160deg, #2c3e66, #0e1630); }
.gift:nth-child(4) { background: linear-gradient(160deg, #c99a3c, #6b4b14); }
.gift:nth-child(5) { background: radial-gradient(circle at 50% 0%, #f9e3a6, #b5852c 60%, #6b4b14); color: var(--night-900); }
@media (max-width: 1000px) { .gift-types { grid-template-columns: repeat(2, 1fr); } .gift:nth-child(5) { grid-column: span 2; } }

/* Generatore di idee */
.ideas { margin-top: 70px; padding: clamp(28px, 4vw, 50px); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 0 0 1px rgba(181, 133, 44, .18), var(--shadow-soft); }
.ideas-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.ideas-head h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 0; }
.idea-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.idea { padding: 22px; border-radius: var(--radius); background: var(--cream-100); position: relative; animation: rise .6s var(--ease-out) both; }
.idea .tag { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red-600); }
.idea p { margin: .45em 0 0; font-family: var(--font-display); font-size: 1.12rem; line-height: 1.4; }
.idea:nth-child(2) { animation-delay: .06s; } .idea:nth-child(3) { animation-delay: .12s; } .idea:nth-child(4) { animation-delay: .18s; } .idea:nth-child(5) { animation-delay: .24s; } .idea:nth-child(6) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 860px) { .idea-grid { grid-template-columns: 1fr; } }

/* ---------- Prezzi ---------- */
.pricing-section { background: radial-gradient(1200px 700px at 50% 0%, #3d0710, #1a0307 70%); }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price-card {
  position: relative; border-radius: var(--radius-lg); padding: 38px 32px 32px; display: flex; flex-direction: column;
  background: rgba(255, 252, 245, .04); box-shadow: inset 0 0 0 1px rgba(246, 223, 160, .18); backdrop-filter: blur(6px);
  color: var(--cream-100);
}
.price-card.featured { background: linear-gradient(180deg, #fffcf5, #f6ecd6); color: var(--ink); box-shadow: 0 0 0 1px var(--gold-300), 0 0 0 7px rgba(236, 197, 108, .15), 0 40px 80px -30px rgba(0, 0, 0, .7); transform: translateY(-14px); }
.price-card .ribbon { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--gold-foil); color: var(--night-900); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; padding: 7px 16px; border-radius: 99px; white-space: nowrap; box-shadow: 0 8px 20px -6px rgba(181, 133, 44, .8); }
.price-card h3 { font-size: 1.7rem; margin-bottom: .2em; }
.price-card .sub { font-size: .92rem; opacity: .75; min-height: 2.9em; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 4px; }
.price .amount { font-family: var(--font-display); font-size: 3.6rem; line-height: 1; font-weight: 400; letter-spacing: -.03em; }
.price .cur { font-family: var(--font-display); font-size: 1.6rem; }
.price-note { font-size: .82rem; opacity: .7; margin-bottom: 22px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 11px; font-size: .94rem; }
.price-card li { display: flex; gap: 10px; align-items: flex-start; }
.price-card li::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--gold-300) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304100b' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/11px no-repeat; }
.price-card.featured li::before { background-color: var(--red-500); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
.price-card li.muted { opacity: .45; }
.price-card li.muted::before { background: rgba(255, 255, 255, .2); }
.price-card .btn { margin-top: auto; }
.price-save { display: inline-block; font-size: .78rem; font-weight: 800; color: var(--gold-300); letter-spacing: .04em; }
.price-card.featured .price-save { color: var(--red-600); }
.addons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 50px; }
.addon { display: flex; gap: 16px; align-items: center; padding: 20px 22px; border-radius: var(--radius); background: rgba(255, 252, 245, .05); box-shadow: inset 0 0 0 1px rgba(246, 223, 160, .14); color: var(--cream-100); font-size: .9rem; }
.addon b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.08rem; }
.addon .a-ico { font-size: 1.8rem; }
.addon .a-price { margin-left: auto; font-family: var(--font-display); font-size: 1.2rem; color: var(--gold-300); white-space: nowrap; }
.pay-methods { text-align: center; margin-top: 40px; font-size: .85rem; color: rgba(251, 245, 233, .6); }
@media (max-width: 960px) { .pricing, .addons { grid-template-columns: 1fr; } .price-card.featured { transform: none; } }

/* ---------- Testimonianze ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quote { padding: 32px; border-radius: var(--radius-lg); background: #fff; box-shadow: 0 0 0 1px rgba(181, 133, 44, .14), var(--shadow-soft); position: relative; }
.quote::before { content: '“'; position: absolute; top: -8px; right: 22px; font-family: var(--font-display); font-size: 6rem; line-height: 1; color: var(--gold-300); opacity: .5; }
.quote p { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.5; font-style: italic; }
.quote .who { display: flex; align-items: center; gap: 12px; font-size: .88rem; color: var(--ink-mute); margin-top: 18px; }
.quote .avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--red-velvet); }
.quote:nth-child(2) .avatar { background: linear-gradient(150deg, var(--pine-light), var(--night-700)); }
.quote:nth-child(3) .avatar { background: var(--gold-foil); color: var(--night-900); }
.quote-disclaimer { text-align: center; font-size: .78rem; color: var(--ink-mute); margin-top: 18px; }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- Privacy band ---------- */
.privacy-band { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; }
.privacy-list { display: grid; gap: 14px; }
.privacy-item { display: flex; gap: 16px; padding: 18px 20px; border-radius: var(--radius); background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(246, 223, 160, .14); }
.privacy-item .pi-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(236, 197, 108, .12); color: var(--gold-300); }
.privacy-item .pi-ico svg { width: 22px; height: 22px; }
.privacy-item b { display: block; color: var(--cream-50); }
.privacy-item span { font-size: .9rem; color: rgba(251, 245, 233, .7); }
.lock-art { position: relative; max-width: 380px; margin: 0 auto; }
@media (max-width: 900px) { .privacy-band { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { border-radius: var(--radius); background: #fff; box-shadow: 0 0 0 1px rgba(181, 133, 44, .16); transition: box-shadow .3s; }
.faq details[open] { box-shadow: 0 0 0 1px rgba(181, 133, 44, .4), var(--shadow-soft); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 60px 22px 26px; font-family: var(--font-display); font-size: 1.15rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 24px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--cream-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f1426' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/14px no-repeat; transition: transform .4s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq .answer { padding: 0 26px 22px; color: var(--ink-soft); }

/* ---------- CTA finale ---------- */
.final-cta { text-align: center; overflow: hidden; background: radial-gradient(900px 500px at 50% 100%, rgba(214, 166, 70, .25), transparent 60%), radial-gradient(1200px 800px at 50% 0%, #154030, var(--night-900)); }
.final-cta h2 { color: var(--cream-50); max-width: 16ch; margin-inline: auto; }
.final-cta .ornaments { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; }
.ornament { width: 54px; animation: swing 4s ease-in-out infinite; transform-origin: 50% -40px; }
.ornament:nth-child(2) { animation-delay: -1.3s; width: 66px; } .ornament:nth-child(3) { animation-delay: -2.6s; }
@keyframes swing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--night-900); color: rgba(251, 245, 233, .65); padding: 70px 0 40px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.site-footer h4 { font-family: var(--font-body); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 16px; font-weight: 800; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer a { text-decoration: none; color: rgba(251, 245, 233, .75); }
.site-footer a:hover { color: #fff; }
.footer-bottom { margin-top: 50px; padding-top: 24px; border-top: 1px solid rgba(246, 223, 160, .12); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .8rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; } .reveal-d2 { transition-delay: .2s; } .reveal-d3 { transition-delay: .3s; }

/* ==========================================================================
   APP (accedi, dashboard, editor, account)
   ========================================================================== */
.app-body { background: var(--cream-100); min-height: 100vh; }
.app-body .site-header { position: sticky; background: var(--night-800); padding: 12px 0; }
.app-main { padding: 50px 0 100px; }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.page-title h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0; }
.card { background: #fff; border-radius: var(--radius-lg); box-shadow: 0 0 0 1px rgba(181, 133, 44, .14), var(--shadow-soft); padding: clamp(22px, 3vw, 34px); }
.card h2 { font-size: 1.6rem; }
.muted { color: var(--ink-mute); }
.small { font-size: .88rem; }

/* Form */
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field > span, .field-label { font-size: .82rem; font-weight: 700; color: var(--ink-soft); letter-spacing: .02em; }
.input, .textarea, .select {
  width: 100%; padding: .85em 1em; border-radius: 14px; border: 0; background: var(--cream-50);
  box-shadow: inset 0 0 0 1.5px var(--cream-300); transition: box-shadow .25s, background .25s; font-size: 1rem;
}
.input:focus, .textarea:focus, .select:focus { outline: 0; background: #fff; box-shadow: inset 0 0 0 2px var(--gold-400), 0 0 0 5px rgba(236, 197, 108, .2); }
.textarea { min-height: 160px; resize: vertical; line-height: 1.6; font-family: var(--font-display); font-size: 1.08rem; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); margin: 10px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red-500); flex: none; }
.hint { font-size: .8rem; color: var(--ink-mute); }
.counter { font-size: .75rem; color: var(--ink-mute); text-align: right; }

/* Accesso */
.auth-wrap { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(900px 700px at 30% 30%, #1c5139, var(--night-900)); display: grid; place-items: center; padding: 40px; color: var(--cream-100); }
.auth-art blockquote { position: relative; z-index: 2; max-width: 420px; font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.25; font-style: italic; margin: 0; }
.auth-art blockquote span { display: block; margin-top: 18px; font-family: var(--font-script); font-style: normal; color: var(--gold-300); font-size: 2.2rem; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--cream-100); }
.auth-box { width: min(420px, 100%); }
.auth-box .logo { color: var(--night-800); margin-bottom: 40px; }
.auth-box h1 { font-size: 2.4rem; }
.sent-box { text-align: center; }
.sent-box .env-ico { font-size: 3.5rem; margin-bottom: 10px; animation: bob 3s ease-in-out infinite; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* Dashboard */
.cal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.cal-card { border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(181, 133, 44, .14), var(--shadow-soft); display: flex; flex-direction: column; transition: transform .4s var(--ease-out); }
.cal-card:hover { transform: translateY(-4px); }
.cal-card .thumb { height: 150px; position: relative; display: grid; place-items: center; padding: 18px; }
.cal-card .thumb .mini-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; width: 100%; }
.cal-card .thumb .mini-grid i { aspect-ratio: 1; border-radius: 4px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.cal-card .thumb .mini-grid i.f { background: var(--gold-300); box-shadow: none; }
.cal-card .thumb .mini-grid i.o { background: rgba(255, 255, 255, .9); }
.cal-card .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cal-card h3 { margin: 0; font-size: 1.45rem; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 11px; border-radius: 99px; background: var(--cream-200); color: var(--ink-soft); width: fit-content; }
.status.pub { background: #e3f3e8; color: #1d6b3d; }
.status.magia { background: var(--gold-foil); color: var(--night-900); }
.progress { height: 8px; border-radius: 99px; background: var(--cream-200); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--red-500), var(--gold-400)); border-radius: inherit; transition: width .8s var(--ease-out); }
.cal-card .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.new-card { border: 2px dashed var(--cream-300); background: transparent; box-shadow: none; display: grid; place-items: center; min-height: 340px; text-align: center; color: var(--ink-soft); cursor: pointer; border-radius: var(--radius-lg); transition: all .3s; }
.new-card:hover { border-color: var(--gold-400); background: #fff; color: var(--red-600); }
.new-card .plus { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--red-velvet); color: #fff; font-size: 2rem; box-shadow: 0 12px 26px -10px rgba(143, 20, 38, .7); }
.credits-note { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--radius); background: var(--gold-foil); color: var(--night-900); margin-bottom: 26px; font-weight: 600; }
.empty { text-align: center; padding: 60px 20px; }

/* Editor */
.editor { display: grid; grid-template-columns: 330px 1fr; gap: 28px; align-items: start; }
.editor-side { position: sticky; top: 90px; display: grid; gap: 18px; }
.door-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.door-picker button {
  aspect-ratio: 1; border-radius: 11px; border: 0; background: var(--cream-100); font-family: var(--font-display); font-size: 1.05rem; font-weight: 500;
  box-shadow: inset 0 0 0 1.5px var(--cream-300); position: relative; transition: all .2s;
}
.door-picker button:hover { box-shadow: inset 0 0 0 2px var(--gold-400); }
.door-picker button.filled { background: #fff4dc; box-shadow: inset 0 0 0 1.5px var(--gold-400); }
.door-picker button.filled::after { content: ''; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--red-500); }
.door-picker button.opened::after { background: #2a9d5c; }
.door-picker button.active { background: var(--night-700); color: var(--gold-200); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); }
.door-picker button.d24 { grid-column: 1 / -1; padding: 10px; aspect-ratio: auto; background: var(--red-velvet); color: var(--gold-200); box-shadow: none; }
.door-picker button.d24.active { box-shadow: 0 0 0 3px var(--gold-300); }
.type-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 24px; }
.type-tab { border: 0; padding: 14px 6px 12px; border-radius: 16px; background: var(--cream-100); display: grid; gap: 4px; justify-items: center; font-size: .8rem; font-weight: 700; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px transparent; transition: all .25s; }
.type-tab .t-ico { font-size: 1.5rem; }
.type-tab:hover { background: #fff; box-shadow: inset 0 0 0 1.5px var(--cream-300); }
.type-tab[aria-pressed='true'] { background: #fff; color: var(--red-600); box-shadow: inset 0 0 0 2px var(--red-500), 0 10px 20px -12px rgba(200, 16, 46, .6); }
.type-tab .lock { font-size: .62rem; background: var(--gold-foil); color: var(--night-900); border-radius: 99px; padding: 1px 6px; }
.door-editor-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.door-badge { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.8rem; background: var(--red-velvet); color: var(--gold-200); flex: none; box-shadow: 0 10px 22px -10px rgba(143, 20, 38, .8); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; }
.media-item { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--cream-200); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item .rm { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 1rem; display: grid; place-items: center; }
.dropzone { border: 2px dashed var(--cream-300); border-radius: var(--radius); padding: 30px 20px; text-align: center; color: var(--ink-soft); cursor: pointer; transition: all .25s; background: var(--cream-50); }
.dropzone:hover, .dropzone.drag { border-color: var(--gold-400); background: #fffaf0; color: var(--red-600); }
.dropzone .dz-ico { font-size: 2rem; }
.recorder { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--night-700); color: var(--cream-100); flex-wrap: wrap; }
.rec-btn { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--red-500); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 6px rgba(200, 16, 46, .25); transition: all .3s; flex: none; }
.rec-btn.recording { animation: recpulse 1.2s infinite; border-radius: 18px; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 14px rgba(200, 16, 46, .1); } }
.rec-time { font-family: var(--font-display); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.rec-bars { display: flex; align-items: center; gap: 3px; height: 40px; flex: 1; min-width: 100px; }
.rec-bars i { flex: 1; background: var(--gold-300); border-radius: 3px; min-height: 3px; transition: height .08s; }
.save-state { font-size: .82rem; color: var(--ink-mute); display: inline-flex; align-items: center; gap: 6px; }
.save-state.saving::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-400); animation: pulse 1s infinite; }
.save-state.saved::before { content: '✓'; color: #2a9d5c; font-weight: 800; }
.editor-toolbar { position: sticky; top: 64px; z-index: 20; background: rgba(251, 245, 233, .92); backdrop-filter: blur(10px); padding: 14px 0; margin-bottom: 20px; border-bottom: 1px solid var(--cream-300); }
.editor-toolbar .container { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.editor-toolbar h1 { font-size: 1.4rem; margin: 0; }
.editor-toolbar .spacer { flex: 1; }
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt { border: 0; border-radius: 16px; padding: 14px 8px; background: var(--cream-100); display: grid; justify-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px transparent; }
.opt .o-ico { font-size: 1.6rem; }
.opt[aria-pressed='true'] { background: #fff; color: var(--red-600); box-shadow: inset 0 0 0 2px var(--red-500); }
@media (max-width: 960px) {
  .editor { grid-template-columns: 1fr; }
  .editor-side { display: contents; }
  .editor-side > .card:first-child { order: 1; }
  #doorEditor { order: 2; }
  .editor-side > .card:last-child { order: 3; }
  .door-picker { grid-template-columns: repeat(8, 1fr); gap: 5px; }
  .door-picker button { font-size: .9rem; border-radius: 9px; }
  .type-tabs { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .type-tab { font-size: .7rem; padding: 10px 2px 8px; }
  .editor-toolbar h1 { font-size: 1.15rem; }
  .editor-toolbar .container { gap: 8px; }
  #saveState { display: none; }
}
.narrow > .card + .card { margin-top: 22px; }

/* Scelta piano (modal di pubblicazione) */
.plan-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.plan-opt { border: 0; text-align: left; padding: 22px; border-radius: var(--radius); background: var(--cream-100); box-shadow: inset 0 0 0 1.5px var(--cream-300); display: grid; gap: 6px; transition: all .25s; }
.plan-opt b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; }
.plan-opt .pp { font-family: var(--font-display); font-size: 1.6rem; }
.plan-opt[aria-pressed='true'] { background: #fff; box-shadow: inset 0 0 0 2px var(--red-500), 0 14px 28px -16px rgba(200, 16, 46, .6); }
.plan-opt small { color: var(--ink-mute); line-height: 1.4; }
@media (max-width: 600px) { .plan-choice { grid-template-columns: 1fr; } }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(4, 16, 11, .72); backdrop-filter: blur(6px); animation: fade .3s; overflow-y: auto; }
.modal { width: min(560px, 100%); background: var(--cream-50); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 38px); box-shadow: var(--shadow-deep); position: relative; animation: pop .5s var(--ease-spring); max-height: calc(100svh - 40px); overflow-y: auto; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--cream-200); font-size: 1.3rem; line-height: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(20px); } }

/* Toast */
.toasts { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; width: min(420px, calc(100% - 32px)); }
.toast { padding: 14px 20px; border-radius: 16px; background: var(--night-800); color: var(--cream-100); box-shadow: var(--shadow-deep); font-size: .94rem; animation: pop .45s var(--ease-spring); display: flex; gap: 10px; align-items: center; }
.toast.err { background: var(--red-700); }
.toast.out { animation: fade .3s reverse forwards; }

/* Account */
.session-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--cream-200); }
.session-row:last-child { border: 0; }
.session-row .dev-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--cream-100); display: grid; place-items: center; font-size: 1.2rem; }
.danger-zone { box-shadow: 0 0 0 1.5px rgba(200, 16, 46, .3), var(--shadow-soft); }
.btn-danger { --bg: #fff; color: var(--red-600); box-shadow: inset 0 0 0 1.5px var(--red-500); }
.btn-danger:hover { background: var(--red-500); color: #fff; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; font-size: .95rem; }
.kv dt { color: var(--ink-mute); }
.kv dd { margin: 0; font-weight: 600; }

/* Pagine legali */
.legal { padding: 60px 0 100px; }
.legal h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.legal h2 { font-size: 1.6rem; margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--cream-300); }
.legal h3 { font-size: 1.15rem; margin-top: 1.5em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1em 0 1.5em; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 12px; border-bottom: 1px solid var(--cream-300); vertical-align: top; }
.legal th { background: var(--cream-200); font-weight: 700; color: var(--ink); }
.legal .toc { background: #fff; border-radius: var(--radius); padding: 20px 26px; box-shadow: 0 0 0 1px rgba(181, 133, 44, .16); }
.legal .placeholder { background: #fff3cd; padding: 0 4px; border-radius: 4px; }
.callout { padding: 18px 22px; border-radius: var(--radius); background: #fff; box-shadow: inset 4px 0 0 var(--gold-400), 0 0 0 1px rgba(181, 133, 44, .16); margin: 1.4em 0; }

/* 404 / grazie */
.center-page { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 40px 20px; background: radial-gradient(900px 700px at 50% 30%, #1c5139, var(--night-900)); color: var(--cream-100); position: relative; overflow: hidden; }
.center-page h1 { font-size: clamp(2.4rem, 5vw, 4rem); }

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

/* Rifiniture mobile */
@media (max-width: 960px) {
  .pricing .price-card.featured { order: -1; }
  .hero { padding-top: 160px; }
  .hero-note { flex-direction: column; gap: 4px; }
}

/* ==========================================================================
   ✨ MAGIA: particelle, raggi, onde, tilt, titoli, bokeh
   ========================================================================== */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 120; }
.light-burst {
  position: fixed; z-index: 119; pointer-events: none; width: calc(640px * var(--s, 1)); aspect-ratio: 1; transform: translate(-50%, -50%) scale(.1);
  background: repeating-conic-gradient(from 0deg, rgba(255, 236, 180, .55) 0deg 4deg, transparent 4deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .7) 25%, transparent 65%); mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .7) 25%, transparent 65%);
  border-radius: 50%; mix-blend-mode: screen; animation: burst 1.5s var(--ease-out) forwards;
}
.light-burst::after { content: ''; position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 248, 225, .95), rgba(255, 220, 140, .4) 40%, transparent 70%); }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.1) rotate(0); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5) rotate(40deg); } }
.shockwave { position: fixed; z-index: 118; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; pointer-events: none; border: 3px solid rgba(255, 220, 140, .9); box-shadow: 0 0 30px rgba(255, 210, 120, .8), inset 0 0 20px rgba(255, 210, 120, .6); animation: wave 1.6s var(--ease-out) both; }
@keyframes wave { from { transform: scale(.2); opacity: 1; } to { transform: scale(22); opacity: 0; border-width: .5px; } }
.tilt-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5; mix-blend-mode: screen; }

.words-ready .word { display: inline-block; animation: wordIn 1.3s var(--ease-out) both; will-change: transform, filter, opacity; }
.words-ready .word-script { animation-name: wordInScript; animation-duration: 1.8s; }
@keyframes wordIn { from { opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(14px); } }
@keyframes wordInScript { from { opacity: 0; transform: translateY(.1em) rotate(-4deg) scale(.85); filter: blur(18px); clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.bokeh { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.bokeh i { position: absolute; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(255, 230, 160, .9), rgba(214, 166, 70, .25) 55%, transparent 70%); filter: blur(6px); animation: drift linear infinite alternate; }
.bokeh i.red { background: radial-gradient(circle at 40% 40%, rgba(255, 120, 130, .8), rgba(200, 16, 46, .2) 55%, transparent 70%); }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -60px) scale(1.15); } 100% { transform: translate(-30px, -120px) scale(.9); } }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* ---------- Sezione "Dietro ogni casella, un ricordo" (casella che si apre con lo scroll) ---------- */
.memory { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.memory-text ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.memory-text li { display: flex; gap: 14px; align-items: flex-start; color: var(--ink-soft); }
.memory-text li b { color: var(--ink); }
.memory-text li span:first-child { font-size: 1.5rem; line-height: 1; }
.memory-stage { position: relative; perspective: 1800px; display: grid; place-items: center; padding: 30px 0; }
.memory-door { position: relative; width: min(420px, 82vw); aspect-ratio: 4 / 5.4; border-radius: 22px; transform-style: preserve-3d; }
.memory-door::before { /* cornice dorata */
  content: ''; position: absolute; inset: -16px; border-radius: 30px; background: var(--gold-foil); box-shadow: 0 50px 100px -30px rgba(60, 30, 0, .6), 0 0 0 1px rgba(138, 100, 32, .6);
}
.memory-inside { position: absolute; inset: 0; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, #fff6dc 0%, #f3d48a 35%, #b5852c 80%); }
.memory-inside .rays { position: absolute; inset: -40%; background: repeating-conic-gradient(rgba(255, 255, 255, .5) 0deg 5deg, transparent 5deg 20deg); animation: spin 40s linear infinite; opacity: var(--rays, 0); -webkit-mask: radial-gradient(circle, #000 10%, transparent 60%); mask: radial-gradient(circle, #000 10%, transparent 60%); }
@keyframes spin { to { transform: rotate(360deg); } }
.polaroid.big { width: 74%; padding: 12px 12px 54px; transform: rotate(-2.5deg) scale(var(--ps, .85)); z-index: 1; }
.polaroid.big .ph { aspect-ratio: 4 / 5; }
.polaroid.big img { aspect-ratio: auto; height: 100%; object-position: 50% 62%; filter: var(--develop); }
.polaroid.big .caption { position: absolute; left: 0; right: 0; bottom: 10px; font-size: 1.6rem; margin: 0; opacity: var(--cap, 0); }
.m-leaf {
  position: absolute; top: 0; bottom: 0; width: 50%; z-index: 3; backface-visibility: hidden;
  background: radial-gradient(130% 90% at 30% 10%, #b3152c 0%, #7a0f1f 55%, #4a0a14 100%);
  box-shadow: inset 0 0 0 1px rgba(246, 223, 160, .5), inset 0 0 40px rgba(0, 0, 0, .35);
  display: grid; place-items: center; transition: transform .12s linear;
}
.m-leaf.l { left: 0; border-radius: 16px 0 0 16px; transform-origin: left center; transform: rotateY(var(--rl, 0deg)); }
.m-leaf.r { right: 0; border-radius: 0 16px 16px 0; transform-origin: right center; transform: rotateY(var(--rr, 0deg)); }
.m-leaf::before, .m-leaf::after { /* pannelli */
  content: ''; position: absolute; left: 14%; right: 14%; border-radius: 10px;
  border: 1.5px solid rgba(246, 223, 160, .45); box-shadow: inset 0 0 0 5px rgba(0, 0, 0, .12), inset 0 0 0 6px rgba(246, 223, 160, .2);
}
.m-leaf::before { top: 8%; height: 38%; } .m-leaf::after { bottom: 8%; height: 38%; }
.m-leaf .knob { position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3d1, #d6a646 50%, #8a6420); box-shadow: 0 2px 4px rgba(0, 0, 0, .5); z-index: 2; }
.m-leaf.l .knob { right: 12px; } .m-leaf.r .knob { left: 12px; }
.memory-plate { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; padding: 10px 18px 8px; border-radius: 10px; background: var(--gold-foil); color: var(--red-700); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); opacity: var(--plate, 1); transition: opacity .2s; pointer-events: none; }
.memory-plate b { display: block; font-family: var(--font-display); font-size: 2.4rem; line-height: 1; font-weight: 500; }
.memory-plate small { font-size: .62rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
.memory-scroll-hint { text-align: center; font-size: .82rem; color: var(--ink-mute); margin-top: 26px; opacity: var(--plate, 1); }
@media (max-width: 900px) { .memory { grid-template-columns: 1fr; gap: 30px; } .memory-stage { order: -1; } }

/* Pagina di accesso con foto */
.auth-art.photo { background: #04100b; }
.auth-art.photo::before { content: ''; position: absolute; inset: -4%; background: url('/img/foto/dolomiti.jpg') center 60% / cover; animation: kenburns 30s ease-in-out infinite alternate; }
.auth-art.photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 16, 11, .25) 0%, rgba(4, 16, 11, .55) 50%, rgba(4, 16, 11, .92) 100%); }
.auth-art.photo blockquote { align-self: end; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
.auth-art.photo canvas { z-index: 1; }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-2%, -2%); } }
.hero-tag .tag-photo { float: left; width: 46px; height: 46px; border-radius: 10px; object-fit: cover; object-position: 50% 60%; margin-right: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, .2); }
.hero-door .peek img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
#snow, .snow-local { inset: 0; width: 100%; height: 100%; }

/* ---- Interruttore «Animazioni» (profilo leggero) ---- */
.perf-opt { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 14px 0 4px; font-size: .78rem; opacity: .9; }
.perf-opt > span { font-weight: 700; letter-spacing: .04em; }
.perf-opt > div { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(120, 150, 160, .22); }
.perf-opt button { border: 0; background: none; color: inherit; font: 600 .76rem var(--font-body, inherit); padding: 9px 12px; min-height: 38px; border-radius: 999px; cursor: pointer; }
.perf-opt button[aria-pressed='true'] { background: #fff; color: #1f3540; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.site-footer .perf-opt { display: flex; justify-content: center; margin-top: 18px; }
#perfHost .perf-opt { margin: 0; }
#perfHost .perf-opt > div { background: #e8f0f2; }
#perfHost .perf-opt button { color: var(--teal, #334e5a); }
