/* ==========================================================================
   KITSCH – Abschied
   Reines CSS, keine externen Ressourcen.
   ========================================================================== */

:root {
  /* Grundton: warmes, mattes Papier */
  --paper:        #f3eee5;
  --paper-light:  #f7f3ec;
  --paper-deep:   #e5ddcf;

  /* Schrift-Farben: warmes Schwarz statt kaltem #000 */
  --ink:          #24201d;
  --ink-soft:     #4a443f;
  --ink-muted:    #8c837a;

  /* Akzent, direkt aus dem Logo (Magenta) – nur als Nuance eingesetzt */
  --accent:       #e6007e;
  --accent-soft:  rgba(230, 0, 126, 0.42);
  --accent-haze:  rgba(230, 0, 126, 0.035);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           "Hoefler Text", Baskerville, Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
           "Helvetica Neue", Helvetica, Arial, sans-serif;

  --logo-size: clamp(7rem, 5rem + 4.5vw, 9.75rem);
  --side-pad:  clamp(1.5rem, 6vw, 4rem);
}

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

html {
  min-height: 100%;
  background-color: var(--paper);
  background-image:
    radial-gradient(60% 42% at 50% 34%, var(--accent-haze), rgba(230, 0, 126, 0) 100%),
    radial-gradient(130% 105% at 50% 36%, var(--paper-light) 0%, var(--paper) 42%, var(--paper-deep) 100%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  /* Gleiche Minima für beide Spacer: bei knapper Höhe fallen sie gemeinsam
     auf 2rem zurück, statt proportional zu wachsen und Scrollen zu erzwingen */
  grid-template-rows:
    minmax(2rem, 1fr)       /* Luft oben   */
    auto                    /* Komposition */
    minmax(2rem, 1.45fr)    /* mehr Luft unten -> Inhalt sitzt leicht über der Mitte */
    auto;                   /* Rechtliches */
  padding: 0 var(--side-pad);
  position: relative;
}

/* Feine, fast unsichtbare Papierstruktur (SVG-Rauschen, inline) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

::selection {
  background: rgba(230, 0, 126, 0.16);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Komposition
   -------------------------------------------------------------------------- */

.card {
  grid-row: 2;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  text-align: center;
}

.card__logo {
  display: block;
  width: var(--logo-size);
  height: auto;
  margin: 0 auto clamp(2rem, 2rem + 1.5vw, 3rem);
}

.card__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.625rem);
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: balance;
}

/* Einzelnes typografisches Detail in der Logofarbe: eine kurze Haarlinie */
.card__title::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 1px;
  margin: clamp(1.5rem, 1.25rem + 1vw, 2rem) auto;
  background: var(--accent-soft);
}

.card__text {
  font-size: clamp(1rem, 0.94rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.card__text p {
  margin: 0;
}

.card__text p + p {
  margin-top: 1.1em;
}

.card__closing {
  margin: clamp(2rem, 1.75rem + 1vw, 2.75rem) 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Rechtliches – unaufdringlich am unteren Rand
   -------------------------------------------------------------------------- */

.legal {
  grid-row: 4;
  position: relative;
  z-index: 1;
  padding: 1.5rem 0 clamp(1.25rem, 3.5vh, 2.25rem);
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.legal a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(140, 131, 122, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.legal a:hover,
.legal a:focus-visible {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.legal a:focus-visible {
  outline: 1px solid var(--accent-soft);
  outline-offset: 4px;
  border-radius: 1px;
}

.legal__dot {
  margin: 0 0.6em;
}

/* --------------------------------------------------------------------------
   Sanftes, einmaliges Einblenden beim ersten Laden
   -------------------------------------------------------------------------- */

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card {
  animation: reveal 1.1s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.legal {
  animation: reveal 1.1s cubic-bezier(0.2, 0.6, 0.2, 1) 0.35s both;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .legal {
    animation: none;
  }
  .legal a {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Anpassungen
   -------------------------------------------------------------------------- */

/* Flache Desktop-/Laptop-Fenster (z. B. 1366 × 768): etwas kompakter,
   damit die Komposition ohne Scrollen Platz findet */
@media (max-height: 860px) and (min-width: 600px) {
  :root {
    --logo-size: clamp(6.25rem, 4.25rem + 2.75vw, 7.5rem);
  }
  .card__logo {
    margin-bottom: clamp(1.5rem, 1.25rem + 0.75vw, 2rem);
  }
  .card__title {
    font-size: clamp(1.75rem, 1.25rem + 1.4vw, 2.375rem);
  }
  .card__title::after {
    margin: clamp(1.125rem, 0.875rem + 0.75vw, 1.5rem) auto;
  }
  .card__text {
    line-height: 1.62;
  }
  .card__closing {
    margin-top: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  }
  .legal {
    padding: 0.75rem 0 clamp(1rem, 2.5vh, 1.5rem);
  }
}

/* Geringe Fensterhöhe (z. B. Smartphone quer): kompakter, Scrollen bleibt möglich */
@media (max-height: 640px) {
  :root {
    --logo-size: clamp(6rem, 4.5rem + 3vw, 7.5rem);
  }
  body {
    grid-template-rows:
      minmax(1.5rem, 1fr)
      auto
      minmax(1.5rem, 1.2fr)
      auto;
  }
  .card__logo {
    margin-bottom: 1.75rem;
  }
}

/* Sehr schmale Displays */
@media (max-width: 360px) {
  .card__text {
    line-height: 1.65;
  }
}
