/* ═══════════════════════════════════════════════════════════
   RepublicMC — Global Styles & Shared Elements
   ═══════════════════════════════════════════════════════════ */

/* ── Card Base — glass surface ──────────────────────────── */
.stat-card,
.feature-card,
.panel,
.store-card,
.vote-card,
.rule-card,
.support-card,
.glass-card,
.gallery-card,
.counter-card,
.leaderboard-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: var(--glass-border);
  box-shadow: var(--shadow-xs);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

/* Suppress old glow pseudo-elements */
.stat-card::after,
.feature-card::after,
.store-card::after,
.vote-card::after,
.rule-card::after,
.support-card::after,
.gallery-card::after,
.counter-card::after,
.leaderboard-card::after {
  display: none;
}

.feature-card,
.store-card,
.vote-card,
.rule-card,
.support-card,
.gallery-card,
.counter-card,
.leaderboard-card {
  border-radius: var(--radius-lg);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease),
    background 150ms var(--ease);
}

.feature-card:hover,
.store-card:hover,
.vote-card:hover,
.rule-card:hover,
.support-card:hover,
.gallery-card:hover,
.counter-card:hover,
.leaderboard-card:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

/* ── Kicker pill ─────────────────────────────────────────── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ── Typography ─────────────────────────────────────────── */
.title {
  margin: 18px 0 12px;
  font-size: clamp(2.8rem, 7.5vw, 6.5rem);
  line-height: 0.93;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 800;
}

.title span {
  color: var(--accent);
}

.subtitle {
  max-width: 60ch;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 1.8vw, 1.1rem);
  line-height: 1.7;
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-header--flush {
  margin-bottom: 0;
}

.section-title {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text);
}

.section-lead {
  margin: 8px 0 0;
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ── Stat Card ──────────────────────────────────────────── */
.stat-card {
  border-radius: var(--radius-lg);
  padding: 16px;
}

.stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.stat-value {
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  font-weight: 700;
  color: var(--text);
}

.stat-meta {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ── Feature Cards ──────────────────────────────────────── */
.feature-card {
  padding: 20px;
  min-height: 160px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: var(--accent-light);
  border: 1px solid rgba(14, 165, 201, 0.16);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  color: var(--accent);
}

.feature-card:hover .feature-icon {
  color: var(--accent-dark);
}

.feature-card:hover .feature-icon svg {
  animation: tilt 0.7s ease;
}

.feature-card h3,
.store-card h3,
.vote-card h3,
.rule-card h3,
.support-card h3,
.gallery-card h3,
.counter-card h3,
.leaderboard-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}

.feature-card p,
.store-card p,
.vote-card p,
.rule-card p,
.support-card p,
.gallery-card p,
.counter-card p,
.leaderboard-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.9rem;
}

/* ── Features Mega Card ─────────────────────────────────── */
.features-mega-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: border-color 150ms var(--ease);
}

.features-mega-card:hover {
  border-color: var(--border-strong);
}

.features-mega-card.is-open {
  border-color: rgba(14, 165, 201, 0.28);
}

.features-mega-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  cursor: pointer;
  user-select: none;
  transition: background 150ms var(--ease);
}

.features-mega-header:hover {
  background: var(--bg-soft);
}

.features-mega-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.features-mega-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--accent-light);
  border: 1px solid rgba(14, 165, 201, 0.16);
  transition: transform 200ms var(--ease);
}

.features-mega-card:hover .features-mega-icon {
  transform: scale(1.04);
}

.features-mega-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.features-mega-header h3 {
  margin: 0 0 3px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.features-mega-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.features-mega-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.features-count-badge {
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.features-chevron {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: transform 300ms var(--ease-out), background 150ms var(--ease);
}

.features-chevron svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.features-mega-card.is-open .features-chevron {
  transform: rotate(180deg);
  background: var(--accent-light);
}

.features-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms var(--ease-out), opacity 280ms var(--ease);
  opacity: 0;
}

.features-mega-card.is-open .features-panel {
  max-height: 1200px;
  opacity: 1;
}

.features-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0 1px 1px;
  background: var(--border);
}

.features-panel-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  background: var(--surface);
  transition: background 150ms var(--ease);
  cursor: default;
}

.features-panel-item:hover {
  background: var(--bg-soft);
}

.features-panel-item:hover .fp-icon {
  transform: scale(1.06);
}

.fp-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--accent-light);
  border: 1px solid rgba(14, 165, 201, 0.14);
  transition: transform 200ms var(--ease);
}

.fp-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.features-panel-item h4 {
  margin: 0 0 2px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.features-panel-item p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* PvP variant */
.features-mega-card--pvp {
  margin-top: 14px;
}

.features-mega-card--pvp:hover {
  border-color: rgba(220, 38, 38, 0.18);
}

.features-mega-card--pvp.is-open {
  border-color: rgba(220, 38, 38, 0.22);
}

.features-mega-icon--pvp {
  background: #fff1f1;
  border-color: rgba(220, 38, 38, 0.14);
}

.features-mega-icon--pvp svg {
  stroke: #dc2626;
}

.features-mega-card--pvp:hover .features-mega-icon {
  transform: scale(1.04);
}

.features-count-badge--pvp {
  background: #dc2626;
}

.features-mega-card--pvp .features-chevron {
  border-color: var(--border);
}

.features-mega-card--pvp.is-open .features-chevron {
  background: #fff1f1;
}

.features-mega-card--pvp .features-panel-grid {
  background: var(--border);
}

.features-mega-card--pvp .features-panel-item:hover {
  background: #fff8f8;
}

.fp-icon--pvp {
  background: #fff1f1;
  border-color: rgba(220, 38, 38, 0.12);
}

.fp-icon--pvp svg {
  stroke: #dc2626;
}

/* Disabled card variant */
.features-mega-card--disabled {
  opacity: 0.65;
  cursor: not-allowed;
  border-style: dashed;
}

.features-mega-card--disabled:hover {
  border-color: var(--border);
}

.features-mega-header--disabled {
  cursor: not-allowed !important;
}

.features-mega-header--disabled:hover {
  background: transparent !important;
}

.features-mega-icon--disabled {
  filter: grayscale(1);
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

.features-mega-icon--disabled svg {
  stroke: var(--text-faint) !important;
}

.features-count-badge--disabled {
  background: var(--text-muted) !important;
  color: #fff !important;
}

/* ── Counter Card ───────────────────────────────────────── */
.counter-card {
  padding: 20px;
  text-align: left;
}

.counter-value {
  margin-top: 10px;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: 700;
  color: var(--text);
}

/* ── Accordion ──────────────────────────────────────────── */
.accordion {
  display: grid;
  gap: 8px;
}

.accordion-item {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 150ms var(--ease);
}

.accordion-trigger:hover {
  background: var(--bg-soft);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms var(--ease-out);
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.accordion-item[data-open="true"] .accordion-panel {
  max-height: 240px;
  padding-bottom: 16px;
}

/* ── Table ──────────────────────────────────────────────── */
.table-shell {
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
  color: var(--text);
}

.table th:nth-child(2),
.table td:nth-child(2) {
  padding-right: 14px;
}

.table th:nth-child(3),
.table td:nth-child(3) {
  padding-left: 14px;
}

.table th {
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  background: var(--bg-soft);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--bg-soft);
}

/* ── Progress & Labels ──────────────────────────────────── */
.label-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 12px;
}

.progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
}

.progress>span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

/* ── Loading Screen ─────────────────────────────────────── */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 240ms var(--ease), visibility 240ms var(--ease);
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

/* ── Particle / Orb stubs — hidden ─────────────────────── */
.particles,
.parallax-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
}

.particle {
  display: none;
}

.orb {
  display: none;
}

/* ── Reveal Animations ──────────────────────────────────── */
.hero-fade,
.reveal,
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}

/* ── Keyframes ──────────────────────────────────────────── */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px) translateX(-50%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tilt {
  0% {
    transform: rotate(0deg) scale(1);
  }

  40% {
    transform: rotate(8deg) scale(1.05);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes perk-item-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes perk-kit-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Global Responsive ──────────────────────────────────── */
@media (max-width: 1180px) {
  .features-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .features-panel-grid {
    grid-template-columns: 1fr;
  }

  .features-mega-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
  }

  .features-mega-right {
    align-self: flex-end;
  }

  .features-mega-card.is-open .features-panel {
    max-height: 3000px;
  }
}

@media (max-width: 560px) {
  .title {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .table th,
  .table td {
    padding: 10px 8px;
  }

  .table th:nth-child(2),
  .table td:nth-child(2) {
    padding-right: 5px;
  }

  .table th:nth-child(3),
  .table td:nth-child(3) {
    padding-left: 5px;
  }
}

