/* Starfall polish layer — remove this file + effects.js to revert */

nav {
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
  z-index: 100;
}

html {
  scroll-padding-top: 88px;
}

nav.scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  border-bottom-color: rgba(255, 138, 0, 0.25);
}

html[data-theme="light"] nav.scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.feature-card,
.store-card,
.join-card,
.faq-item,
.stats-bar,
.product-card,
.rule-card {
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover,
.store-card:hover,
.faq-item:hover,
.product-card:hover {
  box-shadow: 0 12px 40px rgba(255, 138, 0, 0.12);
}

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.22) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.hero-discord-live {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-discord-live.visible { opacity: 1; }

.hero-discord-live strong { color: var(--accent); }

.menu-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  z-index: 99;
  padding: 2rem;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  transition: background 0.2s;
}

.mobile-menu a:hover {
  background: var(--surface-2);
}

.stat-value {
  transition: color 0.3s ease;
}

@media (max-width: 768px) {
  .menu-toggle { display: inline-flex; }
  .nav-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::after,
  .hero h1 .gradient,
  .invite-box,
  .stats-bar.is-live,
  .particle,
  .particle-glow,
  .discord-section::before,
  .color-mesh,
  .logo,
  .btn-primary,
  .section-header h2 {
    animation: none !important;
  }

  .hero-content > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ── Ambient motion ── */

.hero::after {
  content: '';
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 107, 53, 0.22), transparent 42%),
    radial-gradient(circle at 78% 48%, rgba(255, 138, 0, 0.18), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(255, 194, 51, 0.14), transparent 48%);
  animation: aurora-shift 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes aurora-shift {
  0% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  100% { transform: translate(4%, -3%) scale(1.08); opacity: 1; }
}

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  transition: transform 0.15s ease-out;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--particle-color);
  animation: drift 16s linear infinite;
}

@keyframes drift {
  0% { transform: translateY(100vh) scale(0.8); opacity: 0; }
  15% { opacity: 0.35; }
  85% { opacity: 0.35; }
  100% { transform: translateY(-12vh) scale(1.2); opacity: 0; }
}

.particle-glow {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.16), transparent 72%) !important;
  animation: drift 22s linear infinite, glow-pulse 5s ease-in-out infinite !important;
}

.particle.twinkle {
  animation: drift 16s linear infinite, twinkle 2.8s ease-in-out infinite !important;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.5; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.65; }
}

/* ── Hero entrance ── */

.hero-content {
  z-index: 2;
}

@media (prefers-reduced-motion: no-preference) {
  body.page-loaded .hero-content > * {
    animation: hero-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  body.page-loaded .hero-badge { animation-delay: 0.05s; }
  body.page-loaded .hero h1 { animation-delay: 0.14s; }
  body.page-loaded .hero p { animation-delay: 0.24s; }
  body.page-loaded .hero-actions { animation-delay: 0.34s; }
  body.page-loaded .invite-box { animation-delay: 0.44s; }
  body.page-loaded .hero-discord-live { animation-delay: 0.54s; }
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.invite-box {
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.hero-badge .dot {
  position: relative;
}

.hero-badge .dot:not(.offline)::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.55);
  animation: status-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes status-ping {
  0% { transform: scale(0.85); opacity: 0.8; }
  70%, 100% { transform: scale(1.8); opacity: 0; }
}

/* ── Nav & links ── */

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--orange-2));
  border-radius: 2px;
  transition: width 0.28s ease;
}

.nav-links a:hover::after { width: 100%; }

html[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0;
}

/* ── Live stats ── */

.stat.stat-pop .stat-value {
  animation: stat-pop 0.45s ease;
}

@keyframes stat-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); color: var(--orange-2); }
  100% { transform: scale(1); }
}

.stat-value {
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s ease;
}

/* ── Cards & sections ── */

.feature-icon {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-card:hover .feature-icon {
  transform: scale(1.12) rotate(-4deg);
}

.features-grid .reveal,
.store-grid .reveal,
.faq-list .reveal,
.join-steps .reveal {
  transition-delay: var(--reveal-delay, 0s);
}

.discord-section {
  position: relative;
  overflow: hidden;
}

.discord-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 138, 0, 0.07) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: section-shimmer 7s linear infinite;
  pointer-events: none;
}

@keyframes section-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.discord-inner,
.discord-section .section-inner {
  position: relative;
  z-index: 1;
}

.btn-secondary,
.btn-discord,
.nav-cta {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-secondary:hover,
.btn-discord:hover,
.nav-cta:hover {
  transform: translateY(-2px);
}

.hero-discord-live.visible {
  animation: fade-pulse 3s ease-in-out infinite;
}

@keyframes fade-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

/* ── Color & vibrancy ── */

.color-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -8%, rgba(255, 138, 0, 0.26), transparent 58%),
    radial-gradient(ellipse 70% 55% at 8% 18%, rgba(255, 107, 53, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 45% at 92% 12%, rgba(255, 194, 51, 0.16), transparent 52%),
    radial-gradient(ellipse 50% 50% at 85% 78%, rgba(255, 138, 0, 0.14), transparent 55%),
    radial-gradient(ellipse 65% 45% at 15% 85%, rgba(255, 123, 84, 0.14), transparent 55%);
  animation: mesh-drift 18s ease-in-out infinite alternate;
}

html[data-theme="light"] .color-mesh {
  background:
    radial-gradient(ellipse 90% 60% at 50% -8%, rgba(255, 138, 0, 0.14), transparent 58%),
    radial-gradient(ellipse 70% 55% at 8% 18%, rgba(255, 107, 53, 0.12), transparent 55%),
    radial-gradient(ellipse 55% 45% at 92% 12%, rgba(255, 194, 51, 0.10), transparent 52%),
    radial-gradient(ellipse 50% 50% at 85% 78%, rgba(255, 138, 0, 0.08), transparent 55%),
    radial-gradient(ellipse 65% 45% at 15% 85%, rgba(255, 123, 84, 0.08), transparent 55%);
}

@keyframes mesh-drift {
  0% { transform: scale(1) translate(0, 0); filter: hue-rotate(0deg); }
  100% { transform: scale(1.06) translate(2%, -1.5%); filter: hue-rotate(12deg); }
}

.logo {
  background: linear-gradient(135deg, var(--accent-hot), var(--accent), var(--orange-2)) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-size: 200% auto !important;
  animation: gradient-flow 4s ease-in-out infinite;
}

.section-header h2 {
  background: linear-gradient(135deg, var(--accent-hot), var(--accent), var(--accent-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#about {
  background: linear-gradient(180deg, rgba(255, 107, 53, 0.06), transparent 70%);
}

#store {
  background: linear-gradient(180deg, transparent, rgba(255, 194, 51, 0.06) 40%, transparent);
}

#faq {
  background: linear-gradient(180deg, rgba(255, 138, 0, 0.05), transparent 65%);
}

.feature-card:nth-child(1) { --card-accent: #ff6b35; --card-tint: rgba(255, 107, 53, 0.12); }
.feature-card:nth-child(2) { --card-accent: #ff8a00; --card-tint: rgba(255, 138, 0, 0.12); }
.feature-card:nth-child(3) { --card-accent: #ffb347; --card-tint: rgba(255, 179, 71, 0.14); }
.feature-card:nth-child(4) { --card-accent: #ffc233; --card-tint: rgba(255, 194, 51, 0.12); }

.feature-card {
  border-top: 3px solid var(--card-accent, var(--accent));
  background:
    linear-gradient(160deg, var(--card-tint, rgba(255,138,0,0.08)), transparent 55%),
    var(--surface);
}

.feature-card:hover {
  border-color: var(--card-accent, var(--accent));
  box-shadow: 0 16px 48px color-mix(in srgb, var(--card-accent, var(--accent)) 28%, transparent);
}

.store-card:nth-child(1) {
  border-top: 3px solid var(--accent);
  background: linear-gradient(160deg, rgba(255, 138, 0, 0.10), transparent 55%), var(--surface);
}

.store-card:nth-child(2) {
  border-top: 3px solid var(--accent-gold);
  background: linear-gradient(160deg, rgba(255, 194, 51, 0.10), transparent 55%), var(--surface);
}

.store-card:hover {
  box-shadow: 0 16px 48px rgba(255, 138, 0, 0.18);
}

.stat:nth-child(1) .stat-value {
  background: linear-gradient(135deg, #ff6b35, #ff8a00);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat:nth-child(2) .stat-value {
  background: linear-gradient(135deg, #ff8a00, #ffb347);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat:nth-child(3) .stat-value {
  background: linear-gradient(135deg, #ffb347, #ffc233);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stats-bar.is-live {
  overflow: visible;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(90deg, #ff6b35, #ff8a00, #ffb347, #ffc233, #ff8a00) border-box;
  background-size: 100% 100%, 300% 100%;
  animation: stats-border 5s linear infinite, stats-breathe 4s ease-in-out infinite;
}

@keyframes stats-border {
  0% { background-position: 0 0, 0% 0; }
  100% { background-position: 0 0, 300% 0; }
}

@keyframes stats-breathe {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 138, 0, 0); }
  50% { box-shadow: 0 0 36px rgba(255, 138, 0, 0.22); }
}

.hero h1 .gradient {
  background: linear-gradient(135deg, #ff6b35, #ff8a00, #ffb347, #ffc233, #ff8a00);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradient-flow 5s ease-in-out infinite;
}

@keyframes gradient-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.invite-box {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, rgba(255, 107, 53, 0.5), rgba(255, 138, 0, 0.5), rgba(255, 194, 51, 0.5)) border-box;
  box-shadow: 0 8px 32px rgba(255, 138, 0, 0.12);
}

.hero-badge {
  border-color: rgba(255, 138, 0, 0.35);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.12), rgba(255, 194, 51, 0.08));
}

.btn-primary,
.nav-cta,
.btn-discord,
.btn-buy {
  background: linear-gradient(135deg, #ff6b35, #ff8a00, #ffb347) !important;
  background-size: 200% auto !important;
  animation: gradient-flow 4s ease-in-out infinite;
}

.btn-primary:hover,
.nav-cta:hover,
.btn-discord:hover,
.btn-buy:hover {
  box-shadow: 0 10px 36px rgba(255, 107, 53, 0.38);
}

.btn-secondary:hover {
  border-color: var(--accent-hot);
  color: var(--accent);
  background: rgba(255, 107, 53, 0.08);
}

.discord-section {
  background: var(--discord-bg) !important;
}

.discord-section::before {
  background: linear-gradient(105deg, transparent 20%, rgba(255, 194, 51, 0.12) 45%, rgba(255, 107, 53, 0.10) 55%, transparent 80%);
}

.faq-item[open] {
  border-color: rgba(255, 138, 0, 0.45);
  box-shadow: inset 4px 0 0 var(--accent);
}

html[dir="rtl"] .faq-item[open] {
  box-shadow: inset -4px 0 0 var(--accent);
}

.join-card:first-child {
  border-top: 3px solid var(--accent-hot);
  background: linear-gradient(160deg, rgba(255, 107, 53, 0.08), transparent 50%), var(--surface);
}

.join-card:last-child {
  border-top: 3px solid var(--accent-gold);
}

.hero-discord-live strong {
  background: linear-gradient(135deg, var(--accent-hot), var(--accent-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.particle.color-hot { background: rgba(255, 107, 53, 0.55) !important; }
.particle.color-gold { background: rgba(255, 194, 51, 0.55) !important; }
.particle.color-coral { background: rgba(255, 123, 84, 0.55) !important; }

.particle-glow.glow-hot {
  background: radial-gradient(circle, rgba(255, 107, 53, 0.18), transparent 72%) !important;
}

.particle-glow.glow-gold {
  background: radial-gradient(circle, rgba(255, 194, 51, 0.16), transparent 72%) !important;
}

.rule-card:nth-child(odd) {
  border-left: 3px solid var(--accent-hot);
}

.rule-card:nth-child(even) {
  border-left: 3px solid var(--accent-gold);
}

html[dir="rtl"] .rule-card:nth-child(odd),
html[dir="rtl"] .rule-card:nth-child(even) {
  border-left: none;
  border-right: 3px solid var(--accent);
}

.product-card:nth-child(1) { border-top: 3px solid var(--accent); }
.product-card:nth-child(2) { border-top: 3px solid var(--accent-hot); }
.product-card:nth-child(3) { border-top: 3px solid var(--orange-2); }
.product-card:nth-child(4) { border-top: 3px solid var(--accent-gold); }
