 :root {
  --paper: #f7f3ed; --cream: #eee6da; --ink: #38362f; --muted: #81796e;
  --gold: #a68b62; --line: #d9cdbd; --white: #fffdfa;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", sans-serif; font-size: 15px; line-height: 1.7; }
body.invitation-locked { overflow: hidden; }
a { color: inherit; }
.site-header { height: 76px; padding: 0 clamp(22px, 7vw, 100px); display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(166,139,98,.2); }
.wordmark { text-decoration:none; font-family:"Playfair Display",serif; font-size:25px; letter-spacing:2px; }
.wordmark span { color:var(--gold); font-style:italic; }
nav { display:flex; align-items:center; gap:30px; }
nav a { text-decoration:none; font-size:12px; letter-spacing:1px; text-transform:uppercase; }
.nav-cta { border-bottom:1px solid var(--gold); padding-bottom:4px; }
.hero { min-height: min(760px, calc(100vh - 76px)); padding:110px 20px 100px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; position:relative; overflow:hidden; background: #d7c6a9 url("assets/wedding-background.png") center 48% / cover no-repeat; }
.hero-wash { position:absolute; inset:0; background:linear-gradient(180deg, rgba(255,250,242,.50), rgba(255,250,242,.66) 48%, rgba(255,250,242,.74)); }
.hero > :not(.hero-wash) { position:relative; z-index:1; }
.hero:before,.hero:after { content:""; position:absolute; z-index:1; width:300px; height:300px; border:1px solid rgba(166,139,98,.28); border-radius:50%; }
.hero:before { left:-190px; top:80px; } .hero:after { right:-190px; bottom:35px; }
.eyebrow { color:var(--gold); font-size:10px; font-weight:600; letter-spacing:3px; text-transform:uppercase; margin:0 0 20px; }
h1,h2,h3 { font-family:"Playfair Display",serif; font-weight:400; }
h1 { font-size:clamp(54px,9vw,100px); line-height:1.08; margin:0 0 20px; letter-spacing:-2px; }
h1 em,h2 em { color:var(--gold); font-weight:400; }
.hero-date { letter-spacing:3px; font-size:12px; }
.hero-rule { display:flex; align-items:center; gap:14px; color:var(--gold); margin:28px 0; }
.hero-rule span { width:55px; height:1px; background:var(--line); }
.hero-copy { color:var(--muted); margin:0 0 32px; }
.button { display:inline-flex; align-items:center; justify-content:center; border:0; cursor:pointer; padding:15px 28px; font:500 11px "DM Sans",sans-serif; letter-spacing:1.5px; text-transform:uppercase; text-decoration:none; transition:.2s; }
.button-dark { background:var(--ink); color:white; } .button-dark:hover { background:var(--gold); }
.section-wrap { max-width:850px; margin:auto; padding:105px 24px; text-align:center; }
h2 { font-size:clamp(38px,6vw,58px); line-height:1.15; margin:0 0 22px; }
.intro-text { max-width:570px; margin:0 auto; color:var(--muted); }
.details-band { background:var(--cream); padding:75px 24px; }
.details-inner { max-width:1100px; margin:auto; display:grid; grid-template-columns:1fr 1px 1fr 1px 1fr; gap:34px; align-items:center; text-align:center; }
.detail-number { display:block; font-family:"Playfair Display",serif; font-style:italic; color:var(--gold); font-size:24px; margin-bottom:15px; }
.detail .eyebrow { margin-bottom:8px; font-size:9px; }
.detail h3 { font-size:29px; margin:0 0 12px; }
.detail p:last-child { color:var(--muted); font-size:13px; }
.detail-divider { height:150px; background:var(--line); }
.location { padding-top:100px; padding-bottom:100px; }
.text-link { display:inline-block; margin-top:25px; color:var(--gold); text-decoration:none; border-bottom:1px solid var(--gold); padding-bottom:4px; font-size:12px; letter-spacing:1px; text-transform:uppercase; }
.rsvp-section { background:#e9e0d4; padding:85px 20px; }
.rsvp-card { max-width:680px; margin:auto; padding:clamp(28px,6vw,65px); background:var(--white); box-shadow:0 18px 60px rgba(62,48,30,.07); }
.rsvp-card h2,.rsvp-card>.eyebrow,.rsvp-intro { text-align:center; }
.rsvp-intro { color:var(--muted); max-width:490px; margin:0 auto 35px; font-size:13px; }
form { display:grid; gap:20px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
label,legend { display:block; font-size:12px; font-weight:600; letter-spacing:.2px; }
input:not([type=radio]):not([type=checkbox]),select,textarea { width:100%; margin-top:8px; border:1px solid var(--line); background:#fff; padding:13px 14px; color:var(--ink); border-radius:0; font:13px "DM Sans",sans-serif; outline:none; }
input:focus,select:focus,textarea:focus { border-color:var(--gold); }
fieldset { border:0; padding:0; margin:0; display:grid; gap:10px; }
.choice { display:flex; gap:10px; align-items:center; font-weight:400; }
input[type=radio],input[type=checkbox] { accent-color:var(--gold); }
.privacy-check { display:flex; gap:10px; align-items:flex-start; font-size:11px; color:var(--muted); font-weight:400; }
.privacy-check input { margin-top:4px; }
.submit-button { width:100%; }
.form-status { min-height:20px; text-align:center; font-size:13px; color:#55745a; margin:0; }
.privacy-note { font-size:10px; color:#948b80; margin:20px 0 0; text-align:center; }
footer { padding:30px 24px; display:flex; gap:20px; justify-content:space-between; align-items:center; color:var(--muted); font-size:11px; letter-spacing:.5px; }
footer p { font-family:"Playfair Display",serif; font-size:17px; color:var(--ink); }
footer a { color:var(--gold); text-decoration:none; }
@media(max-width:700px) {
  .site-header { height:65px; } nav { gap:14px; } nav a { font-size:9px; letter-spacing:.5px; }
  .hero { min-height:590px; padding-top:80px; } .details-inner { grid-template-columns:1fr; gap:24px; }
  .detail-divider { width:70px; height:1px; margin:auto; } .form-grid { grid-template-columns:1fr; }
  footer { flex-direction:column; gap:6px; text-align:center; }
}


/* Apertura dell'invito */
.envelope-screen {
  position:fixed; inset:0; z-index:1000; display:flex; flex-direction:column;
  align-items:center; justify-content:center; padding:28px 18px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255,255,255,.92), rgba(247,241,231,.97) 58%, #e9dfd0 100%);
  transition:opacity .8s ease, visibility .8s ease;
}
.envelope-screen.is-opening { pointer-events:none; }
.envelope-screen.is-hidden { opacity:0; visibility:hidden; }
.envelope-open {
  width:min(620px, 94vw); border:0; background:transparent; color:var(--ink);
  display:flex; flex-direction:column; align-items:center; cursor:pointer; padding:0;
}
.envelope-kicker,.envelope-hint,.envelope-footer {
  color:var(--gold); font-size:10px; font-weight:600; letter-spacing:3px;
}
.envelope-kicker { margin-bottom:28px; }
.envelope { position:relative; display:block; width:min(540px, 88vw); height:350px; perspective:1200px; filter:drop-shadow(0 22px 24px rgba(80,60,35,.14)); }
.envelope-back {
  position:absolute; inset:0; border-radius:5px;
  background:linear-gradient(145deg,#f8f2e8,#e8dccb);
  border:1px solid rgba(166,139,98,.38);
}
.envelope-back:before {
  content:""; position:absolute; inset:13px; border:1px dashed rgba(166,139,98,.5);
  border-radius:3px;
}
.envelope-letter {
  position:absolute; z-index:2; left:8%; right:8%; bottom:10px; height:82%;
  display:flex; flex-direction:column; justify-content:center; align-items:center;
  background:#fffdf8; border:1px solid #e6d9c6; color:var(--ink);
  box-shadow:0 4px 15px rgba(80,60,35,.08); transition:transform 1.05s cubic-bezier(.2,.75,.2,1), bottom 1.05s;
}
.letter-small { font-family:"Playfair Display",serif; font-style:italic; color:var(--muted); font-size:14px; }
.letter-monogram { font-family:"Playfair Display",serif; font-size:58px; line-height:1.2; color:#8d7655; }
.letter-monogram i,.envelope-names i { font-weight:400; color:var(--gold); }
.letter-names { font-family:"Playfair Display",serif; font-size:21px; }
.letter-date { margin-top:12px; font-size:10px; letter-spacing:3px; color:var(--muted); }
.envelope-front {
  position:absolute; z-index:3; inset:0; overflow:hidden; border-radius:5px;
  background:linear-gradient(145deg,#eee3d3,#e5d7c4);
  clip-path:polygon(0 0,50% 55%,100% 0,100% 100%,0 100%);
  border:1px solid rgba(166,139,98,.28);
}
.envelope-front:after {
  content:""; position:absolute; inset:12px; border:1px dashed rgba(166,139,98,.55);
  clip-path:polygon(0 0,50% 55%,100% 0,100% 100%,0 100%);
}
.envelope-flap {
  position:absolute; z-index:5; left:0; top:0; width:100%; height:58%;
  background:linear-gradient(160deg,#f8f1e6,#e8dbc9);
  clip-path:polygon(0 0,100% 0,50% 100%);
  transform-origin:top center; transform:rotateX(0deg);
  transition:transform .85s ease; backface-visibility:hidden;
}
.envelope-flap:after {
  content:""; position:absolute; inset:10px 12px 0;
  border-top:1px dashed rgba(166,139,98,.55);
  clip-path:polygon(0 0,100% 0,50% 100%);
}
.wax-seal {
  position:absolute; z-index:7; left:50%; top:48%; transform:translate(-50%,-50%);
  width:58px; height:58px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:#f8eddb; font:20px "Playfair Display",serif; letter-spacing:-2px;
  background:radial-gradient(circle at 35% 28%,#bd9c6c,#8b6842 72%);
  border:3px double rgba(248,237,219,.75); box-shadow:0 3px 8px rgba(70,45,20,.2);
  transition:opacity .25s, transform .35s;
}
.wax-seal span { font-style:italic; font-size:14px; margin:0 1px; }
.embroidered { position:absolute; z-index:6; color:#9b9b75; font-size:68px; line-height:1; text-shadow:0 1px #fff8; }
.sprig-left { left:17px; bottom:17px; transform:rotate(-28deg); }
.sprig-right { right:17px; bottom:17px; transform:scaleX(-1) rotate(-28deg); }
.envelope-stitch { position:absolute; z-index:4; top:14px; bottom:14px; width:1px; border-left:1px dashed rgba(166,139,98,.5); }
.stitch-one { left:14px; } .stitch-two { right:14px; }
.envelope-names { margin-top:30px; font:italic 30px "Playfair Display",serif; color:var(--ink); }
.envelope-hint { margin-top:15px; font-size:9px; letter-spacing:2.5px; }
.envelope-footer { position:absolute; bottom:25px; font-size:9px; }
.envelope-footer span { padding:0 9px; color:#b5a58e; }
.envelope-screen.is-opening .envelope-flap { transform:rotateX(180deg); }
.envelope-screen.is-opening .wax-seal { opacity:0; transform:translate(-50%,-50%) scale(.6); }
.envelope-screen.is-opening .envelope-letter { bottom:125px; transform:translateY(-55px); }
.envelope-screen.is-opening .envelope-open { animation:envelope-lift 1.25s ease forwards; }
@keyframes envelope-lift { 0% { transform:scale(1); } 55% { transform:scale(1.035); } 100% { transform:scale(1.08); opacity:0; } }
@media(max-width:600px) {
  .envelope { height:270px; }
  .envelope-names { font-size:26px; }
  .letter-monogram { font-size:48px; }
  .letter-small { font-size:11px; }
  .letter-names { font-size:17px; }
  .embroidered { font-size:50px; }
  .hero { min-height:590px; background-position:54% center; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; }
}
