/* ============================================================
   PONSHUB — Terminal Aesthetic CSS
   ============================================================ */

/* ── Google Fonts loaded via HTML ── */

/* ── CSS Variables ── */
:root {
  --bg: #050708;
  --surface: #0d0f12;
  --surface-2: #151820;
  --border: #1e2230;
  --border-strong: #2d3349;
  --foreground: #e8eaf0;
  --muted: #6b7280;
  --muted-2: #374151;
  --accent: #CCFF00; /* Robin Neon — Robinhood brand */
  --accent-2: #00C805; /* classic Robinhood green */
  --accent-dim: rgba(204, 255, 0, 0.15);
  --amber: #f59e0b;
  --cyan: #00C805;
  --pink: #ec4899;

  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;

  --glow-accent: 0 0 20px rgba(204, 255, 0, 0.5), 0 0 40px rgba(204, 255, 0, 0.2);
  --glow-dot: 0 0 10px var(--accent);
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--foreground);
  font-family: var(--font-mono);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ── Utility Colors ── */
.text-muted { color: var(--muted); }
.text-muted-2 { color: var(--muted-2); }
.text-accent { color: var(--accent); }
.text-accent-2 { color: var(--accent-2); }
.text-foreground { color: var(--foreground); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* ── Blinking Caret ── */
.caret-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
  box-shadow: var(--glow-dot);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Dot Pattern Background ── */
.dots-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  pointer-events: none;
}

/* ── CA Banner ── */
.ca-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 7, 8, 0.95);
  backdrop-filter: blur(8px);
}
.ca-banner-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  font-size: 11px;
}
.ca-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.ca-right {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
}
.ca-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  cursor: pointer;
  transition: color 0.15s;
  font-family: var(--font-mono);
  font-size: 11px;
}
.ca-copy-btn:hover { color: var(--foreground); }
.ca-right a { transition: color 0.15s; }
.ca-right a:hover { color: var(--foreground); }
.hide-sm { display: none; }
@media (min-width: 640px) {
  .hide-sm { display: inline; }
  .show-mobile { display: none; }
  .hide-mobile { display: inline; }
}
.show-mobile { display: inline; }
.hide-mobile { display: none; }
@media (min-width: 640px) {
  .hide-mobile { display: inline; }
  .show-mobile { display: none; }
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 28px;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 7, 8, 0.8);
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.025em;
  transition: opacity 0.15s;
}
.logo-link:hover { opacity: 0.85; }
.logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--glow-dot);
  transition: box-shadow 0.2s;
}
.logo-link:hover .logo-dot {
  box-shadow: 0 0 20px var(--accent);
}
.logo-glow { text-shadow: 0 0 12px rgba(204, 255, 0, 0.7); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}
.nav-link {
  border-radius: 4px;
  padding: 4px 8px;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover, .nav-link.active {
  background: var(--surface-2);
  color: var(--foreground);
}
.nav-link-external {
  display: none;
  border-radius: 4px;
  border: 1px solid var(--border);
  padding: 4px 8px;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}
.nav-link-external:hover {
  border-color: var(--accent);
  color: var(--accent);
}
@media (min-width: 640px) { .nav-link-external { display: inline-block; } }

/* ── Hero Section ── */
.hero-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  position: relative;
  max-width: 1152px;
  margin: 0 auto;
  display: grid;
  gap: 40px;
  padding: 64px 24px;
}
@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    padding: 96px 24px;
  }
}
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

/* Badge pill */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 4px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--glow-dot);
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px var(--accent); }
  50% { box-shadow: 0 0 20px var(--accent), 0 0 40px rgba(204, 255, 0, 0.3); }
}

/* Hero title */
.hero-title {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--foreground);
}
@media (min-width: 640px) { .hero-title { font-size: 2.5rem; } }
@media (min-width: 768px) { .hero-title { font-size: 3rem; } }
.hero-glow { text-shadow: var(--glow-accent); }

.hero-desc {
  max-width: 560px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
  font-family: var(--font-sans);
}

/* Hero action buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: rgba(204, 255, 0, 0.1);
  padding: 8px 16px;
  font-size: 14px;
  color: var(--accent);
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  background: rgba(204, 255, 0, 0.2);
  box-shadow: 0 0 20px rgba(204, 255, 0, 0.3);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 8px 16px;
  font-size: 14px;
  color: var(--foreground);
  transition: border-color 0.15s;
}
.btn-secondary:hover { border-color: var(--border-strong); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--foreground); }
.btn-lg { padding: 10px 20px; font-size: 15px; }
.flex-shrink { flex-shrink: 0; align-self: flex-start; }

/* Stats strip */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--border);
  text-align: center;
}
.stat-box {
  background: var(--surface);
  padding: 12px 16px;
}
.stat-box dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}
.stat-box dd {
  font-size: 1.1rem;
  color: var(--foreground);
  margin-top: 2px;
  transition: color 0.3s;
}

/* ── Terminal Chrome ── */
.term-chrome {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(204, 255, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.4);
}
.term-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  padding: 8px 12px;
}
.term-dots { display: flex; align-items: center; gap: 6px; }
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.term-title { font-size: 11px; color: var(--muted); }
.term-year { font-size: 11px; color: var(--muted-2); display: none; }
@media (min-width: 640px) { .term-year { display: block; } }

/* Terminal body */
.term-body {
  height: 420px;
  overflow-y: auto;
  background: var(--bg);
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.term-body::-webkit-scrollbar { width: 4px; }
.term-body::-webkit-scrollbar-track { background: transparent; }
.term-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.term-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.term-prompt { color: var(--accent); user-select: none; white-space: pre; }
.term-out { color: var(--muted); white-space: pre-wrap; }
.term-success { color: #27c93f; }
.term-error { color: #ff5f56; }
.term-info { color: var(--cyan); }
.term-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

.hero-terminal-wrap { position: relative; }
.term-caption {
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--muted-2);
}

/* ── Section Shared ── */
.section-padded { padding: 64px 0; }
.border-section { border-bottom: 1px solid var(--border); }
.section-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 40px;
}
.section-header-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.section-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.section-title {
  margin-top: 4px;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--foreground);
}
@media (min-width: 640px) { .section-title { font-size: 1.875rem; } }
.section-sub {
  max-width: 320px;
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-sans);
}
.section-desc {
  max-width: 700px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  font-family: var(--font-sans);
}
.mb-8 { margin-bottom: 32px; }
.mb-10 { margin-bottom: 40px; }
.mt-3 { margin-top: 12px; }
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: block; } }

/* ── Deploy Section ── */
.deploy-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 1024px) {
  .deploy-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

.deploy-form-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.deploy-form { padding: 24px; display: flex; flex-direction: column; gap: 20px; }

.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.form-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.15s;
}
.form-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(204, 255, 0, 0.15); }
.form-prefix {
  padding: 8px 10px;
  color: var(--accent);
  font-size: 13px;
  border-right: 1px solid var(--border);
  user-select: none;
  flex-shrink: 0;
}
.form-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 12px;
  color: var(--foreground);
  font-size: 13px;
  font-family: var(--font-mono);
}
.form-input::placeholder { color: var(--muted-2); }
.form-input::-webkit-inner-spin-button,
.form-input::-webkit-outer-spin-button { appearance: none; }
.form-textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
  padding: 10px 12px;
  color: var(--foreground);
  font-size: 13px;
  font-family: var(--font-mono);
  resize: vertical;
  width: 100%;
  transition: border-color 0.15s;
}
.form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(204, 255, 0, 0.15); }
.form-textarea::placeholder { color: var(--muted-2); }

.form-actions { display: flex; gap: 12px; align-items: center; padding-top: 4px; }
.btn-deploy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: rgba(204, 255, 0, 0.12);
  padding: 10px 20px;
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-mono);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  position: relative;
}
.btn-deploy:hover {
  background: rgba(204, 255, 0, 0.22);
  box-shadow: 0 0 20px rgba(204, 255, 0, 0.3);
}
.btn-deploy:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-reset {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  transition: color 0.15s;
  cursor: pointer;
}
.btn-reset:hover { color: var(--foreground); }

.deploy-arrow { font-size: 14px; }
.deploy-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(204, 255, 0, 0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: none;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.deploy-spinner.visible { display: inline-block; }

/* Deploy preview terminal */
.deploy-preview-body {
  height: 360px;
  font-size: 12px;
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--border);
  list-style: none;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  background: var(--surface);
  padding: 20px;
  transition: background 0.15s;
}
.feature-card:hover { background: var(--surface-2); }
.feature-title {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 8px;
}
.feature-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  font-family: var(--font-sans);
}

/* ── Comparison Table ── */
.table-wrap {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.compare-table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
}
.compare-table thead tr {
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.compare-table th {
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 400;
  text-align: left;
}
.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.row-alt { background: rgba(21, 24, 32, 0.4); }
.compare-table td.text-accent { color: var(--accent); }
.compare-table td.text-muted { color: var(--muted); }
.compare-table th.text-accent { color: var(--accent); }
.compare-table th.text-muted-2 { color: var(--muted-2); }

/* ── Roadmap / Token Section ── */
.roadmap-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--border);
  list-style: none;
}
@media (min-width: 640px) { .roadmap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .roadmap-grid { grid-template-columns: repeat(4, 1fr); } }

.roadmap-card {
  background: var(--surface);
  padding: 16px;
}
.roadmap-quarter {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}
.roadmap-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--foreground);
}
.roadmap-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.roadmap-dot.shipped { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.roadmap-dot.inprogress { background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse-glow 2s ease-in-out infinite; }
.roadmap-dot.planned { background: var(--muted); }
.roadmap-dot.horizon { border: 1px solid var(--muted-2); background: transparent; }

.roadmap-status { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }
.shipped-label { color: var(--cyan); }
.inprogress-label { color: var(--accent); }
.planned-label { color: var(--muted); }
.horizon-label { color: var(--muted-2); }

.roadmap-items {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  font-family: var(--font-sans);
}

/* ── CTA Section ── */
.cta-inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.cta-title {
  margin-top: 12px;
  font-size: 2rem;
  letter-spacing: -0.04em;
  color: var(--foreground);
}
@media (min-width: 640px) { .cta-title { font-size: 2.5rem; } }
.cta-desc {
  margin: 16px auto 0;
  max-width: 480px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  font-family: var(--font-sans);
}
.inline-code {
  border-radius: 4px;
  background: var(--surface);
  padding: 2px 6px;
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 13px;
}
.cta-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 7, 8, 0.8);
}
.footer-top {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  font-size: 11px;
}
@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.footer-ca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.footer-ca code {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}
.footer-copy-btn {
  color: var(--muted-2);
  font-size: 11px;
  font-family: var(--font-mono);
  transition: color 0.15s;
}
.footer-copy-btn:hover { color: var(--foreground); }
.footer-links {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
}
.footer-links a { font-size: 11px; transition: color 0.15s; }
.footer-links a:hover { color: var(--foreground); }

.footer-bottom {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 24px;
}
@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand .text-sm { font-size: 14px; }
.footer-brand .text-xs { font-size: 12px; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 12px;
  color: var(--muted);
}
.footer-nav a { transition: color 0.15s; }
.footer-nav a:hover { color: var(--foreground); }
.footer-version {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--foreground);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.success { border-color: var(--accent); color: var(--accent); }
