/* ==========================================================================
   Skull & Bones — Master Global Stylesheet
   skullnbones.org Core Theme
   ========================================================================== */

/* --- Theme Tokens & Variables --- */
:root {
  --bg-dark: #0a0612;
  --bg-surface: rgba(18, 12, 34, 0.82);
  --bg-surface-elevated: rgba(24, 15, 45, 0.92);
  
  --purple-primary: #9b4dff;
  --purple-glow: rgba(155, 77, 255, 0.45);
  --magenta-accent: #d946ef;
  --cyan-primary: #00f2fe;
  --cyan-glow: rgba(0, 242, 254, 0.35);
  --emerald-accent: #00ffaa;
  --gold-awards: #fde047;
  --gold-glow: rgba(253, 224, 71, 0.35);
  
  --border-subtle: rgba(155, 77, 255, 0.2);
  --border-active: rgba(157, 78, 221, 0.5);
  
  --text-main: #ffffff;
  --text-muted: #8e7ea5;
  
  /* Ecosystem Service Brands */
  --color-fandango: #ff944d;
  --color-ma: #ff5da2;
  --color-appletv: #ffffff;
}

/* --- Reset & Global Baseline --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(155, 77, 255, 0.15) 0%, transparent 65%),
    linear-gradient(180deg, rgba(10, 6, 18, 0.75) 0%, rgba(10, 6, 18, 0.94) 100%),
    url('../assets/hero-banner.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- 3-Column Anchored Navigation Grid --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 6, 18, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 420px 1fr 420px;
  align-items: center;
  padding: 0.75rem 2rem;
}

.navbar-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.navbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.site-logo {
  height: 52px;
  width: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--purple-glow));
  flex-shrink: 0;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.host-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--magenta-accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1px;
}

.brand-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.brand-title {
  font-family: 'Cinzel', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  line-height: 1;
}

.brand-title .glow-purple {
  color: var(--purple-primary);
  text-shadow: 0 0 10px var(--purple-glow);
}

.brand-domain {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
}

.brand-tagline {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  text-shadow: 0 0 8px var(--purple-primary);
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 12, 34, 0.96);
  min-width: 210px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  padding: 0.5rem 0;
  z-index: 1100;
  backdrop-filter: blur(14px);
}

.dropdown-content a {
  color: var(--text-muted);
  padding: 0.65rem 1.25rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background: rgba(155, 77, 255, 0.15);
  color: #ffffff;
  text-shadow: 0 0 8px var(--purple-primary);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.btn-glow {
  background: transparent;
  color: #fff;
  border: 1px solid var(--purple-primary);
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 10px var(--purple-glow);
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-glow:hover {
  background: var(--purple-primary);
  box-shadow: 0 0 20px var(--purple-primary);
  color: #000;
}

/* --- Section Containers & Badges --- */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.host-badge {
  display: inline-block;
  padding: 0.35rem 1.25rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-subtle);
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: 2.4rem;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- Buttons --- */
.btn-primary {
  background: linear-gradient(135deg, var(--purple-primary), var(--magenta-accent));
  color: #fff;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 20px var(--purple-glow);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  box-shadow: 0 0 30px var(--magenta-accent);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(18, 12, 34, 0.85);
  color: #fff;
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
}

/* --- Back to Top Trigger --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 990;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(18, 12, 34, 0.88);
  border: 1px solid var(--purple-primary);
  color: #ffffff;
  padding: 0.6rem 1.1rem;
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(12px);
  box-shadow: 0 0 15px var(--purple-glow), 0 8px 24px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--purple-primary);
  color: #000000;
  box-shadow: 0 0 25px var(--purple-primary);
  transform: translateY(-3px);
}

.back-to-top .arrow-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.back-to-top:hover .arrow-icon {
  transform: translateY(-2px);
}

/* --- Flair Banner & Footer --- */
.flair-banner {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  padding: 1.75rem 1rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.stat-item {
  text-align: center;
}

.stat-item h4 {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-bottom: 0.25rem;
}

.stat-highlight {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.status-online {
  color: var(--emerald-accent);
  text-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
}

.divider {
  width: 1px;
  height: 30px;
  background: var(--border-subtle);
}

.site-footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Global Responsive Rules --- */
@media (max-width: 1024px) {
  .navbar {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
    text-align: center;
  }
  .navbar-left, .navbar-right {
    justify-content: center;
  }
}

@media (max-width: 650px) {
  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.75rem;
  }
}