/* ==========================================
   ApneaStatic Website Styles
   ========================================== */

:root {
  --bg-dark: #0a1628;
  --bg-primary: #0f1f3d;
  --bg-card: #162544;
  --bg-light: #f4f7fc;
  --text-primary: #ffffff;
  --text-secondary: #a3b8d8;
  --text-dark: #1a2740;
  --text-muted: #5a6d8a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --success: #22c55e;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.25);
  --transition: 0.2s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================
   Coming Soon Banner
   ========================================== */
.coming-soon-banner {
  background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
  text-align: center;
  padding: 14px 24px;
  position: relative;
  z-index: 100;
}

.coming-soon-banner p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
}

.coming-soon-banner a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.coming-soon-banner a:hover {
  color: #E0F2FE;
}

@media (max-width: 640px) {
  .coming-soon-banner p {
    font-size: 13px;
  }
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* ==========================================
   Navbar
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.nav-brand:hover {
  color: #fff;
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0d1a33 50%, #132347 100%);
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, #a3b8d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat strong {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.stat span {
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 260px;
  height: 520px;
  background: #1a2744;
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(59, 130, 246, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #0d1a33, #162544);
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-placeholder {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

.phone-placeholder p {
  margin-top: 12px;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 80px;
}

/* ==========================================
   Features Section
   ========================================== */
.features {
  background: var(--bg-primary);
  padding: 100px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 60px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* ==========================================
   Web App Section
   ========================================== */
.webapp-section {
  background: linear-gradient(135deg, #0d1a33, var(--bg-primary));
  padding: 80px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.webapp-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.webapp-text h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
}

.webapp-text p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.webapp-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.webapp-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-secondary);
  padding: 14px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.check {
  color: var(--success);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

/* ==========================================
   Download Section
   ========================================== */
.download-section {
  background: var(--bg-primary);
  padding: 80px 0;
  text-align: center;
}

.download-content h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}

.download-content p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: #000;
  border-radius: var(--radius);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition);
}

.store-badge:hover {
  background: #111;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.store-badge small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.store-badge strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
  background: var(--bg-dark);
  padding: 60px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 260px;
}

.footer-links h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
}

/* ==========================================
   Legal Pages (shared)
   ========================================== */
.legal-page {
  background: var(--bg-primary);
  padding: 100px 0 60px;
  min-height: 100vh;
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-content .last-updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  color: #fff;
}

.legal-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 10px;
}

.legal-content p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--accent);
}

.legal-content strong {
  color: #fff;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.legal-content th,
.legal-content td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: var(--text-secondary);
}

.legal-content th {
  background: var(--bg-card);
  color: #fff;
  font-weight: 600;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-text h1 {
    font-size: 38px;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .phone-mockup {
    width: 200px;
    height: 400px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .webapp-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 22, 40, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 110px 0 60px;
  }

  .hero-text h1 {
    font-size: 30px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 24px;
  }

  .features {
    padding: 60px 0;
  }

  .section-title {
    font-size: 28px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .legal-content h1 {
    font-size: 28px;
  }
}

/* ==========================================
   Language Switcher
   ========================================== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary) !important;
  transition: all var(--transition);
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff !important;
  transform: translateY(-1px);
}
