/* ============================================================
   Pi5 Host — Landing Page
   Industrial / Terminal aesthetic
   Palette: Volcanic Glass + Hot Orange
   Fonts: Syne (display) + Space Mono (code/body)
   ============================================================ */

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

:root {
  --bg:        #080808;
  --bg2:       #111111;
  --bg3:       #1a1a1a;
  --bg4:       #222222;
  --border:    #2a2a2a;
  --border2:   #333333;
  --text:      #e8e4df;
  --text2:     #888880;
  --text3:     #555550;
  --orange:    #FF6B2B;
  --orange2:   #FF8C55;
  --orange-dim:#FF6B2B33;
  --green:     #39FF14;
  --green-dim: #39FF1422;
  --radius:    4px;
  --font-display: 'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Scanlines ── */
.scanlines {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
}

/* ── Noise ── */
.noise {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ══════════════════════════════════════════════════════════
   NAV
══════════════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 60px;
  background: rgba(8,8,8,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 800;
  letter-spacing: 0.05em;
}
.logo-bracket { color: var(--text3); }
.logo-accent  { color: var(--orange); }

.nav-links {
  display: flex; align-items: center; gap: 32px; list-style: none;
}
.nav-links a {
  color: var(--text2); text-decoration: none;
  font-size: 11px; letter-spacing: 0.12em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta {
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.nav-links .nav-cta:hover { background: var(--orange); color: #000; }

.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: 1px; background: var(--text2);
  transition: all 0.2s;
}

/* ══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  padding: 120px 40px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Grid background */
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 0.15em; color: var(--text2);
  border: 1px solid var(--border2);
  padding: 6px 14px; border-radius: 2px;
  margin-bottom: 32px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.95;
  margin-bottom: 28px;
}
.title-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.6s ease forwards;
}
.title-line--1 { font-size: clamp(42px, 5vw, 72px); color: var(--text); animation-delay: 0.1s; }
.title-line--2 { font-size: clamp(72px, 10vw, 140px); color: var(--orange); animation-delay: 0.25s; letter-spacing: -0.02em; }
.title-line--3 { font-size: clamp(42px, 5vw, 72px); color: var(--text2); animation-delay: 0.4s; }

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-size: 13px; color: var(--text2); line-height: 1.8;
  margin-bottom: 36px; max-width: 480px;
}

.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.1em; font-weight: 700;
  border-radius: var(--radius); text-decoration: none;
  cursor: pointer; border: 1px solid transparent;
  transition: all 0.2s; white-space: nowrap;
}
.btn-icon { font-size: 14px; }
.btn--primary {
  background: var(--orange); color: #000; border-color: var(--orange);
}
.btn--primary:hover {
  background: var(--orange2); border-color: var(--orange2);
  box-shadow: 0 0 24px var(--orange-dim);
}
.btn--ghost {
  background: transparent; color: var(--text); border-color: var(--border2);
}
.btn--ghost:hover { background: var(--bg3); border-color: var(--text3); }
.btn--xl { padding: 16px 32px; font-size: 13px; }
.btn-size {
  font-size: 10px; color: rgba(0,0,0,0.5);
  background: rgba(0,0,0,0.15); padding: 2px 8px; border-radius: 2px;
}

/* ── Hero Stats ── */
.hero-stats {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--font-display); font-size: 28px; font-weight: 800;
  color: var(--orange); line-height: 1;
}
.stat-label { font-size: 9px; letter-spacing: 0.15em; color: var(--text3); }
.stat-divider { color: var(--border2); font-size: 20px; }

/* ── Terminal Window ── */
.terminal-window {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(255,107,43,0.08), 0 40px 80px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  animation: termIn 0.7s ease 0.6s forwards;
}
@keyframes termIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.t-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.t-dot--red    { background: #FF5F57; }
.t-dot--yellow { background: #FEBC2E; }
.t-dot--green  { background: #28C840; }
.t-title {
  margin-left: 8px; font-size: 11px; color: var(--text3); letter-spacing: 0.05em;
}

.terminal-body {
  padding: 20px; min-height: 280px;
  font-size: 12px; line-height: 1.8;
}
.t-line { display: flex; align-items: baseline; gap: 8px; }
.t-prompt { color: var(--orange); font-weight: 700; flex-shrink: 0; }
.t-cmd { color: var(--text); }
.t-cursor {
  color: var(--orange); animation: blink 1s step-end infinite;
  font-size: 14px; line-height: 1;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.t-output { margin-top: 8px; }
.t-out-line { font-size: 12px; line-height: 1.9; }
.t-out-line.success { color: var(--green); }
.t-out-line.info    { color: var(--text2); }
.t-out-line.warn    { color: #FEBC2E; }
.t-out-line.prompt  { color: var(--orange); }

/* ══════════════════════════════════════════════════════════
   TICKER
══════════════════════════════════════════════════════════ */
.ticker-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  padding: 12px 0;
}
.ticker-track {
  display: flex; gap: 32px; align-items: center;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
  font-size: 10px; letter-spacing: 0.15em; color: var(--text3);
}
.ticker-sep { color: var(--orange); font-size: 8px; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════════════════
   SECTIONS — shared
══════════════════════════════════════════════════════════ */
section { padding: 100px 40px; }

.section-header { margin-bottom: 60px; }
.section-tag {
  display: block; font-size: 11px; letter-spacing: 0.2em;
  color: var(--orange); margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800; line-height: 1.0;
  color: var(--text);
}
.section-title em {
  font-style: normal; color: var(--text2);
}

/* ══════════════════════════════════════════════════════════
   FEATURES
══════════════════════════════════════════════════════════ */
.features { background: var(--bg); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.feature-card {
  background: var(--bg);
  padding: 36px 32px;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover { background: var(--bg2); }
.feature-card:hover::before { opacity: 1; }

.feature-card--large {
  grid-column: span 2;
}

.feature-icon {
  font-size: 24px; color: var(--orange); margin-bottom: 16px;
  display: block;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.08em; margin-bottom: 12px;
  color: var(--text);
}
.feature-card p {
  font-size: 12px; color: var(--text2); line-height: 1.8;
  margin-bottom: 16px;
}
.feature-tag {
  font-size: 10px; color: var(--text3); letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════════
   STACK
══════════════════════════════════════════════════════════ */
.stack { background: var(--bg2); }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.stack-item {
  background: var(--bg2);
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  transition: background 0.2s;
  opacity: 0; transform: translateX(-10px);
}
.stack-item.visible {
  animation: stackIn 0.4s ease forwards;
}
@keyframes stackIn {
  to { opacity: 1; transform: translateX(0); }
}
.stack-item:hover { background: var(--bg3); }

.stack-logo {
  width: 44px; height: 44px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800;
  font-size: 13px; color: var(--orange); flex-shrink: 0;
}
.stack-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.stack-name { font-size: 13px; font-weight: 700; color: var(--text); }
.stack-role { font-size: 10px; color: var(--text3); letter-spacing: 0.08em; }
.stack-status {
  font-size: 9px; letter-spacing: 0.15em; color: var(--green);
  border: 1px solid var(--green-dim);
  padding: 3px 8px; border-radius: 2px;
}

/* ══════════════════════════════════════════════════════════
   QUICKSTART
══════════════════════════════════════════════════════════ */
.quickstart { background: var(--bg); }

.steps { display: flex; flex-direction: column; gap: 0; }

.step {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 32px; align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0; transform: translateY(20px);
}
.step.visible {
  animation: fadeUp 0.5s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.step:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-display);
  font-size: 48px; font-weight: 800;
  color: var(--border2); line-height: 1;
  padding-top: 4px;
}
.step-content h3 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.08em; margin-bottom: 16px;
  color: var(--text);
}

/* ── Code blocks ── */
.code-block {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-size: 10px; color: var(--text3); letter-spacing: 0.1em;
}
.copy-btn {
  background: none; border: 1px solid var(--border2);
  color: var(--text3); font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.1em;
  padding: 3px 10px; border-radius: 2px; cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:hover { border-color: var(--orange); color: var(--orange); }
.copy-btn.copied { border-color: var(--green); color: var(--green); }

pre { padding: 20px; overflow-x: auto; }
code { font-family: var(--font-mono); font-size: 12px; line-height: 1.9; }
.c-prompt { color: var(--orange); }
.c-comment { color: var(--text3); }
.c-output  { color: var(--green); }

/* ══════════════════════════════════════════════════════════
   FILE TREE
══════════════════════════════════════════════════════════ */
.filetree-section { background: var(--bg2); }

.filetree-wrap {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 700px;
}
.filetree {
  background: var(--bg);
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 12px; line-height: 2;
}
.ft-root { color: var(--orange); font-weight: 700; margin-bottom: 4px; }
.ft-dir  { color: var(--text); }
.ft-file { color: var(--text2); }
.ft-note { color: var(--text3); font-size: 11px; }

/* ══════════════════════════════════════════════════════════
   DOWNLOAD
══════════════════════════════════════════════════════════ */
.download {
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.download-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.download-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(255,107,43,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.download-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 800; line-height: 1.0;
  margin: 16px 0 24px;
}
.download-title em { font-style: normal; color: var(--orange); }
.download-sub {
  font-size: 13px; color: var(--text2); line-height: 1.8;
  margin-bottom: 40px;
}
.download-actions { margin-bottom: 28px; }
.download-meta {
  display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
  font-size: 11px; color: var(--text3); letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px;
  background: var(--bg2);
}
.footer-inner { text-align: center; }
.footer-logo {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 800;
  margin-bottom: 12px;
}
.footer-copy { font-size: 12px; color: var(--text2); margin-bottom: 8px; }
.footer-legal { font-size: 10px; color: var(--text3); letter-spacing: 0.1em; }

/* ══════════════════════════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding-top: 100px; }
  .terminal-window { max-width: 600px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-card--large { grid-column: span 2; }
}

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 60px; left: 0; right: 0;
    background: var(--bg2); border-bottom: 1px solid var(--border);
    padding: 20px; gap: 16px;
  }

  section { padding: 60px 20px; }
  .hero { padding: 100px 20px 60px; gap: 40px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card--large { grid-column: span 1; }
  .step { grid-template-columns: 50px 1fr; gap: 16px; }
  .step-num { font-size: 32px; }
  .hero-stats { gap: 16px; }
  .stat-num { font-size: 22px; }
  .download-meta { flex-direction: column; gap: 8px; }
}