/* ============================================
   Entalabs — Light & Dark Theme Styles
   ============================================ */

/* --- CSS Custom Properties (Light Mode Default) --- */
:root {
  /* Surfaces */
  --bg: #DEE8ED;
  --bg-nav: rgba(255, 255, 255, 0.85);
  --surface: #FFFFFF;
  --surface-border: rgba(0, 0, 0, 0.08);
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);

  /* Text */
  --text: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;

  /* Accent */
  --accent: #10B981;
  --accent-hover: #059669;
  --accent-subtle: rgba(16, 185, 129, 0.1);

  /* Toggle */
  --toggle-bg: rgba(0, 0, 0, 0.06);
  --toggle-hover: rgba(0, 0, 0, 0.1);

  /* Misc */
  --nav-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --divider: rgba(0, 0, 0, 0.06);
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  --bg: #161A34;
  --bg-nav: rgba(22, 26, 52, 0.88);
  --surface: #1E2248;
  --surface-border: rgba(255, 255, 255, 0.06);
  --card-bg: rgba(30, 34, 72, 0.6);
  --card-border: rgba(45, 212, 168, 0.15);
  --card-shadow: 0 2px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(45, 212, 168, 0.08);

  --text: #F0F4F8;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --accent: #2DD4A8;
  --accent-hover: #34d399;
  --accent-subtle: rgba(45, 212, 168, 0.1);

  --toggle-bg: rgba(255, 255, 255, 0.06);
  --toggle-hover: rgba(255, 255, 255, 0.12);

  --nav-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --divider: rgba(255, 255, 255, 0.06);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 920px;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  box-shadow: var(--nav-shadow);
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.nav-inner {
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  flex-shrink: 0;
  height: 32px;
  width: auto;
}


.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: var(--toggle-bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  background: var(--toggle-hover);
  color: var(--text);
}

/* Show sun in dark mode, moon in light mode */
.icon-sun { display: none; }
.icon-moon { display: block; }

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--toggle-bg);
}

.nav-btn {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 20px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.nav-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* --- Hero --- */
.hero {
  padding: 100px 0 40px;
  text-align: center;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 16px;
  line-height: 1.7;
}

/* --- Hero Image --- */
.hero-orb-wrapper {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: -10px 0;
}

.hero-img {
  max-width: 620px;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: opacity 0.35s ease;
}

/* Light mode: show light image, hide dark */
.hero-img--light { display: block; }
.hero-img--dark { display: none; }

/* Dark mode: show dark image, hide light */
[data-theme="dark"] .hero-img--light { display: none; }
[data-theme="dark"] .hero-img--dark { display: block; }

/* CSS radial mask — fades image edges circularly into the background */
.hero-img {
  -webkit-mask-image: radial-gradient(ellipse closest-side, black 60%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side, black 60%, transparent 100%);
}

/* --- Services --- */
.services {
  padding: 60px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--card-shadow);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--card-shadow), 0 0 0 1px var(--accent-subtle);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-subtle);
  transition: background 0.35s ease;
}

.service-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.3;
  color: var(--text);
}

.service-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Stats --- */
.stats {
  padding: 60px 0 80px;
}

.stats-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 640px;
  margin: 0 auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-subtle);
  margin-bottom: 8px;
  transition: background 0.35s ease;
}

.stat-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.stat-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: 24px 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 680px) {
  .services-grid {
    gap: 12px;
  }

  .service-card {
    padding: 20px 14px;
  }

  .service-desc {
    font-size: 0.8rem;
  }

  .stats-grid {
    gap: 16px;
  }

  .hero-img {
    max-width: 260px;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .services-grid {
    gap: 8px;
  }

  .service-card {
    padding: 16px 10px;
  }

  .service-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }

  .service-icon svg {
    width: 32px;
    height: 32px;
  }

  .service-title {
    font-size: 0.95rem;
  }

  .service-desc {
    font-size: 0.75rem;
  }
}
