:root {
  --paper: #f6f3ee;
  --paper-raised: #f4efe6;
  --ink: #3a342f;
  --muted: #6f675f;
  --gold: #c4ae90;
  --gold-deep: #8f7b64;
  --seal: #e6d7c6;
  --line: rgba(143, 123, 100, 0.35);
  --nav: 4.25rem;
  --serif: "Cormorant Garamond", Palatino, "Palatino Linotype", serif;
  --script: "Allura", "Snell Roundhand", cursive;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 50% -8%, #fffcf8 0%, transparent 60%),
    var(--paper);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .nav {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

::selection {
  background: #e5d6c4;
  color: var(--ink);
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
}

img,
svg {
  display: block;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.4rem 0.7rem;
  z-index: 20;
}

.skip:focus {
  transform: none;
}

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav);
  padding: calc(0.4rem + env(safe-area-inset-top)) 1.25rem 0.4rem;
  background: transparent;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.2rem);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

.nav.is-scrolled .brand {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.brand span {
  color: var(--gold-deep);
  font-style: italic;
}

.nav.is-plain {
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav.is-plain .brand {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.nav-toggle {
  appearance: none;
  position: relative;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gold-deep);
  font-family: var(--sans);
  cursor: pointer;
}

.nav-word {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-x {
  display: none;
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
}

.nav-toggle[aria-expanded="true"] {
  background: rgba(255, 252, 248, 0.72);
}

.nav-toggle[aria-expanded="true"] .nav-word {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-x {
  display: block;
}

.nav a:focus-visible,
.nav-toggle:focus-visible,
.enter:focus-visible,
.details a:focus-visible {
  outline: 1px solid var(--gold-deep);
  outline-offset: 4px;
}

#hoofdstukken {
  display: none;
}

#hoofdstukken.is-open {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 9;
  flex-direction: column;
  justify-content: safe center;
  align-items: center;
  gap: 0.1rem;
  padding: calc(var(--nav) + 1.25rem) 1.5rem 2.5rem;
  overflow: auto;
  background:
    radial-gradient(680px 380px at 50% 12%, #fffcf8 0%, transparent 64%),
    #f6f3ee;
}

.menu-kicker,
.menu-date {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.menu-kicker {
  margin-bottom: 1.15rem;
}

.menu-date {
  margin-top: 1.45rem;
  color: var(--gold);
}

#hoofdstukken a {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  padding: 0.28rem 0.75rem;
}

#hoofdstukken a.is-active {
  color: var(--gold-deep);
  font-style: italic;
}

.hero,
.chapter {
  scroll-margin-top: calc(var(--nav) + 0.5rem);
}

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav) + 1.5rem) 1.5rem 3rem;
}

.watermerk {
  position: fixed;
  z-index: 0;
  left: 50%;
  top: 58%;
  width: min(32rem, 78vw);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.45s ease;
}

body.is-reading .watermerk {
  opacity: 0.2;
}

body.menu-open .watermerk {
  opacity: 0;
}

main,
.colophon {
  position: relative;
  z-index: 1;
}

.mark-cr {
  width: min(14.5rem, 68vw);
  height: auto;
  margin: 0;
}

.mark-cr.small {
  display: block;
  width: 8rem;
  margin: 1.75rem auto 0;
}

.front {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  line-height: 0;
}

.piece {
  width: var(--piece);
  max-width: 88vw;
  height: auto;
}

.piece-cr {
  --piece: 15rem;
}

.piece-namen {
  --piece: 16.75rem;
  margin-top: 0.9rem;
}

.piece-datum {
  --piece: 12.5rem;
  margin-top: 1.45rem;
}

.piece-slot {
  --piece: 9.5rem;
  margin-top: 1.2rem;
}

.seal-art {
  width: min(16.5rem, 74vw);
  height: auto;
}

.scribble {
  width: min(12.5rem, 62vw);
  height: auto;
  margin-top: 1.65rem;
}

.yes-word {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--ink);
}

.enters {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2.75rem;
}

.enter {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-deep);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.25rem;
}

.chapter {
  padding: 4.5rem 1.25rem 1rem;
}

.letter {
  padding-top: 5.5rem;
}

.date-display {
  margin: 0 auto 2.5rem;
  max-width: 36rem;
  text-align: center;
  color: var(--gold-deep);
}

.date-display span {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.95;
}

.day {
  font-size: clamp(3.2rem, 10vw, 4.4rem);
  letter-spacing: 0.04em;
}

.month {
  font-size: clamp(2.4rem, 7vw, 3.3rem);
  font-style: italic;
}

.year {
  font-size: clamp(2rem, 6vw, 2.7rem);
  letter-spacing: 0.08em;
}

.prose {
  max-width: 36rem;
  margin: 0 auto;
}

.prose p {
  margin: 0 0 1.35rem;
}

.closing {
  margin-top: 2rem;
}

.signature {
  margin: 0.2rem 0 0;
  font-family: var(--script);
  font-size: clamp(2.4rem, 7vw, 3.2rem);
  line-height: 1.1;
  color: #2f2a26;
}

.speech h2 {
  position: sticky;
  top: var(--nav);
  z-index: 2;
  width: 100vw;
  max-width: none;
  margin: 0 0 1.15rem calc(50% - 50vw);
  padding: 0.7rem 1.25rem 1.15rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 7vw, 3rem);
  line-height: 1.05;
  text-align: center;
  color: var(--gold-deep);
  background: var(--paper);
}

.speech h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.9rem;
  background: linear-gradient(var(--paper), rgba(246, 243, 238, 0));
  pointer-events: none;
}

.speech h2.lead {
  max-width: none;
}

.lead {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5.5vw, 2.65rem);
  line-height: 1.15;
  text-align: center;
  color: var(--gold-deep);
}

.beat {
  margin-top: 1.8rem;
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.3;
  text-align: center;
  color: var(--ink);
}

.ask {
  text-align: center;
}

.answer {
  margin: 0.2rem 0 1.6rem;
  text-align: center;
  font-family: var(--script);
  font-size: 2.4rem;
  line-height: 1.1;
  color: #2f2a26;
}

.answer span {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.cue {
  text-align: center;
  font-style: italic;
  color: var(--muted);
}

.names {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0.2rem 0 0.4rem;
  text-align: center;
}

.names li {
  margin: 0.35rem 0;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.memoria {
  margin-top: 5rem;
  padding: 4.5rem 0 1rem;
  background:
    linear-gradient(to bottom, rgba(243, 238, 230, 0), #f3eee6 7rem);
}

.memoria-title {
  margin: 0 0 2.5rem;
  text-align: center;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 4.4rem);
  line-height: 1;
  color: var(--gold-deep);
}

.surprise {
  padding-top: 5rem;
}

.surprise h2 {
  margin: 0 auto 2rem;
  max-width: 16rem;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  line-height: 1.15;
  text-align: center;
  color: #8d6f86;
}

.greeting {
  text-align: center;
  font-weight: 500;
}

.thanks,
.signoff {
  text-align: center;
}

.thanks {
  margin-top: 2rem;
  font-family: var(--script);
  font-size: 1.85rem;
  line-height: 1.3;
  color: #8d6f86;
}

.signoff {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.oval {
  max-width: 34rem;
  margin: 0 auto;
  padding: 3.4rem 1.4rem 2.6rem;
  background: var(--paper-raised);
  border-radius: 11rem;
  text-align: center;
}

.oval h2,
.details h2 {
  margin: 0 0 1.4rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 8vw, 3.5rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.program .oval h2 {
  margin-bottom: 1.8rem;
  color: var(--gold-deep);
  font-size: clamp(2.4rem, 7vw, 3.1rem);
}

.timeline {
  list-style: none;
  position: relative;
  margin: 0 auto;
  padding: 0.15rem 0;
  max-width: 22rem;
  text-align: left;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 1.35rem;
  bottom: 1.35rem;
  left: 6.15rem;
  width: 1px;
  background: var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  column-gap: 1.9rem;
  align-items: center;
  position: relative;
  min-height: 2.7rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 6.15rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--paper-raised);
  border: 1px solid var(--gold-deep);
  transform: translate(-50%, -50%);
}

.timeline time {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.03em;
  text-align: right;
  color: var(--gold-deep);
}

.what {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--ink);
}

.details {
  padding-top: 4.2rem;
  padding-bottom: 3.4rem;
}

.details article {
  padding: 0.15rem 0 1.35rem;
  scroll-margin-top: calc(var(--nav) + 1.5rem);
}

.details article + article {
  border-top: 1px solid var(--line);
  margin-top: 0.35rem;
  padding-top: 1.45rem;
}

.details h2 {
  margin: 0 0 0.55rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.details p {
  margin: 0.15rem 0;
  color: var(--muted);
}

.details a {
  color: var(--ink);
}

.phones {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.envelope {
  display: flex;
  justify-content: center;
  color: var(--gold-deep);
}

.envelope svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.colophon {
  padding: 3.5rem 1.25rem 4rem;
  text-align: center;
  color: var(--gold-deep);
}

.colophon p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.colophon p + p {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

@media (min-width: 800px) {
  .nav {
    padding-inline: 2rem;
  }

  .chapter {
    padding-inline: 2rem;
  }

  .oval {
    padding-inline: 2.5rem;
  }

  .timeline {
    max-width: 24rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .brand,
  .watermerk {
    transition: none;
  }
}

.album-page {
  min-height: 100svh;
  padding: calc(var(--nav) + 2.6rem) 1.4rem 4.5rem;
  text-align: center;
}

.kicker {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.album-page h1 {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 8vw, 4rem);
  line-height: 0.95;
}

.album-choices {
  list-style: none;
  width: min(24rem, 100%);
  margin: 2.2rem auto 0;
  padding: 0;
}

.album-choices a,
.album-choices button.choice {
  display: block;
  width: 100%;
  padding: 1rem 0.4rem 1.05rem;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}

.album-choices li:last-child a,
.album-choices li:last-child button.choice {
  border-bottom: 1px solid var(--line);
}

.album-choices small {
  display: block;
  margin-top: 0.28rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.album-choices .is-open {
  color: var(--gold-deep);
  font-style: italic;
}

.mosaic {
  width: min(68rem, 100%);
  margin: 1.8rem auto 0;
  columns: 2;
  column-gap: 0.5rem;
}

.mosaic figure {
  margin: 0 0 0.5rem;
  break-inside: avoid;
}

.mosaic img,
.mosaic button.frame {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.mosaic img {
  height: auto;
}

.quiet,
.field {
  font: inherit;
  color: var(--ink);
}

.field {
  width: min(16rem, 80vw);
  margin: 1.6rem auto 0;
  display: block;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--serif);
  font-size: 1.7rem;
  letter-spacing: 0.14em;
  text-align: center;
  padding: 0.35rem 0 0.45rem;
}

.field::placeholder {
  color: var(--gold);
  letter-spacing: 0.04em;
}

.quiet {
  appearance: none;
  margin-top: 1.15rem;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  cursor: pointer;
}

.note,
.alert {
  margin: 1rem auto 0;
  max-width: 24rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.alert {
  color: var(--gold-deep);
}

.desk {
  width: min(40rem, 100%);
  margin: 0 auto;
}

.drop {
  margin: 1.4rem auto 0;
  max-width: 24rem;
  padding: 1.7rem 1.2rem 1.35rem;
  border-radius: 8rem;
  background: var(--paper-raised);
}

.drop.is-over {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.drop p {
  margin: 0;
  color: var(--muted);
}

.file-pick {
  position: relative;
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  cursor: pointer;
}

.file-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.new-album {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.4rem;
}

.album-panel {
  margin-top: 2rem;
}

.album-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.6rem);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.2rem, 1fr));
  gap: 0.5rem;
  margin-top: 1.3rem;
  text-align: left;
}

.thumbs figure {
  position: relative;
  margin: 0;
}

.thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: zoom-in;
}

.remove {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 50%;
  background: rgba(246, 243, 238, 0.9);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.danger {
  margin-top: 1.6rem;
}

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: none;
  max-height: none;
}

.lightbox::backdrop {
  background: rgba(58, 52, 47, 0.78);
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
}

@media (min-width: 800px) {
  .mosaic {
    columns: 3;
  }
}
