/* =====================================================================
   Variables
   ===================================================================== */

:root {
  /* Color Palette - Dark Fantasy Hungarian Atmosphere */
  --color-bg: #050708; /* Deep almost-black */
  --color-bg-elevated: #0b1011; /* Panels, cards */
  --color-bg-muted: #141a1c;

  --color-text: #f5f5f2;
  --color-text-muted: #b8c0c2;

  --color-primary: #c8a44b; /* Gold, regal Hungarian fantasy */
  --color-primary-soft: rgba(200, 164, 75, 0.16);
  --color-primary-strong: #e2c76a;

  --color-success: #46b37b; /* Deep forest success */
  --color-warning: #e3a44a;
  --color-danger: #c94242;

  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.18);

  /* Neutral grays for UI */
  --gray-50: #f7f7f7;
  --gray-100: #e1e4e6;
  --gray-200: #c7ccd0;
  --gray-300: #a1a8ae;
  --gray-400: #7a838a;
  --gray-500: #5a636a;
  --gray-600: #444b52;
  --gray-700: #33393f;
  --gray-800: #22272b;
  --gray-900: #121518;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans",
    "Helvetica Neue", Arial, sans-serif;
  /* Decorative fantasy display font to be set per-project via @font-face */
  --font-display: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;

  --font-size-xs: 0.75rem;  /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 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.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

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

  /* Shadows – subtle mystical glow */
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.55);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.8);
  --shadow-gold-glow: 0 0 0 1px rgba(200, 164, 75, 0.35),
    0 0 25px rgba(200, 164, 75, 0.24);

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

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-med: 0ms;
    --transition-slow: 0ms;
  }
}

/* =====================================================================
   Reset / Normalize
   ===================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

picture {
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

:focus {
  outline: none;
}

/* =====================================================================
   Base Styles
   ===================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  display: block;
}

h1,
 h2,
 h3,
 h4,
 h5,
 h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: 0.04em;
}

h1 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-2);
}

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

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-1);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-1);
}

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

strong,
 b {
  font-weight: 600;
}

em,
 i {
  font-style: italic;
}

a {
  position: relative;
  transition: color var(--transition-med),
    text-shadow var(--transition-med);
}

a:hover {
  color: var(--color-primary-strong);
  text-shadow: 0 0 12px rgba(200, 164, 75, 0.45);
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

pre {
  overflow-x: auto;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-8) 0;
}

small {
  font-size: var(--font-size-sm);
}

/* =====================================================================
   Utilities
   ===================================================================== */

/* Layout */

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}

.section {
  padding-block: var(--space-12);
}

.section--tight {
  padding-block: var(--space-8);
}

/* Flex helpers */

.flex {
  display: flex;
}

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

.flex-row {
  flex-direction: row;
}



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

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

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

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

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

/* Grid helpers */

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

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

/* Text alignment */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

/* Visibility / accessibility */

.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;
}

/* Width helpers */

.w-full {
  width: 100%;
}

.max-w-none {
  max-width: none;
}

/* Spacing utilities (examples; extend as needed) */

.mb-0 {
  margin-bottom: 0;
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.mt-4 {
  margin-top: var(--space-4);
}

.pt-4 {
  padding-top: var(--space-4);
}

.pb-4 {
  padding-bottom: var(--space-4);
}

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

.p-6 {
  padding: var(--space-6);
}

/* =====================================================================
   Components
   ===================================================================== */

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--transition-med),
    color var(--transition-med),
    border-color var(--transition-med),
    box-shadow var(--transition-med),
    transform var(--transition-fast);
}

.btn--primary {
  background: radial-gradient(circle at top, #f1d385, var(--color-primary));
  color: #14110b;
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  background: radial-gradient(circle at top, #ffe7a3, var(--color-primary-strong));
  box-shadow: var(--shadow-gold-glow);
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: rgba(11, 16, 17, 0.95);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn--secondary:hover {
  background-color: rgba(20, 26, 28, 1);
  box-shadow: 0 0 0 1px rgba(200, 164, 75, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary-strong);
  border-color: rgba(200, 164, 75, 0.5);
}

.btn--ghost:hover {
  background: rgba(200, 164, 75, 0.1);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* Inputs & form controls */

.input,
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(6, 9, 10, 0.96);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-med),
    box-shadow var(--transition-med),
    background-color var(--transition-med);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--color-primary-strong);
  box-shadow: 0 0 0 1px rgba(200, 164, 75, 0.5);
}

.input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

/* Card – used for lore, character blocks, quest lists */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: radial-gradient(circle at top left, rgba(46, 71, 57, 0.35), transparent 55%),
    linear-gradient(135deg, var(--color-bg-elevated), #050909);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(200, 164, 75, 0.06);
  pointer-events: none;
}

.card__header {
  margin-bottom: var(--space-4);
}

.card__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

.card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card__body {
  font-size: var(--font-size-sm);
}

/* =====================================================================
   Accessibility & Motion
   ===================================================================== */

:focus-visible {
  outline: 2px solid var(--color-primary-strong);
  outline-offset: 3px;
}

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

/* =====================================================================
   Thematic Helpers (Fantasy / Hungarian atmosphere)
   ===================================================================== */

.bg-world-mist {
  background: radial-gradient(circle at top, rgba(129, 199, 132, 0.04), transparent 55%),
    radial-gradient(circle at bottom, rgba(10, 34, 19, 0.75), #020404);
}

.border-gold-soft {
  border: 1px solid rgba(200, 164, 75, 0.45);
}

.text-gold {
  color: var(--color-primary-strong);
}

.text-forest-muted {
  color: #8fb09a;
}

.glow-gold-soft {
  box-shadow: var(--shadow-gold-glow);
}
