/* ============================================================
   SAGANORDIK.COM - NORDISK SAGA FANTASY + MYSTISK NATUR
   Tema: nordlys-farger, runer, myke lyslinjer, naturteksturer
   ============================================================ */

/* CSS Custom Properties - Nordisk Saga Fantasy Fargepalett */
:root {
  /* Nordlys-farger (blå, grønn, turkis) */
  --nordlys-blue: #4A90E2;
  --nordlys-green: #7ED321;
  --nordlys-teal: #50E3C2;
  --nordlys-cyan: #4DD0E1;
  --nordlys-deep: #2E5BBA;
  --nordlys-light: #B3E5FC;
  
  /* Mystiske natur-farger */
  --mystisk-dark: #1B2631;
  --mystisk-stone: #566573;
  --mystisk-ice: #AED6F1;
  --mystisk-forest: #27AE60;
  --mystisk-mist: #F8F9FA;
  
  /* Saga fantasy accents */
  --rune-glow: #00D4FF;
  --saga-gold: #F1C40F;
  --legend-purple: #9B59B6;
  
  /* Grå-toner for tekst og bakgrunn */
  --text-primary: #2C3E50;
  --text-secondary: #5D6D7E;
  --text-muted: #85929E;
  --text-light: #FFFFFF;
  
  /* Bakgrunner */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-section-light: #EBF5FB;
  --bg-mystisk: linear-gradient(135deg, #1B2631 0%, #2E5BBA 50%, #4A90E2 100%);
  --bg-nordlys: linear-gradient(135deg, #4A90E2 0%, #50E3C2 50%, #7ED321 100%);
  
  /* Skygger og effekter */
  --shadow-sm: 0 2px 4px rgba(46, 91, 186, 0.1);
  --shadow-md: 0 4px 8px rgba(46, 91, 186, 0.15);
  --shadow-lg: 0 8px 16px rgba(46, 91, 186, 0.2);
  --shadow-nordlys: 0 0 20px rgba(0, 212, 255, 0.3);
  
  /* Border radius - myke former */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Poppins', 'Inter', sans-serif;
  --font-saga: 'Cinzel', 'Times New Roman', serif; /* For runic/saga elements */
}

/* Reset og base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

/* Typography - Nordisk Saga Style */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--bg-nordlys);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

h2 {
  font-size: 2rem;
  color: var(--nordlys-deep);
}

h3 {
  font-size: 1.5rem;
  color: var(--nordlys-blue);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

a {
  color: var(--nordlys-blue);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--nordlys-deep);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Container og layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-light {
  background: var(--bg-section-light);
}

/* Header - Nordisk Saga Style */
.header {
  background: rgba(27, 38, 49, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--rune-glow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--shadow-nordlys);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  max-width: 1200px;
  margin: 0 auto;
}

.nav > div {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo {
  font-family: var(--font-saga);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light);
  text-shadow: 0 0 20px var(--rune-glow);
  transition: all 0.3s ease;
}

.logo:hover {
  color: var(--rune-glow);
  text-shadow: 0 0 30px var(--rune-glow);
  transform: scale(1.05);
}

.header-badge {
  background: var(--bg-nordlys);
  color: var(--text-light);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-nordlys);
  animation: runeGlow 3s infinite;
}

@keyframes runeGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
  50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.8); }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
}

.nav-links a {
  color: var(--text-light);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  background: rgba(0, 212, 255, 0.1);
  color: var(--rune-glow);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* Hero Section - Mystisk Nordlys */
.hero {
  background: var(--bg-mystisk);
  color: var(--text-light);
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="runes" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><text x="10" y="15" font-family="serif" font-size="12" fill="rgba(0,212,255,0.1)" text-anchor="middle">ᚱᚢᚾᛖ</text></pattern></defs><rect width="100" height="100" fill="url(%23runes)"/></svg>');
  opacity: 0.1;
  animation: runeFloat 20s linear infinite;
}

@keyframes runeFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-md);
  animation: nordlysGlow 4s infinite;
}

@keyframes nordlysGlow {
  0%, 100% { text-shadow: 0 0 30px rgba(0, 212, 255, 0.5); }
  50% { text-shadow: 0 0 50px rgba(80, 227, 194, 0.8); }
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-lg);
  color: var(--mystisk-ice);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Age Badge - Nordisk Style */
.age-badge {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: var(--bg-nordlys);
  color: var(--text-light);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-nordlys);
  z-index: 10;
  animation: sagaBadge 3s infinite;
}

@keyframes sagaBadge {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
  50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(0, 212, 255, 0.8); }
}

/* Buttons - Mystisk Saga Style */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-heading);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--bg-nordlys);
  color: var(--text-light);
  box-shadow: var(--shadow-nordlys);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
  color: var(--text-light);
}

.btn-secondary {
  background: transparent;
  color: var(--nordlys-blue);
  border: 2px solid var(--nordlys-blue);
}

.btn-secondary:hover {
  background: var(--nordlys-blue);
  color: var(--text-light);
  box-shadow: var(--shadow-md);
}

/* Cards - Naturteksturer Style */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 212, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bg-nordlys);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--rune-glow);
}

.card:hover::before {
  opacity: 1;
}

/* Game Cards - Saga Fantasy Style */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.game-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.game-image {
  height: 200px;
  background: var(--bg-mystisk);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.game-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  animation: mystiskPulse 4s infinite;
}

@keyframes mystiskPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

.game-content {
  padding: var(--spacing-md);
}

.game-title {
  font-family: var(--font-saga);
  font-size: 1.3rem;
  color: var(--nordlys-deep);
  margin-bottom: var(--spacing-xs);
}

.game-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Forms - Nordisk Style */
.form-container {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--spacing-sm);
  border: 2px solid #E8F4FD;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--bg-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--rune-glow);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

/* Footer - Saga Style */
.footer {
  background: var(--mystisk-dark);
  color: var(--text-light);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--bg-nordlys);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  color: var(--rune-glow);
  margin-bottom: var(--spacing-sm);
  font-family: var(--font-saga);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--spacing-xs);
}

.footer-section ul li a {
  color: var(--mystisk-ice);
  transition: all 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--rune-glow);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.footer-bottom {
  border-top: 1px solid var(--mystisk-stone);
  padding-top: var(--spacing-md);
  text-align: center;
  color: var(--mystisk-ice);
}

.footer-disclaimer {
  font-size: 0.9rem;
  color: var(--mystisk-ice);
  margin-top: var(--spacing-xs);
  font-style: italic;
}

/* Game Warning - Nordisk Disclaimer Style */
.game-warning {
  background: rgba(241, 196, 15, 0.1);
  border: 2px solid var(--saga-gold);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm);
  text-align: center;
  font-weight: 600;
  color: var(--saga-gold);
  margin: var(--spacing-md) 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Demo Header */
.demo-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.demo-header h2 {
  font-family: var(--font-saga);
  color: var(--nordlys-deep);
  margin-bottom: var(--spacing-sm);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

/* Responsive Design - Nordisk Mobile */
@media (max-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
  }
  
  .hero h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
  }
  
  .hero {
    padding: 6rem 0 3rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .games-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .btn {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.9rem;
  }
  
  .card {
    padding: var(--spacing-md);
  }
  
  h2 {
    font-size: 1.7rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 360px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .nav-links a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* Special Nordisk Animations */
@keyframes sagaShimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.saga-shimmer {
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
  background-size: 200px 100%;
  animation: sagaShimmer 2s infinite;
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .btn,
  .age-badge {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .hero {
    background: none;
    color: black;
  }
}
