/* =========================================================================
   Bewerbungs-Funnel — Designsprache HANSEBLATT
   -------------------------------------------------------------------------
   Abgeleitet aus der hauseigenen Speisekarte des Hansecafé: einer echten
   Zeitung. Papierweiss statt Reinweiss, Haarlinien statt Kaesten, schwere
   schmale Schlagzeile, ein einziger Akzent in Hanse-Rot.

   Die Farbwerte sind gemessen, nicht geraten: Das Rot stammt aus den roten
   Frueh-Sonnenschirmen vor dem Haus (#D63134 in der Sonne, #9F1E1D im
   Schatten) — daraus der Mittelwert.

   Alle Marken-Werte stehen als Variablen ganz oben. Eine zweite Marke braucht
   nur diesen Block, sonst nichts.
   ========================================================================= */

/* ---------------------------------------------------------------- Schriften
   Selbst gehostet, kein Google-Aufruf aus dem Browser (DSGVO). */
@font-face {
  font-family: 'Anton';
  src: url('fonts/anton-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('fonts/lato-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('fonts/lato-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('fonts/lato-latin-900-normal.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}

:root {
  --papier:      #F5F2ED;   /* Zeitungspapier */
  --flaeche:     #FFFFFF;   /* Karten */
  --tinte:       #171613;   /* Druckschwarz */
  --gedaempft:   #6E6A62;
  --linie:       #D9D4CB;   /* Haarlinie */
  --linie-stark: #BDB6AA;
  --rot:         #B4272A;   /* Hanse-Rot */
  --rot-dunkel:  #8E1E21;
  --rot-hauch:   #FBF1F0;
  --gesperrt:    #E5E0D7;
  --gesperrt-txt:#9A948A;

  --radius:      3px;       /* fast scharfe Kanten */
  --spalte:      33rem;     /* Lesebreite */
  --kopf:        4.5rem;    /* Hoehe der Kopfleiste */

  --schrift-titel: 'Anton', 'Haettenschweiler', 'Arial Narrow', sans-serif;
  --schrift-text:  'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ------------------------------------------------------------ Grundgeruest */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift-text);
  font-size: 1rem;
  line-height: 1.55;
  /* Kein waagerechtes Rutschen auf schmalen Geraeten. */
  overflow-x: hidden;
}

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

button { font: inherit; color: inherit; }

/* Sichtbarer Fokus — Tastatur und Screenreader duerfen nicht raten. */
:focus-visible {
  outline: 2px solid var(--rot);
  outline-offset: 2px;
}

.nur-fuer-screenreader {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- Kopfleiste
   Fest oben, Papierfarbe, darunter die Fortschrittsleiste. Auf der
   Einstiegsseite ist sie ausgeblendet — dort traegt das Foto die Flaeche. */
.kopf {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  background: var(--papier);
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--linie);
}
.kopf[hidden] { display: none; }

.kopf-innen {
  height: var(--kopf);
  max-width: var(--spalte);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.kopf-logo { height: 2.1rem; width: auto; }

.zurueck {
  position: absolute;
  left: 0.5rem; top: 50%;
  transform: translateY(-50%);
  width: 2.75rem; height: 2.75rem;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
  color: var(--tinte);
  border-radius: var(--radius);
}
.zurueck:hover { background: rgba(0,0,0,.05); }
.zurueck[hidden] { display: none; }

/* Fortschritt: Zeitungs-Haarlinie, die sich rot fuellt. */
.fortschritt {
  display: flex;
  gap: 3px;
  max-width: var(--spalte);
  margin: 0 auto;
  padding: 0 1.25rem 0.7rem;
}
.fortschritt span {
  flex: 1;
  height: 3px;
  background: var(--linie);
  border-radius: 2px;
  transition: background .25s ease;
}
.fortschritt span.voll { background: var(--rot); }

/* ------------------------------------------------------------ Seitenrahmen */
.buehne {
  min-height: 100svh;          /* svh, nicht vh — sonst rutscht der Knopf auf
                                  dem iPhone unter die Adressleiste */
  display: flex;
  flex-direction: column;
}

.schritt {
  display: none;
  flex-direction: column;
  min-height: 100svh;
  padding: calc(var(--kopf) + env(safe-area-inset-top) + 2rem) 1.25rem
           calc(2.5rem + env(safe-area-inset-bottom));
}
.schritt.aktiv { display: flex; }

.inhalt {
  width: 100%;
  max-width: var(--spalte);
  margin: 0 auto;
  /* Frage mittig, Antworten linksbuendig — genau wie im Perspective-Funnel,
     an dem sich Patrick orientiert sehen will. Auf der Einstiegsseite und im
     Formular bleibt es linksbuendig (siehe unten). */
  text-align: center;
  /* Bewusst OHNE fill-mode `both`: Sonst haelt der Startzustand (opacity 0)
     die Seite leer, wenn die Animation aus irgendeinem Grund nicht anlaeuft.
     Genau so verschwand schon einmal eine komplette Seite. Ohne fill-mode
     gilt im Zweifel der normale, sichtbare Zustand. */
  animation: auftauchen .3s ease;
}

/* Bewusst OHNE opacity: Eine Einblendung ueber die Deckkraft macht den Inhalt
   fuer den Bruchteil einer Sekunde unsichtbar — und wenn irgendetwas die
   Animation aufhaelt, dauerhaft. Eine reine Bewegung kann das nicht. */
@keyframes auftauchen {
  from { transform: translateY(10px); }
  to   { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .inhalt { animation: none; }
  .fortschritt span { transition: none; }
}

/* ---------------------------------------------------------------- Typografie */
.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rot);
  margin: 0 0 .6rem;
}

h1, h2 {
  font-family: var(--schrift-titel);
  font-weight: 400;
  letter-spacing: .005em;
  line-height: 1.06;
  margin: 0;
  /* Anton laeuft optisch etwas hoch — leicht nach unten ruecken. */
  padding-top: .05em;
}

h1 { font-size: clamp(2rem, 8.5vw, 2.6rem); }
h2 { font-size: clamp(1.75rem, 7.2vw, 2.2rem); }

.unterzeile {
  margin: .85rem 0 0;
  color: var(--gedaempft);
  font-size: 1rem;
}

.hinweis {
  margin: .55rem 0 0;
  color: var(--gedaempft);
  font-size: .9rem;
}

/* -------------------------------------------------------------- Antwortkarten */
.karten { margin-top: 1.7rem; display: flex; flex-direction: column; gap: .7rem; }

.karte {
  display: flex;
  align-items: center;
  gap: .9rem;
  width: 100%;
  text-align: left;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  min-height: 3.5rem;           /* Daumenziel, nicht Mauszeigerziel */
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.karte:hover { border-color: var(--linie-stark); }
.karte:active { background: #FCFAF7; }

.karte-text { flex: 1; min-width: 0; }
.karte-titel { font-weight: 700; }
.karte-sub {
  display: block;
  margin-top: .2rem;
  font-size: .9rem;
  color: var(--gedaempft);
  line-height: 1.45;
}

/* Pfeil nur bei Einfachauswahl — er verspricht „es geht sofort weiter". */
.karte-pfeil { color: var(--rot); flex: none; }

/* Kaestchen bei Mehrfachauswahl. Bewusst eckig wie ein Zeitungsformular. */
.karte-box {
  flex: none;
  width: 1.35rem; height: 1.35rem;
  border: 1.5px solid var(--linie-stark);
  border-radius: 2px;
  background: var(--flaeche);
  position: relative;
  transition: border-color .15s ease, background .15s ease;
}
.karte.gewaehlt { border-color: var(--rot); background: var(--rot-hauch); }
.karte.gewaehlt .karte-box { border-color: var(--rot); background: var(--rot); }
.karte.gewaehlt .karte-box::after {
  content: '';
  position: absolute; left: .38rem; top: .16rem;
  width: .3rem; height: .62rem;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ------------------------------------------------------------------ Knoepfe */
.knopf {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: var(--rot);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .01em;
  padding: 1rem 1.25rem;
  min-height: 3.25rem;
  cursor: pointer;
  transition: background .15s ease;
}
.knopf:hover { background: var(--rot-dunkel); }

/* Gesperrt MUSS man sehen. Ein Knopf, der aussieht wie ein Knopf und nichts
   tut, ist der teuerste Absprung ueberhaupt. */
.knopf[disabled] {
  background: var(--gesperrt);
  color: var(--gesperrt-txt);
  cursor: not-allowed;
}
.knopf[disabled]:hover { background: var(--gesperrt); }

.knopf-fuss {
  margin: .6rem 0 0;
  text-align: center;
  font-size: .85rem;
  color: var(--gedaempft);
  min-height: 1.2em;            /* Platz reservieren, damit nichts springt */
}

.weiter-bereich { margin-top: 1.5rem; }

/* ------------------------------------------------------------- Einstiegsseite */
#schritt-start {
  padding: 0;
  position: relative;
  background: #100F0D;
  overflow: hidden;
}

.hero-bild {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* Der Schriftzug am Haus sitzt im oberen Drittel — dorthin schauen. */
  object-position: 50% 42%;
}

/* Zwei Verlaeufe: oben genug Tiefe fuer das weisse Logo, unten genug fuer
   Schlagzeile und Knopf. In der Mitte bleibt das Foto sichtbar. */
.hero-schleier {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.62) 0%, rgba(0,0,0,.20) 22%, rgba(0,0,0,0) 40%),
    linear-gradient(to top,    rgba(0,0,0,.88) 0%, rgba(0,0,0,.70) 26%, rgba(0,0,0,.15) 55%, rgba(0,0,0,0) 72%);
}

.hero-innen {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: calc(1.75rem + env(safe-area-inset-top)) 1.25rem
           calc(2.25rem + env(safe-area-inset-bottom));
}

.hero-logo {
  height: 2.6rem;
  width: auto;
  margin: 0 auto;                /* mittig, wie ein Zeitungskopf */
  flex: none;
}

.hero-text {
  margin-top: auto;              /* schiebt den Block nach unten */
  max-width: var(--spalte);
  width: 100%;
  margin-left: auto; margin-right: auto;
  color: #fff;
}
.hero-text h1 { color: #fff; }
.hero-text .eyebrow { color: #F2B8B6; }
.hero-text .unterzeile { color: rgba(255,255,255,.88); max-width: 30rem; }

.hero-knopf { margin-top: 1.6rem; }

.hero-fuss {
  margin: 1.1rem auto 0;
  max-width: var(--spalte);
  width: 100%;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.62);
}
.hero-fuss a { color: rgba(255,255,255,.82); }

/* --------------------------------------------------------- „Das erwartet dich" */
.bild-block {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--linie);
  margin-bottom: 1.4rem;
}

.liste {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--linie);
}
.liste li {
  padding: .95rem 0;
  border-bottom: 1px solid var(--linie);
  font-size: .98rem;
}

/* ------------------------------------------------------------------ Formular */
.feld { margin-top: 1.1rem; }

.feld > label {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.feld .freiwillig { font-weight: 400; color: var(--gedaempft); }

.feld input,
.feld textarea {
  width: 100%;
  font: inherit;
  color: var(--tinte);
  background: var(--flaeche);
  border: 1px solid var(--linie-stark);
  border-radius: var(--radius);
  padding: .8rem .9rem;
  min-height: 3rem;
}
.feld textarea { min-height: 6rem; resize: vertical; }

.feld input:focus, .feld textarea:focus {
  border-color: var(--rot);
  outline: none;
  box-shadow: 0 0 0 3px rgba(180,39,42,.12);
}

.feld-fehler {
  display: none;
  margin-top: .35rem;
  font-size: .85rem;
  color: var(--rot);
}
.feld.fehlt input,
.feld.fehlt textarea { border-color: var(--rot); }
.feld.fehlt .feld-fehler { display: block; }

/* Einwilligungen. Grosszuegiges Klickziel: das ganze Label ist antippbar. */
.check {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-top: 1.2rem;
  cursor: pointer;
  font-size: .92rem;
  line-height: 1.5;
}
.check input {
  flex: none;
  width: 1.4rem; height: 1.4rem;
  margin: .08rem 0 0;
  accent-color: var(--rot);
}
.check a { color: var(--tinte); }

.check-fehler {
  display: none;
  margin: .3rem 0 0 2.15rem;
  font-size: .85rem;
  color: var(--rot);
}
.check.fehlt + .check-fehler { display: block; }
.check.fehlt input { outline: 2px solid var(--rot); outline-offset: 2px; }
.check.fehlt span { color: var(--rot); }

.sendefehler {
  display: none;
  margin-top: 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--rot);
  border-radius: var(--radius);
  background: var(--rot-hauch);
  color: var(--rot-dunkel);
  font-size: .92rem;
}
.sendefehler.sichtbar { display: block; }

/* --------------------------------------------------------------- Danke-Seite */
.danke-bild {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--linie);
  margin: 1.6rem 0 0;
}

.kontaktliste {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  border-top: 1px solid var(--linie);
}
.kontaktliste li { border-bottom: 1px solid var(--linie); }
.kontaktliste a {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .95rem .1rem;
  color: var(--tinte);
  text-decoration: none;
}
.kontaktliste a:hover { color: var(--rot); }
.kontaktliste svg { color: var(--rot); flex: none; }

.rechtszeile {
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--linie);
  font-size: .82rem;
  color: var(--gedaempft);
  text-align: center;
}
.rechtszeile a { color: var(--gedaempft); }

/* Ab Tablet etwas mehr Ruhe, aber dieselbe Spaltenbreite — der Funnel ist und
   bleibt eine Handy-Strecke. */
@media (min-width: 40rem) {
  .schritt { padding-top: calc(var(--kopf) + 3.5rem); }
  .hero-logo { height: 3rem; }
}

/* ------------------------------------------------- Ausrichtung im Detail
   Die Frage steht mittig, alles Antippbare und alles Lesbare linksbuendig.
   Zentrierter Fliesstext ueber mehrere Zeilen liest sich schlecht — deshalb
   gilt die Mitte nur fuer Eyebrow, Ueberschrift und den kurzen Hinweis. */
.karte,
.liste,
.feld,
.check,
.check-fehler,
.sendefehler,
.kontaktliste { text-align: left; }

#schritt-kontakt .inhalt { text-align: left; }
#schritt-kontakt .eyebrow,
#schritt-kontakt h2 { text-align: center; }

#schritt-danke .inhalt { text-align: center; }
#schritt-danke .unterzeile { max-width: 28rem; margin-left: auto; margin-right: auto; }

#schritt-erwartet .inhalt { text-align: left; }
#schritt-erwartet .eyebrow,
#schritt-erwartet h2 { text-align: center; }

.hero-text { text-align: left; }
