/* ============================================
   WZ Diagrams Promotional Website
   App-aligned Dark Theme + Glassmorphism
   ============================================ */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #171717;
  --bg-card: rgba(20, 20, 20, 0.6);
  --bg-card-hover: rgba(30, 30, 30, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #22d3ee;
  --accent-purple: #8b5cf6;
  --accent-cyan-dim: rgba(34, 211, 238, 0.15);
  --glass-blur: 16px;
  --radius: 16px;
  --radius-sm: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Brand wordmark matches the app header title (Rajdhani, semibold, uppercase) */
.logo-wordmark {
  font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

a:hover {
  color: #67e8f9;
}

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

/* ============================================
   Glassmorphism Card
   ============================================ */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.glass:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

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

.nav-links .btn-nav {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
}

.nav-links .btn-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* ============================================
   Language Selector
   ============================================ */
.lang-selector-item {
  position: relative;
}

.lang-selector {
  position: relative;
}

.lang-selector-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.lang-selector-btn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.lang-selector-btn.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.lang-label {
  white-space: nowrap;
}

.lang-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.lang-selector-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 200;
  padding: 0.35rem 0;
  max-height: 320px;
  overflow-y: auto;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.875rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.lang-option:hover,
.lang-option:focus {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  outline: none;
}

.lang-option[aria-selected="true"] {
  color: var(--accent-cyan);
}

.lang-check {
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  color: var(--text-primary);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-icon {
  width: 220px;
  height: 220px;
  border-radius: 48px;
  box-shadow: 0 0 80px rgba(34, 211, 238, 0.2), 0 0 160px rgba(0, 123, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Features Grid
   ============================================ */
.features {
  padding: 5rem 0;
}

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

.feature-card {
  padding: 1.5rem;
  transition: var(--transition);
}

.feature-card .icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-cyan-dim);
  border-radius: 12px;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   Models Table
   ============================================ */
.models-section {
  padding: 5rem 0;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.models-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 700px;
}

.models-table thead {
  background: rgba(10, 10, 10, 0.6);
}

.models-table th {
  text-align: left;
  padding: 0.875rem 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.models-table td {
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.models-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.models-table tbody tr:last-child td {
  border-bottom: none;
}

.type-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.type-deterministic { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }
.type-ensemble { background: rgba(34, 211, 238, 0.15); color: var(--accent-cyan); }
.type-ai { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.type-seasonal { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.table-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   Visual Guide
   ============================================ */
.screenshots {
  padding: 5rem 0;
}

.visual-guide-card {
  padding: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.visual-guide-image {
  display: block;
  max-width: 60%;
  width: 100%;
  border-radius: var(--radius-sm);
  margin: 0 auto 1.5rem;
  border: 1px solid var(--border-color);
}

.visual-guide-list {
  text-align: left;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.visual-guide-list li {
  margin-bottom: 0.6rem;
}

/* ============================================
   Download Section
   ============================================ */
.download {
  padding: 5rem 0;
}

.download-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.download-content h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.download-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.store-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
}

.store-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

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

.store-icon {
  font-size: 1.5rem;
}

.store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.store-text .small {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.store-text .large {
  font-size: 1rem;
  font-weight: 600;
}

.pwa-note {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   Footer
   ============================================ */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.footer-brand p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

/* ============================================
   Privacy Page
   ============================================ */
.privacy-page {
  padding: 7rem 0 3rem;
}

.privacy-content {
  max-width: 800px;
  margin: 0 auto;
}

.privacy-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.privacy-section {
  margin-bottom: 2.5rem;
}

.privacy-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.privacy-section p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.privacy-section ul {
  margin-left: 1.25rem;
  color: var(--text-secondary);
}

.privacy-section ul li {
  margin-bottom: 0.5rem;
}

.privacy-section strong {
  color: var(--text-primary);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    margin: 0 auto 2rem;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-icon {
    width: 160px;
    height: 160px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.open {
    display: flex;
  }

  .lang-selector-btn {
    width: 100%;
    justify-content: center;
  }

  .lang-selector-menu {
    position: static;
    margin-top: 0.5rem;
    width: 100%;
    box-shadow: none;
    border: 1px solid var(--border-color);
    max-height: 240px;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .models-table {
    font-size: 0.8rem;
  }

  .models-table th,
  .models-table td {
    padding: 0.625rem 0.75rem;
  }
}
