/* studish.de – Verkaufsseite
   Palette: Schwarz #000, Graphit #1d1d1f, Weiß #f5f5f7, Grau #86868b, Akzent Blau #0071e3
   Schrift: die Systemschrift (auf Apple-Geräten SF Pro), keine externen Dateien */

:root {
  --black: #000;
  --graphite: #1d1d1f;
  --ink: #f5f5f7;
  --muted: #86868b;
  --line: rgb(255 255 255 / 0.055);
  /* Akzentfarbe: nur hier ändern */
  --accent: #0071e3;
  --accent-rgb: 0 113 227;
  --accent-hi: #5aa9ff;
  --accent-lo: #0058b0;
  --accent-text: #2997ff; /* hellere Stufe für Text auf Schwarz, gut lesbar */
  --step: clamp(76px, 8.5vw, 124px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue",
    "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

.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;
}

/* ---- Hintergrund: Haarlinien-Raster, selten ein Lichtimpuls ---- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: var(--step) 100%;
  background-position: 50% 0;
}

/* Linien liegen bei Mitte ± (k + 0,5) × Rasterabstand, darum halbe Zahlen für --k */
.pulse {
  position: absolute;
  top: 0;
  left: calc(50% + var(--k) * var(--step));
  width: 1px;
  height: 140px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  opacity: 0;
  animation: fall var(--d) linear var(--delay) infinite;
}

@keyframes fall {
  0% {
    transform: translateY(-140px);
    opacity: 0.85;
  }

  58%,
  100% {
    transform: translateY(100vh);
    opacity: 0.85;
  }
}

/* ---- Bühne ---- */

.hero {
  position: relative;
  z-index: 1;
  isolation: isolate;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 96px 20px 64px;
  text-align: center;
}

.stage {
  position: relative;
}

/* Hält die Linien vom Text fern, ohne eine Kante zu zeigen */
.stage::before {
  content: "";
  position: absolute;
  inset: -22% -12%;
  z-index: -1;
  background: radial-gradient(closest-side, #000 58%, transparent);
}

.domain {
  margin: 0;
  font-size: clamp(58px, 17.4vw, 232px);
  font-weight: 700;
  line-height: 0.92;
  white-space: nowrap;
}

.mark {
  display: inline-block;
  letter-spacing: -0.055em;
  /* gleicht die negative Laufweite am Wortende aus, damit es optisch mittig steht */
  margin-right: -0.055em;
  animation: track-in 1.5s var(--ease) 0.1s both;
}

/* Die Laufweite nach dem letzten Buchstaben vor dem Punkt rechnen Browser verschieden; hier ist sie aus,
   damit der Punkt überall gleich sitzt */
.tail {
  letter-spacing: 0;
}

@keyframes track-in {
  from {
    opacity: 0;
    letter-spacing: -0.015em;
  }
}

/* Der Punkt der Domain: eine Statuslampe, die nach dem Schriftzug angeht */
.dot {
  position: relative;
  display: inline-block;
  width: 0.185em;
  height: 0.185em;
  /* nach dem geraden h etwas mehr Luft, vor dem runden Bauch des d etwas weniger */
  margin: 0 0.016em 0 0.004em;
  border-radius: 50%;
  vertical-align: baseline;
  background: radial-gradient(circle at 34% 30%, var(--accent-hi), var(--accent) 55%, var(--accent-lo));
  box-shadow: 0 0 0.12em rgb(var(--accent-rgb) /0.6);
  animation: switch-on 0.7s var(--ease) 1.05s both;
  transition: transform 0.4s var(--ease), filter 0.4s ease;
}

.dot::after {
  content: "";
  position: absolute;
  inset: -110%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--accent-rgb) /0.42), transparent);
  animation: breathe 4s ease-in-out 1.7s infinite;
  opacity: 0.55;
}

@keyframes switch-on {
  0% {
    opacity: 0;
    transform: scale(0.2);
    filter: brightness(2);
  }

  60% {
    opacity: 1;
    transform: scale(1.18);
  }

  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

/* Wer auf die E-Mail-Adresse zeigt, sieht die Lampe heller werden */
body:has(.mail:hover, .mail:focus-visible) .dot {
  transform: scale(1.14);
  filter: brightness(1.18);
}

.lead {
  margin: clamp(22px, 2.6vw, 36px) 0 0;
  font-size: clamp(19px, 2.1vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--muted);
}

.actions {
  margin-top: clamp(26px, 3.2vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  /* das Kopier-Symbol rechts soll die Adresse nicht aus der Mitte schieben */
  margin-right: -46px;
}

.mail {
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
  text-decoration-color: transparent;
  border-radius: 8px;
  transition:
    color 0.25s ease,
    text-decoration-color 0.25s ease;
}

.mail:hover {
  color: #57adff;
  text-decoration-color: currentColor;
}

.copy {
  position: relative;
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition:
    color 0.25s ease,
    background-color 0.25s ease;
}

.copy:hover {
  color: var(--ink);
  background: rgb(255 255 255 / 0.06);
}

.copy svg {
  width: 17px;
  height: 17px;
}

.copy .icon-done {
  display: none;
  color: var(--accent);
}

.copy[data-state="done"] .icon-copy {
  display: none;
}

.copy[data-state="done"] .icon-done {
  display: block;
}

.copy::after {
  content: "Kopiert";
  position: absolute;
  bottom: 100%;
  left: 50%;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--graphite);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition:
    opacity 0.2s ease,
    transform 0.3s var(--ease);
}

.copy[data-state="done"]::after {
  opacity: 1;
  transform: translate(-50%, -2px);
}

/* Auftritt: Schriftzug, dann Lampe, dann der Rest */
.reveal {
  animation: rise 0.9s var(--ease) both;
  animation-delay: var(--delay, 0s);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---- Weniger Bewegung ---- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .pulse {
    display: none;
  }
}
