/* Melja v7 — v5-Struktur, v4-Motor. Papier statt Nacht, aber der Tag läuft mit. */

:root {
  --papier:   #FBF8F3;
  --sand:     #F5EFE6;
  --sand-tief:#E8DFD0;
  --linie:    #E4D9C7;
  --tinte:    #2B2620;
  --weich:    #6B635A;
  --ozean:    #2C6E8F;
  --bernstein:#E8A33D;
  --gefahr:   #A83F3B;
  --gefahr-hell:#F6E7E5;
  --moos:     #4A6B50;

  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Outfit', system-ui, sans-serif;
  --mono:  ui-monospace, 'SF Mono', Menlo, monospace;
  --ease:  cubic-bezier(.2, .7, .3, 1);
  --luft:  clamp(4rem, 10vh, 7rem);
  --t: 0; /* Reise durch den Tag: 0 = Morgen, 1 = Abend */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0; color: var(--tinte);
  /* Der Tag wird wärmer, je weiter man scrollst. */
  background: color-mix(in oklab, var(--papier), #F6E9D2, calc(var(--t) * 100%));
  font: 300 1.0625rem/1.7 var(--sans); -webkit-font-smoothing: antialiased;
  transition: background-color .3s linear;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.015em; }
p, ul, ol, figure, dl { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
time { font-family: var(--mono); font-size: .8125rem; }

:focus-visible { outline: 2px solid var(--ozean); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: .5rem; top: .5rem; padding: .6rem 1rem; background: var(--tinte); color: var(--papier); }

.shell { width: 100%; max-width: 68rem; margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }

/* — Kopf — */
.kopf { display: flex; align-items: center; gap: 2rem; padding-block: 1.5rem; }
.wort { font: 400 1.375rem/1 var(--serif); text-decoration: none; }
.kopf__nav { display: flex; gap: 1.5rem; margin-right: auto; }
.kopf__nav a { font-size: .9375rem; text-decoration: none; color: var(--weich); transition: color .2s; }
.kopf__nav a:hover { color: var(--tinte); }
@media (max-width: 40rem) { .kopf__nav { display: none; } }

/* — Knöpfe — */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .9rem 1.6rem; border: 1px solid transparent; border-radius: 999px;
  font: 500 .9375rem/1 var(--sans); text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--klein { padding: .55rem 1.1rem; border-color: var(--tinte); font-size: .875rem; }
.btn--klein:hover { background: var(--tinte); color: var(--papier); }
.btn--voll { background: var(--tinte); color: var(--papier); }
.btn--voll:hover { background: var(--ozean); }
.btn--glas { color: var(--tinte); border-color: rgba(43, 38, 32, .3); background: rgba(251, 248, 243, .5); }
.btn--glas:hover { border-color: var(--tinte); }

/* — Bausteine — */
.auge {
  font: 500 .6875rem/1 var(--sans); text-transform: uppercase; letter-spacing: .2em;
  color: var(--weich); margin-bottom: 1.5rem;
}
.gross { font-size: clamp(1.9rem, 5vw, 3.4rem); line-height: 1.08; }
.gross--eng { max-width: 14ch; }
.lede { margin-top: 1.5rem; max-width: 44ch; color: var(--weich); }
.lede--dunkel { color: #4A423A; max-width: 50ch; }
.tasten { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 2.5rem; }
.klein { margin-top: 1.5rem; font: 400 .8125rem/1.6 var(--mono); color: var(--weich); }
.klein--dunkel a { text-decoration: underline; }

.block { padding-block: var(--luft); border-top: 1px solid var(--linie); }

/* — Hero: der Anker über dem vollen Bild. Zeile für Zeile steigt er auf. — */
.heldbild { position: relative; display: grid; align-items: end; min-height: min(88vh, 46rem); }
.bildplatz {
  position: absolute; inset: 0; overflow: hidden;
  background: url(hero.webp) right center / cover no-repeat, var(--sand);
  border-bottom: 1px solid var(--linie);
}
.bildplatz::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(247,241,232,.92) 0%, rgba(247,241,232,.75) 38%, rgba(247,241,232,0) 62%);
  animation: none;
}
.heldbild__text { position: relative; padding-block: clamp(4rem, 12vh, 7rem); }
.held__titel {
  font-size: clamp(2.2rem, 5vw, 4.5rem); line-height: 1.02; letter-spacing: -.03em;
  max-width: none;
}
.held__titel .zeile { display: block; overflow: hidden; padding: .06em 0 .1em; margin-bottom: -.1em; }
.held__titel .zeile > span { display: inline-block; animation: steigt .9s var(--ease) both; }
.held__titel .zeile:nth-child(2) > span { animation-delay: .09s; }
.held__titel .zeile:nth-child(3) > span { animation-delay: .18s; }
.wechsel { display: inline-block; font-style: italic; color: var(--ozean); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.wechsel.raus { opacity: 0; transform: translateY(-.1em) rotate(-2deg); }
.heldbild__lede { margin-top: 2rem; max-width: 34ch; font-size: clamp(1.125rem, 2.4vw, 1.375rem); color: #4A423A; }
.heldbild .auge, .heldbild__lede, .heldbild .tasten { animation: steigt .9s var(--ease) both; }
.heldbild__lede { animation-delay: .3s; }
.heldbild .tasten { animation-delay: .4s; }
@keyframes steigt { from { opacity: 0; transform: translateY(20px); } }

@media (max-width: 48rem) {
  .heldbild { display: flex; flex-direction: column-reverse; min-height: 0; }
  .bildplatz { position: relative; inset: auto; width: 100%; aspect-ratio: 4 / 3;
               background-image: url(hero-mobil.webp); background-position: center 70%; }
  .bildplatz::after { display: none; }
  .heldbild__text { width: 100%; padding-block: 2.5rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bildplatz::after, .heldbild .auge, .held__titel .zeile > span, .heldbild__lede, .heldbild .tasten { animation: none; }
  body { transition: none; }
  .btn, .wechsel { transition: none; }
  .einblenden { opacity: 1 !important; transform: none !important; }
}
