/* ============================================================
   DOTA PATCH ANALYZER — Design Tokens & Base Styles
   Designer Agent — April 2026
   Dark Fantasy / Dota 2 Epic Analytics Aesthetic
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Custom Properties (Design Tokens) ────────────────── */
:root {

  /* --- Background Colors --- */
  --color-bg-primary:     #0D1117;   /* Deepest navy — page background */
  --color-bg-secondary:   #161B22;   /* Section backgrounds */
  --color-bg-surface:     #21262D;   /* Card surfaces */
  --color-bg-elevated:    #2D333B;   /* Modals, tooltips, dropdowns */
  --color-bg-overlay:     rgba(13, 17, 23, 0.85); /* Dark overlay on images */

  /* --- Gold Palette --- */
  --color-gold:           #C89B3C;   /* Primary gold — borders, headings */
  --color-gold-light:     #E8C060;   /* Hover/active gold, glows */
  --color-gold-dark:      #A07830;   /* Subtle gold shadows */
  --color-gold-alpha-20:  rgba(200, 155, 60, 0.20);
  --color-gold-alpha-40:  rgba(200, 155, 60, 0.40);

  /* --- Red Palette --- */
  --color-red:            #8B0000;   /* Dark red — danger, nerfs */
  --color-red-bright:     #CC2200;   /* Alert red — critical info */
  --color-red-alpha-20:   rgba(139, 0, 0, 0.20);

  /* --- Text Colors --- */
  --color-text-primary:   #F0F6FC;   /* Main text */
  --color-text-secondary: #C0C0C0;   /* Silver — labels, secondary */
  --color-text-muted:     #8B949E;   /* Disabled, placeholder, muted */
  --color-text-gold:      #C89B3C;   /* Gold headings */

  /* --- Semantic Colors --- */
  --color-positive:       #238636;   /* Buffs, positive changes */
  --color-positive-bg:    rgba(35, 134, 54, 0.15);
  --color-negative:       #CC2200;   /* Nerfs, negative changes */
  --color-negative-bg:    rgba(204, 34, 0, 0.15);
  --color-neutral:        #1F6FEB;   /* Info, links */
  --color-neutral-bg:     rgba(31, 111, 235, 0.15);
  --color-warning:        #D29922;   /* Minor changes, adjustments */
  --color-warning-bg:     rgba(210, 153, 34, 0.15);

  /* --- Border Styles --- */
  --border-color-gold:    #C89B3C;
  --border-color-dark:    #30363D;
  --border-color-surface: #21262D;
  --border-gold:          1px solid #C89B3C;
  --border-dark:          1px solid #30363D;
  --border-surface:       1px solid #21262D;

  /* --- Spacing Scale --- */
  --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;

  /* --- Border Radius --- */
  --radius-xs:   2px;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* --- Font Families --- */
  --font-display:  'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
  --font-heading:  'Rajdhani', 'Orbitron', 'Segoe UI', sans-serif;
  --font-body:     'Inter', 'Segoe UI', 'Roboto', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* --- Font Sizes --- */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-5xl:  3rem;       /* 48px */
  --text-6xl:  3.75rem;    /* 60px */

  /* --- Font Weights --- */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-black:    900;

  /* --- Line Heights --- */
  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.5;
  --leading-relaxed:1.625;
  --leading-loose:  2;

  /* --- Box Shadows --- */
  --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm:   0 1px 4px rgba(0, 0, 0, 0.5);
  --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg:   0 8px 32px rgba(0, 0, 0, 0.8);
  --shadow-xl:   0 16px 64px rgba(0, 0, 0, 0.9);

  --shadow-gold:       0 4px 20px rgba(200, 155, 60, 0.30);
  --shadow-gold-hover: 0 6px 28px rgba(200, 155, 60, 0.50);
  --shadow-red:        0 4px 20px rgba(139, 0, 0, 0.40);
  --glow-gold:         0 0 8px rgba(200, 155, 60, 0.60);
  --glow-gold-intense: 0 0 20px rgba(200, 155, 60, 0.80);

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-bounce: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Z-Index Layers --- */
  --z-below:   -1;
  --z-base:     1;
  --z-raised:   10;
  --z-overlay:  20;
  --z-drawer:   50;
  --z-modal:   100;
  --z-tooltip: 200;
  --z-nav:     500;
  --z-top:    9999;

  /* --- Layout --- */
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1536px;
  --nav-height:    64px;

  /* --- Image Paths --- */
  --img-hero-banner:  url('../images/hero-banner.jpg');
  --img-site-logo:    url('../images/site-logo.jpg');
  --img-hero-frame:   url('../images/hero-frame.jpg');
  --img-patch-bg:     url('../images/patch-bg.jpg');
  --img-meta-banner:  url('../images/meta-banner.jpg');
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
}

/* ── Typography Base ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-gold);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

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

/* ── Utility Classes ──────────────────────────────────────── */

/* Text colors */
.text-gold      { color: var(--color-gold) !important; }
.text-silver    { color: var(--color-text-secondary) !important; }
.text-muted     { color: var(--color-text-muted) !important; }
.text-positive  { color: var(--color-positive) !important; }
.text-negative  { color: var(--color-negative) !important; }
.text-neutral   { color: var(--color-neutral) !important; }
.text-warning   { color: var(--color-warning) !important; }

/* Background colors */
.bg-primary   { background-color: var(--color-bg-primary); }
.bg-secondary { background-color: var(--color-bg-secondary); }
.bg-surface   { background-color: var(--color-bg-surface); }
.bg-elevated  { background-color: var(--color-bg-elevated); }

/* Borders */
.border-gold  { border: var(--border-gold); }
.border-dark  { border: var(--border-dark); }

/* Gold glow effect */
.glow-gold {
  box-shadow: var(--glow-gold);
}

/* Gradient text gold */
.text-gradient-gold {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 50%, var(--color-gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout Components ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

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

/* ── Navigation ──────────────────────────────────���────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: rgba(13, 17, 23, 0.95);
  border-bottom: var(--border-gold);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar__logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.navbar__links {
  display: flex;
  list-style: none;
  gap: var(--space-8);
}

.navbar__links a {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding-bottom: var(--space-1);
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-gold);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--color-gold);
}

.navbar__links a:hover::after,
.navbar__links a.active::after {
  transform: scaleX(1);
}

/* ── Hero Section (Header Banner) ────────────────────────── */
.hero-section {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: var(--img-hero-banner);
  background-size: cover;
  background-position: center top;
  overflow: hidden;
  margin-top: var(--nav-height);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 17, 23, 0.3) 0%,
    rgba(13, 17, 23, 0.6) 60%,
    rgba(13, 17, 23, 1.0) 100%
  );
}

.hero-section__content {
  position: relative;
  z-index: var(--z-raised);
  padding: var(--space-20) var(--space-6);
}

.hero-section__title {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: var(--weight-black);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold), var(--color-gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  margin-bottom: var(--space-4);
}

.hero-section__subtitle {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background-color: var(--color-bg-surface);
  border: var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

/* ── Hero Card ────────────────────────────────────────────── */
.hero-card {
  position: relative;
  background-color: var(--color-bg-surface);
  border: var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hero-card__portrait {
  position: relative;
  width: 100%;
  padding-top: 75%;  /* 4:3 ratio */
  overflow: hidden;
}

.hero-card__portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card__frame {
  position: absolute;
  inset: 0;
  background-image: var(--img-hero-frame);
  background-size: cover;
  mix-blend-mode: screen;
  opacity: 0.7;
  pointer-events: none;
}

.hero-card__body {
  padding: var(--space-4);
}

.hero-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-gold);
  margin-bottom: var(--space-1);
}

.hero-card__role {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Patch Card ───────────────────────────────────────────── */
.patch-section {
  background-image: var(--img-patch-bg);
  background-size: 800px auto;
  background-repeat: repeat;
  position: relative;
}

.patch-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(13, 17, 23, 0.88);
  pointer-events: none;
}

.patch-card {
  background-color: var(--color-bg-secondary);
  border: var(--border-dark);
  border-left: 3px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  position: relative;
  transition: border-color var(--transition-fast), box-shadow var(--transition-base);
}

.patch-card--hotfix {
  border-left-color: var(--color-red-bright);
}

.patch-card:hover {
  border-color: var(--color-gold-light);
  box-shadow: var(--shadow-gold);
}

.patch-card__version {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  color: var(--color-gold);
  font-weight: var(--weight-bold);
}

.patch-card__date {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* ── Change Tags ──────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tag--buff {
  background-color: var(--color-positive-bg);
  color: var(--color-positive);
  border: 1px solid var(--color-positive);
}

.tag--nerf {
  background-color: var(--color-negative-bg);
  color: var(--color-negative);
  border: 1px solid var(--color-negative);
}

.tag--rework {
  background-color: var(--color-neutral-bg);
  color: var(--color-neutral);
  border: 1px solid var(--color-neutral);
}

.tag--adjustment {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning);
}

/* ── Meta Section Banner ──────────────────────────────────── */
.meta-section__banner {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  background-image: var(--img-meta-banner);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-8);
}

.meta-section__banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(13, 17, 23, 0.95) 0%,
    rgba(13, 17, 23, 0.7) 50%,
    rgba(13, 17, 23, 0.4) 100%
  );
}

.meta-section__banner-content {
  position: relative;
  z-index: var(--z-raised);
  padding: var(--space-8) var(--space-10);
}

/* ── Section Headers ──────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-3);
}

.section-header__divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--color-gold), transparent);
  margin: var(--space-4) auto;
}

.section-header__subtitle {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  color: var(--color-bg-primary);
  box-shadow: var(--shadow-gold);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  box-shadow: var(--shadow-gold-hover);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--color-gold);
  border: var(--border-gold);
}
.btn--outline:hover {
  background: var(--color-gold-alpha-20);
  box-shadow: var(--glow-gold);
}

.btn--danger {
  background: var(--color-red);
  color: var(--color-text-primary);
}
.btn--danger:hover {
  background: var(--color-red-bright);
}

/* ── Stat Display ─────────────────────────────────────────── */
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: var(--border-surface);
}

.stat-row__label {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-row__value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

/* ── Scrollbar ────────────────────────────────────────��───── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--color-gold-dark);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }

  .hero-section__title {
    font-size: var(--text-4xl);
  }

  .navbar__links {
    display: none;
  }

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

@media (max-width: 480px) {
  .hero-section__title {
    font-size: var(--text-3xl);
  }
}
