/* ==========================================================
   IMAGO WEDDING — Invito animato
   Colori e font arrivano dal pannello (--ac --bg --ink --seal --title)
   ========================================================== */
:root {
  --ac-soft: color-mix(in srgb, var(--ac) 18%, var(--bg));
  --ac-deep: color-mix(in srgb, var(--ac) 75%, #000);
  --muted: color-mix(in srgb, var(--ink) 62%, var(--bg));
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --paper: color-mix(in srgb, var(--bg) 70%, #fff);
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.is-locked { overflow: hidden; height: 100vh; height: 100svh; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--title); font-weight: 400; margin: 0; line-height: 1.05; }
em { font-style: italic; }
.eyebrow { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--ac-deep); margin: 0 0 22px; }
.inv-preview { position: fixed; z-index: 200; left: 0; right: 0; bottom: 0; background: #b08a3e; color: #fff; text-align: center; font-size: 13px; padding: 8px; }

/* ---------- Pulsanti ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 28px; border: 1px solid currentColor; background: transparent; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .4s var(--ease), color .4s var(--ease), border-color .4s; }
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid:hover { background: var(--ac); border-color: var(--ac); color: #fff; }
.btn--ghost { color: var(--ink); }
.link { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--ac-deep); font-size: 14px; }

/* ==========================================================
   APERTURA (comune)
   ========================================================== */
.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden; background: var(--bg); transition: opacity 1.2s var(--ease), visibility 0s linear 1.2s; }
.intro.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
.intro__guest { font-family: var(--title); font-style: italic; font-size: clamp(22px, 5vw, 30px); margin: 0 0 28px; text-align: center; color: var(--ink); animation: fadeUp 1.2s var(--ease) .3s both; }
.intro__guest--light { color: #fff; }
.intro__btn { margin-top: 44px; background: none; border: 0; border-bottom: 1px solid currentColor; padding: 6px 2px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; cursor: pointer; color: var(--ink); animation: fadeUp 1.2s var(--ease) .9s both, breathe 2.6s ease-in-out 2.2s infinite; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ==========================================================
   TEMA 1 · BUSTA CON SIGILLO
   ========================================================== */
.theme-busta .intro { background: radial-gradient(120% 90% at 50% 40%, var(--paper), var(--bg)); }
.paper { position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 6%, transparent) .6px, transparent .7px); background-size: 4px 4px; }
.env-wrap { position: relative; display: flex; flex-direction: column; align-items: center; padding: 24px; }
.env { --w: min(84vw, 520px); --env: color-mix(in srgb, var(--seal) 10%, color-mix(in srgb, var(--ac) 22%, #fbf8f2));
  position: relative; width: var(--w); aspect-ratio: 3 / 2; perspective: 1400px; filter: drop-shadow(0 28px 40px rgba(40,30,25,.18)); animation: envIn 1.4s var(--ease) both; }
@keyframes envIn { from { opacity: 0; transform: translateY(30px) rotate(-2deg); } to { opacity: 1; transform: none; } }
.env__back { position: absolute; inset: 0; background: color-mix(in srgb, var(--env) 88%, #000); border-radius: 4px; }
.env__back::after { content: ""; position: absolute; inset: 0; border-radius: 4px; clip-path: polygon(0 0, 100% 0, 50% 58%);
  background: repeating-linear-gradient(45deg, var(--ac) 0 6px, color-mix(in srgb, var(--ac) 80%, #fff) 6px 12px); opacity: .9; }
.env__letter { position: absolute; left: 6%; right: 6%; top: 6%; height: 88%; z-index: 2; background: #fffdf9; border-radius: 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.08); transition: transform 1.3s var(--ease-io) .55s; }
.env__letter { padding: 10% 8%; border: 1px solid color-mix(in srgb, var(--ac) 35%, transparent); outline: 1px solid #fffdf9; outline-offset: -7px; }
.env__letter-top { font-size: clamp(8px, 1.9vw, 10px); letter-spacing: .38em; text-transform: uppercase; color: var(--muted); }
.env__letter-names { font-family: var(--title); font-size: clamp(22px, 5.4vw, 34px); line-height: 1.1; color: var(--ink); }
.env__letter-names em { color: var(--ac-deep); font-size: .7em; }
.is-script .env__letter-names { font-size: clamp(28px, 6.6vw, 42px); }
.env__letter-date { font-family: var(--title); font-style: italic; font-size: clamp(12px, 2.8vw, 16px); color: var(--muted); }
.env__front { position: absolute; inset: 0; z-index: 3; background: var(--env); border-radius: 4px;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); }
.env__front::before { content: ""; position: absolute; inset: 0; clip-path: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.35), transparent 45%), linear-gradient(20deg, rgba(0,0,0,.06), transparent 50%); }
.env__flap { position: absolute; left: 0; right: 0; top: 0; height: 62%; z-index: 4; transform-origin: top center; transform-style: preserve-3d;
  background: color-mix(in srgb, var(--env) 94%, #000); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform 1s var(--ease-io), z-index 0s linear .5s; }
.env__flap::after { content: ""; position: absolute; inset: 0; clip-path: inherit; background: linear-gradient(180deg, rgba(255,255,255,.25), transparent 60%); }
.seal { position: absolute; z-index: 5; left: 50%; top: 58%; width: clamp(70px, 17vw, 96px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border: 0; border-radius: 50%; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--seal) 70%, #fff) 0%, var(--seal) 45%, color-mix(in srgb, var(--seal) 70%, #000) 100%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--seal) 85%, #000), 0 0 0 7px var(--seal), 0 6px 14px rgba(0,0,0,.35), inset 0 -4px 8px rgba(0,0,0,.25);
  transition: transform .6s var(--ease), opacity .5s; animation: sealPulse 3s ease-in-out 1.6s infinite; }
.seal::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--seal) 55%, #000); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.seal span { position: relative; font-family: var(--title); font-size: clamp(20px, 5vw, 30px); color: color-mix(in srgb, var(--seal) 45%, #000); text-shadow: 0 1px 0 rgba(255,255,255,.25); letter-spacing: .02em; }
.seal:hover { transform: translate(-50%, -50%) scale(1.06); }
@keyframes sealPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12); } }
/* apertura */
.is-opening .seal { transform: translate(-50%, -50%) scale(1.25) rotate(-12deg); opacity: 0; animation: none; }
.is-opening .env__flap { transform: rotateX(180deg); z-index: 1; }
.is-opening .env__letter { transform: translateY(-58%); }
.is-opening .intro__btn, .is-opening .intro__guest { opacity: 0; transition: opacity .4s; animation: none; }
.is-opening .env { animation: envLift 1.6s var(--ease-io) 1.5s forwards; }
@keyframes envLift { to { transform: translateY(18vh) scale(.9); opacity: 0; } }

/* ==========================================================
   TEMA 2 · TITOLI DI APERTURA (stile film)
   ========================================================== */
.theme-cinema .intro { background: #0b0a0a; color: #fff; }
.cine { position: absolute; inset: 0; display: grid; place-items: center; }
.cine__bg { position: absolute; inset: -4%; background: radial-gradient(80% 70% at 50% 45%, #2a2626, #0b0a0a) center / cover no-repeat; filter: brightness(.38) saturate(.85); transform: scale(1.12); transition: transform 16s linear, filter 2s; }
.cine.is-playing .cine__bg { transform: scale(1); }
.cine__bar { position: absolute; left: 0; right: 0; height: 11vh; background: #000; z-index: 2; transition: height 1.4s var(--ease-io); }
.cine__bar--top { top: 0; } .cine__bar--bottom { bottom: 0; }
.cine__start { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 18px; transition: opacity .6s; }
.cine__play { width: 84px; height: 84px; border-radius: 50%; border: 1px solid rgba(255,255,255,.75); background: rgba(255,255,255,.06); color: #fff; display: grid; place-items: center; cursor: pointer; padding-left: 5px; transition: background .4s, transform .4s var(--ease); animation: fadeIn 1.5s .3s both; }
.cine__play:hover { background: var(--ac); transform: scale(1.06); }
.cine__hint { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: rgba(255,255,255,.7); animation: fadeIn 1.5s .8s both; }
.cine.is-playing .cine__start { opacity: 0; pointer-events: none; }
.cine__titles { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; text-align: center; padding: 0 24px; }
.ct { grid-area: 1 / 1; margin: 0; opacity: 0; transform: scale(1.04); filter: blur(6px); transition: opacity 1.1s var(--ease), transform 2.6s var(--ease), filter 1.1s; }
.ct.is-on { opacity: 1; transform: none; filter: none; }
.ct--small { font-size: clamp(11px, 2.6vw, 14px); letter-spacing: .42em; text-transform: uppercase; color: rgba(255,255,255,.82); }
.ct--name { font-family: var(--title); font-size: clamp(54px, 13vw, 140px); line-height: 1; letter-spacing: .02em; }
.ct--amp { font-family: var(--title); font-style: italic; font-size: clamp(40px, 9vw, 90px); color: var(--ac); }
.ct--final { display: flex; flex-direction: column; align-items: center; font-family: var(--title); font-size: clamp(48px, 11vw, 120px); line-height: 1; }
.ct--final em { font-size: .55em; color: var(--ac); margin: .1em 0; }
.cine__skip { position: absolute; z-index: 4; right: 22px; bottom: calc(11vh + 16px); background: none; border: 1px solid rgba(255,255,255,.4); color: rgba(255,255,255,.85); padding: 7px 14px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }
.cine.is-ending .cine__bar { height: 0; }

/* ==========================================================
   TEMA 3 · SIPARIO
   ========================================================== */
.theme-sipario .intro { background: transparent; }
.curtain { position: absolute; top: 0; bottom: 0; width: 50.5%; z-index: 1;
  background:
    linear-gradient(90deg, rgba(0,0,0,.18), transparent 12%, rgba(255,255,255,.08) 20%, transparent 30%, rgba(0,0,0,.12) 42%, transparent 55%, rgba(255,255,255,.06) 66%, transparent 78%, rgba(0,0,0,.16) 100%),
    var(--seal);
  background-size: 22% 100%, auto;
  transition: transform 2.2s var(--ease-io); }
.curtain::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 18%, transparent 82%, rgba(0,0,0,.35)); }
.curtain--l { left: 0; transform-origin: left; box-shadow: 6px 0 18px rgba(0,0,0,.25); }
.curtain--r { right: 0; transform-origin: right; }
.curtain__center { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px; color: #fff; transition: opacity .7s, transform .9s var(--ease); }
.mono-btn { position: relative; width: clamp(120px, 34vw, 170px); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--bg) 96%, #fff), var(--bg)); color: var(--ink); box-shadow: 0 18px 40px rgba(0,0,0,.35); animation: fadeUp 1.4s var(--ease) both; }
.mono-btn__ring { position: absolute; inset: 7px; border-radius: 50%; border: 1px solid var(--ac); }
.mono-btn__ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--ac) 60%, transparent); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mono-btn__txt { font-family: var(--title); font-size: clamp(34px, 9vw, 52px); }
.curtain__names { font-family: var(--title); font-style: italic; font-size: clamp(26px, 6vw, 40px); margin: 26px 0 8px; text-shadow: 0 2px 12px rgba(0,0,0,.35); animation: fadeUp 1.4s var(--ease) .4s both; }
.curtain__hint { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; opacity: .85; animation: fadeUp 1.4s var(--ease) .8s both, breathe 2.6s ease-in-out 2.4s infinite; }
.is-opening .curtain__center { opacity: 0; transform: scale(.94); }
.is-opening .curtain--l { transform: translateX(-102%) skewY(-2deg); }
.is-opening .curtain--r { transform: translateX(102%) skewY(2deg); }

/* ==========================================================
   PETALI
   ========================================================== */
.petals { position: fixed; inset: 0; z-index: 150; pointer-events: none; overflow: hidden; }
.petal { position: absolute; top: -40px; width: var(--s); height: calc(var(--s) * .72); border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--ac) 45%, #fff), color-mix(in srgb, var(--ac) 80%, #fff)); opacity: .85;
  animation: fall var(--d) linear var(--delay) forwards; }
.petal::after { content: ""; position: absolute; inset: 0; border-radius: inherit; animation: sway calc(var(--d) / 3) ease-in-out infinite alternate; }
@keyframes fall { 0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 0; } 8% { opacity: .9; } 100% { transform: translate3d(var(--x), 110vh, 0) rotate(var(--r)); opacity: .2; } }

/* ==========================================================
   MUSICA
   ========================================================== */
.music-btn { position: fixed; z-index: 160; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 18px rgba(0,0,0,.15);
  display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 14px 0; }
.music-btn i { width: 3px; height: 30%; background: var(--ink); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.music-btn i:nth-child(2) { animation-delay: -.3s; } .music-btn i:nth-child(3) { animation-delay: -.6s; } .music-btn i:nth-child(4) { animation-delay: -.15s; }
.music-btn[aria-pressed="false"] i { animation: none; height: 18%; opacity: .5; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* ==========================================================
   CONTENUTO DELL'INVITO
   ========================================================== */
.inv { opacity: 0; transition: opacity 1.2s var(--ease) .2s; }
.is-open .inv { opacity: 1; }
.rv { opacity: 0; transform: translateY(24px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }

.sec { padding: clamp(70px, 12vw, 130px) 22px; text-align: center; max-width: 920px; margin: 0 auto; }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 80px 22px; overflow: hidden; }
.hero__img { position: absolute; inset: 0; background: center / cover no-repeat; transform: scale(1.08); transition: transform 14s var(--ease); }
.is-open .hero__img { transform: scale(1); }
.hero--photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(20,18,18,.35), rgba(20,18,18,.2) 40%, rgba(20,18,18,.6)); }
.hero--photo { color: #fff; }
.hero__in { position: relative; z-index: 2; max-width: 900px; }
.hero__guest { font-family: var(--title); font-style: italic; font-size: clamp(22px, 4.5vw, 30px); margin: 0 0 22px; }
.hero__intro { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; margin: 0 0 26px; opacity: .9; }
.names { display: flex; flex-direction: column; align-items: center; font-size: clamp(64px, 15vw, 150px); line-height: .95; }
.names em { font-size: .45em; color: var(--ac); margin: .12em 0; }
.hero--photo .names em { color: color-mix(in srgb, var(--ac) 50%, #fff); }
.is-script .names { font-size: clamp(70px, 17vw, 170px); line-height: 1; }
.hero__head { font-family: var(--title); font-style: italic; font-size: clamp(20px, 3.6vw, 28px); margin: 26px auto 0; max-width: 30ch; }
.hero__date { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 34px; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; }
.hero__date .line { flex: 0 0 clamp(30px, 8vw, 70px); height: 1px; background: currentColor; opacity: .5; }
.hero__place { margin: 12px 0 0; font-size: 14px; letter-spacing: .08em; opacity: .85; }
.hero__scroll { position: absolute; z-index: 2; left: 50%; bottom: 26px; width: 1px; height: 48px; background: currentColor; opacity: .5; transform-origin: top; animation: line 2.4s var(--ease) infinite; }
.hero--photo .hero__scroll { background: #fff; }
@keyframes line { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Countdown */
.cd { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 560px; margin: 0 auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cd div { padding: 22px 6px; }
.cd div + div { border-left: 1px solid var(--line); }
.cd strong { display: block; font-family: var(--title); font-weight: 400; font-size: clamp(38px, 9vw, 64px); line-height: 1; font-variant-numeric: tabular-nums; }
.cd span { display: block; margin-top: 8px; font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.cd__done { font-family: var(--title); font-size: clamp(30px, 6vw, 46px); margin: 0; }

/* Messaggio */
.message__txt { font-family: var(--title); font-size: clamp(22px, 3.8vw, 32px); line-height: 1.45; max-width: 34ch; margin: 0 auto; }
.is-script .message__txt { font-family: var(--sans); font-size: clamp(18px, 2.6vw, 21px); line-height: 1.75; }
.message__txt em { color: var(--ac-deep); }
.message__txt p { margin: 0 0 1em; }
.orn { display: block; width: 46px; height: 46px; margin: 0 auto 30px; border: 1px solid var(--ac); transform: rotate(45deg); position: relative; }
.orn::after { content: ""; position: absolute; inset: 9px; background: var(--ac-soft); border: 1px solid var(--ac); }

/* Luoghi */
.places { max-width: 1100px; }
.places__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.place { background: var(--paper); border: 1px solid var(--line); padding: 44px 28px 36px; }
.place__label { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ac-deep); margin: 0 0 14px; }
.place h3 { font-size: clamp(28px, 4vw, 36px); margin-bottom: 10px; }
.is-script .place h3 { font-size: clamp(34px, 5vw, 44px); }
.place__addr { color: var(--muted); font-size: 15px; margin: 0 0 26px; }
.cal { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cal .eyebrow { flex-basis: 100%; margin-bottom: 4px; }
.cal .btn { padding: 12px 20px; }

/* La nostra storia */
.story { max-width: 1080px; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: center; text-align: left; }
.story--text { grid-template-columns: 1fr; max-width: 680px; text-align: center; }
.story__img { aspect-ratio: 4/5; overflow: hidden; background: var(--ac-soft); }
.story__img img { width: 100%; height: 100%; object-fit: cover; }
.story h2 { font-size: clamp(38px, 6vw, 60px); margin-bottom: 22px; }
.is-script .story h2 { font-size: clamp(46px, 8vw, 74px); }
.story__txt p { margin: 0 0 1em; color: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; text-align: center; } .story__img { max-width: 420px; margin: 0 auto; width: 100%; } }

/* Programma */
.tl { list-style: none; padding: 0; margin: 0 auto; max-width: 560px; text-align: left; position: relative; }
.tl::before { content: ""; position: absolute; left: 92px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tl li { display: grid; grid-template-columns: 76px 32px 1fr; align-items: start; padding: 14px 0; }
.tl__time { font-family: var(--title); font-size: 24px; line-height: 1.2; text-align: right; }
.tl__dot { width: 11px; height: 11px; margin: 9px auto 0; border-radius: 50%; background: var(--bg); border: 1px solid var(--ac); position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--bg); }
.tl li:hover .tl__dot { background: var(--ac); }
.tl__body strong { display: block; font-weight: 400; font-size: 18px; }
.tl__body small { display: block; color: var(--muted); font-size: 14px; }

/* Galleria */
.gallery { max-width: none; padding-left: 0; padding-right: 0; }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 22px 14px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.strip__item { flex: 0 0 auto; height: clamp(260px, 55vh, 460px); scroll-snap-align: center; overflow: hidden; background: var(--ac-soft); cursor: zoom-in; }
.strip__item img { height: 100%; width: auto; object-fit: cover; transition: transform 1.2s var(--ease); }
.strip__item:hover img { transform: scale(1.04); }
@media (min-width: 900px) { .strip { justify-content: safe center; } }

/* Info */
.info__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; text-align: center; }
.info__item p { margin: 0 0 .8em; }
.info__item .eyebrow { margin-bottom: 14px; }

/* RSVP */
.rsvp { max-width: 640px; }
.rsvp h2 { font-size: clamp(36px, 7vw, 56px); margin-bottom: 12px; }
.rsvp__by, .rsvp__closed { color: var(--muted); margin: 0 0 30px; }
.rsvp__form { text-align: left; display: grid; gap: 22px; margin-top: 34px; }
.f { display: block; border: 0; padding: 0; margin: 0; min-width: 0; }
.f > span, .f legend { display: block; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; padding: 0; }
.f input, .f textarea { width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); background: transparent; color: var(--ink); font: 300 17px/1.5 var(--sans); border-radius: 0; resize: vertical; }
.f input:focus, .f textarea:focus { outline: none; border-color: var(--ac); }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.f--choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f--choice legend { grid-column: 1 / -1; float: left; width: 100%; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; text-align: center; padding: 16px 10px; border: 1px solid var(--line); background: var(--paper); transition: all .35s var(--ease); }
.choice input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--ac); outline-offset: 2px; }
.f--meals { display: flex; flex-wrap: wrap; gap: 10px; }
.f--meals legend { width: 100%; }
.choice--sm span { padding: 11px 18px; }
.rsvp__form .btn { justify-self: center; margin-top: 6px; min-width: 240px; }
.rsvp__msg { text-align: center; margin: 0; min-height: 1.4em; color: #a8524b; font-size: 14px; }
.rsvp__thanks { margin-top: 30px; }
.rsvp__thanks p { font-family: var(--title); font-size: clamp(24px, 4.4vw, 34px); line-height: 1.3; margin: 0 0 18px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.foot { text-align: center; padding: 70px 22px calc(70px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.foot__mono { font-family: var(--title); font-size: 46px; margin: 0; color: var(--ac-deep); }
.foot__date { font-size: 11px; letter-spacing: .32em; margin: 6px 0 22px; color: var(--muted); }
.foot__credit { font-size: 12px; color: var(--muted); margin: 0; }
.foot__credit a { color: var(--ink); }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 300; background: rgba(15,14,14,.96); display: flex; align-items: center; justify-content: center; }
.lb[hidden] { display: none; }
.lb img { max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); object-fit: contain; animation: fadeIn .5s; }
.lb button { position: absolute; background: none; border: 0; color: #fff; font-size: 44px; font-weight: 200; cursor: pointer; padding: 14px; opacity: .8; }
.lb__x { top: 6px; right: 10px; font-size: 26px !important; }
.lb__p { left: 4px; } .lb__n { right: 4px; }
@media (max-width: 680px) { .lb__p, .lb__n { top: auto; bottom: 10px; } }

@media (max-width: 520px) {
  .tl::before { left: 70px; }
  .tl li { grid-template-columns: 56px 28px 1fr; }
  .tl__time { font-size: 20px; }
  .f-row, .f--choice { grid-template-columns: 1fr; }
  .hero__date { gap: 10px; letter-spacing: .18em; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .petals { display: none; }
}

/* ==========================================================
   v3 · BUSTA VERTICALE · EFFETTI · DECORI
   ========================================================== */
:root { --branch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M8 194 C55 150 120 85 192 8' stroke='black' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3Cellipse cx='41' cy='175' rx='15.0' ry='5.6' transform='rotate%28-8 41 175%29'/%3E%3Cellipse cx='43' cy='135' rx='14.1' ry='5.3' transform='rotate%28-82 43 135%29'/%3E%3Cellipse cx='81' cy='131' rx='13.2' ry='4.9' transform='rotate%28-8 81 131%29'/%3E%3Cellipse cx='83' cy='91' rx='12.3' ry='4.6' transform='rotate%28-82 83 91%29'/%3E%3Cellipse cx='121' cy='88' rx='11.4' ry='4.3' transform='rotate%28-8 121 88%29'/%3E%3Cellipse cx='123' cy='50' rx='10.5' ry='3.9' transform='rotate%28-82 123 50%29'/%3E%3Cellipse cx='161' cy='50' rx='9.6' ry='3.6' transform='rotate%28-8 161 50%29'/%3E%3Cellipse cx='161' cy='16' rx='8.7' ry='3.2' transform='rotate%28-82 161 16%29'/%3E%3Ccircle cx='186' cy='14' r='4'/%3E%3C/svg%3E"); --heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-10-9.3C.3 8.4 2.1 4.5 5.8 4.1 8.2 3.9 10.2 5.2 12 7.3c1.8-2.1 3.8-3.4 6.2-3.2 3.7.4 5.5 4.3 3.8 7.6C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E"); --gold: #e3c77a; }

/* ---------- Busta verticale ---------- */
.theme-bustav .env { --w: min(68vw, 330px); aspect-ratio: 5 / 7; animation: envIn 1.4s var(--ease) both, envFloat 5s ease-in-out 1.6s infinite; }
@keyframes envFloat { 0%, 100% { top: 0; } 50% { top: -6px; } }
.theme-bustav .env__back::after { clip-path: polygon(0 0, 100% 0, 50% 42%); }
.theme-bustav .env__front { clip-path: polygon(0 0, 50% 38%, 100% 0, 100% 100%, 0 100%); }
.theme-bustav .env__flap { height: 44%; }
.theme-bustav .seal { top: 42%; width: clamp(66px, 19vw, 84px); }
.theme-bustav .env__letter { left: 7%; right: 7%; top: 4%; height: 92%; justify-content: flex-start; padding-top: 16%; gap: 12px; }
.theme-bustav .env__letter-names { font-size: clamp(26px, 7.4vw, 38px); display: flex; flex-direction: column; align-items: center; }
.is-script.theme-bustav .env__letter-names { font-size: clamp(32px, 9vw, 46px); }
.theme-bustav.is-opening .env__letter, .theme-bustav .is-opening .env__letter { transform: translateY(-60%); }
.theme-bustav .is-opening .env { animation: envLift 1.6s var(--ease-io) 1.7s forwards; }

/* ---------- Particelle ---------- */
.petals { position: fixed; inset: 0; z-index: 150; pointer-events: none; overflow: hidden; }
.pt { position: absolute; top: -30px; width: var(--s); height: var(--s); opacity: 0; will-change: transform;
  animation: ptFall var(--d) linear var(--delay) forwards; }
@keyframes ptFall {
  0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 0; }
  6% { opacity: var(--o); }
  85% { opacity: var(--o); }
  100% { transform: translate3d(var(--x), 108vh, 0) rotate(var(--r)); opacity: 0; } }
@keyframes ptFlip {
  0% { transform: translate3d(0, 0, 0) rotate3d(1, .3, 0, 0deg); opacity: 0; }
  6% { opacity: var(--o); }
  100% { transform: translate3d(var(--x), 108vh, 0) rotate3d(1, .3, 0, 1080deg); opacity: .6; } }
@keyframes twinkle { 0% { filter: brightness(.7); } 100% { filter: brightness(1.8); } }
.pt--petali { height: calc(var(--s) * .72); border-radius: 100% 0 100% 0; background: linear-gradient(135deg, color-mix(in srgb, var(--ac) 40%, #fff), color-mix(in srgb, var(--ac) 80%, #fff)); }
.pt--glitter { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fffbe8 0, var(--gold) 45%, #a8822e 100%); box-shadow: 0 0 6px 1px rgba(240, 205, 120, .75);
  animation: ptFall var(--d) linear var(--delay) forwards, twinkle var(--tw) ease-in-out infinite alternate; }
.pt--stelline { background: linear-gradient(160deg, #fffaf0, var(--gold)); clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
  animation: ptFall var(--d) linear var(--delay) forwards, twinkle var(--tw) ease-in-out infinite alternate; }
.pt--coriandoli { height: calc(var(--s) * .45); border-radius: 1px; animation-name: ptFlip; }
.pt--coriandoli:nth-child(5n+1) { background: var(--ac); }
.pt--coriandoli:nth-child(5n+2) { background: var(--seal); }
.pt--coriandoli:nth-child(5n+3) { background: var(--gold); }
.pt--coriandoli:nth-child(5n+4) { background: color-mix(in srgb, var(--ac) 45%, #fff); }
.pt--coriandoli:nth-child(5n) { background: color-mix(in srgb, var(--seal) 50%, #fff); }
.pt--cuori { -webkit-mask: var(--heart) center / contain no-repeat; mask: var(--heart) center / contain no-repeat; background: var(--ac); }
.pt--cuori:nth-child(3n) { background: var(--seal); }
.pt--cuori:nth-child(3n+1) { background: color-mix(in srgb, var(--ac) 55%, #fff); }
.pt--neve { border-radius: 50%; background: radial-gradient(circle, #fff 0, #fff 40%, color-mix(in srgb, var(--ac) 30%, #fff) 100%); box-shadow: 0 0 5px rgba(255,255,255,.9), 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent); }

/* ---------- Decori: base ---------- */
.deco { display: none; position: absolute; z-index: 2; pointer-events: none; }
.hero__in { z-index: 3; }

/* Rami botanici */
.decor-botanico .deco { display: block; width: clamp(150px, 34vw, 300px); aspect-ratio: 1; background: var(--ac); opacity: .55;
  -webkit-mask: var(--branch) center / contain no-repeat; mask: var(--branch) center / contain no-repeat; }
.decor-botanico .deco--a { left: -10px; bottom: -6px; }
.decor-botanico .deco--b { right: -10px; top: -6px; transform: rotate(180deg); }
.decor-botanico .hero--photo .deco { background: #fff; opacity: .7; }
.decor-botanico .orn, .decor-botanico .eyebrow::before { }
.decor-botanico .sec .eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.decor-botanico .sec .eyebrow::before, .decor-botanico .sec .eyebrow::after { content: ""; width: 34px; height: 16px; background: var(--ac); opacity: .7; -webkit-mask: var(--branch) center / contain no-repeat; mask: var(--branch) center / contain no-repeat; transform: rotate(45deg); }
.decor-botanico .sec .eyebrow::after { transform: rotate(-135deg); }
.decor-botanico .intro::before, .decor-botanico .intro::after { content: ""; position: absolute; width: clamp(160px, 40vw, 320px); aspect-ratio: 1; background: var(--ac); opacity: .45; -webkit-mask: var(--branch) center / contain no-repeat; mask: var(--branch) center / contain no-repeat; z-index: 0; }
.decor-botanico .intro::before { left: -14px; bottom: -10px; }
.decor-botanico .intro::after { right: -14px; top: -10px; transform: rotate(180deg); }

/* Acquerello */
.decor-acquerello { background:
  radial-gradient(60% 40% at 8% 12%, color-mix(in srgb, var(--ac) 26%, transparent), transparent 70%),
  radial-gradient(50% 35% at 95% 40%, color-mix(in srgb, var(--seal) 20%, transparent), transparent 70%),
  radial-gradient(55% 40% at 10% 78%, color-mix(in srgb, var(--seal) 16%, transparent), transparent 70%),
  radial-gradient(60% 40% at 90% 96%, color-mix(in srgb, var(--ac) 22%, transparent), transparent 70%),
  var(--bg); background-attachment: fixed; }
.decor-acquerello .deco { display: block; width: clamp(220px, 60vw, 520px); aspect-ratio: 1; border-radius: 47% 53% 61% 39% / 45% 39% 61% 55%; filter: blur(28px); opacity: .55;
  background: radial-gradient(circle at 40% 40%, color-mix(in srgb, var(--ac) 70%, #fff), transparent 68%); }
.decor-acquerello .deco--a { left: -12%; top: -8%; }
.decor-acquerello .deco--b { right: -14%; bottom: -10%; background: radial-gradient(circle at 60% 60%, color-mix(in srgb, var(--seal) 60%, #fff), transparent 68%); }
.decor-acquerello .hero--photo .deco { opacity: .35; mix-blend-mode: screen; }
.decor-acquerello .place, .decor-acquerello .choice span { background: color-mix(in srgb, var(--paper) 75%, transparent); backdrop-filter: blur(4px); }
.decor-acquerello .intro { background: radial-gradient(70% 50% at 20% 20%, color-mix(in srgb, var(--ac) 28%, transparent), transparent 70%), radial-gradient(60% 50% at 85% 85%, color-mix(in srgb, var(--seal) 22%, transparent), transparent 70%), var(--bg); }

/* Cornice dorata */
.decor-cornice .deco--a { display: block; inset: 16px; border: 1px solid color-mix(in srgb, var(--ac) 80%, transparent); }
.decor-cornice .deco--b { display: block; inset: 23px; border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent); }
.decor-cornice .hero--photo .deco--a { border-color: rgba(255,255,255,.7); }
.decor-cornice .hero--photo .deco--b { border-color: rgba(255,255,255,.35); }
.decor-cornice .deco--a::before, .decor-cornice .deco--a::after { content: ""; position: absolute; left: 50%; width: 12px; height: 12px; border: 1px solid currentColor; color: var(--ac); background: var(--bg); transform: translateX(-50%) rotate(45deg); }
.decor-cornice .deco--a::before { top: -7px; } .decor-cornice .deco--a::after { bottom: -7px; }
.decor-cornice .place, .decor-cornice .rsvp__form, .decor-cornice .cd { outline: 1px solid color-mix(in srgb, var(--ac) 55%, transparent); outline-offset: 6px; }
.decor-cornice .rsvp__form { padding: 26px 22px; }
.decor-cornice .orn { border-color: var(--gold); }
.decor-cornice .intro::before { content: ""; position: absolute; inset: 16px; border: 1px solid color-mix(in srgb, var(--ac) 70%, transparent); outline: 1px solid color-mix(in srgb, var(--ac) 35%, transparent); outline-offset: -7px; pointer-events: none; z-index: 3; }

/* Foto ad arco */
.decor-arco .story__img, .decor-arco .strip__item { border-radius: 999px 999px 0 0; }
.decor-arco .deco--a { display: block; left: 50%; top: 50%; width: min(86vw, 520px); height: min(84vh, 720px); transform: translate(-50%, -48%); border: 1px solid color-mix(in srgb, var(--ac) 70%, transparent); border-radius: 999px 999px 0 0; }
.decor-arco .deco--b { display: block; left: 50%; top: 50%; width: calc(min(86vw, 520px) - 18px); height: calc(min(84vh, 720px) - 9px); transform: translate(-50%, -48%); margin-top: 4px; border: 1px solid color-mix(in srgb, var(--ac) 35%, transparent); border-radius: 999px 999px 0 0; }
.decor-arco .hero--photo .deco { border-color: rgba(255,255,255,.55); }
.decor-arco .place { border-radius: 999px 999px 4px 4px; padding-top: 70px; }
.decor-arco .env__letter { border-radius: 999px 999px 2px 2px; }

/* Cielo stellato */
.starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .9;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1.4px 1.4px at 28% 72%, var(--gold) 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 35%, #fff 50%, transparent 51%), radial-gradient(1.6px 1.6px at 66% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 58%, var(--gold) 50%, transparent 51%), radial-gradient(1.2px 1.2px at 90% 82%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 90%, #fff 50%, transparent 51%), radial-gradient(1.3px 1.3px at 8% 92%, #fff 50%, transparent 51%);
  background-size: 340px 340px; animation: starTw 4s ease-in-out infinite alternate; }
.starfield::after { content: ""; position: absolute; inset: 0; background-image: inherit; background-size: 520px 520px; background-position: 130px 90px; opacity: .6; animation: starTw 5.5s ease-in-out infinite alternate-reverse; }
@keyframes starTw { from { opacity: .45; } to { opacity: 1; } }
.decor-stellato .inv { position: relative; z-index: 1; }
.decor-stellato .place, .decor-stellato .choice span { background: color-mix(in srgb, var(--bg) 70%, #fff 6%); }
.decor-stellato .orn { border-color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .theme-bustav .env { animation: none; } .starfield, .starfield::after { animation: none; } }

/* ==========================================================
   FIORI AD ACQUERELLO (decori "fl-…")
   ========================================================== */
.has-fl .orn { display: none; }
.hfl, .ifl { position: absolute; pointer-events: none; user-select: none; }
/* Apertura */
.ifl { z-index: 0; width: clamp(170px, 46vw, 380px); opacity: .95; animation: flIn 1.6s var(--ease) .2s both; }
.fl-corners .ifl--a { left: -2px; top: -2px; }
.fl-corners .ifl--b { right: -2px; bottom: -2px; }
.fl-banner .ifl--a { left: 50%; top: 0; width: min(92vw, 560px); transform: translateX(-50%); }
.fl-banner .ifl--b { left: 50%; bottom: 0; width: min(80vw, 480px); transform: translateX(-50%); }
.fl-wreath .ifl--a { left: 50%; top: 50%; width: min(118vw, 760px); transform: translate(-50%, -50%); opacity: .5; }
.fl-cascata, .decor-fl-cascata .ifl--b, .decor-fl-cascata .hfl--b { }
.decor-fl-cascata .ifl--a, .decor-fl-cascata .hfl--a { left: auto; right: -2px; }
.decor-fl-cascata .ifl--b, .decor-fl-cascata .hfl--b { right: auto; left: -2px; transform: rotate(180deg); }
.theme-sipario .ifl { z-index: 2; mix-blend-mode: normal; }
.theme-sipario .intro.is-opening .ifl, .is-opening .ifl { opacity: 0; transition: opacity .8s; }
@keyframes flIn { from { opacity: 0; transform: scale(.96); } }
.fl-wreath .ifl--a { animation: none; }
.env-wrap { z-index: 1; }

/* Biglietto nella busta */
.letter-fl { pointer-events: none; display: block; }
.letter-fl--wreath { position: absolute; left: 50%; top: 50%; width: 112%; transform: translate(-50%, -50%); opacity: .9; }
.theme-bustav .letter-fl--wreath { top: 34%; width: 104%; }
.letter-fl--banner { width: 86%; margin: -4% auto 2%; }
.letter-fl--corners { position: absolute; left: 0; top: 0; width: 46%; }
.env__letter { overflow: hidden; }
.env__letter > span { position: relative; z-index: 1; }

/* Hero */
.hfl--a, .hfl--b { z-index: 2; width: clamp(150px, 40vw, 380px); }
.hfl--a { left: 0; top: 0; }
.hfl--b { right: 0; bottom: 0; }
.hfl--wreath { z-index: 2; left: 50%; top: 50%; width: min(108vw, 720px); transform: translate(-50%, -50%); opacity: .95; }
.hfl--top, .hfl--bottom { position: static; display: block; margin: 0 auto; }
.hfl--top { width: min(86vw, 520px); margin-bottom: 26px; }
.hfl--bottom { width: min(70vw, 420px); margin-top: 28px; }
.has-fl .hero--photo .hfl--wreath { opacity: .85; filter: brightness(1.15); }
.fl-wreath .names { font-size: clamp(54px, 13vw, 118px); }
.fl-wreath .hero__head { max-width: 22ch; }
@media (max-width: 520px) {
  .fl-wreath .hero__in { padding: 0 6vw; }
  .hfl--wreath { width: 128vw; }
}

/* Divisori e footer */
.divider-fl { display: block; width: min(64vw, 300px); margin: 0 auto 28px; }
.fl-wreath .divider-fl { width: 120px; }
.fl-corners .divider-fl { width: 150px; }
.foot-fl { display: block; width: 160px; margin: -20px auto 6px; opacity: .9; }
.fl-banner .foot-fl { width: min(70vw, 320px); }

/* --- correzioni fiori --- */
.names-wrap { position: relative; display: grid; place-items: center; }
.names-wrap .names { position: relative; z-index: 1; }
.fl-wreath .names-wrap { padding: clamp(70px, 19vw, 130px) 0; margin: 4px 0; }
.hfl--wreath { position: absolute; left: 50%; top: 50%; z-index: 0; width: clamp(330px, 94vw, 560px); transform: translate(-50%, -50%); pointer-events: none; }
.fl-wreath .names { font-size: clamp(42px, 11.5vw, 86px); }
.is-script.fl-wreath .names { font-size: clamp(50px, 13vw, 96px); }
.fl-wreath .hero__in { padding: 0; }
.fl-corners .hfl--a, .fl-corners .hfl--b { width: auto; max-width: 40vw; max-height: 34vh; }
.fl-corners .ifl { width: auto; max-width: 42vw; max-height: 32vh; }
@media (min-width: 900px) { .fl-corners .hfl--a, .fl-corners .hfl--b { max-width: 28vw; max-height: 48vh; } .fl-corners .ifl { max-width: 30vw; max-height: 44vh; } }
.fl-banner .ifl--a { width: auto; max-width: min(92vw, 560px); max-height: 17vh; }
.fl-banner .ifl--b { width: auto; max-width: min(80vw, 480px); max-height: 14vh; }
.fl-wreath .ifl--a { opacity: .38; }

/* ==========================================================
   Editor visuale (solo in modalità modifica)
   ========================================================== */
[data-el]:where(:not(.ifl):not(.seal):not(.deco):not(.hfl):not(.hfl--wreath):not(.letter-fl)) { position: relative; }
.is-editing *, .is-editing *::before, .is-editing *::after { transition: none !important; animation-duration: 0s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
.is-editing .rv { opacity: 1; transform: none; }
.is-editing.stage-open .intro { display: none; }
.is-editing.stage-open .inv { opacity: 1; }
.is-editing.stage-intro .inv { display: none; }
.is-editing [data-el] { cursor: move; }
.is-editing [data-el]:hover { outline: 1px dashed rgba(70, 120, 220, .7); outline-offset: 2px; }
.is-editing [data-el].ed-hidden { display: revert !important; opacity: .25; outline: 1px dashed #d33; }
.ed-box { position: absolute; z-index: 9999; pointer-events: none; border: 1.5px solid #2f6fe0; box-shadow: 0 0 0 9999px rgba(20, 30, 60, .04); }
.ed-box span { position: absolute; left: -1.5px; top: -22px; background: #2f6fe0; color: #fff; font: 500 11px/1 Jost, Arial, sans-serif; padding: 5px 7px; white-space: nowrap; letter-spacing: .02em; }
.ed-box.is-low span { top: auto; bottom: -22px; }

/* ---------- Elementi aggiunti dall'editor ---------- */
.xel { position: absolute; left: 50%; top: 40px; z-index: 4; pointer-events: none; }
.xel--img { height: auto; }
.xel--shape { display: block; aspect-ratio: 1; background: var(--xc, var(--ac)); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.xel--ornamento, .xel--ornamento-cuore { aspect-ratio: 10 / 1; }
.xel--linea { aspect-ratio: 75 / 1; }
.xel--cornice, .xel--arco { aspect-ratio: 5 / 7; }
.xel--cornice-ovale { aspect-ratio: 10 / 13; }
.xel--anelli { aspect-ratio: 1.4; }
.xel--text { text-align: center; font-family: var(--title); font-size: 22px; line-height: 1.3; color: var(--ink); }
.intro .xel { z-index: 6; }
.is-editing .xel { pointer-events: auto; }
.is-editing [data-text][contenteditable] { outline: 2px solid #2f6fe0 !important; outline-offset: 3px; cursor: text; white-space: pre-wrap; }

/* ==========================================================
   v8 · MATERIALI · BUSTA A TUTTO SCHERMO · CERALACCA
   ========================================================== */
/* materiale sulle buste */
.has-mat .env__front, .has-mat .env__flap, .has-mat .env__back { background-image: var(--mat); background-size: cover; background-position: center; }
.has-mat .env__back { filter: brightness(.82); }
.has-mat .env__back::after { background: var(--mat) center / cover; filter: brightness(.9) saturate(.9); }
.has-mat .env__flap { filter: brightness(1.02); }
.has-mat .env__flap::after { background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 55%), linear-gradient(0deg, rgba(0,0,0,.12), transparent 30%); }
.has-mat .paper { display: none; }
.has-mat.theme-busta .intro { background: linear-gradient(color-mix(in srgb, var(--bg) 72%, transparent), color-mix(in srgb, var(--bg) 82%, transparent)), var(--mat) center / cover; }
.has-mat .curtain { background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0, rgba(255,255,255,.06) 4%, rgba(0,0,0,.12) 8%), var(--mat); background-size: auto, cover; background-position: center; }

/* busta a tutto schermo */
.theme-sigillo .intro { background: var(--bg); }
.fsenv { --envc: color-mix(in srgb, var(--seal) 8%, color-mix(in srgb, var(--ac) 20%, #fbf8f2)); position: absolute; inset: 0; perspective: 1800px; overflow: hidden; }
.fsenv__body, .fsenv__flap-in { background-color: var(--envc); background-image: var(--mat, none); background-size: cover; background-position: center; }
.fsenv__body { position: absolute; inset: 0; animation: fsIn 1.3s var(--ease) both; }
.fsenv__body::before, .fsenv__body::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.fsenv__body::before { clip-path: polygon(0 0, 50% 56%, 0 100%); background: linear-gradient(90deg, rgba(0,0,0,.10), rgba(0,0,0,.03)); }
.fsenv__body::after { clip-path: polygon(100% 0, 50% 56%, 100% 100%); background: linear-gradient(270deg, rgba(0,0,0,.12), rgba(0,0,0,.04)); }
.fsenv__flap { position: absolute; inset: 0; z-index: 3; transform-origin: 50% 0; transform-style: preserve-3d; transition: transform 1.15s var(--ease-io) .25s; filter: drop-shadow(0 14px 18px rgba(0,0,0,.28)); pointer-events: none; }
.fsenv__flap-in { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 56%); backface-visibility: hidden; }
.fsenv__flap-in::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.16), transparent 50%); }
.fsenv__center { position: absolute; left: 50%; top: 56%; z-index: 5; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; }
.fsenv__center .intro__guest { position: absolute; bottom: calc(100% + 18px); white-space: nowrap; }
.fsenv__foot { position: absolute; left: 0; right: 0; bottom: max(7vh, 40px); z-index: 4; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 24px; transition: opacity .5s; }
.fsenv__names { margin: 0; font-family: var(--title); font-size: clamp(26px, 7vw, 44px); line-height: 1.1; color: var(--ink); animation: fadeUp 1.4s var(--ease) .5s both; }
.fsenv__foot .intro__btn { margin-top: 22px; }
.theme-sigillo .seal { position: relative; left: auto; top: auto; transform: none; width: clamp(96px, 27vw, 132px); }
.theme-sigillo .seal span { font-size: clamp(26px, 7vw, 38px); }
.theme-sigillo .seal:hover { transform: scale(1.05); }
.theme-sigillo .is-opening .seal { transform: scale(1.25) rotate(-14deg); opacity: 0; }
.theme-sigillo .is-opening .fsenv__flap { transform: rotateX(178deg); }
.theme-sigillo .is-opening .fsenv__foot, .theme-sigillo .is-opening .intro__guest { opacity: 0; }
.theme-sigillo .is-opening .fsenv__body { transition: transform 1.2s var(--ease-io) 1.2s, opacity 1s ease 1.3s; transform: scale(1.06); opacity: 0; }
@keyframes fsIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.is-editing.theme-sigillo .fsenv__body { animation: none; }

/* ceralacca realistica */
.seal-cera .seal { background: none; box-shadow: none; isolation: isolate; animation: none; filter: drop-shadow(0 5px 6px rgba(0,0,0,.32)) drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.seal-cera .seal::after { content: ""; position: absolute; inset: -7%; z-index: -1;
  -webkit-mask: url("shapes/seal-blob.svg") center / contain no-repeat; mask: url("shapes/seal-blob.svg") center / contain no-repeat;
  background:
    radial-gradient(circle at 30% 24%, color-mix(in srgb, var(--seal) 35%, #fff) 0, transparent 30%),
    radial-gradient(circle at 70% 78%, color-mix(in srgb, var(--seal) 70%, #000) 0, transparent 45%),
    radial-gradient(circle at 50% 50%, var(--seal) 55%, color-mix(in srgb, var(--seal) 78%, #000) 100%); }
.seal-cera .seal::before { inset: 16%; border: 0; z-index: 0;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--seal) 92%, #fff), var(--seal) 70%);
  box-shadow: inset 2px 2px 4px color-mix(in srgb, var(--seal) 55%, #000), inset -2px -2px 3px color-mix(in srgb, var(--seal) 55%, #fff), 0 0 0 1px color-mix(in srgb, var(--seal) 85%, #000); }
.seal-cera .seal span { z-index: 1; color: color-mix(in srgb, var(--seal) 88%, #000);
  text-shadow: -1px -1px 0 color-mix(in srgb, var(--seal) 45%, #fff), 1px 1px 1px color-mix(in srgb, var(--seal) 40%, #000); }
.seal-nessuno .seal { display: none; }
/* leggibilità dei testi sopra i materiali */
.has-mat .fsenv__foot::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(120%, 560px); height: 220%; transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--bg) 62%, transparent), transparent); }
.has-mat .fsenv__names { text-shadow: 0 1px 14px color-mix(in srgb, var(--bg) 80%, transparent); }
.has-mat .fsenv__center .intro__guest { text-shadow: 0 1px 12px color-mix(in srgb, var(--bg) 85%, transparent); }

/* ==========================================================
   v9 · POLAROID CHE SI SVILUPPA · CARTOLINA DA GRATTARE · POSTI
   ========================================================== */
.theme-polaroid .intro, .theme-gratta .intro { background: radial-gradient(120% 90% at 50% 40%, color-mix(in srgb, var(--bg) 92%, #fff), var(--bg)); }
.has-mat.theme-polaroid .intro, .has-mat.theme-gratta .intro { background: linear-gradient(color-mix(in srgb, var(--bg) 35%, transparent), color-mix(in srgb, var(--bg) 45%, transparent)), var(--mat) center / cover; }
.pola-wrap, .scr-wrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 24px; }
.pola { --pw: min(76vw, 330px); width: var(--pw); padding: calc(var(--pw) * .06) calc(var(--pw) * .06) 0; background: #fbfaf7; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: stretch;
  box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 18px 40px rgba(40,30,25,.22); transform: rotate(-3deg); animation: polaIn 1.4s var(--ease) both; transition: transform .6s var(--ease); }
.pola:hover { transform: rotate(-1deg) scale(1.02); }
@keyframes polaIn { from { opacity: 0; transform: translateY(60px) rotate(4deg); } to { opacity: 1; transform: rotate(-3deg); } }
.pola__photo { display: grid; place-items: center; aspect-ratio: 1; background: #3b3a35 center / cover; position: relative; overflow: hidden;
  filter: brightness(.18) sepia(1) hue-rotate(40deg) saturate(.5) contrast(.7) blur(1.5px); transition: filter 3.2s cubic-bezier(.4,.1,.3,1) .45s; }
.pola__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(140deg, rgba(255,255,255,.18), transparent 40%); }
.pola__photo--empty { background: linear-gradient(140deg, var(--ac), color-mix(in srgb, var(--ac) 50%, var(--ink))); }
.pola__photo--empty span { font-family: var(--title); font-size: calc(var(--pw) * .2); color: #fff; }
.pola__cap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(var(--pw) * .26); padding: 8px 6px 10px; font-family: "Caveat", "Pinyon Script", var(--title); font-size: clamp(22px, 6vw, 30px); line-height: 1.1; color: #2e2b28; }
.pola__cap small { font-family: var(--title); font-size: 13px; letter-spacing: .08em; color: #8a837b; margin-top: 4px; }
.is-opening .pola { animation: polaShake .5s ease-in-out 0s 1; }
@keyframes polaShake { 0%, 100% { transform: rotate(-3deg); } 25% { transform: rotate(-6deg) translateX(-6px); } 75% { transform: rotate(1deg) translateX(6px); } }
.is-opening .pola__photo { filter: none; }
.theme-polaroid .is-opening .intro__btn, .theme-polaroid .is-opening .intro__guest { opacity: 0; transition: opacity .4s; animation: none; }
.is-editing .pola__photo { filter: none; }

.scr { --sw: min(84vw, 420px); width: var(--sw); padding: calc(var(--sw) * .09) calc(var(--sw) * .08); background: #fffdf9; text-align: center; color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ac) 40%, transparent); outline: 1px solid #fffdf9; outline-offset: -8px; box-shadow: 0 18px 40px rgba(40,30,25,.16); animation: envIn 1.4s var(--ease) both; }
.scr__top { margin: 0 0 10px; font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--ac-deep, var(--ac)); }
.scr__names { margin: 0 0 22px; font-family: var(--title); font-size: clamp(30px, 8vw, 44px); line-height: 1.1; }
.scr__names em { color: var(--ac); font-size: .7em; }
.scr__zone { position: relative; height: calc(var(--sw) * .3); border-radius: 60px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--ac) 10%, #fff); }
.scr__secret { margin: 0; padding: 0 16px; font-family: var(--title); font-size: clamp(20px, 5.4vw, 28px); font-style: italic; color: var(--ink); }
.scr__foil { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.scr__zone.is-done .scr__secret { animation: pulseDate 1.2s var(--ease) both; }
@keyframes pulseDate { 0% { transform: scale(.92); } 60% { transform: scale(1.06); } 100% { transform: none; } }
.scr__hint { margin: 18px 0 0; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted, #888); animation: breathe 2.6s ease-in-out 1.5s infinite; }
.scr__skip { margin-top: 26px; font-size: 10px; opacity: .7; transition: opacity .6s; }
.theme-gratta .is-opening .scr { transform: scale(1.04); opacity: 0; transition: transform .9s var(--ease), opacity .9s; }
.is-editing .scr__foil { display: none; }

.rsvp__seats { margin: 0 0 18px; padding: 12px 18px; border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent); font-family: var(--title); font-style: italic; font-size: 19px; text-align: center; }
