/*
 * KrypteqVTT — Dark Urban Horror stylesheet
 */

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Palette */
  --bg-void:        #0a0a0b;
  --bg-deep:        #111114;
  --bg-surface:     #18181d;
  --bg-raised:      #22222a;
  --bg-overlay:     #2a2a35;

  --border-dim:     #2e2e3a;
  --border-mid:     #3d3d50;
  --border-glow:    #5a1a1a;

  --text-body:      #b8b4c0;
  /* #8a8799 on #0a0a0b = 5.7:1 — passes WCAG AA for small text */
  --text-muted:     #8a8799;
  --text-faint:     #4a4858;
  --text-heading:   #d8d4e0;
  --text-bright:    #eae6f0;

  /* Accent — blood & rust */
  --accent-blood:   #8b1a1a;
  --accent-crimson: #c0392b;
  --accent-rust:    #7a3b1e;
  --accent-amber:   #9b7a2a;
  --accent-sickly:  #3a5c2e;

  /* #d9534f on #0a0a0b = 5.1:1 — passes WCAG AA for normal text */
  --accent-link:    #d9534f;

  /* Glow */
  --glow-red:       0 0 8px rgba(139, 26, 26, 0.6);
  --glow-red-lg:    0 0 20px rgba(139, 26, 26, 0.4), 0 0 40px rgba(139, 26, 26, 0.15);

  /* Typography */
  --font-body:      'Cormorant Garamond', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-ui:        'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
  --font-display:   'Cinzel Decorative', 'Cinzel', Georgia, serif;

  /* Spacing */
  --radius:         3px;
  --radius-lg:      5px;

  /* Touch target minimum (WCAG 2.5.5) */
  --touch-target:   44px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 19px; /* Cormorant Garamond reads best at larger sizes */
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-void);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(90, 20, 20, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(40, 20, 60, 0.07) 0%, transparent 55%);
  color: var(--text-body);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
}

/* ============================================================
   FOCUS VISIBLE — keyboard navigation ring
   ============================================================ */
:focus {
  outline: none; /* suppress browser default; we handle it below */
}

:focus-visible {
  outline: 2px solid var(--accent-link);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* Inputs have a custom border+glow focus style — use that instead */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: 1.25;
  letter-spacing: 0.06em;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
  border-bottom: 1px solid var(--border-glow);
  padding-bottom: 0.6rem;
}

h2 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-heading); }
h3 { font-size: 1.15rem; margin-bottom: 0.75rem; color: var(--text-body); }

p { margin-bottom: 1rem; }

strong { color: var(--text-bright); }

hr {
  border: none;
  border-top: 1px solid var(--border-dim);
  margin: 2rem 0;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li { margin-bottom: 0.3rem; }

/* ============================================================
   LINKS
   ============================================================ */
a {
  color: var(--accent-link);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
  color: #e87570;
  text-shadow: 0 0 6px rgba(217, 83, 79, 0.45);
}

a:visited {
  /* #b05a56 on #0a0a0b ≈ 4.5:1 */
  color: #b05a56;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--border-mid);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blood);
}

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background-color: rgba(139, 26, 26, 0.45);
  color: var(--text-bright);
}
