/* Theme "Songket": maroon and songket gold. Ornaments are original SVGs in /assets/ornaments (drawn by
   scripts/ornaments.mjs), used as CSS masks so one file can be gold on maroon or maroon on ivory.
   URLs are absolute: some Safari versions resolve url() inside a custom property against the page. */
:root {
  --bg: #f8f1e4;
  --ink: #2a1714;
  --muted: #6b4f45;
  --accent: #b8892f; /* gold: lines and ornaments only (too light for text on ivory) */
  --accent-ink: #7d1d1d; /* maroon: headings, buttons, small text */
  --on-accent: #fbf3e2;
  --line: #e5d3b3;
  --card: #fffaf0;
  --panel: #3d0c0f;
  --serif: 'Cinzel', Georgia, serif;
  --sans: 'EB Garamond', Georgia, serif;
  --display: 'Cinzel Decorative', 'Cinzel', serif;
  --photo-radius: 120px 120px 10px 10px;
  --maroon: #4a0f12;
  --maroon-deep: #2e080a;
  --gold: #d9b061;
  --ivory: #fbf3e2;
  --weave: url(/assets/ornaments/songket-weave.svg) 0 0 / 28px 28px, radial-gradient(ellipse 90% 60% at 50% 38%, #6e1a1e, var(--maroon) 55%, var(--maroon-deep));
}
body { font-size: 1.1rem; font-weight: 400; }
h1, .amp, .sign, .side-names { font-weight: 400; }
h1 { font-size: clamp(2.1rem, 9vw, 2.6rem); line-height: 1.25; }
h2 { font-size: 1.65rem; letter-spacing: .04em; color: var(--accent-ink); }
h3, .amp, .sign, .event .time { color: var(--accent-ink); }
.person h2 { font-family: var(--display); font-size: 1.55rem; line-height: 1.3; color: var(--ink); }
.guest { font-size: 1.35rem; }

/* Cover: maroon songket field, a gold songket crown above the photo, a songket band at the foot. */
.cover { position: relative; overflow: hidden; padding-top: clamp(7.5rem, 32vw, 9rem); padding-bottom: 5.5rem; background: var(--weave); color: var(--ivory); }
.cover > * { position: relative; z-index: 1; }
.cover::before, .cover::after { content: ''; position: absolute; inset-inline: 0; background: var(--gold); pointer-events: none; }
.cover::before { top: 1.75rem; width: min(80%, 320px); margin-inline: auto; aspect-ratio: 360 / 132;
  -webkit-mask: url(/assets/ornaments/songket-crown.svg) center / contain no-repeat; mask: url(/assets/ornaments/songket-crown.svg) center / contain no-repeat; }
.cover::after { bottom: 1.5rem; height: 21px;
  -webkit-mask: url(/assets/ornaments/songket-band.svg) 0 0 / 24px 21px repeat-x; mask: url(/assets/ornaments/songket-band.svg) 0 0 / 24px 21px repeat-x; }
.cover .eyebrow, .cover h1 { color: var(--gold); }
.cover .date-block strong { border-color: rgb(217 176 97 / .6); }
.cover .btn { background: var(--gold); border-color: var(--gold); color: var(--maroon-deep); font-weight: 500; }
.photo { border: 3px solid var(--gold); outline: 1px solid rgb(217 176 97 / .7); outline-offset: 6px; box-shadow: 0 20px 40px -20px rgb(0 0 0 / .7); }

/* Pucuk rebung divider between sections. */
main > section:not(.cover)::before { content: ''; display: block; width: 190px; height: 26px; margin: 0 auto 1.75rem; background: var(--accent);
  -webkit-mask: url(/assets/ornaments/songket-divider.svg) center / contain no-repeat; mask: url(/assets/ornaments/songket-divider.svg) center / contain no-repeat; }

/* Countdown as maroon songket tiles. */
.countdown div { border-color: var(--maroon); background: var(--weave); color: var(--ivory); }
.countdown strong { color: var(--gold); }
.countdown span { color: #ead9bd; }

/* Closing: the crown again, in maroon, under the signature. */
main > section:last-child::after { content: ''; display: block; width: 190px; margin: 2rem auto 0; aspect-ratio: 360 / 132; background: var(--accent-ink);
  -webkit-mask: url(/assets/ornaments/songket-crown.svg) center / contain no-repeat; mask: url(/assets/ornaments/songket-crown.svg) center / contain no-repeat; }

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

@media (prefers-reduced-motion: no-preference) {
  .cover::before { animation: crown 1.1s ease both; }
  .cover::after { animation: fade 1.4s .3s ease both; }
}
@keyframes crown { from { opacity: 0; transform: translateY(-14px); } }
@keyframes fade { from { opacity: 0; } }

@media (min-width: 900px) {
  .side { padding-bottom: 6.5rem; background: var(--weave); color: var(--ivory); }
  .side .eyebrow, .side-names { color: var(--gold); }
  .side .date-block strong { border-color: rgb(217 176 97 / .6); }
  .side:not(.has-photo)::before { inset: 12% 0 auto; width: min(55%, 460px); margin-inline: auto; aspect-ratio: 360 / 132; border: 0; border-radius: 0; opacity: 1; background: var(--gold);
    -webkit-mask: url(/assets/ornaments/songket-crown.svg) center / contain no-repeat; mask: url(/assets/ornaments/songket-crown.svg) center / contain no-repeat; }
  .side.has-photo::before { background: linear-gradient(to top, rgb(46 8 10 / .88), rgb(46 8 10 / .15) 60%); }
  .side::after { content: ''; position: absolute; z-index: 1; inset: auto 0 2.25rem; height: 26px; background: var(--gold);
    -webkit-mask: url(/assets/ornaments/songket-band.svg) 0 0 / 30px 26px repeat-x; mask: url(/assets/ornaments/songket-band.svg) 0 0 / 30px 26px repeat-x; }
}
