/* Tanya & Prateek · engagement invite
   Layout: a scalloped sage frame holding a block-printed paper card; pages slide inside it.
   Colours are sampled from the Canva invite. Single, deliberate light look (it's printed stationery). */
:root {
  --ground: #FBF3E3;       /* cream behind the frame */
  --paper: #FBF6EC;        /* the card */
  --paper-2: #F4EBDA;      /* panels on the card */
  --sage: #7E8056;         /* scalloped frame, buttons */
  --sage-light: #B4B78E;
  --sage-deep: #5D6143;    /* headings */
  --ink: #4D4B39;          /* body text */
  --muted: #6B6651;
  --rule: #DCD2B9;
  --blush: #E8B3A0;        /* flowers */
  --blush-deep: #BF7E6A;

  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --caps: "Marcellus SC", "Marcellus", Georgia, serif;
  --display: "Marcellus", Georgia, serif;
  --serif: "Spectral", Georgia, "Times New Roman", serif;

  --r: 12px;               /* scallop radius */
  --band: 9px;             /* sage band between scallops and card */
  --ease: cubic-bezier(.2, .75, .2, 1);
  --flap-clip: polygon(0 0, 100% 0, 100% 3%, 53.6% 95.5%, 51.6% 99%, 50% 100%, 48.4% 99%, 46.4% 95.5%, 0 3%);
  --flap-clip-in: polygon(0 100%, 100% 100%, 100% 97%, 53.6% 4.5%, 51.6% 1%, 50% 0, 48.4% 1%, 46.4% 4.5%, 0 97%);
  color-scheme: light;
}
@media (min-width: 600px) {
  :root { --r: 16px; --band: 15px; }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ground) url("assets/pattern.svg") center -40px / 176px auto;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
@media (min-width: 600px) { body { background-size: 210px auto; } }
p, h1, h2, h3, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
svg { display: block; }
img { display: block; max-width: 100%; }
a { color: inherit; }
b { font-weight: 500; }

/* Script lettering, with a slightly offset blush impression like a hand block print */
.script {
  font-family: var(--script); font-weight: 400;
  color: var(--sage-deep);
  text-shadow: .028em .035em 0 rgba(232, 179, 160, .8);
}

:focus-visible { outline: 1.5px solid var(--blush-deep); outline-offset: 3px; border-radius: 3px; }
[tabindex="-1"]:focus { outline: none; }

/* ============ Petals ============ */
.petals { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.petals--front { z-index: 40; }
.petal {
  position: absolute; top: -30px; left: var(--x);
  animation: petal-fall var(--d) linear var(--delay) 1 both;
  will-change: transform;
}
.petal.is-loop { animation-iteration-count: infinite; opacity: .8; }
.petal b {
  display: block;
  width: calc(10px * var(--s)); height: calc(13px * var(--s));
  border-radius: 85% 8% 85% 8%;
  background: linear-gradient(140deg, #F8DCCF, #E5A592);
  animation: petal-sway calc(var(--d) / 2.6) ease-in-out var(--delay) infinite alternate;
}
.petal:nth-child(3n) b { background: linear-gradient(140deg, #FBE6DA, #EDB9A4); }
.petal:nth-child(4n) b { background: linear-gradient(140deg, #F2CDBF, #D8937F); }
@keyframes petal-fall {
  from { transform: translate3d(0, -6vh, 0); }
  to   { transform: translate3d(var(--drift), 112vh, 0); }
}
@keyframes petal-sway {
  from { transform: translateX(-14px) rotate(var(--rot)) rotateX(0deg); }
  to   { transform: translateX(14px) rotate(calc(var(--rot) + 150deg)) rotateX(65deg); }
}

/* ============ Landing ============ */
.intro {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center;
  padding-block: 24px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  transition: opacity .9s ease, visibility 0s linear .9s;
}
.intro::before { /* same print as the page; fades first so the card can appear beneath the letter */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(251, 243, 227, .72), rgba(251, 243, 227, .72)),
    url("assets/pattern.svg") center -40px / 176px auto,
    var(--ground);
  transition: opacity .7s ease;
}
@media (min-width: 600px) { .intro::before { background-size: auto, 210px auto; } }
.intro.is-leaving::before { opacity: 0; }
.intro.is-gone { opacity: 0; visibility: hidden; }
.intro[hidden] { display: none; }
.no-js .intro { display: none; }
.intro__inner {
  position: relative;
  display: grid; justify-items: center; text-align: center;
  width: min(100%, 440px);
  padding-block: 24px;
}
.intro__names { margin-bottom: 34px; font-size: clamp(50px, 15.5vw, 74px); transition: opacity .6s ease, transform .8s var(--ease); }
.intro__hint {
  margin-top: 34px;
  font-family: var(--caps); font-size: 15px; letter-spacing: .24em; color: var(--sage-deep);
  transition: opacity .4s ease;
}
.intro__hint span { display: inline-block; animation: hint 2.6s ease-in-out infinite; }
@keyframes hint { 0%, 100% { opacity: .8; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.intro.is-opening .intro__hint { opacity: 0; }
.intro.is-opening .intro__names { opacity: 0; transform: translateY(-12px); }
.intro.is-opening .envelope { transform: translateY(15%); }
.intro.is-leaving .intro__names { opacity: 0; transform: translateY(-8px); }

/* ---- Envelope (flap side, sealed) ---- */
.envelope {
  all: unset; cursor: pointer;
  position: relative; display: block;
  width: min(90%, 350px); aspect-ratio: 1.45;
  perspective: 1200px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 1s var(--ease) .1s;
}
.envelope:focus-visible { outline: 1.5px solid var(--blush-deep); outline-offset: 12px; border-radius: 6px; }
.envelope > span, .envelope > svg { position: absolute; display: block; }
.envelope::after { /* paper grain over the whole envelope */
  content: ""; position: absolute; inset: 0; z-index: 7; pointer-events: none;
  border-radius: 5px;
  background: url("assets/grain.svg");
  mix-blend-mode: multiply;
  transition: opacity .5s ease;
}
.env__shadow {
  left: 3%; right: 3%; bottom: -8%; height: 18%; z-index: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(58, 52, 28, .32), rgba(58, 52, 28, 0));
  filter: blur(3px);
}
.env__back {
  inset: 0; z-index: 1; border-radius: 5px;
  background: #6C6F47;
  box-shadow: 0 1px 1px rgba(40, 36, 20, .2), 0 14px 26px -10px rgba(58, 52, 28, .45);
}
.env__liner {
  position: absolute; inset: 5px 5px 34% 5px;
  border-radius: 3px 3px 0 0;
  background: #F6ECDA url("assets/liner.svg") center top / 62px auto;
}
.envelope > .env__letter {
  left: 6%; right: 6%; top: 5%; height: 86%; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 5.5%;
  background: var(--paper) url("assets/grain.svg");
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(40, 35, 20, .2);
  transition: transform .95s var(--ease) .78s, opacity .6s ease;
}
.env__letter::before {
  content: ""; position: absolute; inset: 6px;
  border: 1px solid rgba(126, 128, 86, .35);
  outline: 1px solid rgba(126, 128, 86, .16); outline-offset: -4px;
}
.env__letter-title { margin-top: 4%; font-size: clamp(34px, 11vw, 46px); line-height: 1.15; }
.env__letter-orn { width: 46%; aspect-ratio: 220 / 26; height: auto; margin-top: 2px; }
.env__letter-date { margin-top: 5px; font-family: var(--display); font-size: clamp(9.5px, 2.9vw, 12px); letter-spacing: .3em; padding-left: .3em; color: var(--muted); }
.env__pocket { inset: 0; width: 100%; height: 100%; z-index: 3; overflow: visible; }
.env__flap-shade {
  left: 0; right: 0; top: 0; height: 58%; z-index: 4;
  filter: blur(2.5px); opacity: .45; transform: translateY(2px);
  transition: opacity .25s ease .25s;
}
.env__flap-shade span { position: absolute; inset: 0; background: #2C2C19; clip-path: var(--flap-clip); }
.env__flap {
  left: 0; right: 0; top: 0; height: 58%; z-index: 5;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  transition: transform .85s cubic-bezier(.45, .05, .25, 1) .3s, z-index 0s linear .72s, opacity .6s ease;
}
.env__face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.env__face--out {
  clip-path: var(--flap-clip);
  background: url("assets/grain.svg"), linear-gradient(174deg, #979A6A 0%, #8B8E62 52%, #7F8257 100%);
}
.env__face--in {
  transform: rotateX(180deg);
  clip-path: var(--flap-clip-in);
  background: #F6ECDA url("assets/liner.svg") center bottom / 62px auto;
}
.env__seal {
  left: 50%; top: 56.5%; z-index: 6;
  width: 25%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 1.5px 1.5px rgba(80, 35, 25, .4)) drop-shadow(0 5px 7px rgba(80, 35, 25, .18));
}
.env__seal-half { position: absolute; inset: 0; transition: transform .6s cubic-bezier(.3, .6, .3, 1), opacity .45s ease .12s; }
.env__seal-half img { width: 100%; height: 100%; }
.env__seal-half--l { clip-path: polygon(0 0, 53% 0, 48% 16%, 55% 31%, 46% 47%, 53% 63%, 47% 80%, 52% 100%, 0 100%); }
.env__seal-half--r { clip-path: polygon(53% 0, 100% 0, 100% 100%, 52% 100%, 47% 80%, 53% 63%, 46% 47%, 55% 31%, 48% 16%); }

.envelope.is-open { cursor: default; }
.envelope.is-open .env__seal-half--l { transform: translate(-16%, 12%) rotate(-18deg); opacity: 0; }
.envelope.is-open .env__seal-half--r { transform: translate(16%, 14%) rotate(15deg); opacity: 0; }
.envelope.is-open .env__flap-shade { opacity: 0; }
.envelope.is-open .env__flap { transform: rotateX(180deg); z-index: 1; }
.envelope.is-open .env__letter { transform: translateY(-50%); }

.envelope.is-leaving .env__back,
.envelope.is-leaving .env__pocket,
.envelope.is-leaving .env__shadow { transform: translateY(26%); opacity: 0; transition: transform .7s cubic-bezier(.5, 0, .7, .4), opacity .55s ease; }
.envelope.is-leaving .env__flap { transform: translateY(26%) rotateX(180deg); opacity: 0; transition: transform .7s cubic-bezier(.5, 0, .7, .4), opacity .45s ease; }
.envelope.is-leaving::after { opacity: 0; }
.envelope.is-leaving .env__letter { transform: translateY(-56%) scale(1.14); opacity: 0; transition: transform .85s var(--ease), opacity .6s ease .2s; }

/* ============ App shell ============ */
.app {
  position: fixed; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.frame-wrap {
  position: relative; flex: 1; min-height: 0;
  width: 100%; max-width: 540px; max-height: 900px;
  display: flex; align-items: stretch; justify-content: center;
}
.frame {
  position: relative; flex: 1; min-width: 0;
  padding: calc(var(--r) + var(--band));
  filter: drop-shadow(0 10px 18px rgba(90, 80, 45, .18));
  transition: opacity .9s ease, transform 1.1s var(--ease);
}
/* Scalloped sage frame: an inner rectangle plus a row of circles along each edge */
.frame::before {
  content: ""; position: absolute; inset: 0;
  background: url("assets/grain.svg"), var(--sage);
  --d: calc(var(--r) * 2);
  --dot: radial-gradient(circle closest-side, #000 calc(100% - .8px), #0000);
  -webkit-mask:
    linear-gradient(#000 0 0) center / calc(100% - var(--d)) calc(100% - var(--d)) no-repeat,
    var(--dot) 0 0 / var(--d) var(--d) round no-repeat,
    var(--dot) 0 100% / var(--d) var(--d) round no-repeat,
    var(--dot) 0 0 / var(--d) var(--d) no-repeat round,
    var(--dot) 100% 0 / var(--d) var(--d) no-repeat round;
          mask:
    linear-gradient(#000 0 0) center / calc(100% - var(--d)) calc(100% - var(--d)) no-repeat,
    var(--dot) 0 0 / var(--d) var(--d) round no-repeat,
    var(--dot) 0 100% / var(--d) var(--d) round no-repeat,
    var(--dot) 0 0 / var(--d) var(--d) no-repeat round,
    var(--dot) 100% 0 / var(--d) var(--d) no-repeat round;
}
.js .app:not(.is-revealed) .frame { opacity: 0; transform: translateY(14px) scale(.965); }
.js .app:not(.is-revealed) .tabs { opacity: 0; transform: translateY(16px); }

/* Music on/off, sitting on the frame's top-right scallops */
.music {
  position: absolute; top: 2px; right: 2px; z-index: 5;
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--sage); color: var(--sage-deep); cursor: pointer;
  background: var(--paper) url("assets/grain.svg");
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(126, 128, 86, .28), 0 4px 10px -2px rgba(80, 70, 40, .3);
  transition: opacity .6s ease 1s, transform .2s;
}
.music svg { width: 20px; height: 20px; }
.music::after { /* a soft strike-through while the music is off */
  content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 1.6px; margin-top: -.8px;
  background: var(--blush-deep); border-radius: 1px; transform: rotate(-45deg);
  transition: opacity .2s;
}
.music[aria-pressed="true"]::after { opacity: 0; }
.music[aria-pressed="true"] { animation: music-glow 2.4s ease-out infinite; }
@keyframes music-glow {
  0% { box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(126, 128, 86, .28), 0 4px 10px -2px rgba(80, 70, 40, .3), 0 0 0 0 rgba(232, 179, 160, .55); }
  100% { box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(126, 128, 86, .28), 0 4px 10px -2px rgba(80, 70, 40, .3), 0 0 0 12px rgba(232, 179, 160, 0); }
}
.music:active { transform: scale(.94); }
.js .app:not(.is-revealed) .music { opacity: 0; }

/* The card: warm paper, a faint tone-on-tone block print, and a printed double rule */
.card {
  position: relative; height: 100%;
  background-color: var(--paper);
  background-image: url("assets/grain.svg"), url("assets/paper-print.svg");
  background-size: 180px, 150px auto;
  background-position: 0 0, center -24px;
  overflow: hidden;
  container-type: size;
}
.card::before, .card::after { content: ""; position: absolute; pointer-events: none; }
.card::before { inset: 9px; border: 1px solid rgba(126, 128, 86, .34); }
.card::after { inset: 13px; border: 1px solid rgba(126, 128, 86, .17); }
.stage { position: absolute; inset: 0; }
.stage::before { /* a small block-print flower on each corner of the double rule */
  content: ""; position: absolute; inset: 3px; pointer-events: none;
  background:
    url("assets/flower.svg") 0 0 / 16px no-repeat,
    url("assets/flower.svg") 100% 0 / 16px no-repeat,
    url("assets/flower.svg") 0 100% / 16px no-repeat,
    url("assets/flower.svg") 100% 100% / 16px no-repeat;
}

/* Pages */
.page {
  position: absolute; inset: 0;
  overflow: hidden;
  visibility: hidden; opacity: 0;
  transform: translateX(30px);
  transition: opacity .45s ease, transform .6s var(--ease), visibility 0s linear .6s;
}
.page.is-before { transform: translateX(-30px); }
.page.is-active {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .55s ease .1s, transform .7s var(--ease) .1s, visibility 0s;
}
.page__inner {
  position: relative;
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  --pad-x: 22px;
  padding: clamp(18px, 4.6cqh, 42px) var(--pad-x) clamp(16px, 4cqh, 40px);
  transform: scale(var(--fit, 1)); transform-origin: 50% 0;
}
@media (min-width: 600px) { .page__inner { --pad-x: 44px; } }

.eyebrow { font-family: var(--caps); font-size: clamp(13px, 2.6cqh, 14.5px); letter-spacing: .24em; color: var(--muted); padding-left: .24em; }
.h2 { font-size: clamp(38px, min(14cqw, 8.4cqh), 62px); line-height: 1.16; margin: 0; text-wrap: balance; }
.h2--long { font-size: clamp(32px, min(12.6cqw, 7.4cqh), 54px); white-space: nowrap; }
.lede { font-size: 15.5px; color: var(--muted); font-style: italic; margin: 2px 0 clamp(8px, 2cqh, 14px); text-wrap: balance; }
.orn { width: min(200px, 62%); aspect-ratio: 220 / 26; height: auto; margin: clamp(2px, 1cqh, 6px) auto clamp(2px, .8cqh, 4px); }

/* Buttons: a printed double rule rather than a chunky pill */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 26px;
  border: 1px solid var(--sage); border-radius: 2px;
  font-family: var(--caps); font-size: 14.5px; letter-spacing: .14em;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s, color .25s, transform .15s;
}
.btn:active { transform: scale(.98); }
.btn--primary {
  background: var(--sage); color: var(--paper);
  box-shadow: inset 0 0 0 3px var(--sage), inset 0 0 0 4px rgba(251, 246, 236, .5), 0 6px 14px -6px rgba(80, 76, 40, .45);
}
.btn--primary:hover { background: #727449; box-shadow: inset 0 0 0 3px #727449, inset 0 0 0 4px rgba(251, 246, 236, .5), 0 6px 14px -6px rgba(80, 76, 40, .45); }
.btn--line {
  background: rgba(251, 246, 236, .75); color: var(--sage-deep);
  box-shadow: inset 0 0 0 3px rgba(251, 246, 236, .9), inset 0 0 0 4px rgba(126, 128, 86, .3);
}
.btn--line:hover { background: var(--paper-2); }

.next-link {
  margin-top: clamp(10px, 3cqh, 28px); padding: 8px 6px;
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer; white-space: nowrap;
  font-family: var(--caps); font-size: 14px; letter-spacing: .14em; color: var(--sage-deep);
}
.next-link svg { width: 26px; height: 11px; transition: transform .3s var(--ease); }
.next-link:hover svg { transform: translateX(4px); }
.next-link--back svg { transform: scaleX(-1); }
.next-link--back:hover svg { transform: scaleX(-1) translateX(4px); }

/* ============ 1 · Cover ============ */
.page--cover .page__inner { height: 100%; min-height: 0; padding-top: clamp(18px, 4.2cqh, 42px); padding-bottom: 0; }
.cover__lead {
  margin-top: auto;
  font-style: italic; font-weight: 300;
  font-size: clamp(21px, min(7.4cqw, 4cqh), 32px); line-height: 1.3; color: var(--sage-deep);
}
.cover__title { font-size: clamp(64px, min(27cqw, 15cqh), 124px); line-height: 1.05; margin: .02em 0 .12em; }
.cover__bless { font-size: clamp(17px, min(6cqw, 3.3cqh), 22px); line-height: 1.45; color: var(--ink); }
.nw { white-space: nowrap; }
.page--cover .orn { margin: clamp(8px, 2.2cqh, 18px) auto clamp(6px, 1.6cqh, 12px); }
.cover__join { font-family: var(--caps); font-size: clamp(16px, 3cqh, 19px); letter-spacing: .26em; color: var(--sage-deep); padding-left: .26em; }
.cover__meta { margin-top: 4px; font-size: 16px; line-height: 1.55; color: var(--muted); text-wrap: balance; }
.cover__meta .dot { color: var(--blush-deep); padding: 0 .2em; }
.cover__cta { margin-top: clamp(10px, 2.2cqh, 18px); min-height: 44px; padding: 10px 26px; font-size: 14px; }

.kids {
  flex: 1 1 0; min-height: 170px;
  /* never taller than the photo needs at full width; spare height goes to the auto margins */
  max-height: calc((100cqw - 2 * var(--pad-x)) * .902);
  width: 100%;
  display: flex; align-items: flex-end; justify-content: center;
  margin-top: auto;
}
.kids__box {
  position: relative;
  height: 100%; max-width: 100%;
  aspect-ratio: 1.109;           /* names band (21% of width) + photo (94% wide, 818×602) */
  container-type: inline-size;
}
.kids__fig { position: absolute; left: 0; right: 0; bottom: 0; padding-top: 21%; }
.kids__img {
  width: 94%; height: auto; margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(150, 110, 80, .14));
}
.kid-name { position: absolute; z-index: 2; font-size: 12.8cqw; line-height: 1; }
.kid-name--p { left: 0; top: 3.4cqw; transform: rotate(-12deg); }
.kid-name--t { right: 4%; top: 1cqw; transform: rotate(-10deg); }
.arrow {
  position: absolute; z-index: 2;
  width: 10cqw; height: auto; aspect-ratio: 60 / 110;
  fill: none; stroke: var(--blush-deep); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  opacity: .8;
}
.arrow--p { left: 5%; top: 14cqw; }
.arrow--t { right: 4%; top: 13cqw; }
.js .arrow path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.app.is-revealed .arrow path { animation: draw .9s ease-out forwards 1.6s; }
.app.is-revealed .arrow .arrow__head { animation-delay: 2.35s; animation-duration: .35s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.js .kid-name, .js .kids__img { opacity: 0; }
.app.is-revealed .kids__img { animation: kids-in 1s var(--ease) 1s both; }
.app.is-revealed .kid-name { animation: pop .7s var(--ease) 1.4s both; }
@keyframes kids-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; scale: .8; } to { opacity: 1; scale: 1; } }

.js .reveal { opacity: 0; }
.app.is-revealed .reveal { animation: rise .9s var(--ease) calc(.4s + var(--i) * 90ms) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============ 2 · Join us ============ */
.date { margin: clamp(6px, 1.8cqh, 14px) 0 4px; }
.date__month { font-family: var(--caps); font-size: 14px; letter-spacing: .36em; color: var(--sage-deep); margin-bottom: 4px; padding-left: .36em; }
.date__row { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 4cqw, 18px); }
.date__side {
  flex: 0 1 88px; min-width: 0; padding: 6px 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-family: var(--caps); font-size: clamp(13px, 4.5cqw, 15px); letter-spacing: .14em; color: var(--muted);
}
.date__day { font-family: var(--display); font-size: clamp(50px, 11cqh, 72px); line-height: 1; color: var(--sage-deep); }
.date__count {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 12px; font-size: 16px; font-style: italic; color: var(--blush-deep);
}
.date__count[hidden] { display: none; }
.date__count::before, .date__count::after { content: ""; width: 20px; height: 1px; background: currentColor; opacity: .5; }

.events {
  display: grid; grid-template-columns: 1fr 1px 1fr; gap: 0 14px;
  width: 100%; max-width: 330px; margin: clamp(12px, 3.2cqh, 24px) auto 4px;
}
.events__rule { background: linear-gradient(transparent, var(--rule) 20%, var(--rule) 80%, transparent); }
.event { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 4px 0; }
.ico--event { width: clamp(40px, 8cqh, 52px); height: auto; aspect-ratio: 52 / 44; margin-bottom: 4px; }
.event__time { font-family: var(--display); font-size: clamp(20px, 7.4cqw, 25px); line-height: 1.2; color: var(--sage-deep); white-space: nowrap; }
.event__what { font-family: var(--caps); font-size: 15px; letter-spacing: .12em; color: var(--muted); }

.place-line {
  display: inline-flex; align-items: center; gap: 8px;
  margin: clamp(10px, 2.8cqh, 22px) 0 0; font-size: 15.5px; color: var(--sage-deep);
}
.ico--buta { width: 17px; height: 22px; flex: none; }


/* ============ 3 · Venue ============ */
.venue__where { font-family: var(--caps); font-size: 15.5px; letter-spacing: .14em; color: var(--sage-deep); margin-top: 2px; }
.venue__note { margin-top: 6px; max-width: 300px; font-size: 15px; color: var(--muted); font-style: italic; text-wrap: balance; }
.map { width: min(100%, 400px, calc(36cqh * 1.4655)); margin: clamp(10px, 2.6cqh, 22px) auto clamp(12px, 3cqh, 24px); }
.map svg { width: 100%; height: auto; box-shadow: 0 1px 2px rgba(60, 55, 30, .12); }
.map__label { font-family: var(--serif); font-size: 12.5px; font-weight: 500; fill: var(--ink); }
.map__sub { font-family: var(--serif); font-size: 11px; font-style: italic; fill: var(--muted); }
.map__venue { font-family: var(--script); font-size: 21px; fill: var(--sage-deep); paint-order: stroke; stroke: #F7EFE0; stroke-width: 4px; }
.map__river-label { font-family: var(--serif); font-size: 11px; font-style: italic; fill: #86A090; letter-spacing: .14em; }
.map__pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(3.4); } }
.btn-row { display: grid; gap: 10px; width: 100%; max-width: 300px; }

/* ============ 4 · Travel ============ */
.travel { width: 100%; max-width: 420px; text-align: left; border-top: 1px solid var(--rule); }
.trow {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: clamp(9px, 2.2cqh, 18px) 2px; border-bottom: 1px solid var(--rule);
}
.ico--travel { width: 40px; height: 35px; margin-top: 4px; }
.trow__kind { font-family: var(--caps); font-size: 14px; letter-spacing: .18em; color: var(--blush-deep); }
.trow h3 { font-size: 17px; font-weight: 500; line-height: 1.35; color: var(--sage-deep); margin-top: 2px; }
.trow__h-2 { margin-top: clamp(6px, 1.4cqh, 12px) !important; }
.code {
  display: inline-block; margin-right: 8px; padding: 0 6px;
  border: 1px solid var(--rule); border-radius: 2px;
  font-family: var(--caps); font-size: 12.5px; font-weight: 400; letter-spacing: .1em; color: var(--muted);
  vertical-align: 2px;
}
.trow__meta { font-size: 16px; margin-top: 2px; color: var(--ink); }
.trow__note { font-size: 15.5px; font-style: italic; color: var(--muted); margin-top: 6px; line-height: 1.5; }


/* ============ 5 · Dress code ============ */
.attire {
  width: 100%; max-width: 340px; margin: clamp(8px, 2cqh, 18px) auto 0;
  padding: clamp(14px, 3.2cqh, 26px) 20px;
  background: rgba(244, 235, 218, .75);
  border: 1px solid var(--rule); outline: 1px solid rgba(220, 210, 185, .7); outline-offset: -6px;
}
.attire__title { font-size: clamp(30px, 6.6cqh, 40px); line-height: 1.25; margin-top: 2px; }
.swatches { display: flex; justify-content: center; gap: 10px; margin: clamp(6px, 1.6cqh, 12px) 0 clamp(8px, 2cqh, 16px); }
.swatches span {
  width: 24px; height: 24px; border-radius: 50%; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(80, 70, 40, .08), 0 1px 2px rgba(80, 70, 40, .14);
}
.attire__text { font-size: clamp(15px, 2.9cqh, 17px); line-height: 1.55; color: var(--ink); text-wrap: balance; }
.attire__for { font-family: var(--caps); font-size: 14px; letter-spacing: .2em; padding-left: .2em; color: var(--blush-deep); }
.attire__title--sm { font-size: clamp(26px, 5.4cqh, 34px); margin-top: 4px; }
.attire__rule { display: block; width: 60%; height: 1px; margin: clamp(10px, 2.4cqh, 20px) auto clamp(8px, 2cqh, 16px); background: linear-gradient(90deg, transparent, var(--rule) 20%, var(--rule) 80%, transparent); }

/* ============ 6 · Sign-off ============ */
.closing { justify-content: center; }
.closing__sprig { width: 40px; height: min(64px, 9cqh); margin-bottom: 14px; }
.closing__line {
  max-width: 300px;
  font-size: clamp(22px, 6.6vw, 27px); font-weight: 300; font-style: italic; line-height: 1.35;
  color: var(--sage-deep); text-wrap: balance;
}
.closing .orn { margin: 16px auto 10px; }
.closing__names { font-size: clamp(44px, 13.5vw, 56px); margin-bottom: 10px; }
.closing__date { font-family: var(--display); font-size: 15px; letter-spacing: .3em; padding-left: .3em; color: var(--muted); }
.closing .next-link { margin-top: clamp(14px, 4cqh, 34px); }

/* Short cards (small phones, or the Claude app's viewer on an older iPhone):
   drop purely decorative labels before anything has to shrink */
@container (max-height: 520px) {
  .eyebrow, .lede { display: none; }
  .page__inner { padding-top: 14px; padding-bottom: 12px; }
  .trow { padding: 7px 2px; }
  .trow__h-2 { margin-top: 4px !important; }
  .attire { padding: 12px 18px; }
  .attire__text { line-height: 1.45; }
  .swatches span { width: 20px; height: 20px; }
  .events { margin-top: 8px; }
  .closing__sprig { display: none; }
}

/* ============ Navigation ============ */
.tabs {
  position: relative; z-index: 3;
  flex: none; width: 100%; max-width: 540px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin: 10px 0 max(10px, env(safe-area-inset-bottom, 0px));
  padding: 3px;
  background: var(--paper) url("assets/grain.svg");
  border: 1px solid #E1D7BF; border-radius: 3px;
  box-shadow: 0 8px 22px -6px rgba(90, 80, 45, .22);
  transition: opacity .7s ease .5s, transform .9s var(--ease) .5s;
}
.tab {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 50px; padding-top: 9px;
  font-family: var(--caps); font-size: 14.5px; letter-spacing: .08em; color: var(--muted);
  text-decoration: none;
  transition: color .3s;
}
.tab::before {
  content: ""; position: absolute; top: 6px; left: 50%;
  width: 11px; height: 11px; margin-left: -5.5px;
  background: url("assets/flower.svg") center / contain no-repeat;
  opacity: 0; transform: scale(.4) rotate(-60deg);
  transition: opacity .3s, transform .45s var(--ease);
}
.tab + .tab { box-shadow: -1px 0 0 rgba(220, 210, 185, .6); }
.tab:hover { color: var(--sage-deep); }
.tab[aria-current="page"] { color: var(--sage-deep); }
.tab[aria-current="page"]::before { opacity: 1; transform: none; }

.side-nav { display: none; }
@media (min-width: 860px) {
  .frame-wrap { max-width: 680px; gap: 24px; align-items: center; }
  .frame { height: 100%; max-width: 540px; }
  .side-nav {
    display: grid; place-items: center; flex: none;
    width: 50px; height: 50px; border-radius: 50%;
    border: 1px solid var(--sage); color: var(--sage-deep);
    background: var(--paper) url("assets/grain.svg");
    box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(126, 128, 86, .25), 0 6px 16px -4px rgba(90, 80, 45, .2);
    cursor: pointer;
    transition: background-color .25s, color .25s, opacity .3s;
  }
  .side-nav:hover { background: var(--sage); color: var(--paper); box-shadow: inset 0 0 0 3px var(--sage), inset 0 0 0 4px rgba(251, 246, 236, .45); }
  .side-nav:disabled { opacity: 0; pointer-events: none; }
  .side-nav svg { width: 24px; height: 10px; }
  .side-nav--prev svg { transform: scaleX(-1); }
  .tabs { margin-top: 14px; margin-bottom: 18px; }
  .js .app:not(.is-revealed) .side-nav { opacity: 0; }
}
@media (min-height: 980px) and (min-width: 860px) {
  .app { justify-content: center; }
  .frame-wrap { flex: 0 1 900px; }
}

/* ============ No-JS fallback: stack every page ============ */
.no-js body { overflow: auto; }
.no-js .app { position: static; }
.no-js .frame-wrap { max-height: none; }
.no-js .stage, .no-js .page { position: static; }
.no-js .page { visibility: visible; opacity: 1; transform: none; overflow: visible; }
.no-js .tabs { display: none; }
.no-js .card { container-type: normal; height: auto; }
.no-js .page--cover .page__inner { height: auto; }
.no-js .kids { flex: none; height: 340px; }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
  .petals { display: none; }
  .map__pulse { display: none; }
}

/* Stacked names, centred: first name, a small serif &, second name */
.lockup { display: inline-grid; justify-items: center; line-height: 1.04; }

.lockup__amp {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: .42em; line-height: 1; margin: .02em 0 .12em;
  color: var(--blush-deep); text-shadow: none;
}
