/* ==========================================================================
   Sofia & Lorenzo — 14.06.2027
   ========================================================================== */

:root {
  --ink: #151E08;
  --olive: #3F4B15;
  --accent: #6A763F;
  --sage: #9CA085;
  --line: #CAC7B1;
  --soft: #ECE9DC;
  --bg: #F2F0E8;
  --paper: #F8F7F2;

  --serif: 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  --maxw: 1440px;
  --gutter: 80px;
  --section-y: 96px;
  --nav-h: 88px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);

  /* ritardo d'ingresso della hero: più lungo se c'è l'intro */
  --d0: .15s;
}
.has-intro { --d0: 2.3s; }

@media (max-width: 1200px) { :root { --gutter: 48px; } }
@media (max-width: 1023px) { :root { --nav-h: 64px; --section-y: 80px; } }
@media (max-width: 767px)  { :root { --gutter: 20px; --section-y: 64px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: var(--ink); }
a:hover { color: var(--olive); }
h1, h2, h3, p, figure, blockquote, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  padding: 10px 16px; background: var(--ink); color: var(--paper); text-decoration: none;
}
.skip:focus { top: 12px; color: var(--paper); }

body.menu-open { overflow: hidden; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.section--paper { background: var(--paper); }
.section--olive { background: var(--olive); color: var(--paper); border-top-color: var(--olive); }
.section__intro { margin-bottom: 48px; max-width: 760px; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--lg { gap: 20px; }
.stack--center { align-items: center; text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--sans); font-weight: 500; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--olive);
}
.section--olive .eyebrow { color: var(--line); }
.h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 5vw, 64px); line-height: 1.05; letter-spacing: -.005em;
}
.h2--sm { font-size: clamp(38px, 4.4vw, 56px); }
.lead { font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; color: var(--olive); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--sm { height: 44px; padding: 0 20px; font-size: 14px; }
.btn--lg { height: 56px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }
.btn--outline { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--olive); color: var(--paper); }
.btn--light { height: 52px; padding: 0 28px; background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--soft); color: var(--ink); }
.btn--ghost-light { height: 52px; padding: 0 28px; border-color: var(--paper); color: var(--paper); }
.btn--ghost-light:hover { background: var(--paper); color: var(--ink); }

.arrow {
  width: 52px; height: 52px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), opacity .25s;
}
.arrow:hover { background: var(--ink); color: var(--paper); }
.arrow:disabled { opacity: .3; cursor: default; background: transparent; color: var(--ink); }
.arrow--solid { width: 56px; height: 56px; background: var(--paper); }
.arrows { display: flex; gap: 12px; }

/* ---------- 01 · Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(248, 247, 242, .92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  height: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__logo { font-family: var(--serif); font-size: 28px; line-height: 1; text-decoration: none; }
.nav__links { display: flex; gap: 40px; font-size: 15px; }
.nav__links a { position: relative; text-decoration: none; padding: 6px 0; }
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__toggle {
  display: none; width: 44px; height: 44px; margin-right: -12px;
  align-items: center; justify-content: center;
  border: 0; background: none; color: var(--ink); cursor: pointer;
}
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-open { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1200px) { .nav__links { gap: 28px; } }
@media (max-width: 1023px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__logo { font-size: 22px; }
}

/* Menu mobile */
.mmenu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  background: var(--bg); overflow-y: auto;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.mmenu[hidden] { display: none; }
.mmenu.is-open { opacity: 1; transform: none; }
.mmenu__links { display: flex; flex-direction: column; }
.mmenu__links a {
  min-height: 68px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(30px, 9vw, 36px); line-height: 1.1; text-decoration: none;
}
.mmenu__links span { font-family: var(--sans); font-weight: 500; font-size: 12px; color: var(--olive); }
.mmenu__foot { display: flex; flex-direction: column; gap: 16px; padding-top: 32px; }
.mmenu__meta {
  display: flex; justify-content: space-between; gap: 12px;
  font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--olive);
}
.mmenu .btn { height: 52px; font-size: 16px; }

/* ---------- 02 · Hero ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--ink); color: var(--paper);
  height: clamp(640px, calc(100svh - var(--nav-h)), 960px);
}
.hero__media { position: absolute; inset: 0; }
.hero__video {
  position: relative; z-index: 0; display: block;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%;
  background: var(--ink);
  animation: heroZoom 3.2s var(--ease-out) calc(var(--d0) - .6s) both;
}
/* primo fotogramma sopra il video negli ultimi istanti: il loop riparte senza stacco */
.hero__media::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--poster) 50% 60% / cover no-repeat;
  opacity: 0; transition: opacity .7s ease;
}
.hero__media.is-looping::before { opacity: 1; }
.hero__media::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 48%, rgba(21, 30, 8, .28), transparent 70%),
    linear-gradient(180deg, rgba(21, 30, 8, .42) 0%, rgba(21, 30, 8, .46) 55%, rgba(21, 30, 8, .62) 100%);
}
.hero__content { pointer-events: none; }
.hero__content a, .hero__content button { pointer-events: auto; }

.hero__play {
  position: absolute; right: var(--gutter); bottom: 32px; z-index: 3;
  width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(248, 247, 242, .55); border-radius: 999px;
  background: rgba(21, 30, 8, .28); color: var(--paper); cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
  animation: fadeIn 1s ease calc(var(--d0) + 1.6s) both; opacity: 0;
}
.hero__play[hidden] { display: none; }
.hero__play:hover { background: rgba(21, 30, 8, .5); border-color: var(--paper); }
.hero__play .icon-play { display: none; margin-left: 2px; }
.hero__play[aria-pressed="true"] .icon-play { display: block; }
.hero__play[aria-pressed="true"] .icon-pause { display: none; }
.hero__content {
  position: relative; z-index: 1; height: 100%;
  padding: 80px var(--gutter);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  text-align: center;
}
.hero__eyebrow { color: var(--soft); font-size: 13px; letter-spacing: .14em; }
.hero__date { font-size: 18px; color: var(--soft); }
.hero__title {
  margin: 8px 0 24px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(72px, 10.6vw, 152px); line-height: 1; letter-spacing: -.02em;
  color: var(--paper);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.hero .hero__countdown { display: none; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 32px; z-index: 1; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--soft); text-decoration: none;
}
.hero__scroll:hover { color: var(--paper); }
.hero__scroll svg { animation: nudge 2.4s ease-in-out infinite; }

.hero__content > * { animation: rise 1.2s var(--ease-out) var(--d0) both; }
.hero__content > .hero__date { animation-delay: calc(var(--d0) + .12s); }
.hero__content > .hero__title { animation: none; }
.hero__content > .hero__actions,
.hero__content > .hero__countdown { animation-delay: calc(var(--d0) + 1s); }
.hero__scroll { animation: rise 1.2s var(--ease-out) calc(var(--d0) + 1.4s) both; }

@keyframes heroZoom { from { transform: scale(1.18); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* Hero mobile: titolo → foto → countdown (come da wireframe) */
@media (max-width: 767px) {
  .hero { height: auto; background: var(--bg); color: var(--ink); overflow: visible; }
  .hero__content { display: contents; }
  .hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px var(--gutter) 104px; text-align: center; }
  .hero__eyebrow { order: 1; color: var(--olive); font-size: 12px; }
  .hero__date { order: 2; color: var(--olive); font-size: 15px; }
  .hero__title { order: 3; margin: 0; font-size: clamp(52px, 16.5vw, 64px); color: var(--ink); letter-spacing: -.01em; }
  .hero__media { order: 4; position: relative; inset: auto; align-self: stretch; height: min(300px, 38svh); min-height: 240px; overflow: hidden; }
  .hero__media::after { background: linear-gradient(180deg, transparent 60%, rgba(21, 30, 8, .25)); }
  .hero__video, .hero__media::before { object-position: 50% 62%; background-position: 50% 62%; }
  .hero__play { right: 12px; bottom: 12px; width: 36px; height: 36px; }
  .hero .hero__countdown { order: 5; display: grid; align-self: stretch; }
  .hero__actions, .hero__scroll { display: none; }
  .hero__eyebrow { animation: rise 1.2s var(--ease-out) var(--d0) both; }
  .hero__date { animation: rise 1.2s var(--ease-out) calc(var(--d0) + .12s) both; }
  .hero__media { animation: rise 1.4s var(--ease-out) calc(var(--d0) + .5s) both; }
  .hero .hero__countdown { animation: rise 1.2s var(--ease-out) calc(var(--d0) + .9s) both; }
}

/* ---------- Countdown ---------- */
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.countdown__cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line);
}
.countdown__num { font-family: var(--serif); line-height: 1; font-variant-numeric: tabular-nums lining-nums; }
.countdown__lbl { font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); }

.countdown--large .countdown__cell { height: 176px; border-radius: 999px; }
.countdown--large .countdown__num { font-size: clamp(56px, 6.1vw, 88px); }
.countdown--large .countdown__lbl { font-size: 12px; }

.countdown--compact { gap: 8px; }
.countdown--compact .countdown__cell { height: 72px; gap: 4px; }
.countdown--compact .countdown__num { font-size: 28px; }
.countdown--compact .countdown__lbl { font-size: 10px; letter-spacing: .1em; }

/* ---------- 03 · Save the date ---------- */
.std__head {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; align-items: end;
  margin-bottom: 64px;
}
.std__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(56px, 6.7vw, 96px); line-height: .95;
}
.std__title span { color: var(--olive); }
.std .lead { font-size: clamp(17px, 1.4vw, 20px); }

@media (max-width: 1023px) {
  .std__head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
  .countdown--large { gap: 12px; }
  .countdown--large .countdown__cell { height: 132px; }
}
@media (max-width: 767px) {
  .std .countdown--large { display: none; }
  .std__head { margin-bottom: 0; }
}

/* ---------- 04 · Storia (carosello flip-card) ---------- */
.storia { overflow: hidden; }
.storia__head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  margin-bottom: 48px;
}
.storia__head .stack { max-width: 760px; }

.carousel {
  --edge: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel:focus-visible { outline-offset: -2px; }
.carousel__track {
  display: flex; gap: 24px; width: max-content;
  padding: 4px var(--edge);
}
.carousel.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.carousel.is-dragging .fcard__inner { pointer-events: none; }

.fcard { width: 300px; flex-shrink: 0; scroll-snap-align: start; display: flex; flex-direction: column; gap: 14px; }
.fcard__inner {
  position: relative; display: block; width: 100%; height: 360px; padding: 0;
  border: 0; background: none; cursor: pointer; text-align: left;
  perspective: 1400px;
}
.fcard__face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform .8s var(--ease);
}
.fcard__front { overflow: hidden; background: var(--line); }
.fcard__front img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.fcard__inner:hover .fcard__front img { transform: scale(1.04); }
.fcard__back {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 28px; border: 1px solid var(--ink); background: var(--paper);
  transform: rotateY(180deg);
}
.fcard__back .eyebrow { color: var(--accent); }
.fcard__quote { display: block; font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1.15; margin-bottom: 14px; }
.fcard__text { display: block; font-size: 15px; line-height: 1.6; color: var(--olive); }
.fcard__back > span:not(.eyebrow) { flex: 0 0 auto; }
.fcard__back .fcard__quote { margin-top: auto; }

.fcard.is-flipped .fcard__front { transform: rotateY(-180deg); }
.fcard.is-flipped .fcard__back { transform: rotateY(0); }

.fcard__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fcard__meta h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; }
.fcard__meta span { flex-shrink: 0; font-weight: 500; font-size: 12px; color: var(--olive); }
.fcard__hint { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--olive); }

@media (max-width: 767px) {
  .storia__head { flex-direction: column; align-items: flex-start; margin-bottom: 32px; }
  .storia__head .arrows { display: none; }
  .fcard { width: min(78vw, 300px); }
  .fcard__inner { height: min(104vw, 380px); }
  .fcard__quote { font-size: 26px; }
  .carousel__track { gap: 16px; }
}

/* ---------- 05 · Location + slider ---------- */
.split-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  margin-bottom: 40px;
}
.split-head .stack { max-width: 820px; }
.address { font-size: 15px; }

.slider { position: relative; }
.slider__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__slide { flex: 0 0 100%; scroll-snap-align: start; height: clamp(260px, 30.5vw, 440px); background: var(--line); }
.slider__slide img { width: 100%; height: 100%; object-fit: cover; }
.slider .arrow { position: absolute; top: 50%; transform: translateY(-50%); }
.slider__prev { left: 24px; }
.slider__next { right: 24px; }

.dots { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
  background: var(--sage); cursor: pointer;
  transition: width .35s var(--ease), background-color .35s var(--ease);
}
.dots button[aria-current="true"] { width: 24px; background: var(--ink); }
/* area di tocco più ampia */
.dots button { position: relative; }
.dots button::before { content: ''; position: absolute; inset: -12px -6px; }

@media (max-width: 1023px) {
  .split-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 767px) {
  .slider .arrow { width: 44px; height: 44px; }
  .slider__prev { left: 12px; }
  .slider__next { right: 12px; }
  .dots { margin-top: 24px; }
}

/* ---------- 06 · Dove dormire ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.hotel { display: flex; flex-direction: column; gap: 14px; }
.hotel img { width: 100%; height: 280px; object-fit: cover; }
.hotel h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; }
.hotel p { font-size: 15px; line-height: 1.6; color: var(--olive); }
.hotel a { font-size: 15px; font-weight: 600; align-self: flex-start; }

@media (max-width: 1023px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; gap: 40px; }
  .hotel img { height: 240px; }
}

/* ---------- 07 · Banner ---------- */
.banner { position: relative; height: clamp(420px, 39vw, 560px); overflow: hidden; border-top: 1px solid var(--line); }
.banner > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.banner__quote {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(960px, calc(100% - 2 * var(--gutter)));
  padding: 36px 56px; background: var(--bg);
  font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.8vw, 40px); line-height: 1.25; text-align: center;
}
.js .banner__quote.reveal { transform: translate(-50%, calc(-50% + 24px)); }
.js .banner__quote.reveal.is-in { transform: translate(-50%, -50%); }
@media (max-width: 767px) { .banner__quote { padding: 24px 22px; } }

/* ---------- 08 · Programma ---------- */
.programma { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; align-items: start; }
.programma__media { display: flex; flex-direction: column; gap: 24px; position: sticky; top: calc(var(--nav-h) + 32px); }
.programma__img-a { width: 100%; height: clamp(360px, 39vw, 560px); object-fit: cover; object-position: 50% 45%; }
.programma__img-b { width: 100%; height: clamp(220px, 21.7vw, 312px); object-fit: cover; object-position: 50% 55%; }

.timeline { border-top: 1px solid var(--ink); }
.timeline li {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.timeline time { font-family: var(--serif); font-size: 36px; line-height: 1; color: var(--accent); font-variant-numeric: lining-nums; }
.timeline h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; margin-bottom: 6px; }
.timeline p { font-size: 16px; line-height: 1.5; color: var(--olive); }

@media (max-width: 1023px) {
  .programma { grid-template-columns: 1fr; gap: 40px; }
  .programma__media { position: static; }
  .programma__img-b { display: none; }
  .programma__img-a { height: clamp(240px, 56vw, 420px); }
}
@media (max-width: 767px) {
  .timeline li { grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding: 18px 0; }
  .timeline time { font-size: 28px; }
  .timeline h3 { font-size: 23px; }
  .timeline p { font-size: 15px; }
}

/* ---------- 09 · Menu ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.course { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--sage); }
.course p { font-family: var(--serif); font-size: 22px; line-height: 1.35; }
@media (max-width: 1023px) { .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; } }
@media (max-width: 640px) { .menu-grid { grid-template-columns: 1fr; gap: 32px; } .course p { font-size: 21px; } }

/* ---------- 10 / 11 · Due colonne ---------- */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; align-items: center; }
.two-col--top { align-items: start; }
.two-col__img { width: 100%; object-fit: cover; }
.regali__img { height: clamp(420px, 47vw, 680px); }
.dress__img { height: clamp(360px, 31vw, 448px); object-position: 50% 55%; }

.iban {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px; border: 1px solid var(--line); background: var(--paper);
}
.iban__data { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.iban__data strong { font-weight: 600; }
.iban__code { font-weight: 500; font-variant-numeric: tabular-nums; }
.iban__note { line-height: 1.5; color: var(--olive); }
.iban .btn { flex-shrink: 0; }

.honeymoon { margin-top: 4px; padding-top: 20px; border-top: 1px solid var(--ink); display: flex; flex-direction: column; gap: 10px; }
.honeymoon h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; }
.honeymoon p { font-size: 16px; line-height: 1.6; color: var(--olive); }

.notice {
  align-self: flex-start; display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border: 1px solid var(--ink);
  font-size: 16px; font-weight: 600;
}

@media (max-width: 1023px) {
  .two-col { grid-template-columns: 1fr; gap: 48px; }
  .two-col--rev .two-col__img { order: -1; }
  .regali__img { height: clamp(280px, 70vw, 520px); }
  .dress__img { height: clamp(280px, 70vw, 480px); }
}
@media (max-width: 640px) {
  .iban { flex-direction: column; align-items: stretch; }
  .iban .btn { width: 100%; }
  .iban__code { word-break: break-word; }
}

/* ---------- 12 · Hashtag + galleria ---------- */
.hashtag { max-width: 760px; margin-bottom: 48px; }
.hashtag__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 6.7vw, 96px); line-height: 1; overflow-wrap: anywhere;
}
.hashtag .btn { margin-top: 4px; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.gallery img { width: 100%; height: clamp(200px, 18vw, 260px); object-fit: cover; }
@media (max-width: 767px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .gallery img { height: 52vw; }
}

/* ---------- 13 · RSVP ---------- */
.rsvp { padding: 40px; border: 1px solid var(--line); background: var(--bg); }
.rsvp__form { display: flex; flex-direction: column; gap: 20px; }
.rsvp__form[hidden] { display: none; }
.rsvp__yes { display: flex; flex-direction: column; gap: 20px; }
.rsvp__yes[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend { font-size: 14px; font-weight: 600; }
.field legend { padding: 0; margin-bottom: 8px; }
.field input[type="text"], .field textarea, .select select {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1px solid var(--sage); border-radius: 0; background: var(--paper);
  font-family: inherit; font-size: 16px; color: var(--ink);
  transition: border-color .2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { height: 120px; padding: 14px 16px; resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: var(--sage); }
.field input:hover, .field textarea:hover, .select select:hover { border-color: var(--olive); }
.field input:focus, .field textarea:focus, .select select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field input[aria-invalid="true"] { border-color: #8A2E1C; box-shadow: 0 0 0 1px #8A2E1C; }
.field__error { font-size: 13px; color: #8A2E1C; }

.select { position: relative; }
.select select { padding-right: 44px; cursor: pointer; }
.select svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }

.choice { gap: 10px; }
.choice__opt {
  height: 48px; padding: 0 16px;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--sage); background: var(--paper);
  font-size: 15px; cursor: pointer;
  transition: border-color .2s;
}
.choice__opt:hover { border-color: var(--olive); }
.choice__opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice__opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); cursor: pointer; }

.rsvp__status { font-size: 14px; color: var(--olive); min-height: 1em; }
.rsvp__status:empty { display: none; }
.rsvp__status.is-error { color: #8A2E1C; }
.rsvp__form.is-sending button[type="submit"] { opacity: .6; pointer-events: none; }

.rsvp__done { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 0; outline: none; }
.rsvp__done[hidden] { display: none; }
.rsvp__done-title { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.1; }
.rsvp__done-text { font-size: 17px; line-height: 1.6; color: var(--olive); }

@media (max-width: 767px) {
  .rsvp { padding: 24px 20px; }
  .rsvp__form, .rsvp__yes { gap: 16px; }
  .field input[type="text"], .select select { height: 48px; padding: 0 14px; }
  .choice__opt { height: 44px; padding: 0 12px; font-size: 14px; }
}

/* ---------- 14 · Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer__cta { position: relative; height: 420px; overflow: hidden; }
.footer__cta > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.footer__card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(640px, calc(100% - 2 * var(--gutter)));
  padding: 40px 56px; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.js .footer__card.reveal { transform: translate(-50%, calc(-50% + 24px)); }
.js .footer__card.reveal.is-in { transform: translate(-50%, -50%); }
.footer__card h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 3.6vw, 52px); line-height: 1.1; }
.footer__card p { font-size: 16px; line-height: 1.6; color: var(--olive); }
.footer__card .btn { padding: 0 28px; }

.footer__bar {
  min-height: 180px; padding: 40px var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  background: var(--ink); color: var(--bg);
}
.footer__logo { font-family: var(--serif); font-size: 28px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 36px; font-size: 15px; }
.footer__nav a { color: var(--bg); text-decoration: none; }
.footer__nav a:hover { color: var(--line); }
.footer__date { font-weight: 500; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--line); }

@media (max-width: 1023px) {
  .footer__bar { flex-direction: column; justify-content: center; text-align: center; gap: 24px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .footer__nav { justify-content: center; gap: 20px 28px; }
}
@media (max-width: 767px) {
  .footer__cta { height: 460px; }
  .footer__card { padding: 32px 24px; }
}

/* ---------- CTA fissa (mobile) ---------- */
.sticky-cta { display: none; }
@media (max-width: 1023px) {
  .sticky-cta {
    display: flex; position: fixed; z-index: 90;
    left: var(--gutter); right: var(--gutter); bottom: calc(20px + env(safe-area-inset-bottom));
    height: 52px; font-size: 16px;
    box-shadow: 0 8px 24px rgba(21, 30, 8, .18);
    transition: transform .4s var(--ease), opacity .4s var(--ease), background-color .25s;
  }
  .sticky-cta.is-hidden { transform: translateY(calc(100% + 32px)); opacity: 0; pointer-events: none; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .sticky-cta { left: auto; width: 240px; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 150;
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 500;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 1023px) { .toast { bottom: calc(92px + env(safe-area-inset-bottom)); } }

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 1.1s var(--ease-out) var(--rd, 0ms), transform 1.3s var(--ease-out) var(--rd, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .imgr::after { display: none; }
  .js .imgr > img, .js .w__i, .js .hero__title .ch { transform: none !important; }
  .js .sprig path, .js .sprig circle { stroke-dashoffset: 0; }
  .js .timeline li::after, .js .course::before { transform: none; }
  .petals, .intro { display: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .banner__quote.reveal, .js .footer__card.reveal { transform: translate(-50%, -50%); }
}

/* ==========================================================================
   Animazioni
   Solo transform e opacity (composite-only): niente animazioni di layout.
   ========================================================================== */

/* ---------- Intro monogramma ---------- */
.intro { display: none; }
.has-intro .intro {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: var(--bg); color: var(--ink);
  animation: introOut 1.1s var(--ease-io) 1.9s forwards;
}
.intro__mark { position: relative; width: 180px; height: 180px; display: grid; place-items: center; }
.intro__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.intro__ring circle {
  fill: none; stroke: var(--accent); stroke-width: 1; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.6s var(--ease-io) .15s forwards;
}
.intro__mono { display: flex; align-items: baseline; gap: 10px; font-family: var(--serif); font-size: 56px; line-height: 1; }
.intro__mono span { display: inline-block; overflow: hidden; padding: .1em .05em; }
.intro__mono i { display: inline-block; font-style: normal; transform: translateY(110%); animation: charUp 1.1s var(--ease-out) forwards; }
.intro__mono span:nth-child(1) i { animation-delay: .35s; }
.intro__mono span:nth-child(2) i { animation-delay: .5s; font-style: italic; color: var(--accent); }
.intro__mono span:nth-child(3) i { animation-delay: .65s; }
.intro__sprig { width: 150px; }
.intro__sprig path, .intro__sprig circle { animation: draw 1.2s var(--ease) calc(.6s + var(--k) * 70ms) forwards; }
.intro__date {
  font-weight: 500; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--olive);
  opacity: 0; animation: fadeUp 1s var(--ease-out) 1s forwards;
}
@keyframes introOut {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); visibility: hidden; }
}
.has-intro .intro > * { animation-fill-mode: forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes charUp { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- Titolo hero: lettere che salgono da una maschera ---------- */
.hero__word { display: inline-block; overflow: hidden; padding: .12em .04em .06em; margin: -.12em -.04em -.06em; vertical-align: top; }
.hero__title .ch {
  display: inline-block;
  animation: charUp 1.3s var(--ease-out) calc(var(--d0) + .15s + var(--i) * 45ms) both;
}
.hero__title .amp { font-style: italic; padding: 0 .04em; }

/* ---------- Petali nella hero ---------- */
.petals {
  position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none;
  opacity: 0; animation: fadeIn 2.5s ease calc(var(--d0) + .8s) forwards;
  --petal: linear-gradient(135deg, #FFFFFF 0%, #F1E7DA 100%);
}
.petal {
  position: absolute; top: -40px; left: var(--x);
  animation: fall var(--dur) linear var(--delay) infinite;
  will-change: transform;
}
.petal i {
  display: block; width: var(--s); height: calc(var(--s) * .72);
  background: var(--petal); opacity: var(--o);
  border-radius: 100% 0 100% 0 / 100% 0 100% 0;
  box-shadow: 0 1px 2px rgba(21, 30, 8, .12);
  animation: sway var(--sway) ease-in-out var(--delay) infinite alternate;
}
.petals.is-paused .petal, .petals.is-paused .petal i { animation-play-state: paused; }
@keyframes fall { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(var(--drift), calc(var(--h, 1000px) + 80px), 0); } }
@keyframes sway {
  from { transform: translateX(-16px) rotate(-30deg) rotateX(0deg); }
  to   { transform: translateX(16px) rotate(40deg) rotateX(65deg); }
}
@media (max-width: 767px) {
  .petals { --petal: linear-gradient(135deg, #F4EADF 0%, #D8C4AC 100%); }
}

/* ---------- Titoli: parole che salgono ---------- */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em .06em .08em; margin: -.1em -.06em -.08em; }
.js .w__i {
  display: inline-block; transform: translateY(115%);
  transition: transform 1.2s var(--ease-out) calc(var(--rd, 0ms) + var(--i) * 55ms);
}
.js [data-split="chars"] .w__i { transition-delay: calc(var(--rd, 0ms) + var(--i) * 32ms); }
.js .is-split.is-in .w__i { transform: none; }

/* ---------- Immagini: sipario + zoom ---------- */
.imgr { position: relative; display: block; overflow: hidden; }
.imgr > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hotel .imgr > img { height: 280px; }
.gallery .imgr > img { height: clamp(200px, 18vw, 260px); }
.js .imgr::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: var(--curtain, var(--bg));
  transform-origin: 50% 0;
  transition: transform 1.4s var(--ease-io) var(--rd, 0ms);
}
.js .imgr.is-in::after { transform: scaleY(0); }
.js .imgr > img { transform: scale(1.22); transition: transform 2s var(--ease-out) var(--rd, 0ms); }
.js .imgr.is-in > img { transform: scale(1); }
.js .imgr--hover.is-in:hover > img { transform: scale(1.05); transition-duration: 1.4s; transition-delay: 0ms; }
.section--paper { --curtain: var(--paper); }
@media (max-width: 767px) { .gallery .imgr > img { height: 52vw; } .hotel .imgr > img { height: 240px; } }

/* ---------- Ornamento rametto d'ulivo (disegnato) ---------- */
.sprig { display: block; width: 180px; height: auto; overflow: visible; }
.sprig path, .sprig circle {
  fill: none; stroke: var(--accent); stroke-width: 1; vector-effect: non-scaling-stroke;
  stroke-linecap: round; stroke-linejoin: round;
}
.js .sprig path, .js .sprig circle {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s var(--ease) calc(var(--rd, 0ms) + 250ms + var(--k) * 90ms);
}
.js .is-in > .sprig path, .js .is-in > .sprig circle { stroke-dashoffset: 0; }
.sprig--center { margin: 0 auto 4px; }
.footer__card .sprig { width: 150px; }

/* ---------- Linee che si disegnano ---------- */
.timeline li { position: relative; }
.js .timeline li { border-bottom-color: transparent; }
.js .timeline li::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--line); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.4s var(--ease-io) calc(var(--rd, 0ms) + 150ms);
}
.js .timeline li.is-in::after { transform: scaleX(1); }
.js .timeline { border-top-color: transparent; position: relative; }
.js .timeline::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.6s var(--ease-io);
}
.js .timeline.is-in::before { transform: scaleX(1); }
.js .timeline time { display: inline-block; transition: color .4s; }

.course { position: relative; }
.js .course { border-top-color: transparent; }
.js .course::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--sage);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.4s var(--ease-io) var(--rd, 0ms);
}
.js .course.is-in::before { transform: scaleX(1); }

/* ---------- Countdown: cifre che scorrono ---------- */
.countdown__num { display: inline-block; will-change: auto; }
.js .countdown--large .countdown__cell { transition: transform .6s var(--ease-out), border-color .4s; }
@media (hover: hover) {
  .js .countdown--large .countdown__cell:hover { transform: translateY(-4px); border-color: var(--sage); }
}

/* ---------- Nav: barra di avanzamento + nascondi allo scroll ---------- */
.nav { transition: transform .6s var(--ease-out); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__progress {
  position: absolute; left: 0; bottom: -1px; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- Menu mobile: voci in cascata ---------- */
.mmenu__links a, .mmenu__foot { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); }
.mmenu.is-open .mmenu__links a, .mmenu.is-open .mmenu__foot { opacity: 1; transform: none; }
.mmenu.is-open .mmenu__links a:nth-child(2) { transition-delay: 40ms; }
.mmenu.is-open .mmenu__links a:nth-child(3) { transition-delay: 80ms; }
.mmenu.is-open .mmenu__links a:nth-child(4) { transition-delay: 120ms; }
.mmenu.is-open .mmenu__links a:nth-child(5) { transition-delay: 160ms; }
.mmenu.is-open .mmenu__links a:nth-child(6) { transition-delay: 200ms; }
.mmenu.is-open .mmenu__links a:nth-child(7) { transition-delay: 240ms; }
.mmenu.is-open .mmenu__foot { transition-delay: 300ms; }

/* ---------- Parallax ---------- */
.banner > img[data-parallax], .footer__cta > img[data-parallax] {
  position: absolute; left: 0; top: -15%; width: 100%; height: 130%;
}
.footer__cta > img[data-parallax] { object-position: 50% 45%; }
[data-parallax], .hero__media, .hero__content { will-change: transform; }

/* ---------- Flip card: leggera inclinazione al passaggio ---------- */
.fcard__inner { transition: transform .7s var(--ease-out); transform-style: preserve-3d; }
.fcard__inner.is-tilting { transition-duration: .15s; }

/* ---------- Pulsanti ---------- */
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0) scale(.98); }
}

/* ---------- Coriandoli RSVP ---------- */
.confetti { position: fixed; inset: 0; z-index: 250; pointer-events: none; width: 100%; height: 100%; }
