@font-face { font-family: 'GV'; src: url('GreatVibes-Regular.ttf') format('truetype'); font-display: swap; }
html, body, #root { margin: 0; height: 100%; min-height: 100%; }
body { background: #b7e3d8; overscroll-behavior: none; }
html { background: #b7e3d8; }
.inv-root { --teal: #0e4f4c; --s: min(calc(100vw / 390), calc(100vh / 782)); --s: min(calc(100vw / 390), calc(100dvh / 782)); position: fixed; inset: 0; overflow: hidden; background: #b7e3d8 center/cover; font-family: 'GV', 'Snell Roundhand', 'Apple Chancery', 'Brush Script MT', cursive; font-style: italic; color: var(--teal); }
.inv-card-stage { position: absolute; inset: 0; }
.inv-pages { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: rgba(255,255,255,.1); }
.inv-pages::-webkit-scrollbar { display: none; }
.inv-page { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: center; overflow: hidden; }
.inv-text { position: absolute; left: 50%; width: calc(390 * var(--s)); transform: translateX(-50%); text-align: center; padding: 0 calc(28 * var(--s)); box-sizing: border-box; max-width: 100%; }
.inv-t1 { top: 9%; }
.inv-t2 { top: 8%; }
.inv-bot { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: calc(390 * var(--s)); pointer-events: none; }
.inv-bot2 { width: calc(335 * var(--s)); }
.inv-names { font-weight: 400; font-size: calc(62 * var(--s)); line-height: 1.02; margin: 0 0 calc(8 * var(--s)); }
.inv-names span { display: block; font-size: calc(44 * var(--s)); color: #a07a2c; margin: calc(-4 * var(--s)) 0; }
.inv-h2 { font-weight: 400; font-size: calc(46 * var(--s)); line-height: 1.1; margin: 0 0 calc(6 * var(--s)); }
.inv-rule { display: flex; justify-content: center; align-items: center; gap: 8px; margin: calc(12 * var(--s)) 0 calc(18 * var(--s)); }
.inv-rule i { width: 56px; height: 1px; background: #6b9f98; } .inv-rule b { width: 6px; height: 6px; border-radius: 50%; background: #b08a3e; }
.inv-line { font-size: calc(27 * var(--s)); line-height: 1.3; margin: 0 0 calc(18 * var(--s)); }
.inv-soft { font-size: calc(23 * var(--s)); color: #2c716c; }
.inv-date { font-size: calc(40 * var(--s)); line-height: 1.1; margin: calc(22 * var(--s)) 0 calc(6 * var(--s)); }
.inv-place { font-size: calc(32 * var(--s)); margin: 0; }
.inv-sign { font-size: calc(40 * var(--s)); margin: calc(20 * var(--s)) 0 0; }
.inv-nav { position: absolute; left: 0; right: 0; top: 14px; display: flex; justify-content: center; pointer-events: none; }
.inv-dots { display: flex; gap: 8px; pointer-events: auto; }
.inv-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: rgba(14,79,76,.3); cursor: pointer; position: relative; }
.inv-dots button::after { content: ''; position: absolute; inset: -14px -6px; }
.inv-dots button.is-on { background: var(--teal); }

.inv-env { position: absolute; inset: 0; z-index: 10; overflow: hidden; background: #1f8f86; transition: opacity .9s ease .5s, transform 1.4s cubic-bezier(.5,0,.3,1); transform-origin: 50% 50%; }
.inv-env-art { position: absolute; left: 50%; top: 50%; width: max(100vw, calc(100dvh * 0.5627)); aspect-ratio: 804 / 1429; transform: translate(-50%, -50%); background-size: 100% 100%; }
.inv-seal-hit { position: absolute; left: 49.4%; top: 48.5%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; background: transparent; padding: 0; cursor: pointer; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.inv-pulse { position: absolute; inset: 6%; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); animation: inv-pulse 2.2s ease-out infinite; }
@keyframes inv-pulse { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.inv-hint { position: absolute; left: 0; right: 0; bottom: 6%; margin: 0; text-align: center; font-size: calc(30 * var(--s)); color: #fff; text-shadow: 0 1px 6px rgba(30,70,64,.55); letter-spacing: .02em; transition: opacity .3s; }
.is-opening { transform: scale(1.7) translateY(-6%); opacity: 0; pointer-events: none; }
.is-opening .inv-hint, .is-opening .inv-pulse { opacity: 0; }
.is-opening .inv-env-art { animation: inv-press .5s ease; }
@keyframes inv-press { 50% { filter: brightness(1.08); } }
.inv-root { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

.inv-t3 { top: 7%; }
.inv-tight { margin-bottom: calc(10 * var(--s)); font-size: calc(24 * var(--s)); }
.inv-map { position: relative; width: calc(330 * var(--s)); height: calc(330 * var(--s)); margin: 0 auto calc(12 * var(--s)); border-radius: calc(10 * var(--s)); overflow: hidden; box-shadow: 0 2px 10px rgba(14,79,76,.25); border: 1px solid rgba(14,79,76,.25); }
.inv-map img { width: 100%; height: 100%; display: block; }
.inv-pin { position: absolute; width: calc(14 * var(--s)); height: calc(14 * var(--s)); margin: calc(-7 * var(--s)) 0 0 calc(-7 * var(--s)); border-radius: 50%; background: #0e4f4c; border: calc(2.5 * var(--s)) solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.inv-pin-ros { background: #a07a2c; width: calc(18 * var(--s)); height: calc(18 * var(--s)); margin: calc(-9 * var(--s)) 0 0 calc(-9 * var(--s)); }
.inv-pin b { position: absolute; left: 50%; bottom: calc(100% + 3px * var(--s)); transform: translateX(-50%); font-weight: 400; font-size: calc(21 * var(--s)); white-space: nowrap; color: #0e4f4c; text-shadow: 0 0 4px #fff, 0 0 4px #fff, 0 0 6px #fff; }
.inv-pin-suf b { left: 90%; bottom: 70%; transform: none; }
.inv-pin-crv b { left: auto; right: 90%; transform: none; bottom: 70%; }
.inv-trip { display: flex; flex-direction: column; align-items: center; margin: 0 0 calc(10 * var(--s)); }
.inv-from { font-size: calc(28 * var(--s)); line-height: 1.15; }
.inv-time { font-size: calc(23 * var(--s)); color: #2c716c; }
.inv-note { font-size: calc(17 * var(--s)); color: #2c716c; margin: calc(6 * var(--s)) 0 0; opacity: .85; }

.inv-more { font-size: calc(23 * var(--s)); color: #2c716c; margin: calc(14 * var(--s)) 0 0; }

.inv-root { background-image: url('img/sheet.jpg'); }

.inv-rsvp-btn { display: block; margin: calc(26 * var(--s)) auto 0; font: inherit; font-size: calc(26 * var(--s)); color: var(--teal); background: rgba(255,255,255,.35); border: 1.5px solid var(--teal); border-radius: 999px; padding: calc(8 * var(--s)) calc(26 * var(--s)); cursor: pointer; -webkit-tap-highlight-color: transparent; position: relative; z-index: 2; }
.inv-rsvp-btn:active { background: rgba(255,255,255,.6); }
.rsvp { position: fixed; inset: 0; z-index: 30; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #b7e3d8 url('img/sheet.jpg') center/cover; font-style: normal; color: #0e4f4c; }
.rsvp[hidden] { display: none; }
.rsvp-card { position: relative; box-sizing: border-box; max-width: 380px; margin: 0 auto; padding: 44px 22px 40px; font-family: 'GV', cursive; font-style: italic; }
.rsvp-close { position: absolute; top: 6px; right: 12px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 34px; line-height: 1; color: #0e4f4c; cursor: pointer; }
.rsvp-title { font-weight: 400; font-size: 40px; line-height: 1.1; text-align: center; margin: 0; }
.rsvp-card .inv-rule { margin: 12px 0 18px; }
.rsvp-l { display: block; font-size: 24px; line-height: 1.2; margin: 0 0 14px; border: 0; padding: 0; }
.rsvp-f { border: 0; padding: 0; margin: 0 0 6px; min-inline-size: 0; }
.rsvp-card input[type=text], .rsvp-card input[type=number], .rsvp-card textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font: 400 16px/1.3 -apple-system, 'Helvetica Neue', Arial, sans-serif; font-style: normal; color: #0e4f4c; background: rgba(255,255,255,.55); border: 1px solid rgba(14,79,76,.35); border-radius: 10px; padding: 11px 12px; }
.rsvp-card input:focus, .rsvp-card textarea:focus { outline: 2px solid #0e4f4c; outline-offset: 1px; }
.rsvp-choice { display: flex; gap: 10px; margin-bottom: 8px; }
.rsvp-choice label { flex: 1; }
.rsvp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rsvp-choice span { display: block; text-align: center; font-size: 22px; padding: 9px 6px; border: 1px solid rgba(14,79,76,.45); border-radius: 12px; background: rgba(255,255,255,.35); cursor: pointer; }
.rsvp-choice input:checked + span { background: #0e4f4c; color: #fff; }
.rsvp-choice input:focus-visible + span { outline: 2px solid #0e4f4c; outline-offset: 2px; }
.rsvp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rsvp-consent { display: flex; gap: 10px; align-items: flex-start; font: 400 14px/1.35 -apple-system, Arial, sans-serif; font-style: normal; margin: 0 0 14px; }
.rsvp-consent[hidden], .rsvp-l[hidden] { display: none; }
.rsvp-consent input { margin-top: 2px; width: 20px; height: 20px; flex: none; }
.rsvp-err { font: 400 14px/1.3 -apple-system, Arial, sans-serif; font-style: normal; color: #8a1f1f; background: rgba(255,255,255,.7); border-radius: 8px; padding: 8px 10px; margin: 0 0 12px; }
.rsvp-send { display: block; width: 100%; font: inherit; font-size: 28px; color: #fff; background: #0e4f4c; border: 0; border-radius: 999px; padding: 10px 0 12px; cursor: pointer; }
.rsvp-send:disabled { opacity: .6; }
.rsvp-privacy { font: 400 12.5px/1.4 -apple-system, Arial, sans-serif; font-style: normal; color: #2c716c; margin: 16px 0 0; text-align: center; }
.rsvp-done { text-align: center; padding-top: 30px; }
.rsvp-thanks { font-size: 46px; margin: 0 0 8px; }
.rsvp-msg { font-size: 26px; margin: 0 0 28px; }
.inv-t1 .inv-rule { margin: calc(8 * var(--s)) 0 calc(12 * var(--s)); }
.inv-t1 .inv-line { margin-bottom: calc(10 * var(--s)); }
.inv-t1 .inv-date { margin: calc(12 * var(--s)) 0 calc(2 * var(--s)); }
.inv-t1 .inv-rsvp-btn { margin-top: calc(16 * var(--s)); font-size: calc(24 * var(--s)); padding: calc(6 * var(--s)) calc(22 * var(--s)); }
.inv-t1 { top: 7%; }
.inv-addr a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.inv-fl { position: absolute; right: calc(14 * var(--s)); bottom: calc(140 * var(--s)); width: calc(190 * var(--s)); text-align: center; z-index: 1; }
.inv-fl .inv-line { font-size: calc(22 * var(--s)); line-height: 1.25; margin: 0 0 calc(10 * var(--s)); }
.inv-fl .inv-sign { font-size: calc(30 * var(--s)); white-space: nowrap; margin: 0; line-height: 1.1; }

/* Desktop: una pagina alla volta, composta in orizzontale. Telefono invariato. */
@media (min-width: 900px) and (orientation: landscape) {
  .inv-root { --s: min(calc(100vw / 900), calc(100dvh / 700)); }
  .inv-text { transform: none; }
  .inv-t1, .inv-t2 { left: 40%; width: 54%; top: 50%; transform: translateY(-50%); }
  .inv-bot { left: 0; transform: none; width: min(42vw, calc(100dvh * 0.95)); }
  .inv-bot2 { width: min(42vw, calc(100dvh * 0.95)); }
  .inv-bot1 { left: auto; right: 0; }
  .inv-t1 { left: 6%; }
  .inv-t3 { left: 8%; width: 84%; top: 6%; display: grid; grid-template-columns: auto 1fr; column-gap: calc(60 * var(--s)); align-items: center; }
  .inv-t3 > .inv-h2, .inv-t3 > .inv-rule, .inv-t3 > .inv-tight { grid-column: 1 / -1; }
  .inv-t3 .inv-map { grid-column: 1; grid-row: 4 / span 3; margin: 0; width: calc(400 * var(--s)); height: calc(400 * var(--s)); }
  .inv-t3 .inv-trip { grid-column: 2; align-self: end; margin: 0; }
  .inv-t3 .inv-trip + .inv-trip { align-self: start; margin-top: calc(14 * var(--s)); }
  .inv-t3 .inv-note { grid-column: 2; align-self: start; text-align: center; margin-top: calc(24 * var(--s)); }
  .inv-t3 .inv-more { grid-column: 2; }
  .inv-fl { right: auto; left: 40%; width: 54%; bottom: 10%; }
  .inv-fl .inv-line { font-size: calc(27 * var(--s)); margin-bottom: calc(14 * var(--s)); }
  .inv-fl .inv-sign { font-size: calc(40 * var(--s)); }
}
