/* ============================================================================
   Variables
   ========================================================================== */
:root {
  /* Colors - Dark Fantasy Palette */
  --color-bg: #05060a; /* main background */
  --color-bg-elevated: #0b0d14;
  --color-bg-soft: #101320;

  --color-text: #f4f5f8;
  --color-text-muted: #a0a5b8;
  --color-text-soft: #6d748a;

  --color-primary: #e0a75f; /* warm gold accent */
  --color-primary-soft: rgba(224, 167, 95, 0.12);
  --color-primary-strong: #f8c170;

  --color-success: #4fa86c;
  --color-warning: #e0b45f;
  --color-danger: #e15c5c;

  --color-border-subtle: #232633;
  --color-border-strong: #313545;

  --color-neutral-50: #f8fafc;
  --color-neutral-100: #e2e8f0;
  --color-neutral-200: #cbd5f5;
  --color-neutral-300: #94a3b8;
  --color-neutral-400: #64748b;
  --color-neutral-500: #475569;
  --color-neutral-600: #334155;
  --color-neutral-700: #1f2933;
  --color-neutral-800: #111827;
  --color-neutral-900: #020617;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --font-mono: "Fira Code", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.15;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows - subtle, cinematic */
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.45);
  --shadow-medium: 0 18px 45px rgba(0, 0, 0, 0.6);
  --shadow-strong: 0 30px 80px rgba(0, 0, 0, 0.8);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --layout-max-width: 1200px;
  --layout-max-width-wide: 1440px;
  --layout-gutter: var(--space-4);
}

/* ============================================================================
   Reset / Normalize
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
,time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* Ensure HTML5 elements display correctly in older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Responsive media */
img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* ============================================================================
   Base Styles
   ========================================================================== */
body {
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  min-height: 60vh;
}

/* Headings - cinematic display with controlled margins */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-neutral-50);
}

h1 {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

h5 {
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
}

h6 {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

p + p {
  margin-top: -4px;
}

strong,
b {
  font-weight: 600;
}

em,
i {
  font-style: italic;
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

pre {
  background: #05070f;
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  overflow: auto;
}

small {
  font-size: 0.875em;
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal),
              text-shadow var(--transition-normal),
              opacity var(--transition-fast);
}

a:hover {
  color: var(--color-primary-strong);
  text-shadow: 0 0 12px rgba(224, 167, 95, 0.4);
}

a:active {
  opacity: 0.85;
}

/* Lists */
ul[data-style="disc"],
ol[data-style="decimal"] {
  margin-left: var(--space-4);
  margin-bottom: var(--space-3);
}

ul[data-style="disc"] {
  list-style: disc;
}

ol[data-style="decimal"] {
  list-style: decimal;
}

/* Horizontal rule */
hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-strong), transparent);
  margin: var(--space-6) 0;
}

/* Forms base */
input,
textarea,
select,
button {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

/* ============================================================================
   Accessibility & Motion
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   Utilities
   ========================================================================== */
/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--layout-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--layout-gutter);
  padding-right: var(--layout-gutter);
}

.container-wide {
  width: 100%;
  max-width: var(--layout-max-width-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--layout-gutter);
  padding-right: var(--layout-gutter);
}

.section-padded {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

@media (min-width: 768px) {
  .section-padded {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
}

/* Flex utilities */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

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

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-xs {
  gap: var(--space-1);
}

.gap-sm {
  gap: var(--space-2);
}

.gap-md {
  gap: var(--space-3);
}

.gap-lg {
  gap: var(--space-4);
}

.gap-xl {
  gap: var(--space-6);
}

/* Grid utilities */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Spacing utilities (common subset) */
.mt-0 { margin-top: 0 !important; }
.mt-xs { margin-top: var(--space-1) !important; }
.mt-sm { margin-top: var(--space-2) !important; }
.mt-md { margin-top: var(--space-3) !important; }
.mt-lg { margin-top: var(--space-4) !important; }
.mt-xl { margin-top: var(--space-6) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-xs { margin-bottom: var(--space-1) !important; }
.mb-sm { margin-bottom: var(--space-2) !important; }
.mb-md { margin-bottom: var(--space-3) !important; }
.mb-lg { margin-bottom: var(--space-4) !important; }
.mb-xl { margin-bottom: var(--space-6) !important; }

.pt-md { padding-top: var(--space-3) !important; }
.pb-md { padding-bottom: var(--space-3) !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-muted { color: var(--color-text-muted) !important; }

/* 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;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Cinematic overlay helpers for hero sections */
.hero-overlay-dark {
  position: relative;
}



/* ============================================================================
   Components
   ========================================================================== */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.7em 1.4em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #1b1510, #2a1c10);
  color: var(--color-primary-strong);
  box-shadow: 0 0 0 1px rgba(224, 167, 95, 0.35), var(--shadow-soft);
  transition: background var(--transition-normal),
              color var(--transition-normal),
              box-shadow var(--transition-normal),
              transform var(--transition-fast),
              border-color var(--transition-fast);
}

.btn:hover {
  background: linear-gradient(135deg, #2a1c10, #3a2714);
  color: #fffaf0;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(248, 193, 112, 0.7), var(--shadow-medium);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(248, 193, 112, 0.5), var(--shadow-soft);
}

.btn-primary {
  background: linear-gradient(135deg, #c6883e, #f3c173);
  color: #140b03;
  border-color: rgba(248, 193, 112, 0.8);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f3c173, #ffdca0);
  color: #120802;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(224, 167, 95, 0.4);
  color: var(--color-primary-strong);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(224, 167, 95, 0.08);
  box-shadow: 0 0 0 1px rgba(224, 167, 95, 0.55);
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Form Inputs */
.input,
textarea,
select {
  width: 100%;
  padding: 0.7em 0.85em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-bg-soft);
  color: var(--color-text);
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              background-color var(--transition-fast);
}

.input::placeholder,
textarea::placeholder {
  color: var(--color-text-soft);
}

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(224, 167, 95, 0.7), 0 0 0 4px rgba(224, 167, 95, 0.16);
}

.input[aria-invalid="true"],
.input.is-error {
  border-color: var(--color-danger);
}

.field-label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.field-help {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--color-text-soft);
}

.field-error {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--color-danger);
}

/* Card - for world & lore panels, guides, posts */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background: radial-gradient(circle at top left, rgba(224, 167, 95, 0.08), transparent 52%),
              linear-gradient(145deg, rgba(12, 14, 24, 0.98), rgba(5, 6, 10, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(224, 167, 95, 0.12);
  mix-blend-mode: screen;
}

.card-header {
  margin-bottom: var(--space-3);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

.card-meta {
  font-size: 0.8rem;
  color: var(--color-text-soft);
}

.card-body {
  color: var(--color-text-muted);
}

.card-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Tag / Pill (for factions, classes, categories) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.7em;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(224, 167, 95, 0.45);
  color: var(--color-primary-strong);
  background: rgba(224, 167, 95, 0.1);
}

.badge-muted {
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--color-text-soft);
  background: rgba(15, 23, 42, 0.8);
}

/* Table - for stats, builds, platform comparison */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table thead {
  background: rgba(15, 23, 42, 0.9);
}

.table th,
.table td {
  padding: 0.75em 0.85em;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.table th {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.6);
}

/* Alert / Callout - for warnings, notes in guides */
.alert {
  border-radius: var(--radius-md);
  padding: var(--space-3);
  border: 1px solid var(--color-border-subtle);
  background: rgba(15, 23, 42, 0.9);
  font-size: 0.95rem;
}

.alert-success {
  border-color: rgba(79, 168, 108, 0.8);
  background: rgba(15, 35, 27, 0.96);
}

.alert-warning {
  border-color: rgba(224, 180, 95, 0.8);
  background: rgba(35, 27, 14, 0.96);
}

.alert-danger {
  border-color: rgba(225, 92, 92, 0.8);
  background: rgba(40, 16, 18, 0.96);
}

/* Page section title (for SEO + visual hierarchy) */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.section-subtitle {
  max-width: 48rem;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

/* Hero text alignment helper */
.hero-content-narrow {
  max-width: 40rem;
}

/* Footer basics */
.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
  padding: var(--space-6) 0;
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.site-footer a {
  color: var(--color-text-muted);
}

.site-footer a:hover {
  color: var(--color-primary-strong);
}

/* Basic layout for main nav (non-opinionated) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(5, 6, 10, 0.94), rgba(5, 6, 10, 0.88));
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.site-logo {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.site-logo span {
  color: var(--color-primary-strong);
}

.nav-list {
  display: flex;
  gap: var(--space-4);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-link {
  position: relative;
  color: var(--color-text-soft);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #c6883e, #f3c173);
  transition: width var(--transition-normal);
}

.nav-link:hover {
  color: var(--color-neutral-50);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.is-active {
  color: var(--color-primary-strong);
}

.nav-link.is-active::after {
  width: 100%;
}

/* Mobile navigation toggle placeholder */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.9);
}

@media (min-width: 960px) {
  .nav-toggle {
    display: none;
  }
}

/* Simple chip for monetization labels (ads, affiliate, sponsored) */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.75em;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: var(--color-text-soft);
}

.chip-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chip-affiliate {
  border-color: rgba(94, 234, 212, 0.6);
  color: #a5f3fc;
}

.chip-sponsored {
  border-color: rgba(224, 167, 95, 0.7);
  color: var(--color-primary-strong);
}

.chip-premium {
  border-color: rgba(139, 92, 246, 0.8);
  color: #ddd6fe;
}

/* End of base.css */
