/*
 * Base layer: element defaults, page atmosphere, layout frame and the
 * page-load reveal. Mobile-first; wider screens are enhanced via min-width.
 */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-page);
  /* Warm white with a faint mint glow from above and a peach blush at the
     lower edge, plus a whisper of paper grain. */
  background-image:
    radial-gradient(60rem 28rem at 50% -6rem, rgb(184 216 200 / 28%), transparent 70%),
    radial-gradient(40rem 24rem at 100% 100%, rgb(243 214 196 / 30%), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .18 0 0 0 0 .28 0 0 0 0 .25 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

a {
  color: var(--color-accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--color-accent-strong);
  text-decoration-thickness: 2px;
}

button,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Script typography: names, date and headings only. */
.script {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

/* Keyboard users can jump past the header band. */
.skip-link {
  position: absolute;
  top: var(--space-s);
  left: var(--space-s);
  z-index: 10;
  padding: var(--space-s) var(--space-m);
  background: var(--color-card);
  color: var(--color-accent);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Main content column below the band. */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-l) var(--gutter) var(--space-xl);
}

.page:focus {
  outline: none;
}

.page-title {
  font-size: var(--font-size-page-title);
  color: var(--color-accent);
}

.lead {
  margin-top: var(--space-s);
  /*max-width: 50rem;*/
  text-wrap: balance;
  font-size: var(--font-size-lead);
}

.site-footer {
  padding: var(--space-l) var(--gutter) var(--space-xl);
  text-align: center;
}

/* Privacy (and imprint, when present) below the signature. */
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 var(--space-m);
  margin-top: var(--space-s);
  font-size: var(--font-size-small);
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  color: var(--color-text-muted);
}

.site-footer__links a[aria-current="page"] {
  color: var(--color-text);
  text-decoration: none;
}

.site-footer__signature {
  font-size: 1.75rem;
  color: var(--color-accent);
}

/* A small mint sprig between content and footer signature. */
.site-footer__signature::before {
  content: "";
  display: block;
  width: 4rem;
  height: 1px;
  margin: 0 auto var(--space-m);
  background: linear-gradient(90deg, transparent, var(--color-mint-deep), transparent);
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
  }

  .page {
    padding-top: var(--space-xl);
  }
}

/*
 * Page-load reveal: elements rise gently into place, one after another.
 * Only when the visitor has not asked for reduced motion; otherwise every
 * element simply shows up in its final state.
 */
@media (prefers-reduced-motion: no-preference) {
  /* In-page jumps (skip link, schedule days) glide instead of cutting. */
  html {
    scroll-behavior: smooth;
  }

  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(var(--reveal-distance));
    }
  }

  .reveal,
  .reveal-stagger > * {
    animation: rise-in var(--reveal-duration) var(--ease-soft) both;
  }

  /* The band reveals first: names, date, place. Then the page content. */
  .band__names { animation-delay: calc(var(--reveal-step) * 1); }
  .band__date { animation-delay: calc(var(--reveal-step) * 2); }
  .band__place { animation-delay: calc(var(--reveal-step) * 3); }
  .page .reveal { animation-delay: calc(var(--reveal-step) * 4); }
  .reveal-stagger > :nth-child(1) { animation-delay: calc(var(--reveal-step) * 5); }
  .reveal-stagger > :nth-child(2) { animation-delay: calc(var(--reveal-step) * 6); }
  .reveal-stagger > :nth-child(3) { animation-delay: calc(var(--reveal-step) * 7); }
  .reveal-stagger > :nth-child(4) { animation-delay: calc(var(--reveal-step) * 8); }
  .reveal-stagger > :nth-child(n + 5) { animation-delay: calc(var(--reveal-step) * 9); }
}

/* Text for screen readers only (for example the "Wo:" label next to a pin icon). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
