*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── TOKENS ── */
:root {
  --bg: #FAFAF7;
  --bg-2: #F2F2EE;
  --surface: #FFFFFF;
  --border: #E4E4DE;
  --text: #111110;
  --text-2: #5A5A56;
  --text-3: #9A9A94;
  --accent: oklch(0.72 0.16 48);
  --accent-soft: oklch(0.96 0.04 48);
  --accent-border: oklch(0.88 0.08 48);
  --code-bg: #17171A;
  --code-text: #E8E8E4;
  --nav-bg: rgba(250, 250, 247, 0.85);
  --shadow-card: 0 4px 32px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-terminal: 0 16px 64px rgba(0,0,0,0.2);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #111110;
  --bg-2: #1A1A18;
  --surface: #161615;
  --border: #2A2A27;
  --text: #F0F0EC;
  --text-2: #A0A09A;
  --text-3: #5A5A56;
  --accent: oklch(0.76 0.16 48);
  --accent-soft: oklch(0.18 0.04 48);
  --accent-border: oklch(0.28 0.08 48);
  --nav-bg: rgba(17, 17, 16, 0.88);
  --shadow-card: 0 4px 32px rgba(0,0,0,0.3), 0 1px 4px rgba(0,0,0,0.2);
  --shadow-terminal: 0 16px 64px rgba(0,0,0,0.5);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-mark svg { width: 16px; height: 16px; fill: white; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--text); background: var(--bg-2); }

.nav-links .github-link {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  margin-left: 8px;
  padding: 6px 14px;
  border-radius: 6px;
}

.nav-links .github-link:hover { background: var(--bg-2); border-color: var(--text-3); }
.nav-links .github-link svg { width: 16px; height: 16px; fill: currentColor; }

/* Dark mode toggle */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  margin-left: 4px;
  flex-shrink: 0;
}

.theme-toggle:hover { background: var(--bg-2); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  z-index: 99;
  padding: 24px;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
  overflow-y: auto;
}

.nav-drawer.open { display: flex; }

.nav-drawer a {
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-drawer a:hover { background: var(--bg-2); }
.nav-drawer a svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

.nav-drawer-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ── HERO ── */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 50px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 20px;
}

.hero h1 em { font-style: normal; color: var(--accent); }

.hero p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
  font-weight: 300;
  max-width: 460px;
  margin-bottom: 36px;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { opacity: 0.85; }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-2); border-color: var(--text-3); }

/* Hero card */
.hero-visual { position: relative; }

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: background var(--transition), border-color var(--transition);
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #FF5F57; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #28C840; }

.hero-transfer { display: flex; flex-direction: column; gap: 12px; }

.transfer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition), border-color var(--transition);
}

.transfer-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.transfer-info { flex: 1; min-width: 0; }
.transfer-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.transfer-meta { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); margin-top: 2px; }

.transfer-status {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.status-done { background: #EDFAF3; color: #1A7A47; }
[data-theme="dark"] .status-done { background: #0D2A1C; color: #4ADE80; }
.status-progress { background: var(--accent-soft); color: var(--accent); }
.status-queue { background: var(--bg-2); color: var(--text-3); }

.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: progress 2.5s ease-in-out infinite alternate;
}
@keyframes progress { from { width: 45%; } to { width: 72%; } }

.hero-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.hero-stat {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition), border-color var(--transition);
}

.hero-stat-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.hero-stat-label {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── FEATURES ── */
.features {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.features-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 32px;
}

.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 48px;
}

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

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s, background var(--transition);
  cursor: default;
}

.feature-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: var(--text-3);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.65;
  font-weight: 300;
}

/* ── INSTALL ── */
.install {
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 32px;
}

.install-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.install-desc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.install-desc p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 24px;
}

.install-bullets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.install-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
}

.install-bullets li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 7px;
  flex-shrink: 0;
}

/* ── TERMINAL ── */
.terminal {
  background: var(--code-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-terminal);
}

.terminal-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  overflow-x: auto;
  scrollbar-width: none;
}

.terminal-tabs::-webkit-scrollbar { display: none; }

.terminal-tab {
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
  top: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.terminal-tab:hover { color: rgba(255,255,255,0.7); }
.terminal-tab.active { color: #E8E8E4; border-bottom-color: var(--accent); }

.terminal-body { padding: 28px; overflow-x: auto; }

.terminal-step { display: none; }
.terminal-step.active { display: block; }

.term-comment {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
  line-height: 1.5;
}

.term-block { margin-bottom: 20px; }

.term-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.term-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.term-prompt {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  user-select: none;
  flex-shrink: 0;
}

.term-cmd {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #E8E8E4;
  line-height: 1.5;
  word-break: break-all;
}

.term-cmd .kw { color: oklch(0.78 0.14 45); }
.term-cmd .str { color: oklch(0.80 0.12 140); }
.term-cmd .flag { color: oklch(0.75 0.12 220); }

.term-output {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
  padding-left: 22px;
  line-height: 1.6;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.1); }
.copy-btn svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.terminal-footer {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 14px;
  font-family: var(--font-mono);
}

.terminal-footer a { color: var(--text-3); transition: color 0.15s; }
.terminal-footer a:hover { color: var(--text-2); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  transition: background var(--transition), border-color var(--transition);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy { font-size: 13px; color: var(--text-3); }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a {
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content > * { animation: fadeUp 0.6s ease both; }
.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-content > *:nth-child(3) { animation-delay: 0.25s; }
.hero-content > *:nth-child(4) { animation-delay: 0.35s; }
.hero-visual { animation: fadeUp 0.7s 0.2s ease both; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .theme-toggle { order: 2; }

  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 24px 48px;
  }

  .hero p { max-width: 100%; }

  .features-inner { padding: 60px 24px; }

  .install { padding: 60px 24px; }
  .install-desc {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-title { margin-bottom: 32px; }
}

@media (max-width: 560px) {
  .nav-inner { padding: 0 16px; gap: 12px; }

  .hero { padding: 44px 16px 40px; }
  .hero-ctas { flex-direction: column; }
  .btn { justify-content: center; }

  .features-grid { grid-template-columns: 1fr; }
  .features-inner { padding: 48px 16px; }

  .install { padding: 48px 16px; }

  .terminal-body { padding: 20px 16px; }
  .term-cmd { font-size: 12px; }
  .term-prompt { font-size: 12px; }

  .footer-inner { flex-direction: column; text-align: center; justify-content: center; }
  .footer-links { justify-content: center; }
}
