/* ============================================================
   Simon Pfeiffer Portfolio – main.css
   Alle visuellen Stile des Themes.

   Inhalt:
     1. CSS-Variablen (Schrift, Farben, Abstände)
     2. Basis-Reset
     3. Canvas
     4. HTML-Overlay (Texte über dem Canvas)
     5. Navigation
     6. Über-mich-Sektion
     7. Kontakt-Sektion
     8. Zoom-Hinweis
     9. Barrierefreiheit (Reduced Motion, Fokus-Styles)
    10. Druck-Styles
============================================================ */


/* ============================================================
   1. CSS-VARIABLEN – hier zentral anpassen
============================================================ */
:root {

  /* --- SCHRIFT ---
     Zum Tauschen: nur diesen Wert ändern.
     Passende Google-Fonts-URL in functions.php anpassen.
     Empfehlungen: 'Share Tech Mono' | 'Special Elite' | 'VT323'
  */
  --font-main: 'Courier Prime', 'Courier New', monospace;

  /* --- TEXTFARBEN (Overlay) --- */
  --color-text-primary:   rgba(255, 255, 255, 0.92);
  --color-text-secondary: rgba(255, 255, 255, 0.60);
  --color-text-muted:     rgba(255, 255, 255, 0.35);

  /* --- OVERLAY-HINTERGRUND --- */
  --color-overlay-bg:     rgba(0, 0, 0, 0.00); /* transparent – Hintergrund kommt vom Canvas */

  /* --- ABSTÄNDE --- */
  --space-xs:  6px;
  --space-sm:  12px;
  --space-md:  24px;
  --space-lg:  48px;

  /* --- ÜBERGÄNGE --- */
  --transition-fast:   0.2s ease;
  --transition-normal: 0.4s ease;
  --transition-slow:   0.7s ease;

  /* --- Z-EBENEN --- */
  --z-canvas:    0;
  --z-overlay:   10;
  --z-nav:       20;
  --z-modal:     30;
}


/* ============================================================
   2. BASIS-RESET
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;             /* Kein Scroll – Canvas-Zoom übernimmt die Navigation */
  background-color: #000814;   /* Wird per JS beim Zoomen geändert */
  font-family: var(--font-main);
  color: var(--color-text-primary);
  cursor: grab;
  transition: background-color 0.5s ease;
}

body.is-panning {
  cursor: grabbing;
}

/* Texte auf dem Overlay sollen markierbar sein */
#sp-overlay * {
  user-select: text;
  cursor: default;
}

/* Interaktive Elemente wieder auf auto */
#sp-overlay a,
#sp-overlay button {
  cursor: pointer;
}


/* ============================================================
   3. CANVAS – füllt den gesamten Viewport
============================================================ */
#sp-canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-canvas);
  /* Canvas soll kein Scrollen/Ziehen des Dokuments auslösen */
  touch-action: none;
}


/* ============================================================
   4. HTML-OVERLAY – über dem Canvas, Texte kopierbar
============================================================ */
#sp-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-overlay);
  pointer-events: none; /* Standard: Klicks gehen durch zum Canvas */
  background: var(--color-overlay-bg);
}

/* Klickbare Elemente im Overlay wieder aktivieren */
#sp-overlay a,
#sp-overlay button,
#sp-overlay input,
#sp-overlay .sp-clickable {
  pointer-events: auto;
}


/* ============================================================
   5. NAVIGATION
   Erscheint als schmale Leiste oben,
   blendet sich beim Zoomen ein/aus (per JS gesteuert).
============================================================ */
#sp-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

#sp-nav.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Logo-Bereich in der Navigation (kleines Logo oben links) */
.sp-nav__logo {
  font-family: var(--font-main);
  font-size: 13px;
  letter-spacing: 0.20em;
  color: var(--color-text-primary);
  text-decoration: none;
  text-transform: uppercase;
}

/* Navigations-Links */
.sp-nav__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.sp-nav__links a {
  font-family: var(--font-main);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--color-text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.sp-nav__links a:hover {
  color: var(--color-text-primary);
}


/* ============================================================
   6. ÜBER-MICH-SEKTION
   Erscheint als Textblock, wenn der Nutzer in diesen Bereich zoomt.
   Position und Sichtbarkeit werden per JS gesteuert.
============================================================ */
.sp-section {
  position: absolute;
  pointer-events: auto;
  opacity: 0;
  transition: opacity var(--transition-slow);
  max-width: 320px;
}

.sp-section.is-visible {
  opacity: 1;
}

.sp-section__label {
  font-family: var(--font-main);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.sp-section__title {
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.sp-section__text {
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.75;
  color: var(--color-text-secondary);
  /* Text ist kopierbar – kein user-select: none */
}

.sp-section__divider {
  width: 32px;
  height: 1px;
  background: var(--color-text-muted);
  margin: var(--space-sm) 0;
}


/* ============================================================
   7. KONTAKT-SEKTION
   E-Mail und Telefon sind markierbar und kopierbar.
   Kein Kontaktformular – nur Text.
============================================================ */
#sp-kontakt {
  /* Position wird per JS gesetzt (rechts unten im Canvas-Raum) */
}

.sp-kontakt__item {
  font-family: var(--font-main);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
  /* Kein Symbol vor der E-Mail/Telefon – gewünscht */
  user-select: text; /* Explizit kopierbar */
}

.sp-kontakt__item a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--color-text-muted);
  transition: border-color var(--transition-fast);
}

.sp-kontakt__item a:hover {
  border-color: var(--color-text-primary);
}


/* ============================================================
   8. ZOOM-HINWEIS (unten mittig)
   Blendet sich nach erstem Scrollen aus.
============================================================ */
#sp-zoom-hinweis {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-main);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1.4s ease;
}

#sp-zoom-hinweis.is-hidden {
  opacity: 0;
}

/* Zoom-Anzeige unten rechts */
#sp-zoom-anzeige {
  position: absolute;
  bottom: 28px;
  right: 32px;
  font-family: var(--font-main);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  pointer-events: none;
}


/* ============================================================
   9. BARRIEREFREIHEIT
============================================================ */

/* Reduced Motion: Animationen deaktivieren */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:   0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration:  0.01ms !important;
    scroll-behavior: auto !important;
  }

  body {
    transition: none !important;
  }

  #sp-zoom-hinweis {
    transition: none !important;
  }
}

/* Fokus-Styles – sichtbar für Tastaturnutzer */
:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Screenreader-Only Klasse */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   10. DRUCK-STYLES
   Bei Druck: Canvas ausblenden, Text lesbar machen.
============================================================ */
@media print {
  #sp-canvas  { display: none; }
  body        { background: white; color: black; overflow: auto; }
  #sp-overlay { position: static; }
}
