:root {
  --bg: #12141a;
  --bg-elev: #1b1e26;
  --text: #ffffff;
  --text-dim: #b6bcc6;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #cfd8e3;
  --font-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;
}

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

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--text); color: var(--bg); }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 100;
  transition: background 0.5s var(--ease), backdrop-filter 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(18, 20, 26, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 13px;
  color: var(--text-dim);
  position: relative;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -10% 0;
  background:
    radial-gradient(60% 55% at 25% 30%, rgba(126, 150, 176, 0.78), transparent 70%),
    radial-gradient(50% 50% at 78% 68%, rgba(94, 118, 146, 0.7), transparent 72%),
    linear-gradient(160deg, #1c222b 0%, #28313d 45%, #14171d 100%);
  will-change: transform;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,20,26,0.35) 0%, transparent 30%, rgba(18,20,26,0.72) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
}
.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line:nth-child(2) { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--text-dim); }
.hero-subtitle {
  margin-top: 28px;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--text-dim);
  line-height: 1.7;
}
.cta-btn {
  display: inline-block;
  margin-top: 40px;
  padding: 14px 30px;
  border-radius: 999px;
  background: rgba(207, 216, 227, 0.2);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 14px;
  backdrop-filter: blur(6px);
  transition: background 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.cta-btn:hover { background: rgba(207,216,227,0.34); transform: translateY(-2px); border-color: rgba(255,255,255,0.28); }

.scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
}
.scroll-line {
  width: 1px; height: 46px;
  background: linear-gradient(180deg, var(--text-dim), transparent);
  overflow: hidden;
  position: relative;
}
.scroll-line::after {
  content: '';
  position: absolute; top: -46px; left: 0;
  width: 100%; height: 46px;
  background: var(--text);
  animation: scrollDown 2s var(--ease) infinite;
}
@keyframes scrollDown { 0% { top: -46px; } 100% { top: 46px; } }

/* ---------- Sections ---------- */
section { position: relative; }
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-bottom: 56px;
}
.features { padding: 140px 0; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature-card {
  background: var(--bg);
  padding: 40px 32px;
  transition: background 0.45s var(--ease);
}
.feature-card:hover { background: var(--bg-elev); }
.feature-icon { font-size: 26px; margin-bottom: 22px; }
.feature-card h3 { font-size: 1.1rem; font-weight: 500; margin-bottom: 10px; }
.feature-card p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.65; }

.tech { padding: 140px 0; background: var(--bg-elev); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tech-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 60px; }
.tech-item {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.tech-name { font-size: 1.02rem; font-weight: 400; }
.tech-desc { font-size: 0.85rem; color: var(--text-dim); font-family: var(--font-mono); }

/* ---------- Parallax ---------- */
.parallax-demo {
  position: relative;
  height: 90vh;
  min-height: 520px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.parallax-layer { position: absolute; inset: -15% 0; will-change: transform; }
.parallax-bg {
  background:
    radial-gradient(45% 45% at 30% 35%, rgba(132,158,186,0.62), transparent 70%),
    radial-gradient(40% 40% at 72% 60%, rgba(104,130,160,0.55), transparent 72%),
    linear-gradient(200deg, #1e2530, #141820);
}
.parallax-mid {
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.028) 0 2px, transparent 2px 46px);
}
.parallax-fg { display: flex; align-items: center; justify-content: center; }
.parallax-content { text-align: center; padding: 0 24px; position: relative; }
.parallax-content h2 { font-size: clamp(2.2rem, 6vw, 4.5rem); font-weight: 400; letter-spacing: -0.03em; }
.parallax-content p { margin-top: 18px; color: var(--text-dim); line-height: 1.7; }

/* ---------- Stats ---------- */
.stats { padding: 130px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 48px 24px;
  text-align: center;
}
.stat-number {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ---------- Footer ---------- */
.footer { padding: 90px 0 40px; border-top: 1px solid var(--line); background: var(--bg-elev); }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; }
.footer-left h3 { font-size: 1.3rem; font-weight: 500; }
.footer-left p { color: var(--text-dim); margin-top: 8px; font-size: 0.9rem; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { font-size: 0.88rem; color: var(--text-dim); transition: color 0.3s var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 60px; padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem; color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ---------- Reveal ---------- */
.fade-in { opacity: 0; transform: translateY(34px); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12px; }
  .container { padding: 0 20px; }
  .features, .tech, .stats { padding: 90px 0; }
  .tech-item { flex-direction: column; gap: 6px; }
  .footer-content { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; }
  .scroll-line::after { animation: none; }
}
