/* === BASE STYLES & VARIABLES === */

/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

/* Color Variables - Klassisk Marinblå Tema */
:root {
  /* Primär röd palette - varm och vänlig */
  --color-red-50: #fef2f2;
  --color-red-100: #fee2e2;
  --color-red-200: #fecaca;
  --color-red-300: #fca5a5;
  --color-red-400: #f87171;
  --color-red-500: #ef4444;
  --color-red-600: #dc2626; /* Huvudfärg - varm röd */
  --color-red-700: #b91c1c;
  --color-red-800: #991b1b;
  --color-red-900: #7f1d1d;

  /* Accent - varm orange för kontrast */
  --color-accent-50: #fffbeb;
  --color-accent-100: #fef3c7;
  --color-accent-200: #fde68a;
  --color-accent-300: #fcd34d;
  --color-accent-400: #fbbf24;
  --color-accent-500: #f59e0b; /* Accent färg - gul-orange */
  --color-accent-600: #d97706;
  --color-accent-700: #b45309;
  --color-accent-800: #92400e;
  --color-accent-900: #78350f;

  /* Semantiska färger */
  --color-bg: #ffffff;
  --color-bg-alt: #fef2f2;        /* Ljust röd istället för blå */
  --color-text: #7f1d1d;          /* Mörk röd för text */
  --color-text-secondary: #b91c1c; /* Ljusare röd för sekundär text */
  --color-accent: var(--color-red-600);
  --color-accent-alt: var(--color-accent-500); /* Gul-orange accent */
  --color-border: #fecaca;        /* Ljusröd border */
  --color-focus: var(--color-accent-400);
  
  /* Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  
  /* Spacing Scale - Mer generös spacing */
  --space-xs: 0.5rem;    /* Uppgraderat från 0.25rem */
  --space-sm: 0.75rem;   /* Uppgraderat från 0.5rem */
  --space-md: 1.25rem;   /* Uppgraderat från 1rem */
  --space-lg: 2rem;      /* Uppgraderat från 1.5rem */
  --space-xl: 3rem;      /* Uppgraderat från 2rem */
  --space-2xl: 4rem;     /* Uppgraderat från 3rem */
  --space-3xl: 6rem;     /* Uppgraderat från 4rem */
  
  /* Typography */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-base: 1.55;
  --line-height-relaxed: 1.75;
  
  /* Breakpoints (for reference) */
  --bp-sm: 600px;
  --bp-md: 900px;
  --bp-lg: 1200px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
}



/* Base Typography */
html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
               "Helvetica Neue", Arial, sans-serif;
  font-size: 100%;
  line-height: var(--line-height-base);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: var(--font-size-base);
  min-height: 100vh;
}

/* Responsive Typography */
h1, .h1 {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 700;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
  color: var(--color-accent);
}

h2, .h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

h3, .h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.875rem);
  font-weight: 600;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
}

h4, .h4 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

h5, .h5 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

h6, .h6 {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

/* Text Elements */
p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(220, 38, 38, 0.3);
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

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

a:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Lists */
ul, ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

li {
  margin-bottom: var(--space-xs);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-accent);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

/* Flow Utility */
.flow > * + * {
  margin-top: var(--space-md);
}

.flow-sm > * + * {
  margin-top: var(--space-sm);
}

.flow-lg > * + * {
  margin-top: var(--space-lg);
}
