/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light mode colors - matching app theme */
  --primary-color: #FF6B6B;
  --primary-hover: #FF5252;
  --secondary-color: #4ECDC4;
  --text-primary: #2D3436;
  --text-secondary: #636E72;
  --text-muted: #9DA6B9;
  --background-primary: #FFFFFF;
  --background-secondary: #F7F9FC;
  --surface-primary: #F7F9FC;
  --surface-secondary: #FFFFFF;
  --border-primary: #E0E0E0;
  --border-secondary: #F7F9FC;
  --nordic-blue: #E3F2FD;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);

  /* Legacy variables for compatibility */
  --background: var(--background-primary);
  --surface: var(--surface-primary);
  --border: var(--border-primary);
}

[data-theme='dark'] {
  /* Dark mode colors - matching app theme */
  --primary-color: #2b6cee;
  --primary-hover: #1e5cd9;
  --secondary-color: #4ECDC4;
  --text-primary: #FFFFFF;
  --text-secondary: #9da6b9;
  --text-muted: #5f687a;
  --background-primary: #101622;
  --background-secondary: #1a2230;
  --surface-primary: #1a2230;
  --surface-secondary: #1c1f27;
  --border-primary: #282e39;
  --border-secondary: #1a202c;
  --nordic-blue: #1e3a5f;

  /* Legacy variables for compatibility */
  --background: var(--background-primary);
  --surface: var(--surface-primary);
  --border: var(--border-primary);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px;
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--shadow);
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-consent-content p {
  flex: 1;
  min-width: 250px;
  color: var(--text-secondary);
}

.cookie-consent-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.cookie-consent-buttons {
  display: flex;
  gap: 10px;
}

/* Navigation */
.navbar {
  background: var(--background-primary);
  border-bottom: 1px solid var(--border-primary);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme='dark'] .navbar {
  background: rgba(16, 22, 34, 0.95);
}

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

.nav-brand h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-color);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--surface-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--surface-primary);
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  font-size: 20px;
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-icon-light {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-icon-dark {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme='dark'] .theme-icon-light {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

[data-theme='dark'] .theme-icon-dark {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--primary-color);
  color: white;
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Hero Section */
.hero {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--background-secondary) 0%, var(--background-primary) 100%);
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-preview {
  margin-top: 60px;
  display: flex;
  justify-content: center;
}

.hero-preview-container {
  max-width: 300px;
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px var(--shadow-lg);
  border: 8px solid var(--surface-secondary);
  background: var(--background-secondary);
  position: relative;
}

.hero-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.hero-preview-light {
  opacity: 1;
}

.hero-preview-dark {
  opacity: 0;
  display: none;
}

[data-theme='dark'] .hero-preview-light {
  opacity: 0;
  display: none;
}

[data-theme='dark'] .hero-preview-dark {
  opacity: 1;
  display: block;
}

/* Sections */
section {
  padding: 80px 0;
}

.section-title {
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Features */
.features-showcase {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: center;
  margin-top: 60px;
}

.features-showcase-image {
  max-width: 250px;
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px var(--shadow);
  background: var(--background-secondary);
  border: 1px solid var(--border-primary);
}

.features-showcase-image {
  position: relative;
}

.features-showcase-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.features-showcase-light {
  opacity: 1;
}

.features-showcase-dark {
  opacity: 0;
  display: none;
}

[data-theme='dark'] .features-showcase-light {
  opacity: 0;
  display: none;
}

[data-theme='dark'] .features-showcase-dark {
  opacity: 1;
  display: block;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--surface-secondary);
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-primary);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow);
  border-color: var(--primary-color);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Screens */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.screen-card {
  background: var(--surface-secondary);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-primary);
}

.screen-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow);
  border-color: var(--primary-color);
}

.screen-image-container {
  width: 100%;
  aspect-ratio: 9/16;
  position: relative;
  overflow: hidden;
  background: var(--background-secondary);
}

.screen-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s ease;
}

.screen-image-dark {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

/* Light mode: show light images, hide dark images */
:root:not([data-theme='dark']) .screen-image {
  opacity: 1;
}

:root:not([data-theme='dark']) .screen-image-dark {
  opacity: 0;
  display: none;
}

/* Dark mode: hide light images, show dark images */
[data-theme='dark'] .screen-image {
  opacity: 0;
  display: none;
}

[data-theme='dark'] .screen-image-dark {
  opacity: 1;
  display: block;
}

/* Fallback placeholder */
.screen-image-placeholder {
  width: 100%;
  aspect-ratio: 9/16;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 600;
  position: relative;
}

.screen-content {
  padding: 30px;
}

.screen-content h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
}

.screen-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* How It Works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.step {
  text-align: center;
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  margin: 0 auto 20px;
}

.step h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-secondary);
}

/* Download */
.download {
  text-align: center;
  background: var(--background-secondary);
}

.download-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* Footer */
.footer {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-primary);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 15px;
  color: var(--text-primary);
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-primary);
  color: var(--text-muted);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.modal-content {
  background-color: var(--background);
  margin: 5% auto;
  padding: 40px;
  border-radius: 16px;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 32px;
  font-weight: bold;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--text-primary);
}

.modal-body {
  margin-top: 20px;
}

.modal-body h3 {
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 20px;
}

.modal-body p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .section-title {
    font-size: 32px;
  }

  .nav-links {
    gap: 15px;
    font-size: 14px;
  }

  .cookie-consent-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-consent-buttons {
    width: 100%;
    justify-content: center;
  }

  .cookie-consent-buttons button {
    flex: 1;
  }

  .features-showcase {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .features-showcase-image {
    max-width: 200px;
    margin: 0 auto;
  }

  .hero-preview-container {
    max-width: 200px;
  }

  .nav-right {
    gap: 10px;
  }

  .nav-links {
    gap: 15px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }
}

