/* ---------- Schriften (lokal, keine externen Server) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-300-normal.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- Farben und Schriften ---------- */
:root {
  --bg: #000;
  --bg-warm: #120d05;
  --gold: #e6b34a;
  --gold-light: #f7d27a;
  --gold-dark: #a8741f;
  --white: #f4f1ea;
  --muted: #a9a397;
  --faint: #6a655b;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --pulse: 0;                       /* wird von js/hexagons.js beim Impuls gesetzt */
  /* Gemeinsame Achse: Trennlinie, Footer-Linie und Kontakt sind exakt so breit wie der Schriftzug.
     --title-ratio = sichtbare Breite von "dennis neumann" geteilt durch die Schriftgröße (gemessen) */
  --title-size: clamp(1.6rem, 4.6vw, 3.6rem);
  --title-ratio: 11.92;
  --axis: calc(var(--title-size) * var(--title-ratio));
  color-scheme: dark;
}

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

html, body { height: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* warmer, kaum sichtbarer Lichtschein hinter dem Logo */
  background:
    radial-gradient(ellipse 55% 50% at 50% 45%, var(--bg-warm) 0%, transparent 70%),
    var(--bg);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Waben-Hintergrund ---------- */
.hex-side {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 420px;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hex-left {
  left: 0;
  -webkit-mask-image: linear-gradient(to right, #000 45%, transparent 95%);
          mask-image: linear-gradient(to right, #000 45%, transparent 95%);
}
.hex-right {
  right: 0;
  -webkit-mask-image: linear-gradient(to left, #000 45%, transparent 95%);
          mask-image: linear-gradient(to left, #000 45%, transparent 95%);
}

.hex-side .edge {
  stroke-width: 1.2;
  fill: none;
}
.hex-side .wave path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Navigation ---------- */
.site-header {
  position: relative;
  z-index: 2;
  padding: 2.6rem 1rem 0;
  animation: fadeIn 1.2s ease-out 0.9s both;
}
.nav {
  display: flex;
  justify-content: center;
  gap: 4.5rem;
}
.nav-link {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  /* gleicht den Abstand nach dem letzten Buchstaben aus */
  padding: 0 0 0.9rem 0.34em;
  transition: color 0.3s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: -0.6rem;
  right: -0.6rem;
  bottom: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold) 25%, var(--gold) 75%, transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}
.nav-link:hover,
.nav-link.is-active { color: var(--gold-light); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }

/* ---------- Logo-Bereich ---------- */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3.5rem;
  text-align: center;
}

.mark {
  position: relative;
  display: grid;
  place-items: center;
  animation: logoIn 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
/* goldener Schein hinter dem Logo, der beim Aussenden des Impulses kurz aufglimmt */
.mark::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 179, 74, 0.22) 0%, rgba(230, 179, 74, 0.06) 40%, transparent 68%);
  opacity: calc(0.35 + var(--pulse) * 0.65);
  transform: scale(calc(0.92 + var(--pulse) * 0.1));
  pointer-events: none;
}

.logo {
  position: relative;
  width: clamp(200px, 30vw, 400px);
  height: auto;
}

.wordmark {
  margin-top: 1.4rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--title-size);
  letter-spacing: 0.42em;
  /* gleicht den Abstand nach dem letzten Buchstaben aus, damit der Schriftzug mittig sitzt */
  margin-right: -0.42em;
  line-height: 1.1;
  background: linear-gradient(180deg, #fffdf8 0%, var(--white) 55%, #cfc8b8 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: wordIn 2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: var(--axis);
  max-width: 100%;
  margin-top: 2.1rem;
}
.divider-line {
  flex: 1;
  height: 1px;
  animation: lineIn 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.9s both;
}
.divider-line:first-child {
  background: linear-gradient(to right, transparent, var(--gold));
  transform-origin: right;
}
.divider-line:last-child {
  background: linear-gradient(to left, transparent, var(--gold));
  transform-origin: left;
}
.divider-hex {
  width: 22px;
  height: 19px;
  filter: drop-shadow(0 0 6px rgba(230, 179, 74, 0.55));
  animation: fadeIn 1s ease-out 0.8s both;
}
.divider-hex::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 50%, var(--gold-dark));
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

/* ---------- Auftritt beim Laden ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes logoIn {
  from { opacity: 0; transform: scale(0.96); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes wordIn {
  from { opacity: 0; letter-spacing: 0.7em; margin-right: -0.7em; }
  to   { opacity: 1; letter-spacing: 0.42em; margin-right: -0.42em; }
}
@keyframes lineIn {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.2rem 1rem 2.4rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(18, 13, 5, 0.9));
  animation: fadeIn 1.2s ease-out 1.2s both;
}
/* feine Goldlinie, die zu den Seiten hin ausläuft */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--axis);
  max-width: 100%;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to right, transparent, rgba(230, 179, 74, 0.55), transparent);
}

/* "Kontakt" ist selbst der Link: öffnet das E-Mail-Programm mit mail@dennisneumann.org */
.contact {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  width: var(--axis);
  max-width: 100%;
  color: var(--gold-light);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1.12rem;
  font-weight: 400;
  letter-spacing: 0.45em;
  padding-block: 0.4rem;
  transition: color 0.3s, text-shadow 0.3s;
}
/* gleicht die Sperrung nach dem letzten Buchstaben aus, damit das Wort genau mittig sitzt */
.contact span { margin-right: -0.45em; }
.contact::before,
.contact::after {
  content: "";
  flex: 1;
  height: 1px;
  opacity: 0.6;
  transition: opacity 0.4s ease;
}
.contact::before { background: linear-gradient(to right, transparent, var(--gold)); }
.contact::after  { background: linear-gradient(to left,  transparent, var(--gold)); }
.contact:hover,
.contact:focus-visible {
  color: #fff3d1;
  text-shadow: 0 0 14px rgba(230, 179, 74, 0.55);
}
.contact:hover::before,
.contact:hover::after,
.contact:focus-visible::before,
.contact:focus-visible::after { opacity: 1; }

a:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 6px;
}

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 900px) {
  .hex-side { width: 220px; opacity: 0.55; }
}
@media (max-width: 600px) {
  .site-header { padding-top: 1.8rem; }
  .hex-side { width: 130px; opacity: 0.4; }
  .logo { width: 62vw; }
  :root { --title-ratio: 10.36; }
  .wordmark { letter-spacing: 0.3em; margin-right: -0.3em; animation-name: fadeIn; }
  .contact { font-size: 0.9rem; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mark, .wordmark, .divider-line, .divider-hex, .site-header, .site-footer { animation: none; }
  .hex-side .wave { display: none; }
}
