/* ===== CSS Variables: Light Theme (Default) ===== */
:root {
  /* Colors - Premium palette */
  --primary-blue: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --accent-blue: #0ea5e9;
  --accent-cyan: #06b6d4;
  --navy-dark: #0f172a;
  --white: #ffffff;
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border-light: #e2e8f0;
  --border-accent: #bfdbfe;
  
  /* Shadows - layered */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
  
  /* Backgrounds - soft gray, easy on eyes */
  --bg-primary: #e2e5ea;
  --bg-secondary: #d6dae1;
  --bg-accent: #cbd0d9;
  --bg-blue-subtle: #d0dcee;
  --bg-blue-light: #bccce6;
  
  /* Typography */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
  --primary-blue: #60a5fa;
  --primary-dark: #3b82f6;
  --primary-light: #93c5fd;
  --accent-blue: #38bdf8;
  --accent-cyan: #22d3ee;
  --navy-dark: #0f172a;
  --white: #1e293b;
  --text-dark: #f1f5f9;
  --text-body: #cbd5e1;
  --text-light: #94a3b8;
  --text-muted: #64748b;
  --border-light: #334155;
  --border-accent: #1e3a5f;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-accent: #334155;
  --bg-blue-subtle: #1e293b;
  --bg-blue-light: #1e3a5f;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(96, 165, 250, 0.12);
}

/* ===== Google Fonts Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800;900&display=swap');

/* ===== Global Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  color: var(--text-body);
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ===== Scroll-triggered reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Header/Navbar ===== */
header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

[data-theme="dark"] header {
  background-color: rgba(15, 23, 42, 0.85);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--primary-dark);
}

.logo i {
  font-size: 1.6rem;
}

.nav-center {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-center a {
  color: var(--text-body);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-center a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  transition: width 0.3s ease;
  border-radius: 1px;
}

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

.nav-center a:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn-toggle {
  background: none;
  border: 1px solid var(--border-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-body);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-toggle:hover {
  background-color: var(--bg-blue-subtle);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  box-shadow: var(--shadow-glow);
}

.btn-toggle i { font-size: 1.1rem; }
.btn-toggle .lang-label { font-weight: 700; }

.nav-link { text-decoration: none; }
.nav-link.active { text-decoration: none; color: var(--primary-blue); font-weight: 600; }

/* Header slide up on scroll */
header { transition: transform 0.25s ease, background-color 0.3s ease; }
header.hide { transform: translateY(-110%); }

/* Dark theme caption adjustments */
[data-theme="dark"] .img-caption { background: rgba(15, 23, 42, 0.85); color: var(--text-light); }
[data-theme="dark"] .hero-copy { color: #cbd5e1; }
[data-theme="dark"] .hero-subtitle { color: #93c5fd; }
[data-theme="dark"] .hero-title { color: transparent; }

/* Mobile nav layout tweaks */
@media (max-width: 480px) {
  nav { flex-wrap: wrap; gap: 0.5rem; }
  .logo { order: 1; }
  .nav-center { order: 2; flex: 0 1 100%; display: flex; flex-direction: row; gap: 0.5rem; justify-content: center; overflow-x: auto; padding: 0.5rem 0; flex-wrap: nowrap; }
  .nav-center a { white-space: nowrap; padding: 0.25rem 0.5rem; flex: 0 0 auto; font-size: 0.85rem; }
  .nav-right { order: 3; display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.25rem; }
}

/* ===== Hero Section ===== */
.hero-landing {
  padding: 3rem 1rem 5rem;
  background: linear-gradient(160deg, var(--bg-primary) 0%, var(--bg-blue-subtle) 50%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.hero-landing::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-landing::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-left {
  text-align: left;
}

.hero-subtitle {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--primary-blue);
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: var(--bg-blue-light);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--border-accent);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.05;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-copy {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--text-body);
  max-width: 44rem;
  line-height: 1.7;
}

/* Trust chips */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-body);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.trust-chip:hover {
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.trust-chip i {
  color: var(--primary-blue);
  font-size: 1rem;
}

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

.hero-right {
  display: flex;
  justify-content: center;
}

.cube-wrap {
  perspective: 1200px;
}

.cube {
  width: 420px;
  height: 300px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.9s ease-in-out;
  border-radius: var(--radius-xl);
}

.cube .face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.face img {
  width: 100%;
  height: 80%;
  object-fit: cover;
}

.img-caption {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 500;
}

.face1 { transform: rotateY(0deg) translateZ(0px); }
.face2 { transform: rotateY(180deg) translateZ(0px); }

/* ===== Section Styles ===== */
section {
  padding: 5rem 2rem;
}

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

/* Section background alternation */
section:nth-child(even) {
  background: var(--bg-secondary);
}

section:nth-child(odd) {
  background: var(--bg-primary);
}

h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-dark);
  line-height: 1.2;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ===== Cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.35s ease;
  animation: scaleIn 0.6s ease;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border-color: var(--border-accent);
}

.card:hover::before {
  opacity: 1;
}

.card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--bg-blue-light), var(--primary-blue));
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.card p {
  color: var(--text-body);
  margin-bottom: 1.5rem;
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-blue-subtle);
  border-radius: var(--radius-lg);
  font-size: 1.75rem;
  color: var(--primary-blue);
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.card:hover .card-icon {
  background: var(--primary-blue);
  color: white;
  box-shadow: var(--shadow-glow);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

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

.btn-secondary:hover {
  background: var(--bg-blue-subtle);
  box-shadow: var(--shadow-glow);
}

.btn-large {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

/* ===== How It Works / About Section ===== */
.about-intro {
  text-align: center;
  color: var(--text-body);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.about-cards .card,
.getstarted-section .card {
  min-height: 200px;
}

/* ===== Download Section ===== */
.download-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  animation: fadeInUp 0.8s ease;
}

.download-container .card {
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--primary-blue);
  padding: 2.5rem;
}

.download-container .card::before {
  display: none;
}

.download-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.download-step {
  padding: 2rem 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.download-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}

.download-step-icon {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.download-step h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.download-step p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Feature list on download pages */
.feature-list {
  margin-top: 2.5rem;
  text-align: left;
  background: var(--bg-secondary);
  padding: 1.75rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
}

.feature-list h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.feature-list ul {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 0.6rem 0;
  color: var(--text-body);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-light);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li i {
  color: var(--primary-blue);
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Safe install note */
.safe-install-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg-blue-subtle);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-body);
}

.safe-install-note i {
  color: var(--primary-blue);
}

/* FAQ accordion */
.faq-section {
  margin-top: 2.5rem;
  text-align: left;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--border-accent);
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: var(--bg-blue-subtle);
  color: var(--primary-blue);
}

.faq-question i {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.25rem;
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 1rem 1.25rem;
}

/* ===== Footer ===== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 3rem 2rem 1.5rem;
  margin-top: 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  text-align: left;
}

.footer-section h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary-blue);
  font-size: 1.05rem;
}

.footer-section p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

.footer-section i {
  color: var(--primary-blue);
  width: 1.2rem;
}

.footer-bottom {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  nav {
    padding: 0.75rem 1rem;
  }

  .nav-center {
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    flex: 0 1 100%;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .hero-copy {
    font-size: 1rem;
  }

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

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

  .hero-left {
    text-align: center;
  }

  h2 {
    font-size: 1.75rem;
  }

  section {
    padding: 3rem 1rem;
  }

  .btn-large {
    display: block;
    width: 100%;
  }

  .cube {
    width: 320px;
    height: 240px;
  }

  .footer-content {
    text-align: center;
  }

  .footer-section p {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-center {
    flex-direction: row;
    gap: 0.5rem;
    flex: 0 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .hero-title {
    font-size: 2rem;
    text-align: center;
  }

  h2 {
    font-size: 1.5rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .cube {
    width: 280px;
    height: 200px;
  }

  .download-steps {
    grid-template-columns: 1fr;
  }
}
