:root {
  --bg: #0c0c16;
  --bg-card: #12121e;
  --bg-panel: #0e0e1a;
  --fg: #f0ece4;
  --fg-dim: #8a8699;
  --fg-muted: #4a4860;
  --accent: #ff5722;
  --accent-dim: rgba(255, 87, 34, 0.12);
  --border: rgba(240, 236, 228, 0.07);
  --grid-line: rgba(240, 236, 228, 0.03);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ——— Background grid ——— */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ——— Navigation ——— */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(12, 12, 22, 0.7);
}

.wordmark {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.tagline {
  font-size: 0.75rem;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2.5rem 5rem;
}

.hero-grid {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero-headline {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 1.75rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-dim);
  line-height: 1.7;
  max-width: 420px;
  margin-bottom: 2.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--fg-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: 100px;
}

.meta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg-muted);
  display: inline-block;
}

.live-dot {
  background: #00e676;
  box-shadow: 0 0 6px #00e676;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ——— Data Panel ——— */
.hero-data-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-data-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.panel-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.data-readout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.readout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.readout-key {
  font-size: 0.78rem;
  color: var(--fg-dim);
  font-family: 'Sora', monospace;
}

.readout-val {
  font-family: 'Sora', monospace;
  font-size: 0.85rem;
  color: var(--fg);
  font-weight: 600;
}

.tension-val { color: var(--accent); }

.readout-bar {
  width: 140px;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
}

.positivity-fill {
  width: 94%;
  background: linear-gradient(90deg, #ff5722, #ff8a50);
}

.tensor-preview {
  font-size: 0.75rem;
  color: var(--fg-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow: hidden;
  line-height: 1.6;
  font-family: 'Sora', monospace;
}

/* ——— Manifesto ——— */
.manifesto {
  position: relative;
  z-index: 1;
  padding: 6rem 2.5rem;
}

.manifesto-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.manifesto-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 auto;
  width: 200px;
}

.manifesto-rule:first-child { margin-bottom: 3rem; }
.manifesto-rule:last-child { margin-top: 3rem; }

.manifesto-text {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  line-height: 1.7;
  color: var(--fg-dim);
  font-weight: 400;
}

.manifesto-text em {
  color: var(--fg);
  font-style: normal;
  font-weight: 600;
}

/* ——— Section commons ——— */
.section-header {
  margin-bottom: 3.5rem;
}

.section-num {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fg);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1rem;
  color: var(--fg-dim);
  max-width: 500px;
}

/* ——— Engineered ——— */
.engineered {
  position: relative;
  z-index: 1;
  padding: 5rem 2.5rem;
  border-top: 1px solid var(--border);
}

.engineered .section-header {
  max-width: 1280px;
  margin: 0 auto 3.5rem;
}

.vertical-cards {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.vert-card {
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}

.vert-card:last-child { border-right: none; }

.vert-card:hover { background: #16162a; }

.vert-icon { margin-bottom: 1.5rem; }

.vert-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.4rem;
}

.vert-sdk {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.vert-desc {
  font-size: 0.88rem;
  color: var(--fg-dim);
  line-height: 1.65;
}

/* ——— Pack Store ——— */
.packstore {
  position: relative;
  z-index: 1;
  padding: 5rem 2.5rem;
  border-top: 1px solid var(--border);
}

.packstore .section-header {
  max-width: 1280px;
  margin: 0 auto 2.5rem;
}

.filter-bar {
  max-width: 1280px;
  margin: 0 auto 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-label, .sort-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-right: 0.25rem;
}

.filter-tag {
  font-size: 0.78rem;
  color: var(--fg-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  cursor: pointer;
}

.filter-tag.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.pack-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.pack-card {
  background: var(--bg-card);
  padding: 1.75rem;
  transition: background 0.2s;
}

.pack-card:hover { background: #16162a; }

.pack-card-featured {
  background: #15152a;
  border-left: 2px solid var(--accent);
}

.pack-id {
  font-family: 'Sora', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.pack-price {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.pack-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.75rem;
  font-family: 'Sora', sans-serif;
}

.pack-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tag-high, .tag-pos, .tag-anx, .tag-sync, .tag-emp, .tag-low,
.tag-fury, .tag-vol, .tag-calm, .tag-fear, .tag-surv, .tag-emp {
  font-size: 0.68rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tag-high, .tag-fury { background: rgba(255, 87, 34, 0.15); color: #ff8a50; }
.tag-pos, .tag-emp, .tag-calm { background: rgba(0, 230, 118, 0.12); color: #00e676; }
.tag-anx, .tag-fear { background: rgba(255, 193, 7, 0.12); color: #ffd740; }
.tag-sync { background: rgba(138, 134, 153, 0.12); color: var(--fg-dim); }
.tag-low, .tag-vol, .tag-surv { background: rgba(244, 67, 54, 0.12); color: #ff6e6e; }

.pack-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pack-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

.stat-val {
  font-family: 'Sora', monospace;
  font-size: 0.85rem;
  color: var(--fg-dim);
}

/* ——— Developers ——— */
.developers {
  position: relative;
  z-index: 1;
  padding: 5rem 2.5rem;
  border-top: 1px solid var(--border);
}

.dev-split {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.dev-left .section-num { margin-bottom: 1rem; }

.dev-desc {
  font-size: 1rem;
  color: var(--fg-dim);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.dev-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dev-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.dev-btn.primary {
  background: var(--accent);
  color: #fff;
}

.dev-btn.primary:hover {
  background: #ff7043;
  transform: translateY(-1px);
}

.dev-btn.secondary {
  background: var(--bg-card);
  color: var(--fg-dim);
  border: 1px solid var(--border);
}

.dev-btn.secondary:hover {
  border-color: var(--fg-muted);
  color: var(--fg);
}

.code-block {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  font-family: 'Sora', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
}

.code-label {
  color: var(--fg-muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.code-line { color: var(--fg-dim); }
.code-dim { color: var(--fg-muted); }
.code-kw { color: #c792ea; }
.code-str { color: #c3e88d; }
.code-indent { padding-left: 1.5rem; color: var(--fg-dim); }

/* ——— Closing ——— */
.closing {
  position: relative;
  z-index: 1;
  padding: 7rem 2.5rem;
  border-top: 1px solid var(--border);
}

.closing-inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.closing-statement {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 3.2rem);
  font-weight: 300;
  color: var(--fg-dim);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ——— Footer ——— */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-wordmark {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--fg);
}

.footer-name {
  font-size: 0.85rem;
  color: var(--fg-dim);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  font-size: 0.78rem;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--fg); }

.footer-sub {
  font-size: 0.72rem;
  color: var(--fg-muted);
  font-style: italic;
  width: 100%;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .hero-grid, .dev-split {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .vertical-cards {
    grid-template-columns: 1fr;
  }

  .pack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero { padding-top: 7rem; }

  .footer-links { display: none; }
}

@media (max-width: 600px) {
  .pack-grid { grid-template-columns: 1fr; }

  .topnav { padding: 1rem 1.25rem; }

  .hero, .manifesto, .engineered, .packstore, .developers, .closing { padding-left: 1.25rem; padding-right: 1.25rem; }
}