/* ==========================================================================
   SolarRP — design tokens
   Palette : nuit profonde + embrasement solaire (miroir de la bannière)
   Display : Cinzel (fantasy/epic) — Body : Work Sans — Pixel accents : Press Start 2P
   ========================================================================== */

:root {
  --bg: #0a0705;
  --bg-alt: #140f0a;
  --bg-card: #1a130c;
  --gold: #f0b429;
  --gold-bright: #ffd76a;
  --ember: #8a2a1f;
  --ember-bright: #c1462f;
  --parchment: #f3e9d2;
  --muted: #a1937a;
  --border: rgba(240, 180, 41, 0.16);
  --border-bright: rgba(240, 180, 41, 0.4);

  --font-display: "Cinzel", "Georgia", serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;
  --font-pixel: "Press Start 2P", monospace;

  --radius: 10px;
  --shadow-gold: 0 0 40px rgba(240, 180, 41, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--parchment);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

::selection { background: var(--gold); color: #1a1200; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  margin: 0 0 14px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--parchment);
  margin: 0;
}

/* ---------------------------------- Nav ---------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(10, 7, 5, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
}

.nav-logo .sun {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-bright), var(--gold) 55%, var(--ember) 100%);
  box-shadow: 0 0 14px rgba(240, 180, 41, 0.6);
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav-links a:hover { color: var(--gold-bright); }

.nav-links a.active { color: var(--gold-bright); }

.btn-discord-small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5865f2, #4551c9);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.86rem;
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.35);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.btn-discord-small:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-discord-small img { width: 16px; height: 16px; filter: brightness(0) invert(1); }

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  padding: 72px 24px 40px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(240, 180, 41, 0.16), transparent 65%),
    var(--bg);
}

.hero-glow {
  position: absolute;
  top: -260px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.14) 0%, transparent 60%);
  pointer-events: none;
  animation: pulseSun 8s ease-in-out infinite;
}

@keyframes pulseSun {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.hero-banner {
  position: relative;
  max-width: 780px;
  margin: 0 auto 28px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  box-shadow: var(--shadow-gold), 0 20px 60px rgba(0,0,0,0.5);
}

.hero-tagline {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 56px;
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, filter 0.2s ease, background 0.2s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #1c1200;
  box-shadow: 0 8px 30px rgba(240, 180, 41, 0.28);
}

.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-bright);
  color: var(--parchment);
}

.btn-ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

.btn-ghost .icon-copy { width: 15px; height: 15px; opacity: 0.8; }

/* --- Hotbar (signature element) --- */

.hotbar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hotbar {
  display: inline-flex;
  gap: 6px;
  padding: 7px;
  background: linear-gradient(180deg, #241a0f, #150f09);
  border: 3px solid #3a2a17;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(240,180,41,0.08), 0 10px 30px rgba(0,0,0,0.5);
}

.slot {
  position: relative;
  width: 56px;
  height: 56px;
  background: linear-gradient(180deg, #2c2013, #1c140b);
  border: 2px solid #4a3720;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease;
}

.slot img { width: 68%; height: 68%; object-fit: contain; image-rendering: pixelated; }

.slot:hover, .slot:focus-visible {
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, #3a2c17, #241a0f);
  transform: translateY(-3px);
}

.slot .tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0d0906;
  border: 1px solid var(--border-bright);
  color: var(--gold-bright);
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.slot:hover .tooltip, .slot:focus-visible .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hotbar-caption {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------------------------------- Sections ---------------------------------- */

section { padding: 68px 0; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-head h2 { font-size: 2rem; margin-bottom: 14px; }

.section-head p { color: var(--muted); }

/* --- Features --- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  image-rendering: pixelated;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* --- Server info --- */

.server-card {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.server-status-text .label {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 6px;
}

.server-status-text .value { font-size: 1.05rem; font-weight: 600; }

.ip-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0d0906;
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 12px 14px;
}

.ip-box code {
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: color 0.15s ease;
}

.copy-btn:hover { color: var(--gold-bright); }

.copy-btn svg { width: 16px; height: 16px; }

/* --- Patch notes teaser --- */

.patch-teaser {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.patch-teaser-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.version-badge {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: #1c1200;
  background: var(--gold-bright);
  padding: 5px 10px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}

.patch-date { color: var(--muted); font-size: 0.85rem; }

.patch-teaser h3 { font-size: 1.2rem; margin-bottom: 12px; }

.patch-teaser ul {
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.patch-teaser li { margin-bottom: 6px; }

.link-arrow {
  color: var(--gold-bright);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.15s ease;
}

.link-arrow:hover { gap: 10px; }

/* ---------------------------------- Footer ---------------------------------- */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

footer a:hover { color: var(--gold-bright); }

/* ---------------------------------- Patchnotes page ---------------------------------- */

.page-head {
  padding: 64px 24px 20px;
  text-align: center;
}

.page-head h1 { font-size: 2.3rem; margin-bottom: 12px; }

.page-head p { color: var(--muted); max-width: 520px; margin: 0 auto; }

.timeline {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 0 24px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 44px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-entry {
  position: relative;
  padding-left: 84px;
  margin-bottom: 36px;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: 39px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--bg), 0 0 12px rgba(240,180,41,0.5);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}

.timeline-card .patch-teaser-head { margin-bottom: 14px; }

.timeline-card h2 { font-size: 1.15rem; }

.timeline-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline-card li { margin-bottom: 6px; }

.loading-state, .error-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
  font-size: 0.9rem;
}

/* ---------------------------------- Responsive ---------------------------------- */

@media (max-width: 640px) {
  .nav { padding: 12px 16px; }
  .nav-inner { flex-wrap: wrap; row-gap: 10px; justify-content: center; }
  .nav-logo { font-size: 0.95rem; white-space: nowrap; }
  .nav-links { gap: 14px; font-size: 0.76rem; flex-wrap: wrap; justify-content: center; }
  .btn-discord-small { padding: 7px 12px; font-size: 0.76rem; }
  .hero { padding-top: 32px; }
  .slot { width: 46px; height: 46px; }
  .server-card { flex-direction: column; align-items: stretch; }
  .timeline::before { left: 20px; }
  .timeline-entry { padding-left: 52px; }
  .timeline-entry::before { left: 15px; }
}