/* ============================================================
   00-base — palette, reset, page shell, shared classes
   ============================================================ */

:root{
  --sky:#9ED4DF; --sky-deep:#6FB9CC; --cream:#F8F1DE; --cloud:#FBF6EA;
  --snow:#F4EEE9; --snow-shadow:#C9B8D8;
  --mauve:#A96E93; --mauve-deep:#7C5074;
  --rose:#E0447E; --crimson:#D9375C;
  --amber:#E8862E; --amber-soft:#F2A65A;
  --plum-950:#2E1626; --plum-900:#3E1F33; --plum-700:#55283F;
  --ink:var(--plum-900); --paper:var(--cream);
}

/* ---- reset ---- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
img,svg{display:block;max-width:100%}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
a{color:inherit}

html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}

body{
  background:var(--plum-950);
  color:var(--ink);
  font-family:"Manrope",system-ui,sans-serif;
  font-size:1rem;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
body.lock{overflow:hidden;height:100dvh}

/* grain overlay */
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:999;
  pointer-events:none;
  opacity:.06;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- page column ---- */
.page{
  max-width:480px;
  margin:0 auto;
  min-height:100dvh;
  background:var(--cream);
  box-shadow:0 0 60px rgba(0,0,0,.45);
  overflow:hidden; /* ponytail: clips decorative bleed; drop if a section needs overflow */
}

/* ---- typography ---- */
h1,h2,h3{
  font-family:"Cormorant",serif;
  font-weight:600;
  line-height:1.15;
  color:var(--plum-900);
  text-wrap:balance;
}
h1{font-size:clamp(2.6rem,10vw,4rem)}
h2{font-size:clamp(1.7rem,6vw,2.2rem)}
h3{font-size:clamp(1.2rem,4.5vw,1.5rem)}
p{font-size:clamp(.95rem,3.6vw,1.05rem)}

/* ---- shared classes ---- */
/* natural flow; only the hero is a full-window page */
.sec{
  padding:4.5rem 1.5rem;
  position:relative;
}

.kicker{
  display:block;
  font-family:"Manrope",sans-serif;
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.35em;
  text-transform:uppercase;
  color:var(--mauve-deep);
  text-align:center;
  text-indent:.35em; /* optically recenter tracked text */
  margin-bottom:1.75rem; /* one consistent kicker→content handoff (codex design pass) */
}

.script{
  font-family:"Marck Script",cursive;
  font-weight:400;
  line-height:1.2;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5em;
  padding:.9em 2.2em;
  background:var(--plum-900);
  color:var(--cream);
  font-family:"Manrope",sans-serif;
  font-size:.92rem;
  font-weight:600;
  letter-spacing:.06em;
  border-radius:14px;
  text-decoration:none;
  transition:background .3s ease,transform .3s ease,box-shadow .3s ease;
  box-shadow:0 6px 18px rgba(46,22,38,.25);
}
.btn:hover{background:var(--crimson);transform:translateY(-2px);box-shadow:0 10px 24px rgba(217,55,92,.3)}
.btn:active{transform:translateY(0)}

.art{display:block;width:100%;height:auto}

/* ---- reveal ---- */
.reveal{
  opacity:0;
  transform:translateY(24px);
  transition:opacity .8s cubic-bezier(.22,1,.36,1),transform .8s cubic-bezier(.22,1,.36,1),filter .8s cubic-bezier(.22,1,.36,1);
  transition-delay:var(--d,0s);
}
.reveal.is-visible{opacity:1;transform:none;filter:none}
/* variants — compose with .reveal */
.reveal--scale{transform:translateY(18px) scale(.955)}
.reveal--blur{filter:blur(9px)}

/* ---- utilities ---- */
.tabular-nums{font-variant-numeric:tabular-nums}

/* ---- section chapters: tonal blocks with painted-wave edges ----
   Tinted sections are never adjacent — each borders cream, so the
   wave (drawn in the section's own color) overlaps a calm neighbor. */
:root{
  --wave:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 32' preserveAspectRatio='none'%3E%3Cpath d='M0 32 L0 20 C60 6 120 26 200 14 C280 2 360 24 480 10 L480 32 Z'/%3E%3C/svg%3E");
  --tint-lavender:color-mix(in srgb, var(--snow-shadow) 26%, var(--cream));
  --tint-sky:color-mix(in srgb, var(--sky) 16%, var(--cream));
}
.sec-tint{background:var(--secbg)}
.sec-tint::before,
.sec-tint::after{
  content:"";
  position:absolute;
  left:0;right:0;
  height:32px;
  background:var(--secbg);
  -webkit-mask:var(--wave) center / 100% 100% no-repeat;
  mask:var(--wave) center / 100% 100% no-repeat;
  pointer-events:none;
}
.sec-tint::before{top:-31px}
.sec-tint::after{bottom:-31px;transform:scaleY(-1)}
.sec-tint--last::after{content:none} /* final dark block runs to the page end */

/* ---- focus ---- */
:focus-visible{
  outline:3px solid var(--rose);
  outline-offset:3px;
  border-radius:4px;
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    transition-delay:0s !important;
  }
  .reveal{opacity:1;transform:none}
}

/* ---- desktop backdrop: night glade around the phone column ---- */
.backdrop{display:none}
@media (min-width:640px){
  .backdrop{
    display:block;
    position:fixed;
    inset:0;
    z-index:0;
    overflow:hidden;
    pointer-events:none;
    /* moon-glow behind the card + faint vignette */
    background:
      radial-gradient(52% 60% at 50% 42%, rgba(201,184,216,.10), transparent 70%),
      radial-gradient(120% 90% at 50% 110%, rgba(85,40,63,.55), transparent 60%);
  }
  /* dark ridge silhouettes along the viewport bottom */
  .backdrop::before{
    content:"";
    position:absolute;
    inset:auto 0 0 0;
    height:22vh;
    background:
      linear-gradient(171deg, transparent 55%, rgba(85,40,63,.5) 55.5%),
      linear-gradient(188deg, transparent 68%, rgba(62,31,51,.85) 68.5%),
      linear-gradient(176deg, transparent 80%, var(--plum-950) 80.4%);
  }
  .bd-star{
    position:absolute;
    left:var(--x); top:var(--y);
    width:3px; height:3px;
    border-radius:50%;
    background:var(--cloud);
    opacity:.15;
    animation:bd-twinkle var(--t,5s) ease-in-out var(--fd,0s) infinite;
  }
  .bd-fly{
    position:absolute;
    left:var(--x); top:var(--y);
    width:4px; height:4px;
    border-radius:50%;
    background:var(--amber-soft);
    box-shadow:0 0 7px 2px rgba(242,166,90,.6);
    opacity:0;
    animation:firefly var(--t,9s) ease-in-out var(--fd,0s) infinite;
  }
  .page{position:relative;z-index:1}
}
@keyframes bd-twinkle{
  0%,100%{opacity:.12;transform:scale(1)}
  50%{opacity:.65;transform:scale(1.35)}
}
@media (prefers-reduced-motion:reduce){
  .bd-star,.bd-fly{animation:none;opacity:.3}
}

/* ---- language switcher ---- */
.lang{
  position:fixed;
  top:.9rem;
  /* hug the phone column's right edge on desktop, the window edge on mobile */
  right:max(.9rem, calc((100% - 480px) / 2 + .9rem));
  z-index:1001; /* above splash and grain */
  display:flex;
  gap:2px;
  padding:3px;
  border-radius:999px;
  background:rgba(46,22,38,.55);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.lang-btn{
  padding:.32em .7em;
  border-radius:999px;
  font-family:"Manrope",sans-serif;
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.04em;
  color:var(--cream);
  opacity:.75;
  transition:background .3s,opacity .3s;
}
.lang-btn:hover{opacity:1}
.lang-btn.is-active{background:var(--crimson);opacity:1}
.lang-btn:focus-visible{outline:2px solid var(--rose);outline-offset:2px}

/* === 00 splash === */
/* ===== 00 SPLASH ===== */
.splash {
  position: fixed;
  inset: 0;
  /* desktop: same phone-width column as .page, centered over the plum body */
  width: min(100%, 480px);
  margin-inline: auto;
  box-shadow: 0 0 60px rgba(0, 0, 0, .45);
  z-index: 998; /* below grain (999) so the splash gets the same paint texture as every screen */
  touch-action: none;
  overscroll-behavior: contain;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  color: var(--cream);
  /* painterly gradient echo of the artwork — paints instantly while splash.webp streams in */
  background:
    linear-gradient(172deg, transparent 82%, var(--plum-950) 82.4%),
    linear-gradient(192deg, transparent 66%, var(--mauve-deep) 66.5%),
    linear-gradient(174deg, transparent 61%, var(--mauve) 61.6%),
    radial-gradient(120% 55% at 50% 46%, var(--cloud) 0%, rgba(251,246,234,0) 60%),
    linear-gradient(180deg, var(--sky-deep) 0%, var(--sky) 34%, var(--cream) 58%, var(--amber-soft) 72%);
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.22,1,.36,1), visibility 0s linear .9s;
}
.splash--closing {
  opacity: 0;
  transform: scale(1.08);
  visibility: hidden;
  pointer-events: none;
}
.splash:focus, .splash:focus-visible { outline: none; } /* programmatic focus target */

/* pre-dawn painting, slow cinematic drift */
.splash-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.splash-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: splash-drift 20s ease-in-out infinite alternate;
}
@keyframes splash-drift {
  from { transform: scale(1); }
  to   { transform: scale(1.09) translateY(-1.5%); }
}

/* soft snow-peak glow behind the content */
.splash-sun {
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(78vw, 380px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,238,233,.85) 0%, rgba(201,184,216,.28) 46%, rgba(201,184,216,0) 70%);
  pointer-events: none;
}

.splash-inner {
  position: relative;
  padding: 2rem 1.5rem;
  max-width: 30rem;
}

.splash-monogram {
  font-family: "Cormorant", serif;
  font-weight: 500;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  letter-spacing: .3em;
  margin-left: .3em; /* optically recenter tracked text */
  color: var(--plum-900);
  animation: splash-up 1s cubic-bezier(.22,1,.36,1) both;
}
.splash-heart {
  display: inline-block;
  color: var(--rose);
  font-size: .8em;
  vertical-align: .08em;
  animation: cal-beat 2.2s ease-in-out 1.8s infinite;
}

.splash-kicker {
  margin-top: 1.4rem;
  color: var(--plum-700);
  animation: splash-up 1s cubic-bezier(.22,1,.36,1) .18s both;
}

.splash-names {
  margin-top: .9rem;
  font-family: "Cormorant", serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 10vw, 4rem);
  line-height: 1.08;
  color: var(--plum-950);
  animation: splash-up 1.1s cubic-bezier(.22,1,.36,1) .32s both;
}
.splash-i {
  font-size: .58em;
  color: var(--rose);
  margin: 0 .06em;
}

.splash-date {
  margin-top: 1rem;
  font-family: "Cormorant", serif;
  font-size: 1.1rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--plum-900);
  animation: splash-up 1.1s cubic-bezier(.22,1,.36,1) .46s both;
}

.splash-btn {
  margin-top: 2.4rem;
  animation:
    splash-up 1.1s cubic-bezier(.22,1,.36,1) .62s both,
    splash-glow 2.8s ease-in-out 2.2s infinite;
}
@keyframes splash-glow {
  0%, 100% { box-shadow: 0 6px 18px rgba(46,22,38,.25); }
  50%      { box-shadow: 0 6px 30px rgba(217,55,92,.5); }
}

@keyframes splash-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

/* === 01 hero === */
/* ===== 01 HERO ===== */
.hero {
  --hero-fill: #291520; /* sampled from the painting's bottom edge — seamless join */
  padding: 0;
  min-height: 100svh; /* the hero owns exactly one window */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--hero-fill);
}
/* programmatic focus target after the splash closes — never show an outline */
.hero:focus, .hero:focus-visible { outline: none; }

/* the full painting, never cropped — the couple lives at its edges */
.hero-canvas { position: relative; overflow: hidden; /* contains the entrance zoom */ }
.hero-art {
  width: 100%;
  height: auto;
}

/* blends the painting's textured bottom edge into the fill zone */
.hero-scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 24%;
  background: linear-gradient(180deg, rgba(41,21,32,0), var(--hero-fill));
  pointer-events: none;
}

.hero-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: .5rem 1.5rem 4.2rem;
  color: var(--cream);
}
.hero-content > h1,
.hero-content > p { position: relative; z-index: 1; } /* above the glade */

/* ---- the glade: wildflower sprigs + fireflies in the plum zone ---- */
.hero-glade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
body.is-open .hero-glade { animation: hero-fade 1.6s ease .9s both; }

.hero-flora {
  position: absolute;
  bottom: 0;
  width: clamp(96px, 30vw, 150px);
  height: auto;
  opacity: .9;
}
.hero-flora--l { left: .4rem; }
.hero-flora--r { right: .4rem; transform: scaleX(-1); }

.hero-fly {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber-soft);
  box-shadow: 0 0 6px 2px rgba(242, 166, 90, .75);
  opacity: 0;
  animation: firefly var(--t, 8s) ease-in-out var(--fd, 0s) infinite;
}
@keyframes firefly {
  0%, 100% { transform: translate(0, 0); opacity: 0; }
  12%      { opacity: .95; }
  45%      { transform: translate(14px, -30px); opacity: .3; }
  60%      { transform: translate(4px, -44px); opacity: .9; }
  88%      { transform: translate(-8px, -20px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-fly { animation: none; opacity: .55; }
}

.hero-names {
  font-family: "Marck Script", cursive;
  font-weight: 400;
  color: var(--cream); /* base h1 rule would paint it --plum-900, invisible over the ridges */
  font-size: clamp(2.4rem, 9.5vw, 3.6rem);
  line-height: 1.04;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .05em;
  text-shadow: 0 2px 24px rgba(46,22,38,.55);
}
.hero-name:first-child { margin-right: .9em; }
.hero-name:last-child  { margin-left: .9em; }
.hero-amp {
  font-family: "Cormorant", serif;
  font-style: italic;
  font-weight: 500;
  font-size: .44em;
  color: var(--amber-soft);
  line-height: 1;
}

.hero-date {
  margin-top: 1rem;
  font-family: "Cormorant", serif;
  font-weight: 500;
  font-size: clamp(.9rem, 3.4vw, 1.1rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cloud);
  font-variant-numeric: tabular-nums;
}

.hero-cue {
  position: absolute;
  left: 50%;
  bottom: .9rem;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  animation: hero-bob 2.4s ease-in-out infinite;
}

/* cinematic entrance, keyed to the splash opening */
body.is-open .hero-art   { animation: hero-art-in 1.8s cubic-bezier(.22,1,.36,1) both; }
body.is-open .hero-names { animation: hero-in 1.1s cubic-bezier(.22,1,.36,1) .3s both; }
body.is-open .hero-date  { animation: hero-in 1.1s cubic-bezier(.22,1,.36,1) .5s both; }
body.is-open .hero-cue   {
  /* opacity-only entrance: hero-in's transform would clobber the translateX centering */
  animation:
    hero-fade 1s ease .75s both,
    hero-bob 2.4s ease-in-out 1.75s infinite;
}
@keyframes hero-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes hero-art-in {
  from { transform: scale(1.06); }
  to   { transform: none; }
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.hero-cue:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}
.hero-chevron {
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--cream);
  border-bottom: 2px solid var(--cream);
  transform: rotate(45deg) translate(-2px, -2px);
  opacity: .85;
}

@keyframes hero-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* === 02 invite + couple (one page) === */
#invite { text-align: center; --secbg: var(--tint-lavender); }

.invite-lead {
  max-width: 30ch;
  margin: 1.2rem auto 0;
  font-family: "Cormorant", serif;
  font-weight: 500;
  font-size: clamp(1.25rem, 4.8vw, 1.6rem);
  line-height: 1.45;
  color: var(--ink);
  text-wrap: balance;
}
.invite-accent {
  font-size: 1.18em;
  color: var(--rose);
  white-space: nowrap;
}

.invite-quote {
  position: relative;
  margin: 2.6rem auto 0;
  max-width: 26rem;
  padding: 2.4rem 1.75rem 1.8rem;
  background: linear-gradient(160deg, var(--cloud), var(--snow));
  border: 1px solid color-mix(in srgb, var(--mauve) 28%, transparent);
  border-radius: 14px;
  box-shadow: 0 14px 34px -20px color-mix(in srgb, var(--plum-900) 45%, transparent);
}
.invite-quote::before,
.invite-quote::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 3.2rem;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--mauve), transparent);
}
.invite-quote::before { top: 1.15rem; }
.invite-quote::after  { bottom: 1.1rem; }

.invite-quote-mark {
  position: absolute;
  top: -1.1rem;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--mauve-deep);
  color: var(--cream);
  font-family: "Cormorant", serif;
  font-size: 1.5rem;
  line-height: 1;
  padding-top: .55rem;
  box-shadow: 0 0 0 5px var(--cream);
}

.invite-quote-text {
  margin: 0;
  font-family: "Cormorant", serif;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.25rem, 4.8vw, 1.55rem);
  line-height: 1.4;
  color: var(--mauve-deep);
  text-wrap: balance;
}
.invite-quote-sub {
  margin-top: 1rem;
  font-size: .84rem;
  line-height: 1.6;
  letter-spacing: .02em;
  color: color-mix(in srgb, var(--ink) 78%, var(--mauve-deep));
  max-width: 32ch;
  margin-inline: auto;
}

/* portraits — side by side on every screen */
.couple-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(.4rem, 3vw, 1.2rem);
  margin-top: 2.4rem;
}

.couple-card { flex: 1 1 0; min-width: 0; max-width: 12rem; }

.couple-frame {
  position: relative;
  width: min(100%, clamp(7.5rem, 38vw, 10.5rem));
  margin-inline: auto;
  border-radius: 42% 42% 38% 38% / 46% 46% 34% 34%;
  overflow: hidden;
  background: var(--snow);
  box-shadow:
    0 0 0 3px var(--cream),
    0 0 0 4.5px var(--mauve),
    0 18px 36px -18px color-mix(in srgb, var(--mauve-deep) 55%, transparent);
}
/* portraits mirrored so the couple gaze toward each other */
.couple-photo {
  aspect-ratio: 1;
  object-fit: cover;
  transform: scale(-1.02, 1.02);
  transition: transform .9s cubic-bezier(.22,1,.36,1);
}
.couple-card:hover .couple-photo { transform: scale(-1.07, 1.07); }

.couple-name {
  margin-top: 1rem;
  font-family: "Cormorant", serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 5.5vw, 1.8rem);
  line-height: 1.1;
  color: var(--ink);
}
.couple-line {
  margin-top: .3rem;
  font-size: .78rem;
  letter-spacing: .05em;
  color: var(--mauve-deep);
}

.couple-amp {
  align-self: center;
  margin-top: 1.6rem;
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  line-height: 1;
  color: var(--rose);
}

/* === 04 countdown (lives inside #calendar) === */
.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(.5rem, 2.5vw, .9rem);
  max-width: 22.5rem; /* aligned with the calendar card */
  margin: 1.6rem auto 0;
}
.cd-grid[hidden] { display: none; }

.cd-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: clamp(.65rem, 2.8vw, .9rem) 0 clamp(.55rem, 2.4vw, .75rem);
  background: var(--cloud);
  border: 1px solid color-mix(in srgb, var(--mauve) 22%, transparent);
  border-radius: 14px;
  box-shadow: 0 6px 18px -10px color-mix(in srgb, var(--plum-900) 45%, transparent);
}

.cd-num {
  font-family: "Cormorant", serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.5rem, 6.2vw, 2rem);
  line-height: 1;
  color: var(--plum-900);
  /* fixed advance width — no layout shift as digits tick */
  min-width: 2.2ch;
}

.cd-label {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mauve-deep);
}

.cd-today {
  margin-top: 2.25rem;
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  color: var(--rose);
}

/* === 05 calendar === */
/* 05 — calendar */
#calendar { text-align: center; --secbg: var(--tint-sky); }

.cal-title {
  font-family: "Cormorant", serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 6.5vw, 2.2rem);
  color: var(--plum-900);
  margin-top: .85rem;
}

.cal-card {
  max-width: 22.5rem;
  margin: 2rem auto 0;
  padding: 1.35rem 1.1rem 1.5rem;
  background: var(--cloud);
  border: 1px solid color-mix(in srgb, var(--mauve) 22%, transparent);
  border-radius: 14px;
  box-shadow: 0 6px 18px -10px color-mix(in srgb, var(--plum-900) 45%, transparent);
}

.cal-week,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  justify-items: center;
}

.cal-week span {
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mauve-deep);
  padding-bottom: .7rem;
}

.cal-grid { row-gap: .35rem; }

.cal-day {
  width: min(2.4rem, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
  font-size: .92rem;
  color: var(--ink);
  position: relative;
}

/* wedding day — pulsing heart ring */
.cal-day--wed {
  color: #fff;
  font-weight: 600;
  z-index: 1;
}
.cal-day--wed::before {
  content: "";
  position: absolute;
  inset: .12rem;
  border-radius: 50%;
  background: var(--crimson);
  z-index: -1;
}
.cal-day--wed::after {
  content: "";
  position: absolute;
  inset: .12rem;
  border-radius: 50%;
  border: 2px solid var(--rose);
  animation: cal-pulse 2s cubic-bezier(.22,1,.36,1) infinite;
}
.cal-heart {
  position: absolute;
  top: -.62rem;
  right: -.28rem;
  font-size: .78rem;
  line-height: 1;
  color: var(--crimson);
  animation: cal-beat 2s ease-in-out infinite;
}

@keyframes cal-pulse {
  0%   { transform: scale(1);   opacity: .75; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}
@keyframes cal-beat {
  0%, 100% { transform: scale(1); }
  12%      { transform: scale(1.25); }
  24%      { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .cal-day--wed::after, .cal-heart { animation: none; }
  .cal-day--wed::after { opacity: 0; }
}

.cal-fallback {
  font-size: .92rem;
  color: var(--ink);
  padding-top: .5rem;
}

/* === 06 venue === */
/* 06 — venue */
#venue { text-align: center; }

.venue-card {
  margin: 2rem 0 2.25rem;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 34px -14px rgba(46, 22, 38, .35);
}
.venue-art {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.venue-name {
  font-family: "Cormorant", serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 6.5vw, 2.2rem);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5rem;
}
.venue-address {
  font-size: .95rem;
  color: var(--mauve-deep);
  margin: 0 0 .35rem;
}
.venue-time {
  font-family: "Cormorant", serif;
  font-size: clamp(1.1rem, 4.2vw, 1.3rem);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 1.75rem;
}
.venue-hour {
  color: var(--mauve-deep);
  font-variant-numeric: tabular-nums;
}

/* directional cue on the map CTA (codex design pass) */
.venue-btn-arrow {
  display: inline-block;
  font-size: 1.1em;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.venue-btn:hover .venue-btn-arrow,
.venue-btn:focus-visible .venue-btn-arrow { transform: translate(.2rem, -.2rem); }

.venue-note {
  margin: 1.5rem auto 0;
  max-width: 22ch;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--mauve-deep);
}
.venue-note::before {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  margin: 0 auto 1.1rem;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}

/* === 07 program === */
/* 07 — program */
#program { --secbg: var(--tint-lavender); }
#program .kicker { display: block; text-align: center; }

.prog-list {
  list-style: none;
  margin: 2.5rem auto 0;
  padding: 0;
  max-width: 20rem;
  position: relative;
}
/* container is only a trigger for the line draw — never fade the whole list */
.prog-list.reveal { opacity: 1; transform: none; transition: none; }

/* the vertical line, threaded through the dots — draws itself in on scroll */
.prog-list::before {
  content: "";
  position: absolute;
  left: .4375rem; /* dot center (14px dot / 2) */
  top: .75rem;
  bottom: .75rem;
  width: 2px;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  transition: transform 1.5s cubic-bezier(.22,1,.36,1) .15s;
  background: linear-gradient(180deg,
    transparent,
    var(--snow-shadow) 12%,
    var(--snow-shadow) 88%,
    transparent);
}
.prog-list.is-visible::before { transform: translateX(-50%) scaleY(1); }

/* dots pop after the line reaches them */
.prog-item::before { transition: scale .5s cubic-bezier(.34,1.56,.64,1); scale: 0; }
.prog-list.is-visible .prog-item::before { scale: 1; }
.prog-list.is-visible .prog-item:nth-child(1)::before { transition-delay: .25s; }
.prog-list.is-visible .prog-item:nth-child(2)::before { transition-delay: .55s; }
.prog-list.is-visible .prog-item:nth-child(3)::before { transition-delay: .85s; }
.prog-list.is-visible .prog-item:nth-child(4)::before { transition-delay: 1.15s; }

.prog-item {
  position: relative;
  padding: 0 0 2.1rem 2.1rem;
}
.prog-item:last-child { padding-bottom: 0; }

/* dot */
.prog-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: .375rem;
  width: .875rem;
  height: .875rem;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 4px var(--cream), 0 0 0 5px var(--snow-shadow);
}

.prog-time {
  display: block;
  font-family: "Cormorant", serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 5vw, 1.55rem);
  line-height: 1.1;
  color: var(--mauve-deep);
  font-variant-numeric: tabular-nums;
}
.prog-label {
  display: block;
  margin-top: .3rem;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink);
}

.prog-ridge {
  margin: 3.2rem -1.5rem 0; /* full-bleed inside the lavender block, above its exit wave */
}

/* === 08 wishes === */
/* 08 — wishes */
.wish { text-align: center; }

.wish-art {
  margin: 1.9rem 0 2.25rem;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 38px -16px rgba(46, 22, 38, .45);
}

.wish-closing {
  font-family: "Cormorant", serif;
  font-weight: 500;
  font-size: clamp(1.3rem, 5vw, 1.6rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 22ch;
  margin: 0 auto;
}
.wish-closing strong { font-weight: 600; }

.wish-amp {
  color: var(--rose);
  font-size: 1.15em;
  padding: 0 .1em;
}

.wish-bless {
  margin-top: 2rem;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-variant-caps: all-small-caps;
  letter-spacing: .3em;
  text-indent: .3em; /* balance the letter-spacing tail */
  font-size: 1rem;
  color: var(--mauve-deep);
}

/* === 09 contacts === */
/* 09 — contacts: dark plum finale */
.contact { text-align: center; padding-bottom: 5.5rem; --secbg: var(--plum-900); }
.contact .kicker { color: var(--snow-shadow); }
.contact .contact-card { border-color: rgba(248, 241, 222, .14); }
.contact .contact-footer { color: var(--snow-shadow); }

.contact-cards {
  display: grid;
  gap: .85rem;
  margin: 2rem auto 0;
  max-width: 340px;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "role ic" "phone ic";
  align-items: center;
  row-gap: .2rem;
  text-align: left;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: var(--cloud);
  border: 1px solid rgba(124, 80, 116, .18);
  box-shadow: 0 2px 10px rgba(46, 22, 38, .06);
  text-decoration: none;
  color: var(--ink);
  transition: transform .35s cubic-bezier(.22,1,.36,1),
              box-shadow .35s cubic-bezier(.22,1,.36,1),
              border-color .35s;
}
.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--rose);
  box-shadow: 0 8px 22px rgba(46, 22, 38, .12);
}
.contact-card:active { transform: translateY(0); }

.contact-role {
  grid-area: role;
  font-family: "Manrope", sans-serif;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--mauve-deep);
}

.contact-phone {
  grid-area: phone;
  font-family: "Cormorant", serif;
  font-weight: 600;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}

.contact-ic {
  grid-area: ic;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--plum-900);
  color: var(--cream);
  transition: background .35s;
}
.contact-card:hover .contact-ic,
.contact-card:focus-visible .contact-ic { background: var(--crimson); }

.contact-footer {
  margin-top: 3rem;
  font-family: "Manrope", sans-serif;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--mauve-deep);
}
.contact-heart { color: var(--rose); }

/* === 10 music === */
/* 10 — music toggle */
.music-btn {
  position: fixed;
  /* hug the phone column's right edge on desktop, the window edge on mobile */
  right: max(1.1rem, calc((100% - 480px) / 2 + 1.1rem));
  bottom: 1.1rem;
  z-index: 990; /* below grain (999) and splash (1000) */
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(248, 241, 222, .25);
  background: var(--plum-900);
  color: var(--cream);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(46, 22, 38, .35);
  opacity: 0;
  animation: music-in .8s cubic-bezier(.22,1,.36,1) .4s forwards;
  transition: background .35s, transform .35s cubic-bezier(.22,1,.36,1);
}
.music-btn:hover { background: var(--crimson); transform: scale(1.06); }
.music-btn:active { transform: scale(.96); }
.music-btn:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}
.music-btn[hidden] { display: none; }

@keyframes music-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.music-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}
.music-bar {
  width: 3px;
  border-radius: 2px;
  background: currentColor;
  height: 30%;
  transition: height .4s cubic-bezier(.22,1,.36,1);
}
/* playing: animated equalizer */
.music-btn.is-playing .music-bar { animation: music-eq 1.1s ease-in-out infinite; }
.music-btn.is-playing .music-bar:nth-child(1) { animation-delay: 0s; }
.music-btn.is-playing .music-bar:nth-child(2) { animation-delay: .25s; }
.music-btn.is-playing .music-bar:nth-child(3) { animation-delay: .5s; }
.music-btn.is-playing .music-bar:nth-child(4) { animation-delay: .15s; }
/* paused: gentle static staircase */
.music-btn:not(.is-playing) .music-bar:nth-child(1) { height: 35%; }
.music-btn:not(.is-playing) .music-bar:nth-child(2) { height: 65%; }
.music-btn:not(.is-playing) .music-bar:nth-child(3) { height: 45%; }
.music-btn:not(.is-playing) .music-bar:nth-child(4) { height: 25%; }

@keyframes music-eq {
  0%, 100% { height: 25%; }
  50%      { height: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .music-btn { animation: none; opacity: 1; }
  .music-btn.is-playing .music-bar { animation: none; height: 80%; }
}

/* === 11 motion — scroll-driven parallax (progressive enhancement) === */
@supports (animation-timeline: view()) {
  /* framed art drifts gently as it crosses the viewport */
  .venue-art,
  .wish-art .art {
    animation: art-drift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  @keyframes art-drift {
    from { transform: translateY(2.5%) scale(1.09); }
    to   { transform: translateY(-2.5%) scale(1.09); }
  }
  @media (prefers-reduced-motion: reduce) {
    .venue-art, .wish-art .art { animation: none; }
  }
}
