/*
 * Fogstep -- die Startseite
 *
 * Eigene Datei, nicht style.css: Die Rechtstexte und die Verwaltung haengen
 * an style.css, und die Startseite soll sich aendern duerfen, ohne dass
 * dort etwas verrutscht. Gemeinsam sind Farben, Schrift und der Fuss.
 *
 * Die Gestaltung hat genau eine laute Stelle: die Nebelkarte oben. Alles
 * darunter ist ruhig -- dunkler Grund wie auf den uebrigen Seiten, eine
 * Schriftfamilie in zwei Breiten, keine Kaesten, keine Einblendungen beim
 * Scrollen.
 *
 * Schrift: Barlow und Barlow Semi Condensed, lokal eingebunden (kein
 * Abruf bei Google -- die Datenschutzerklaerung verspricht keine externen
 * Schriften). Die schmale Fassung erinnert an die Strassenschilder, auf
 * die man beim Gehen schaut.
 */

@font-face {
  font-family: 'Barlow';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/assets/fonts/barlow-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url('/assets/fonts/barlow-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('/assets/fonts/barlow-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/barlow-semi-condensed-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/barlow-semi-condensed-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/barlow-semi-condensed-700.woff2') format('woff2');
}

:root {
  /* Aus der App: dunkler Grund, Kuestennebel, Karte "positron". */
  --grund: #101a1d;
  --grund-hell: #172529;
  --linie: #26393f;
  --text: #e8f0f2;
  --text-leise: #9fb3ba;
  --nebel: #4fb3bf;
  --nebel-tief: #0c2529;
  --karte: #edf0ee;
  --gold: #e0a63c;

  --breit: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --text-schrift: 'Barlow', system-ui, sans-serif;

  --spalte: 36rem;
  --seite: 76rem;
  --rand: clamp(1.25rem, 4vw, 3rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--text-schrift);
  font-size: 1.125rem;
  line-height: 1.6;
}

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

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

h1,
h2,
h3 {
  font-family: var(--breit);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.leise {
  color: var(--text-leise);
}

/* --- Kopf ------------------------------------------------------------ */

.kopf {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.1rem var(--rand);
  color: var(--nebel-tief);
  pointer-events: none;
}

.kopf > * {
  pointer-events: auto;
}

.kopf img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.kopf .wortmarke {
  font-family: var(--breit);
  font-weight: 700;
  font-size: 1.45rem;
  color: inherit;
  text-decoration: none;
}

.kopf nav {
  margin-left: auto;
  display: flex;
  gap: 1.4rem;
  font-weight: 500;
  font-size: 1rem;
}

.kopf nav a {
  color: inherit;
  text-decoration: none;
}

.kopf nav a:hover {
  text-decoration: underline;
}

@media (max-width: 34rem) {
  .kopf nav a.nur-breit {
    display: none;
  }
}

/* --- Aufmacher: die Nebelkarte --------------------------------------- */

.aufmacher {
  position: relative;
  min-height: max(40rem, 100svh);
  background: #9ccdd2;
  color: var(--nebel-tief);
  overflow: hidden;
  isolation: isolate;
}

#nebelkarte {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: pan-y;
  z-index: 0;
}

.aufmacher-text {
  position: absolute;
  z-index: 2;
  left: var(--rand);
  bottom: clamp(3rem, 12vh, 7rem);
  max-width: min(34rem, 46vw);
  pointer-events: none;
}

.aufmacher-text > * {
  pointer-events: auto;
}

.aufmacher h1 {
  font-weight: 700;
  font-size: clamp(3rem, 7.2vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
  /* Liegt auf Nebel; wo jemand darunter wischt, haelt der Hof den Text lesbar. */
  text-shadow:
    0 0 18px rgba(156, 205, 210, 0.9),
    0 0 2px rgba(156, 205, 210, 0.9);
}

.aufmacher .vorspann {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  max-width: 30rem;
  text-shadow: 0 0 10px rgba(156, 205, 210, 0.95);
}

.handeln {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.8rem;
}

.knopf {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: var(--nebel-tief);
  color: #fff;
  font-family: var(--breit);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.knopf:hover {
  transform: translateY(-1px);
}

.knopf:active {
  transform: translateY(1px);
}

.aufmacher .nebenlink {
  color: var(--nebel-tief);
  font-weight: 500;
}

.aufmacher .kleingedrucktes {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

/* Die Tafel unten rechts: wie das Feld unter der Karte in der App. */
.tafel {
  position: absolute;
  z-index: 2;
  right: var(--rand);
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  width: 15.5rem;
  padding: 0.9rem 1.1rem 0.8rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #16292d;
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: 0 8px 30px rgba(12, 37, 41, 0.18);
}

.tafel .ort {
  font-family: var(--breit);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.tafel dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 1rem;
  margin: 0;
}

.tafel dt {
  color: #4d6166;
}

.tafel dd {
  margin: 0;
  font-family: var(--breit);
  font-weight: 600;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.tafel .hinweis {
  margin: 0.6rem 0 0;
  color: #0e6c78;
  font-weight: 500;
}

.tafel .quelle {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  color: #5b6e73;
}

.tafel .quelle a {
  color: inherit;
}

/* Maus als Vorgabe; nur wer sicher einen Finger benutzt, liest "wisch". */
.hinweis-finger {
  display: none;
}

@media (pointer: coarse) {
  .hinweis-maus {
    display: none;
  }

  .hinweis-finger {
    display: inline;
  }
}

/* Schmal: oben die Karte, darunter Text und Tafel im Fluss. Uebereinander
   gelegt deckte der Text genau den Weg zu, um den es geht. */
@media (max-width: 760px) {
  .aufmacher {
    min-height: 0;
    padding: max(20rem, 54svh) var(--rand) 1.5rem;
  }

  .aufmacher-text {
    position: relative;
    left: auto;
    bottom: auto;
    max-width: none;
  }

  .tafel {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    margin-top: 2rem;
  }

  .tafel dl {
    grid-template-columns: auto auto auto auto;
    justify-content: start;
  }
}

/* --- Abschnitte ------------------------------------------------------ */

.abschnitt {
  max-width: var(--seite);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) var(--rand) 0;
}

.abschnitt > h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  max-width: 16ch;
  margin-bottom: 1.5rem;
}

.abschnitt > .einleitung {
  max-width: var(--spalte);
  font-size: 1.2rem;
  color: var(--text-leise);
}

/* So geht's: eine echte Reihenfolge, deshalb Nummern. */
.schritte {
  list-style: none;
  counter-reset: schritt;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 2.5rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.schritte li {
  counter-increment: schritt;
  border-top: 2px solid var(--nebel);
  padding-top: 1.1rem;
}

.schritte li::before {
  content: counter(schritt);
  display: block;
  font-family: var(--breit);
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--nebel);
  margin-bottom: 0.6rem;
}

.schritte h3 {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}

.schritte p {
  color: var(--text-leise);
  margin: 0;
}

/* Zwei Spalten: Text links, Anschauung rechts. */
.zweispaltig {
  display: grid;
  gap: 3rem;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .zweispaltig {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 5rem;
  }
}

.zweispaltig h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  margin-bottom: 1.5rem;
}

.zweispaltig .text {
  max-width: var(--spalte);
}

/* --- Nur neue Wege: das kleine Beispiel ------------------------------ */

.beispiel {
  margin: 0;
}

.beispiel svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.beispiel .steuerung {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.beispiel button {
  font: inherit;
  font-family: var(--breit);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--nebel);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.beispiel button:hover {
  background: rgba(79, 179, 191, 0.14);
}

.beispiel button:disabled {
  opacity: 0.45;
  cursor: default;
}

.beispiel figcaption {
  margin-top: 0.9rem;
  min-height: 3.2em;
  color: var(--text-leise);
}

.beispiel figcaption strong {
  font-family: var(--breit);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
}

/* --- Fundorte -------------------------------------------------------- */

.seltenheit {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
}

.seltenheit li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.seltenheit li::before {
  content: '';
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--farbe);
  box-shadow: 0 0 0 2px #fff;
}

.gedenken {
  margin-top: 2rem;
  padding-left: 1.2rem;
  border-left: 3px solid #b08968;
  color: var(--text-leise);
}

.gedenken strong {
  color: var(--text);
  font-weight: 500;
}

.nebenbei {
  display: grid;
  gap: 2rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: 3.5rem;
}

.nebenbei h3 {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}

.nebenbei p {
  color: var(--text-leise);
}

/* --- Daten ----------------------------------------------------------- */

.daten {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.75rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.daten li {
  padding-left: 1.1rem;
  border-left: 2px solid var(--linie);
}

.daten strong {
  display: block;
  font-family: var(--breit);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.15;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.daten span {
  color: var(--text-leise);
}

/* --- Fragen ---------------------------------------------------------- */

.fragen {
  max-width: 48rem;
  margin-top: 2rem;
  border-top: 1px solid var(--linie);
}

.fragen details {
  border-bottom: 1px solid var(--linie);
}

.fragen summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-family: var(--breit);
  font-weight: 600;
  font-size: 1.35rem;
}

.fragen summary::-webkit-details-marker {
  display: none;
}

.fragen summary::after {
  content: '+';
  color: var(--nebel);
  font-weight: 500;
  transition: transform 0.2s ease;
}

.fragen details[open] summary::after {
  transform: rotate(45deg);
}

.fragen details p {
  margin: 0 0 1.3rem;
  max-width: 40rem;
  color: var(--text-leise);
}

/* --- Schluss --------------------------------------------------------- */

.schluss {
  max-width: var(--seite);
  margin: clamp(5rem, 11vw, 9rem) auto 0;
  padding: 0 var(--rand);
}

.schluss-innen {
  border-radius: 28px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background: var(--nebel);
  color: var(--nebel-tief);
}

.schluss h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  max-width: 20ch;
  margin-bottom: 1.25rem;
}

.schluss p {
  max-width: 30rem;
  font-size: 1.15rem;
}

/* --- Fuss ------------------------------------------------------------ */

.fuss {
  max-width: var(--seite);
  margin: 0 auto;
  padding: 3rem var(--rand) 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  color: var(--text-leise);
  font-size: 0.95rem;
}

.fuss .rechts {
  margin-left: auto;
}

@media (max-width: 34rem) {
  .fuss .rechts {
    margin-left: 0;
    width: 100%;
  }
}
