/* Base CSS - Global styles, variables, typography, and utilities */

/* ============================================
   Font Faces
   ============================================ */
@font-face {
  font-family: 'Qwigley';
  src: url('../fonts/Qwigley-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Raleway';
  src: url('../fonts/Raleway-Regular.ttf') format('truetype');
  font-weight: 400; 
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Raleway';
  src: url('../fonts/Raleway-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Raleway';
  src: url('../fonts/Raleway-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   CSS Variables for consistent theming
   ============================================ */
:root {
  --color-primary: #06b6d4;
  --color-primary-dark: #0891b2;
  --color-primary-light: #a7f3d0;
  --color-secondary: #6b7280;
  --color-accent: #9D4EDD;
  --color-text: #ffffff;
  --color-text-light: #d1d5db;
  --color-text-muted: #9ca3af;
  --color-bg: #0a0a0a;
  --color-bg-light: #1a1a1a;
  --color-bg-card: #2a2a2a;
  --color-white: #ffffff;
  --color-danger: #ef4444;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-border: #404040;
  --color-shadow: rgba(0, 0, 0, 0.6);
  --color-glow: rgba(6, 182, 212, 0.2);
  
  --font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Qwigley', cursive;
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Luft mellan topbar och sidinnehåll (banner använder samma gap) */
  --header-content-gap: clamp(0.5rem, 0.55vw, 0.6875rem);

  /* Gemensam ”app chrome” — topbar + bottennav känns som samma familj */
  --nav-chrome-bg: rgba(20, 18, 28, 0.96);
  --nav-chrome-border: rgba(255, 255, 255, 0.08);
  --nav-chrome-blur: 12px;
  --nav-pill-radius: 10px;
}

@media (max-width: 768px) {
  :root {
    /* Mobil: tätare — motsvarar ungefär gamla 1%-paddingen (~4px) */
    --header-content-gap: 0.25rem;
  }
}

/* ============================================
   Reset and Base Styles
   ============================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: #0a0a0a; /* Solid dark base */
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(157, 78, 221, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(157, 78, 221, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  font-size: 16px;
  min-height: 100vh;
  color-scheme: dark;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--spacing-md) 0;
  font-weight: 600;
  color: var(--color-text);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.15rem;
  color: #d5d5d5; /* Slightly darker than --color-text */
}

p {
  margin: 0 0 var(--spacing-md) 0;
  color: var(--color-text);
}

/* ============================================
   Global Link Styling
   ============================================ */
a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(6, 182, 212, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

/* Dropdown links should never have underlines */
a.dropdown-item,
a.dropdown-profile-btn,
a.dropdown-logout-btn {
  text-decoration: none;
  text-decoration-color: transparent;
  text-underline-offset: 0;
}

a.dropdown-item:hover,
a.dropdown-profile-btn:hover,
a.dropdown-logout-btn:hover {
  text-decoration: none;
  text-decoration-color: transparent;
  text-underline-offset: 0;
}

a:hover {
  color: var(--color-primary-light);
  text-decoration-color: var(--color-primary);
  text-decoration-thickness: 2px;
}

/* ============================================
   Skip Links (Accessibility)
   ============================================ */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
}

.skip-link:focus {
  top: 6px;
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   Live Region (Screen Reader Announcements)
   ============================================ */
.live-region {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

