/* ============================================
   DOMINION MMO: Shared Production Styles
   Dark fantasy theme with gold accents
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #0d1222;
  --bg-tertiary: #131a2e;
  --bg-card: #111827;
  --bg-card-hover: #1a2440;

  --text-primary: #e8e6e3;
  --text-secondary: #a8a6a0;
  --text-muted: #918e85;

  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dark: #d97706;

  --indigo: #6366f1;
  --indigo-light: #818cf8;
  --indigo-dark: #4f46e5;

  /* Faction colors */
  --faction-accord: #f59e0b;
  --faction-reclaimers: #8b5cf6;
  --faction-wildborn: #22c55e;

  --accent-green: #22c55e;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;

  --border-subtle: rgba(99, 102, 241, 0.12);
  --border-medium: rgba(99, 102, 241, 0.25);
  --border-gold: rgba(245, 158, 11, 0.25);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
  --shadow-gold-glow: 0 0 30px rgba(245, 158, 11, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: Georgia, 'Times New Roman', Times, serif;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  --max-width: 1200px;
  --header-height: 72px;
}

/* --- Inter, served from fonts/ (SIL Open Font License, fonts/OFL.txt) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold-light);
}

/* Every link, button, summary and field shows where keyboard focus is. */
:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.text-gold { color: var(--gold); }
.text-indigo { color: var(--indigo); }
.text-muted { color: var(--text-muted); }

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

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

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.section-divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--indigo), transparent);
  margin: 1.5rem auto;
}

.section-alt {
  background: var(--bg-secondary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--indigo-light), var(--indigo));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg-primary);
  box-shadow: var(--shadow-gold-glow);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--indigo-light);
  border: 2px solid var(--indigo);
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #fff;
  border-color: var(--indigo-light);
  transform: translateY(-2px);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-outline-gold:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1.1rem 2.8rem;
  font-size: 1.15rem;
}

.btn-sm {
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
}

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(10, 14, 26, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo:hover {
  color: var(--gold-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
  letter-spacing: 0.02em;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--indigo);
  transition: width var(--transition-normal);
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  margin-left: 0.5rem;
}

/* Mobile hamburger */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1010;
}

.mobile-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-normal);
  border-radius: 2px;
}

.mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1004;
}

.mobile-overlay.open {
  display: block;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 6rem 1.5rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 14, 26, 0.6) 0%, rgba(10, 14, 26, 0.3) 40%, rgba(10, 14, 26, 0.8) 80%, var(--bg-primary) 100%),
    radial-gradient(ellipse at 50% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--indigo-light);
  border-radius: 50%;
  opacity: 0;
  animation: float-particle 8s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 7s; }
.particle:nth-child(2) { left: 25%; animation-delay: 1.5s; animation-duration: 9s; }
.particle:nth-child(3) { left: 40%; animation-delay: 3s; animation-duration: 6s; }
.particle:nth-child(4) { left: 55%; animation-delay: 0.5s; animation-duration: 10s; }
.particle:nth-child(5) { left: 70%; animation-delay: 2s; animation-duration: 8s; }
.particle:nth-child(6) { left: 85%; animation-delay: 4s; animation-duration: 7s; }
.particle:nth-child(7) { left: 15%; animation-delay: 5s; animation-duration: 9s; }
.particle:nth-child(8) { left: 60%; animation-delay: 1s; animation-duration: 11s; }

@keyframes float-particle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--indigo-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s ease forwards;
  background: rgba(99, 102, 241, 0.08);
}

.hero-logo {
  max-width: 400px;
  margin: 0 auto 1.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-logo img {
  width: 100%;
  filter: drop-shadow(0 4px 20px rgba(245, 158, 11, 0.3));
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 40%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
  line-height: 1.1;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease 0.4s both;
  font-family: var(--font-heading);
  font-style: italic;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
  color: var(--text-muted);
}

.hero-scroll-indicator svg {
  width: 28px;
  height: 28px;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Feature Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--indigo-dark), var(--indigo-light), var(--indigo-dark));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.6rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* --- Class Showcase --- */
.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.class-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.class-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-medium);
}

.class-card-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.class-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.class-card:hover .class-card-img img {
  transform: scale(1.05);
}

.class-card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(transparent, var(--bg-card));
}

.class-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  text-align: center;
}

.class-card-body h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.class-role {
  color: var(--indigo-light);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: block;
}

.role-dps { color: #ef4444; }
.role-tank { color: #3b82f6; }
.role-healer { color: #22c55e; }
.role-hybrid { color: var(--gold); }

.class-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* --- Faction Section --- */
.faction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.faction-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.faction-card:hover {
  transform: translateY(-4px);
}

.faction-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.faction-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.faction-card:hover .faction-card-img img {
  transform: scale(1.05);
}

.faction-card-body {
  padding: 1.5rem;
  text-align: center;
}

.faction-card-body .faction-emblem-img {
  width: 64px;
  height: 64px;
  margin: -48px auto 0.75rem;
  position: relative;
  z-index: 2;
  border-radius: 50%;
  border: 3px solid;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.faction-card-body h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.faction-motto {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: block;
}

.faction-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Accord */
.faction-accord {
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.15);
}
.faction-accord:hover { box-shadow: 0 8px 40px rgba(245, 158, 11, 0.1); }
.faction-accord h3 { color: var(--gold); }
.faction-accord .faction-motto { color: rgba(245, 158, 11, 0.6); }
.faction-accord .faction-emblem-img { border-color: var(--gold); color: var(--gold); }

/* Reclaimers */
.faction-reclaimers {
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.15);
}
.faction-reclaimers:hover { box-shadow: 0 8px 40px rgba(139, 92, 246, 0.1); }
.faction-reclaimers h3 { color: var(--accent-purple); }
.faction-reclaimers .faction-motto { color: rgba(139, 92, 246, 0.6); }
.faction-reclaimers .faction-emblem-img { border-color: var(--accent-purple); color: var(--accent-purple); }

/* Wildborn */
.faction-wildborn {
  background: rgba(34, 197, 94, 0.04);
  border: 1px solid rgba(34, 197, 94, 0.15);
}
.faction-wildborn:hover { box-shadow: 0 8px 40px rgba(34, 197, 94, 0.1); }
.faction-wildborn h3 { color: var(--accent-green); }
.faction-wildborn .faction-motto { color: rgba(34, 197, 94, 0.6); }
.faction-wildborn .faction-emblem-img { border-color: var(--accent-green); color: var(--accent-green); }

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 16/10;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(10, 14, 26, 0.7));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item.featured {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

/* --- Pricing Section --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--indigo);
  box-shadow: var(--shadow-glow);
}

.pricing-card.featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--indigo-dark), var(--indigo-light), var(--indigo-dark));
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
  color: #fff;
  padding: 0.25rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pricing-card h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.pricing-card .price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.pricing-card .price .currency {
  font-size: 1.5rem;
  vertical-align: super;
}

.pricing-card .price .period {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-card .price-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.pricing-features {
  text-align: left;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.pricing-features li .check {
  color: var(--accent-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Newsletter / CTA Section --- */
.newsletter-section {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.newsletter-section .newsletter-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
}

.newsletter-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 300px;
}

.footer-links h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links a {
  display: block;
  padding: 0.3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  font-size: 0.9rem;
}

.footer-social a:hover {
  background: var(--indigo);
  color: #fff;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--border-medium);
}

/* --- Tabs --- */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-subtle);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.tab-btn {
  padding: 0.85rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--indigo-light);
  border-bottom-color: var(--indigo);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

/* --- Status Indicators --- */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-dot.offline {
  background: var(--accent-red);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.status-dot.degraded {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.status-dot.checking {
  background: var(--text-muted);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-green {
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.1);
  color: var(--indigo-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* --- Page Hero (for subpages) --- */
.page-hero {
  padding: calc(var(--header-height) + 4rem) 0 3rem;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* --- Scroll Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }

/* --- Utility Classes --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* --- News / Blog --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.news-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.news-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-card:hover .news-card-img img {
  transform: scale(1.05);
}

.news-card-body {
  padding: 1.5rem;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.news-card-meta .date {
  color: var(--text-muted);
}

.news-card-body h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-card-body h3 a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.news-card-body h3 a:hover {
  color: var(--indigo-light);
}

.news-card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.news-featured {
  grid-column: span 2;
}

.news-featured .news-card-img {
  height: 300px;
}

/* --- Event Calendar --- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.calendar-day {
  background: var(--bg-card);
  padding: 0.75rem;
  min-height: 80px;
  font-size: 0.85rem;
}

.calendar-day.today {
  background: rgba(99, 102, 241, 0.1);
}

.calendar-day.has-event {
  border-left: 3px solid var(--indigo);
}

.calendar-day-num {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.calendar-event {
  font-size: 0.75rem;
  color: var(--indigo-light);
  padding: 0.15rem 0;
}

/* --- Account Page --- */
.account-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  padding-top: calc(var(--header-height) + 2rem);
  min-height: 100vh;
}

.account-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  padding: 2rem 1rem;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.account-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.account-sidebar-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.account-sidebar-nav a.active {
  color: var(--indigo-light);
  background: rgba(99, 102, 241, 0.1);
}

.account-main {
  padding: 2rem;
  max-width: 800px;
}

.account-section {
  margin-bottom: 3rem;
}

.account-section h2 {
  font-family: var(--font-body);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Character cards */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.character-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  transition: all var(--transition-fast);
}

.character-card:hover {
  border-color: var(--border-medium);
}

.character-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.character-info h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.character-info .char-details {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Transaction table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.data-table th,
.data-table td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.data-table tr:hover td {
  background: rgba(99, 102, 241, 0.03);
}

/* --- Status Page Specifics --- */
.status-banner {
  margin: 2rem 0;
  padding: 1.25rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.status-banner.operational {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--accent-green);
}

.status-banner.degraded {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--gold);
}

.status-banner.issues {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--accent-red);
}

.status-banner-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.status-banner.operational .status-banner-dot { background: var(--accent-green); }
.status-banner.degraded .status-banner-dot { background: var(--gold); }
.status-banner.issues .status-banner-dot { background: var(--accent-red); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition-fast);
}

.service-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.service-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.service-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.service-port {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
}

.lang-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
}

.lang-badge.rust { background: #a0432f; }
.lang-badge.go { background: #00758f; }
.lang-badge.python { background: #3776ab; }

.response-time {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

.response-time.fast { color: var(--accent-green); }
.response-time.medium { color: var(--gold); }
.response-time.slow { color: #f97316; }
.response-time.timeout { color: var(--accent-red); }

/* Uptime history bars */
.history-container { margin-top: 1rem; }

.history-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.history-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 150px;
  flex-shrink: 0;
}

.history-bar-container {
  flex: 1;
  display: flex;
  gap: 2px;
  height: 20px;
  align-items: center;
}

.history-bar-segment {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.history-bar-segment:hover { opacity: 0.7; }
.history-bar-segment.up { background: var(--accent-green); opacity: 0.8; }
.history-bar-segment.degraded { background: var(--gold); opacity: 0.8; }
.history-bar-segment.down { background: var(--accent-red); opacity: 0.8; }

.history-uptime {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 55px;
  text-align: right;
  flex-shrink: 0;
}

.history-uptime.perfect { color: var(--accent-green); }

.history-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.history-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.history-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.history-legend-dot.up { background: var(--accent-green); }
.history-legend-dot.degraded { background: var(--gold); }
.history-legend-dot.down { background: var(--accent-red); }

/* Maintenance & Incidents */
.incident-list {
  margin-top: 1rem;
}

.incident-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.incident-item h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.incident-item .incident-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.incident-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .class-grid { grid-template-columns: repeat(2, 1fr); }
  .faction-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .news-featured { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .account-layout { grid-template-columns: 200px 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 64px; }
  .section { padding: 3.5rem 0; }

  .mobile-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    transition: right var(--transition-normal);
    z-index: 1005;
    align-items: stretch;
  }

  .nav-links.open { right: 0; }

  .nav-links a {
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-links a::after { display: none; }
  .nav-cta { margin-left: 0; margin-top: 1rem; }

  .hero { min-height: 90vh; padding: 5rem 1.5rem 3rem; }
  .hero-title { letter-spacing: 0.08em; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 300px; }
  .hero-logo { max-width: 260px; }

  .features-grid { grid-template-columns: 1fr; }
  .class-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .faction-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.featured { grid-column: span 1; grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }

  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar {
    position: relative;
    top: auto;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .account-sidebar-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .account-sidebar-nav a { padding: 0.5rem 0.75rem; font-size: 0.85rem; }

  .service-grid { grid-template-columns: 1fr; }
  .history-label { min-width: 100px; font-size: 0.75rem; }

  .calendar-grid { grid-template-columns: repeat(7, 1fr); }
  .calendar-day { min-height: 50px; padding: 0.35rem; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .container { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
  .section-header { margin-bottom: 2rem; }
  .hero { min-height: 85vh; }
  .class-grid { grid-template-columns: 1fr; }
  .class-card-img { height: 180px; }
  .pricing-card { padding: 2rem 1.5rem; }
  .pricing-card .price { font-size: 2.5rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { gap: 1.5rem; }
  .character-grid { grid-template-columns: 1fr; }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .animate-on-scroll { opacity: 1; transform: none; }
  .particle { display: none; }
}

@media (prefers-contrast: high) {
  :root {
    --border-subtle: rgba(99, 102, 241, 0.35);
    --border-medium: rgba(99, 102, 241, 0.55);
    --text-muted: #908e86;
  }
  .feature-card, .class-card, .pricing-card, .faction-card,
  .news-card, .service-card, .card, .incident-item { border-width: 2px; }
}

@media print {
  .site-header, .hero-particles, .hero-scroll-indicator,
  .newsletter-section, .mobile-toggle, .btn { display: none !important; }
  body { background: white; color: black; }
  .hero { min-height: auto; padding: 2rem 0; }
  .section { padding: 1.5rem 0; }
}
