:root {
  --brand-blue: #182A56;
  --brand-purple: #816ABF;
  --brand-accent: #b1a3f8;
  --etsy-orange: #f1641e;
  --bg-dark: #05050a;
  --panel: rgba(15, 15, 25, 0.78);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.1);
  --text-main: #ffffff;
  --text-muted: #a8a8ba;
  --text-soft: #d7d5e8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(129, 106, 191, 0.24), transparent 34%),
    radial-gradient(circle at 84% 14%, rgba(24, 42, 86, 0.46), transparent 32%),
    linear-gradient(180deg, #090911 0%, var(--bg-dark) 100%);
  color: var(--text-main);
  font-family: "Nunito", system-ui, sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  width: 38vw;
  height: 38vw;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  animation: hub-float 11s infinite alternate ease-in-out;
}

body::before {
  top: -12%;
  left: -10%;
  background: rgba(129, 106, 191, 0.18);
}

body::after {
  right: -12%;
  bottom: -18%;
  background: rgba(24, 42, 86, 0.42);
  animation-delay: -5s;
}

@keyframes hub-float {
  to { transform: translate(28px, 46px); }
}

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 4px;
}

.page-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.site-header,
.brand-hero,
.hub-panel,
.support-strip,
.page-intro {
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-hero {
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -24px 48px rgba(0, 0, 0, 0.22);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 12px 14px;
  border-radius: 22px;
  background: rgba(10, 10, 18, 0.58);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  text-decoration: none;
}

.brand-logo-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}

.brand-logo-wrap--lg {
  width: clamp(112px, 18vw, 156px);
  height: clamp(112px, 18vw, 156px);
}

.brand-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue), var(--brand-accent));
  animation: hub-spin 5s linear infinite;
}

.brand-logo-wrap--lg::before { inset: -5px; }

@keyframes hub-spin {
  to { transform: rotate(360deg); }
}

.brand-logo {
  width: 100%;
  height: 100%;
  border: 3px solid #05050a;
  border-radius: 50%;
  object-fit: cover;
}

.brand-logo-wrap--lg .brand-logo { border-width: 5px; }

.brand-name {
  display: grid;
  gap: 1px;
}

.brand-name strong {
  font-size: 1.04rem;
  line-height: 1;
}

.brand-name span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  transform: translateY(-1px);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  border-color: rgba(177, 163, 248, 0.35);
  background: rgba(177, 163, 248, 0.12);
  color: #fff;
}

.nav-link.shop {
  background: linear-gradient(135deg, var(--etsy-orange), #ff8d3a);
  color: #fff;
  box-shadow: 0 12px 28px rgba(241, 100, 30, 0.22);
}

.brand-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(32px, 5vw, 48px) clamp(20px, 4vw, 40px);
  border-radius: 28px;
  margin-bottom: 18px;
}

.brand-hero h1 {
  margin: 20px 0 0;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.brand-hero .tagline {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-weight: 600;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.hub-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2.5vw, 26px);
  border-radius: 24px;
  min-width: 0;
}

.hub-panel > * {
  position: relative;
  z-index: 1;
}

.hub-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hub-panel-header h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  letter-spacing: -0.03em;
}

.hub-panel-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.panel-link {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--brand-accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.panel-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.compact-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-item {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.compact-item:hover {
  transform: translateY(-2px);
  border-color: rgba(177, 163, 248, 0.38);
  background: rgba(255, 255, 255, 0.075);
}

.compact-item strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.compact-item span.meta {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.token-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.token-chip {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-soft);
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.token-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(177, 163, 248, 0.38);
}

.token-chip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.token-chip strong {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover { transform: translateY(-2px); }

.button.primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: none;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  box-shadow: 0 14px 30px rgba(129, 106, 191, 0.28);
}

.button.primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.32) 48%,
    transparent 100%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  animation: hub-btn-shine 4.5s ease-in-out infinite;
}

@keyframes hub-btn-shine {
  0%, 72%, 100% { left: -120%; }
  38% { left: 130%; }
}

/* Homepage hero CTA — animated corner border (pure CSS, FreeFrontend-inspired) */
.button.hero-cta {
  z-index: 0;
}

.button.hero-cta::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(177, 163, 248, 0.9),
    rgba(129, 106, 191, 0.35),
    rgba(119, 221, 255, 0.55),
    rgba(177, 163, 248, 0.9)
  );
  background-size: 220% 220%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  animation: hub-hero-border-shift 5s linear infinite;
  animation-play-state: paused;
}

.button.hero-cta:hover::before,
.button.hero-cta:focus-visible::before {
  opacity: 1;
  animation-play-state: running;
}

@keyframes hub-hero-border-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.button.secondary { background: rgba(255, 255, 255, 0.055); }

.button.etsy {
  border: none;
  background: linear-gradient(135deg, var(--etsy-orange), #ff8d3a);
  box-shadow: 0 14px 30px rgba(241, 100, 30, 0.24);
}

/* Cursor spotlight cards (Stripe-style, + hub-effects.js) */
.spotlight-card {
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    520px circle at var(--mouse-x) var(--mouse-y),
    rgba(177, 163, 248, 0.18),
    rgba(129, 106, 191, 0.06) 32%,
    transparent 58%
  );
  pointer-events: none;
  z-index: 0;
}

.spotlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.35s ease;
  padding: 1px;
  background: radial-gradient(
    360px circle at var(--mouse-x) var(--mouse-y),
    rgba(177, 163, 248, 0.75),
    rgba(129, 106, 191, 0.2) 38%,
    transparent 62%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.spotlight-card:hover::before,
.spotlight-card:hover::after,
.spotlight-card:focus-within::before,
.spotlight-card:focus-within::after {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

/* Updates page */
.page-intro {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 24px;
}

.page-intro > * {
  position: relative;
  z-index: 1;
}

.page-intro h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
}

.page-intro p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.55;
}

.search-wrap {
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%23a8a8ba'%3E%3Cpath d='M12.5 11h-.79l-.28-.27A6.47 6.47 0 0 0 13 6.5 6.5 6.5 0 1 0 6.5 13a6.47 6.47 0 0 0 3.23-.87l.27.28v.79l5 5 1.49-1.49-5-5zm-6 0C4.01 11 2 8.99 2 6.5S4.01 2 6.5 2 11 4.01 11 6.5 8.99 11 6.5 11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  outline: none;
  border-color: rgba(177, 163, 248, 0.55);
  box-shadow:
    0 0 0 3px rgba(177, 163, 248, 0.16),
    0 0 28px rgba(129, 106, 191, 0.28);
}

.search-input:focus-visible {
  outline: none;
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.update-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 168px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: radial-gradient(circle at 100% 0%, rgba(129, 106, 191, 0.2), transparent 35%), var(--panel-soft);
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.update-card:hover {
  transform: translateY(-3px);
  border-color: rgba(177, 163, 248, 0.38);
}

.update-card--featured {
  border-color: rgba(177, 163, 248, 0.42);
  animation: hub-featured-glow 3s ease-in-out infinite;
}

@keyframes hub-featured-glow {
  0%, 100% {
    box-shadow: 0 0 22px rgba(129, 106, 191, 0.18);
  }
  50% {
    box-shadow: 0 0 38px rgba(177, 163, 248, 0.32);
  }
}

.update-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.15;
}

.update-card p {
  margin: 0;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.5;
}

.last-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(177, 163, 248, 0.28);
  border-radius: 999px;
  background: rgba(177, 163, 248, 0.11);
  color: var(--brand-accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-cta {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 900;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
}

.support-strip {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 24px;
}

.support-strip > * {
  position: relative;
  z-index: 1;
}

.support-strip h2 {
  margin: 0 0 5px;
  font-size: 1.25rem;
}

.support-strip p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.socials-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(177, 163, 248, 0.42);
  color: var(--brand-accent);
}

.site-footer {
  margin-top: 18px;
  padding: 18px 0 8px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 20px;
}

.legal-links a {
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-links a:hover { color: var(--brand-accent); }

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  width: auto;
  max-width: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  background: rgba(12, 12, 20, 0.82);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.poster-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.4;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.34));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.34));
}

.poster-canvas canvas,
.poster-wall-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 860px) {
  .hub-grid { grid-template-columns: 1fr; }
  .token-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .button.primary::after {
    animation: none;
    display: none;
  }

  .update-card--featured {
    animation: none;
  }

  .button.hero-cta::before {
    animation: none;
  }

  .spotlight-card::before,
  .spotlight-card::after {
    transition: none;
  }

  body::before,
  body::after {
    animation: none;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 12px;
  }

  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-links { justify-content: flex-start; }
  .support-strip { grid-template-columns: 1fr; }
  .footer-actions { justify-content: stretch; }
  .button { width: 100%; }
}
