/* ============================================================
   serienflimmern
   ============================================================ */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #121214;
  --fg: #f2f1ee;
  --muted: #8f8d87;
  --line: rgba(255, 255, 255, .07);
  --accent: #d8a35d;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
  font-weight: 400;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-3);
}

/* ---- Startseite: Hero ---- */

.hero {
  min-height: 30vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.logo {
  font-size: clamp(34px, 6.5vw, 58px);
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.05;
  text-transform: lowercase;
}

/* Das "Flimmern": einzelne Buchstaben dimmen kurz ab.
   Jeder Buchstabe hat eine eigene, krumme Zyklusdauer, dadurch
   überlagern sich die Rhythmen nie gleich und es wirkt zufällig.
   Reines CSS, läuft zuverlässig auch auf iOS Safari. */

.logo .l {
  animation: letter-flicker 10s steps(1) infinite;
}

@keyframes letter-flicker {
  0%    { opacity: 1; }
  1.0%  { opacity: .3; }
  2.0%  { opacity: 1; }
  3.2%  { opacity: .65; }
  4.2%  { opacity: 1; }
  100%  { opacity: 1; }
}

.logo .l:nth-child(1)  { animation-duration: 8.1s;  animation-delay: 2.0s; }
.logo .l:nth-child(2)  { animation-duration: 11.3s; animation-delay: 2.6s; }
.logo .l:nth-child(3)  { animation-duration: 7.4s;  animation-delay: 3.1s; }
.logo .l:nth-child(4)  { animation-duration: 9.7s;  animation-delay: 2.2s; }
.logo .l:nth-child(5)  { animation-duration: 12.9s; animation-delay: 4.0s; }
.logo .l:nth-child(6)  { animation-duration: 8.8s;  animation-delay: 2.9s; }
.logo .l:nth-child(7)  { animation-duration: 10.6s; animation-delay: 2.4s; }
.logo .l:nth-child(8)  { animation-duration: 7.9s;  animation-delay: 3.6s; }
.logo .l:nth-child(9)  { animation-duration: 13.4s; animation-delay: 2.1s; }
.logo .l:nth-child(10) { animation-duration: 9.2s;  animation-delay: 3.3s; }
.logo .l:nth-child(11) { animation-duration: 11.8s; animation-delay: 2.7s; }
.logo .l:nth-child(12) { animation-duration: 8.5s;  animation-delay: 4.2s; }
.logo .l:nth-child(13) { animation-duration: 10.1s; animation-delay: 2.3s; }
.logo .l:nth-child(14) { animation-duration: 12.2s; animation-delay: 3.8s; }

.tagline {
  margin-top: var(--space-3);
  font-size: var(--text-md);
  color: var(--muted);
  max-width: 42ch;
  line-height: 1.7;
}

/* ---- Unterseiten ---- */

.home-link {
  display: inline-block;
  margin-bottom: var(--space-6);
  color: var(--fg);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: lowercase;
}

.home-link:hover {
  color: var(--fg);
}

.label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--muted);
  margin-bottom: var(--space-5);
}

/* ---- Projektliste ---- */

.section-label {
  margin-top: var(--space-7);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.list {
  border-top: 1px solid var(--line);
}

.project {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--fg);
}

.project-title {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 500;
  letter-spacing: .01em;
  transition: color .2s ease;
}

.project-meta {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-arrow {
  display: inline-block;
  color: var(--muted);
  transition: transform .2s ease, color .2s ease;
}

.project:hover .project-title {
  color: var(--accent);
}

.project:hover .project-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ---- Inhaltsseiten ---- */

.content {
  max-width: 620px;
}

.content p {
  font-size: var(--text-sm);
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.content h2 {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--fg);
  margin: var(--space-5) 0 var(--space-2);
  letter-spacing: .01em;
}

.content h2:first-child {
  margin-top: 0;
}

.content a {
  color: var(--fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

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

.content .address {
  font-style: normal;
  font-size: var(--text-sm);
  line-height: 1.85;
  color: var(--fg);
  margin-bottom: var(--space-4);
}

/* ---- Footer ---- */

footer {
  margin-top: var(--space-8);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--muted);
  flex-wrap: wrap;
}

footer .dot {
  margin: 0 var(--space-1);
  color: var(--line);
}

.copyright {
  font-size: var(--text-xs);
  letter-spacing: .04em;
}

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

a:hover {
  color: var(--fg);
}

/* ---- Zugänglichkeit ---- */

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .container {
    padding: var(--space-6) var(--space-2);
  }

  .hero {
    min-height: 24vh;
  }

  .section-label {
    margin-top: var(--space-6);
  }

  .project {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  footer {
    margin-top: var(--space-7);
    flex-direction: column;
    gap: var(--space-2);
  }
}
