/* Jan Paul Roth – virtuelle Visitenkarte
   Material Design 3 (dunkles Schema, Tonflächen, State Layers, Ripple)
   Farbwelt angelehnt an halfspeedneon.com */

@font-face { font-family: 'Inter Tight'; font-weight: 600; font-display: swap; src: url('fonts/inter-tight-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-weight: 800; font-display: swap; src: url('fonts/inter-tight-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url('fonts/instrument-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url('fonts/instrument-sans-latin-600-normal.woff2') format('woff2'); }

:root {
  /* Flächen (M3: surface, surface-container …) */
  --bg: #0b0b0c;
  --surface: #141416;
  --surface-hi: #1c1c1f;
  --surface-top: #242428;
  --outline: #2c2c31;
  --outline-hi: #3d3d44;

  /* Text */
  --on-surface: #f2efe9;
  --on-surface-soft: #d3cfc6;
  --on-surface-muted: #9d998f;

  /* Akzente */
  --primary: #ff2bd6;
  --on-primary: #1a0015;
  --primary-container: color-mix(in oklab, var(--primary) 22%, #141416);
  --on-primary-container: color-mix(in oklab, var(--primary) 40%, #ffffff);
  --cyan: #00f0ff;
  --lime: #b6ff00;

  /* Form & Bewegung (M3 shape + motion tokens) */
  --r-xs: 8px;
  --r-m: 16px;
  --r-l: 28px;
  --r-full: 999px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1);

  --display: 'Inter Tight', 'Instrument Sans', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--on-surface);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  padding: 32px 16px 24px;
}

/* leichter Neon-Schimmer im Hintergrund */
body::before {
  content: '';
  position: fixed;
  inset: -20% -10% auto;
  height: 70vh;
  background:
    radial-gradient(40% 50% at 25% 30%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%),
    radial-gradient(35% 45% at 80% 20%, color-mix(in srgb, var(--cyan) 12%, transparent), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: var(--r-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Karte (M3 elevated card) ---------- */
.karte {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 12px 40px -8px rgb(0 0 0 / 0.6), 0 0 0 1px rgb(255 255 255 / 0.02) inset;
  animation: rein 600ms var(--ease-out) both;
}
@keyframes rein { from { opacity: 0; transform: translateY(16px) scale(0.98); } }

.kopf {
  position: relative;
  padding: 28px 24px 24px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 14%, transparent), transparent 75%),
    var(--surface);
}

.avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-top);
  color: var(--on-surface);
  font-family: var(--display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.03em;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary), 0 0 28px color-mix(in srgb, var(--primary) 55%, transparent);
  margin-bottom: 20px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--on-surface-muted);
}
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 10vw, 44px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
h1 .neon { color: var(--primary); text-shadow: 0 0 18px color-mix(in srgb, var(--primary) 45%, transparent); }

.rolle { margin: 12px 0 0; font-size: 17px; color: var(--on-surface-soft); }
.ort { margin: 6px 0 0; font-size: 14px; color: var(--on-surface-muted); display: flex; align-items: center; gap: 6px; }
.ort svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Buttons (M3 filled / tonal / outlined) ---------- */
.aktionen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 24px 24px; }
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: var(--r-full);
  border: 0;
  font: 600 15px/1 var(--body);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 200ms var(--ease), transform 200ms var(--ease);
}
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn::after { /* State Layer */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: currentColor; opacity: 0;
  transition: opacity 150ms var(--ease);
}
.btn:hover::after { opacity: 0.08; }
.btn:active::after { opacity: 0.12; }
.btn:active { transform: scale(0.98); }

.btn-filled { grid-column: 1 / -1; background: var(--primary); color: var(--on-primary); box-shadow: 0 0 24px -4px color-mix(in srgb, var(--primary) 60%, transparent); }
.btn-filled:hover { box-shadow: 0 0 32px -2px color-mix(in srgb, var(--primary) 75%, transparent); }
.btn-tonal { background: var(--surface-top); color: var(--on-surface); }
.btn-outlined { background: transparent; color: var(--on-surface); border: 1px solid var(--outline-hi); }

.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
  background: currentColor; opacity: 0.18;
  transform: scale(0);
  animation: ripple 550ms var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- Abschnitte ---------- */
.abschnitt { border-top: 1px solid var(--outline); padding: 16px 0 8px; }
.abschnitt h2 {
  margin: 0 24px 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--on-surface-muted);
}

/* M3 list items */
.liste { list-style: none; margin: 0; padding: 0; }
.eintrag {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; gap: 16px;
  min-height: 64px;
  padding: 8px 16px 8px 24px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.eintrag::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--on-surface); opacity: 0; transition: opacity 150ms var(--ease); }
a.eintrag:hover::after, button.eintrag:hover::after { opacity: 0.06; }
.eintrag .icon {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.eintrag .icon svg { width: 20px; height: 20px; fill: currentColor; }
.eintrag .text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.eintrag .label { font-size: 12px; color: var(--on-surface-muted); letter-spacing: 0.02em; }
.eintrag .wert { font-size: 16px; color: var(--on-surface); overflow-wrap: anywhere; }
.eintrag .ende { color: var(--on-surface-muted); width: 20px; height: 20px; fill: currentColor; flex: none; }

/* Icon-Button zum Kopieren */
.kopieren {
  position: relative; overflow: hidden; isolation: isolate;
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--on-surface-muted);
  cursor: pointer;
}
.kopieren svg { width: 20px; height: 20px; fill: currentColor; }
.kopieren::after { content: ''; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0; transition: opacity 150ms var(--ease); }
.kopieren:hover::after { opacity: 0.1; }

/* M3 assist chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 24px 16px; margin: 0; list-style: none; }
.chip {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px 0 12px;
  border-radius: var(--r-xs);
  border: 1px solid var(--outline-hi);
  font-size: 14px; font-weight: 600;
  text-decoration: none; color: var(--on-surface-soft);
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--chip, var(--primary)); box-shadow: 0 0 8px var(--chip, var(--primary)); }
.chip::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--on-surface); opacity: 0; transition: opacity 150ms var(--ease); }
.chip:hover { color: var(--on-surface); border-color: var(--chip, var(--primary)); }
.chip:hover::after { opacity: 0.06; }

/* QR-Bereich */
.qr-wrap { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px; padding: 8px 24px 20px; }
.qr { width: 112px; height: 112px; padding: 10px; background: #f2efe9; border-radius: var(--r-m); }
.qr img { width: 100%; height: 100%; display: block; }
.qr-text p { margin: 0 0 12px; font-size: 14px; color: var(--on-surface-soft); }
.qr-text .btn { height: 40px; padding: 0 16px; font-size: 14px; }

/* Fuß */
.fuss {
  display: flex; justify-content: center; gap: 20px;
  margin-top: 20px;
  font-size: 13px; color: var(--on-surface-muted);
}
.fuss a { text-decoration: none; }
.fuss a:hover { color: var(--on-surface); text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 3px; }

/* M3 Snackbar */
.snackbar {
  position: fixed; left: 50%; bottom: 24px;
  transform: translate(-50%, 24px);
  min-width: 240px; max-width: calc(100vw - 32px);
  padding: 14px 20px;
  border-radius: var(--r-xs);
  background: var(--on-surface); color: var(--bg);
  font-size: 14px; font-weight: 600;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 200ms var(--ease), transform 300ms var(--ease-out);
}
.snackbar.an { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Textseiten (Impressum, Datenschutz) ---------- */
.textseite { max-width: 640px; }
.textseite .kopf { padding-bottom: 8px; }
.textseite .inhalt { padding: 8px 24px 28px; color: var(--on-surface-soft); }
.textseite h1 { font-size: 34px; }
.textseite h2 { font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--on-surface); margin: 28px 0 8px; letter-spacing: -0.01em; }
.textseite p { margin: 0 0 12px; }
.textseite a { text-decoration-color: var(--primary); text-underline-offset: 3px; }
.zurueck { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--on-surface-muted); text-decoration: none; margin-bottom: 18px; }
.zurueck svg { width: 18px; height: 18px; fill: currentColor; }
.zurueck:hover { color: var(--on-surface); }

@media (max-width: 380px) {
  .aktionen { grid-template-columns: 1fr; }
  .qr-wrap { grid-template-columns: 1fr; justify-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  body { background: #fff; color: #000; display: block; padding: 0; }
  body::before, .aktionen, .snackbar, .kopieren { display: none; }
  .karte { box-shadow: none; border-color: #ccc; background: #fff; }
}

.eintrag a.text { text-decoration: none; }
.chip-cyan { --chip: var(--cyan); }
.chip-lime { --chip: var(--lime); }
.eintrag:has(a.text:hover)::after { opacity: 0.06; }

/* Neon-Akzent wechselt langsam die Farbe: Pink → Cyan → Lime → Orange → Pink */
@property --primary { syntax: '<color>'; inherits: true; initial-value: #ff2bd6; }
html { animation: neonwechsel 60s linear infinite; }
@keyframes neonwechsel {
  0%, 100% { --primary: #ff2bd6; }
  25% { --primary: #00f0ff; }
  50% { --primary: #b6ff00; }
  75% { --primary: #ff7a00; }
}
