/* ============================================
   BuildForge, Stonecraft design system
   ============================================ */

:root {
  --stone-950: #16181a;
  --stone-900: #1d2023;
  --stone-800: #262a2e;
  --stone-700: #33383d;
  --stone-500: #6b7278;
  --stone-200: #d8d4c9;
  --parchment: #eee9dc;
  --amber: #e8862d;
  --amber-bright: #ffab5c;
  --moss: #6a9955;
  --moss-bright: #8fc46b;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--stone-950);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--parchment);
}

p { margin: 0; color: var(--stone-200); }

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

ul, ol { padding: 0; margin: 0; list-style: none; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow { max-width: 760px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn-small { padding: 10px 20px; font-size: 14px; }

.btn-primary {
  background: var(--amber);
  color: var(--stone-950);
  box-shadow: 0 4px 0 #a85f16;
}

.btn-primary:hover {
  background: var(--amber-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #a85f16;
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #a85f16;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(22, 24, 26, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--stone-800);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}

.brand-mark {
  color: var(--amber);
  font-size: 22px;
}

.main-nav {
  display: flex;
  gap: 28px;
}

.main-nav a {
  font-weight: 500;
  font-size: 15px;
  color: var(--stone-200);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
  color: var(--amber-bright);
  border-color: var(--amber);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 96px 0 64px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 134, 45, 0.18), transparent 55%),
    repeating-linear-gradient(0deg, var(--stone-900) 0px, var(--stone-900) 38px, var(--stone-800) 38px, var(--stone-800) 40px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 38px, rgba(0,0,0,0.15) 38px, rgba(0,0,0,0.15) 40px);
  border-bottom: 2px solid var(--stone-800);
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--moss-bright);
  background: rgba(106, 153, 85, 0.12);
  border: 1px solid rgba(106, 153, 85, 0.4);
  padding: 6px 14px;
  margin-bottom: 28px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--moss-bright);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.hero-title {
  font-size: clamp(56px, 10vw, 108px);
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
  color: var(--parchment);
  text-shadow: 0 0 40px rgba(232, 134, 45, 0.35);
}

.hero-tagline {
  margin-top: 18px;
  font-size: 19px;
  color: var(--stone-200);
}

.ip-copy {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 32px auto 24px;
  background: var(--stone-900);
  border: 2px solid var(--stone-700);
  padding: 10px 10px 10px 20px;
  font-family: "Space Grotesk", monospace;
  font-size: 15px;
}

.copy-btn {
  background: var(--stone-700);
  color: var(--parchment);
  border: none;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.copy-btn:hover { background: var(--amber); color: var(--stone-950); }

.stat-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.stat-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--amber-bright);
}

.stat-label {
  font-size: 13px;
  color: var(--stone-500);
  margin-top: 4px;
}

/* ---------- Sections ---------- */

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--stone-900);
}

.section-title {
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
}

.section-sub {
  text-align: center;
  max-width: 520px;
  margin: -28px auto 40px;
}

/* ---------- Block cards (features) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--stone-800);
  border: 2px solid var(--stone-800);
}

.block-card {
  background: var(--stone-900);
  padding: 32px 28px;
  transition: background 0.15s ease;
}

.block-card:hover { background: var(--stone-800); }

.block-icon { font-size: 30px; display: block; margin-bottom: 16px; }

.block-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.block-card p { font-size: 14.5px; }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-card {
  border: 2px solid var(--stone-700);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.gallery-card:hover {
  border-color: var(--amber);
  transform: translateY(-4px);
}

.gallery-icon { font-size: 34px; display: block; margin-bottom: 14px; }

.gallery-card h3 { font-size: 16px; margin-bottom: 4px; }
.gallery-card p { font-size: 13px; color: var(--stone-500); }

/* ---------- Staff ---------- */

.staff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.staff-card {
  background: var(--stone-900);
  border: 2px solid var(--stone-800);
  padding: 28px 22px;
  text-align: center;
}

.staff-icon { font-size: 32px; display: block; margin-bottom: 12px; }

.staff-card h3 { font-size: 17px; }

.staff-role {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--amber-bright);
  margin: 4px 0 12px;
}

.staff-card p { font-size: 13.5px; }

/* ---------- Rules ---------- */

.rules-list {
  max-width: 720px;
  margin: 0 auto;
  border-top: 2px solid var(--stone-800);
}

.rules-list li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 2px solid var(--stone-800);
  font-size: 16px;
  color: var(--parchment);
}

.rule-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--amber);
  min-width: 32px;
}

/* ---------- Reviews ---------- */

.review-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.review-card {
  background: var(--stone-800);
  border-left: 3px solid var(--amber);
  padding: 22px 22px;
}

.review-card p {
  font-size: 14.5px;
  color: var(--parchment);
  font-style: italic;
}

.review-author {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--moss-bright);
}

/* ---------- FAQ ---------- */

.faq-list {
  border-top: 2px solid var(--stone-700);
}

.faq-item {
  border-bottom: 2px solid var(--stone-700);
  padding: 18px 4px;
}

.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  position: relative;
  padding-right: 28px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--amber);
  font-size: 20px;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item p {
  margin-top: 12px;
  font-size: 14.5px;
}

/* ---------- Leaderboard ---------- */

.leaderboard-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--stone-900);
  border: 2px solid var(--stone-800);
  margin-bottom: 8px;
}

.lb-1 { border-color: #caa53d; }
.lb-2 { border-color: #b7bcc4; }
.lb-3 { border-color: #b0713f; }

.lb-rank {
  font-family: var(--font-display);
  font-weight: 700;
  min-width: 28px;
}

.lb-name { flex: 1; font-weight: 500; }

.lb-pts {
  font-family: var(--font-display);
  color: var(--amber-bright);
  font-size: 14px;
}

/* ---------- Updates ---------- */

.update-list {
  border-left: 2px solid var(--stone-700);
}

.update-item {
  position: relative;
  padding: 4px 0 32px 28px;
}

.update-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--amber);
  border-radius: 50%;
}

.update-date {
  font-size: 13px;
  color: var(--stone-500);
  font-weight: 600;
}

.update-item h3 {
  font-size: 18px;
  margin: 6px 0 6px;
}

.update-item p { font-size: 14.5px; }

/* ---------- Server info table ---------- */

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr { border-bottom: 2px solid var(--stone-800); }
.info-table tr:last-child { border-bottom: none; }

.info-table th, .info-table td {
  text-align: left;
  padding: 16px 8px;
  font-size: 15px;
}

.info-table th {
  color: var(--stone-500);
  font-weight: 600;
  width: 40%;
}

.info-table td { color: var(--parchment); font-weight: 500; }

/* ---------- Steps ---------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--stone-950);
  border: 2px solid var(--stone-800);
  padding: 28px 22px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--amber);
  color: var(--stone-950);
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 16px;
}

.step-card h3 { font-size: 17px; margin-bottom: 8px; }
.step-card p { font-size: 14px; }

/* ---------- Ranks ---------- */

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.rank-card {
  border: 2px solid var(--stone-800);
  padding: 32px 26px;
  text-align: center;
}

.rank-featured {
  border-color: var(--amber);
  background: var(--stone-900);
}

.rank-card h3 { font-size: 20px; }

.rank-price {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--amber-bright);
  margin: 10px 0 22px;
}

.rank-card ul { text-align: left; }

.rank-card li {
  font-size: 14px;
  color: var(--stone-200);
  padding: 8px 0;
  border-top: 1px solid var(--stone-800);
}

.rank-card li:first-child { border-top: none; }

/* ---------- Partners / Vote / Featured / Sister (uniform simple grids) ---------- */

.partner-grid, .vote-grid, .featured-grid, .sister-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.partner-card, .vote-card, .featured-card, .sister-card {
  background: var(--stone-900);
  border: 2px solid var(--stone-800);
  padding: 24px 20px;
}

.partner-card h3, .vote-card h3, .featured-card h3, .sister-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.partner-card p, .vote-card p, .sister-card p {
  font-size: 13.5px;
}

.featured-card p {
  font-size: 13.5px;
  font-style: italic;
}

/* ---------- Newsletter ---------- */

.newsletter-box { text-align: center; }

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.newsletter-form input {
  background: var(--stone-900);
  border: 2px solid var(--stone-700);
  color: var(--parchment);
  padding: 13px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  min-width: 280px;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--amber);
}

/* ---------- Discord CTA ---------- */

.discord-box {
  text-align: center;
  max-width: 640px;
}

.discord-icon { font-size: 40px; display: block; margin-bottom: 20px; }

.discord-box h2 { font-size: 30px; margin-bottom: 12px; }

.discord-box p { margin-bottom: 28px; }

.discord-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--moss-bright);
  font-weight: 600;
}

/* ---------- Final CTA ---------- */

.final-cta {
  text-align: center;
  background:
    radial-gradient(circle at 50% 100%, rgba(232, 134, 45, 0.15), transparent 60%),
    var(--stone-900);
  border-top: 2px solid var(--stone-800);
}

.final-cta h2 { font-size: 36px; margin-bottom: 14px; }
.final-cta p { margin-bottom: 8px; }

.ip-copy-light { margin-top: 32px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--stone-950);
  border-top: 2px solid var(--stone-800);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
}

.footer-brand p {
  font-size: 13.5px;
  margin-top: 14px;
}

.footer-ip {
  font-family: var(--font-display);
  color: var(--amber-bright) !important;
  margin-top: 10px !important;
  font-size: 13px;
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--stone-500);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--stone-200);
  padding: 6px 0;
}

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

.footer-bottom {
  border-top: 2px solid var(--stone-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p { font-size: 13px; color: var(--stone-500); }

.footer-legal { display: flex; gap: 20px; }

.footer-legal a { font-size: 13px; color: var(--stone-500); }
.footer-legal a:hover { color: var(--amber-bright); }

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--amber);
  color: var(--stone-950);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .main-nav { display: none; }
  .feature-grid, .gallery-grid, .staff-grid, .review-grid,
  .steps-grid, .rank-grid, .partner-grid, .vote-grid,
  .featured-grid, .sister-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .feature-grid, .gallery-grid, .staff-grid, .review-grid,
  .steps-grid, .rank-grid, .partner-grid, .vote-grid,
  .featured-grid, .sister-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-row { gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Icons ----------
   The emoji were sized by font-size; an inline SVG ignores that, so each icon
   slot gets an explicit box. Strokes use currentColor, so colour still comes
   from the surrounding rules rather than being baked into the markup. */

.brand-mark svg   { width: 22px; height: 22px; display: block; }
.block-icon svg   { width: 30px; height: 30px; }
.gallery-icon svg { width: 34px; height: 34px; }
.staff-icon svg   { width: 32px; height: 32px; }
.discord-icon svg { width: 40px; height: 40px; }

/* The icon spans were display:block with a margin; keep that, and centre the
   ones inside cards whose text is centred. */
.block-icon, .gallery-icon, .staff-icon, .discord-icon { color: var(--amber); line-height: 0; }
.gallery-icon svg, .staff-icon svg, .discord-icon svg { margin-inline: auto; }

/* Leaderboard medals take the same colours the row borders already use. */
.lb-rank { display: inline-flex; align-items: center; justify-content: center; }
.lb-rank svg { width: 20px; height: 20px; }
.lb-1 .lb-rank { color: #caa53d; }
.lb-2 .lb-rank { color: #b7bcc4; }
.lb-3 .lb-rank { color: #b0713f; }

.back-to-top svg { width: 20px; height: 20px; }
