/* ---------- Tokens (from Figma) ---------- */
:root {
  --bg: #fffefb;
  --text: #308167;
  --font-size: 21px;
  --names-width: 80.7vw;   /* 1162 / 1440 on desktop */
  --content-width: 700px;   /* max text width */
  --side: 50px;   /* side padding on tablets; desktop is limited by --content-width anyway */
}

/* Font: ABC Otto Regular.
   Currently only the TRIAL version is installed locally – it may not be published on the web.
   Once you have a web licence: put the .woff2 file in assets/fonts/ and enable the src url() below. */
@font-face {
  font-family: "Otto";
  src: local("ABC Otto Regular"), local("ABCOtto-Regular"), local("ABCOtto-Regular-Trial");
       /* , url("assets/fonts/ABCOtto-Regular.woff2") format("woff2") */
  font-weight: 400;
  font-display: swap;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Otto", Georgia, "Times New Roman", serif;
  font-size: var(--font-size);
  line-height: 1;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}
p { margin: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Names in the background (sticky) ---------- */
.names {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
}
.names img {
  display: block;
  width: var(--names-width);
  height: auto;
  /* 95% on the first screen, fading to 80% by the second (set by the script in the page) */
  opacity: var(--names-opacity, 0.95);
}

/* ---------- Content ---------- */
/* Three screens: hero → invitation → Hinweise.
   <main> is the scroller and exactly as tall as the visible screen, so on phones
   the address bar doesn't collapse and every screen fills the view exactly.
   Free scrolling, but it always settles on a full screen. */
main {
  position: relative;
  z-index: 1;
  padding: 0 var(--side);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: none;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  /* Names show first, then the text fades in */
  animation: fade-in 2.5s ease-in-out 1.5s both;
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  main { animation: none; scroll-behavior: auto; }
}
.screen {
  min-height: 100%;
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 140px;   /* room for the link at the bottom; same at the top keeps the block centred */
  scroll-snap-align: start;
  scroll-snap-stop: always;   /* one screen per swipe, never skips one */
}
.hero { padding-block: 0; }
.block {
  max-width: var(--content-width);
  margin: 0 auto;
}
/* Text pinned to the bottom of a screen, e.g. "Zusammen macht's mehr Spaß! ( RSVP )" */
.next {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 50px;
}
.gap { margin-top: 2em; }

/* ---------- Bracket links: ( RSVP ), ( HINWEISE ), ( RSVP HERE ) ----------
   All caps, no underline; on hover the brackets move outwards. */
.link {
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
}
.link .br {
  display: inline-block;
  transition: transform 0.35s ease;
}
.link:hover .br:first-child,
.link:focus-visible .br:first-child { transform: translateX(-0.35em); }
.link:hover .br:last-child,
.link:focus-visible .br:last-child { transform: translateX(0.35em); }
.link:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .link .br { transition: none; }
}

/* ---------- Hinweise (notes at the bottom) ---------- */
.notes h3 {
  margin: 2em 0 0;
  font-size: inherit;
  font-weight: inherit;
  text-transform: uppercase;
}
.notes h3:first-child { margin-top: 0; }
/* Katie's mail + phone: clickable, no underline */
.notes a { color: inherit; text-decoration: none; }
.notes a:hover { opacity: 0.7; }

/* ---------- Mobile: names turned 90° ---------- */
@media (max-width: 700px) {
  :root { --font-size: 16px; --side: 20px; }
  /* Text column 80% of the screen width */
  .block,
  .next {
    max-width: 80vw;
    margin-inline: auto;
  }
  .names img {
    /* After rotating, the long side runs top to bottom: ~80% of the screen height */
    width: 80vh;
    width: 80svh;
    max-width: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
  }
}
