:root {
  /* Premium Design Tokens */
  --primary: #0d9488;
  --primary-glow: rgba(13, 148, 136, 0.15);
  --secondary: #f59e0b;
  --bg-body: #ffffff;
  --bg-dark: #0f172a;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-on-dark: #f8fafc;
  --text-muted-on-dark: #cbd5e1;
  --white: #ffffff;
  
  /* Modern Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);

  --font-main: 'Inter', sans-serif;
}

/* --- Dark Mode Variables (Manual Toggle) --- */
[data-theme="dark"] {
  --bg-body: #121212;
  --text-main: #f8fafc;
  --text-muted: #cbd5e1; /* Brightened for better contrast */
  --white: #111111;
      --glass-bg: rgba(18, 18, 18, 0.8);
  
  --glass-border: rgba(255, 255, 255, 0.1);
}

.text-muted { color: var(--text-muted) !important; }

html {
  scroll-behavior: smooth;
}

#download {
  scroll-margin-top: 120px;
}

body {
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Apply Dark Styles when [data-theme="dark"] is active */
[data-theme="dark"] .navbar {
  background: #0f0f0f;
  border-bottom-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .site-logo, [data-theme="dark"] .footer .site-logo {
  color: #ffffff !important;
}

[data-theme="dark"] .site-headline, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] .footer h5 {
  color: #ffffff;
}

[data-theme="dark"] .feature-card {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .feature-icon {
  background: rgba(13, 148, 136, 0.2);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .footer {
  background: #000000;
  border-top-color: rgba(255, 255, 255, 0.1);
}


/* --- Theme Toggle Button --- */
.theme-toggle {
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

/* --- Rest of Styles --- */

.navbar {
  padding: 1.25rem 0;
  background: #f8fafc;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--bg-dark);
}

.logo-icon {
  border-radius: 12px;
  box-shadow: 0 8px 16px var(--primary-glow);
}

.hero-section {
  padding: 80px 0 60px;
  background: radial-gradient(circle at 80% 20%, rgba(13, 148, 136, 0.08), transparent 40%),
              radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.05), transparent 40%);
}

.site-headline {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: #0f172a;
}

.site-tagline {
  font-size: 1.25rem;
  font-weight: 450;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 3rem;
}

.hero-image-wrapper {
  position: relative;
  height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 60px;
}

.iphone-frame {
  position: relative;
  width: 300px;
  height: 620px;
  background: #000000;
  border-radius: 50px;
  border: 7px solid #000000;
  box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 2;
  transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.iphone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.iphone-primary {
  z-index: 4;
  transform: translateX(160px) translateY(40px);
}

.iphone-secondary {
  position: absolute;
  z-index: 3;
  width: 280px;
  height: 580px;
  transform: translateX(0px) translateY(0px) scale(0.95);
  opacity: 1;
}

.iphone-tertiary {
  position: absolute;
  z-index: 2;
  width: 260px;
  height: 540px;
  transform: translateX(-160px) translateY(-40px) scale(0.9);
  opacity: 1;
}

.hero-image-wrapper:hover .iphone-primary {
  transform: translateX(180px) translateY(30px);
}

.hero-image-wrapper:hover .iphone-secondary {
  transform: translateX(0px) translateY(-10px) scale(1);
  opacity: 1;
}

.hero-image-wrapper:hover .iphone-tertiary {
  transform: translateX(-180px) translateY(-60px) scale(0.95);
  opacity: 1;
  filter: blur(0);
}

.usp-badge {
  display: inline-block;
  background: rgba(13, 148, 136, 0.1);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-stores img {
  height: 54px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-stores img:hover {
  transform: scale(1.08) translateY(-2px);
}

.feature-card {
  background: var(--white);
  padding: 3.5rem 2.5rem;
  border-radius: 40px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 15px 45px -10px rgba(0, 0, 0, 0.04);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.12);
  border-color: rgba(13, 148, 136, 0.1);
}

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

.feature-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.1), rgba(13, 148, 136, 0.05));
  color: var(--primary);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  margin-bottom: 2.5rem;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8);
}

.feature-card h3 {
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.footer {
  background: #f8fafc;
  color: var(--text-muted);
  padding: 100px 0 60px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer .site-logo {
  color: var(--text-main) !important;
  margin-bottom: 1.5rem;
}

.footer h5 {
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer a:hover {
  color: var(--primary);
  transform: translateX(5px);
  display: inline-block;
}

.footer hr {
  border-color: rgba(0, 0, 0, 0.05);
}

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

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

.site-headline { animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.site-tagline { animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards; opacity: 0; }
.cta-btns { animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards; opacity: 0; }
.hero-image { animation: float 6s ease-in-out infinite; }

@media (max-width: 991px) {
  .hero-section { 
    padding: 60px 0 40px; 
    text-align: center; 
  }
  .site-tagline { margin-left: auto; margin-right: auto; }
  
  .hero-image-wrapper {
    height: 520px;
    padding-bottom: 40px;
    margin-top: 40px;
  }

  .iphone-frame {
    width: 220px;
    height: 460px;
    border-width: 6px;
    border-radius: 36px;
  }

  .iphone-primary {
    transform: translateX(40px) translateY(40px);
  }

  .iphone-secondary {
    width: 200px;
    height: 420px;
    transform: translateX(-10px) translateY(10px) scale(0.95);
  }

  .iphone-tertiary {
    width: 180px;
    height: 380px;
    transform: translateX(-50px) translateY(-10px) scale(0.9);
  }

  /* Disable Hover Fan-out on Mobile */
  .hero-image-wrapper:hover .iphone-primary,
  .hero-image-wrapper:hover .iphone-secondary,
  .hero-image-wrapper:hover .iphone-tertiary {
    transform: none;
    transform: inherit;
  }
}

/* --- Dark Mode Toggle Support --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-body: #121212;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --white: #111111;
    --glass-bg: rgba(18, 18, 18, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
  }

  body:not([data-theme="light"]) {
    background-color: var(--bg-body);
    color: var(--text-main);
  }

  :root:not([data-theme="light"]) .navbar {
    background: #0f0f0f;
    border-bottom-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  :root:not([data-theme="light"]) .site-logo, :root:not([data-theme="light"]) .footer .site-logo {
    color: #ffffff !important;
  }

  :root:not([data-theme="light"]) .site-headline, :root:not([data-theme="light"]) h2, :root:not([data-theme="light"]) h3, :root:not([data-theme="light"]) h4, :root:not([data-theme="light"]) .footer h5 {
    color: #ffffff;
  }

  :root:not([data-theme="light"]) .feature-card {
    background: #111111;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  }

  :root:not([data-theme="light"]) .feature-icon {
    background: rgba(13, 148, 136, 0.2);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  }

  :root:not([data-theme="light"]) .footer {
    background: #0f0f0f; /* Slightly darker than body for depth */
    border-top-color: rgba(255, 255, 255, 0.05);
  }

  
  :root:not([data-theme="light"]) .theme-toggle .sun-icon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon-icon { display: none; }
}
