/*
  ANNA GREYHEM — base.css
  ========================
  Einmal definiert, gilt für alle Erlebnisse.
  Letzte Aktualisierung: 2026

  INHALTSVERZEICHNIS
  1. Fonts
  2. Farben & Variablen
  3. Reset & Grundlagen
  4. Typografie
  5. Layout
  6. Fließtext & Prosa
  7. Gedicht
  8. Fragment
  9. Titel
  10. Anweisungen (tap, hold)
  11. Entscheidungen
  12. Seitenreferenz (→ p.xx)
  13. Footer & Impressum
  14. Animationen
  15. Mobile
*/


/* ─────────────────────────────────────────
   1. FONTS
   ─────────────────────────────────────────
   Selbst gehostet — kein Google, kein Datenschutzproblem.
   font-display: swap = Browser zeigt zuerst Systemfont,
   tauscht dann aus sobald Cormorant geladen ist.
   Kaum sichtbar, aber Seite fühlt sich schnell an.
*/
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/CormorantGaramond-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/CormorantGaramond-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/CormorantGaramond-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/CormorantGaramond-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}


/* ─────────────────────────────────────────
   2. FARBEN & VARIABLEN
   ─────────────────────────────────────────
   Hier änderst du Farben — gilt dann überall.
*/
:root {
  /* Hintergründe */
  --bg:           #0a0a0a;   /* dein Schwarz — das tiefste das gut aussieht */

  /* Texte */
  --text:         rgba(255, 255, 255, 0.85);   /* gebrochenes Weiß — Haupttext */
  --text-muted:   rgba(255, 255, 255, 0.35);   /* für Anweisungen, Footer */
  --text-faint:   rgba(255, 255, 255, 0.18);   /* kaum sichtbar — z.B. Impressum */

  /* Figurenfarben — nur für Akzente, nie für langen Fließtext */
  --anna:         #9e6070;   /* Anna — Rosa, Glut */
  --alice:        #9e2438;   /* Alice — Dunkelrot, getrocknetes Blut */

  /* Stimmungsfarben — sparsam verwenden, je nach Erlebnis */
  --gelb:         #d4b483;   /* Kanarienvogel — Kerzenwachs */
  --silber:       #c8c8d4;   /* Mondlicht, Spiegel */
  --tiefsee:      #2a4a6b;   /* Alice im tiefen Wasser */
  --mondwasser:   #3d6b8a;   /* Wasseroberfläche bei Nacht */
}


/* ─────────────────────────────────────────
   2. RESET & GRUNDLAGEN
   ─────────────────────────────────────────
*/
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;  /* kein blaues Aufleuchten beim Tippen auf iOS */
  -webkit-text-size-adjust: 100%;            /* verhindert auto-zoom auf iOS */
  overflow-x: hidden;
}


/* ─────────────────────────────────────────
   3. TYPOGRAFIE
   ─────────────────────────────────────────
   Cormorant Garamond muss in jeder HTML-Datei
   selbst geladen werden (Google Fonts oder lokal).
   Empfehlung lokal:
   <link rel="stylesheet" href="/assets/css/base.css">
   + Fonts in /assets/fonts/
*/
body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 22px);  /* 20px Minimum auf Handy, max 22px */
  line-height: 1.9;
}


/* ─────────────────────────────────────────
   4. LAYOUT
   ─────────────────────────────────────────
   .page-wrap     — Standard-Container für Prosa & Gedichte
   .page-center   — zentriert vertikal & horizontal (für Fragmente, Titel)
*/
.page-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: clamp(64px, 10vh, 100px) clamp(28px, 8vw, 64px) clamp(100px, 14vh, 140px);
}

.page-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px clamp(28px, 8vw, 64px);
  text-align: center;
}


/* ─────────────────────────────────────────
   5. FLIESSTEXT & PROSA
   ─────────────────────────────────────────
   Für Kurzgeschichten. Linksbündig.
*/
.prose p {
  margin-bottom: 1.3em;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 22px);
  line-height: 1.9;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Kursiv = eine andere Stimme, eine andere Ebene */
/* Nie für Titel oder Fragmente verwenden */
.prose em,
em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
}


/* ─────────────────────────────────────────
   6. GEDICHT
   ─────────────────────────────────────────
   .poem          — Container
   .poem-line     — Hauptzeile, linksbündig
   .poem-ext      — Ergänzungszeile, eingerückt, leiser
                    (für Effekte wie in Everyday Erotics)
*/
.poem {
  list-style: none;
}

.poem li {
  margin-bottom: clamp(18px, 2.8vh, 30px);
}

.poem-line {
  display: block;
  font-weight: 400;
}

.poem-ext {
  display: block;
  padding-left: 1.4em;
  font-style: italic;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  min-height: 1.9em;
  transition: opacity 0.5s ease, color 0.5s ease;
}


/* ─────────────────────────────────────────
   7. FRAGMENT
   ─────────────────────────────────────────
   Ein Satz, allein auf einer Seite.
   Zentriert. Viel Luft. Kein Kursiv.
*/
.fragment {
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 22px);
  line-height: 1.9;
  text-align: center;
  max-width: 480px;
  color: var(--text);
}


/* ─────────────────────────────────────────
   8. TITEL
   ─────────────────────────────────────────
   Kein Kursiv, gleicher Stil wie Fließtext,
   nur etwas größer. Keine Unruhe.
*/
.story-title {
  font-weight: 400;
  font-style: normal;
  font-size: clamp(24px, 3.5vw, 30px);
  line-height: 1.5;
  margin-bottom: clamp(48px, 8vh, 80px);
  color: var(--text);
  letter-spacing: 0.01em;
}

/* Große Display-Titel (z.B. "DISSOLVING", "FADING") */
.display-title {
  font-weight: 400;
  font-style: normal;
  font-size: clamp(52px, 12vw, 110px);
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--text);
}


/* ─────────────────────────────────────────
   9. ANWEISUNGEN
   ─────────────────────────────────────────
   "tap", "hold", "keep holding"
   Fast unsichtbar. Ganz unten. Stört nicht.
*/
.instruction {
  position: fixed;
  bottom: clamp(32px, 6vh, 56px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.instruction.visible {
  opacity: 1;
}


/* ─────────────────────────────────────────
   10. ENTSCHEIDUNGEN
   ─────────────────────────────────────────
   Beide Optionen gleichwertig.
   Grau — gehören zur Geschichte, aber stehen
   leicht daneben. Wie Türen die sich öffnen könnten.
*/
.choices {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 56px;
}

.choice {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.3s ease;
  -webkit-appearance: none;
}

.choice:hover,
.choice:focus {
  color: var(--text);
  outline: none;
}

/* Anna vs Alice — Figurenfarben */
.choice-anna {
  font-size: 20px;
  font-style: italic;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.12em;
}

.choice-alice {
  font-size: 20px;
  font-style: italic;
  font-weight: 300;
  color: var(--alice);
  letter-spacing: 0.12em;
}


/* ─────────────────────────────────────────
   11. SEITENREFERENZ
   ─────────────────────────────────────────
   "→ p.121" — Teil der Geschichte,
   aber leise. Kursiv, fast unsichtbar.
*/
.page-ref {
  position: fixed;
  bottom: clamp(32px, 6vh, 56px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.page-ref.visible {
  opacity: 1;
}


/* ─────────────────────────────────────────
   12. FOOTER & IMPRESSUM
   ─────────────────────────────────────────
   Nur auf der Autorenwebsite, nicht in den
   QR-Erlebnissen. Kaum sichtbar.
*/
.site-footer {
  text-align: center;
  padding: 48px clamp(28px, 8vw, 64px);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--text-faint);
}

.site-footer a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--text-muted);
}


/* ─────────────────────────────────────────
   13. ANIMATIONEN
   ─────────────────────────────────────────
*/

/* Einblenden mit leichtem Aufsteigen — Standard für neue Seiten */
@keyframes fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Nur einblenden, ohne Bewegung — für Titel */
@keyframes fadeonly {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Cursor-Blinken für Typewriter-Effekte */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Hilfsklassen */
.fade-in {
  opacity: 0;
  animation: fadein 1.4s ease forwards;
}

.fade-in-slow {
  opacity: 0;
  animation: fadeonly 2.5s ease forwards;
}

/* Für tap-through Texte: unsichtbar bis .visible gesetzt wird */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ─────────────────────────────────────────
   14. MOBILE
   ─────────────────────────────────────────
   Alles oben ist bereits mobiloptimiert durch
   clamp(). Diese Regeln sind für feinere Anpassungen.
*/
@media (max-width: 600px) {
  .page-wrap {
    padding: 60px 24px 100px;
  }

  .page-center {
    padding: 60px 24px;
  }

  /* Etwas mehr Luft zwischen Gedichtzeilen auf kleinen Screens */
  .poem li {
    margin-bottom: 22px;
  }
}
