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

:root {
  --gold:       #C9912A;
  --gold-dim:   rgba(201, 145, 42, 0.12);
  --gold-bd:    rgba(201, 145, 42, 0.30);
  --bg:         #0D0F14;
  --bg2:        #131620;
  --bg3:        #1A1D28;
  --bg4:        #21253A;
  --text:       #EAE6DC;
  --muted:      #6E6B65;
  --subtle:     #9A968E;
  --border:     #252833;
  --serif:      'Playfair Display', Georgia, serif;
  --sans:       'DM Sans', -apple-system, sans-serif;
  --mono:       'Fira Code', 'Consolas', monospace;
  --radius:     12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
p { color: var(--subtle); }
strong { color: var(--text); font-weight: 500; }
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--gold);
}

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

.section { padding: 100px 0; }

/* ── Section Labels / Headers ──────────────────────────────────── */
.section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.section-label.gold { color: var(--gold); }

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}
.section-header h2 { font-family: var(--serif); font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.2; color: var(--text); margin-bottom: 16px; }
.section-sub { font-size: 16px; color: var(--subtle); }

/* ── Reveal Animations ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay { transition-delay: 0.18s; }

/* ── Navigation ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-color: var(--border); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(145deg, #C9912A, #7A5A10);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 16px; color: #0C0A06;
  flex-shrink: 0;
}
.logo-mark.small { width: 24px; height: 24px; font-size: 12px; border-radius: 6px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13.5px;
  font-weight: 500;
}
.nav-links a { color: var(--subtle); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-github {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--subtle) !important;
  transition: border-color 0.2s, color 0.2s !important;
}
.nav-github:hover { border-color: var(--muted) !important; color: var(--text) !important; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--subtle);
  border-radius: 1px;
  transition: all 0.25s;
}
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border);
}
.nav-mobile a {
  padding: 10px 0;
  font-size: 14px;
  color: var(--subtle);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--text); }
.nav-mobile.open { display: flex; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn-download-nav {
  padding: 7px 16px !important;
  background: var(--gold) !important;
  color: #0C0A06 !important;
  border-radius: 8px;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: opacity 0.2s, transform 0.15s !important;
  border: none !important;
  white-space: nowrap;
}
.btn-download-nav:hover { opacity: 0.88 !important; transform: translateY(-1px); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 28px;
  background: var(--gold);
  color: #0C0A06;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
  border: none;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); }
.btn-primary.btn-large { padding: 16px 36px; font-size: 16px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: var(--muted); background: var(--bg2); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--muted); background: rgba(255,255,255,0.04); }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(201,145,42,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(201,145,42,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding-top: 60px;
  padding-bottom: 60px;
}
.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-bd);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 22px;
  letter-spacing: -1px;
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
}
.hero-sub {
  font-size: 17px;
  line-height: 1.75;
  color: var(--subtle);
  margin-bottom: 36px;
  max-width: 480px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.hero-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* ── Desktop Mock ──────────────────────────────────────────────── */
.hero-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.desktop-mock {
  width: 100%;
  max-width: 460px;
  background: #0B0E13;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}
.desktop-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0D1017;
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red    { background: #FF6058; }
.dot.yellow { background: #FFB93E; }
.dot.green  { background: #3FD265; }
.mock-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.desktop-content {
  padding: 20px 24px 28px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 2;
}
.code-line { min-height: 1.6em; }
.c-blue   { color: #569CD6; }
.c-yellow { color: #DCDCAA; }
.c-green  { color: #4EC9B0; }
.c-orange { color: #CE9178; }
.c-white  { color: #D4D4D4; }
.c-comment{ color: #6A9955; }

/* ── Popup Card (shared styles) ────────────────────────────────── */
.popup-card,
.demo-popup-large {
  background: rgba(10, 12, 18, 0.97);
  border: 1px solid rgba(201, 145, 42, 0.44);
  border-radius: var(--radius-xl);
  padding: 22px 24px 18px;
  box-shadow: 0 0 0 1px rgba(201,145,42,0.06), 0 32px 72px rgba(0,0,0,0.85);
}
.popup-card {
  position: absolute;
  bottom: -12px;
  right: -20px;
  width: 300px;
  animation: floatCard 6s ease-in-out infinite;
}
.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.popup-brand {
  display: flex; align-items: center; gap: 7px;
}
.popup-logo-mark {
  width: 17px; height: 17px;
  border-radius: 4px;
  background: linear-gradient(145deg, #C9912A, #7A5A10);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 9px; color: #0C0A06;
}
.popup-brand-name {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.popup-close {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg3);
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.popup-close:hover { background: var(--bg4); color: var(--text); }
.popup-word {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 4px;
}
.popup-pronun {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2px;
}
.popup-divider {
  height: 1px;
  background: var(--border);
  margin: 13px 0 11px;
}
.popup-def {
  font-size: 13px;
  color: var(--subtle);
  line-height: 1.7;
  margin-bottom: 10px;
}
.popup-synonyms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.syn-label {
  font-size: 9.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.syn-tag {
  font-size: 11px;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-bd);
  border-radius: 4px;
  padding: 1px 8px;
}
.popup-actions {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
}
.popup-got {
  flex: 1;
  padding: 7px 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-bd);
  transition: all 0.15s;
  font-family: var(--sans);
}
.popup-got:hover { background: rgba(201,145,42,0.2); }
.popup-learning {
  flex: 1;
  padding: 7px 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg3);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: all 0.15s;
  font-family: var(--sans);
}
.popup-learning:hover { background: var(--bg4); color: var(--text); }
.popup-progress-wrap {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
  margin-bottom: 6px;
}
.popup-progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 1px;
  width: 100%;
  animation: drainProgress 8s linear infinite;
}
.popup-queue {
  font-size: 9.5px;
  color: var(--muted);
  text-align: right;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%       { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes drainProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

.hero-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  font-size: 12px;
  color: var(--muted);
  animation: fadeUpDown 2s ease-in-out infinite;
}

@keyframes fadeUpDown {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50%       { opacity: 0.8; transform: translateY(4px); }
}

/* ── Problem / Solution ────────────────────────────────────────── */
.problem { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.problem-col h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  line-height: 1.3;
}
.problem-col p { margin-bottom: 14px; font-size: 15px; }

/* ── How It Works ──────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}
.step {
  text-align: center;
  padding: 0 16px;
}
.step-number {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 700;
  color: rgba(201,145,42,0.15);
  line-height: 1;
  margin-bottom: 16px;
}
.step-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  margin: 0 auto 18px;
}
.step h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.step p { font-size: 14px; line-height: 1.7; }
.step-connector {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--border), rgba(201,145,42,0.3), var(--border));
  margin-top: 80px;
  flex-shrink: 0;
}

/* ── Features ──────────────────────────────────────────────────── */
.features { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: rgba(201,145,42,0.3);
  transform: translateY(-3px);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-bd);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  margin-bottom: 18px;
}
.feature-card h3 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.feature-card p { font-size: 13.5px; line-height: 1.7; }

/* ── Demo Section ──────────────────────────────────────────────── */
.demo { overflow: hidden; }
.demo-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.demo-popup-large {
  width: 100%;
  max-width: 400px;
  animation: none;
}
.demo-popup-large .popup-word { font-size: 40px; }
.demo-popup-large .popup-def  { font-size: 14.5px; }
.demo-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}
.demo-btn {
  padding: 8px 18px;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--subtle);
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.15s;
}
.demo-btn:hover { border-color: var(--muted); color: var(--text); background: var(--bg3); }
.demo-hint { font-size: 12px; color: var(--muted); }

/* ── Tech Stack ────────────────────────────────────────────────── */
.tech { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.tech-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s;
}
.tech-card:hover { border-color: rgba(201,145,42,0.25); }
.tech-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 4px;
}
.tech-role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.tech-card p { font-size: 13.5px; line-height: 1.65; }

.arch-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.arch-title {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}
.arch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 40px;
}
.arch-item-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.arch-item p { font-size: 13.5px; line-height: 1.65; }

/* ── Download CTA ──────────────────────────────────────────────── */
.download {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.download::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(201,145,42,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.download-inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}
.download-logo-mark {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(145deg, #C9912A, #7A5A10);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 30px; color: #0C0A06;
  margin: 0 auto 28px;
  box-shadow: 0 0 0 8px rgba(201,145,42,0.08), 0 0 0 16px rgba(201,145,42,0.04);
}
.download-inner h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.2;
}
.download-inner p {
  font-size: 16px;
  margin-bottom: 36px;
}
.download-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.download-meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dot-sep { color: var(--border); }

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 13.5px;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--muted); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; padding-top: 48px; }
  .hero-visual { justify-content: center; min-height: 340px; }
  .popup-card { right: 0; bottom: -8px; width: 260px; }
  .popup-card .popup-word { font-size: 26px; }
  .desktop-mock { max-width: 380px; }
  .problem-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step-connector { width: 1px; height: 32px; margin: 0 auto; background: linear-gradient(180deg, var(--border), rgba(201,145,42,0.3), var(--border)); }
  .arch-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero-title { font-size: 38px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn-primary, .hero-cta .btn-secondary { justify-content: center; }
  .features-grid, .tech-grid { grid-template-columns: 1fr; }
  .download-cta { flex-direction: column; align-items: center; }
  .demo-controls { flex-direction: column; gap: 12px; }
  .arch-block { padding: 24px; }
}
