@font-face {
  font-family: "Ethnica";
  src: url("./assets/fonts/EthnicaDemo.otf") format("opentype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #000000;
  --text: #f3efe5;
  --primary: #f3efe5;
  --muted: #f3efe5;
  --border: rgba(243, 239, 229, 0.14);
  --border-strong: rgba(243, 239, 229, 0.22);
  --panel: rgba(0, 0, 0, 0.54);
  --panel-strong: rgba(0, 0, 0, 0.76);
  --glow: rgba(255, 255, 255, 0.08);
  --signal: #9ef3be;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  overflow-x: hidden;
  color: var(--text);
  font-family: "Space Mono", monospace;
}

::selection {
  background: rgba(243, 239, 229, 0.18);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.noise-layer,
.grain-overlay,
.grid-lines,
.text-gradient-layer {
  position: fixed;
  inset: 0;
}

.noise-layer {
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.grain-overlay {
  z-index: 1;
  pointer-events: none;
  opacity: 0.006;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.6) 0 0.6px, transparent 0.8px),
    radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.55) 0 0.6px, transparent 0.9px),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.4) 0 0.7px, transparent 1px);
  background-size: 9px 9px, 11px 11px, 7px 7px;
}

.grid-lines {
  z-index: 2;
  pointer-events: none;
  opacity: 0.25;
}

.text-gradient-layer {
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.48) 24%, rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0) 74%);
}

.scan-line,
.edge-line {
  position: absolute;
  background: rgba(243, 239, 229, 0.08);
}

.scan-line {
  left: 0;
  width: 100%;
  height: 1px;
}

.edge-line {
  top: 0;
  width: 1px;
  height: 100%;
}

.edge-line--left {
  left: 8%;
}

.edge-line--right {
  right: 8%;
}

.site-shell {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.site-header,
.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
}

.site-status {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.status-line,
.site-nav,
.footer-block,
.floating-meta {
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.45);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

.site-wordmark {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.68rem;
  color: var(--muted);
}

.site-nav__link {
  position: relative;
  padding-bottom: 0.2rem;
  transition: color 180ms ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 220ms ease;
}

.site-nav__link:hover,
.site-nav__link--active {
  color: var(--text);
}

.site-nav__link:hover::after,
.site-nav__link--active::after {
  width: 100%;
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.hero-panel {
  position: relative;
  width: min(100%, 78rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portal-glow {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(72vw, 64rem);
  height: min(76vh, 42rem);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.floating-meta {
  position: absolute;
  top: -3.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  color: var(--text);
  font-size: 0.55rem;
  line-height: 1.8;
  text-align: center;
}

.floating-meta p {
  margin: 0;
}

.logo-sequence {
  position: relative;
  z-index: 1;
  width: auto;
  display: grid;
  grid-template-columns: repeat(6, auto);
  justify-content: center;
  gap: clamp(0.06rem, 0.35vw, 0.24rem);
}

.logo-sequence__letter {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-family: "Ethnica", serif;
  font-size: clamp(7rem, 31vw, 25rem);
  line-height: 0.72;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.16),
    0 0 28px rgba(255, 255, 255, 0.1),
    0 0 54px rgba(255, 255, 255, 0.06);
  animation: title-glow 4.8s ease-in-out infinite;
}

.site-footer {
  align-items: center;
  padding-top: 1rem;
}

.footer-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text);
  font-size: 0.52rem;
}

.footer-block--left,
.footer-block--right {
  flex: 1;
}

.footer-block--center {
  flex-direction: column;
  gap: 0.65rem;
  color: rgba(243, 239, 229, 0.7);
}

.footer-block--center svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
  opacity: 0.62;
  animation: pulse-dot 3s ease-in-out infinite;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-meta__dim {
  opacity: 0.72;
}

.footer-divider {
  width: 1px;
  height: 1.5rem;
  background: rgba(243, 239, 229, 0.16);
}

.footer-brand {
  letter-spacing: 0.95em;
  margin-right: -0.95em;
  font-size: 0.7rem;
  font-weight: 700;
}

.footer-block--right {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.coordinates {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.coordinates__dot {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: var(--text);
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(1);
  }

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

@keyframes title-glow {
  0%,
  100% {
    opacity: 0.94;
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.12),
      0 0 24px rgba(255, 255, 255, 0.08),
      0 0 46px rgba(255, 255, 255, 0.05);
  }

  50% {
    opacity: 1;
    text-shadow:
      0 0 14px rgba(255, 255, 255, 0.2),
      0 0 34px rgba(255, 255, 255, 0.14),
      0 0 72px rgba(255, 255, 255, 0.08);
  }
}

@media (min-width: 1200px) {
  .floating-meta {
    display: block;
  }
}

@media (max-width: 900px) {
  .site-shell {
    padding: 1.25rem;
  }

  .site-header,
  .site-footer {
    gap: 1.5rem;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .hero {
    padding: 0.5rem 0;
  }

  .footer-block--left,
  .footer-block--right {
    flex: none;
  }

  .footer-block--right {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .site-shell {
    padding: 1rem;
  }

  .edge-line {
    display: none;
  }

  .status-line,
  .site-nav,
  .footer-block,
  .floating-meta {
    letter-spacing: 0.22em;
  }

  .site-nav {
    font-size: 0.58rem;
  }

  .logo-sequence__letter {
    font-size: clamp(4.6rem, 26vw, 10rem);
    padding: 0;
  }

  .footer-block--center {
    align-items: flex-start;
  }

  .footer-brand {
    letter-spacing: 0.7em;
    margin-right: -0.7em;
  }
}
