/* Theme "Janur": Javanese. A janur kuning arch (janur melengkung) over the photo, kawung batik on dark
   sogan brown, melati strings between sections and a gunungan at the close. Ornaments are original SVGs
   in /assets/ornaments (drawn by scripts/ornaments.mjs), used as CSS masks. URLs are absolute: some
   Safari versions resolve url() inside a custom property against the page. */
:root {
  --bg: #f6efdc;
  --ink: #33230f;
  --muted: #6a5539;
  --accent: #a8923a; /* janur olive: lines and ornaments only */
  --accent-ink: #6b3a1c; /* sogan brown: headings, buttons, small text */
  --on-accent: #fbf5e6;
  --line: #e2d4ae;
  --card: #fffaee;
  --panel: #2f1d10;
  --serif: 'Marcellus', Georgia, serif;
  --sans: 'Lora', Georgia, serif;
  --display: 'Great Vibes', 'Marcellus', cursive;
  --photo-radius: 50%; /* oval portrait */
  --sogan: #3a2414;
  --sogan-deep: #22150a;
  --janur: #dcc96b;
  --cream: #f6efdc;
  --kawung: url(/assets/ornaments/kawung.svg) 0 0 / 32px 32px, radial-gradient(ellipse 90% 60% at 50% 40%, #4f331c, var(--sogan) 55%, var(--sogan-deep));
}
body { font-size: 1.02rem; font-weight: 400; }
h1, .amp, .sign, .side-names { font-weight: 400; }
h1 { font-size: 3.4rem; line-height: 1.15; }
h2 { font-size: 1.75rem; letter-spacing: .03em; color: var(--accent-ink); }
h3, .amp, .sign, .event .time { color: var(--accent-ink); }
.amp { font-size: 3rem; }
.sign { font-size: 2.8rem; }
.person h2 { font-family: var(--display); font-size: 2.5rem; line-height: 1.25; color: var(--ink); }
/* Script fonts draw "&" as an old "Et"; keep it serif. */
.and { font-family: var(--serif); font-size: .6em; padding: 0 .1em; vertical-align: .15em; }
.guest { font-size: 1.45rem; }

/* Cover: sogan kawung field; the photo stands under a janur arch; a melati string hangs at the foot. */
.cover { position: relative; overflow: hidden; padding-top: clamp(6.75rem, 29vw, 7.75rem); padding-bottom: 5rem; background: var(--kawung); color: var(--cream); }
.cover > * { position: relative; z-index: 1; }
.cover::before, .cover::after { content: ''; position: absolute; inset-inline: 0; margin-inline: auto; pointer-events: none; }
.cover::before { top: .75rem; width: min(96%, 430px); aspect-ratio: 400 / 222; background: var(--janur);
  -webkit-mask: url(/assets/ornaments/janur.svg) center / contain no-repeat; mask: url(/assets/ornaments/janur.svg) center / contain no-repeat; }
.cover::after { bottom: 1.75rem; width: min(80%, 300px); aspect-ratio: 240 / 36; background: var(--cream);
  -webkit-mask: url(/assets/ornaments/melati.svg) center / contain no-repeat; mask: url(/assets/ornaments/melati.svg) center / contain no-repeat; }
.cover .eyebrow, .cover h1 { color: var(--janur); }
.cover .date-block strong { border-color: rgb(220 201 107 / .55); }
.cover .btn { background: var(--janur); border-color: var(--janur); color: var(--sogan-deep); font-weight: 500; }
.photo { position: relative; z-index: 0; border: 3px solid var(--janur); outline: 1px solid rgb(220 201 107 / .6); outline-offset: 6px; box-shadow: 0 20px 40px -20px rgb(0 0 0 / .75); }

/* Melati string between sections. */
main > section:not(.cover)::before { content: ''; display: block; width: 210px; aspect-ratio: 240 / 36; margin: 0 auto 1.75rem; background: var(--accent);
  -webkit-mask: url(/assets/ornaments/melati.svg) center / contain no-repeat; mask: url(/assets/ornaments/melati.svg) center / contain no-repeat; }

/* Countdown on sogan kawung tiles. */
.countdown div { border-color: var(--sogan); background: var(--kawung); color: var(--cream); }
.countdown strong { color: var(--janur); }
.countdown span { color: #e8dcbc; }

/* Closing: a gunungan under the signature. */
main > section:last-child::after { content: ''; display: block; width: 96px; margin: 2rem auto 0; aspect-ratio: 160 / 212; background: var(--accent-ink);
  -webkit-mask: url(/assets/ornaments/gunungan.svg) center / contain no-repeat; mask: url(/assets/ornaments/gunungan.svg) center / contain no-repeat; }

.music-toggle { box-shadow: 0 0 0 2px var(--janur), 0 6px 18px rgb(0 0 0 / .3); }

@media (prefers-reduced-motion: no-preference) {
  .cover::before { animation: sway 1.2s ease both; transform-origin: 50% 0; }
  .cover::after { animation: fade 1.4s .35s ease both; }
}
@keyframes sway { from { opacity: 0; transform: translateY(-12px) scaleY(.94); } }
@keyframes fade { from { opacity: 0; } }

@media (min-width: 900px) {
  .side { padding-bottom: 6rem; background: var(--kawung); color: var(--cream); }
  .side .eyebrow, .side-names { color: var(--janur); }
  .side-names { font-weight: 400; }
  .side .date-block strong { border-color: rgb(220 201 107 / .55); }
  .side:not(.has-photo)::before { inset: 6% 0 auto; width: min(62%, 560px); margin-inline: auto; aspect-ratio: 400 / 222; border: 0; border-radius: 0; opacity: 1; background: var(--janur);
    -webkit-mask: url(/assets/ornaments/janur.svg) center / contain no-repeat; mask: url(/assets/ornaments/janur.svg) center / contain no-repeat; }
  .side.has-photo::before { background: linear-gradient(to top, rgb(34 21 10 / .88), rgb(34 21 10 / .15) 60%); }
  .side::after { content: ''; position: absolute; z-index: 1; inset: auto 0 2.25rem; margin-inline: auto; width: min(50%, 360px); aspect-ratio: 240 / 36; background: var(--cream);
    -webkit-mask: url(/assets/ornaments/melati.svg) center / contain no-repeat; mask: url(/assets/ornaments/melati.svg) center / contain no-repeat; }
}
