:root {
  --bg: #080a0d;
  --fg: #f4f6f8;
  --muted: rgba(244, 246, 248, 0.52);
  --faint: rgba(244, 246, 248, 0.1);
  --hairline: rgba(244, 246, 248, 0.09);
  --cyan: #5ee7ff;
  --red: #e84860;
  --font: "Outfit", system-ui, -apple-system, sans-serif;
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

body.is-static-bg .webgl {
  display: none;
}

.aurora-overlay {
  position: fixed;
  inset: -25%;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.42;
  background:
    radial-gradient(ellipse 100% 70% at 10% 15%, rgba(94, 231, 255, 0.22), transparent 58%),
    radial-gradient(ellipse 80% 60% at 92% 88%, rgba(232, 72, 96, 0.16), transparent 52%);
  background-size: 120% 120%;
  animation: auroraDrift 22s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-4%, 3%) scale(1.03);
  }
}

.gradient-fallback {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, #0a0c10 0%, #080a0d 40%, #06080b 100%);
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.is-static-bg .gradient-fallback {
  opacity: 1;
}

body.is-static-bg .aurora-overlay {
  opacity: 0.55;
  animation-duration: 32s;
}

body.has-webgl .aurora-overlay {
  opacity: 0.3;
}

.page {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  max-width: 38rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 4.5rem) clamp(1.25rem, 5vw, 2rem) 3rem;
  display: flex;
  flex-direction: column;
}

/* —— Hero ( jak chess-pong: hierarchia typu, bez skrzynek ) —— */
.hero {
  margin-bottom: 0.5rem;
}

.hero__top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hero__logo {
  width: clamp(3rem, 10vw, 4rem);
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(0 0 24px rgba(94, 231, 255, 0.12));
}

.hero__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero__title {
  margin: 0 0 1.25rem;
  font-weight: 600;
  font-size: clamp(2.35rem, 8.5vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero__title-line {
  display: block;
}

.hero__title-line--gradient {
  background: linear-gradient(
    105deg,
    var(--fg) 0%,
    var(--cyan) 42%,
    var(--red) 88%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 8s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.hero__lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
  max-width: 34ch;
}

.hero__lead em {
  font-style: italic;
  color: rgba(244, 246, 248, 0.68);
}

.hero__status {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.02em;
}

.hero__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.scroll-hint {
  margin: 2rem 0 1.5rem;
  font-size: 1.25rem;
  color: var(--faint);
  text-align: center;
  animation: bounceHint 2.2s ease-in-out infinite;
}

@keyframes bounceHint {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  50% {
    transform: translateY(6px);
    opacity: 0.7;
  }
}

/* Wejście elementów */
.anim-in {
  animation: riseIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--d, 0ms);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— Rzędy linków: cienka górna linia, bez ramki „card” —— */
.sites {
  display: flex;
  flex-direction: column;
  margin-bottom: auto;
  padding-top: 0.25rem;
}

.site {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.35rem 0;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--hairline);
  position: relative;
  transition: color 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.site:last-child {
  border-bottom: 1px solid var(--hairline);
}

.site::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 231, 255, 0.35), transparent);
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.site:hover::after,
.site:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.site:hover,
.site:focus-visible {
  outline: none;
}

.site:hover .site__domain,
.site:focus-visible .site__domain {
  color: var(--cyan);
}

.site:hover .site__go,
.site:focus-visible .site__go {
  color: var(--cyan);
  transform: translateX(4px);
}

.site__icon {
  width: 2.5rem;
  height: 2.5rem;
  color: rgba(244, 246, 248, 0.45);
  transition: color 0.25s ease;
}

.site__icon svg {
  width: 100%;
  height: 100%;
}

.site:hover .site__icon,
.site:focus-visible .site__icon {
  color: rgba(94, 231, 255, 0.65);
}

.site__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.site__domain {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.25s ease;
}

.site__hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}

.site__go {
  color: var(--faint);
  display: flex;
  align-items: center;
  transition: color 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stopka */
.foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
}

.foot__nav a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

.foot__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

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

.foot__nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (prefers-reduced-motion: reduce) {
  .aurora-overlay,
  .hero__title-line--gradient,
  .scroll-hint,
  .hero__pulse,
  .anim-in {
    animation: none !important;
  }

  .anim-in {
    opacity: 1;
    transform: none;
  }

  .hero__title-line--gradient {
    background: none;
    color: var(--cyan);
    -webkit-text-fill-color: var(--cyan);
  }

  .site:hover .site__go,
  .site:focus-visible .site__go {
    transform: none;
  }

  .site::after {
    display: none;
  }
}
