/* ============================================================
   HEIRS OF THE FIRE — Base Styles
   Reset, typography, scrollbars, global elements.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=EB+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=Inter:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-ui);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Dragon-scale texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L60 15 L60 45 L30 60 L0 45 L0 15 Z' fill='none' stroke='%23ffffff' stroke-width='0.4' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  opacity: 1;
}

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--border-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0.04em; }
h1 { font-size: 1.8rem; font-weight: 700; color: var(--accent-gold); }
h2 { font-size: 1.2rem; font-weight: 600; color: var(--text-primary); }
h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

p { font-family: var(--font-prose); line-height: 1.65; }

a { color: var(--accent-ember); text-decoration: none; }
a:hover { color: var(--accent-gold); }

button {
  cursor: pointer;
  font-family: var(--font-ui);
  border: none;
  outline: none;
}
button:focus-visible {
  outline: 2px solid var(--accent-ember);
  outline-offset: 2px;
}

input, textarea, select {
  font-family: var(--font-ui);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent-ember);
}
input::placeholder, textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

select option {
  background: var(--bg-panel);
}

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

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
