/* ===== EmberPlugins — Core Theme ===== */

:root {
  --bg-0: #0a0a0a;
  --bg-1: #111111;
  --bg-2: #181818;
  --bg-3: #1f1f1f;
  --line: #2a2a2a;
  --line-2: #353535;

  --ember: #FF6B00;
  --ember-deep: #FF4500;
  --ember-gold: #FFD700;
  --amber: #FFA500;

  --text: #FFFFFF;
  --text-dim: #CCCCCC;
  --text-mute: #888888;

  --rarity-common: #9d9d9d;
  --rarity-uncommon: #55FF55;
  --rarity-rare: #5555FF;
  --rarity-epic: #AA00AA;
  --rarity-legendary: #FFAA00;

  --discord: #5865F2;

  --radius: 4px;
  --radius-lg: 6px;

  --font-display: 'Press Start 2P', 'VT323', monospace;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mc: 'VT323', 'Press Start 2P', monospace;

  --shadow-glow: 0 0 24px rgba(255, 107, 0, 0.35);
  --shadow-glow-soft: 0 0 14px rgba(255, 107, 0, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg-0); color: var(--text); font-family: var(--font-body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--ember); text-decoration: none; transition: color .15s ease, text-shadow .15s ease; }
a:hover { color: var(--ember-gold); text-shadow: 0 0 8px rgba(255, 215, 0, .5); }

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* Section helpers */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; position: relative; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-family: var(--font-display); font-size: 28px; line-height: 1.4; letter-spacing: .5px; margin-bottom: 12px; }
.section-head p { color: var(--text-dim); max-width: 640px; margin: 0 auto; }

/* Fire gradient text */
.fire-text {
  background: linear-gradient(90deg, var(--ember-gold) 0%, var(--ember) 50%, var(--ember-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 107, 0, .35));
}

/* ===== Navbar ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  max-width: 1200px; margin: 0 auto;
  height: 56px;
  gap: 16px;
}
.nav-logo { display: flex; align-items: center; line-height: 0; flex-shrink: 0; }
.nav-logo .logo-img {
  height: 30px; width: auto; max-width: 180px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(255, 107, 0, .35));
  transition: filter .2s ease, transform .15s ease;
}
.nav-logo:hover .logo-img {
  filter: drop-shadow(0 0 14px rgba(255, 165, 0, .55));
  transform: translateY(-1px);
}
@media (max-width: 760px) {
  .nav-logo .logo-img { height: 26px; max-width: 150px; }
}
.nav-links { display: flex; gap: 22px; align-items: center; height: 100%; }
.nav-links a {
  color: var(--text-dim);
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center;
  height: 36px;
  transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ember); }
.nav-links .btn-sm {
  /* Match the nav text height precisely */
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  display: inline-flex; align-items: center;
}
.nav-toggle { display: none; font-size: 22px; color: var(--text); height: 36px; align-items: center; }
@media (max-width: 760px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 16px; background: var(--bg-1); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-block; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  font-family: var(--font-body);
  font-weight: 600; font-size: 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all .2s ease;
  letter-spacing: .3px;
  cursor: pointer;
  text-decoration: none;
  min-height: 40px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--ember-deep), var(--ember));
  color: #fff;
  box-shadow: 0 0 0 rgba(255, 107, 0, 0);
}
.btn-primary:hover {
  box-shadow: 0 0 24px rgba(255, 107, 0, .6), 0 0 0 1px rgba(255, 215, 0, .3);
  transform: translateY(-1px);
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 215, 0, .5);
}
.btn-secondary {
  background: transparent;
  color: var(--ember);
  border-color: var(--ember);
}
.btn-secondary:hover {
  background: rgba(255, 107, 0, .08);
  box-shadow: 0 0 18px rgba(255, 107, 0, .3);
  color: var(--ember-gold);
}
.btn-discord {
  background: var(--discord);
  color: #fff;
}
.btn-discord:hover {
  background: #4752C4;
  box-shadow: 0 0 18px rgba(88, 101, 242, .4);
  color: #fff;
}
.btn[disabled], .btn.disabled {
  opacity: .55; cursor: not-allowed; pointer-events: none;
  background: var(--bg-3); color: var(--text-mute); border-color: var(--line);
  box-shadow: none;
}
.btn-sm { padding: 0 14px; font-size: 13px; min-height: 32px; }

/* ===== Hero — cleaner, logo-centered, subtle ember glow ===== */
.hero {
  position: relative;
  padding: 90px 20px 110px;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(255, 69, 0, .22), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 0%,   rgba(255, 107, 0, .10), transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #110805 100%);
}

/* Slow aurora — two soft glows that drift, pure CSS */
.hero::before, .hero::after {
  content: '';
  position: absolute; inset: -20% -10%;
  background: radial-gradient(ellipse 30% 40% at 30% 60%, rgba(255, 107, 0, .25), transparent 60%);
  filter: blur(32px);
  z-index: 0;
  animation: heroDrift 18s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero::after {
  background: radial-gradient(ellipse 26% 36% at 72% 40%, rgba(255, 215, 0, .14), transparent 60%);
  animation-duration: 24s; animation-direction: alternate-reverse;
}
@keyframes heroDrift {
  0%   { transform: translate(0, 0) scale(1);   opacity: .9; }
  50%  { transform: translate(2%, -3%) scale(1.05); opacity: 1; }
  100% { transform: translate(-1%, 2%) scale(.97); opacity: .85; }
}

/* Pixel-block grid hint at the bottom (Minecraft-y), barely there */
.hero .floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 140px;
  background:
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 107, 0, .08) 39px 40px),
    repeating-linear-gradient(0deg,  transparent 0 39px, rgba(255, 107, 0, .08) 39px 40px),
    linear-gradient(180deg, transparent 0%, rgba(255, 69, 0, .08) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 80%);
          mask-image: linear-gradient(180deg, transparent, #000 80%);
  z-index: 1; pointer-events: none;
}

/* Optional canvas — kept but lighter (handled in particles.js) */
.hero canvas#particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none; opacity: .6;
}

.hero-inner { position: relative; z-index: 3; max-width: 920px; margin: 0 auto; }

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--ember);
  padding: 6px 14px;
  border: 1px solid var(--ember);
  border-radius: 999px;
  margin-bottom: 28px;
  background: rgba(255, 107, 0, .07);
  text-shadow: 0 0 12px rgba(255, 107, 0, .5);
}
.hero h1.hero-title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 22px;
  max-width: 820px;
  margin-left: auto; margin-right: auto;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1.4;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.hero .subtitle {
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--text-dim); margin-bottom: 36px;
  letter-spacing: .3px;
}
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .cta-row .btn { padding: 14px 26px; font-size: 14px; }

/* ===== Cards ===== */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover {
  border-color: var(--ember);
  box-shadow: var(--shadow-glow-soft);
}
.card.glow { box-shadow: var(--shadow-glow-soft); }

/* Pixel border (Minecraft-ish) */
.pixel-border {
  position: relative;
  border: 2px solid var(--line);
  background: var(--bg-1);
  image-rendering: pixelated;
}
.pixel-border::before {
  content: '';
  position: absolute; inset: -4px;
  border: 2px solid var(--bg-0);
  pointer-events: none;
  border-radius: inherit;
}

/* ===== Featured plugin card ===== */
.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 36px;
  padding: 36px;
  background:
    radial-gradient(ellipse 60% 100% at 100% 50%, rgba(255, 107, 0, .12), transparent 70%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--ember);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  align-items: stretch;
}
@media (max-width: 760px) { .featured-card { grid-template-columns: 1fr; } }
.featured-card > div:first-child { display: flex; flex-direction: column; justify-content: center; }
.featured-icon {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 107, 0, .25), transparent 60%),
    linear-gradient(135deg, var(--bg-0), var(--bg-2));
  border-radius: var(--radius-lg);
  border: 2px solid var(--ember);
  box-shadow: 0 0 28px rgba(255, 107, 0, .25), inset 0 0 32px rgba(255, 107, 0, .08);
  overflow: hidden;
  font-size: 120px;
  line-height: 1;
}
.featured-icon img {
  width: 100%; height: 100%; object-fit: contain; padding: 18px;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .5));
}
.featured-card h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 10px; }
.featured-card .tagline { color: var(--text-dim); margin-bottom: 18px; }
.featured-card .price { font-family: var(--font-display); font-size: 26px; color: var(--ember-gold); margin: 16px 0; text-shadow: 0 0 12px rgba(255, 215, 0, .4); }
.rarity-tier-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 22px; }
.rarity-pill {
  font-family: var(--font-mc);
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  letter-spacing: 1px;
}
.rarity-pill.common { color: var(--rarity-common); }
.rarity-pill.uncommon { color: var(--rarity-uncommon); }
.rarity-pill.rare { color: var(--rarity-rare); }
.rarity-pill.epic { color: var(--rarity-epic); }
.rarity-pill.legendary { color: var(--rarity-legendary); text-shadow: 0 0 8px rgba(255, 170, 0, .4); }

/* ===== Plugin grid (coming soon / browse) ===== */
.plugins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.plugin-card {
  padding: 0;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.plugin-card:hover {
  border-color: var(--ember);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,.4), 0 0 24px rgba(255, 107, 0, .25);
}
.plugin-card.coming-soon { opacity: .85; }
.plugin-card.coming-soon:hover { opacity: 1; }
.plugin-card .icon {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 107, 0, .18), transparent 65%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border-bottom: 1px solid var(--line);
  font-size: 110px; line-height: 1;
  overflow: hidden;
}
.plugin-card .icon img {
  width: 100%; height: 100%; object-fit: contain; padding: 6px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .5));
  transition: transform .25s ease;
}
.plugin-card:hover .icon img { transform: scale(1.04); }
.plugin-card h4 { font-family: var(--font-display); font-size: 14px; margin: 18px 16px 8px; line-height: 1.4; }
.plugin-card p   { font-size: 14px; color: var(--text-dim); padding: 0 16px; flex: 1; }
.plugin-card .badge {
  align-self: center;
  margin: 14px 0 18px;
  font-family: var(--font-mc); font-size: 13px; letter-spacing: 1px;
  color: var(--ember); padding: 3px 10px; border: 1px solid var(--ember); border-radius: 3px;
}

/* ===== Features grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature {
  padding: 28px 24px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all .2s;
}
.feature:hover { border-color: var(--ember); transform: translateY(-2px); }
.feature .icon { font-size: 36px; margin-bottom: 14px; filter: drop-shadow(0 0 8px rgba(255, 107, 0, .4)); }
.feature h4 { font-family: var(--font-display); font-size: 13px; margin-bottom: 10px; }
.feature p { font-size: 14px; color: var(--text-dim); }

/* ===== Email signup ===== */
.signup-section {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-0));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.signup-card {
  max-width: 600px; margin: 0 auto;
  padding: 40px;
  background: var(--bg-1);
  border: 2px solid var(--ember);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-glow-soft);
}
.signup-card h2 { font-family: var(--font-display); font-size: 22px; margin-bottom: 12px; }
.signup-card p { color: var(--text-dim); margin-bottom: 24px; }
.signup-form { display: flex; gap: 8px; flex-wrap: wrap; }
.signup-form input[type=email] {
  flex: 1; min-width: 200px;
  padding: 12px 16px;
  background: var(--bg-0);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.signup-form input[type=email]:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, .15);
}
.consent-row {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 14px;
  font-size: 12px; color: var(--text-mute); text-align: left;
}
.consent-row input { margin-top: 3px; accent-color: var(--ember); }

/* ===== Toasts ===== */
.toast-stack { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; }
.toast {
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-left: 4px solid var(--ember);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  min-width: 240px; max-width: 360px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  animation: toast-in .25s ease;
}
.toast.error { border-left-color: #ff4444; }
.toast.success { border-left-color: var(--ember-gold); box-shadow: 0 0 20px rgba(255, 215, 0, .25); }
@keyframes toast-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== Footer ===== */
.footer {
  padding: 50px 20px 30px;
  background: var(--bg-0);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px; max-width: 1200px; margin: 0 auto 30px;
}
.footer-grid h5 { font-family: var(--font-display); font-size: 12px; color: var(--ember); margin-bottom: 14px; letter-spacing: 1px; }
.footer-grid a { display: block; color: var(--text-dim); font-size: 14px; padding: 4px 0; }
.footer-grid a:hover { color: var(--ember-gold); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--line); text-align: center; color: var(--text-mute); font-size: 13px; }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  max-width: 520px; margin: 0 auto;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--ember);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: 13px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .6), var(--shadow-glow-soft);
  z-index: 1000;
  display: none;
}
.cookie-banner.show { display: block; animation: toast-in .3s ease; }
.cookie-banner h4 { font-family: var(--font-display); font-size: 12px; margin-bottom: 10px; color: var(--ember); }
.cookie-banner p { color: var(--text-dim); margin-bottom: 14px; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ===== Page-content (about/privacy) ===== */
.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 20px;
}
.prose h1 { font-family: var(--font-display); font-size: 28px; margin-bottom: 24px; line-height: 1.4; }
.prose h2 { font-family: var(--font-display); font-size: 18px; margin: 32px 0 14px; color: var(--ember); }
.prose h3 { font-size: 18px; margin: 22px 0 10px; color: var(--text); }
.prose p, .prose ul, .prose ol { color: var(--text-dim); margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }
.prose a { color: var(--ember); }
.prose a:hover { text-decoration: underline; }

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; }
.flex { display: flex; gap: 12px; } .flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* Subtle ember pulse for accents */
@keyframes emberPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 107, 0, .3); }
  50% { box-shadow: 0 0 18px rgba(255, 107, 0, .6); }
}
.ember-pulse { animation: emberPulse 3s ease-in-out infinite; }
