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

:root {
  --bg:        #0a0a0a;
  --bg2:       #111111;
  --bg3:       #1a1a1a;
  --border:    #262626;
  --text:      #e2e2e2;
  --text-dim:  #888;
  --accent:    #ff3d7f;
  --accent2:   #ff80ab;
  --amber:     #ffb627;
  --amber-dim: #7a520a;
  --green:     #39ff14;
  --code-bg:   #141414;
  --radius:    8px;
  --font:      'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', monospace;
  --pixel:     'Press Start 2P', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}

pre {
  font-family: var(--mono);
  font-size: 0.875rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  line-height: 1.7;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--pixel);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo img { display: block; }

nav ul { list-style: none; display: flex; gap: 8px; align-items: center; }
nav ul li a { font-size: 0.875rem; font-weight: 500; color: var(--text-dim); padding: 6px 12px; border-radius: 6px; transition: color 0.15s; }
nav ul li a:hover { color: var(--text); }

.btn-nav {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 6px 16px !important;
  border-radius: 6px;
  transition: opacity 0.15s !important;
}
.btn-nav:hover { opacity: 0.85; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: opacity 0.15s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}
.btn-ghost:hover { color: var(--text); border-color: #444; }

/* ── Blinking cursor ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 4px;
  border-radius: 1px;
  animation: blink 1s step-end infinite;
}

/* ── Hero ── */
.hero {
  padding: 80px 24px 60px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-inner--single {
  grid-template-columns: 1fr;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.hero-inner--single .hero-logo { margin: 0 auto 28px; }
.hero-inner--single .hero-actions { justify-content: center; }
.hero-inner--single .hero-specs { justify-content: center; }

.editor-preview {
  padding: 60px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ep-label {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.editor-preview .hero-screen { max-width: 640px; margin: 0 auto; }

/* dot grid behind hero */
body > .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #2a2a2a 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--accent);
  background: rgba(255,61,127,0.1);
  border: 1px solid rgba(255,61,127,0.25);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-logo {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin-bottom: 28px;
  border-radius: 8px;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.hero-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-specs span {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
}

/* ── CRT Screen ── */
.screen-bezel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.screen-inner {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #050508;
  border-radius: 12px 12px 4px 4px;
  border: 2px solid #3a2a4a;
  box-shadow:
    0 0 0 4px #1a1a22,
    0 0 20px rgba(255, 61, 127, 0.15),
    0 0 60px rgba(180, 60, 255, 0.08),
    inset 0 0 30px rgba(100, 0, 180, 0.06),
    0 20px 60px rgba(0,0,0,0.7);
  overflow: hidden;
}

.screen-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.06) 2px,
    rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
  z-index: 2;
  border-radius: 10px;
}

.screen-content {
  position: relative;
  padding: 24px 20px 16px;
  z-index: 1;
}

.screen-code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.75;
  color: #c8d0e0;
  margin-bottom: 16px;
}

.c-dim  { color: #4a5068; }
.c-kw   { color: #c792ea; }
.c-fn   { color: #82aaff; }

.screen-hud {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #3a4060;
  border-top: 1px solid #1a1c28;
  padding-top: 10px;
}

.screen-stand {
  width: 80px;
  height: 20px;
  background: linear-gradient(to bottom, #1a1a22, #111118);
  border-radius: 0 0 4px 4px;
  border: 2px solid #2a2a35;
  border-top: none;
  margin: 0 auto;
}

/* ── Screenshots gallery ── */
.screenshots {
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
}

.scr-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}

.scr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.scr-frame {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.scr-frame:hover {
  border-color: #3a3a3a;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.scr-tab-bar {
  display: flex;
  gap: 1px;
  background: #0a0a0a;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  overflow: hidden;
}

.scr-tab {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--text-dim);
  padding: 8px 10px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.scr-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.scr-frame img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.scr-caption {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: #0d0d0d;
}

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

/* ── Amber terminal shell blocks ── */
pre.shell {
  background: #0c0800;
  border-color: #2a1f00;
  color: var(--amber);
}
pre.shell .prompt {
  color: var(--amber-dim);
  user-select: none;
}

/* ── Features ── */
.features {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.section-sub {
  color: var(--text-dim);
  margin-bottom: 48px;
  font-size: 1.05rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card {
  background: var(--bg2);
  padding: 28px;
  transition: background 0.15s;
  position: relative;
}
.feature-card:hover { background: var(--bg3); }

/* pixel corner brackets */
.feature-card::before,
.feature-card::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}
.feature-card::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.feature-card::after  { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.feature-card:hover::before,
.feature-card:hover::after { opacity: 1; }

.feature-icon {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── Quick Start ── */
.quickstart {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

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

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  align-items: start;
}

.step-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255,61,127,0.08);
  border: 1px solid rgba(255,61,127,0.2);
  border-radius: var(--radius);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
  margin-top: 12px;
}

.step-note {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

kbd {
  font-family: var(--mono);
  font-size: 0.75em;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
}

/* ── API Preview ── */
.api-preview {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.api-cat {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 14px;
}

.api-group ul { list-style: none; }
.api-group li {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
.api-group li:last-child { border-bottom: none; }
.api-group li code { font-size: 0.78rem; }

/* ── Download ── */
.download {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.download-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px;
}

.download-box h2 { font-family: var(--pixel); font-size: 1.6rem; margin-bottom: 12px; letter-spacing: 0.02em; }

.download-ver {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.download-desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  max-width: 480px;
  line-height: 1.7;
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 24px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-download:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }

.dl-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.btn-download strong { display: block; font-size: 1rem; }
.btn-download small { font-size: 0.75rem; font-family: var(--mono); opacity: 0.8; }

.download-src {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
}

/* ── Footer ── */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-inner .nav-logo { font-size: 0.6rem; }

footer p { font-size: 0.875rem; color: var(--text-dim); }
.footer-small { font-size: 0.75rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-screen { display: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .api-grid { grid-template-columns: repeat(2, 1fr); }
  .download-box { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero-text h1 { font-size: 2.2rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .api-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; }
  .step-num { width: 36px; height: 36px; font-size: 0.65rem; }
}
