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

:root {
  --bg: #050505;
  --text: #f2f2f2;
  --muted: #666;
  --accent: #f4c430;
  --line: #1a1a1a;
  --display: "Unbounded", sans-serif;
  --body: "Onest", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.78;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .nav, .foot {
  position: relative;
  z-index: 2;
}

/* Nav */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 40px);
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav__logo-mark {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav__back {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}

.nav__back:hover {
  color: var(--accent);
  transform: translateX(-3px);
}

.page-hub .nav,
.page-prais .nav {
  background: rgba(23, 23, 23, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}

.nav__links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__cta {
  padding: 8px 16px !important;
  color: var(--bg) !important;
  background: var(--accent) !important;
  font-weight: 700 !important;
}

.nav__cta:hover {
  opacity: 0.9;
}

@media (max-width: 640px) {
  .nav__links a:not(.nav__cta) {
    display: none;
  }
}

/* Hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px clamp(16px, 4vw, 40px) 80px;
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.hero__inner {
  position: relative;
  z-index: 3;
  max-width: 900px;
  width: 100%;
}

.hero__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero__title-link {
  display: block;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
}

.hero__title-link:hover {
  opacity: 0.88;
}

.hero__title {
  font-family: var(--display);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.03em;
}

.hero__title .line {
  display: block;
  font-size: clamp(3.5rem, 12vw, 8rem);
  overflow: hidden;
}

.hero__title .line--accent {
  color: var(--accent);
  -webkit-text-stroke: 1px var(--accent);
}

.hero__title .line--ghost {
  color: #fff;
  -webkit-text-stroke: 2px #000;
  paint-order: stroke fill;
}

.hero__desc {
  margin-top: 28px;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 16px;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 2px solid transparent;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s;
}

.btn--primary {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(244, 196, 48, 0.25);
}

.btn--ghost {
  color: var(--text);
  border-color: var(--line);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--text);
}

.btn--huge {
  width: 100%;
  max-width: 480px;
  padding: 22px 32px;
  font-family: var(--display);
  font-size: clamp(14px, 2.5vw, 16px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: none;
}

.btn--huge:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(244, 196, 48, 0.3);
}

.hero__enter {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
  z-index: 3;
}

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

.hero__enter i {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--accent), transparent);
  animation: scroll-line 1.8s ease infinite;
}

@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats div {
  padding: 28px 16px;
  text-align: center;
  background: var(--bg);
}

.stats strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--accent);
}

.stats span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Sections */

.communities, .cta {
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px clamp(16px, 4vw, 40px);
}

.section-head {
  margin-bottom: 48px;
}

.section-num {
  display: block;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 12px;
  max-width: 42ch;
  color: var(--muted);
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--line);
}

.card {
  padding: 28px;
  background: var(--bg);
  border: none;
  transition: background 0.3s;
  transform-style: preserve-3d;
  will-change: transform;
}

.card:hover {
  background: #0c0c0c;
}

.card--flag {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #0a0a0a 0%, #111 100%);
  border-left: 3px solid var(--accent);
}

.card--wide {
  grid-column: 1 / -1;
}

.card__badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.card h3 {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 8px;
  margin-bottom: 16px;
}

.card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.card > a {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid rgba(244, 196, 48, 0.3);
}

.card__meta {
  font-size: 12px;
  color: var(--muted);
}

.card__links {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line);
}

.card__links a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s;
}

.card__links a:hover {
  background: rgba(244, 196, 48, 0.08);
}

.card__links span {
  color: var(--muted);
  font-size: 11px;
}

.card__links b {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--text);
}

.card__row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.card__row a {
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
  transition: border-color 0.2s;
}

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

/* CTA section */

.cta {
  text-align: center;
  border-top: 1px solid var(--line);
}

.cta .section-head {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.cta .section-head p a {
  color: var(--accent);
  border-bottom: 1px solid rgba(244, 196, 48, 0.3);
}

.cta .section-head p a:hover {
  opacity: 0.85;
}

/* Footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(16px, 4vw, 40px) 40px;
  max-width: 1280px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

/* Responsive */

@media (min-width: 901px) {
  .nav {
    justify-content: center;
  }

  .hero {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__label,
  .hero__title,
  .hero__desc {
    text-align: center;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 100px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .card__links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-motion] {
    opacity: 1;
  }

  .hero__enter i {
    animation: none;
  }

  #scene {
    display: none;
  }
}
