:root {
  --ivory: #f8f1e7;
  --paper: #fffaf0;
  --wine: #792d3a;
  --pine: #284638;
  --gold: #c2a46d;
  --ink: #34372e;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --script: "Italianno", "Brush Script MT", cursive;
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0; color: var(--ink); background: var(--ivory); font-family: var(--sans); overflow-x: clip; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--wine); outline-offset: 8px; }

.invitation { position: relative; width: 100%; overflow: clip; }
.scene { position: relative; min-height: 100svh; isolation: isolate; overflow: hidden; background: #ebe2d3; }
.scene::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse 54% 46% at 50% 40%, #fbf5e9 0%, #f3eadb 65%, #ded4c5 130%); }
.scene-grain, .paper-grain { position: absolute; inset: 0; pointer-events: none; opacity: .54; background-image: url("assets/linen-grain.svg"); background-size: 190px 190px; mix-blend-mode: multiply; }
.table-glow { position: absolute; z-index: -1; width: 78vw; height: 70vh; left: 50%; top: 50%; transform: translate(-50%,-50%); background: radial-gradient(ellipse, rgba(255,250,239,.8), rgba(255,250,239,0) 68%); pointer-events: none; }

.entry { display: grid; grid-template-rows: 1fr auto; padding: 24px 16px 18px; }
.entry-content { position: relative; z-index: 4; min-height: calc(100svh - 76px); display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; padding: 39px 0 20px; text-align: center; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .23em; color: var(--wine); text-transform: uppercase; }
.entry-kicker { display: flex; align-items: center; gap: 13px; margin: 0 0 12px; white-space: nowrap; }
.entry-kicker .rule { height: 1px; width: 26px; background: var(--gold); }
.entry h1 { max-width: 600px; margin: 0 0 clamp(34px, 7vh, 65px); color: var(--pine); font: 400 clamp(29px, 6.2vw, 53px)/1.25 var(--serif); letter-spacing: -.038em; text-wrap: balance; }
.entry h1 em, .cover h2 em { color: var(--wine); font-weight: 400; }
.entry-instruction { margin: clamp(30px, 5vh, 52px) 0 0; color: #6d6254; font-size: 12px; letter-spacing: .035em; }
.tap-mark { color: var(--gold); font-size: 17px; vertical-align: -1px; margin-right: 7px; }
.entry-footer { position: relative; z-index: 4; display: flex; justify-content: center; flex-wrap: wrap; text-align: center; align-items: center; gap: 6px; max-width: 1160px; width: 100%; margin: auto; color: #867b69; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.entry-footer { gap: 6px 14px; }
.entry-footer span:nth-child(2) { color: var(--gold); }

/* Each paper layer, ribbon and bow piece has its own stacking and movement. */
.envelope { --env-w: min(84vw, 540px); position: relative; z-index: 5; display: block; flex: none; width: var(--env-w); height: calc(var(--env-w) * .685); padding: 0; border: 0; border-radius: 3px; background: transparent; cursor: pointer; transform-style: preserve-3d; perspective: 900px; filter: drop-shadow(0 14px 22px rgba(75,53,38,.12)); }
.envelope { transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .5s ease; animation: envelope-float 6s ease-in-out infinite; }
.envelope:hover:not(:disabled) { filter: drop-shadow(0 24px 30px rgba(75,53,38,.2)); }
.envelope:hover:not(:disabled) .envelope-flap { transform: rotateX(14deg); }
.envelope:active:not(:disabled) { transform: scale(.985); }
.envelope:disabled { cursor: default; }
.envelope span { position: absolute; display: block; }
.envelope-shadow { inset: auto 5% -8% 5%; height: 14%; border-radius: 50%; background: rgba(73,55,42,.2); filter: blur(18px); z-index: -1; }
.envelope-back { inset: 0; z-index: 1; border: 1px solid #dfd0bb; border-radius: 2px; background: linear-gradient(130deg, #eee2d0, #fff9ef 44%, #e7d9c5); box-shadow: inset 0 0 27px rgba(139,108,76,.11), 0 2px 3px #d7c7b2; }
.envelope-card { z-index: 2; left: 8%; right: 8%; top: 7%; height: 86%; background: #fffaf1 url("assets/paper-grain.svg") repeat; box-shadow: 0 1px 10px rgba(82,60,42,.13); border: 1px solid #e8daca; display: flex !important; flex-direction: column; align-items: center; justify-content: center; transform: translateY(5%); }
.card-small { position: static !important; color: #9b8469; font-size: clamp(8px, 1.45vw, 11px); letter-spacing: .17em; text-transform: uppercase; }
.card-ornament { position: static !important; color: var(--gold); margin: 8px 0 2px; font-size: clamp(15px, 3vw, 22px); }
.card-script { position: static !important; color: var(--wine); font: clamp(33px, 8vw, 59px)/1 var(--script); }
.card-line { position: static !important; width: 37px; height: 1px; margin-top: 11px; background: var(--gold); }
.envelope-front { inset: 0; z-index: 4; border-radius: 2px; background: linear-gradient(24deg, transparent 49.55%, rgba(209,187,158,.52) 49.9%, transparent 50.25%) left bottom/50.2% 100% no-repeat, linear-gradient(-24deg, transparent 49.55%, rgba(209,187,158,.52) 49.9%, transparent 50.25%) right bottom/50.2% 100% no-repeat, linear-gradient(153deg, transparent 49.5%, #f8efe1 49.7%) left bottom/50.2% 100% no-repeat, linear-gradient(-153deg, transparent 49.5%, #efe3d2 49.7%) right bottom/50.2% 100% no-repeat, linear-gradient(0deg, #f8efe1, #f8efe1); clip-path: polygon(0 0, 50% 53%, 100% 0, 100% 100%, 0 100%); box-shadow: inset 0 -12px 20px rgba(149,124,94,.08), 0 2px 3px rgba(77,59,42,.09); }
.envelope-front::after { content: ""; position: absolute; inset: 0; background: url("assets/paper-grain.svg") repeat; opacity: .48; clip-path: inherit; }
.envelope-flap { z-index: 5; left: 0; top: 0; width: 100%; height: 58%; transform-origin: 50% 0; clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(180deg, #faf2e6 0%, #f0e3d0 55%, #e2d0b6 100%); filter: drop-shadow(0 3px 3px rgba(104,81,60,.18)); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.envelope-flap::before { content: ""; position: absolute; inset: 1px; clip-path: inherit; background: url("assets/paper-grain.svg") repeat; opacity: .4; }
.ribbon { z-index: 6; background: linear-gradient(90deg, #5f1e2b, #903746 16%, #7b2c3a 40%, #a14b58 51%, #6f2735 76%, #571b28); box-shadow: 1px 2px 5px rgba(63,23,32,.27), inset 1px 0 1px rgba(255,202,209,.24); }
.ribbon--horizontal { left: -1%; top: 41%; width: 102%; height: 15%; }
.ribbon--vertical { left: 45%; top: -2%; width: 10%; height: 104%; background: linear-gradient(90deg, #5b202d, #993f4d 24%, #b65e68 49%, #7b2938 73%, #5b202d); }
.bow { z-index: 8; left: 50%; top: 48%; width: 25%; height: 32%; transform: translate(-50%,-50%); filter: drop-shadow(0 4px 4px rgba(71,28,39,.3)); }
.bow-loop { top: 12%; width: 46%; height: 52%; background: radial-gradient(ellipse 22% 26% at var(--fold, 62%) 50%, rgba(48,10,20,.75) 0 45%, transparent 100%), linear-gradient(160deg, #b9606b 0%, #8e3443 38%, #6a2231 70%, #4f1622 100%); box-shadow: inset 0 2px 3px rgba(255,205,212,.35), inset -3px -4px 8px rgba(36,8,15,.45), 2px 3px 5px rgba(38,18,20,.25); }
.bow-loop--left { left: 4%; border-radius: 70% 18% 18% 70% / 80% 50% 50% 80%; transform: rotate(-12deg); transform-origin: 100% 50%; }
.bow-loop--right { --fold: 38%; right: 4%; border-radius: 18% 70% 70% 18% / 50% 80% 80% 50%; transform: rotate(12deg); transform-origin: 0 50%; }
.bow-knot { z-index: 2; left: 40%; top: 24%; width: 20%; height: 30%; border-radius: 40%; background: linear-gradient(90deg, #60202e, #b95864 50%, #69222f); box-shadow: 0 2px 4px rgba(52,14,22,.35); }
.bow-tail { top: 45%; width: 18%; height: 54%; background: linear-gradient(90deg, #6d2331, #a84654 45%, #6f2532); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); }
.bow-tail--left { left: 30%; transform: rotate(24deg); }
.bow-tail--right { right: 30%; transform: rotate(-24deg); }
.envelope-label { z-index: 7; right: 3%; bottom: 10%; width: 37%; min-height: 22%; display: grid !important; place-items: center; padding: 8px 12px; background: #faf2e6 url("assets/paper-grain.svg"); border: 1px solid #e4d4bd; color: var(--pine); font: clamp(22px, 5vw, 34px)/.85 var(--script); transform: rotate(-7deg); box-shadow: 1px 3px 7px rgba(62,42,31,.19); }
.envelope-label::before { content: ""; position: absolute; left: 8px; top: 50%; width: 5px; height: 5px; border: 1px solid #b6a58e; border-radius: 50%; transform: translateY(-50%); }

.entry-sprig, .entry-orange, .cinnamon, .cover-sprig, .cover-orange { position: absolute; display: block; pointer-events: none; user-select: none; }
.entry-sprig { z-index: 1; width: clamp(190px, 34vw, 430px); opacity: .97; filter: drop-shadow(3px 7px 6px rgba(33,49,32,.17)); }
.entry-sprig--top { top: -83px; left: -100px; transform: rotate(20deg); }
.entry-sprig--bottom { bottom: -91px; right: -90px; transform: rotate(196deg); }
.entry-orange { z-index: 2; width: clamp(78px, 13vw, 125px); filter: drop-shadow(3px 7px 5px rgba(97,67,31,.19)); }
.entry-orange--left { left: -23px; bottom: 19%; transform: rotate(-13deg); }
.entry-orange--right { right: -12px; top: 17%; transform: rotate(22deg); width: clamp(58px, 10vw, 100px); }
.cinnamon { z-index: 1; width: clamp(75px, 12vw, 125px); filter: drop-shadow(3px 7px 5px rgba(73,42,27,.16)); }
.cinnamon--left { left: 0; bottom: 9%; transform: rotate(36deg); }
.fairy-lights { position: absolute; pointer-events: none; }
.fairy-lights .wire { position: absolute; inset: 0; border-bottom: 1.5px solid rgba(96,72,46,.55); border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.fairy-lights i { position: absolute; width: 7px; height: 10px; margin: 1px 0 0 -3.5px; background: radial-gradient(circle at 40% 35%, #fffbe9, #f9dc93 55%, #eab35c); border-radius: 50% 50% 55% 55% / 45% 45% 65% 65%; box-shadow: 0 0 5px 2px rgba(249,219,140,.9), 0 0 20px 7px rgba(247,200,110,.45); animation: twinkle 3.2s ease-in-out infinite; }
.fairy-lights i::before { content: ""; position: absolute; left: 1.5px; top: -3px; width: 4px; height: 4px; border-radius: 1px; background: #6a5236; }
.fairy-lights i:nth-of-type(odd) { background: radial-gradient(circle at 40% 35%, #fff4e4, #f6c27f 55%, #de8e4d); }
.fairy-lights i:nth-of-type(2) { animation-delay: -1.1s; }.fairy-lights i:nth-of-type(3) { animation-delay: -2.3s; }.fairy-lights i:nth-of-type(4) { animation-delay: -.6s; }.fairy-lights i:nth-of-type(5) { animation-delay: -1.8s; }.fairy-lights i:nth-of-type(6) { animation-delay: -2.8s; }.fairy-lights i:nth-of-type(7) { animation-delay: -1.4s; }
.fairy-lights--entry { z-index: 2; width: 70vw; max-width: 900px; height: 70px; left: 50%; top: -2px; transform: translateX(-50%); }
.fairy-lights--entry i:nth-of-type(1) { left: 3%; top: 34%; }.fairy-lights--entry i:nth-of-type(2) { left: 18.7%; top: 78%; }.fairy-lights--entry i:nth-of-type(3) { left: 34.3%; top: 95%; }.fairy-lights--entry i:nth-of-type(4) { left: 50%; top: 100%; }.fairy-lights--entry i:nth-of-type(5) { left: 65.7%; top: 95%; }.fairy-lights--entry i:nth-of-type(6) { left: 81.3%; top: 78%; }.fairy-lights--entry i:nth-of-type(7) { left: 97%; top: 34%; }

.cover { display: none; align-items: center; justify-content: center; padding: 18px; }
.cover::before { background: radial-gradient(ellipse 65% 75% at 50% 45%, #f7f0e4 0%, #e9ddc9 100%); }
.cover-table-light { position: absolute; inset: -25%; background: radial-gradient(circle at 52% 42%, rgba(255,232,180,.36), transparent 46%); pointer-events: none; }
.cover-stage { position: relative; width: min(100%, 1030px); margin: auto; z-index: 3; }
.cover-card { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: max(670px, calc(100svh - 36px)); padding: 118px 41px 102px; background: #f9f2e6 url("assets/paper-grain.svg") repeat; box-shadow: 0 26px 60px rgba(78,56,35,.19), 0 3px 8px rgba(72,54,38,.13), inset 0 0 60px rgba(196,171,131,.1); border: 1px solid #fdf9f2; }
.paper-grain { opacity: .17; background-image: url("assets/linen-grain.svg"); }
.paper-border { position: absolute; inset: 18px; border: 1px solid rgba(166,138,97,.49); pointer-events: none; }
.paper-border::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(194,164,109,.21); }
.card-corner { position: absolute; width: 20px; height: 20px; border-color: #b99c69; border-style: solid; z-index: 2; }
.card-corner--tl { top: 24px; left: 24px; border-width: 1px 0 0 1px; }.card-corner--tr { top: 24px; right: 24px; border-width: 1px 1px 0 0; }.card-corner--bl { bottom: 24px; left: 24px; border-width: 0 0 1px 1px; }.card-corner--br { bottom: 24px; right: 24px; border-width: 0 1px 1px 0; }
.cover-copy { position: relative; z-index: 7; width: min(100%, 620px); text-align: center; }
.cover-eyebrow { margin: 0 0 24px; color: var(--wine); font-size: clamp(10px, 2.3vw, 12px); font-weight: 600; letter-spacing: .17em; text-transform: uppercase; }
.cover-flourish { display: block; margin-bottom: 12px; color: var(--gold); font-size: 13px; letter-spacing: .4em; }
.cover h2 { margin: 0 auto; color: var(--pine); font: 400 clamp(40px, 9vw, 80px)/1.09 var(--serif); letter-spacing: -.055em; text-wrap: balance; }
.cover h2 em { display: block; font-style: italic; }
.name-divider { display: flex; justify-content: center; align-items: center; gap: 15px; margin: 27px auto 17px; color: var(--gold); font-size: 11px; }
.name-divider span { width: 45px; height: 1px; background: var(--gold); }
.family-name { margin: 0; color: var(--wine); font: clamp(35px, 7vw, 54px)/1 var(--script); }
.cover-message { max-width: 480px; margin: 24px auto 0; color: #4b4a3d; font-size: clamp(14px, 3vw, 16px); line-height: 1.8; text-wrap: balance; }
.discover { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 42px; color: var(--pine); font-size: 10px; font-weight: 600; text-decoration: none; text-transform: uppercase; letter-spacing: .17em; }
.discover[aria-disabled="true"] { cursor: default; }
.discover:not([aria-disabled="true"]):hover span:first-child { text-decoration: underline; text-underline-offset: 5px; }
.discover-arrow { font-size: 20px; line-height: 1; color: var(--gold); font-weight: 400; animation: nudge 2.4s ease-in-out infinite; }
.cover-sprig { z-index: 3; width: clamp(210px, 34vw, 425px); filter: drop-shadow(3px 7px 5px rgba(23,48,31,.18)); }
.cover-sprig--tl { top: -79px; left: -102px; transform: rotate(16deg); }
.cover-sprig--tr { top: -87px; right: -102px; transform: scaleX(-1) rotate(16deg); }
.cover-sprig--bl { bottom: -86px; left: -108px; transform: scaleY(-1) rotate(16deg); }
.cover-sprig--br { bottom: -78px; right: -108px; transform: scale(-1) rotate(16deg); }
.cover-ribbon { position: absolute; z-index: 4; width: clamp(26px, 5vw, 48px); height: clamp(160px, 23vw, 230px); background: linear-gradient(90deg, #5c1d2b, #9c4450 36%, #b45b61 50%, #6d2432 85%); box-shadow: 3px 4px 7px rgba(68,25,32,.23); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%); }
.cover-ribbon--top { top: -8px; left: 27%; height: clamp(120px, 15vw, 170px); transform: rotate(-4deg); transform-origin: top; }
.cover-ribbon--bottom { display: none; }
.cover-orange { z-index: 5; width: clamp(69px, 10vw, 112px); filter: drop-shadow(2px 5px 4px rgba(89,60,31,.19)); }
.cover-orange--top { top: 42px; right: 10%; transform: rotate(18deg); }
.cover-orange--bottom { bottom: 47px; left: 12%; transform: rotate(-18deg); }
.paper-star { position: absolute; z-index: 3; color: #b89a61; text-shadow: 1px 1px 0 #fff; }.paper-star--one { top: 26%; left: 8%; font-size: 26px; transform: rotate(19deg); }.paper-star--two { top: 34%; right: 8%; font-size: 19px; transform: rotate(-12deg); }.paper-star--three { bottom: 20%; right: 10%; font-size: 10px; }
.fairy-lights--cover { z-index: 6; left: 22%; right: 22%; top: 0; height: 44px; }.fairy-lights--cover i:nth-of-type(1) { left: 3%; top: 34%; }.fairy-lights--cover i:nth-of-type(2) { left: 18.7%; top: 78%; }.fairy-lights--cover i:nth-of-type(3) { left: 34.3%; top: 95%; }.fairy-lights--cover i:nth-of-type(4) { left: 50%; top: 100%; }.fairy-lights--cover i:nth-of-type(5) { left: 65.7%; top: 95%; }.fairy-lights--cover i:nth-of-type(6) { left: 81.3%; top: 78%; }.fairy-lights--cover i:nth-of-type(7) { left: 97%; top: 34%; }
.candle { position: absolute; z-index: 5; width: 53px; height: 146px; bottom: 23%; filter: drop-shadow(5px 7px 6px rgba(88,62,39,.16)); }.candle--left { left: 5%; }.candle--right { right: 5%; bottom: 29%; transform: scale(.8); }.candle span { position: absolute; display: block; }.candle-aura { width: 100px; height: 125px; left: 50%; top: -44px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(255,203,104,.43), rgba(255,224,158,.12) 47%, transparent 72%); animation: aura 4.8s ease-in-out infinite; }.flame { z-index: 3; left: 23px; top: -10px; width: 13px; height: 27px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(ellipse 45% 40% at 50% 78%, #fff 0 30%, transparent 70%), radial-gradient(ellipse at 50% 70%, #fff6cf 10%, #f6c75f 52%, #e08a35 92%); transform-origin: 50% 92%; box-shadow: 0 0 14px 2px rgba(249,197,88,.7), 0 -6px 18px rgba(255,214,128,.35); animation: flame 2.4s ease-in-out infinite; }.wick { z-index: 2; left: 28px; top: 15px; width: 2px; height: 10px; background: #4c3c2e; }.candle-body { z-index: 2; left: 9px; right: 0; top: 21px; bottom: 8px; border-radius: 6px 6px 3px 3px; background: linear-gradient(90deg, #d8c9af, #fff7de 21%, #f8ead0 70%, #cbb998 100%); box-shadow: inset -2px 0 4px rgba(149,127,94,.18); }.candle-body::before { content: ""; position: absolute; top: -3px; left: 0; width: 100%; height: 9px; border-radius: 50%; background: #fff9e8; box-shadow: inset 0 2px 2px #e2d2b8; }.candle-body::after { content: ""; position: absolute; top: 9px; right: 4px; width: 5px; height: 27px; border-radius: 0 0 5px 5px; background: #f7eed9; }.candle-base { z-index: 1; bottom: 2px; left: 0; width: 62px; height: 11px; border-radius: 50%; background: linear-gradient(#d3b77a, #9f7b4e); box-shadow: 0 4px 5px rgba(100,67,39,.22); }

/* ---------- Ambient: warm dust drifting through the room ---------- */
.ambient { position: fixed; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; }
.ambient span { position: absolute; top: -12px; left: var(--x); width: var(--size); height: var(--size); border-radius: 50%; background: radial-gradient(circle, rgba(255,246,214,.95), rgba(232,190,112,.55) 45%, transparent 72%); opacity: 0; filter: blur(var(--blur, 0px)); animation: drift var(--dur) linear var(--delay) infinite; }
.ambient span.flake { background: none; width: auto; height: auto; color: rgba(194,164,109,.55); font-size: var(--size); line-height: 1; }
.ambient span.flake::before { content: "✦"; }

/* ---------- Opening sequence ---------- */
.invitation[data-view="opening"] .envelope { animation: envelope-zoom .62s 1.95s cubic-bezier(.55,0,.8,.3) forwards; }
.invitation[data-view="opening"] .entry h1,
.invitation[data-view="opening"] .entry-kicker { animation: chrome-up .6s .1s ease-in forwards; }
.invitation[data-view="opening"] .entry-instruction,
.invitation[data-view="opening"] .entry-footer { animation: chrome-down .5s ease-in forwards; }
.invitation[data-view="opening"] .entry-sprig--top,
.invitation[data-view="opening"] .entry-orange--right,
.invitation[data-view="opening"] .fairy-lights--entry { animation: decor-out-up .8s 1.8s ease-in forwards; }
.invitation[data-view="opening"] .entry-sprig--bottom,
.invitation[data-view="opening"] .entry-orange--left,
.invitation[data-view="opening"] .cinnamon { animation: decor-out-down .8s 1.8s ease-in forwards; }
.invitation[data-view="opening"] .bow-loop--left { animation: bow-left .6s cubic-bezier(.5,0,.75,0) forwards; }
.invitation[data-view="opening"] .bow-loop--right { animation: bow-right .6s cubic-bezier(.5,0,.75,0) forwards; }
.invitation[data-view="opening"] .bow-knot { animation: vanish .4s .28s forwards; }
.invitation[data-view="opening"] .bow-tail--left { animation: tail-left .6s .05s ease-in forwards; }
.invitation[data-view="opening"] .bow-tail--right { animation: tail-right .6s .05s ease-in forwards; }
.invitation[data-view="opening"] .ribbon--horizontal { animation: ribbon-left .65s .22s cubic-bezier(.6,0,.8,.4) forwards; }
.invitation[data-view="opening"] .ribbon--vertical { animation: ribbon-up .65s .22s cubic-bezier(.6,0,.8,.4) forwards; }
.invitation[data-view="opening"] .envelope-label { animation: label-away .6s .3s cubic-bezier(.5,0,.75,0) forwards; }
.invitation[data-view="opening"] .envelope-flap { animation: flap-open .72s .62s cubic-bezier(.45,0,.2,1) forwards; }
.invitation[data-view="opening"] .envelope-card { animation: card-rise .95s 1.05s cubic-bezier(.2,.75,.25,1) forwards; }
.invitation[data-view="opening"] .entry { animation: entry-away .4s 2.2s ease-in forwards; }
.envelope .spark { z-index: 3; left: 50%; top: 22%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2); border-radius: 50%; background: radial-gradient(circle, #fffbe8 0 25%, #f3cf84 50%, transparent 72%); opacity: 0; pointer-events: none; animation: spark 1.1s var(--d) cubic-bezier(.15,.7,.3,1) forwards; }

/* ---------- Cover arrival ---------- */
.invitation[data-view="cover"] .entry { display: none; }
.invitation[data-view="cover"] .cover { display: flex; animation: entry-away .6s reverse ease-out both; }
.invitation[data-view="cover"] .cover-card { animation: card-arrive 1.1s cubic-bezier(.16,.8,.24,1) both; }
.invitation[data-view="cover"] .cover-sprig--tl { animation: sprig-in-tl 1.3s .25s cubic-bezier(.16,.8,.24,1) both; }
.invitation[data-view="cover"] .cover-sprig--tr { animation: sprig-in-tr 1.3s .35s cubic-bezier(.16,.8,.24,1) both; }
.invitation[data-view="cover"] .cover-sprig--bl { animation: sprig-in-bl 1.3s .45s cubic-bezier(.16,.8,.24,1) both; }
.invitation[data-view="cover"] .cover-sprig--br { animation: sprig-in-br 1.3s .55s cubic-bezier(.16,.8,.24,1) both; }
.invitation[data-view="cover"] .cover-orange { animation: orange-in 1.1s .7s cubic-bezier(.2,1.3,.4,1) both; }
.invitation[data-view="cover"] .cover-orange--bottom { animation-delay: .85s; }
.invitation[data-view="cover"] .cover-ribbon--top { animation: ribbon-drop 1s .6s cubic-bezier(.2,1.25,.4,1) both; }
.invitation[data-view="cover"] .candle,
.invitation[data-view="cover"] .paper-star { animation: soft-in 1.2s .9s ease-out both; }
.invitation[data-view="cover"] .fairy-lights--cover i { animation: light-on .5s ease-out both, twinkle 3.2s 1.6s ease-in-out infinite; }
.invitation[data-view="cover"] .fairy-lights--cover i:nth-of-type(1) { animation-delay: 1.0s, 1.6s; }
.invitation[data-view="cover"] .fairy-lights--cover i:nth-of-type(2) { animation-delay: 1.1s, 2.4s; }
.invitation[data-view="cover"] .fairy-lights--cover i:nth-of-type(3) { animation-delay: 1.2s, 1.9s; }
.invitation[data-view="cover"] .fairy-lights--cover i:nth-of-type(4) { animation-delay: 1.3s, 2.8s; }
.invitation[data-view="cover"] .fairy-lights--cover i:nth-of-type(5) { animation-delay: 1.4s, 2.1s; }
.invitation[data-view="cover"] .fairy-lights--cover i:nth-of-type(6) { animation-delay: 1.5s, 3.1s; }
.invitation[data-view="cover"] .fairy-lights--cover i:nth-of-type(7) { animation-delay: 1.6s, 2.5s; }
.invitation[data-view="cover"] .reveal { animation: text-in .9s .35s cubic-bezier(.2,.7,.25,1) both; }
.invitation[data-view="cover"] .reveal:nth-child(2) { animation-delay: .47s; }
.invitation[data-view="cover"] .reveal:nth-child(3) { animation-delay: .57s; }
.invitation[data-view="cover"] .reveal:nth-child(4) { animation-delay: .8s; }
.invitation[data-view="cover"] .reveal:nth-child(5) { animation-delay: .92s; }
.invitation[data-view="cover"] .reveal:nth-child(6) { animation-delay: 1.08s; }
.invitation[data-view="cover"] .reveal:nth-child(7) { animation-delay: 1.3s; }
.invitation[data-view="cover"] .family-name { animation-name: script-in; }
.invitation[data-view="cover"] .name-divider span { animation: line-grow .9s 1s cubic-bezier(.2,.7,.25,1) both; }

@keyframes envelope-float { 50% { transform: translateY(-5px); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: .55; transform: scale(.88); box-shadow: 0 0 3px 1px rgba(249,219,140,.7), 0 0 10px 3px rgba(247,200,110,.25); } }
@keyframes light-on { from { opacity: 0; transform: scale(.4); box-shadow: none; } 60% { opacity: 1; transform: scale(1.25); } }
@keyframes flame { 0%, 100% { transform: rotate(-2deg) scale(1, 1); } 20% { transform: rotate(2deg) scale(.94, 1.06); } 40% { transform: rotate(-1deg) scale(1.04, .95); } 60% { transform: rotate(3deg) scale(.96, 1.08); } 80% { transform: rotate(-3deg) scale(1.02, .97); } }
@keyframes aura { 50% { opacity: .72; transform: translateX(-50%) scale(.93); } }
@keyframes nudge { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(5px); } }
@keyframes drift { 0% { opacity: 0; transform: translate3d(0, 0, 0); } 12% { opacity: var(--alpha); } 50% { transform: translate3d(var(--sway), 55vh, 0); } 88% { opacity: var(--alpha); } 100% { opacity: 0; transform: translate3d(0, 108vh, 0); } }
@keyframes bow-left { to { transform: translate(-130%, -60%) rotate(-110deg) scale(.5); opacity: 0; } }
@keyframes bow-right { to { transform: translate(130%, -60%) rotate(110deg) scale(.5); opacity: 0; } }
@keyframes tail-left { to { transform: translate(-185%, 80%) rotate(80deg); opacity: 0; } }
@keyframes tail-right { to { transform: translate(185%, 80%) rotate(-80deg); opacity: 0; } }
@keyframes vanish { 30% { transform: scale(1.15); } to { opacity: 0; transform: scale(.2); } }
@keyframes ribbon-left { to { transform: translateX(-112%) skewY(-8deg); opacity: 0; } }
@keyframes ribbon-up { to { transform: translateY(-115%) skewX(6deg); opacity: 0; } }
@keyframes label-away { 25% { transform: translate(-4%, -12%) rotate(-12deg); } to { transform: translate(70%, 60%) rotate(28deg); opacity: 0; } }
@keyframes flap-open { 0% { transform: rotateX(0); filter: drop-shadow(0 3px 3px rgba(104,81,60,.18)); } 100% { transform: rotateX(180deg); z-index: 1; filter: drop-shadow(0 -2px 2px rgba(104,81,60,.12)) brightness(.95); } }
@keyframes card-rise { 0% { transform: translateY(5%); } 100% { transform: translateY(-58%) scale(1.03); box-shadow: 0 18px 40px rgba(82,60,42,.2); } }
@keyframes envelope-zoom { to { transform: translateY(-6%) scale(1.14); opacity: 0; filter: drop-shadow(0 30px 40px rgba(75,53,38,.1)) blur(2px); } }
@keyframes chrome-up { to { transform: translateY(-24px); opacity: 0; } }
@keyframes chrome-down { to { transform: translateY(16px); opacity: 0; } }
@keyframes decor-out-up { to { transform: translate(-6%, -30%) rotate(8deg); opacity: 0; } }
@keyframes decor-out-down { to { transform: translate(6%, 30%) rotate(-8deg); opacity: 0; } }
@keyframes spark { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); } }
@keyframes entry-away { to { opacity: 0; } }
@keyframes card-arrive { from { opacity: 0; transform: translateY(28px) scale(.94); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes sprig-in-tl { from { opacity: 0; transform: translate(-30%, -30%) rotate(4deg); } }
@keyframes sprig-in-tr { from { opacity: 0; transform: translate(30%, -30%) scaleX(-1) rotate(4deg); } }
@keyframes sprig-in-bl { from { opacity: 0; transform: translate(-30%, 30%) scaleY(-1) rotate(4deg); } }
@keyframes sprig-in-br { from { opacity: 0; transform: translate(30%, 30%) scale(-1) rotate(4deg); } }
@keyframes orange-in { from { opacity: 0; transform: translateY(-40px) rotate(-120deg) scale(.6); } }
@keyframes ribbon-drop { from { opacity: 0; transform: rotate(-4deg) scaleY(0); } }
@keyframes soft-in { from { opacity: 0; } }
@keyframes text-in { from { opacity: 0; transform: translateY(16px); filter: blur(3px); } to { opacity: 1; transform: translateY(0); filter: none; } }
@keyframes script-in { from { opacity: 0; clip-path: inset(-40% 100% -40% -10%); } 20% { opacity: 1; } to { opacity: 1; clip-path: inset(-40% -10% -40% -10%); } }
@keyframes line-grow { from { transform: scaleX(0); } }

@media (min-width: 720px) {
  .entry { padding: 30px 32px 22px; }
  .entry-content { padding: 28px 0 20px; }
  .entry h1 { max-width: 720px; margin-bottom: 54px; }
  .entry-sprig--top { top: -118px; left: -80px; }.entry-sprig--bottom { bottom: -118px; right: -52px; }
  .entry-orange--left { left: 5%; bottom: 21%; }.entry-orange--right { right: 11%; top: 21%; }
  .cinnamon--left { left: 10%; bottom: 12%; }
  .entry-footer { font-size: 10px; }
  .cover { padding: 30px; }.cover-card { min-height: min(820px, calc(100svh - 60px)); padding: 100px 140px 85px; }.paper-border { inset: 25px; }.card-corner--tl { top: 31px; left: 31px; }.card-corner--tr { top: 31px; right: 31px; }.card-corner--bl { bottom: 31px; left: 31px; }.card-corner--br { bottom: 31px; right: 31px; }
  .cover-sprig--tl { top: -102px; left: -93px; }.cover-sprig--tr { top: -101px; right: -93px; }.cover-sprig--bl { bottom: -100px; left: -96px; }.cover-sprig--br { bottom: -98px; right: -96px; }
  .cover-eyebrow { margin-bottom: 30px; }.cover-message { margin-top: 29px; }.discover { margin-top: 49px; }
}

@media (max-width: 480px) {
  .entry { padding-left: 9px; padding-right: 9px; }
  .entry h1 { max-width: 325px; font-size: clamp(28px, 8vw, 37px); margin-bottom: 44px; }
  .entry-sprig { width: 250px; }.entry-sprig--top { top: -70px; left: -95px; }.entry-sprig--bottom { bottom: -78px; right: -120px; }
  .entry-footer { text-shadow: 0 0 4px #f1e8d9, 0 0 10px #f1e8d9; }
  .entry-orange--left { bottom: 14%; left: -36px; }.entry-orange--right { top: 20%; right: -30px; }
  .cinnamon--left { left: -33px; bottom: 5%; }
  .fairy-lights--entry { width: 112vw; height: 52px; }
  .cover { padding: 10px; }.cover-card { min-height: calc(100svh - 20px); padding: 111px 43px 91px; }.paper-border { inset: 12px; }.paper-border::after { inset: 4px; }
  .card-corner--tl { top: 17px; left: 17px; }.card-corner--tr { top: 17px; right: 17px; }.card-corner--bl { bottom: 17px; left: 17px; }.card-corner--br { bottom: 17px; right: 17px; }
  .cover-sprig { width: 240px; }.cover-sprig--tl { top: -62px; left: -112px; }.cover-sprig--tr { top: -62px; right: -112px; }.cover-sprig--bl { bottom: -62px; left: -112px; }.cover-sprig--br { bottom: -62px; right: -112px; }
  .cover-ribbon--top { left: 30%; height: 92px; }.cover-orange--top { right: -19px; top: 70px; width: 66px; }.cover-orange--bottom { left: -16px; bottom: 66px; width: 70px; }
  .paper-star--one { top: 27%; left: 5%; }.paper-star--two { top: 33%; right: 4%; }.paper-star--three { bottom: 22%; right: 7%; }
  .candle { transform: scale(.48); transform-origin: bottom left; bottom: 34%; left: 0; }.candle--right { transform: scale(.43); transform-origin: bottom right; bottom: 25%; right: 0; left: auto; }
  .cover-eyebrow { max-width: 250px; margin: 0 auto 20px; font-size: 10px; line-height: 1.6; }
  .cover h2 { font-size: clamp(35px, 10.2vw, 47px); line-height: 1.13; }
  .name-divider { margin: 23px auto 14px; }.family-name { font-size: clamp(35px, 10vw, 48px); }.cover-message { margin-top: 21px; font-size: 13px; line-height: 1.68; }.discover { margin-top: 36px; font-size: 9px; }
}

@media (max-height: 690px) and (max-width: 480px) {
  .entry-content { padding-top: 14px; }.entry h1 { margin-bottom: 28px; }.entry-instruction { margin-top: 25px; }.cover-card { padding-top: 100px; padding-bottom: 80px; }.cover h2 { font-size: 36px; }.cover-message { margin-top: 16px; }.discover { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ambient, .envelope .spark { display: none; }
  .invitation[data-view="opening"] .entry { opacity: 0; }
}

/* Second section: a family letter, a thick paper calendar and its countdown. */
html { scroll-behavior: smooth; }
.details { display: none; padding: 0 0 64px; background: #e8dece; scroll-margin-top: 0; }
.details::before { background: radial-gradient(ellipse 70% 55% at 50% 43%, #f4ecdf 0%, #e9ddcc 75%, #d9ccb9 130%); }
.invitation[data-view="cover"] .details { display: block; }
.details-linen-fold { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(102deg, transparent 0 8%, rgba(255,251,242,.27) 8.3%, rgba(142,119,92,.08) 9%, transparent 11% 88%, rgba(132,111,84,.09) 89%, rgba(255,251,242,.28) 90%, transparent 92%), linear-gradient(0deg, rgba(255,255,255,.24), transparent 20% 80%, rgba(118,97,74,.05)); }
.details-stage { position: relative; z-index: 3; width: min(100%, 1160px); margin: 0 auto; padding: 91px 22px 55px; }
.details-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 51px; align-items: center; }
.details-sprig, .details-orange, .details-cinnamon, .details-leaves { position: absolute; z-index: 1; pointer-events: none; user-select: none; }
.details-sprig { width: clamp(250px, 34vw, 430px); filter: drop-shadow(3px 7px 5px rgba(23,48,31,.17)); }
.details-sprig--top { top: -107px; left: -115px; transform: rotate(13deg); }
.details-sprig--bottom { bottom: -97px; right: -115px; transform: rotate(193deg); }
.details-orange { width: clamp(76px, 10vw, 118px); filter: drop-shadow(3px 7px 5px rgba(97,67,31,.18)); }
.details-orange--top { top: 18%; right: -27px; transform: rotate(19deg); }
.details-orange--bottom { bottom: 14%; left: -20px; transform: rotate(-15deg); }
.details-cinnamon { width: 118px; left: 1%; bottom: 12%; transform: rotate(14deg); filter: drop-shadow(2px 5px 4px rgba(73,42,27,.18)); }
.details-leaves { width: 170px; right: -46px; bottom: 21%; transform: rotate(13deg); filter: drop-shadow(2px 6px 4px rgba(32,56,41,.15)); }
.fairy-lights--details { z-index: 2; top: 0; left: 50%; width: min(74vw, 770px); height: 70px; transform: translateX(-50%); }
.fairy-lights--details i:nth-of-type(1) { left: 3%; top: 34%; }.fairy-lights--details i:nth-of-type(2) { left: 18.7%; top: 78%; }.fairy-lights--details i:nth-of-type(3) { left: 34.3%; top: 95%; }.fairy-lights--details i:nth-of-type(4) { left: 50%; top: 100%; }.fairy-lights--details i:nth-of-type(5) { left: 65.7%; top: 95%; }.fairy-lights--details i:nth-of-type(6) { left: 81.3%; top: 78%; }.fairy-lights--details i:nth-of-type(7) { left: 97%; top: 34%; }

.detail-appear { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .85s cubic-bezier(.2,.75,.25,1); }
.details.is-visible .detail-appear { opacity: 1; transform: none; }
.details.is-visible .date-column { transition-delay: .12s; }
.details.is-visible .countdown-paper { transition-delay: .23s; }

.letter-paper { position: relative; padding: 60px 38px 43px; background: #fbf6eb url("assets/paper-grain.svg") repeat; border: 1px solid #fffaf1; box-shadow: 0 19px 35px rgba(79,55,34,.15), 0 3px 7px rgba(69,49,34,.09), inset 0 0 44px rgba(174,144,102,.09); text-align: center; }
.letter-paper::before { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.48), transparent 25% 75%, rgba(176,148,110,.05)), url("assets/linen-grain.svg"); opacity: .17; }
.letter-paper::after { content: ""; position: absolute; right: 0; top: 0; width: 42px; height: 42px; background: linear-gradient(225deg, #e6d9c4 0 49%, #fffaf0 50%); box-shadow: -2px 2px 5px rgba(107,83,58,.08); }
.letter-inner-border { position: absolute; inset: 16px; border: 1px solid rgba(194,164,109,.37); pointer-events: none; }
.letter-small-star { position: relative; display: block; color: var(--gold); font-size: 22px; margin-bottom: 13px; }
.letter-opening { position: relative; max-width: 420px; margin: 0 auto 21px; color: var(--wine); font: clamp(34px, 7vw, 47px)/.9 var(--script); }
.letter-paper h2 { position: relative; max-width: 530px; margin: 0 auto; color: var(--pine); font: 400 clamp(31px, 7vw, 49px)/1.19 var(--serif); letter-spacing: -.046em; text-wrap: balance; }
.letter-paper h2 em { display: block; color: var(--wine); font-weight: 400; }
.letter-rule { position: relative; display: flex; justify-content: center; align-items: center; gap: 13px; margin: 27px auto 25px; color: var(--gold); font-size: 10px; }
.letter-rule span { width: 44px; height: 1px; background: var(--gold); }
.letter-message { position: relative; max-width: 490px; margin: 0 auto; color: #49493e; font-size: 14px; line-height: 1.83; }
.letter-message p { margin: 0 0 17px; }
.letter-signature { position: relative; margin: 28px auto 0; color: #5b5b4c; font-size: 13px; line-height: 1.8; }
.letter-signature span { color: var(--wine); font: 39px/1 var(--script); }
.letter-endmark { position: relative; display: block; margin-top: 13px; color: var(--gold); font-size: 26px; }

.date-column { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 19px; }
.calendar-paper { position: relative; width: min(100%, 385px); min-height: 457px; padding: 81px 29px 39px; text-align: center; background: #fdf8ee url("assets/paper-grain.svg") repeat; border: 1px solid #fefaf1; box-shadow: 0 19px 35px rgba(79,55,34,.16), 0 3px 7px rgba(69,49,34,.09), inset 0 0 39px rgba(174,144,102,.1); transform: rotate(1.6deg); }
.calendar-paper::before { content: ""; position: absolute; inset: 13px; border: 1px solid rgba(194,164,109,.42); pointer-events: none; }
.calendar-paper::after { content: ""; position: absolute; top: 42px; left: 20px; right: 20px; height: 1px; background: linear-gradient(90deg, transparent, rgba(194,164,109,.7), transparent); }
.calendar-punch { position: absolute; top: 19px; width: 13px; height: 13px; border-radius: 50%; background: #e8dcc9; box-shadow: inset 1px 2px 3px rgba(94,72,49,.23), 0 0 0 3px #fcf8ed; }
.calendar-punch--left { left: 29%; }.calendar-punch--right { right: 29%; }
.calendar-bow { position: absolute; z-index: 4; top: -28px; left: 50%; width: 92px; height: 68px; transform: translateX(-50%) rotate(-2deg); filter: drop-shadow(1px 4px 3px rgba(67,26,35,.29)); }
.calendar-bow span { position: absolute; display: block; }
.calendar-bow-loop { top: 6px; width: 40px; height: 28px; background: radial-gradient(ellipse 22% 26% at var(--fold, 64%) 50%, rgba(48,10,20,.75) 0 45%, transparent 100%), linear-gradient(160deg, #b9606b 0%, #8e3443 38%, #6a2231 70%, #4f1622 100%); box-shadow: inset 0 2px 3px rgba(255,205,212,.35), inset -3px -4px 6px rgba(36,8,15,.4); }
.calendar-bow-loop--left { left: 6px; border-radius: 70% 18% 18% 70% / 80% 50% 50% 80%; transform: rotate(-12deg); }.calendar-bow-loop--right { --fold: 36%; right: 6px; border-radius: 18% 70% 70% 18% / 50% 80% 80% 50%; transform: rotate(12deg); }
.calendar-bow-knot { z-index: 2; left: 38px; top: 11px; width: 16px; height: 20px; border-radius: 40%; background: linear-gradient(90deg,#6b2532,#b05964 50%,#68232f); box-shadow: 0 2px 3px rgba(52,14,22,.35); }
.calendar-bow-tail { top: 27px; width: 16px; height: 38px; background: linear-gradient(90deg,#68232f,#ae5260 50%,#6d2532); clip-path: polygon(0 0,100% 0,100% 100%,50% 83%,0 100%); }
.calendar-bow-tail--left { left: 29px; transform: rotate(16deg); }.calendar-bow-tail--right { right: 29px; transform: rotate(-16deg); }
.calendar-overline { margin: 0 0 15px; color: #927b5d; font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.calendar-weekday { display: block; color: var(--pine); font: 400 28px/1.2 var(--serif); }
.calendar-date-line { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 10px 0 17px; }
.calendar-day { color: var(--wine); font: 400 clamp(90px, 22vw, 126px)/.95 var(--serif); letter-spacing: -.08em; }
.calendar-month-year { display: flex; flex-direction: column; align-items: flex-start; color: var(--pine); font-family: var(--serif); line-height: 1.15; text-align: left; }
.calendar-month-year span:first-child { font-size: clamp(19px, 5vw, 26px); }
.calendar-year { font-size: clamp(27px, 7vw, 36px); }
.calendar-time { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 198px; padding: 14px 18px; border-top: 1px solid rgba(194,164,109,.6); border-bottom: 1px solid rgba(194,164,109,.6); color: var(--pine); font: 400 23px/1.2 var(--serif); white-space: nowrap; }
.calendar-clock { color: var(--gold); font-size: 25px; line-height: 1; }
.calendar-bottom-ornament { display: block; margin: 20px auto 0; color: var(--gold); font-size: 10px; }
.date-note { display: flex; align-items: center; gap: 10px; margin: 28px 0 0; color: #806e58; font-size: 9px; letter-spacing: .14em; text-align: center; white-space: nowrap; }.date-note span { width: 20px; height: 1px; background: var(--gold); }

.countdown-paper { position: relative; max-width: 840px; margin: 51px auto 0; padding: 42px 31px 38px; text-align: center; background: #fcf7ed url("assets/paper-grain.svg") repeat; border: 1px solid #fffaf0; box-shadow: 0 17px 32px rgba(79,55,34,.13), 0 2px 6px rgba(69,49,34,.08); }
.countdown-paper::before { content: ""; position: absolute; inset: 11px; border: 1px solid rgba(194,164,109,.4); pointer-events: none; }
.countdown-ribbon { position: absolute; z-index: 1; top: 0; right: 8%; width: 25px; height: 66px; background: linear-gradient(90deg,#60202e,#a24553 50%,#6d2635); clip-path: polygon(0 0,100% 0,100% 100%,50% 79%,0 100%); filter: drop-shadow(2px 2px 2px rgba(70,29,35,.18)); }
.countdown-kicker { position: relative; margin: 0 0 8px; color: var(--wine); font: 30px/1 var(--script); }
.countdown-paper h3 { position: relative; margin: 0 0 27px; color: var(--pine); font: 400 clamp(25px, 6vw, 34px)/1.25 var(--serif); letter-spacing: -.035em; text-wrap: balance; }
.countdown-grid { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 10px minmax(0,1fr) 10px minmax(0,1fr) 10px minmax(0,1fr); align-items: center; width: min(100%, 690px); margin: 0 auto; }
.countdown-unit { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.countdown-number { color: var(--wine); font: 400 clamp(31px, 8vw, 57px)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.countdown-label { color: #666253; font-size: clamp(8px, 2vw, 10px); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.countdown-separator { align-self: start; margin-top: 15px; color: var(--gold); font-size: 12px; }
.countdown-status { position: relative; margin: 8px auto 0; color: var(--wine); font: 400 clamp(24px, 5vw, 35px)/1.25 var(--serif); text-wrap: balance; }
.countdown-grid[hidden], .countdown-status[hidden] { display: none; }

/* ---------- Details polish ---------- */
.details::after { content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: 120px; pointer-events: none; background: linear-gradient(#e9ddc9, transparent); }
.details-orange, .details-cinnamon, .details-leaves { translate: 0 var(--parallax, 0px); }
.letter-paper, .calendar-paper, .countdown-paper { transition: box-shadow .5s ease, translate .5s cubic-bezier(.2,.7,.2,1); }
.letter-paper:hover, .countdown-paper:hover { translate: 0 -3px; box-shadow: 0 26px 44px rgba(79,55,34,.18), 0 4px 9px rgba(69,49,34,.1), inset 0 0 44px rgba(174,144,102,.09); }
.calendar-paper:hover { translate: 0 -3px; }
.details.is-visible .calendar-paper { animation: calendar-settle 1.2s .25s cubic-bezier(.2,.9,.3,1.15) both; }
.details.is-visible .calendar-bow { animation: bow-wiggle 1.6s 1.1s ease-in-out both; }
.details.is-visible .letter-opening { animation: script-in 1.4s .45s cubic-bezier(.2,.7,.25,1) both; }
.details.is-visible .letter-rule span, .details.is-visible .closing-rule span { animation: line-grow 1s .7s cubic-bezier(.2,.7,.25,1) both; }

.wax-seal { position: relative; display: grid; place-items: center; width: 58px; height: 58px; margin: 18px auto 0; border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%; background: radial-gradient(circle at 36% 32%, #b4505d 0%, #8a2e3c 38%, #6a1f2c 72%, #521622 100%); box-shadow: 0 3px 6px rgba(70,20,30,.35), inset 0 -3px 5px rgba(40,8,16,.45), inset 0 2px 3px rgba(255,190,198,.3); transform: rotate(-8deg); }
.wax-seal::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1.5px solid rgba(60,12,22,.5); box-shadow: 0 1px 0 rgba(255,190,198,.25), inset 0 1px 0 rgba(255,190,198,.2); }
.wax-seal::after { content: ""; position: absolute; inset: -3px -2px -2px -3px; z-index: -1; border-radius: 42% 58% 46% 54% / 55% 45% 55% 45%; background: #7a2633; }
.wax-seal-initial { position: relative; color: #e7b9a3; font: italic 500 25px/1 var(--serif); text-shadow: 0 -1px 0 rgba(50,10,18,.6), 0 1px 0 rgba(255,200,205,.25); opacity: .9; }
.details.is-visible .wax-seal { animation: seal-press .9s 1s cubic-bezier(.3,1.5,.5,1) both; }

.countdown-unit { position: relative; padding: 14px 4px 11px; border-radius: 3px; background: linear-gradient(#fffaf1, #f6eddd); border: 1px solid rgba(194,164,109,.32); box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgba(96,72,46,.08); }
.countdown-number { display: inline-block; }
.countdown-number.is-ticking { animation: tick .55s cubic-bezier(.2,.7,.25,1); }
.countdown-separator { align-self: center; margin-top: -12px; justify-self: center; }

.details-closing { position: relative; margin: 58px auto 0; text-align: center; }
.closing-rule { display: flex; justify-content: center; align-items: center; gap: 13px; color: var(--gold); font-size: 10px; }
.closing-rule span { width: 52px; height: 1px; background: var(--gold); }
.closing-script { margin: 16px 0 6px; color: var(--wine); font: clamp(34px, 6vw, 46px)/1 var(--script); }
.closing-family { margin: 0; color: #7c6c56; font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.details.is-visible .details-closing { transition-delay: .35s; }

@keyframes calendar-settle { from { opacity: 0; transform: translateY(-34px) rotate(-5deg); } 60% { transform: translateY(3px) rotate(2.4deg); } to { opacity: 1; transform: rotate(1.6deg); } }
@keyframes bow-wiggle { 0%, 100% { transform: translateX(-50%) rotate(-2deg); } 25% { transform: translateX(-50%) rotate(5deg); } 55% { transform: translateX(-50%) rotate(-6deg); } 80% { transform: translateX(-50%) rotate(1deg); } }
@keyframes seal-press { from { opacity: 0; transform: rotate(-8deg) scale(1.6); } 60% { opacity: 1; transform: rotate(-8deg) scale(.92); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }
@keyframes tick { from { opacity: .25; transform: translateY(-7px); filter: blur(1px); } to { opacity: 1; transform: none; filter: none; } }

@media (min-width: 800px) {
  .details-stage { padding: 120px 38px 85px; }
  .details-grid { grid-template-columns: minmax(0,1.33fr) minmax(320px,.77fr); gap: 45px; }
  .letter-paper { min-height: 595px; padding: 69px 64px 48px; }
  .calendar-paper { min-height: 470px; }
  .details-sprig--top { left: -91px; }.details-sprig--bottom { right: -78px; }
  .details-orange--top { top: 23%; right: 1%; }.details-orange--bottom { bottom: 22%; left: 1%; }
  .details-leaves { right: -10px; bottom: 20%; }
  .countdown-paper { margin-top: 64px; padding: 42px 58px 41px; }
}

@media (max-width: 480px) {
  .details-stage { padding: 92px 13px 32px; }
  .details-grid { gap: 53px; }
  .details-sprig { width: 255px; }.details-sprig--top { top: -77px; left: -133px; }.details-sprig--bottom { bottom: -67px; right: -133px; }
  .details-orange--top { top: 26%; right: -34px; width: 75px; }.details-orange--bottom { bottom: 11%; left: -31px; width: 76px; }
  .details-cinnamon { bottom: 7%; left: -47px; width: 104px; }.details-leaves { width: 119px; right: -55px; bottom: 29%; }
  .fairy-lights--details { width: 105vw; height: 52px; }
  .letter-paper { padding: 56px 27px 38px; }
  .letter-inner-border { inset: 11px; }
  .letter-opening { font-size: 34px; margin-bottom: 19px; }
  .letter-paper h2 { font-size: clamp(30px, 8.2vw, 39px); }
  .letter-message { font-size: 13px; line-height: 1.75; }.letter-message p { margin-bottom: 14px; }
  .letter-signature { margin-top: 22px; }.letter-signature span { font-size: 37px; }
  .calendar-paper { width: min(100% - 18px, 360px); min-height: 425px; padding: 75px 23px 34px; }
  .calendar-day { font-size: clamp(84px, 25vw, 108px); }
  .countdown-paper { margin-top: 54px; padding: 37px 22px 34px; }
  .countdown-kicker { font-size: 27px; }.countdown-paper h3 { margin-bottom: 23px; }
  .countdown-ribbon { right: 8%; width: 19px; height: 43px; }
}

@media (max-width: 480px) {
  .countdown-grid { grid-template-columns: minmax(0,1fr) 6px minmax(0,1fr) 6px minmax(0,1fr) 6px minmax(0,1fr); }
  .countdown-unit { padding: 11px 2px 9px; }
  .countdown-separator { font-size: 8px; }
  .countdown-label { letter-spacing: .08em; }
  .wax-seal { width: 52px; height: 52px; }
}

@media (max-width: 350px) {
  .letter-paper { padding-left: 22px; padding-right: 22px; }
  .letter-opening { font-size: 32px; }.letter-paper h2 { font-size: 29px; }
  .calendar-date-line { gap: 7px; }.calendar-day { font-size: 82px; }.calendar-month-year span:first-child { font-size: 18px; }.calendar-year { font-size: 27px; }
  .countdown-paper { padding-left: 18px; padding-right: 18px; }
  .countdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 17px; }
  .countdown-number { font-size: 39px; }.countdown-label { font-size: 10px; }
  .countdown-separator { display: none; }
  .countdown-unit:nth-child(1), .countdown-unit:nth-child(5) { border-right: 1px solid rgba(194,164,109,.55); }
}

@media (prefers-reduced-motion: reduce) {
  .detail-appear { opacity: 1; transform: none; }
}

/* Third section: the warmly lit arrival at the family home. */
.location { display: none; min-height: 100svh; background: var(--pine); color: var(--ivory); }
.location::before { background: radial-gradient(ellipse 62% 58% at 35% 47%, #355747 0%, #264638 59%, #17382d 115%); }
.invitation[data-view="cover"] .location { display: block; }
.location .scene-grain { opacity: .18; mix-blend-mode: screen; }
.location-edge { position: absolute; z-index: 5; left: 0; right: 0; height: 38px; background: #e8dece; pointer-events: none; clip-path: polygon(0 0,100% 0,100% 58%,96% 66%,92% 61%,87% 69%,82% 63%,76% 70%,70% 62%,64% 68%,58% 62%,52% 70%,46% 64%,40% 69%,34% 63%,28% 71%,22% 62%,16% 68%,10% 63%,5% 70%,0 62%); }
.location-edge--top { top: -1px; }.location-edge--bottom { bottom: -1px; transform: rotate(180deg); background: var(--ivory); }
.location-backglow { position: absolute; z-index: 0; width: min(85vw, 930px); aspect-ratio: 1; left: -20%; top: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(208,170,99,.16), transparent 69%); pointer-events: none; }
.location-sprig { position: absolute; z-index: 1; width: clamp(235px, 30vw, 380px); opacity: .37; filter: drop-shadow(4px 7px 5px rgba(4,22,13,.28)); pointer-events: none; }
.location-sprig--left { left: -155px; bottom: -113px; transform: rotate(20deg); }.location-sprig--right { right: -146px; top: -100px; transform: rotate(194deg); }
.location-stage { position: relative; z-index: 2; width: min(100%, 1220px); margin: 0 auto; padding: 113px 27px 145px; }
.location-header { max-width: 670px; margin: 0 auto 48px; text-align: center; opacity: 0; transform: translateY(15px); transition: opacity .8s ease, transform .8s ease; }
.location.is-visible .location-header { opacity: 1; transform: none; }
.location-script { margin: 0 0 14px; color: #e2be81; font: clamp(35px, 6vw, 52px)/.95 var(--script); }
.location h2 { margin: 0; color: #fff7e8; font: 400 clamp(39px, 7vw, 67px)/1.12 var(--serif); letter-spacing: -.05em; text-wrap: balance; }
.location-intro { max-width: 540px; margin: 20px auto 0; color: #eee4d5; font-size: clamp(14px, 2vw, 16px); line-height: 1.7; text-wrap: balance; }
.location-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; align-items: center; }
.arrival-illustration { position: relative; width: min(100%, 650px); margin: 0 auto; opacity: 0; transform: translateY(20px); transition: opacity .9s .12s ease, transform .9s .12s ease; }
.location.is-visible .arrival-illustration { opacity: 1; transform: none; }
.arrival-illustration::before { content: ""; position: absolute; inset: 12% 8% 1%; border-radius: 50%; background: radial-gradient(ellipse, rgba(244,204,128,.27), transparent 67%); filter: blur(19px); }
.arrival-art { position: relative; display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 23px 24px rgba(6,22,14,.38)); }
.arrival-window-light { opacity: .1; transition: opacity 1.5s .35s ease; }
.location.is-visible .arrival-window-light { opacity: .95; }
.arrival-lantern-pane { opacity: .25; transition: opacity 1.2s .85s ease; }
.location.is-visible .arrival-lantern-pane { opacity: 1; }
.arrival-lantern-light { opacity: 0; transition: opacity 1.6s .8s ease; }
.location.is-visible .arrival-lantern-light { opacity: .8; }
.arrival-bulb { fill: #fff0b7; opacity: .28; transition: opacity .8s 1.2s ease; }
.arrival-bulb-halo { fill: url(#arrival-aura); opacity: 0; }
.location.is-visible .arrival-bulb { opacity: 1; animation: arrival-glimmer 5.5s var(--light-delay, 0s) ease-in-out infinite alternate; }
.location.is-visible .arrival-bulb-halo { opacity: .64; animation: arrival-halo 5.5s var(--light-delay, 0s) ease-in-out infinite alternate; }
@keyframes arrival-glimmer { to { opacity: .62; } }
@keyframes arrival-halo { to { opacity: .3; } }

.location-plate { position: relative; width: min(100%, 450px); margin: 0 auto; padding: 66px 36px 51px; color: var(--ink); text-align: center; background: #fbf5e9 url("assets/paper-grain.svg") repeat; border: 1px solid #fff9ef; box-shadow: 0 24px 43px rgba(6,23,14,.31), 0 4px 9px rgba(10,26,17,.2), inset 0 0 48px rgba(175,144,99,.1); opacity: 0; transform: translateY(22px); transition: opacity .85s 1.4s ease, transform .85s 1.4s cubic-bezier(.2,.7,.25,1); }
.location.is-visible .location-plate { opacity: 1; transform: none; }
.location-plate::before { content: ""; position: absolute; inset: 0; background: url("assets/linen-grain.svg"); opacity: .15; pointer-events: none; }
.location-plate-border { position: absolute; inset: 15px; border: 1px solid rgba(194,164,109,.75); pointer-events: none; }
.location-plate-border::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(194,164,109,.2); }
.location-plate-ribbon { position: absolute; z-index: 1; top: -5px; right: 34px; width: 31px; height: 90px; background: linear-gradient(90deg,#5d1c2a,#a34551 46%,#6e2432); clip-path: polygon(0 0,100% 0,100% 100%,50% 83%,0 100%); box-shadow: 3px 4px 6px rgba(65,23,30,.22); }
.location-ornament { position: relative; display: block; margin: 0 auto 11px; color: var(--gold); font-size: 26px; }
.location-overline { position: relative; margin: 0 0 15px; color: #816a4f; font-size: 10px; font-weight: 600; letter-spacing: .19em; text-transform: uppercase; }
.location-plate h3 { position: relative; max-width: 340px; margin: 0 auto; color: var(--pine); font: 400 clamp(29px, 5vw, 40px)/1.22 var(--serif); letter-spacing: -.04em; text-wrap: balance; }
.location-divider { position: relative; display: flex; align-items: center; justify-content: center; gap: 11px; margin: 25px auto 23px; color: var(--gold); font-size: 10px; }
.location-divider span { width: 38px; height: 1px; background: var(--gold); }
.location-address { position: relative; max-width: 340px; margin: 0 auto; color: #354a3b; font-size: 15px; font-weight: 500; line-height: 1.65; text-wrap: balance; }
.location-reference { position: relative; max-width: 330px; margin: 14px auto 0; color: #665f50; font-size: 13px; line-height: 1.55; text-wrap: balance; }
.location-reference[hidden] { display: none; }
.maps-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 52px; max-width: 100%; margin: 31px auto 0; padding: 13px 24px; border: 1px solid #6b2633; background: var(--wine); color: #fff7ec; font-size: 12px; font-weight: 600; letter-spacing: .12em; line-height: 1.2; text-decoration: none; text-transform: uppercase; box-shadow: 0 6px 11px rgba(81,31,42,.2), inset 0 1px rgba(255,220,221,.16); transition: background .25s ease, transform .25s ease, box-shadow .25s ease; }
.maps-button svg { flex: none; }
.maps-button[href]:hover { background: #652432; transform: translateY(-2px); box-shadow: 0 9px 13px rgba(81,31,42,.25); }
.maps-button[href]:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.maps-button[aria-disabled="true"] { cursor: default; background: #744850; border-color: #744850; box-shadow: none; }

@media (min-width: 820px) {
  .location-stage { padding: 117px 39px 133px; }
  .location-header { margin-bottom: 25px; }
  .location-layout { grid-template-columns: minmax(0,1.18fr) minmax(350px,.82fr); gap: clamp(25px, 4vw, 60px); }
  .arrival-illustration { width: 100%; }
  .location-plate { padding: 71px 39px 55px; }
}

@media (max-width: 600px) {
  .location-stage { padding: 83px 13px 108px; }
  .location-header { margin-bottom: 20px; padding: 0 19px; }
  .location-script { font-size: clamp(33px, 9vw, 43px); }
  .location h2 { font-size: clamp(38px, 10vw, 49px); }
  .location-intro { margin-top: 15px; font-size: 13px; }
  .location-layout { gap: 5px; }
  .arrival-illustration { width: calc(100% + 20px); max-width: none; margin-left: -10px; }
  .location-plate { width: min(100%, 450px); padding: 60px 31px 45px; }
  .location-plate-border { inset: 11px; }
  .location-plate-ribbon { right: 25px; width: 23px; height: 62px; }
  .location-sprig--left { left: -177px; bottom: -77px; }.location-sprig--right { right: -170px; top: -80px; }
}

@media (max-width: 350px) {
  .location-stage { padding-left: 10px; padding-right: 10px; }
  .location-plate { padding-left: 25px; padding-right: 25px; }
  .location-plate h3 { font-size: 28px; }
  .location-address { font-size: 14px; }.location-reference { font-size: 12px; }
  .maps-button { padding: 12px 16px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .location-header, .arrival-illustration, .location-plate { opacity: 1; transform: none; transition: none; }
  .arrival-window-light, .arrival-lantern-pane { opacity: 1; transition: none; }
  .arrival-lantern-light { opacity: .8; transition: none; }
  .arrival-bulb { opacity: 1; animation: none !important; }
  .arrival-bulb-halo { opacity: .55; animation: none !important; }
}

/* ---------- La noche: programa, notas y confirmación ---------- */
.night { display: none; padding: 0; background: var(--ivory); }
.night::before { background: linear-gradient(var(--ivory) 0, transparent 160px), radial-gradient(ellipse 70% 50% at 50% 35%, #fbf6ec 0%, #f0e6d6 70%, #e2d6c3 130%); }
.invitation[data-view="cover"] .night { display: block; }
.night-stage { position: relative; z-index: 3; width: min(100%, 1100px); margin: 0 auto; padding: 96px 22px 80px; }
.night-sprig, .night-orange, .night-leaves { position: absolute; z-index: 1; pointer-events: none; user-select: none; }
.night-sprig { width: clamp(240px, 30vw, 400px); filter: drop-shadow(3px 7px 5px rgba(23,48,31,.17)); }
.night-sprig--left { top: 34%; left: -150px; transform: rotate(-12deg); }
.night-sprig--right { bottom: -80px; right: -120px; transform: rotate(196deg); }
.night-orange { width: clamp(70px, 9vw, 108px); top: 9%; right: 4%; transform: rotate(16deg); translate: 0 var(--parallax, 0px); filter: drop-shadow(3px 7px 5px rgba(97,67,31,.18)); }
.night-leaves { width: 150px; left: 3%; top: 8%; transform: rotate(-20deg) scaleX(-1); translate: 0 var(--parallax, 0px); filter: drop-shadow(2px 6px 4px rgba(32,56,41,.15)); }

.night-appear { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .9s cubic-bezier(.2,.75,.25,1); }
.night-appear.is-in { opacity: 1; transform: none; }
.moment:nth-child(2).night-appear { transition-delay: .1s; }.moment:nth-child(3).night-appear { transition-delay: .2s; }.moment:nth-child(4).night-appear { transition-delay: .3s; }
.note-card--tilt.night-appear { transition-delay: .12s; }

.night-header { text-align: center; margin-bottom: 54px; }
.night-script { margin: 0 0 10px; color: var(--wine); font: clamp(34px, 6vw, 48px)/1 var(--script); }
.night h2 { margin: 0; color: var(--pine); font: 400 clamp(38px, 7vw, 64px)/1.1 var(--serif); letter-spacing: -.05em; text-wrap: balance; }

.timeline { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; margin: 0 auto; padding: 0 0 0 64px; max-width: 520px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 25px; top: 8px; bottom: 8px; border-left: 1.5px dashed rgba(166,138,97,.6); }
.moment { position: relative; }
.moment-icon { position: absolute; left: -64px; top: -4px; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #fffaf1; border: 1px solid rgba(194,164,109,.6); box-shadow: 0 0 0 6px var(--ivory), 0 6px 12px rgba(96,72,46,.12); color: var(--wine); }
.moment-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.moment-time { display: block; color: #9a7d52; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.moment h3 { margin: 4px 0 6px; color: var(--pine); font: 400 clamp(24px, 4vw, 30px)/1.15 var(--serif); letter-spacing: -.03em; }
.moment p { margin: 0; color: #4b4a3d; font-size: 14px; line-height: 1.7; }
.moment.is-in .moment-icon { animation: icon-pop .7s .25s cubic-bezier(.3,1.6,.5,1) both; }

.notes-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; max-width: 860px; margin: 72px auto 0; }
.note-card { position: relative; padding: 42px 30px 30px; text-align: center; background: #fdf8ee url("assets/paper-grain.svg") repeat; border: 1px solid #fffaf1; box-shadow: 0 16px 30px rgba(79,55,34,.13), 0 3px 6px rgba(69,49,34,.08); rotate: -1deg; transition: translate .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease; }
.note-card--tilt { rotate: 1.2deg; }
.note-card::before { content: ""; position: absolute; inset: 11px; border: 1px solid rgba(194,164,109,.4); pointer-events: none; }
.note-card:hover { translate: 0 -4px; box-shadow: 0 24px 40px rgba(79,55,34,.17), 0 4px 8px rgba(69,49,34,.1); }
.note-pin { position: absolute; top: -9px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c86a74, #8a2e3c 55%, #5a1823); box-shadow: 0 3px 4px rgba(60,20,28,.35); }
.note-overline { margin: 0 0 8px; color: #927b5d; font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.note-card h3 { margin: 0 0 10px; color: var(--wine); font: 400 clamp(25px, 4vw, 31px)/1.2 var(--serif); letter-spacing: -.03em; }
.note-card p:last-child { max-width: 330px; margin: 0 auto; color: #4b4a3d; font-size: 14px; line-height: 1.7; }

.rsvp-card { position: relative; max-width: 640px; margin: 78px auto 0; padding: 58px 32px 48px; text-align: center; color: #fff7e8; background: radial-gradient(ellipse at 50% 0%, #3b5f4c, var(--pine) 60%, #1c3a2d); box-shadow: 0 24px 44px rgba(20,40,30,.3), 0 4px 10px rgba(20,40,30,.2); }
.rsvp-border { position: absolute; inset: 14px; border: 1px solid rgba(226,190,129,.55); pointer-events: none; }
.rsvp-border::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(226,190,129,.18); }
.rsvp-ornament { display: block; color: #e2be81; font-size: 24px; margin-bottom: 6px; }
.rsvp-script { margin: 0 0 8px; color: #e2be81; font: clamp(36px, 6vw, 48px)/1 var(--script); }
.rsvp-card h3 { max-width: 460px; margin: 0 auto; font: 400 clamp(25px, 4.5vw, 34px)/1.25 var(--serif); letter-spacing: -.03em; text-wrap: balance; }
.rsvp-note { max-width: 400px; margin: 14px auto 0; color: #e5dccd; font-size: 14px; line-height: 1.65; }
.rsvp-button { position: relative; display: inline-flex; align-items: center; gap: 11px; min-height: 52px; margin-top: 30px; padding: 13px 26px; overflow: hidden; background: linear-gradient(135deg, #e7c88d, #c9a466 55%, #e1c084); color: #2c2a20; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; box-shadow: 0 8px 16px rgba(0,0,0,.22), inset 0 1px rgba(255,250,230,.6); transition: transform .25s ease, box-shadow .25s ease; }
.rsvp-button::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); animation: sheen 4.5s 1.5s ease-in-out infinite; }
.rsvp-button:hover { transform: translateY(-2px); box-shadow: 0 12px 20px rgba(0,0,0,.26), inset 0 1px rgba(255,250,230,.6); }
.rsvp-button:focus-visible { outline: 3px solid #e2be81; outline-offset: 4px; }

.night-closing { margin: 76px auto 0; text-align: center; }
.night-closing .closing-rule span { transform-origin: center; }
.night-closing.is-in .closing-rule span { animation: line-grow 1s .3s cubic-bezier(.2,.7,.25,1) both; }

@keyframes icon-pop { from { transform: scale(.4); opacity: 0; } }
@keyframes sheen { 0%, 70% { left: -60%; } 100% { left: 130%; } }

@media (min-width: 800px) {
  .night-stage { padding: 120px 40px 100px; }
  .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; max-width: none; padding: 74px 0 0; }
  .timeline::before { left: 12.5%; right: 12.5%; top: 25px; bottom: auto; border-left: 0; border-top: 1.5px dashed rgba(166,138,97,.6); }
  .moment { text-align: center; }
  .moment-icon { left: 50%; top: -74px; margin-left: -25px; }
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 46px; }
  .rsvp-card { padding: 66px 56px 56px; }
}

@media (max-width: 480px) {
  .night-stage { padding: 118px 16px 64px; }
  .night-header { margin-bottom: 44px; }
  .timeline { padding-left: 60px; }
  .moment-icon { left: -60px; width: 46px; height: 46px; }
  .timeline::before { left: 23px; }
  .moment p, .note-card p:last-child { font-size: 13px; }
  .night-sprig { width: 240px; }.night-sprig--left { left: -170px; }.night-sprig--right { right: -140px; bottom: -70px; }
  .night-leaves { width: 100px; left: -20px; top: 22px; }.night-orange { right: -18px; top: 26px; width: 62px; }
  .rsvp-card { padding: 50px 22px 40px; }
  .rsvp-border { inset: 10px; }
  .rsvp-button { padding: 13px 18px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .night-appear { opacity: 1; transform: none; transition: none; }
  .rsvp-button::after { display: none; }
}

/* ---------- Despedida: una última tarjeta sobre el lino ---------- */
.farewell { display: none; background: #e8dfd0; }
.farewell::before { background: radial-gradient(ellipse 65% 64% at 50% 42%, #f6eddf 0%, #e9dfcf 68%, #d9cbb8 125%); }
.invitation[data-view="cover"] .farewell { display: block; }
.farewell-table-light { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 58% at 50% 40%, rgba(255,243,214,.62), transparent 80%); pointer-events: none; }
.farewell-stage { position: relative; z-index: 3; width: min(100%, 1120px); margin: 0 auto; padding: 90px 28px 42px; }
.farewell-paper { position: relative; min-height: 690px; display: flex; align-items: center; justify-content: center; padding: 111px 124px 98px; background: #faf3e8 url("assets/paper-grain.svg") repeat; border: 1px solid #fffaf1; box-shadow: 0 28px 55px rgba(72,52,35,.2), 0 4px 9px rgba(79,57,39,.1), inset 0 0 66px rgba(169,135,91,.11); opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.75,.25,1); }
.farewell.is-visible .farewell-paper { opacity: 1; transform: none; }
.farewell-paper::before { content: ""; position: absolute; inset: 0; background: url("assets/linen-grain.svg") repeat; opacity: .15; mix-blend-mode: multiply; pointer-events: none; }
.farewell-border { position: absolute; inset: 18px; border: 1px solid rgba(194,164,109,.52); pointer-events: none; }
.farewell-border::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(194,164,109,.16); }
.farewell-sprig, .farewell-orange { position: absolute; z-index: 4; pointer-events: none; user-select: none; }
.farewell-sprig { width: clamp(270px, 32vw, 400px); filter: drop-shadow(4px 8px 6px rgba(28,49,33,.2)); }
.farewell-sprig--top { top: 10px; left: max(-158px, calc(50% - 690px)); transform: rotate(25deg); }
.farewell-sprig--bottom { right: max(-151px, calc(50% - 690px)); bottom: -35px; transform: rotate(202deg); }
.farewell-orange { width: clamp(76px, 10vw, 117px); filter: drop-shadow(3px 6px 5px rgba(89,60,31,.2)); }
.farewell-orange--top { right: 6%; top: 8%; transform: rotate(21deg); }
.farewell-orange--bottom { left: 4%; bottom: 13%; transform: rotate(-21deg); }
.farewell-ribbon { position: absolute; z-index: 5; top: -8px; right: 14%; width: 46px; height: 176px; background: linear-gradient(90deg, #5f1f2c 0%, #9e4551 34%, #bc6970 49%, #7c2938 75%, #551a27 100%); box-shadow: 4px 5px 8px rgba(68,25,32,.22), inset 1px 0 rgba(255,207,210,.22); clip-path: polygon(0 0,100% 0,100% 100%,50% 84%,0 100%); transform: rotate(4deg); transform-origin: top; }
.farewell-ribbon-fold { position: absolute; inset: 0 0 30%; background: linear-gradient(100deg, transparent 20%, rgba(255,222,224,.13) 46%, rgba(45,9,19,.18) 85%); }
.farewell-star { position: absolute; z-index: 2; color: #c3a66e; text-shadow: 1px 1px 0 #fffaf0; }
.farewell-star--left { left: 10%; top: 29%; font-size: 30px; transform: rotate(17deg); }
.farewell-star--right { right: 11%; bottom: 25%; font-size: 14px; transform: rotate(-11deg); }
.fairy-lights--farewell { z-index: 6; top: 0; left: 21%; right: 21%; height: 58px; }
.fairy-lights--farewell i { animation-duration: 6.2s; }
.fairy-lights--farewell i:nth-of-type(1) { left: 3%; top: 34%; }.fairy-lights--farewell i:nth-of-type(2) { left: 18.7%; top: 78%; }.fairy-lights--farewell i:nth-of-type(3) { left: 34.3%; top: 95%; }.fairy-lights--farewell i:nth-of-type(4) { left: 50%; top: 100%; }.fairy-lights--farewell i:nth-of-type(5) { left: 65.7%; top: 95%; }.fairy-lights--farewell i:nth-of-type(6) { left: 81.3%; top: 78%; }.fairy-lights--farewell i:nth-of-type(7) { left: 97%; top: 34%; }
.farewell-copy { position: relative; z-index: 7; width: min(100%, 650px); text-align: center; }
.farewell-script { margin: 0 0 5px; color: var(--wine); font: clamp(38px, 5.5vw, 55px)/1 var(--script); }
.farewell-flourish { display: block; margin: 0 auto 21px; color: var(--gold); font-size: 12px; }
.farewell h2 { max-width: 650px; margin: 0 auto; color: var(--pine); font: 400 clamp(45px, 6.9vw, 75px)/1.13 var(--serif); letter-spacing: -.053em; text-wrap: balance; }
.farewell-message { max-width: 495px; margin: 29px auto 0; color: #48493d; font-size: clamp(14px, 1.5vw, 16px); line-height: 1.85; text-wrap: balance; }
.farewell-rule, .farewell-footer-ornament { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); font-size: 10px; }
.farewell-rule { margin: 30px auto 20px; }
.farewell-rule span { width: 45px; height: 1px; background: var(--gold); }
.farewell-signature { margin: 0; color: var(--wine); font: 39px/.92 var(--script); }
.farewell-signature span:last-child { display: inline-block; margin-top: 7px; font-size: 47px; }
.farewell-return { display: inline-flex; align-items: center; gap: 10px; margin-top: 39px; padding: 10px 3px; color: var(--pine); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-decoration: none; text-transform: uppercase; border-bottom: 1px solid var(--gold); transition: color .25s ease, border-color .25s ease; }
.farewell-return span { color: var(--gold); font-size: 20px; line-height: .6; }
.farewell-return:hover { color: var(--wine); border-color: var(--wine); }
.farewell-return:focus-visible, .farewell-footer a:focus-visible { outline: 3px solid var(--wine); outline-offset: 5px; }
.farewell-candle { position: absolute; z-index: 6; width: 60px; height: 160px; bottom: 8%; filter: drop-shadow(5px 8px 6px rgba(83,58,36,.2)); }
.farewell-candle--tall { left: 6%; }.farewell-candle--short { right: 7%; height: 127px; }
.farewell-candle > span { position: absolute; display: block; }
.farewell-candle-aura { left: -22px; top: -42px; width: 110px; height: 125px; border-radius: 50%; background: radial-gradient(ellipse, rgba(252,195,92,.33), rgba(255,220,151,.1) 49%, transparent 72%); animation: farewell-aura 5.5s ease-in-out infinite alternate; }
.farewell-flame { z-index: 3; left: 25px; top: -11px; width: 13px; height: 27px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(ellipse 45% 40% at 50% 78%, #fff 0 30%, transparent 70%), radial-gradient(ellipse at 50% 70%, #fff6cf 10%, #f6c75f 52%, #e08a35 92%); transform-origin: 50% 92%; box-shadow: 0 0 13px 2px rgba(249,197,88,.65); animation: farewell-flame 3.6s ease-in-out infinite alternate; }
.farewell-candle--short .farewell-flame { animation-delay: -1.7s; }
.farewell-wick { z-index: 2; left: 30px; top: 14px; width: 2px; height: 10px; background: #4c3c2e; }
.farewell-candle-body { z-index: 2; left: 9px; right: 0; top: 21px; bottom: 8px; border-radius: 6px 6px 3px 3px; background: linear-gradient(90deg, #d9c8a9, #fff9e5 22%, #f7ead1 68%, #c9b691); box-shadow: inset -2px 0 4px rgba(130,101,67,.18); }
.farewell-candle-body::before { content: ""; position: absolute; top: -3px; width: 100%; height: 9px; border-radius: 50%; background: #fff9e8; box-shadow: inset 0 2px 2px #e0d0b5; }
.farewell-candle-body::after { content: ""; position: absolute; top: 9px; right: 5px; width: 5px; height: 25px; border-radius: 0 0 5px 5px; background: #f8f0dd; }
.farewell-candle-base { z-index: 1; bottom: 2px; left: 0; width: 65px; height: 11px; border-radius: 50%; background: linear-gradient(#d3b77a, #9f7b4e); box-shadow: 0 4px 5px rgba(100,67,39,.22); }
.farewell-footer { position: relative; z-index: 7; margin: 47px auto 0; text-align: center; color: #6d6253; font-size: 12px; letter-spacing: .035em; }
.farewell-footer-ornament span { width: 80px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.farewell-footer-ornament span:last-child { transform: rotate(180deg); }
.farewell-footer p { margin: 15px 0 0; }
.farewell-footer a { color: var(--pine); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.farewell-footer a:hover { color: var(--wine); }
@keyframes farewell-flame { to { transform: rotate(4deg) scale(.96); } }
@keyframes farewell-aura { to { opacity: .7; } }

@media (max-width: 700px) {
  .farewell-stage { padding: 72px 17px 35px; }
  .farewell-paper { min-height: 700px; padding: 112px 55px 126px; }
  .farewell-border { inset: 12px; }
  .farewell-sprig--top { left: -150px; top: 11px; }.farewell-sprig--bottom { right: -150px; bottom: -51px; }
  .farewell-orange--top { right: -13px; top: 11%; }.farewell-orange--bottom { left: -21px; bottom: 12%; }
  .farewell-ribbon { right: 13%; width: 34px; height: 116px; }
  .fairy-lights--farewell { left: 12%; right: 12%; height: 47px; }
  .farewell h2 { font-size: clamp(41px, 9vw, 58px); }
  .farewell-candle--tall { left: 5%; bottom: 3%; transform: scale(.75); transform-origin: bottom left; }
  .farewell-candle--short { right: 6%; bottom: 3%; transform: scale(.72); transform-origin: bottom right; }
  .farewell-star--left { left: 7%; top: 29%; }.farewell-star--right { right: 7%; bottom: 27%; }
}
@media (max-width: 480px) {
  .farewell-stage { padding: 65px 12px 30px; }
  .farewell-paper { min-height: 700px; padding: 108px 29px 134px; }
  .farewell-script { font-size: clamp(34px, 9vw, 43px); }
  .farewell h2 { font-size: clamp(38px, 10vw, 48px); line-height: 1.16; }
  .farewell-message { margin-top: 24px; font-size: 13px; line-height: 1.8; }
  .farewell-rule { margin-top: 24px; }
  .farewell-signature { font-size: 35px; }.farewell-signature span:last-child { font-size: 41px; }
  .farewell-return { margin-top: 30px; }
  .farewell-sprig { width: 260px; }.farewell-sprig--top { left: -176px; }.farewell-sprig--bottom { right: -179px; }
  .farewell-orange { width: 70px; }.farewell-orange--top { right: -26px; top: 9%; }.farewell-orange--bottom { left: -27px; bottom: 10%; }
  .farewell-ribbon { right: 15%; width: 27px; height: 90px; }
  .farewell-star--left { left: 5%; top: 25%; font-size: 18px; }.farewell-star--right { right: 5%; bottom: 22%; }
  .farewell-candle--tall { left: 5%; transform: scale(.56); }.farewell-candle--short { right: 6%; transform: scale(.54); }
  .farewell-footer { margin-top: 35px; }
}
@media (max-width: 350px) {
  .farewell-paper { padding-left: 24px; padding-right: 24px; }
  .farewell h2 { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .farewell-paper { opacity: 1; transform: none; transition: none; }
  .fairy-lights--farewell i, .farewell-flame, .farewell-candle-aura { animation: none !important; }
}

/* ---------- Despedida: pulido final ---------- */
.farewell::after { content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: 140px; pointer-events: none; background: linear-gradient(#e6dac7, transparent); }
.fairy-lights--farewell { left: 24%; right: 27%; }
.farewell-ribbon { right: 11%; }
.farewell-flame { animation: flame 2.6s ease-in-out infinite; }
.farewell-copy > * { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.75,.25,1); }
.farewell.is-visible .farewell-copy > * { opacity: 1; transform: none; }
.farewell.is-visible .farewell-copy > :nth-child(1) { transition-delay: .35s; }
.farewell.is-visible .farewell-copy > :nth-child(2) { transition-delay: .45s; }
.farewell.is-visible .farewell-copy > :nth-child(3) { transition-delay: .55s; }
.farewell.is-visible .farewell-copy > :nth-child(4) { transition-delay: .7s; }
.farewell.is-visible .farewell-copy > :nth-child(5) { transition-delay: .82s; }
.farewell.is-visible .farewell-copy > :nth-child(6) { transition-delay: .95s; }
.farewell.is-visible .farewell-copy > :nth-child(7) { transition-delay: 1.1s; }
.farewell.is-visible .farewell-signature span:last-child { animation: script-in 1.6s 1.1s cubic-bezier(.2,.7,.25,1) both; }
.farewell.is-visible .farewell-rule span { animation: line-grow 1s .9s cubic-bezier(.2,.7,.25,1) both; }
.farewell.is-visible .farewell-ribbon { animation: ribbon-drop 1s .4s cubic-bezier(.2,1.25,.4,1) both; }
.farewell-return span { transition: transform .3s ease; }
.farewell-return:hover span { transform: translateY(-3px); }
@media (max-width: 480px) {
  .fairy-lights--farewell { left: 10%; right: 26%; }
  .farewell-ribbon { right: 10%; }
}
@media (prefers-reduced-motion: reduce) {
  .farewell-copy > * { opacity: 1; transform: none; transition: none; }
}
