/* Scene: developer late evening, personal site, warm dim light — dark warm charcoal */

:root {
  --bg:          oklch(9% 0.008 38);
  --bg-mid:      oklch(12% 0.010 38);
  --text:        oklch(88% 0.007 65);
  --text-muted:  oklch(42% 0.006 50);
  --accent:      oklch(72% 0.09  48);
  --noise-opacity: 0.028;
}

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

html, body {
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body.scrollable {
  overflow: auto;
}

/* Film grain texture */
.noise {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: var(--noise-opacity);
  pointer-events: none;
  z-index: 0;
  animation: drift 8s linear infinite;
}

@keyframes drift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-1%, 0.5%); }
  50%  { transform: translate(0.5%, -1%); }
  75%  { transform: translate(-0.5%, 1%); }
  100% { transform: translate(0, 0); }
}

/* Layout */
.stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 2rem;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  opacity: 0;
  animation: reveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Message */
.message {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  list-style: none;
}

.line {
  display: block;
  color: var(--text);
}

.line.accent {
  color: var(--accent);
  font-style: italic;
}

/* Legal nav links in footer */
.legal-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.meta a,
.legal-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.meta a:hover,
.legal-nav a:hover {
  color: var(--accent);
}

/* Text pages (Impressum, Datenschutz) */
.stage--text {
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 2rem;
}

.text-content {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  animation: reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.back-nav {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
  border-bottom: 1px solid oklch(20% 0.006 38);
  padding-bottom: 1.5rem;
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.legal-section h2 {
  font-size: 0.75rem;
  font-family: 'Space Mono', 'Courier New', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  margin-top: 0.5rem;
}

.legal-section p,
.legal-section address {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  color: oklch(75% 0.006 60);
  font-style: normal;
  max-width: 65ch;
}

.legal-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-section ul li {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.6;
  color: oklch(75% 0.006 60);
  padding-left: 1.2em;
  position: relative;
}

.legal-section ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.legal-section a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid oklch(72% 0.09 48 / 0.3);
  transition: border-color 0.2s ease;
}

.legal-section a:hover {
  border-bottom-color: var(--accent);
}

.page-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 1.5rem;
  border-top: 1px solid oklch(20% 0.006 38);
}

.page-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-footer a:hover {
  color: var(--accent);
}

.text-muted {
  color: oklch(32% 0.005 50);
}

/* Footer meta */
.meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.divider {
  opacity: 0.4;
}

/* Subtle cursor blink on domain */
.domain::after {
  content: '_';
  animation: blink 1.1s step-end infinite;
  color: var(--accent);
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Responsive */
@media (max-width: 480px) {
  .message {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }
}
