/* ========================================================================
   VEELKORIA Base Styles
   Theme: Modern, immersive fantasy gaming platform
   File: assets/css/base.css
   ======================================================================== */

/* ========================================================================
   1. CSS Variables (Design Tokens)
   ======================================================================== */
:root {
  /* Colors -------------------------------------------------------------- */
  /* Core brand */
  --color-background: #050714; /* deep space */
  --color-surface: #0b0f24; /* elevated panels */
  --color-surface-soft: #11162b;
  --color-text: #f5f7ff;
  --color-text-muted: #a0a7c4;

  /* Fantasy gradients / accents */
  --color-primary: #7b5cff; /* main accent (arcane violet) */
  --color-primary-soft: rgba(123, 92, 255, 0.16);
  --color-primary-strong: #9c7eff;

  --color-success: #4cd964;
  --color-warning: #ffb020;
  --color-danger: #ff3b30;

  /* Neutral grayscale for UI */
  --gray-50: #f5f7ff;
  --gray-100: #e2e6f5;
  --gray-200: #c8cde3;
  --gray-300: #a0a7c4;
  --gray-400: #7c82a2;
  --gray-500: #555b78;
  --gray-600: #3a3f5a;
  --gray-700: #262a3c;
  --gray-800: #171a28;
  --gray-900: #090b14;

  /* Overlays / borders */
  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-border-strong: rgba(255, 255, 255, 0.18);
  --color-overlay: rgba(0, 0, 0, 0.7);

  /* Typography --------------------------------------------------------- */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text',
    'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
  --font-display: 'Cinzel', 'Trajan Pro', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular,
    Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  /* Font sizes (mobile-first scale) */
  --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 heights */
  --line-height-tight: 1.15;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* 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-xs: 0.125rem;  /* 2px */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-pill: 999px;

  /* Shadows (fantasy / glow) ------------------------------------------ */
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-elevated: 0 22px 65px rgba(5, 7, 20, 0.9);
  --shadow-glow-primary: 0 0 0 1px rgba(123, 92, 255, 0.45),
    0 0 22px rgba(123, 92, 255, 0.55);
  --shadow-glow-danger: 0 0 0 1px rgba(255, 59, 48, 0.45),
    0 0 18px rgba(255, 59, 48, 0.6);

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

  /* Layout ------------------------------------------------------------- */
  --container-max-width: 1120px;
  --container-padding-x: var(--space-4);

  /* Z-index scale ------------------------------------------------------ */
  --z-overlay: 40;
  --z-modal: 50;
  --z-tooltip: 60;
}

/* Larger screens: slightly larger type & container */
@media (min-width: 1024px) {
  :root {
    --font-size-md: 1rem;      /* 16px */
    --font-size-lg: 1.125rem;  /* 18px */
    --font-size-xl: 1.375rem;  /* 22px */
    --font-size-2xl: 1.75rem;  /* 28px */
    --font-size-3xl: 2.125rem; /* 34px */
    --font-size-4xl: 2.5rem;   /* 40px */
    --font-size-5xl: 3.25rem;  /* 52px */
    --container-max-width: 1200px;
  }
}

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

/* Remove default margins */
body, h1, h2, h3, h4, h5, h6,
ul, ol, li,
figure, blockquote, dl, dd,
p {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a class attribute */
ul[class],
ol[class] {
  list-style: none;
  padding-left: 0;
}

/* Set core body defaults */
html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

/* Responsive images and media */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove default button styles */
button {
  border: none;
  background: none;
  padding: 0;
}

/* Prevent text overflow */
p,
span,
li,
label {
  overflow-wrap: break-word;
}

/* Table reset */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ========================================================================
   3. Base Styles
   ======================================================================== */
body {
  background: radial-gradient(circle at top, #171b3a 0, #050714 54%, #02030a 100%);
  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;
}

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

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-3);
}

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

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

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

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

p.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--gray-50);
}

/* Links ------------------------------------------------------------------ */
a {
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
  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(123, 92, 255, 0.8);
}

a:active {
  opacity: 0.8;
}

/* Code / mono ------------------------------------------------------------ */
code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
}

/* Horizontal rule -------------------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-6) 0;
}

/* ========================================================================
   4. Accessibility & Motion
   ======================================================================== */

/* Focus styles (use :focus-visible for keyboard users) */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Hide focus outline for mouse users */
:focus {
  outline: none;
}

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

/* Respect reduced motion preference ------------------------------------- */
@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;
  }
}

/* ========================================================================
   5. Layout Utilities
   ======================================================================== */

/* Container -------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

.container-full {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

/* Sections --------------------------------------------------------------- */
.section {
  padding-block: var(--space-10);
}

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

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

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

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

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

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

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

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

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

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

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

/* Grid utilities --------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-4);
}

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

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

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

/* Alignment & text ------------------------------------------------------- */
.text-center {
  text-align: center;
}
p.home-hero__contact-cta {
    margin-top: 40px;
}
.text-right {
  text-align: right;
}

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

/* Spacing utilities (common) -------------------------------------------- */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }

.py-4 {
  padding-block: var(--space-4) !important;
}

.py-6 {
  padding-block: var(--space-6) !important;
}

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

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

/* Width utilities -------------------------------------------------------- */
.w-full {
  width: 100%;
}

/* ========================================================================
   6. Components
   ======================================================================== */

/* Buttons ---------------------------------------------------------------- */
.button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: linear-gradient(135deg, #7b5cff, #4f9dff);
  color: #ffffff;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.65);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-normal),
    opacity var(--transition-fast),
    border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.button::before,
button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.4), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.button:hover,
button:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: var(--shadow-glow-primary);
}

.button:hover::before,
button:hover::before {
  opacity: 1;
}

.button:active,
button:active {
  transform: translateY(0) scale(0.99);
  opacity: 0.9;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8);
}

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

/* Button variants */
.button--outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  box-shadow: none;
}

.button--outline:hover {
  background: var(--color-primary-soft);
  box-shadow: var(--shadow-glow-primary);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--gray-50);
  box-shadow: none;
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.button--danger {
  background: linear-gradient(135deg, #ff3b30, #ff6b6b);
}

/* Inputs & form controls ------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(10, 13, 34, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

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

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(123, 92, 255, 0.5);
  background-color: rgba(15, 20, 52, 0.98);
}

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

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

/* Cards ------------------------------------------------------------------ */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background:
    radial-gradient(circle at top left, rgba(123, 92, 255, 0.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(64, 196, 255, 0.12), transparent 55%),
    var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.02)
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.card:hover::before {
  opacity: 1;
}

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

.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);
  color: var(--color-text-muted);
}

/* Badges / tags ---------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 11, 28, 0.9);
  color: var(--color-text-muted);
}

.badge--success {
  border-color: rgba(76, 217, 100, 0.5);
  color: #d2ffe0;
}

.badge--danger {
  border-color: rgba(255, 59, 48, 0.6);
  color: #ffd6d3;
}

.badge--primary {
  border-color: rgba(123, 92, 255, 0.7);
  color: #e1dcff;
}

/* Utility: subtle glass panel for nav / footer -------------------------- */
.surface-glass {
  background: linear-gradient(
    135deg,
    rgba(13, 18, 46, 0.92),
    rgba(6, 10, 33, 0.96)
  );
  border-bottom: 1px solid var(--color-border-subtle);
  backdrop-filter: blur(22px);
}

/* ========================================================================
   7. Fantasy / Game-specific Atmosphere Utilities
   ======================================================================== */

/* Glowing text for key headlines */
.text-glow-primary {
  text-shadow:
    0 0 12px rgba(123, 92, 255, 0.9),
    0 0 26px rgba(64, 196, 255, 0.8);
}

.text-glow-danger {
  text-shadow:
    0 0 10px rgba(255, 59, 48, 0.9),
    0 0 20px rgba(255, 107, 107, 0.9);
}

/* Neon border utility for highlighted competitive blocks */
.border-neon {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(123, 92, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(123, 92, 255, 0.35), 0 0 28px rgba(64, 196, 255, 0.55);
}

/* Soft pulsing for live / active status indicators */
@keyframes veelkoria-pulse {
  0% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 0.6; transform: scale(1); }
}

.pulse-soft {
  animation: veelkoria-pulse 1.8s ease-in-out infinite;
}

/* Small circular status dot */
.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--gray-500);
}

.status-dot--online {
  background: var(--color-success);
  box-shadow: 0 0 8px rgba(76, 217, 100, 0.9);
}

.status-dot--danger {
  background: var(--color-danger);
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.9);
}

/* End of base.css */
