/* ========================================
   STACKTRACK — LANDING PAGE
   ======================================== */

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --card: #161616;
  --border: #222222;
  --text: #f0f0f0;
  --sub: #707070;
  --gold: #D4AF37;
  --gold-glow: rgba(212, 175, 55, 0.15);
  --success: #2ecc71;
  --danger: #e74c3c;
  --accent: #2980b9;
  --silver: #C0C0C0;
  --plat: #7da1bf;
  --copper: #B87333;
  --radius: 16px;
  --radius-lg: 24px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.gold { color: var(--gold); }

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 2px;
}
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: var(--sub);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--gold) !important;
  color: #000 !important;
  padding: 10px 24px !important;
  border-radius: 100px;
  font-weight: 700 !important;
}
.nav-cta:hover { opacity: 0.9; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.2s; }

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 32px 80px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
  position: relative;
}
.hero-glow {
  position: absolute;
  top: 20%;
  left: 30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(80px);
}
.hero-content { flex: 1; position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 32px;
}
.hero h1 {
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 18px;
  color: var(--sub);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.store-badge img { height: 54px; transition: transform 0.2s; }
.store-badge:hover img { transform: scale(1.05); }
.hero-stats { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 36px;
  font-weight: 900;
  color: var(--gold);
  font-family: 'Space Mono', monospace;
}
.stat-label { font-size: 12px; color: var(--sub); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

.hero-phone { flex-shrink: 0; position: relative; z-index: 1; }
.phone-frame {
  width: 280px;
  height: 560px;
  background: var(--card);
  border-radius: 40px;
  border: 3px solid var(--border);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 60px var(--gold-glow);
}
.phone-screen { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.placeholder-screen {
  background: linear-gradient(145deg, #1a1a1a 0%, #0e0e0e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  width: 100%;
  height: 100%;
}
.placeholder-screen.tall { height: 500px; }
.placeholder-text {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--sub);
  letter-spacing: 3px;
  opacity: 0.5;
}
.placeholder-sub { font-size: 11px; color: var(--sub); margin-top: 8px; opacity: 0.4; letter-spacing: 1px; }

/* ---- METALS BAR ---- */
.metals-bar {
  overflow: hidden;
  padding: 24px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.metals-track {
  display: flex;
  gap: 24px;
  animation: scroll-metals 15s linear infinite;
  width: max-content;
}
.metal-chip {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 4px;
  padding: 12px 32px;
  border-radius: 100px;
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.gold-chip { color: var(--gold); border-color: var(--gold); background: rgba(212,175,55,0.08); }
.silver-chip { color: var(--silver); border-color: var(--silver); background: rgba(192,192,192,0.06); }
.plat-chip { color: var(--plat); border-color: var(--plat); background: rgba(125,161,191,0.06); }
.copper-chip { color: var(--copper); border-color: var(--copper); background: rgba(184,115,51,0.06); }

@keyframes scroll-metals {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- SECTIONS ---- */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}
.section-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.1;
}
.section-header p { font-size: 16px; color: var(--sub); line-height: 1.7; }

/* ---- FEATURES ---- */
.features { padding: 100px 32px; max-width: 1200px; margin: 0 auto; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.3s, border-color 0.3s, opacity 0.5s, translateY 0.5s;
  opacity: 0;
  transform: translateY(20px);
}
.feature-card.visible { opacity: 1; transform: translateY(0); }
.feature-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.feature-highlight {
  grid-column: span 2;
  background: linear-gradient(145deg, var(--card) 0%, rgba(212,175,55,0.04) 100%);
  border-color: rgba(212,175,55,0.2);
}
.feature-icon { font-size: 28px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.3px; }
.feature-card p { font-size: 14px; color: var(--sub); line-height: 1.7; }

/* ---- SCREENSHOTS ---- */
.screenshots { padding: 100px 32px; }
.screenshots-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  max-width: 1200px;
  margin: 0 auto;
}
.screenshots-scroll::-webkit-scrollbar { height: 6px; }
.screenshots-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.screenshot-card {
  flex-shrink: 0;
  width: 240px;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color 0.3s, opacity 0.5s;
  opacity: 0;
}
.screenshot-card.visible { opacity: 1; }
.screenshot-card:hover { border-color: var(--gold); }

/* ---- COMPARE ---- */
.compare { padding: 100px 32px; }
.compare-table-wrap {
  max-width: 800px;
  margin: 0 auto;
  overflow-x: auto;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table th, .compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sub);
  background: var(--surface);
  position: sticky;
  top: 0;
}
.compare-table td { color: var(--sub); }
.col-us { color: var(--gold) !important; font-weight: 700; text-align: center; }
.col-them { color: var(--sub) !important; text-align: center; opacity: 0.6; }
.compare-table th.col-us { color: var(--gold) !important; }
.compare-table tbody tr:hover { background: var(--surface); }

/* ---- PRICING ---- */
.pricing { padding: 100px 32px; }
.pricing-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}
.price-card {
  flex: 1;
  min-width: 260px;
  max-width: 320px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  position: relative;
  transition: transform 0.3s, opacity 0.5s;
  opacity: 0;
  transform: translateY(20px);
}
.price-card.visible { opacity: 1; transform: translateY(0); }
.price-card-pro {
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--card) 0%, rgba(212,175,55,0.06) 100%);
  transform: scale(1.05);
  z-index: 1;
}
.price-card-pro.visible { transform: scale(1.05); }
.price-popular {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 6px 24px;
  border-radius: 100px;
}
.price-tier { font-size: 14px; font-weight: 700; letter-spacing: 3px; color: var(--sub); margin-bottom: 16px; }
.price-amount { font-size: 48px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.price-amount span { font-size: 18px; font-weight: 600; color: var(--sub); }
.price-period { font-size: 13px; color: var(--sub); margin-bottom: 32px; }
.price-features { list-style: none; text-align: left; margin-bottom: 32px; }
.price-features li {
  font-size: 14px;
  color: var(--sub);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.price-features li.highlight { color: var(--text); }
.price-features li::before { content: ''; }
.price-btn {
  display: inline-block;
  width: 100%;
  padding: 16px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text);
  border: 1px solid var(--border);
  transition: 0.2s;
}
.price-btn:hover { border-color: var(--gold); color: var(--gold); }
.price-btn-pro {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
}
.price-btn-pro:hover { opacity: 0.9; color: #000; }

/* ---- DOWNLOAD ---- */
.download {
  padding: 100px 32px;
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.download-inner { max-width: 600px; margin: 0 auto; }
.download h2 { font-size: clamp(32px, 5vw, 48px); font-weight: 900; margin-bottom: 16px; letter-spacing: -1px; }
.download p { font-size: 16px; color: var(--sub); margin-bottom: 40px; }
.download .hero-actions { justify-content: center; }

/* ---- FOOTER ---- */
.footer { padding: 60px 32px 0; border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}
.footer-brand p { color: var(--sub); font-size: 14px; margin-top: 12px; line-height: 1.6; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--sub); text-transform: uppercase; margin-bottom: 4px; }
.footer-col a { color: var(--sub); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-bottom p { font-size: 12px; color: var(--sub); letter-spacing: 1px; }

/* ---- LEGAL MODALS ---- */
.legal-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.legal-modal.active { display: flex; }
.legal-modal-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 48px;
  position: relative;
}
.legal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--sub);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s;
}
.legal-close:hover { color: var(--text); }
.legal-modal h2 { font-size: 28px; font-weight: 900; margin-bottom: 8px; }
.legal-date { font-size: 13px; color: var(--sub); margin-bottom: 32px; }
.legal-body h3 { font-size: 16px; font-weight: 700; margin: 24px 0 8px; color: var(--text); }
.legal-body p { font-size: 14px; color: var(--sub); line-height: 1.8; margin-bottom: 12px; }
.legal-body a { color: var(--gold); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; padding-top: 140px; gap: 40px; }
  .hero-sub { margin: 0 auto 40px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-phone { order: -1; }
  .phone-frame { width: 220px; height: 440px; }
  .feature-highlight { grid-column: span 1; }
  .pricing-cards { flex-direction: column; align-items: center; }
  .price-card-pro, .price-card-pro.visible { transform: none; }
}

@media (max-width: 640px) {
  .nav-links { 
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 32px;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-cta { text-align: center; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 40px; }
  .footer-links { gap: 40px; }
  .stat-divider { display: none; }
  .hero-stats { gap: 16px; }
  .compare-table { font-size: 12px; }
  .compare-table th, .compare-table td { padding: 12px 10px; }
  .legal-modal-inner { padding: 32px 24px; }
}
