/* Hochzeit Birgit + Andreas.
   Farben und Schriften stammen von der gedruckten Einladung.
   Wer die Optik ändern will, ändert die Werte unter :root und sonst nichts. */

@font-face {
  font-family: "Patrick Hand";
  src: url("/static/fonts/patrickhand-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Patrick Hand";
  src: url("/static/fonts/patrickhand-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/static/fonts/nunitosans-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/static/fonts/nunitosans-latin-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113;
}

:root {
  color-scheme: light;

  --papier: #f2f2ef;
  --papier-warm: #eceae4;
  --papier-tief: #e2e1da;
  --tinte: #34322d;
  --tinte-leise: #6d6a61;
  --salbei: #7d8b5f;
  --salbei-tief: #5f6c45;
  --ocker: #c07e3c;
  --ocker-tief: #a2652c;
  --pink: #d2456f;
  --linie: rgba(52, 50, 45, 0.14);

  --rund: 12px;
  --rund-gross: 22px;
  --spalte: 34rem;
  --luft: clamp(1.25rem, 5vw, 2.5rem);
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--papier);
  /* Feines Korn, damit der Grund nach Papier aussieht und nicht nach Bildschirm. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23k)' opacity='0.045'/%3E%3C/svg%3E");
  color: var(--tinte);
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--salbei-tief);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--ocker-tief);
}

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

h1,
h2,
h3 {
  font-family: "Patrick Hand", "Segoe Print", "Bradley Hand", cursive;
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  letter-spacing: 0.01em;
}

/* ------------------------------------------------------------------ Gerüst */

.blatt {
  max-width: var(--spalte);
  margin: 0 auto;
  padding: var(--luft) clamp(1rem, 5vw, 1.75rem) 4rem;
}

.blatt--weit {
  max-width: 68rem;
}

.kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 5vw, 1.75rem);
  border-bottom: 1px solid var(--linie);
  background: rgba(242, 242, 239, 0.9);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.kopf__namen {
  font-family: "Patrick Hand", cursive;
  font-size: 1.35rem;
  color: var(--salbei-tief);
  text-decoration: none;
}

.kopf__wege {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.kopf__wege a {
  text-decoration: none;
  color: var(--tinte-leise);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.kopf__wege a[aria-current="page"] {
  color: var(--tinte);
  border-bottom-color: var(--ocker);
}

/* --------------------------------------------------------------- Startseite */

.einladung {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: clamp(2.5rem, 9vw, 4rem) clamp(1.1rem, 5vw, 2rem) 2.5rem;
  max-width: var(--spalte);
  margin: 0 auto;
}

.einladung__namen {
  font-size: clamp(2.9rem, 14vw, 4.6rem);
  color: var(--salbei);
  margin-bottom: 0.4rem;
}

.einladung__datum {
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--tinte-leise);
  margin: 0 0 2.4rem;
}

.einladung__satz {
  font-family: "Patrick Hand", cursive;
  font-size: clamp(1.6rem, 6.5vw, 2.1rem);
  color: var(--ocker);
  margin: 0 0 0.6rem;
}

.einladung__hinweis {
  color: var(--tinte-leise);
  margin: 0 auto 2rem;
  max-width: 24rem;
}

.einladung__wege {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
  font-size: 1rem;
}

.bluete {
  position: absolute;
  width: clamp(90px, 26vw, 150px);
  opacity: 0.92;
  pointer-events: none;
  z-index: -1;
}

.bluete--oben-links {
  top: -2.5%;
  left: -14%;
  transform: rotate(-12deg);
}

.bluete--oben-rechts {
  top: 3%;
  right: -22%;
  width: clamp(70px, 19vw, 110px);
  transform: rotate(18deg);
}

.bluete--unten-links {
  bottom: 2%;
  left: -16%;
  width: clamp(80px, 22vw, 125px);
  transform: rotate(9deg);
}

.bluete--unten-rechts {
  bottom: -3%;
  right: -12%;
  transform: rotate(-7deg);
}

/* ------------------------------------------------------------------ Knöpfe */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 999px;
  background: var(--ocker);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 1.15rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.knopf:hover {
  background: var(--ocker-tief);
  color: #fff;
}

.knopf:active {
  background: var(--ocker-tief);
  transform: translateY(1px);
}

.knopf--gross {
  width: 100%;
  max-width: 21rem;
  margin: 0 auto;
  font-size: 1.25rem;
  min-height: 4rem;
}

.knopf--leise {
  background: transparent;
  color: var(--tinte);
  border: 1.5px solid var(--linie);
  font-weight: 400;
  font-size: 1rem;
  min-height: 3rem;
}

.knopf--leise:hover {
  background: var(--papier-warm);
  color: var(--tinte);
}

.knopf[disabled] {
  opacity: 0.55;
  cursor: default;
}

/* ------------------------------------------------------------------ Upload */

.upload {
  margin-top: 1.5rem;
}

.upload__name {
  display: block;
  max-width: 21rem;
  margin: 0 auto 1rem;
  text-align: left;
}

.upload__name span {
  display: block;
  font-size: 0.9rem;
  color: var(--tinte-leise);
  margin-bottom: 0.3rem;
}

.feld {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--linie);
  border-radius: var(--rund);
  background: rgba(255, 255, 255, 0.6);
  font: inherit;
  color: var(--tinte);
}

.feld:focus {
  border-color: var(--salbei);
  outline: none;
  box-shadow: 0 0 0 3px rgba(125, 139, 95, 0.25);
}

.liste {
  list-style: none;
  margin: 1.5rem auto 0;
  padding: 0;
  max-width: 24rem;
  text-align: left;
}

.liste li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--linie);
  font-size: 0.95rem;
}

.liste li:last-child {
  border-bottom: none;
}

.balken {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--papier-tief);
  overflow: hidden;
}

.balken__fuellung {
  display: block;
  height: 100%;
  width: 0;
  background: var(--salbei);
  transition: width 0.2s ease;
}

.zustand {
  font-size: 0.85rem;
  color: var(--tinte-leise);
  white-space: nowrap;
}

.zustand--fertig {
  color: var(--salbei-tief);
}

.zustand--fehler {
  color: var(--pink);
}

.dateiname {
  flex: 0 1 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tinte-leise);
}

/* ----------------------------------------------------------------- Galerie */

.raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.kachel {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: var(--rund);
  overflow: hidden;
  background: var(--papier-tief);
}

.kachel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kachel--wartet {
  display: grid;
  place-items: center;
  color: var(--tinte-leise);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.5rem;
}

.kachel__marke {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(20, 19, 17, 0.55);
  color: #fff;
  font-size: 0.78rem;
}

.kachel__stern {
  position: absolute;
  left: 0.45rem;
  top: 0.45rem;
  color: var(--ocker);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.streifen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 2.5rem;
}

.streifen .kachel {
  border-radius: 10px;
}

/* -------------------------------------------------------------- Einzelbild */

.bild {
  margin-top: 1rem;
  text-align: center;
}

.bild img,
.bild video {
  width: 100%;
  max-height: 76dvh;
  object-fit: contain;
  border-radius: var(--rund);
  background: var(--papier-warm);
  margin-inline: auto;
}

.bild__zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.herz {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.5rem 1.1rem;
  border: 1.5px solid var(--linie);
  border-radius: 999px;
  background: transparent;
  color: var(--tinte);
  font: inherit;
  cursor: pointer;
}

.herz svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--pink);
  stroke-width: 1.8;
}

.herz[aria-pressed="true"] svg {
  fill: var(--pink);
}

.herz[aria-pressed="true"] {
  border-color: rgba(210, 69, 111, 0.45);
}

.blaettern {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ------------------------------------------------------------------- Texte */

.titel {
  font-size: clamp(2rem, 8vw, 2.6rem);
  color: var(--ocker);
  text-align: center;
  margin-bottom: 1.5rem;
}

.unterzeile {
  text-align: center;
  color: var(--tinte-leise);
  font-size: 0.95rem;
  margin-top: -0.75rem;
  margin-bottom: 2rem;
}

.absatz {
  white-space: pre-line;
  text-align: center;
  max-width: 30rem;
  margin: 0 auto 2rem;
}

.unterschrift {
  font-family: "Patrick Hand", cursive;
  font-size: 2rem;
  color: var(--salbei);
  text-align: center;
  margin-top: 3rem;
}

.trenner {
  display: block;
  width: 44px;
  margin: 2.5rem auto;
  opacity: 0.75;
}

.hinweis {
  padding: 0.85rem 1rem;
  border-radius: var(--rund);
  background: var(--papier-warm);
  border: 1px solid var(--linie);
  font-size: 0.95rem;
}

.hinweis--fehler {
  border-color: rgba(210, 69, 111, 0.4);
  background: rgba(210, 69, 111, 0.08);
  color: #8d2a48;
}

.leer {
  text-align: center;
  color: var(--tinte-leise);
  padding: 3rem 1rem;
}

/* --------------------------------------------------------------- Diashow */

.diashow {
  margin: 0;
  background: #16150f;
  min-height: 100dvh;
  overflow: hidden;
}

.diashow__buehne {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

.diashow__bild {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.diashow__bild.sichtbar {
  opacity: 1;
}

.diashow__name {
  position: fixed;
  left: 50%;
  bottom: 2.4rem;
  transform: translateX(-50%);
  margin: 0;
  max-width: 80vw;
  padding: 0.35rem 1.6rem;
  border-radius: 999px;
  background: rgba(16, 15, 11, 0.55);
  color: #fff;
  font-family: "Patrick Hand", cursive;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.diashow__name:empty {
  opacity: 0;
}

.diashow__warten {
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 2rem;
  font-family: "Patrick Hand", cursive;
  font-size: 1.6rem;
}

/* ----------------------------------------------------------------- Admin */

.admin__block {
  border-top: 1px solid var(--linie);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
}

.admin__block h2 {
  font-size: 1.6rem;
  color: var(--salbei-tief);
  margin-bottom: 0.75rem;
}

.admin__zahlen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  color: var(--tinte-leise);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.admin__zahlen b {
  color: var(--tinte);
  font-weight: 600;
}

.admin__raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}

.admin__eintrag {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin__werkzeuge {
  display: flex;
  gap: 0.35rem;
}

.admin__werkzeuge button {
  flex: 1;
  min-height: 2.4rem;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: var(--papier-warm);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--tinte);
}

.admin__werkzeuge button:hover {
  background: var(--papier-tief);
}

.admin__formular {
  display: grid;
  gap: 0.9rem;
  max-width: 32rem;
}

.admin__formular label {
  display: block;
}

.admin__formular label > span {
  display: block;
  font-size: 0.9rem;
  color: var(--tinte-leise);
  margin-bottom: 0.25rem;
}

.admin__schalter {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
}

.admin__schalter input {
  width: 22px;
  height: 22px;
  accent-color: var(--salbei);
}

textarea.feld {
  min-height: 6rem;
  resize: vertical;
  line-height: 1.5;
}

.mono {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
