/* ============================================================
   House of Boom — style.css
   Rust server community website
   ============================================================ */

/* --- Custom font --- */
@font-face {
  font-family: 'Russo One';
  src: url('../fonts/RussoOne-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Variables --- */
:root {
  --bg-dark:    #0a0a0a;
  --bg-card:    #141414;
  --bg-card-alt:#1a1a1a;
  --bg-section: #0f0f0f;
  --rust-orange: #cd4a1a;
  --rust-red:    #a63d15;
  --rust-ember:  #e8601a;
  --rust-gold:   #d4a040;
  --rust-yellow: #e8b84a;
  --text-primary: #f0ece4;
  --text-dim:     #8a8580;
  --text-muted:   #5a5550;
  --accent:       var(--rust-orange);
  --accent-glow:  rgba(205, 74, 26, 0.4);
  --discord-blue: #5865F2;
  --max-w:        1200px;
  --section-pad:  clamp(5rem, 12vw, 10rem);
  --radius:       12px;
  --radius-sm:    8px;
}

/* --- LED Dot-Matrix Live Ticker --- */
.led-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #0c0c0c;
  border-bottom: 2px solid #1a1a1a;
  box-shadow: 0 2px 20px rgba(0,0,0,0.8);
  height: 52px;
  overflow: hidden;
}

.led-ticker-frame {
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 0 1rem;
  gap: 0.75rem;
}

.led-ticker-label {
  flex-shrink: 0;
  font-family: 'Russo One', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: #ff3030;
  background: rgba(255, 48, 48, 0.1);
  border: 1px solid rgba(255, 48, 48, 0.3);
  padding: 2px 8px;
  border-radius: 3px;
  animation: led-pulse 1.5s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(255, 48, 48, 0.6);
}

@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.led-ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  /* Dot-matrix mask overlay */
  mask-image: 
    repeating-linear-gradient(90deg, #000 0px, #000 2px, transparent 2px, transparent 3px),
    repeating-linear-gradient(0deg, #000 0px, #000 2px, transparent 2px, transparent 3px);
  mask-composite: intersect;
  -webkit-mask-image: 
    repeating-linear-gradient(90deg, #000 0px, #000 2px, transparent 2px, transparent 3px),
    repeating-linear-gradient(0deg, #000 0px, #000 2px, transparent 2px, transparent 3px);
  -webkit-mask-composite: source-in;
}

.led-ticker-scroll {
  display: flex;
  white-space: nowrap;
  will-change: transform;
  animation: led-scroll-left 20s linear infinite;
}

.led-msg {
  font-family: 'Russo One', 'Courier New', monospace;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #ffb020;
  text-shadow: 0 0 6px rgba(255, 176, 32, 0.5), 0 0 12px rgba(255, 140, 0, 0.2);
  text-transform: uppercase;
  padding-right: 6rem;
  display: inline-block;
}

.led-msg.kill    { color: #ff4040; text-shadow: 0 0 6px rgba(255,64,64,0.5); }
.led-msg.join    { color: #40ff40; text-shadow: 0 0 6px rgba(64,255,64,0.5); }
.led-msg.leave   { color: #888; text-shadow: 0 0 4px rgba(136,136,136,0.3); }
.led-msg.event   { color: #40d0ff; text-shadow: 0 0 6px rgba(64,208,255,0.5); }
.led-msg.system  { color: #ffb020; }

@keyframes led-scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Push body content below fixed ticker */
body { padding-top: 52px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .led-ticker-scroll { animation: none; }
  .led-ticker-label { animation: none; }
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rust-orange); text-decoration: none; }
a:hover { color: var(--rust-ember); }
img { max-width: 100%; height: auto; }
code {
  font-family: 'Courier New', monospace;
  background: rgba(205, 74, 26, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--rust-yellow);
}

/* --- Media Viewer --- */
.media-viewer {
  max-width: 960px;
  margin: 0 auto;
}

.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid #222;
  box-shadow: 0 0 40px rgba(205, 74, 26, 0.15);
  cursor: pointer;
}

.media-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.media-img.loaded {
  opacity: 1;
}

.media-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.media-btn {
  background: var(--bg-card);
  border: 1px solid #333;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.media-btn:hover {
  border-color: var(--rust-orange);
  color: var(--rust-orange);
}

/* --- Fullscreen Overlay --- */
.fs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.fs-overlay.active {
  display: flex;
}

.fs-img {
  max-width: 95vw;
  max-height: 85vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.fs-img.loaded {
  opacity: 1;
}

.fs-controls {
  position: absolute;
  bottom: 2rem;
  display: flex;
  gap: 2rem;
  z-index: 10001;
}

.fs-btn {
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid #444;
  color: #fff;
  font-size: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.fs-btn:hover {
  border-color: var(--rust-orange);
  color: var(--rust-orange);
  background: rgba(50, 50, 50, 0.9);
}

.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 60%, var(--bg-dark) 100%),
    url('../images/header-1920.jpg') center/cover no-repeat;
}
@media (max-width: 1280px) {
  #hero { background-image: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 60%, var(--bg-dark) 100%), url('../images/header-1280.jpg'); background-size: cover; background-position: center; }
}
@media (max-width: 768px) {
  #hero { background-image: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 60%, var(--bg-dark) 100%), url('../images/header-768.jpg'); background-size: cover; background-position: center; }
}

.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.hero-logo {
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 3px solid var(--rust-orange);
  box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(205, 74, 26, 0.2);
  margin-bottom: 1.5rem;
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(205, 74, 26, 0.2); }
  50% { box-shadow: 0 0 60px var(--accent-glow), 0 0 120px rgba(205, 74, 26, 0.3); }
}

.hero-title {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--rust-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* Hero stat pills */
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.stat-pill {
  background: rgba(205, 74, 26, 0.15);
  border: 1px solid rgba(205, 74, 26, 0.3);
  border-radius: 50px;
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rust-yellow);
  backdrop-filter: blur(8px);
}
.stat-icon { margin-right: 0.3rem; }

/* Wipe countdown */
.wipe-countdown {
  margin-bottom: 2.5rem;
}
.wipe-label {
  font-family: 'Russo One', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--rust-orange);
  margin-bottom: 0.75rem;
}
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}
.cd-unit span {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--text-primary);
  line-height: 1;
}
.cd-unit small {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-top: 0.25rem;
}
.cd-sep {
  font-family: 'Russo One', sans-serif;
  font-size: 2rem;
  color: var(--rust-orange);
  padding-bottom: 1rem;
}

/* CTA buttons */
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Russo One', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--rust-orange), var(--rust-red));
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--accent-glow);
}
.btn-primary .btn-copied { display: none; }
.btn-primary.copied .btn-text { display: none; }
.btn-primary.copied .btn-copied { display: inline; }

.btn-discord {
  background: var(--discord-blue);
  color: #fff;
}
.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-2px);
  color: #fff;
}

.btn-green {
  background: #53FC18;
  color: #000;
  font-weight: 700;
}
.btn-green:hover {
  background: #45d414;
  transform: translateY(-2px);
  color: #000;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--rust-orange);
  color: var(--rust-orange);
}
.btn-outline:hover {
  background: rgba(205, 74, 26, 0.15);
  color: var(--rust-ember);
}
.btn-sm { padding: 0.6rem 1.5rem; font-size: 0.85rem; }

.connect-hint {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Scroll indicator */
.scroll-indicator {
  animation: scrollBounce 2s ease-in-out infinite;
  color: var(--text-muted);
  font-size: 1.2rem;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* ============================================================
   NAV
   ============================================================ */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(205, 74, 26, 0.2);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-logo {
  border-radius: 50%;
  border: 2px solid var(--rust-orange);
}
.nav-links {
  display: flex;
  gap: 0.25rem;
}
.nav-link {
  font-family: 'Russo One', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}
.nav-link:hover {
  color: var(--rust-orange);
  background: rgba(205, 74, 26, 0.1);
}
.nav-link.active {
  color: var(--rust-orange);
  background: rgba(205, 74, 26, 0.15);
  box-shadow: 0 0 12px rgba(205, 74, 26, 0.2);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: var(--section-pad) 1.5rem;
}
.section-dark {
  background: var(--bg-section);
}
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-title {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  color: var(--text-primary);
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--rust-orange);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* --- About grid --- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.about-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
}
.about-card:hover {
  border-color: rgba(205, 74, 26, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.about-card h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 1.1rem;
  color: var(--rust-yellow);
  margin-bottom: 0.5rem;
}
.about-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* --- Server grid --- */
.server-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .server-grid { grid-template-columns: 1fr; }
}
.server-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  overflow: hidden;
}
.server-banner {
  width: 100%;
  display: block;
  border-bottom: 2px solid var(--rust-orange);
}
.server-details { padding: 1.5rem; }
.server-table { width: 100%; border-collapse: collapse; }
.server-table td {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.95rem;
}
.server-table td:first-child {
  color: var(--text-dim);
  font-weight: 500;
  width: 40%;
}
.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}
.copy-btn:hover { background: rgba(205, 74, 26, 0.2); }
.copy-btn.copied { color: #4ade80; }

.status-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.status-card h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.status-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: statusPulse 2s infinite;
}
.status-indicator.online .status-dot { background: #4ade80; box-shadow: 0 0 12px rgba(74,222,128,0.5); }
.status-indicator.offline .status-dot { background: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,0.5); }
@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.status-text {
  font-family: 'Russo One', sans-serif;
  font-size: 1.2rem;
}
.status-indicator.online .status-text { color: #4ade80; }
.status-indicator.offline .status-text { color: #ef4444; }
.status-details { display: flex; flex-direction: column; gap: 0.5rem; }
.status-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
}
.status-row span:first-child { color: var(--text-dim); }
.status-row span:last-child { color: var(--text-primary); font-weight: 500; }

/* --- Rules grid --- */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.rule-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.rule-card:hover {
  border-color: rgba(205, 74, 26, 0.3);
}
.rule-num {
  font-family: 'Russo One', sans-serif;
  font-size: 3rem;
  color: rgba(205, 74, 26, 0.15);
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  line-height: 1;
}
.rule-card h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 1rem;
  color: var(--rust-yellow);
  margin-bottom: 0.5rem;
}
.rule-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* --- News grid --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
  border-left: 3px solid var(--rust-orange);
}
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.news-date {
  font-size: 0.8rem;
  color: var(--rust-orange);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.news-card h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.news-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* --- Community grid --- */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.community-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}
.community-card:hover {
  border-color: rgba(205, 74, 26, 0.3);
  transform: translateY(-4px);
}
.social-icon {
  margin-bottom: 1rem;
  filter: brightness(0.9);
  transition: filter 0.3s;
}
.community-card:hover .social-icon { filter: brightness(1.1); }
.community-card h3 {
  font-family: 'Russo One', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.community-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.discord-card {
  border-color: rgba(88, 101, 242, 0.3);
}
.discord-card:hover {
  border-color: rgba(88, 101, 242, 0.5);
  box-shadow: 0 0 30px rgba(88, 101, 242, 0.15);
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--bg-section);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 2rem 1.5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Russo One', sans-serif;
  font-size: 1.1rem;
  color: var(--rust-orange);
}
.footer-brand img { border-radius: 50%; }
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--rust-orange); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .hero-logo { width: 100px; height: 100px; }
  .hero-stats { gap: 0.5rem; }
  .stat-pill { font-size: 0.8rem; padding: 0.4rem 0.8rem; }
  .cd-unit { min-width: 45px; }
  .cd-unit span { font-size: 1.5rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; }
  .nav-links { gap: 0; }
  .nav-link { font-size: 0.7rem; padding: 0.4rem 0.6rem; }
  .about-grid, .rules-grid, .news-grid, .community-grid {
    grid-template-columns: 1fr;
  }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
