/* ============================================================
   opencode-onboard landing - dark terminal theme, coral accent
   ============================================================ */

:root {
  --bg: #0d1117;
  --bg-panel: #161b22;
  --bg-terminal: #0a0c10;
  --border: #30363d;
  --text: #e6edf3;
  --text-dim: #9aa4b2;
  --accent: #f5495e;
  --accent-soft: #f8a0ac;
  --accent-glow: rgba(245, 73, 94, 0.35);
  --green: #3fb950;
  --yellow: #d29922;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }

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

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 0.5em;
  letter-spacing: -0.02em;
}

.section { padding: 72px 0; }
.section-sub { color: var(--text-dim); max-width: 720px; margin-bottom: 2rem; }
.section-sub.center { margin-left: auto; margin-right: auto; text-align: center; }

.accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.accent-code { color: var(--accent-soft); border-color: var(--accent); }

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

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
}

.nav-brand img { border-radius: 6px; }

.nav-links { display: flex; gap: 22px; }

.nav-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

/* ---------------- Hero ---------------- */
.hero { padding: 88px 0 48px; text-align: center; }

.hero-logo {
  margin-bottom: 24px;
  filter: drop-shadow(0 8px 32px var(--accent-glow));
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 36px;
}

.hero-platforms {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 24px;
  font-family: var(--mono);
}

.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-badges img { height: 20px; display: block; }

/* ---------------- Install box ---------------- */
.install-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 1rem;
  box-shadow: 0 0 0 1px rgba(245, 73, 94, 0.08), 0 8px 40px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s;
}

.install-box:hover { border-color: var(--accent); }

.install-box.big { font-size: 1.15rem; padding: 18px 24px; }

.install-box code { background: none; border: none; padding: 0; color: var(--text); }

.install-prompt { color: var(--green); font-weight: 700; user-select: none; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  transition: all 0.15s;
}

.copy-btn:hover { color: var(--accent); border-color: var(--accent); }

.copy-btn .icon-check { display: none; }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; color: var(--green); }
.copy-btn.copied { border-color: var(--green); }

/* ---------------- Terminal demo ---------------- */
.terminal-section { padding: 24px 0 48px; }

.terminal {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(245, 73, 94, 0.06);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  min-height: 300px;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-body .t-prompt { color: var(--green); font-weight: 700; }
.terminal-body .t-dim { color: var(--text-dim); }
.terminal-body .t-accent { color: var(--accent-soft); }
.terminal-body .t-ok { color: var(--green); }

.terminal-body .t-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------------- Cards ---------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.cards-grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  display: block;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  color: var(--text);
}

.card h3 {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent-soft);
  margin-bottom: 8px;
}

.card p { color: var(--text-dim); font-size: 0.9rem; }

/* ---------------- Timeline ---------------- */
.timeline {
  list-style: none;
  counter-reset: step;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--border));
}

.timeline li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 64px;
}

.timeline li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 2px solid var(--accent);
  color: var(--accent-soft);
  font-family: var(--mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline h3 { font-size: 1.05rem; margin-bottom: 4px; }
.timeline p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------------- Commands grid ---------------- */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.command {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  transition: border-color 0.2s;
}

.command:hover { border-color: var(--accent); }

.command > code {
  display: inline-block;
  background: var(--bg-terminal);
  color: var(--accent-soft);
  border-color: transparent;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.command p { color: var(--text-dim); font-size: 0.88rem; }

/* ---------------- Pipeline ---------------- */
.pipeline { max-width: 680px; margin: 0 auto; }

.pipe-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}

.pipe-step.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 32px var(--accent-glow);
}

.pipe-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.pipe-step h3 { font-size: 1rem; margin-bottom: 4px; }
.pipe-step p { color: var(--text-dim); font-size: 0.9rem; }

.pipe-arrow {
  text-align: center;
  color: var(--accent);
  font-size: 1.3rem;
  padding: 6px 0;
}

/* ---------------- Demo gif ---------------- */
.demo-gif {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
  margin-top: 12px;
}

/* ---------------- CTA ---------------- */
.cta-section {
  background: radial-gradient(ellipse at center, rgba(245, 73, 94, 0.08), transparent 70%);
}

.cta-note { color: var(--text-dim); margin-top: 20px; font-size: 0.9rem; }

.cta-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.btn:hover { border-color: var(--accent); color: var(--text); }

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

.btn.primary:hover {
  background: #ff5c70;
  box-shadow: 0 4px 24px var(--accent-glow);
  color: #fff;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text);
}

.footer-brand img { border-radius: 4px; }

.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--accent-soft); }

/* ---------------- Scroll reveal ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-logo { animation: none; }
  .terminal-body .t-cursor { animation: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 640px) {
  .nav-brand { white-space: nowrap; font-size: 0.85rem; }
  .nav-links { gap: 14px; font-size: 0.85rem; white-space: nowrap; }
  .nav-links a:nth-child(1), .nav-links a:nth-child(2), .nav-links a:nth-child(3) { display: none; }
  .hero { padding: 56px 0 32px; }
  .install-box { font-size: 0.85rem; gap: 8px; padding: 12px 14px; }
  .install-box.big { font-size: 0.9rem; }
  .section { padding: 48px 0; }
  .terminal-body { font-size: 0.72rem; min-height: 240px; }
  .pipe-step { padding: 16px; }
}
