/* ==========================================================================
   Base Styles — GPX Visualizer Pro Landing Page
   Layout system, responsive grid, dark theme application
   ========================================================================== */

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-xl);
  background-color: var(--color-bg-primary);
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-family);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(252, 82, 0, 0.3);
  color: var(--color-text-primary);
}

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

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

a:hover {
  text-decoration: underline;
}

/* --- Layout Utilities --- */
.container {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  position: relative;
}

/* Section divider — subtle gradient line between sections */
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-primary), var(--color-accent-secondary), transparent);
  opacity: 0.3;
}

/* --- Grid System --- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

/* --- Flex Utilities --- */
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Typography Helpers --- */
h1, h2, h3, h4 {
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--fs-3xl);
}

h2 {
  font-size: var(--fs-2xl);
}

h3 {
  font-size: var(--fs-xl);
}

/* --- Responsive: Tablet (768px) --- */
@media (min-width: 768px) {
  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  h1 {
    font-size: calc(var(--fs-3xl) * 1.25);
  }
}

/* --- Responsive: Desktop (1280px) --- */
@media (min-width: 1280px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .container {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
}

.hero-split {
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
  width: 100%;
}

.hero-content {
  flex: 1;
  max-width: 540px;
}

.hero-image {
  flex-shrink: 0;
}

.hero-phone {
  width: 260px;
  box-shadow: var(--shadow-lg), var(--glow-accent);
}

.hero-logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-md);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: var(--fs-xl);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.hero-cta {
  display: inline-block;
  padding: 0.875rem 2.5rem;
  background: linear-gradient(135deg, var(--color-accent-primary), #e04a00);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  box-shadow: var(--glow-accent);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover {
  box-shadow: 0 0 32px rgba(252, 82, 0, 0.5);
  text-decoration: none;
  transform: translateY(-2px);
}

.hero-cta:active {
  transform: translateY(0);
}

/* Hero responsive */
@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .hero-split {
    flex-direction: column;
    text-align: center;
    gap: var(--space-xl);
  }

  .hero-logo {
    width: 88px;
    height: 88px;
    border-radius: 20px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-description {
    font-size: var(--fs-md);
  }

  .hero-cta {
    padding: 0.75rem 2rem;
    font-size: var(--fs-md);
  }

  .hero-phone {
    width: 220px;
    margin: 0 auto;
  }
}

/* ==========================================================================
   Section Titles (shared)
   ========================================================================== */

.section-title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  text-align: center;
  margin-bottom: var(--space-2xl);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Screenshots Section
   ========================================================================== */

.screenshots {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  background: var(--gradient-section);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.screenshot-item {
  text-align: center;
}

.phone-frame {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-md), 0 0 16px rgba(252, 82, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.phone-frame img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.screenshot-label {
  margin-top: var(--space-md);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
}

/* Screenshots responsive */
@media (max-width: 767px) {
  .screenshots {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .screenshots-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    max-width: 280px;
  }

  .section-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-xl);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .screenshots-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 720px;
  }
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--glow-accent-sm);
  border-color: rgba(252, 82, 0, 0.3);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: rgba(252, 82, 0, 0.1);
  color: var(--color-accent-primary);
  margin-bottom: var(--space-md);
  box-shadow: var(--glow-accent-sm);
}

.feature-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.feature-description {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--color-text-secondary);
}

/* Features responsive */
@media (max-width: 767px) {
  .features {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .feature-card {
    padding: var(--space-lg) var(--space-sm);
  }

  .feature-icon {
    width: 48px;
    height: 48px;
  }

  .feature-title {
    font-size: var(--fs-md);
  }

  .feature-description {
    font-size: var(--fs-xs);
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Download / Store Badges Section
   ========================================================================== */

.download-section {
  background: linear-gradient(180deg, var(--color-bg-surface), rgba(0, 212, 170, 0.04) 50%, var(--color-bg-surface));
  text-align: center;
}

.download-section h2 {
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.download-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--fs-lg);
  margin-bottom: var(--space-xl);
}

.store-badges {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  align-items: center;
}

.store-badge {
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: var(--radius-md);
}

.store-badge:hover {
  transform: scale(1.05);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.store-badge img {
  height: 54px;
  width: auto;
}

@media (max-width: 767px) {
  .store-badges {
    flex-direction: column;
    align-items: center;
  }
}

/* ==========================================================================
   Footer / Impressum
   ========================================================================== */

.site-footer {
  background-color: #0a0d12;
  padding: var(--space-2xl) 0 var(--space-xl);
  border-top: 1px solid var(--color-border);
  color: rgba(255, 255, 255, 0.7);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.impressum h3 {
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.impressum p {
  margin-bottom: var(--space-md);
  line-height: var(--lh-relaxed);
}

.impressum .legal-ref {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.impressum a {
  color: var(--color-accent-secondary);
  text-decoration: none;
}

.impressum a:hover {
  text-decoration: underline;
}

.footer-meta {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

@media (max-width: 767px) {
  .site-footer {
    text-align: center;
  }

  .impressum p {
    font-size: var(--fs-sm);
  }
}
