:root {
  --purple-deep: #1a0a2e;
  --purple-mid: #3d1a6e;
  --purple-bright: #7b2fff;
  --magenta: #c44bff;
  --gold: #d4a84b;
  --gold-bright: #f0d78c;
  --bronze: #8a6a3a;
  --teal: #14f195;
  --cyan: #00d1ff;
  --ink: #0b0614;
  --cream: #f3e8d4;
  --cream-muted: rgba(243, 232, 212, 0.72);
  --steel: #2a2438;
  --font-display: "Cinzel Decorative", "Cinzel", serif;
  --font-roman: "Cinzel", serif;
  --font-body: "Sora", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

/* Atmosphere */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0.045;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.aurora {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(123, 47, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 20%, rgba(20, 241, 149, 0.08), transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(196, 75, 255, 0.12), transparent 55%);
  animation: aurora-drift 18s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 1%, 0) scale(1.05); }
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(180deg, rgba(11, 6, 20, 0.85) 0%, rgba(11, 6, 20, 0) 100%);
  backdrop-filter: blur(0px);
  transition: background 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
}

.nav.scrolled {
  background: rgba(11, 6, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 168, 75, 0.15);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-roman);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.nav-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(212, 168, 75, 0.45);
  box-shadow: 0 0 0 2px rgba(123, 47, 255, 0.25);
}

.nav-links {
  display: none;
  gap: 1.75rem;
  font-family: var(--font-roman);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--cream-muted);
  transition: color 0.25s;
}

.nav-links a:hover {
  color: var(--gold-bright);
}

.nav-socials {
  display: flex;
  gap: 0.75rem;
}

.nav-socials a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--cream-muted);
  border: 1px solid rgba(212, 168, 75, 0.25);
  border-radius: 50%;
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s var(--ease-out);
}

.nav-socials a:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: rgba(212, 168, 75, 0.1);
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 1rem) clamp(1.25rem, 5vw, 3.5rem) 3.5rem;
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.06);
  animation: kenburns 28s var(--ease-out) infinite alternate;
  will-change: transform;
}

@keyframes kenburns {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 6, 20, 0.35) 0%, rgba(11, 6, 20, 0.15) 35%, rgba(11, 6, 20, 0.55) 65%, rgba(11, 6, 20, 0.95) 100%),
    linear-gradient(90deg, rgba(11, 6, 20, 0.55) 0%, transparent 40%, transparent 60%, rgba(11, 6, 20, 0.45) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 42rem;
  animation: rise-in 1.1s var(--ease-out) both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(2.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-ticker {
  font-family: var(--font-roman);
  font-size: clamp(0.85rem, 2vw, 1rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 24px rgba(212, 168, 75, 0.45);
  animation: shimmer-text 3.5s ease-in-out infinite;
}

@keyframes shimmer-text {
  0%, 100% { color: var(--gold); text-shadow: 0 0 20px rgba(212, 168, 75, 0.35); }
  50% { color: var(--gold-bright); text-shadow: 0 0 32px rgba(240, 215, 140, 0.55); }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--cream);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.4),
    0 8px 40px rgba(123, 47, 255, 0.35);
  margin-bottom: 0.85rem;
}

.hero-tagline {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 300;
  color: var(--cream-muted);
  max-width: 28rem;
  margin-bottom: 1.75rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.ca-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 0.65rem;
  border: 1px solid rgba(212, 168, 75, 0.35);
  background: rgba(11, 6, 20, 0.55);
  backdrop-filter: blur(10px);
  color: var(--cream-muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.ca-chip:hover {
  border-color: var(--gold);
  color: var(--cream);
  background: rgba(61, 26, 110, 0.45);
}

.ca-chip.copied {
  border-color: var(--teal);
  color: var(--teal);
}

.ca-label {
  flex-shrink: 0;
  font-family: var(--font-roman);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.ca-chip.copied .ca-label {
  color: var(--teal);
}

.ca-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  letter-spacing: 0.02em;
}

.ca-action {
  flex-shrink: 0;
  font-family: var(--font-roman);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  padding-left: 0.55rem;
  border-left: 1px solid rgba(212, 168, 75, 0.3);
}

.ca-chip.copied .ca-action {
  color: var(--teal);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-roman);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.95rem 1.6rem;
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s, border-color 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 45%, var(--bronze) 100%);
  border: 1px solid var(--gold-bright);
  box-shadow:
    0 0 0 1px rgba(212, 168, 75, 0.2),
    0 8px 28px rgba(212, 168, 75, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(255, 255, 255, 0.35) 45%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: gold-sweep 4s ease-in-out infinite;
}

@keyframes gold-sweep {
  0%, 60% { transform: translateX(-120%); }
  80%, 100% { transform: translateX(120%); }
}

.btn-primary:hover {
  box-shadow:
    0 0 0 1px rgba(212, 168, 75, 0.35),
    0 12px 36px rgba(212, 168, 75, 0.4);
}

.btn-ghost {
  color: var(--cream);
  background: rgba(11, 6, 20, 0.45);
  border: 1px solid rgba(212, 168, 75, 0.4);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--gold);
  background: rgba(123, 47, 255, 0.2);
}

.scroll-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(4.5rem, 12vw, 7.5rem) clamp(1.25rem, 5vw, 3.5rem);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: 720px;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-roman);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--cream) 30%, var(--gold-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-lead {
  color: var(--cream-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* Lore */
.lore {
  background:
    linear-gradient(180deg, var(--ink) 0%, rgba(26, 10, 46, 0.9) 50%, var(--ink) 100%);
}

.lore .section-inner {
  display: grid;
  gap: 2.75rem;
  align-items: center;
}

@media (min-width: 800px) {
  .lore .section-inner {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
  }
}

.lore-portrait {
  position: relative;
  justify-self: center;
  width: min(320px, 80vw);
}

.lore-portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(212, 168, 75, 0.55);
  box-shadow:
    0 0 0 8px rgba(123, 47, 255, 0.12),
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(123, 47, 255, 0.25);
}

.portrait-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--ink), var(--ink)) padding-box,
    linear-gradient(135deg, var(--gold), var(--teal), var(--magenta), var(--gold)) border-box;
  opacity: 0.7;
  animation: ring-spin 12s linear infinite;
  z-index: -1;
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

.lore-copy p + p {
  margin-top: 1rem;
}

.lore-copy p:not(.eyebrow) {
  color: var(--cream-muted);
  font-size: 1.05rem;
}

/* Join / March */
.join {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(61, 26, 110, 0.45), transparent 70%),
    var(--ink);
}

.march-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
  margin-bottom: 2.5rem;
}

.march-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(212, 168, 75, 0.18);
}

.march-steps li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.step-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
  min-width: 2rem;
  text-shadow: 0 0 20px rgba(212, 168, 75, 0.4);
}

.march-steps h3 {
  font-family: var(--font-roman);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.march-steps p {
  color: var(--cream-muted);
  font-size: 0.95rem;
}

/* Legion socials */
.legion {
  background:
    linear-gradient(180deg, transparent, rgba(20, 241, 149, 0.04) 40%, transparent),
    var(--ink);
}

.social-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .social-row {
    grid-template-columns: 1fr 1fr;
  }
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.75rem 1.25rem;
  border: 1px solid rgba(212, 168, 75, 0.28);
  background: linear-gradient(160deg, rgba(61, 26, 110, 0.35), rgba(11, 6, 20, 0.6));
  transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}

.social-link:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(123, 47, 255, 0.2);
}

.social-icon {
  color: var(--gold-bright);
  margin-bottom: 0.35rem;
}

.social-label {
  font-family: var(--font-roman);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.social-handle {
  font-size: 0.85rem;
  color: var(--cream-muted);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
  border-top: 1px solid rgba(212, 168, 75, 0.15);
  background: rgba(11, 6, 20, 0.9);
}

.footer img {
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 75, 0.4);
}

.footer-brand {
  font-family: var(--font-roman);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: rgba(243, 232, 212, 0.4);
  max-width: 28rem;
  margin: 0 auto;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.march-steps .reveal:nth-child(2) { transition-delay: 0.1s; }
.march-steps .reveal:nth-child(3) { transition-delay: 0.2s; }
.social-row .reveal:nth-child(2) { transition-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  .hero-banner,
  .aurora,
  .portrait-ring,
  .btn-primary::after,
  .hero-ticker,
  .scroll-hint span {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-content {
    animation: none;
  }
}
