:root {
  --ink: #0a1014;
  --ink-2: #121a21;
  --ink-3: #1a2530;
  --mist: #d7e2ea;
  --mist-dim: #8fa3b3;
  --line: rgba(215, 226, 234, 0.12);
  --accent: #3ddc97;
  --accent-deep: #1fa86a;
  --ember: #ff7a45;
  --ember-deep: #e25a28;
  --glow: rgba(61, 220, 151, 0.22);
  --radius: 14px;
  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--mist);
  background: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
.btn {
  font: inherit;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(61, 220, 151, 0.16), transparent 55%),
    radial-gradient(900px 600px at 88% 8%, rgba(255, 122, 69, 0.12), transparent 50%),
    radial-gradient(800px 500px at 50% 100%, rgba(61, 220, 151, 0.08), transparent 55%),
    linear-gradient(165deg, #070b0e 0%, #0e161c 42%, #0a1218 100%);
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(215, 226, 234, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(215, 226, 234, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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");
}

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ——— Nav ——— */
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(10, 16, 20, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.topnav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(10, 16, 20, 0.88);
}

.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.65rem;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), #1f8f62 55%, var(--ember));
  color: #04110c;
  box-shadow: 0 0 0 1px rgba(61, 220, 151, 0.25), 0 10px 28px var(--glow);
}

.brand-mark svg {
  width: 1.15rem;
  height: 1.15rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-link {
  color: var(--mist-dim);
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--mist);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #2bb87a 100%);
  color: #04110c;
  box-shadow: 0 10px 30px var(--glow);
}

.btn-primary:hover {
  box-shadow: 0 14px 36px rgba(61, 220, 151, 0.35);
}

.btn-ember {
  background: linear-gradient(135deg, var(--ember), var(--ember-deep));
  color: #1a0b05;
  box-shadow: 0 10px 28px rgba(255, 122, 69, 0.28);
}

.btn-ghost {
  background: rgba(215, 226, 234, 0.06);
  color: var(--mist);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: rgba(215, 226, 234, 0.1);
  border-color: rgba(215, 226, 234, 0.22);
}

.btn-discord {
  background: #5865f2;
  color: #fff;
}

.btn-discord:hover {
  background: #4752c4;
}

.btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: calc(100svh - 4.25rem);
  display: grid;
  align-items: center;
  padding: 3.5rem 0 4.5rem;
  overflow: hidden;
}

.hero-plane {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(105deg, rgba(7, 11, 14, 0.55) 0%, rgba(7, 11, 14, 0.82) 42%, rgba(7, 11, 14, 0.95) 100%),
    url("../img/hero-atmosphere.svg") center / cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 38rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 9vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  margin: 0 0 1.1rem;
  background: linear-gradient(120deg, #f2f7fa 10%, var(--accent) 55%, #9ef0c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brand-in 0.9s var(--ease) both;
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: -0.035em;
  line-height: 1.25;
  color: var(--mist);
  animation: rise 0.8s 0.12s var(--ease) both;
}

.hero p {
  margin: 0 0 1.75rem;
  color: var(--mist-dim);
  font-size: 1.05rem;
  max-width: 32rem;
  animation: rise 0.8s 0.22s var(--ease) both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.8s 0.32s var(--ease) both;
}

.hero-orb {
  position: absolute;
  right: -8%;
  top: 12%;
  width: min(52vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(61, 220, 151, 0.45), transparent 45%),
    radial-gradient(circle at 70% 65%, rgba(255, 122, 69, 0.28), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(26, 37, 48, 0.9), rgba(10, 16, 20, 0.2));
  filter: blur(2px);
  animation: orb-float 9s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes brand-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes orb-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-18px) scale(1.03);
  }
}

/* ——— Sections ——— */
.section {
  padding: 5.5rem 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  color: var(--mist-dim);
}

.feature-rail {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 800px) {
  .feature-rail {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature {
  padding: 1.35rem 0 0;
  border-top: 1px solid var(--line);
}

.feature-index {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.7rem;
}

.feature h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.feature p {
  margin: 0;
  color: var(--mist-dim);
  font-size: 0.95rem;
}

.steps {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 780px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.step strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}

.step span {
  color: var(--mist-dim);
  font-size: 0.95rem;
}

.step-num {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.cta-band {
  position: relative;
  overflow: hidden;
  padding: 3.25rem 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(600px 200px at 20% 50%, rgba(61, 220, 151, 0.12), transparent 70%),
    radial-gradient(500px 180px at 90% 40%, rgba(255, 122, 69, 0.1), transparent 70%);
}

.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.cta-band h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

.cta-band p {
  margin: 0;
  color: var(--mist-dim);
}

.site-footer {
  padding: 2.5rem 0 2.75rem;
  border-top: 1px solid var(--line);
  color: var(--mist-dim);
  font-size: 0.88rem;
}

.site-footer-grid {
  display: grid;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 720px) {
  .site-footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-note {
  margin: 0;
  max-width: 22rem;
  line-height: 1.5;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-col strong {
  color: var(--mist);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.footer-col a {
  color: var(--mist-dim);
  transition: color 0.2s;
}

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

.site-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.age-note {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--mist-dim);
}

.age-note a {
  color: var(--accent);
}

.legal-page {
  padding: 2.75rem 0 4rem;
}

.legal-wrap {
  max-width: 720px;
}

.legal-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-display);
}

.legal-page h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.04em;
}

.legal-meta,
.legal-lead {
  color: var(--mist-dim);
  margin: 0 0 1.75rem;
}

.legal-body h2 {
  margin: 1.75rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.legal-body p,
.legal-body li {
  color: var(--mist-dim);
  line-height: 1.65;
}

.legal-body ul {
  padding-left: 1.2rem;
}

.legal-body a {
  color: var(--accent);
}

.support-cards {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.75rem;
}

@media (min-width: 700px) {
  .support-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.support-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 26, 33, 0.65);
}

.support-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.support-card p {
  margin: 0;
  color: var(--mist-dim);
  font-size: 0.92rem;
  line-height: 1.5;
}

.support-card a {
  color: var(--accent);
}

.legal-form {
  display: grid;
  gap: 0.9rem;
  max-width: 520px;
}

.legal-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--mist);
}

.legal-form input,
.legal-form textarea,
.legal-form select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(18, 26, 33, 0.9);
  color: var(--mist);
  font: inherit;
}

.legal-form input:focus,
.legal-form textarea:focus,
.legal-form select:focus {
  outline: none;
  border-color: rgba(61, 220, 151, 0.45);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.12);
}

.legal-form .btn {
  justify-self: start;
  margin-top: 0.25rem;
}

.auth-banner {
  margin: 1rem auto 0;
  width: min(var(--max), calc(100% - 2.5rem));
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 122, 69, 0.12);
  border: 1px solid rgba(255, 122, 69, 0.28);
  color: #ffd2bf;
  font-size: 0.92rem;
}

/* ——— Dashboard ——— */
.dash-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dash-main {
  flex: 1;
  padding: 2rem 0 3.5rem;
}

.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.dash-head h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.04em;
}

.dash-head p {
  margin: 0;
  color: var(--mist-dim);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.55rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: rgba(215, 226, 234, 0.06);
  border: 1px solid var(--line);
}

.user-chip img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.user-chip span {
  font-size: 0.9rem;
  padding-right: 0.35rem;
}

.guild-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.guild-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18, 26, 33, 0.72);
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}

.guild-item:hover {
  border-color: rgba(61, 220, 151, 0.35);
  background: rgba(26, 37, 48, 0.85);
  transform: translateY(-2px);
}

.guild-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: var(--ink-3);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--mist-dim);
}

.guild-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guild-meta {
  flex: 1;
  min-width: 0;
}

.guild-meta strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guild-meta small {
  color: var(--mist-dim);
  font-size: 0.8rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-on {
  background: rgba(61, 220, 151, 0.15);
  color: var(--accent);
}

.badge-off {
  background: rgba(255, 122, 69, 0.14);
  color: #ffb087;
}

.empty-state {
  padding: 2.5rem 1.25rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--mist-dim);
}

.empty-state h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  color: var(--mist);
  letter-spacing: -0.03em;
}

.flash {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(61, 220, 151, 0.12);
  border: 1px solid rgba(61, 220, 151, 0.28);
  color: #baf7d8;
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .nav-link {
    display: none;
  }

  .hero {
    padding-top: 2.5rem;
    min-height: auto;
  }

  .hero-orb {
    opacity: 0.45;
    right: -30%;
    top: -5%;
  }
}
