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

/* ===== CSS Variables — Light ===== */
:root {
  --home-bg: #fff;
  --home-bg-alt: #f7f8fa;
  --home-text: #1d2129;
  --home-text-2: #4e5969;
  --home-text-3: #86909c;
  --home-border: #e5e6eb;
  --home-border-light: #f2f3f5;
  --home-header-bg: rgba(255, 255, 255, 0.8);
  --home-card-bg: #fff;
  --home-visual-bg: linear-gradient(135deg, #f2f3f5 0%, #e8eaed 100%);
  --home-hero-bg: linear-gradient(180deg, #f0f1ff 0%, #fff 100%);
  --primary: #165DFF;
  --primary-light: rgba(22, 93, 255, 0.08);
  --primary-hover: rgba(22, 93, 255, 0.04);
  --success: #00B42A;
  --success-light: rgba(0, 180, 42, 0.08);
  --warning: #FF7D00;
  --warning-light: rgba(255, 125, 0, 0.08);
  --purple: #722ED1;
  --purple-light: rgba(114, 46, 209, 0.08);
}

/* ===== CSS Variables — Dark ===== */
html.dark {
  --home-bg: #17171a;
  --home-bg-alt: #232324;
  --home-text: rgba(255, 255, 255, 0.85);
  --home-text-2: rgba(255, 255, 255, 0.65);
  --home-text-3: rgba(255, 255, 255, 0.45);
  --home-border: #333335;
  --home-border-light: #2a2a2c;
  --home-header-bg: rgba(23, 23, 26, 0.85);
  --home-card-bg: #232324;
  --home-visual-bg: linear-gradient(135deg, #2a2a2c 0%, #333335 100%);
  --home-hero-bg: linear-gradient(180deg, #1c1c2e 0%, #17171a 100%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--home-bg);
  color: var(--home-text);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Layout Container ===== */
.hc {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

/* ===== Page Wrapper ===== */
.home-layout {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--home-bg);
  color: var(--home-text);
  z-index: 1000;
  scroll-behavior: smooth;
}

/* ===== Common Text Styles ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== SVG Icon ===== */
.icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-svg svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* Lucide icon defaults */
[data-lucide] {
  display: inline-block;
  vertical-align: middle;
}

.dropdown-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -2px;
  color: var(--primary);
}

/* ===== Header ===== */
.home-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--home-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s;
}

.home-header.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.header-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.header-title {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--home-text-2);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-link:hover {
  color: var(--home-text);
  background: var(--home-border-light);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 500;
}

/* Product Dropdown */
.nav-dropdown-wrapper {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 8px;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.nav-dropdown-inner {
  background: var(--home-card-bg);
  border: 1px solid var(--home-border);
  border-radius: 12px;
  padding: 8px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.nav-dropdown-wrapper:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dropdown-item {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: var(--home-border-light);
}

.dropdown-item.active .dropdown-item-title {
  color: var(--primary);
}

.dropdown-item-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.dropdown-item-desc {
  font-size: 12px;
  color: var(--home-text-3);
}

/* Down Arrow */
.nav-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 2px;
}

/* Theme Toggle */
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--home-text-3);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}

.theme-btn:hover {
  color: var(--home-text);
  background: var(--home-border-light);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--home-border);
  background: var(--home-card-bg);
  color: var(--home-text);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: #4080FF;
  border-color: #4080FF;
  color: #fff;
}

.btn-sm {
  padding: 4px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 16px;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  cursor: pointer;
  padding: 4px;
  color: var(--home-text-2);
  background: none;
  border: none;
  font-size: 22px;
}

#mobile-toggle {
  display: none;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--home-border-light);
}

#mobile-toggle:checked + .mobile-nav {
  display: block;
}

.mobile-nav-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--home-text-3);
  padding: 12px 12px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--home-text-2);
  cursor: pointer;
  text-decoration: none;
}

.mobile-nav-link.sub {
  padding-left: 24px;
  font-size: 14px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--home-border-light);
  color: var(--primary);
}

.mobile-nav-actions {
  margin-top: 12px;
}

.mobile-nav-actions .btn {
  width: 100%;
}

/* ===== Main ===== */
.home-main {
  flex: 1;
}

/* ===== Footer ===== */
.home-footer {
  background: var(--home-bg-alt);
  border-top: 1px solid var(--home-border);
  padding: 48px 0 0;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  padding-bottom: 40px;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  height: 26px;
  width: 26px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
}

.footer-title {
  font-size: 15px;
  font-weight: 600;
  vertical-align: middle;
}

.footer-desc {
  margin-top: 12px;
  font-size: 13px;
  color: var(--home-text-3);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 56px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--home-text);
}

.footer-col a {
  font-size: 13px;
  color: var(--home-text-3);
  text-decoration: none;
}

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

.footer-bottom {
  border-top: 1px solid var(--home-border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
  color: var(--home-text-3);
}

.footer-bottom a {
  color: var(--home-text-3);
  text-decoration: none;
}

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

/* ===== Common Section Styles ===== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--home-bg-alt);
}

.section-title {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 48px;
  color: var(--home-text);
}

.section-desc {
  text-align: center;
  font-size: 15px;
  color: var(--home-text-3);
  margin-top: -36px;
  margin-bottom: 56px;
}

.section-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.04) 0%, rgba(114, 46, 209, 0.04) 100%);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .header-right > .btn:not(.theme-btn) {
    display: none;
  }

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

  .footer-top {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    gap: 40px;
  }
}
