/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:        #0a0a0f;
  --bg-card:   #12121a;
  --bg-card-h: #1a1a26;
  --border:    #1e1e2e;
  --text:      #e4e4e7;
  --text-dim:  #8888a0;
  --accent:    #7c3aed;
  --accent-l:  #a78bfa;
  --accent-g:  linear-gradient(135deg, #7c3aed, #3b82f6);
  --radius:    12px;
  --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  --max-w:     1120px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,15,.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.nav-logo-img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--text-dim); font-size: .95rem; transition: color .2s; }
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.lang-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  padding: 6px 16px; border-radius: 8px; font-size: .85rem; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.lang-btn:hover { border-color: var(--accent); background: var(--bg-card); }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; padding: 120px 24px 60px;
  background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(124,58,237,.1), transparent);
}
.hero-brand {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  font-size: clamp(4rem, 12vw, 10rem); font-weight: 800;
  line-height: 1; letter-spacing: -0.04em;
  text-align: center; margin-bottom: 40px;
}
.hero-brand-logo {
  width: clamp(64px, 10vw, 120px); height: clamp(64px, 10vw, 120px);
  border-radius: 20px; flex-shrink: 0;
}
.hero-brand span {
  background: linear-gradient(135deg, #fff 30%, var(--accent-l) 70%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}
.hero-actions {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 48px;
}
.hero-prose {
  max-width: 720px; margin: 0 auto;
}
.hero-prose p {
  font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.85;
  color: var(--text-dim); margin-bottom: 20px;
  font-weight: 400;
}
.hero-prose .hero-lead {
  font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600;
  color: var(--text); margin-bottom: 28px;
}
.hero-prose .hero-highlight {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 600;
  color: var(--accent-l); border-left: 3px solid var(--accent);
  padding-left: 20px; margin: 32px 0;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 10px; font-size: .95rem; font-weight: 600;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent-g); color: #fff;
  box-shadow: 0 4px 24px rgba(124,58,237,.3);
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(124,58,237,.45); }
.btn-outline {
  border: 1px solid var(--border); color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); background: var(--bg-card); }

/* ===== ADVANTAGES ===== */
.advantages { padding: 60px 0; }
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.adv-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 28px;
  transition: border-color .2s, transform .2s;
}
.adv-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.adv-icon { font-size: 2rem; margin-bottom: 16px; }
.adv-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.adv-card p { color: var(--text-dim); font-size: .95rem; line-height: 1.7; }

/* ===== FEATURES ===== */
.features { padding: 60px 0; }
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800;
  text-align: center; margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 40%, var(--accent-l));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-sub { text-align: center; color: var(--text-dim); font-size: 1.05rem; margin-bottom: 36px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.feature-icon { font-size: 1.6rem; margin-bottom: 14px; }
.feature-card h4 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: .9rem; line-height: 1.65; }

/* ===== STACK ===== */
.stack { padding: 60px 0; }
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stack-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 20px;
  text-align: center; transition: border-color .2s, transform .2s;
}
.stack-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.stack-name { display: block; font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.stack-desc { color: var(--text-dim); font-size: .85rem; }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border); padding: 48px 0 32px;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.footer-logo { width: 28px; height: 28px; border-radius: 6px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-dim); font-size: .9rem; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-dim); font-size: .82rem; }

/* ===== FADE-IN ANIMATION ===== */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== DOWNLOAD CTA (homepage) ===== */
.download-cta { padding: 60px 0; text-align: center; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== DOWNLOAD PAGE ===== */
.dl-hero {
  padding: 120px 24px 40px; text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(124,58,237,.12), transparent);
}
.dl-title {
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 40%, var(--accent-l));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dl-sub { color: var(--text-dim); font-size: 1.1rem; margin-bottom: 12px; }
.dl-version {
  display: inline-block; padding: 4px 16px; border-radius: 999px;
  background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.2);
  font-size: .85rem; color: var(--accent-l);
}
.dl-section { padding: 40px 0; }
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 32px; }
.dl-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px;
  transition: border-color .2s, transform .2s;
}
.dl-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.dl-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.dl-platform-icon { font-size: 1.8rem; }
.dl-card-header h3 { font-size: 1.2rem; font-weight: 700; }
.dl-file-list { list-style: none; margin-bottom: 20px; }
.dl-file-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.dl-file-list li:last-child { border-bottom: none; }
.dl-file-name { font-size: .92rem; color: var(--text); }
.dl-file-btn {
  padding: 6px 18px; border-radius: 8px; font-size: .85rem; font-weight: 600;
  background: var(--accent-g); color: #fff; transition: box-shadow .2s, transform .15s;
}
.dl-file-btn:hover { box-shadow: 0 4px 16px rgba(124,58,237,.35); transform: translateY(-1px); }
.dl-note { color: var(--text-dim); font-size: .82rem; }
.dl-github { text-align: center; }

.dl-notes-section { padding: 40px 0; border-top: 1px solid var(--border); }
.dl-notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dl-note-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
}
.dl-note-card h4 { font-size: 1.05rem; margin-bottom: 10px; color: var(--accent-l); }
.dl-note-card p { color: var(--text-dim); font-size: .9rem; line-height: 1.7; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .dl-grid, .dl-notes-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(10,10,15,.95); backdrop-filter: blur(16px);
    padding: 24px; gap: 20px; border-bottom: 1px solid var(--border);
  }
  .nav-hamburger { display: block; }
  .adv-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 100px 20px 60px; min-height: auto; }
  .hero-brand { font-size: clamp(3rem, 15vw, 6rem); margin-bottom: 28px; }
  .hero-actions { margin-bottom: 48px; }
  .hero-prose { margin-top: 0; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .adv-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center; gap: 20px;
  padding: 16px 24px;
  background: #fff; border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
  animation: slideUp .3s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { color: #555; font-size: .9rem; max-width: 720px; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-accept, .cookie-decline {
  padding: 8px 20px; border-radius: 6px;
  font-size: .9rem; cursor: pointer; transition: background .2s, border-color .2s;
}
.cookie-accept {
  background: var(--accent); color: #fff; border: none;
}
.cookie-accept:hover { background: var(--accent-l); }
.cookie-decline {
  background: transparent; color: #666; border: 1px solid #ccc;
}
.cookie-decline:hover { border-color: #999; color: #333; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
