:root {
  --sage: #dfeae0;
  --paper: #f8faf6;
  --moss: #bfd6c4;
  --leaf: #173f31;
  --stem: #24634a;
  --stem-dark: #174a36;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--leaf); font: 400 1.25rem/1.6 Gayathri, sans-serif; text-wrap: pretty; overflow-x: hidden; }
::selection { background: var(--stem); color: #fff; }
:focus-visible { outline: 3px solid var(--stem); outline-offset: 4px; }
h1, h2, .date, .line, footer p { font-weight: 100; text-wrap: balance; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3.25rem; padding: .8rem 1.6rem .4rem; border-radius: 99px; background: var(--stem); color: #fff; font-weight: 700; line-height: 1.2; text-decoration: none; transition: background .2s; }
.btn:hover { background: var(--stem-dark); }
.btn svg { width: 1.3rem; flex: none; margin-top: -.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.btn.quiet { background: var(--sage); color: var(--stem-dark); }
.btn.quiet:hover { background: #cddfd0; }

/* Opening */
.open { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(3rem, 8svh, 5rem) 0 0; isolation: isolate; overflow: hidden;
  background: linear-gradient(var(--sage) 30%, var(--moss)); }
.open > :not(.spray) { position: relative; flex: none; }
.open > .cross { margin-top: auto; }
.cross { width: 1.1rem; fill: none; stroke: var(--stem); stroke-width: 1.4; stroke-linecap: round; }
h1 { margin-top: 1rem; font-size: clamp(3.6rem, min(17vw, 12svh), 6rem); line-height: 1; letter-spacing: -.03em; }
.amp { display: block; font-size: .5em; line-height: .9; }
.ml { margin-top: .9rem; font-size: 1.5rem; }
.when { font-size: 1.35rem; }
#open { margin-top: 1.4rem; z-index: 1; }
.bank { width: max(100%, 46rem); margin: auto 0 0; display: block; overflow: visible; flex: none; }
.p { transform: rotate(var(--a)); }
.js .bloom-me { transform: scale(.5); transition: transform 1.5s var(--d) cubic-bezier(.16, 1, .3, 1); }
.js .p { transform: rotate(calc(var(--a) + 40deg)) scale(.46, .8); transition: transform 1.5s var(--d) cubic-bezier(.16, 1, .3, 1); }
.js .bloom .bloom-me { transform: none; }
.js .bloom .p { transform: rotate(var(--a)); }

/* Corner flowers and the jasmine border they hang */
.spray { position: absolute; top: 0; left: 0; width: min(43vw, 22rem, 44svh); height: auto; pointer-events: none; }
.spray.right { left: auto; right: 0; transform: scaleX(-1); }

/* Details: paper grain over a faint floral print */
main:not(.missing) { background: url(assets/paper.png) 0 0 / 256px, url(assets/print.svg) center top / 280px 360px, var(--paper); }

/* 404 */
.missing { justify-content: center; }
.open.missing .line { margin: 0; padding: 0 1.5rem 2rem; }

/* Families */
main section { padding: clamp(4rem, 10vw, 8rem) 1.25rem; max-width: 64rem; margin: auto; }
.portraits, .parents { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.75rem, 3vw, 2.5rem); max-width: 46rem; margin: auto; }
.portraits img { width: 100%; height: auto; border-radius: 10px; display: block; }
.parents { margin-top: 1.5rem; text-align: center; line-height: 1.5; font-size: clamp(1.1rem, 4.4vw, 1.25rem); }
.parents b { font-size: 1.2em; }
.line { margin: clamp(3rem, 8vw, 5rem) auto 0; max-width: 24ch; text-align: center; font-size: clamp(2rem, 7.4vw, 3.4rem); line-height: 1.32; letter-spacing: -.02em; }

/* Events */
main .events { padding-top: 0; display: grid; gap: clamp(4rem, 9vw, 6rem); text-align: center; }
.event h2 { font-size: 1.7rem; font-weight: 400; color: var(--stem); line-height: 1.3; }
.event h2 span { margin-left: .35em; white-space: nowrap; }
.date { font-size: clamp(2.9rem, 12.5vw, 6rem); line-height: 1.05; letter-spacing: -.035em; margin: .7rem 0 .9rem; }
.date time { white-space: nowrap; }
.where { font-size: 1.35rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem; }

/* Gallery: appears once photos are listed in script.js */
main .gallery { max-width: none; padding: 0 0 clamp(4rem, 10vw, 8rem); }
.gallery:not([hidden]) { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 1.25rem; padding-inline: 1.25rem !important; scrollbar-color: var(--stem) var(--sage); }
.gallery img { height: min(70svh, 34rem); width: auto; max-width: 86vw; object-fit: cover; border-radius: 10px; scroll-snap-align: start; flex: none; }

footer { background: var(--moss); text-align: center; padding: clamp(4rem, 11vw, 8rem) 1.25rem; }
footer p { font-size: clamp(2rem, 7.4vw, 3.4rem); line-height: 1.32; letter-spacing: -.02em; max-width: 20ch; margin: auto; }
footer .sign { margin-top: 2.5rem; font-size: 1.5rem; font-weight: 400; letter-spacing: 0; }

.sound { position: fixed; right: 1rem; bottom: 1rem; min-height: 3rem; padding: .6rem 1.1rem .3rem; border: 0; border-radius: 99px; background: var(--leaf); color: #fff; font: 700 1.05rem/1 Gayathri, sans-serif; cursor: pointer; }

@media (min-width: 48rem) and (min-aspect-ratio: 1/1) {
  h1 { font-size: min(8.4vw, 6rem); }
  .amp { display: inline; font-size: .8em; }
  .bank { width: 100%; }
  .line { max-width: 28ch; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .bloom-me { transform: none; }
  .js .p { transform: rotate(var(--a)); transition: none; }
}
