/* ============================================================
   GhostMap Design System
   Palette: near-black bg, violet accent, ghost-glow signature
   Type: Space Grotesk (display) + Inter (body) + JetBrains Mono (code)
   Signature: Ghost glow, a soft violet aura around key elements
   ============================================================ */

:root {
  /* Palette */
  --bg:           #080810;
  --bg-2:         #0e0e1a;
  --bg-3:         #131325;
  --surface:      #12121e;
  --surface-2:    #191928;
  --border:       #1e1e32;
  --border-soft:  #161626;

  --text:         #eeeef5;
  --text-muted:   #8888a4;
  --text-faint:   #7a7a96;

  --violet:       #9b6dff;
  --violet-bright:#b794ff;
  --violet-dim:   rgba(155, 109, 255, 0.15);
  --violet-glow:  rgba(155, 109, 255, 0.25);

  --green:        #4ade80;
  --blue:         #60a5fa;
  --amber:        #fbbf24;
  --red:          #f87171;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Radii */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;

  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; }
a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Navbar ─────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.nav__inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 40px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav__brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav__links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text);
  background: var(--surface);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav__mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.btn--primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 0 0 0 var(--violet-glow);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--violet-glow);
}

.btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.btn--outline:hover {
  border-color: var(--violet);
  color: var(--text);
}

.btn--lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
.btn--sm { padding: 0.4rem 0.85rem; font-size: 0.82rem; }

/* Ghost Glow: the signature element */
/* Used sparingly on key visuals to give them the "ghost aura" */

.ghost-glow {
  position: relative;
}
.ghost-glow::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse at center, var(--violet-glow) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.08); }
}

/* ── Page hero ───────────────────────────────────────────── */

.hero {
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(155,109,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero--center { text-align: center; }
.hero--center .hero__sub { margin: 0 auto; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  background: var(--violet-dim);
  border: 1px solid rgba(155,109,255,0.3);
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  margin-bottom: 20px;
}

.hero__eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--violet);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0 0 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--violet-bright);
}

.hero__sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 0 36px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero--center .hero__actions { justify-content: center; }

.hero__meta {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.hero--center .hero__meta { justify-content: center; }

/* ── Section wrappers ────────────────────────────────────── */

.section {
  padding: 80px 0;
}

.section--bordered {
  border-top: 1px solid var(--border-soft);
}

.section__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 10px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

.section__desc {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0;
}

.section__head {
  margin-bottom: 52px;
}

.section__head--center {
  text-align: center;
}

.section__head--center .section__desc {
  margin: 0 auto;
}

/* ── Code / Tree panels ──────────────────────────────────── */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.panel__dots { display: flex; gap: 6px; }
.panel__dot { width: 10px; height: 10px; border-radius: 50%; }
.panel__dot--r { background: #ff5f56; }
.panel__dot--y { background: #ffbd2e; }
.panel__dot--g { background: #27c93f; }

.panel__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-left: 4px;
}

.panel__body {
  padding: 18px 20px;
}

/* Code syntax colors */
.code { font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.7; white-space: pre; overflow-x: auto; }
.code .ln  { display: inline-block; width: 24px; color: var(--text-faint); text-align: right; margin-right: 16px; user-select: none; }
.code .kw  { color: #c792ea; }
.code .fn  { color: #82aaff; }
.code .cls { color: var(--violet-bright); }
.code .str { color: #c3e88d; }
.code .num { color: #f78c6c; }
.code .cm  { color: var(--text-faint); }
.code .gh  { color: var(--violet); }   /* @ghost annotation */
.code .gs  { color: var(--amber); }    /* ghost status */
.code .gd  { color: var(--green); }    /* ghost done */
.code .line { display: block; }
.code .line--hl {
  background: rgba(155,109,255,0.18);
  margin: 0 -20px;
  padding: 0 20px;
  border-radius: 3px;
}

/* Ghost Tree */
.tree { font-family: var(--font-mono); font-size: 0.8rem; }
.tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: var(--text-muted);
}
.tree-row--i1 { padding-left: 18px; }
.tree-row--i2 { padding-left: 36px; }
.tree-row--i3 { padding-left: 54px; }
.tree-row__name { color: var(--text); }
.tree-row__badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
}
.badge--todo     { color: var(--blue);  background: rgba(96,165,250,0.12); }
.badge--review   { color: var(--amber); background: rgba(251,191,36,0.12); }
.badge--done     { color: var(--green); background: rgba(74,222,128,0.12); }
.badge--progress { color: var(--violet-bright); background: var(--violet-dim); }

.icon-c  { color: var(--violet-bright); flex-shrink: 0; }
.icon-f  { color: var(--blue); flex-shrink: 0; }
.icon-a  { color: var(--green); flex-shrink: 0; }
.icon-ch { color: var(--text-faint); flex-shrink: 0; }

/* ── Home: split hero ────────────────────────────────────── */

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
  padding: 72px 0 56px;
  position: relative;
}

.hero-split::after {
  content: '';
  position: absolute;
  top: -100px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(ellipse, rgba(155,109,255,0.1) 0%, transparent 65%);
  pointer-events: none;
}

/* ── Feature cards ───────────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.feat-card:hover {
  border-color: rgba(155,109,255,0.4);
  transform: translateY(-2px);
}

.feat-card__icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--violet-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--violet-bright);
  margin-bottom: 16px;
}

.feat-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feat-card__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--violet);
  background: var(--violet-dim);
  border-radius: 4px;
  padding: 1px 6px;
}

.feat-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Support section ─────────────────────────────────────── */

.support {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.support__cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 28px;
  text-align: center;
}

.support__cta-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--violet-dim);
  color: var(--violet-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.support__cta-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
}

.support__cta-text {
  margin: 0 0 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.support__future {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.55;
}

.support__note {
  margin: 0;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.support__note strong {
  color: var(--text);
}

.support__note a {
  color: var(--violet-bright);
  text-decoration: none;
}

/* ── Language grid ───────────────────────────────────────── */

.lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lang-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
}

.lang-pill:hover {
  border-color: var(--violet);
  color: var(--text);
}

.lang-pill .tier { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tier--1 { background: var(--green); }
.tier--2 { background: var(--amber); }
.tier--3 { background: var(--red); }

/* ── How it works: steps ─────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.step {
  background: var(--surface);
  padding: 32px 28px;
  position: relative;
}

.step__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.step__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--violet);
  background: var(--violet-dim);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 14px;
}

/* ── Roadmap ─────────────────────────────────────────────── */

.roadmap-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.roadmap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 30px;
}

.roadmap-card__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.roadmap-card--v1 .roadmap-card__label { color: var(--green); }
.roadmap-card--v2 .roadmap-card__label { color: var(--violet-bright); }

.checklist {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}

.checklist svg { flex-shrink: 0; margin-top: 2px; }

.vision-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vision-list li { display: flex; gap: 14px; }

.vision-list .ring {
  flex-shrink: 0;
  margin-top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--violet);
}

.vision-list h4 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vision-list p { margin: 0; font-size: 0.86rem; color: var(--text-muted); }

.vision-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--violet);
  background: var(--violet-dim);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: normal;
}

/* ── CTA final ───────────────────────────────────────────── */

.cta-block {
  text-align: center;
  padding: 88px 0;
}

.cta-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.cta-block p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 36px;
}

/* ── Footer ──────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border-soft);
  padding: 52px 0 28px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 44px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 12px;
}

.footer__brand img { width: 24px; border-radius: 6px; }

.footer__tagline {
  font-size: 0.86rem;
  color: var(--text-muted);
  max-width: 200px;
}

.footer__col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 16px;
}

.footer__col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col a {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

.footer__bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Page-specific: Features ─────────────────────────────── */

.feat-hero-screenshot {
  border-radius: var(--r);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 32px 80px -20px rgba(0,0,0,0.7), 0 0 0 1px var(--border);
}

.feat-hero-screenshot img {
  width: 100%;
  display: block;
}

.split-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.split-demo--reverse { direction: rtl; }
.split-demo--reverse > * { direction: ltr; }

.split-demo__text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

.split-demo__text p {
  color: var(--text-muted);
  margin: 0 0 20px;
  font-size: 0.95rem;
}

/* ── Concept pill links ──────────────────────────────────── */

.concept-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--violet);
  background: var(--violet-dim);
  border: 1px solid rgba(155,109,255,0.25);
  border-radius: 999px;
  padding: 3px 10px;
  text-decoration: none;
  transition: background 0.15s;
}
.concept-link:hover { background: rgba(155,109,255,0.22); }

/* ── Hero demo (panel grid: tree | code) ─────────────────── */

.hero-demo__grid {
  display: grid;
  grid-template-columns: 220px 1fr;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 1024px) {
  .hero-split { grid-template-columns: 1fr; gap: 40px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .roadmap-split { grid-template-columns: 1fr; }
  .split-demo { grid-template-columns: 1fr; }
  .split-demo--reverse { direction: ltr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__mobile-toggle { display: flex; }
  .nav__links--open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border-soft);
    padding: 16px 24px;
    gap: 4px;
  }
  .features-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero-demo__grid { grid-template-columns: 1fr; }
  .cta-block { padding: 56px 0; }
  .section { padding: 56px 0; }
  .btn--lg { width: 100%; justify-content: center; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .hero--center .hero__actions { align-items: center; }
}

/* ============================================================
   Accessibility additions
   ============================================================ */

/* Skip-to-content link for keyboard users. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--violet);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r);
  font-weight: 600;
  z-index: 9999;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Visible focus styles on all interactive elements. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--violet-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Respect prefers-reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Mobile nav scroll lock when menu is open. */
body.nav-open {
  overflow: hidden;
}
