/* ============================================================
   Micha — Hofsänger
   Memorialdruck-Ästhetik: warm, gehaltvoll, editorial.
   ============================================================ */

:root {
  /* --- Farbpalette: warmes Pergament, dunkle Tinte, sparsamer Rost --- */
  --bg:           #f1ebde;
  --bg-warm:      #ede5d2;
  --bg-card:      #f7f1e3;
  --bg-deep:      #e6dcc6;
  --ink:          #2a221b;
  --ink-mid:      #594c40;
  --ink-soft:     #8a7c6f;
  --ink-veil:     #b6a896;
  --rule:         #d2c5b0;
  --rule-soft:    #e0d6c1;
  --accent:       #7a5a39;
  --accent-rust:  #b35238;

  /* --- Typografie --- */
  --display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body:    "Spectral", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --hand:    "Caveat", "Snell Roundhand", "Apple Chancery", "Bradley Hand", cursive;

  /* --- Maße --- */
  --col-text:    36rem;
  --col-narrow:  30rem;
  --col-wide:    62rem;

  /* --- Bewegung --- */
  --ease:    cubic-bezier(.2,.7,.3,1);
}

/* ============================================================
   Reset / Basis
   ============================================================ */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 220ms var(--ease), color 220ms var(--ease);
}
a:hover { text-decoration-color: var(--accent); }

/* ============================================================
   Atmosphäre: Pergament, Vignette, feines Korn
   ============================================================ */

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Vignette + warme Lichtflächen */
body::before {
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(122,90,57,0.08), transparent 55%),
    radial-gradient(110% 80% at -10% 110%, rgba(89,76,64,0.10), transparent 60%),
    radial-gradient(60% 60% at 50% 100%, rgba(0,0,0,0.04), transparent 70%);
}

/* feines, statisches "Pergament-Korn" via SVG-Noise als data-uri */
body::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.13  0 0 0 0 0.10  0 0 0 0.10 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  opacity: 0.55;
  mix-blend-mode: multiply;
}

main, footer, header { position: relative; z-index: 1; }

/* ============================================================
   Paper-Mark (Druckereistempel oben)
   ============================================================ */

.paper-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.6rem 1.5rem 0;
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.paper-mark__rule {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 1px;
  background: var(--ink-veil);
}
.paper-mark__detail {
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: none;
  font-family: var(--display);
  font-size: 0.85rem;
  color: var(--ink-mid);
}

/* ============================================================
   Section-Layout
   ============================================================ */

main > section {
  padding: 5.5rem 1.5rem;
  position: relative;
}
@media (min-width: 48rem) {
  main > section { padding: 7rem 2.5rem; }
}

/* dezente Trennornamente zwischen Sektionen */
main > section + section::before {
  content: "❦";
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 0.85rem;
  color: var(--ink-veil);
  font-size: 1.05rem;
  line-height: 1;
}
main > section + section {
  border-top: 1px solid var(--rule-soft);
}

/* ============================================================
   Section-Titel (mit kleiner römischer Numerierung)
   ============================================================ */

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 0 2.5rem;
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.005em;
}
.section-title__num {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.78em;
  color: var(--accent);
  font-feature-settings: "smcp";
}
.section-title__text { font-style: italic; }

.section-title::after {
  display: none;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: var(--col-wide);
  margin: 0 auto;
  padding-top: 2.5rem !important;
  padding-bottom: 6rem !important;
  text-align: center;
}

@media (min-width: 52rem) {
  .hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 4rem;
    text-align: left;
    padding-top: 4rem !important;
    padding-bottom: 8rem !important;
  }
}

.hero__sketch {
  margin: 0 auto;
  width: 18rem;
  max-width: 78vw;
  aspect-ratio: 360 / 460;
  position: relative;
  animation: fade-up 1200ms var(--ease) both;
}

/* zarte "Pergament-Plakette" hinter der Skizze */
.hero__sketch::before {
  content: "";
  position: absolute;
  inset: -1.5rem;
  background:
    radial-gradient(70% 70% at 50% 50%, rgba(247,241,227,0.7), transparent 70%);
  z-index: -1;
}
.hero__sketch object,
.hero__sketch img { width: 100%; height: 100%; }

@media (min-width: 52rem) {
  .hero__sketch { width: 100%; max-width: 26rem; justify-self: end; }
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (min-width: 52rem) {
  .hero__text { align-items: flex-start; }
}

.hero__eyebrow {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  animation: fade-up 900ms var(--ease) 250ms both;
}
.hero__eyebrow::before,
.hero__eyebrow::after {
  content: "·";
  margin: 0 0.7em;
  color: var(--ink-veil);
}

.hero__greeting {
  margin: 0 0 1.6rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.6rem, 7.5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.018em;
  color: var(--ink);
  animation: fade-up 1000ms var(--ease) 400ms both;
}
.hero__greeting span { display: block; }
.hero__greeting span:nth-child(2) { padding-left: clamp(0px, 4vw, 2.5rem); }

.hero__name {
  margin: 0 0 0.6rem;
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-mid);
  animation: fade-up 900ms var(--ease) 600ms both;
}

.hero__dates {
  margin: 0 0 2rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  animation: fade-up 900ms var(--ease) 750ms both;
}
.hero__dates time { font-feature-settings: "lnum"; }
.hero__dash { margin: 0 0.45em; color: var(--ink-veil); }

.hero__hint {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-veil);
  animation: fade-up 900ms var(--ease) 1100ms both;
}
.hero__hint svg { animation: hint-bob 2800ms var(--ease) 2200ms infinite; }

@keyframes hint-bob {
  0%, 70%, 100% { transform: translateY(0); }
  35%           { transform: translateY(3px); }
}

/* ============================================================
   ÜBER MICHA
   ============================================================ */

.about__inner {
  max-width: var(--col-wide);
  margin: 0 auto;
}

.about__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 56rem) {
  .about__layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 4.5rem;
  }
}

.about__body {
  max-width: var(--col-text);
  margin: 0 auto;
}
@media (min-width: 56rem) {
  .about__body { margin: 0; }
}

.about__body p {
  margin: 0 0 1.4rem;
  font-size: 1.075rem;
  line-height: 1.78;
  color: var(--ink);
}
.about__body p:last-child { margin-bottom: 0; }
.about__body strong { font-weight: 500; }
.about__body em { font-style: italic; color: var(--ink); }

/* Drop Cap im Lead-Absatz – klassisch editorial */
.about__lead {
  position: relative;
}
.dropcap {
  float: left;
  font-family: var(--display);
  font-style: normal;
  font-weight: 500;
  font-size: 4.6rem;
  line-height: 0.9;
  margin: 0.25rem 0.7rem 0 -0.05em;
  color: var(--accent);
  letter-spacing: -0.04em;
}

/* Marginalien rechts */
.about__margin {
  display: grid;
  gap: 1.4rem;
  position: relative;
  padding: 0 0 0 1.4rem;
  border-left: 1px solid var(--rule);
}
@media (min-width: 56rem) {
  .about__margin {
    margin-top: 0.4rem;
  }
}

.margin-note {
  display: grid;
  gap: 0.2rem;
  font-size: 0.92rem;
  line-height: 1.45;
}
.margin-note__label {
  font-family: var(--body);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.margin-note__value {
  font-family: var(--display);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-mid);
}

/* ============================================================
   EPIGRAPH (zentrales Zitat)
   ============================================================ */

.epigraph {
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(247,241,227,0.6), transparent 80%);
}
.epigraph__inner {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.epigraph__quote-mark {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(5rem, 12vw, 8rem);
  line-height: 0.6;
  color: var(--accent);
  opacity: 0.6;
  margin-bottom: 0.5rem;
}
.epigraph__quote {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
  color: var(--ink);
}
.epigraph__source {
  margin: 0;
  font-family: var(--body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ============================================================
   ERINNERUNGEN ANSEHEN
   ============================================================ */

.memories__intro {
  max-width: 36rem;
  margin: -0.75rem auto 2.5rem;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-mid);
  line-height: 1.55;
}

.gallery {
  max-width: var(--col-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (min-width: 36rem) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
  }
}
@media (min-width: 60rem) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.gallery__item {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.gallery__item figcaption {
  margin: 0.7rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.5;
  text-align: center;
}

/* Bild-Frames (Polaroid-artig, sehr leicht) */
.gallery__frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-deep);
  border-radius: 1px;
  position: relative;
  box-shadow: 0 1px 0 rgba(42,34,27,0.06);
}
/* Portrait-Variante hat denselben aspect-ratio fürs Grid – Unterschied
   wird durch echtes Bild später erzeugt, nicht durch leeren Frame */
.gallery__frame--portrait { aspect-ratio: 4 / 3; }

.gallery__item--placeholder .gallery__frame {
  background:
    repeating-linear-gradient(
      48deg,
      transparent 0,
      transparent 11px,
      rgba(122,90,57,0.07) 11px,
      rgba(122,90,57,0.07) 12px
    ),
    radial-gradient(140% 100% at 50% 50%, var(--bg-card), var(--bg-deep));
  border: 1px solid var(--rule-soft);
}

/* Sketch-Tiles: Tinten-Stillleben auf Pergament-Bg */
.gallery__item--sketch .gallery__frame {
  background: radial-gradient(140% 100% at 50% 50%, var(--bg-card), var(--bg-deep));
  border: 1px solid var(--rule-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
}
.gallery__item--sketch .gallery__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Text-Tiles (Zitate ohne Bild) */
.gallery__item--text .gallery__quote {
  margin: 0;
  padding: 1.6rem 1.4rem;
  background:
    linear-gradient(180deg, var(--bg-card), var(--bg-deep));
  border: 1px solid var(--rule-soft);
  border-radius: 1px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  white-space: pre-line;
}
.gallery__item--text .gallery__quote::before {
  content: "";
  position: absolute;
  top: 0.7rem;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.7rem;
  border: 1px solid var(--rule-soft);
  pointer-events: none;
  border-radius: 1px;
}

.gallery__item--hand .gallery__quote--hand {
  font-family: var(--hand);
  font-style: normal;
  font-size: 1.65rem;
  line-height: 1.25;
  letter-spacing: 0.005em;
  color: var(--ink);
}

/* ============================================================
   ERINNERUNG TEILEN
   ============================================================ */

.share__inner {
  max-width: 36rem;
  margin: 0 auto;
}
.share__lead {
  margin: 0 0 2rem;
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--ink);
}

.share__cta {
  margin: 2.5rem 0 2rem !important;
  text-align: center;
}

.button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.1rem 2.2rem 1.05rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: background-color 240ms var(--ease), color 240ms var(--ease), transform 240ms var(--ease);
  position: relative;
}
.button__label {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 240ms var(--ease);
}
.button__address {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--ink);
  transition: color 240ms var(--ease);
}
.button:hover,
.button:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  outline: none;
  transform: translateY(-1px);
}
.button:hover .button__label,
.button:focus-visible .button__label,
.button:hover .button__address,
.button:focus-visible .button__address {
  color: var(--bg);
}

.share__note {
  margin: 0 0 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-mid);
  font-style: italic;
}

.share__quote {
  margin: 4rem auto 0 !important;
  text-align: center;
  font-family: var(--hand);
  font-style: normal;
  font-size: 1.85rem;
  line-height: 1.3;
  color: var(--accent);
  max-width: 28rem;
}

/* === Upload-Form === */

.share__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2.25rem 0 1.5rem;
}

.share__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.share__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.share__field-label {
  font-family: var(--body);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.share__field-label em {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  font-weight: 400;
  margin-left: 0.4rem;
}

.share__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 36rem) {
  .share__row { grid-template-columns: 1fr 1fr; }
}

.share__field input[type="text"],
.share__field input[type="email"],
.share__field input[type="file"],
.share__field textarea {
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 1px;
  color: var(--ink);
  transition: border-color 200ms var(--ease);
}
.share__field input[type="text"]:focus,
.share__field input[type="email"]:focus,
.share__field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.share__field textarea {
  resize: vertical;
  min-height: 5.5rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
}
.share__field input[type="file"] {
  font-family: var(--body);
  font-size: 0.9rem;
  cursor: pointer;
}

.share__check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-mid);
  font-style: italic;
  font-family: var(--display);
}
.share__check input[type="checkbox"] {
  margin-top: 0.3rem;
  accent-color: var(--accent);
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
}

.share__form button.button {
  cursor: pointer;
  font-family: var(--display);
}

/* Galerie-Tile fuer veroeffentlichte Erinnerungen */
.gallery__item--memory .gallery__frame--photo {
  background: var(--bg-card);
  border: 1px solid var(--rule-soft);
  padding: 0;
  overflow: hidden;
}
.gallery__item--memory img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   IN BUNTEN FARBEN
   ============================================================ */

.colors {
  padding: 5rem 1.5rem !important;
  text-align: center;
}
.colors__inner {
  max-width: 28rem;
  margin: 0 auto;
}
.colors__bar {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin: 0 auto 1.6rem;
}
.colors__bar span {
  display: block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: var(--c, var(--accent));
  opacity: 0.85;
  box-shadow: 0 1px 0 rgba(42,34,27,0.08);
}
.colors__text {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--ink-mid);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--rule-soft);
  padding: 3.5rem 1.5rem 4rem;
  background:
    linear-gradient(180deg, transparent, rgba(230,220,198,0.4));
}
.site-footer__inner {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.65;
}
.site-footer__main { margin: 0 0 0.5rem; }
.site-footer a {
  color: var(--ink-mid);
  text-decoration-color: var(--rule);
}
.site-footer a:hover {
  color: var(--ink);
  text-decoration-color: var(--accent);
}
.site-footer__legal { margin: 0.6rem 0 1.2rem; }
.site-footer__sign {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--ink-veil);
  text-transform: uppercase;
}

/* ============================================================
   Animationen
   ============================================================ */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Selektion
   ============================================================ */

::selection { background: var(--accent); color: var(--bg-card); }
