/* Sage Olive — wedding invitation (invite-sage-olive.php)
   From the MARK BY ILARA THEAM 4 artwork: sage envelope, watercolour paper, olive branches,
   leaf-green gradients and gold. Morgena for names, Times italic for titles, Syne for body
   copy, Inter for the RSVP form (Morgena, Syne and Inter are served from assets/fonts/sage-olive). */
@font-face { font-family: "Morgena"; src: url("../fonts/sage-olive/morgena-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Syne"; src: url("../fonts/sage-olive/syne-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Syne"; src: url("../fonts/sage-olive/syne-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/sage-olive/inter-light.woff") format("woff"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/sage-olive/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/sage-olive/inter-medium.woff") format("woff"); font-weight: 500; font-display: swap; }

:root {
  --so-sage: #5d6c48;
  --so-sage-2: #4a5838;
  --so-olive: #4f5a3c;
  --so-leaf: #8db66b;
  --so-leaf-2: #4a7a1c;
  --so-grad: linear-gradient(90deg, #8db66b 0%, #6c9a42 55%, #4a7a1c 100%);
  --so-ink: #5f6a4f;
  --so-gold: #c49a4a;
  --so-gold-2: #e8c877;
  --so-paper: #eef4e6;
  --so-display: Morgena, "Cormorant Garamond", Didot, serif;
  --so-serif: "Times New Roman", Times, Tinos, serif;
  --so-sans: Syne, "Segoe UI", sans-serif;
  --so-ui: Inter, "Segoe UI", sans-serif;
  --so-w: 540px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.so { margin: 0; background: var(--so-sage-2) url("../images/invites/sage-olive/envelope.jpg") center top / cover fixed; color: #111; font: 400 15px/1.55 var(--so-sans); -webkit-font-smoothing: antialiased; }
body.so.is-locked { overflow: hidden; height: 100vh; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* the invitation is a phone-width column; wide screens see the sage envelope around it */
.so-main { max-width: var(--so-w); margin: 0 auto; background: var(--so-paper); box-shadow: 0 0 60px rgba(20,30,10,.45); overflow: hidden; }
.so-sec { position: relative; padding: 64px 0; }
/* extra room at the bottom of every section, inside its own background (a margin would show a
   plain band of the column's colour between sections) */
.so-sec::after { content: ""; display: block; height: 40px; }
.so-wrap { position: relative; z-index: 2; padding: 0 28px; text-align: center; }
.so-wrap--wide { padding: 0 20px; }
.so-paper { background: var(--so-paper) url("../images/invites/sage-olive/watercolor.jpg") center / cover; margin-top: -69px; }
/* the first section stays at the top of the page (pulling it up would cut off its top) */
.so-paper.so-hero { margin-top: 0; }
/* the families' title sits below the leaf branch at the top of its section */
.so-families .so-title { margin-top: 150px; }
/* "Join us on our Joyful Day" keeps clear of the event section that tucks 69px up under it */
.so-count .so-title { margin-bottom: 80px; }
.so-env { background: var(--so-sage) url("../images/invites/sage-olive/envelope.jpg") center / cover; color: #fff; }

/* ---------- shared bits ---------- */
.so-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 170px; padding: 9px 30px; border: 0; border-radius: 40px; background: var(--so-leaf); color: #fff; font: 400 15px/1.2 var(--so-sans); letter-spacing: .02em; text-decoration: none; box-shadow: 0 6px 16px rgba(74,122,28,.22); transition: transform .2s, box-shadow .2s, background .2s; }
.so-btn:hover { transform: translateY(-1px); background: #7aa75a; box-shadow: 0 10px 22px rgba(74,122,28,.3); }
.so-btn:disabled { opacity: .6; cursor: default; transform: none; }
.so-btn--wide { min-width: 230px; background: var(--so-grad); }
.so-btn--light { background: #fff; color: var(--so-sage-2); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.so-btn--light:hover { background: var(--so-paper); }
.so-lead { max-width: 330px; margin: 0 auto 24px; font: 400 15px/1.45 var(--so-sans); color: #111; }
.so-lead--light { color: #fff; }
.so-names { margin: 0 0 22px; font: 400 clamp(56px, 16vw, 78px)/.98 var(--so-display); color: var(--so-ink); letter-spacing: -.01em; }
.so-names--light { color: #fff; font-size: clamp(44px, 12.5vw, 64px); }
.so-title { margin: 0; font: italic 400 clamp(38px, 10.5vw, 52px)/1.1 var(--so-serif); color: var(--so-ink); }
.so-title--ink { color: #000; font-size: clamp(32px, 9vw, 42px); }
.so-kicker { margin: 0 0 10px; font: 400 14px/1 var(--so-sans); text-transform: uppercase; letter-spacing: .02em; color: #111; }
.so-kicker--light { color: #fff; }
.so-spaced { margin: 0 0 12px; font: 500 11px/1 var(--so-ui); letter-spacing: .5em; text-transform: uppercase; color: var(--so-gold); }
.so-divider { display: flex; align-items: center; justify-content: center; margin: 14px auto 12px; width: 220px; }
.so-divider::before, .so-divider::after { content: ""; flex: 1; height: 1px; background: rgba(93,108,72,.45); }
.so-divider i { width: 8px; height: 8px; margin: 0 12px; background: var(--so-leaf-2); transform: rotate(45deg); }
.so-divider--gold::before, .so-divider--gold::after { background: rgba(196,154,74,.5); }
.so-divider--gold i { background: var(--so-gold); }
.so-gh { display: inline-block; width: 15px; height: 14px; vertical-align: -1px; margin: 0 4px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }

/* scroll-in reveal */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- intro: the THEAM 4b cover film, names & wishes on its card ---------- */
/* The film (a sage envelope whose wax seal opens and a blank card rises out) waits on its first
   frame. A tap plays it with the music; from the 6th second of the film the couple's names and
   wishes appear on it (.has-text), stay for 4s, and the intro fades into the invitation (.is-open). */
.so-intro { position: fixed; inset: 0; width: 100%; max-width: var(--so-w); margin: 0 auto; z-index: 50; overflow: hidden; background: #efe6d8; box-shadow: 0 0 60px rgba(20,30,10,.45); -webkit-tap-highlight-color: transparent; cursor: pointer; transition: opacity .9s ease, visibility .9s; }
.so-intro.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.so-intro:focus-visible { outline: none; }
/* the film's 9:16 frame, covering the screen like object-fit: cover (wider screens crop top and
   bottom, taller ones crop the sides), so text placed on it always lands on the card */
.so-intro__stage { position: absolute; top: 50%; left: 50%; width: max(100%, 56.25vh); width: max(100%, 56.25dvh); aspect-ratio: 9 / 16; transform: translate(-50%, -50%); container-type: inline-size; }
.so-intro__video, .so-intro__end { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* a still of the last frame, shown once the film ends or is skipped, so the names always sit on the open card */
.so-intro__end { opacity: 0; transition: opacity .5s ease; }
.so-intro.is-ended .so-intro__end { opacity: 1; }
/* the blank card in the last frame spans 12.5-88% across and 10.6-72% down; the text keeps a margin */
.so-intro__card { position: absolute; left: 18%; right: 18%; top: 15%; bottom: 33%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--so-ink); overflow-wrap: break-word; }
.so-intro__card > * { margin: 0; opacity: 0; transform: translateY(12px); filter: blur(3px); }
.so-intro.has-text .so-intro__card > * { animation: so-card-in 1s cubic-bezier(.2,.7,.2,1) forwards; }
.so-intro.has-text .so-intro__card > :nth-child(2) { animation-delay: .3s; }
.so-intro.has-text .so-intro__card > :nth-child(3) { animation-delay: .7s; }
.so-intro.has-text .so-intro__card > :nth-child(4) { animation-delay: 1s; }
@keyframes so-card-in { to { opacity: 1; transform: none; filter: none; } }
.so-intro__kicker { font: 500 2.3cqw/1.3 var(--so-ui); letter-spacing: .28em; text-transform: uppercase; color: var(--so-gold); }
.so-intro__names { margin: 3.5cqw 0 !important; font: 400 8cqw/1.1 var(--so-display); color: var(--so-olive); }
.so-intro__names span { display: block; }
.so-intro__names i { display: block; margin: 1cqw 0; font: italic 400 4.6cqw/1 var(--so-serif); color: var(--so-gold); }
/* the couple's message, kept to a few lines on the card */
.so-intro__wish { max-width: 52cqw; font: italic 400 3.1cqw/1.45 var(--so-serif); color: var(--so-ink); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.so-intro__date { margin-top: 3.5cqw !important; font: 500 2.4cqw/1.3 var(--so-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--so-olive); }
.so-intro__hint { position: absolute; left: 0; right: 0; bottom: max(40px, env(safe-area-inset-bottom)); margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font: 500 12px/1 var(--so-ui); letter-spacing: .32em; text-indent: .32em; text-transform: uppercase; color: var(--so-olive); transition: opacity .4s ease; }
.so-intro__hint span { position: relative; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid var(--so-gold); background: rgba(255,250,240,.7); backdrop-filter: blur(3px); }
.so-intro__hint span::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(196,154,74,.7); animation: so-ring 2s ease-out infinite; }
.so-intro__hint svg { width: 20px; fill: var(--so-gold); }
.so-intro.is-playing .so-intro__hint { opacity: 0; }
.so-intro__loading { position: absolute; left: 50%; bottom: max(44px, env(safe-area-inset-bottom)); width: 36px; height: 36px; margin-left: -18px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.so-intro__loading i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(79,90,60,.25); border-top-color: var(--so-gold); animation: so-spin .8s linear infinite; }
.so-intro.is-buffering .so-intro__loading { opacity: 1; }
@keyframes so-ring { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes so-rise { from { opacity: 0; transform: translateY(30px); } }
@keyframes so-hint { 50% { opacity: .4; } }
@keyframes so-swing { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }

.so-draft { position: sticky; top: 0; z-index: 30; max-width: var(--so-w); margin: 0 auto; padding: 9px 14px; background: rgba(30,40,20,.88); color: #eef4e6; font: 500 12px/1.3 var(--so-ui); text-align: center; backdrop-filter: blur(6px); }

/* ---------- 1 · heart monogram ---------- */
.so-hero { padding-top: 0; }
.so-garland { position: relative; z-index: 1; width: 108%; max-width: none; margin: -2% -4% 0; pointer-events: none; transform-origin: top center; animation: so-swing 6s ease-in-out infinite alternate; }
.so-hero .so-wrap { margin-top: -8%; }
.so-hrt { position: relative; width: min(300px, 74%); margin: 0 auto 26px; }
.so-hrt svg { width: 100%; display: block; overflow: visible; }
.so-heart__outer { fill: rgba(255,255,255,.18); stroke: var(--so-ink); stroke-width: 2.4; }
.so-heart__inner { fill: none; stroke: var(--so-ink); stroke-width: 1.1; opacity: .8; }
.js .so-hrt.in .so-heart__outer, .js .so-hrt.in .so-heart__inner { stroke-dasharray: 900; stroke-dashoffset: 900; animation: so-draw 2.4s ease forwards; }
.js .so-hrt.in .so-heart__inner { animation-delay: .4s; }
@keyframes so-draw { to { stroke-dashoffset: 0; } }
.so-heart__mono { position: absolute; inset: 14% 0 22%; display: flex; justify-content: center; align-items: center; font: 400 clamp(54px, 15vw, 82px)/1 var(--so-display); color: var(--so-ink); }
.so-heart__mono b { font-weight: 400; }
.so-heart__mono b + b { margin: .55em 0 0 -.12em; }
.so-date { margin: 18px 0 0; font: italic 400 clamp(22px, 6.4vw, 30px)/1.2 var(--so-serif); color: #111; }
.so-couple { margin: 0 auto 22px; max-width: 300px; padding: 8px; background: #fff; border-radius: 150px 150px 16px 16px; box-shadow: 0 10px 30px rgba(40,60,20,.16); }
.so-couple img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 142px 142px 10px 10px; }

/* ---------- 2 · countdown & butterfly ---------- */
.so-count { padding-top: 40px; }
.so-circles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 -10px 34px; }
.so-circle { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #8db66b, #4a7a1c); color: #fff; box-shadow: 0 8px 18px rgba(74,122,28,.22); }
.so-circle::after { content: ""; position: absolute; inset: -4px -6px -3px -3px; border: 1px solid rgba(74,122,28,.55); border-radius: 48% 52% 50% 50%; transform: rotate(-12deg); }
.so-circle b { font: 400 clamp(26px, 8vw, 40px)/1 var(--so-serif); }
.so-circle span { margin-top: 5px; font: 400 clamp(7px, 1.9vw, 9px)/1 var(--so-ui); letter-spacing: .25em; text-transform: uppercase; }
.so-count__done { margin: -14px 0 24px; font: italic 22px var(--so-serif); color: var(--so-leaf-2); }
/* the butterfly resting on the hidden date card; tapped, it flutters up and away */
.so-flybox { position: relative; width: min(280px, 74%); aspect-ratio: 400 / 330; margin: 0 auto 10px; }
.so-datecard { position: absolute; inset: 8% 12% 6%; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 24px; background: linear-gradient(160deg, #8db66b, #4a7a1c); color: #fff; box-shadow: 0 14px 30px rgba(74,122,28,.3);
  opacity: 0; transform: scale(.82); transition: opacity .7s ease .5s, transform .9s cubic-bezier(.2,1.3,.4,1) .5s; }
.so-datecard::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(255,255,255,.45); border-radius: 18px; pointer-events: none; }
.so-datecard__k { font: 500 10px/1 var(--so-ui); letter-spacing: .38em; text-transform: uppercase; color: var(--so-gold-2); }
.so-datecard b { margin: 6px 0 2px; font: 400 clamp(54px, 15vw, 72px)/1 var(--so-serif); }
.so-datecard em { font: italic 400 clamp(19px, 5.2vw, 23px)/1.2 var(--so-serif); }
.so-datecard small { margin-top: 6px; font: 400 10px/1 var(--so-ui); letter-spacing: .3em; text-transform: uppercase; opacity: .85; }
.so-flybox.is-free .so-datecard { opacity: 1; transform: none; }
.so-fly { position: absolute; inset: 0; z-index: 2; padding: 0; border: 0; background: none; cursor: pointer; animation: so-float 4s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.so-fly svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 10px 12px rgba(31,42,18,.28)); }
.so-fly__l, .so-fly__r { transform-box: view-box; transform-origin: 50% 50%; animation: so-flap 2.6s ease-in-out infinite; }
@keyframes so-flap { 0%, 70%, 100% { transform: scaleX(1); } 80% { transform: scaleX(.6); } 90% { transform: scaleX(.95); } }
@keyframes so-float { 50% { transform: translateY(-8px); } }
.so-fly:hover .so-fly__l, .so-fly:hover .so-fly__r { animation-duration: .9s; }
.so-fly:focus-visible { outline: 2px dashed var(--so-leaf-2); outline-offset: 6px; border-radius: 20px; }
/* away it goes: fast wingbeats, a looping climb off the top of the screen */
.so-flybox.is-free .so-fly { pointer-events: none; animation: so-flyaway 2.2s cubic-bezier(.45,.05,.55,.95) forwards; }
.so-flybox.is-free .so-fly__l, .so-flybox.is-free .so-fly__r { animation: so-flap-fast .22s linear infinite; }
@keyframes so-flap-fast { 50% { transform: scaleX(.25); } }
@keyframes so-flyaway {
  0%   { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; }
  25%  { transform: translate(-30px, -60px) rotate(-14deg) scale(.9); }
  55%  { transform: translate(60px, -190px) rotate(16deg) scale(.7); }
  100% { transform: translate(150px, -520px) rotate(28deg) scale(.35); opacity: 0; } }
.so-fly__hint { margin: 0 0 36px; font: 500 10.5px/1.4 var(--so-ui); letter-spacing: .28em; text-transform: uppercase; color: var(--so-leaf-2); }
.so-fly__hint.in { animation: so-hint 1.8s ease-in-out infinite; }
.so-fly__hint.is-done { animation: none; letter-spacing: 0; text-transform: none; font: italic 400 19px/1.3 var(--so-serif); color: var(--so-ink); }
/* leaves falling over the page as it opens */
.so-petals { position: fixed; inset: 0; z-index: 45; pointer-events: none; overflow: hidden; }
.so-petal { position: absolute; top: 0; left: 0; width: 16px; height: 20px; will-change: transform, opacity; }
.so-petal svg { width: 100%; height: 100%; display: block; }

/* ---------- 3 · events under the arch ---------- */
.so-event { padding: 0 0 70px; overflow: hidden; }
/* the draped arch at the column's full width; the bottom margin and the text's top padding follow
   its size (both were set for a 132% arch: -118% and 34%, times 100/132), so the text keeps its
   place inside the arch */
.so-arch { position: relative; z-index: 1; width: 100%; max-width: none; margin: 20px 0 -89%; pointer-events: none; }
/* the text sits in front of the arch, so a curtain edge never hides a letter */
.so-event__in { position: relative; z-index: 2; padding-top: 26%; padding-bottom: 6px; }
.so-event__names { margin: -35px 0 18px; font: 400 clamp(46px, 13vw, 64px)/.98 var(--so-display); color: var(--so-ink); }
.so-event__title { margin: 0; font: italic 400 clamp(30px, 8.6vw, 42px)/1.1 var(--so-serif); color: var(--so-ink); }
.so-fdate { display: inline-block; margin: 2px 0 14px; color: #222; font-family: var(--so-serif); }
.so-fdate i { font-size: clamp(19px, 5.4vw, 25px); }
.so-fdate b { font-weight: 400; font-size: clamp(34px, 9.6vw, 46px); line-height: 1; }
.so-pill { display: inline-block; margin: 0 0 14px; padding: 6px 22px; border-radius: 30px; background: var(--so-leaf); color: #fff; font: 400 15px/1.3 var(--so-sans); }
.so-venue { max-width: 300px; margin: 0 auto 10px; font: 400 15px/1.55 var(--so-sans); color: #111; }
.so-link { display: table; margin: 4px auto 6px; font: 500 12px/1 var(--so-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--so-leaf-2); text-decoration: none; border-bottom: 1px solid rgba(74,122,28,.5); padding-bottom: 4px; }
.so-venue-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; margin: 22px 0 0; box-shadow: 0 10px 26px rgba(40,60,20,.18); }
.so-greet { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 150px; height: 180px; margin-top: 40px; border: 0; border-radius: 22px; background: linear-gradient(160deg, #8db66b, #4a7a1c); color: #fff; font: 400 16px/1.2 var(--so-sans); box-shadow: 0 14px 30px rgba(74,122,28,.3); transition: transform .25s; }
.so-greet:hover { transform: translateY(-3px); }
.so-greet__coin { display: grid; place-items: center; width: 74px; height: 74px; margin-bottom: 12px; border-radius: 50%; background: radial-gradient(circle, #f1d27a 0 22px, #c49a36 23px 28px, transparent 29px), rgba(255,255,255,.14); box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.so-greet__coin svg { width: 18px; fill: #6c9a42; }

/* ---------- 4 · polaroids ---------- */
/* As on the artwork: big overlapping instant photos, green and white frames alternating,
   each tilted against its neighbour, the right-hand ones lower and laid over the left. */
.so-gallery { padding: 46px 0 0; }
.so-polaroids { display: grid; grid-template-columns: 1fr 1fr; margin: 6px 0 56px; padding: 0 2% 0 4%; }
.so-photo { position: relative; display: block; width: 108%; padding: 4.2% 4.2% 15%; border: 0; background: #fff; box-shadow: 0 14px 26px rgba(10,20,0,.5), 0 2px 4px rgba(0,0,0,.25); transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.so-photo img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; }
.so-photo:nth-child(4n+1) { z-index: 1; background: var(--so-leaf); transform: rotate(-4deg); margin-top: 0; }
.so-photo:nth-child(4n+2) { z-index: 2; transform: rotate(6deg); margin: 9% 0 0 -14%; }
.so-photo:nth-child(4n+3) { z-index: 3; transform: rotate(-5deg); margin-top: -4%; }
.so-photo:nth-child(4n+4) { z-index: 4; background: var(--so-leaf); transform: rotate(6deg); margin: 5% 0 0 -14%; }
.so-photo:hover { transform: rotate(0) scale(1.04); z-index: 6; }
/* the polaroids drop in, one after another */
.js .so-photo.reveal { transform: translateY(40px) rotate(0); }
.js .so-photo.reveal.in:nth-child(4n+1) { transform: rotate(-4deg); }
.js .so-photo.reveal.in:nth-child(4n+2) { transform: rotate(6deg); transition-delay: .15s; }
.js .so-photo.reveal.in:nth-child(4n+3) { transform: rotate(-5deg); transition-delay: .3s; }
.js .so-photo.reveal.in:nth-child(4n+4) { transform: rotate(6deg); transition-delay: .45s; }
.js .so-photo.reveal.in:hover { transform: rotate(0) scale(1.04); transition-delay: 0s; }
/* a single last photo sits centred */
.so-polaroids .so-photo:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: 62%; margin: 2% 0 0; }
.so-story { width: 100%; margin: 14px 0 26px; border-radius: 18px; background: #000; }
.so-marquee { overflow: hidden; padding: 12px 0; background: var(--so-grad); color: #fff; }
.so-marquee--soft { background: var(--so-leaf); }
.so-marquee__track { display: flex; width: max-content; animation: so-marq 28s linear infinite; }
.so-marquee__track--rev { animation-direction: reverse; }
.so-marquee span { padding: 0 18px; font: italic 400 18px/1.4 var(--so-serif); white-space: nowrap; }
@keyframes so-marq { to { transform: translateX(-50%); } }
.so-gallery .so-marquee { margin-bottom: 70px; }

/* ---------- 5 · families ---------- */
.so-families { padding: 70px 0 60px; }
.so-fams { display: grid; gap: 22px; width: min(290px, 100%); margin: 30px auto 0; }
.so-fam { padding: 12px 12px 46px; background: var(--so-leaf); box-shadow: 0 14px 30px rgba(40,60,20,.18); text-align: left; }
.so-fam__in { padding: 30px 24px 26px; background: var(--so-olive); color: #fff; }
.so-fam h3 { margin: 0 0 12px; font: 400 clamp(46px, 13vw, 58px)/1 var(--so-display); color: #a9cf86; overflow-wrap: anywhere; }
.so-fam p { margin: 0; font: 400 13px/1.45 var(--so-sans); }
.so-fam .so-fam__rel { margin-bottom: 4px; font-size: 15px; }
.so-fam__sib { margin: 0 0 2px !important; font: italic 400 10px/1 var(--so-serif) !important; text-transform: uppercase; letter-spacing: .04em; }
.so-fam hr { margin: 14px 0; border: 0; border-top: 1px solid rgba(255,255,255,.45); }

/* ---------- 6/7 · RSVP & wishes ---------- */
.so-rsvp { padding: 90px 22px; }
.so-wishes { padding: 64px 20px; }
.so-panel { max-width: 440px; margin: 0 auto; padding: 46px 30px 40px; border-radius: 52px; background: #fff; text-align: center; box-shadow: 0 20px 50px rgba(10,20,0,.3); color: #111; }
.so-sub { margin: 0 0 22px; font: 400 18px/1.4 var(--so-serif); color: #4a5a54; }
.so-sub small { font: 400 13px var(--so-ui); color: var(--so-gold); }
.so-form { text-align: left; }
.so-label { display: block; margin: 18px 0 8px 4px; font: 400 10px/1 var(--so-ui); letter-spacing: .4em; text-transform: uppercase; color: var(--so-gold); }
.so-label small { letter-spacing: .1em; text-transform: none; color: #a9a49a; }
.so-input { width: 100%; padding: 12px 20px; border: 1px solid rgba(196,154,74,.75); border-radius: 30px; background: #fff; font: 300 16px/1.3 var(--so-ui); color: #111; outline: none; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none; }
textarea.so-input { border-radius: 22px; resize: vertical; min-height: 110px; }
select.so-input { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c49a4a' stroke-width='1.4'/%3E%3C/svg%3E") right 20px center / 12px no-repeat; }
.so-input::placeholder { color: #8a968f; }
.so-input:focus { border-color: var(--so-leaf-2); box-shadow: 0 0 0 3px rgba(74,122,28,.12); }
.so-input.is-invalid, .so-choices.is-invalid .so-choice { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179,38,30,.12); }
.so-choices { display: grid; gap: 14px; }
.so-choice { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 17px 24px 17px 26px; border: 1px solid rgba(196,154,74,.75); border-radius: 40px; background: #faf6e9; font: 300 16px/1.2 var(--so-ui); color: #000; cursor: pointer; transition: background .2s, border-color .2s; }
.so-choice input { position: absolute; opacity: 0; pointer-events: none; }
.so-choice i { width: 22px; height: 22px; border: 1px solid var(--so-gold); border-radius: 50%; transition: box-shadow .2s, background .2s; }
.so-choice:has(input:checked) { background: #f0f6e8; border-color: var(--so-leaf-2); }
.so-choice input:checked ~ i { background: var(--so-leaf-2); border-color: var(--so-leaf-2); box-shadow: inset 0 0 0 4px #fff; }
.so-choice input:focus-visible ~ i { outline: 2px solid var(--so-leaf-2); outline-offset: 2px; }
.so-form__msg { min-height: 20px; margin: 16px 0 8px; font: 400 13px/1.4 var(--so-ui); text-align: center; color: #b3261e; }
.so-form__msg.ok { color: #2f7a4a; }
.so-form .so-btn { display: flex; width: 100%; }
.so-thanks { padding: 10px 0; }
.so-thanks .so-greet__coin { margin: 0 auto 16px; background: radial-gradient(circle, #f1d27a 0 22px, #c49a36 23px 28px, transparent 29px), rgba(74,122,28,.1); }
.so-thanks h3 { margin: 0 0 8px; font: italic 400 30px/1.2 var(--so-serif); color: var(--so-leaf-2); }
.so-thanks p { margin: 0 0 16px; color: #4a5a54; }
.so-textlink { border: 0; background: none; padding: 6px; font: 500 13px var(--so-ui); color: var(--so-leaf-2); text-decoration: underline; text-underline-offset: 3px; }
.so-wishes .so-btn { margin: 4px 0 30px; }
.so-wall__count { margin: 0 0 14px; font: 500 11px/1 var(--so-ui); letter-spacing: .3em; text-transform: uppercase; color: var(--so-gold); }
.so-cards { display: grid; gap: 12px; text-align: left; }
.so-card { position: relative; padding: 18px 20px 16px; border-radius: 22px; background: rgba(255,255,255,.9); border: 1px solid rgba(141,182,107,.4); }
.so-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.so-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--so-grad); color: #fff; font: 400 22px var(--so-display); flex: none; }
.so-card__name { margin: 0; font: 500 15px/1.2 var(--so-ui); }
.so-card__when { font: 400 11px var(--so-ui); color: #8a968f; }
.so-card__msg { margin: 0; padding-right: 50px; font: italic 18px/1.4 var(--so-serif); color: var(--so-ink); }
.so-heart { position: absolute; right: 14px; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid rgba(74,122,28,.3); border-radius: 20px; background: #fff; font: 500 12px var(--so-ui); color: var(--so-leaf-2); }
.so-heart svg { width: 13px; fill: none; stroke: var(--so-leaf-2); stroke-width: 2; }
.so-heart.is-on svg { fill: var(--so-leaf-2); }
.so-heart.pop svg { animation: so-beat .6s; }
@keyframes so-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.3); } }
.so-empty { padding: 22px; border: 1px dashed rgba(93,108,72,.45); border-radius: 22px; font: italic 18px var(--so-serif); text-align: center; color: var(--so-ink); background: rgba(255,255,255,.5); }

/* ---------- 8 · thank you ---------- */
.so-end { padding: 0 0 70px; }
.so-end .so-garland { margin-bottom: 30px; }
.so-end .so-marquee { margin: 30px 0 60px; }
.so-thank { margin: 0; font: italic 400 clamp(50px, 14vw, 70px)/1 var(--so-serif); color: #fff; }
.so-thank__sub { margin: 6px 0 34px; font: 400 24px/1.2 var(--so-sans); }
.so-own { display: block; margin-top: 34px; font: 400 15px var(--so-sans); color: #fff; text-decoration: none; }
.so-own:hover { text-decoration: underline; }

/* ---------- overlays ---------- */
.so-modal { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(20,30,10,.62); backdrop-filter: blur(5px); overflow-y: auto; animation: so-fade .3s ease both; }
.so-modal[hidden] { display: none; }
.so-modal__panel { position: relative; width: min(420px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 40px 26px 30px; border-radius: 36px; background: #fff; text-align: center; box-shadow: 0 30px 70px rgba(10,20,0,.45); animation: so-pop .45s cubic-bezier(.2,1.2,.4,1) both; }
.so-modal__panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--so-grad); }
.so-modal__close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--so-paper); color: var(--so-sage-2); font-size: 24px; line-height: 1; }
.so-modal__icon { margin: 0 auto 14px; }
.so-modal .so-sub { margin: 6px 0 4px; font-style: italic; }
.so-modal .so-label:first-of-type { margin-top: 8px; }
@keyframes so-fade { from { opacity: 0; } }
@keyframes so-pop { from { opacity: 0; transform: translateY(30px) scale(.94); } }
body.has-modal { overflow: hidden; }
.so-sheet, .so-lightbox { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(20,30,10,.6); backdrop-filter: blur(4px); }
.so-sheet[hidden], .so-lightbox[hidden] { display: none; }
.so-sheet__panel { width: min(440px, 100%); padding: 26px 22px 30px; border-radius: 28px 28px 0 0; background: var(--so-paper); text-align: center; animation: so-up .35s ease both; }
.so-sheet__panel h3 { margin: 0 0 16px; font: italic 28px var(--so-serif); color: var(--so-sage-2); }
.so-sheet__panel button { display: block; width: 100%; margin: 0 0 10px; padding: 14px; border: 1px solid rgba(141,182,107,.7); border-radius: 30px; background: #fff; font: 400 15px var(--so-ui); }
.so-sheet__panel .so-sheet__close { border: 0; background: none; color: var(--so-ink); }
@keyframes so-up { from { transform: translateY(100%); } }
.so-lightbox { align-items: center; background: rgba(15,20,8,.94); }
.so-lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 4px; border: 8px solid #fff; }
.so-lightbox button { position: absolute; border: 0; background: none; color: #fff; font-size: 42px; line-height: 1; padding: 12px 16px; }
.so-lightbox__close { top: 10px; right: 10px; }
.so-lightbox__nav--prev { left: 4px; }
.so-lightbox__nav--next { right: 4px; }
.so-toast { position: fixed; left: 50%; bottom: 26px; z-index: 70; padding: 11px 20px; border-radius: 30px; background: var(--so-olive); color: #fff; font: 500 13px var(--so-ui); transform: translate(-50%, 30px); opacity: 0; transition: .3s; pointer-events: none; }
.so-toast.show { transform: translate(-50%, 0); opacity: 1; }
.so-music { position: fixed; right: max(16px, calc(50vw - var(--so-w) / 2 + 16px)); bottom: 18px; z-index: 40; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--so-grad); box-shadow: 0 8px 20px rgba(20,40,0,.35); }
.so-music svg { width: 20px; fill: #fff; }
.so-music[aria-pressed="true"] svg { animation: so-spin 3s linear infinite; }
.so-music[aria-pressed="false"]::after { content: ""; position: absolute; width: 26px; height: 2px; background: #fff; transform: rotate(-45deg); }
@keyframes so-spin { to { transform: rotate(360deg); } }

/* ---------- touch effects ---------- */
.so-touchfx { position: fixed; inset: 0; z-index: 90; width: 100vw; height: 100vh; pointer-events: none; }
.so-btn, .so-greet, .so-sheet__panel button { position: relative; overflow: hidden; }
.so-choice { overflow: hidden; }
.so-ripple { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255,250,220,.55) 0, rgba(255,250,220,.25) 40%, transparent 70%); transform: scale(0); pointer-events: none; animation: so-ripple .65s ease-out forwards; }
.so-choice .so-ripple, .so-sheet__panel .so-ripple { background: radial-gradient(circle, rgba(74,122,28,.18) 0, rgba(74,122,28,.08) 40%, transparent 70%); }
@keyframes so-ripple { to { transform: scale(1); opacity: 0; } }
.so-btn:active, .so-greet:active, .so-choice:active { transform: scale(.96); transition: transform .08s; }

/* editor preview frame: no scrollbars */
.is-preview, .is-preview * { scrollbar-width: none; }
.is-preview ::-webkit-scrollbar { display: none; }

@media (prefers-reduced-motion: reduce) {
  .so-marquee__track { animation-duration: 45s; }
  .so-garland { animation-duration: 9s; }
}


/* ---------- long text (Sage Olive) ----------
   A long name, venue, address or link never runs out of its box: a word too long for its line
   breaks onto the next line instead of being cut off or overlapping. overflow-wrap is inherited,
   so this one rule covers every text in the design; it only acts when a word would overflow. */
body.so { overflow-wrap: break-word; word-wrap: break-word; }
