/* ============================================
   RUSTCAMP PVP — SEO-Optimized Landing Page
   ============================================ */

:root {
  --bg: #0a0807;
  --bg-elevated: #12100e;
  --text: #f0ebe5;
  --text-dim: #a09a94;
  --text-muted: #5a5450;
  --accent: #e85a3c;
  --accent-hover: #f06a4c;
  --accent-glow: rgba(232, 90, 60, 0.35);
  --success: #3dd68c;
  --success-glow: rgba(61, 214, 140, 0.4);
  --danger: #e53935;
  --danger-glow: rgba(229, 57, 53, 0.5);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.14);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, Consolas, monospace;
  --transition-fast: 150ms;
  --transition-med: 200ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Toast ──────────────────────────────────── */

.toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  max-width: calc(100vw - 2.5rem);
  background: rgba(16, 14, 13, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(61, 214, 140, 0.25);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-16px) scale(0.96);
  pointer-events: none;
  transition: opacity var(--transition-med) ease, transform var(--transition-med) var(--ease-out);
  will-change: opacity, transform;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast-icon {
  width: 20px;
  height: 20px;
  color: var(--success);
  flex-shrink: 0;
}

.toast-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--success);
}

.toast-body {
  font-size: 0.8125rem;
  font-family: var(--mono);
  color: var(--text-dim);
}

.toast-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  padding-left: 2rem;
}

/* ─── Header ─────────────────────────────────── */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  background: linear-gradient(180deg, rgba(10, 8, 7, 0.9) 0%, transparent 100%);
}

.brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: opacity var(--transition-fast) ease;
}

.brand:hover { opacity: 0.85; }
.brand-rust { color: var(--accent); }
.brand-camp { color: var(--text); }

/* ─── Hero Section ───────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .hero { padding: 0 4rem; }
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10,8,7,0.96) 0%, rgba(10,8,7,0.8) 40%, rgba(10,8,7,0.5) 65%, rgba(10,8,7,0.3) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 20%);
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr 340px;
    align-items: start;
    gap: 4rem;
    padding: 6rem 0;
  }
}

/* ─── Main Content ───────────────────────────── */

.hero-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page-subtitle {
  font-size: 1.25rem;
  color: var(--text-dim);
  margin-top: -1rem;
}

/* Section Headings (H2) */
.section-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 0.9375rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 500px;
  margin-bottom: 1rem;
}

/* ─── Server Status ──────────────────────────── */

.status-section {
  padding: 0.5rem 0;
}

.server-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding: 0.5rem 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 12px var(--success-glow);
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger-glow);
  animation: pulse-danger 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--success-glow); }
  50% { opacity: 0.6; box-shadow: 0 0 6px var(--success-glow); }
}

@keyframes pulse-danger {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--danger-glow); }
  50% { opacity: 0.5; box-shadow: 0 0 4px var(--danger-glow); }
}

.status-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.status-players {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dim);
}

.status-players::before {
  content: "·";
  margin-right: 0.5rem;
  opacity: 0.4;
}

.status-players:empty::before {
  display: none;
}

/* ─── Connect Section ────────────────────────── */

.connect-section {
  padding: 0.5rem 0;
}

.connect-command {
  display: inline-block;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.connect-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 
    transform var(--transition-fast) var(--ease-out),
    box-shadow var(--transition-med) ease,
    background var(--transition-fast) ease,
    border-color var(--transition-fast) ease;
  will-change: transform, box-shadow;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 140px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 24px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(0) scale(0.99);
}

.btn-secondary {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--glass-border);
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--glass-border-hover);
}

.btn-copy:hover {
  border-color: rgba(61, 214, 140, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 20px rgba(61, 214, 140, 0.15);
}

.btn-copy:active {
  transform: scale(0.98);
}

/* ─── Features Section ───────────────────────── */

.features-section {
  padding: 0.5rem 0;
}

.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  list-style: none;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dim);
}

.feature-icon {
  font-size: 1.125rem;
}

/* ─── Wipe Panel ─────────────────────────────── */

.wipe-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
}

@media (max-width: 1023px) {
  .wipe-panel {
    margin-top: 1rem;
  }
}

.wipe-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.wipe-intro {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.wipe-countdown-block {
  text-align: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.wipe-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.wipe-countdown {
  font-family: var(--mono);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1;
}

.wipe-schedule {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.wipe-day {
  font-size: 0.875rem;
  color: var(--text-dim);
}

.wipe-day strong {
  color: var(--text);
}

.wipe-map {
  display: flex;
  gap: 0.375rem;
  align-items: baseline;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.wipe-map-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dim);
}

.wipe-map-value {
  font-size: 0.875rem;
  font-family: var(--mono);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Why Section ────────────────────────────── */

.why-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 2rem;
}

.why-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.why-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.why-text {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ─── Footer ─────────────────────────────────── */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border);
}

.footer-copyright {
  font-weight: 500;
}

/* ─── Accessibility & Performance ────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.status-dot, .toast, .btn {
  transform: translateZ(0);
  backface-visibility: hidden;
}

.wipe-panel, .features-section, .why-section, .faq-section {
  content-visibility: auto;
}

/* ─── Connect Command Row (with inline copy) ─── */

.connect-command-row {
  display: -webkit-inline-flex;
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  overflow: hidden;
}

.connect-command-row .connect-command {
  display: -webkit-flex;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  /* Firefox: ensure code element fills height */
  min-height: 100%;
}

.btn-copy-inline {
  display: -webkit-flex;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: none;
  border-left: 1px solid var(--glass-border);
  border-radius: 0;
  cursor: pointer;
  -webkit-transition: background var(--transition-fast) ease, color var(--transition-fast) ease;
  -moz-transition: background var(--transition-fast) ease, color var(--transition-fast) ease;
  transition: background var(--transition-fast) ease, color var(--transition-fast) ease;
  white-space: nowrap;
  /* Firefox: remove default button appearance */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.btn-copy-inline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.btn-copy-inline:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.btn-copy-inline:active {
  background: rgba(255, 255, 255, 0.12);
}

.btn-copy-inline.copied {
  color: var(--success);
  background: rgba(61, 214, 140, 0.1);
}

/* ─── FAQ Section ───────────────────────────── */

.faq-section {
  background: var(--bg);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 2rem 4rem;
}

.faq-content {
  max-width: 800px;
  margin: 0 auto;
}

.faq-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
}

/* Firefox: hide default marker on details */
.faq-item > summary {
  list-style: none;
}

/* Firefox: hide marker using ::marker pseudo-element */
.faq-item > summary::marker,
.faq-item > summary::-webkit-details-marker {
  display: none;
  content: '';
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  list-style-type: none;
  transition: background var(--transition-fast) ease;
}

/* Chrome/Safari: hide default marker */
.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform var(--transition-fast) var(--ease-out);
  flex-shrink: 0;
  margin-left: auto;
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq-answer {
  padding: 0 1.25rem 1rem;
  font-size: 0.9375rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.faq-answer code {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* ─── Footer (with server links) ─────────────── */

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-servers {
  display: flex;
  gap: 1rem;
}

.footer-server-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast) ease;
}

.footer-server-link:hover {
  color: var(--text);
}
