@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Montserrat:wght@300;400;500;600;700&display=swap');

@font-face {
  font-family: 'Desirable Calligraphy';
  src: url('../fonts/DesirableCalligraphy.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --radius: 12px;
  --background: oklch(0.97 0.005 80);
  --foreground: oklch(0.25 0.02 60);
  --card: oklch(0.98 0.005 80);
  --primary: oklch(0.45 0.06 130);
  --primary-foreground: oklch(0.98 0.005 80);
  --secondary: oklch(0.92 0.015 80);
  --muted-foreground: oklch(0.55 0.03 60);
  --border: oklch(0.88 0.02 80);
  --input: oklch(0.88 0.02 80);
  --destructive: oklch(0.577 0.245 27.325);
  --wedding-cream: oklch(0.96 0.01 80);
  --wedding-gold: oklch(0.7 0.1 85);
  --wedding-text-light: oklch(0.55 0.025 60);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', system-ui, sans-serif;
  --font-script: 'Desirable Calligraphy', 'Cormorant Garamond', cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans); }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; }

.intro { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; background: var(--wedding-cream); transition: opacity .8s ease, transform .8s ease, visibility .8s ease; }
.intro.opening { opacity: 0; transform: scale(1.1); visibility: hidden; }
.intro img { width: 18rem; height: 24rem; object-fit: cover; border-radius: 10px; box-shadow: 0 25px 60px rgba(0,0,0,.25); }
.intro-title { margin-top: 32px; font-family: var(--font-serif); font-size: clamp(1.5rem, 6vw, 2rem); font-style: italic; color: var(--wedding-text-light); text-align: center; }
.intro-action { margin-top: 16px; font-size: .78rem; letter-spacing: .25em; text-transform: uppercase; color: var(--wedding-text-light); animation: pulse 1.7s ease-in-out infinite; }

main { opacity: 0; pointer-events: none; }
main.visible { opacity: 1; pointer-events: auto; animation: fadeIn .6s ease-out forwards; }

.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.4) 45%, rgba(0,0,0,.7)); z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: center; padding: 0 24px; animation: fadeInUp .8s ease-out forwards; }
.eyebrow { color: var(--primary-foreground); font-size: clamp(.85rem, 2.5vw, 1rem); letter-spacing: .3em; text-transform: uppercase; margin-bottom: 24px; }
.hero-monogram { display: block; margin: 0 auto 24px; width: clamp(110px, 18vw, 170px); height: auto; opacity: .95; }
.names {
  color: var(--primary-foreground);
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 9vw, 5rem);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: .25em;
}
.name-part { display: inline-block; }
.amp { color: var(--primary-foreground); font-family: var(--font-script); font-style: normal; font-size: .85em; display: inline-block; }
@media (max-width: 480px) {
  .hero-content { padding: 0 18px; }
  .eyebrow { margin-bottom: 40px; }
  .hero-monogram { margin-bottom: 36px; }
  .names {
    white-space: normal;
    font-size: clamp(2.4rem, 13vw, 3.6rem);
    line-height: 1;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .hero-content .amp { margin-bottom: 70px; font-size: 45px; line-height: 1; margin-top: 15px; }
}
.date { color: var(--primary-foreground); font-family: var(--font-serif); font-style: italic; font-size: clamp(1.4rem, 5vw, 1.9rem); margin-top: clamp(60px, 9vw, 100px); }
.rsvp-btn { display: inline-block; margin-top: clamp(28px, 5vw, 40px); padding: 14px 38px; border: 1.5px solid var(--wedding-gold); border-radius: 999px; background: color-mix(in oklch, var(--wedding-gold) 18%, transparent); color: var(--primary-foreground); font-family: var(--font-sans); font-size: .85rem; letter-spacing: .35em; text-transform: uppercase; text-decoration: none; font-weight: 600; transition: background .25s, transform .25s, box-shadow .25s; }
.rsvp-btn:hover { background: var(--wedding-gold); color: #2b2820; transform: translateY(-2px); box-shadow: 0 10px 26px color-mix(in oklch, var(--wedding-gold) 40%, transparent); }
.scroll-note { position: absolute; z-index: 2; bottom: 32px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; color: var(--primary-foreground); text-decoration: none; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.chevron { width: 14px; height: 14px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: bounce 1.5s infinite; }

section, footer { padding: 80px 24px; }
section.locations { padding-bottom: 32px; }
section.locations + section { padding-top: 32px; }
.primary { background: var(--primary); color: var(--primary-foreground); }
.secondary { background: var(--secondary); }
.wrap { width: min(100%, 48rem); margin: 0 auto; }
.narrow { width: min(100%, 34rem); }
.center { text-align: center; }
h2 { font-size: clamp(2rem, 8vw, 2.75rem); margin-bottom: 8px; }
.sub { color: var(--muted-foreground); font-size: .9rem; margin-bottom: 40px; line-height: 1.65; }
.primary .sub { color: color-mix(in oklch, var(--primary-foreground) 70%, transparent); }
.eyebrow-dark { color: var(--muted-foreground); font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 10px; }

.count-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.time-block { min-width: 0; border: 1px solid color-mix(in oklch, var(--primary-foreground) 30%, transparent); background: color-mix(in oklch, var(--primary-foreground) 5%, transparent); border-radius: var(--radius); padding: 16px 8px; animation: countPulse 2s ease-in-out infinite; }
.time-value { display: block; font-family: var(--font-serif); font-size: clamp(1.8rem, 8vw, 3.3rem); line-height: 1; font-weight: 300; }
.time-label { display: block; margin-top: 8px; text-transform: uppercase; letter-spacing: .12em; font-size: .64rem; white-space: nowrap; color: color-mix(in oklch, var(--primary-foreground) 70%, transparent); }

/* Le Location — blocchi stacked */
.locations { background: var(--background); }
.loc-block { text-align: center; margin-top: 48px; padding-top: 48px; border-top: 1px solid color-mix(in oklch, var(--border) 60%, transparent); animation: fadeIn .4s ease-out; }
.loc-block:first-of-type { margin-top: 28px; padding-top: 0; border-top: 0; }
.loc-eyebrow { display: inline-block; margin-bottom: 22px; padding: 8px 22px; border-radius: 999px; background: var(--wedding-gold); color: #2b2820; font-weight: 600; font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; box-shadow: 0 4px 14px color-mix(in oklch, var(--wedding-gold) 35%, transparent); }
.loc-pin { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 18px; background: var(--card); }
.loc-name { font-family: var(--font-serif); font-size: clamp(1.6rem, 5.5vw, 2rem); margin-bottom: 14px; }
.michelin-badges { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 auto 16px; }
.michelin-badges .m-star { width: 30px; height: 30px; display: inline-block; flex: 0 0 auto; object-fit: contain; }
.loc-time { color: var(--muted-foreground); font-size: 1rem; margin-bottom: 10px; }
.loc-addr { color: var(--muted-foreground); font-size: .92rem; line-height: 1.6; margin-bottom: 24px; }
.loc-photo { width: 100%; max-height: 14rem; object-fit: cover; border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.15); margin-bottom: 20px; }
.map { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 18px rgba(0,0,0,.08); margin-bottom: 24px; }
.map iframe { display: block; width: 100%; height: 220px; border: 0; }
.loc-actions { display: grid; gap: 12px; margin-bottom: 24px; }
.loc-actions:has(> :only-child),
.loc-actions.single { justify-content: center; max-width: 360px; margin-left: auto; margin-right: auto; grid-template-columns: minmax(0, 1fr); }
.note { color: var(--muted-foreground); font-size: .9rem; font-style: italic; line-height: 1.7; }
.outline-btn { width: 100%; min-height: 48px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); color: var(--foreground); display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; font-size: .92rem; }
.outline-btn:hover { background: var(--card); }

/* Calendar dropdown */
.calendar-dropdown { position: relative; }
.calendar-dropdown .outline-btn { width: 100%; }
.calendar-dropdown .caret { font-size: .85rem; margin-left: 2px; transition: transform .2s; }
.calendar-dropdown[aria-expanded="true"] .caret { transform: rotate(180deg); }
.calendar-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 16px 36px rgba(0,0,0,.12); display: none; z-index: 20; }
.calendar-menu.open { display: block; animation: fadeIn .2s ease-out; }
.calendar-menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: transparent; color: var(--foreground); border-radius: 8px; cursor: pointer; font-size: .92rem; text-align: left; }
.calendar-menu button:hover { background: color-mix(in oklch, var(--primary) 8%, transparent); }
.cal-ic { font-size: 1.1rem; }

.section-illustration { display: block; width: clamp(300px, 85vw, 640px); max-width: 100%; height: auto; margin: 0 auto; }
.illustration-section { padding-top: 24px; padding-bottom: 24px; }
.section-icon-img { display: block; width: clamp(120px, 20vw, 180px); height: auto; margin: 0 auto 18px; }
.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; left: 32px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.event { position: relative; display: flex; gap: 24px; align-items: flex-start; margin-bottom: 32px; }
.event:last-child { margin-bottom: 0; }
.event-icon { z-index: 1; flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); background: var(--background); color: var(--primary); font-size: 1.35rem; }
.event-body { padding-top: 12px; }
.badge { display: inline-block; background: var(--primary); color: var(--primary-foreground); border-radius: 999px; padding: 3px 9px; font-size: .72rem; font-weight: 600; margin-bottom: 6px; }
.event h3, .card h3 { font-size: 1.25rem; margin-bottom: 2px; }
.event p, .card p, .faq-panel, .gift-copy { color: var(--muted-foreground); font-size: .9rem; line-height: 1.65; }

.cards { display: grid; gap: 16px; }
.card, .faq-item, .rsvp-form, .gift-box { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); }
.card { text-align: left; padding: 24px; }

.faq-list { display: grid; gap: 8px; margin-top: 40px; }
.faq-trigger { width: 100%; border: 0; background: transparent; color: var(--foreground); display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: left; padding: 18px 16px; font-family: var(--font-sans); font-size: .98rem; font-weight: 500; cursor: pointer; }
.faq-panel { display: none; padding: 0 16px 18px; font-family: var(--font-sans); }
.faq-item.active .faq-panel { display: block; }

.gift-copy { margin: 16px auto 28px; }
.gift-icon { display: block; width: clamp(70px, 11vw, 100px); height: auto; margin: 0 auto 20px; }
.gift-box { background: var(--background); padding: 28px 24px; text-align: center; }
.label-small { color: var(--muted-foreground); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px; }
.iban { color: var(--foreground); font-weight: 500; word-break: break-all; margin-bottom: 20px; }
.holders { color: var(--foreground); font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.4; }

/* RSVP form */
.rsvp-form { padding: clamp(24px, 6vw, 32px); display: grid; gap: 22px; }
label { display: block; color: var(--foreground); font-size: .9rem; font-weight: 600; margin-bottom: 7px; }
.required { color: var(--destructive); }
input, select, textarea { width: 100%; border: 1px solid var(--input); background: var(--background); color: var(--foreground); border-radius: 10px; padding: 11px 14px; outline: none; transition: border-color .2s, box-shadow .2s; font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 15%, transparent); }
textarea { resize: vertical; min-height: 88px; }
input[type=number] { max-width: 130px; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-row.small { max-width: 280px; }
.choice { border: 1px solid var(--input); background: var(--background); color: var(--foreground); border-radius: 10px; padding: 11px 10px; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.choice:hover { border-color: var(--primary); }
.choice.active { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.conditional { display: none; gap: 22px; }
.conditional.visible { display: grid; }
.num-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.helper { color: var(--muted-foreground); font-size: .78rem; margin-top: -2px; margin-bottom: 10px; line-height: 1.5; }
.helper-callout { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 12px 14px; border-left: 3px solid var(--primary); border-radius: 8px; background: color-mix(in oklch, var(--primary) 7%, transparent); color: var(--foreground); font-size: .88rem; line-height: 1.55; }
.helper-callout .callout-ic { flex: 0 0 auto; font-size: 1.05rem; line-height: 1.3; }
.helper-callout strong { color: var(--primary); font-weight: 700; }
.inline-input { margin-top: 12px; }
.inline-input label { font-weight: 500; font-size: .82rem; }

.kids-details { display: none; gap: 18px; background: color-mix(in oklch, var(--primary) 5%, transparent); border: 1px solid color-mix(in oklch, var(--primary) 15%, transparent); border-radius: var(--radius); padding: 18px; }
.kids-details:not([hidden]) { display: grid; }
.kids-card { background: var(--card); border-radius: 10px; padding: 16px; }

.diet-list { display: grid; gap: 6px; }
.diet-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--card); transition: border-color .2s, background .2s; }
.diet-item.checked { border-color: var(--primary); background: color-mix(in oklch, var(--primary) 6%, transparent); }
.diet-row { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: .9rem; font-weight: 500; }
.diet-row input { width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 auto; }
.diet-names { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.diet-item.checked .diet-names { display: block; }
.diet-names label { font-size: .8rem; font-weight: 500; color: var(--muted-foreground); margin-bottom: 6px; }

.submit { border: 0; border-radius: var(--radius); background: var(--primary); color: var(--primary-foreground); padding: 14px 18px; font-weight: 600; cursor: pointer; transition: background .2s; }
.submit:hover { background: color-mix(in oklch, var(--primary) 88%, black); }
.submit[disabled] { opacity: .6; cursor: wait; }
.form-status { font-size: .9rem; padding: 12px 14px; border-radius: 10px; display: none; }
.form-status.visible { display: block; }
.form-status.success { background: color-mix(in oklch, var(--primary) 15%, transparent); color: var(--primary); border: 1px solid color-mix(in oklch, var(--primary) 35%, transparent); }
.form-status.error { background: color-mix(in oklch, var(--destructive) 12%, transparent); color: var(--destructive); border: 1px solid color-mix(in oklch, var(--destructive) 30%, transparent); }

footer { background: var(--primary); color: var(--primary-foreground); text-align: center; }
footer .footer-names { font-family: var(--font-script); font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 400; line-height: 1; margin-bottom: 40px; display: inline-flex; align-items: baseline; justify-content: center; gap: .25em; letter-spacing: 0; }
footer .footer-names .amp { color: var(--primary-foreground); font-family: var(--font-script); font-style: normal; font-size: .85em; display: inline-block; }
@media (max-width: 480px) {
  footer .footer-names { gap: .15em; }
  footer .footer-names .amp { font-size: .7em; }
}
footer p { color: color-mix(in oklch, var(--primary-foreground) 70%, transparent); font-family: var(--font-serif); font-style: italic; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes countPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes bounce { 0%, 100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(6px) rotate(45deg); } }

@media (min-width: 768px) {
  .intro img { width: 20rem; height: 28rem; }
  .count-grid { gap: 16px; }
  .time-block { padding: 24px 16px; }
  .time-label { letter-spacing: .2em; font-size: .72rem; }
  .loc-photo { max-height: 18rem; }
  .map iframe { height: 280px; }
  .loc-actions { grid-template-columns: 1fr 1fr; }
  .loc-actions:has(> :only-child),
  .loc-actions.single { grid-template-columns: minmax(0, 360px); }
}
@media (max-width: 420px) {
  section, footer { padding-left: 18px; padding-right: 18px; }
  .num-grid { grid-template-columns: 1fr; }
  .tabs { width: 100%; justify-content: center; }
  .tab { padding: 10px 14px; font-size: .75rem; letter-spacing: .1em; }
}
