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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: var(--accent-hover);
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== CSS Variables / Theme ===== */
:root {
  --bg-primary: #0b0f1a;
  --bg-secondary: #111827;
  --bg-card: rgba(255, 255, 255, 0.04);
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent: #f0c040;
  --accent-hover: #f7d44a;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 20px;
  --radius-sm: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-banner: linear-gradient(135deg, #1a1f2e, #0b0f1a);
  --gradient-accent: linear-gradient(135deg, #f0c040, #f7d44a);
  --gradient-text: linear-gradient(135deg, #f0c040, #f7d44a);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.02);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --gradient-banner: linear-gradient(135deg, #e2e8f0, #ffffff);
  --gradient-accent: linear-gradient(135deg, #f0c040, #f7d44a);
  --gradient-text: linear-gradient(135deg, #f0c040, #f7d44a);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Layout & Grid ===== */
section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 24px;
  position: relative;
}

.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Header & Navigation ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 15, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.7);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links li a {
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: var(--accent);
  color: #0b0f1a;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle,
.menu-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.2rem;
  line-height: 1;
}

.theme-toggle:hover,
.menu-toggle:hover {
  background: var(--accent);
  color: #0b0f1a;
}

.menu-toggle {
  display: none;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 4px 16px;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(240, 192, 64, 0.2);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 8px 0;
  font-size: 0.9rem;
  outline: none;
  width: 140px;
}

.search-box input::placeholder {
  color: var(--text-secondary);
}

.search-box button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box button:hover {
  color: var(--accent);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  width: 100%;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--glass-border);
  padding: 24px;
  z-index: 999;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
}

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

.mobile-menu a {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu a:hover {
  background: var(--glass-bg);
  color: var(--accent);
}

/* ===== Main Content ===== */
main {
  padding-top: 64px;
}

/* ===== Glass Card ===== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.glass-card h3,
.glass-card h4 {
  color: var(--accent);
  margin-bottom: 12px;
}

.glass-card p {
  color: var(--text-secondary);
}

/* ===== Section Title ===== */
.section-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 48px;
}

/* ===== Banner ===== */
.banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 480px;
  display: flex;
  align-items: center;
  padding: 60px 48px;
  background: var(--gradient-banner);
}

.banner-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.banner h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -1px;
  color: var(--text-primary);
}

.banner p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: #0b0f1a;
  padding: 14px 36px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
}

.banner-cta:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(240, 192, 64, 0.3);
}

.banner-svg {
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  pointer-events: none;
  opacity: 0.3;
}

.banner-nav {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--glass-border);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-dot.active {
  background: var(--accent);
  width: 32px;
  border-radius: 6px;
}

/* ===== Scroll Animation ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Statistics ===== */
.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid var(--glass-border);
  padding: 16px 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
  background: var(--glass-bg);
  border-radius: var(--radius-sm);
  padding-left: 8px;
  padding-right: 8px;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.faq-question span:last-child {
  font-size: 1.2rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-question span:last-child {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  color: var(--text-secondary);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-top: 12px;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 48px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.footer a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
  margin-top: 32px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.footer h4 {
  color: var(--text-primary);
  margin-bottom: 16px;
  font-size: 1rem;
}

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0f1a;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--accent-hover);
  transform: translateY(-4px);
}

/* ===== Smooth Scroll Offset ===== */
section[id] {
  scroll-margin-top: 80px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.25rem; }

  .nav-links,
  .search-box {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .banner {
    padding: 40px 24px;
    min-height: 360px;
  }

  .banner h1 {
    font-size: 2rem;
  }

  .banner p {
    font-size: 1rem;
  }

  .banner-svg {
    width: 100%;
    opacity: 0.15;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 32px;
  }

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

  section {
    padding: 48px 16px;
  }

  .glass-card {
    padding: 24px;
  }

  .stat-number {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .banner-cta {
    padding: 12px 24px;
    font-size: 1rem;
  }

  .back-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* ===== Utility ===== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ===== Focus Styles for Accessibility ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Selection ===== */
::selection {
  background: var(--accent);
  color: #0b0f1a;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ===== Print ===== */
@media print {
  header,
  .back-top,
  .banner-svg,
  .mobile-menu {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .glass-card {
    border: 1px solid #ddd;
    box-shadow: none;
    background: #fff;
  }
}