:root {
  --bg: #06080a;
  --bg-elevated: #0c1014;
  --surface: rgba(14, 20, 26, 0.72);
  --border: rgba(59, 165, 93, 0.22);
  --accent: #3ba55d;
  --accent-bright: #4fd47a;
  --accent-glow: rgba(59, 165, 93, 0.45);
  --text: #e8edf2;
  --muted: #8a9aa8;
  --danger: #e85d5d;
  --font-display: "Bebas Neue", sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --nav-h: 72px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #fff;
}

code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.15em 0.45em;
  border-radius: 6px;
}

/* Ambient layers */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  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");
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(59, 165, 93, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 165, 93, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: float 18s var(--ease) infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: var(--accent-glow);
  top: -120px;
  right: -80px;
  opacity: 0.35;
}

.orb-2 {
  width: 320px;
  height: 320px;
  background: rgba(30, 90, 180, 0.25);
  bottom: 20%;
  left: -100px;
  animation-delay: -6s;
}

.orb-3 {
  width: 280px;
  height: 280px;
  background: rgba(59, 165, 93, 0.2);
  bottom: -80px;
  right: 25%;
  animation-delay: -12s;
}

#rose-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(6, 8, 10, 0.65);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.nav.scrolled {
  background: rgba(6, 8, 10, 0.92);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--accent-glow);
}

.logo-text {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.logo-text em {
  font-style: normal;
  color: var(--accent-bright);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  color: var(--bg) !important;
  background: var(--accent);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--accent-bright);
  color: var(--bg) !important;
  box-shadow: 0 0 20px var(--accent-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

/* Hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 70% 30%, rgba(59, 165, 93, 0.15), transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 3rem) clamp(1.5rem, 5vw, 4rem) 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  width: fit-content;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(59, 165, 93, 0.08);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-title .line {
  display: block;
}

.hero-title .accent {
  background: linear-gradient(90deg, var(--accent-bright), var(--accent), #7ee0a0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 40px var(--accent-glow));
}

.hero-sub {
  max-width: 520px;
  margin-top: 1.5rem;
  font-size: 1.15rem;
  color: var(--muted);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #041008;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 8px 36px var(--accent-glow);
  color: #041008;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.btn-discord {
  background: #5865f2;
  color: #fff;
}

.btn-discord:hover {
  background: #6f7bf5;
  color: #fff;
  box-shadow: 0 8px 28px rgba(88, 101, 242, 0.4);
}

.btn-large {
  width: 100%;
  max-width: 320px;
  padding: 1rem 1.5rem;
  margin-top: 0.75rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 0.04em;
  color: var(--accent-bright);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: clamp(1.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem clamp(1.5rem, 5vw, 3rem);
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(12, 16, 20, 0.6) 20%, transparent);
}

.section-head {
  margin-bottom: 3rem;
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.05;
}

.section-head .accent,
.accent {
  color: var(--accent-bright);
}

.section-head p {
  margin-top: 1rem;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.feature-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border);
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* Steps */
.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.step-num {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Rules */
.rules-intro {
  max-width: 640px;
  color: var(--muted);
  margin-top: 0.5rem;
}

.rules-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.6rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.tab:hover {
  color: var(--text);
  border-color: var(--border);
}

.tab.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.rules-panel {
  display: none;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.rules-panel.active {
  display: block;
  animation: panel-in 0.4s var(--ease);
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.rule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rule-list li {
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 0.98rem;
}

.rule-list strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.2rem;
}

/* Role cards */
.role-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.role-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(59, 165, 93, 0.12), rgba(6, 8, 10, 0.8));
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease);
}

.role-card:hover {
  transform: scale(1.02);
}

.role-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.5rem;
}

.role-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Connect */
.connect-section {
  padding-bottom: 6rem;
}

.connect-box {
  text-align: center;
  padding: 3rem clamp(1.5rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(59, 165, 93, 0.1),
    0 32px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.connect-box h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  text-transform: uppercase;
  margin: 0.5rem 0 1rem;
}

.connect-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.connect-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.connect-string {
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--accent-bright);
}

.connect-box .btn-large {
  margin: 0.5rem auto 0;
  display: flex;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2.5rem clamp(1.5rem, 5vw, 3rem);
  background: rgba(0, 0, 0, 0.35);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.footer p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.footer-small {
  font-size: 0.75rem !important;
  opacity: 0.7;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    background: rgba(6, 8, 10, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }

  .nav.open .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav.open .nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav.open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav.open .nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .scroll-hint {
    display: none;
  }

  .hero-stats {
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .orb { animation: none; }
  #rose-canvas { display: none; }
}
