@font-face {
  font-family: 'Symbols Nerd Font';
  src: url('../fonts/nerd-symbols.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg: #0a0b0e;
  --surface: #14161d;
  --text: #e8ecf3;
  --muted: #8b93a3;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --border: #23262f;
  --font-sans: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Mono', 'Symbols Nerd Font', 'SFMono-Regular', ui-monospace, Consolas, monospace;
}

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

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

/* Amber bloom — the atuin-style atmospheric glow, in ccswitch's colour */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 42% at 50% -2%, rgba(245, 158, 11, 0.18), transparent 68%),
    radial-gradient(40% 38% at 50% 44%, rgba(245, 158, 11, 0.05), transparent 72%);
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
}

.wordmark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.wordmark::before {
  content: '❯ ';
  color: var(--accent);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 7px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.topnav a svg { display: block; }

/* GitHub = outlined secondary button */
.topnav a:last-child {
  border-color: rgba(255, 255, 255, 0.22);
}

.topnav a:last-child:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

/* Docs = primary CTA, top-right */
.topnav a:first-child {
  color: #1a1200;
  background: var(--accent);
}

.topnav a:first-child:hover {
  color: #1a1200;
  background: var(--accent-hover);
}

main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  place-items: center;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  width: 100%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 1.5rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero h1 {
  font-family: 'IBM Plex Mono', 'Space Mono', ui-monospace, monospace;
  font-size: clamp(1.85rem, 3.6vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
}

.subheadline {
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--muted);
  max-width: 46ch;
  text-wrap: pretty;
}

.ctas {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Stack to a single centred column on narrow viewports */
@media (max-width: 820px) {
  /* Top bar joins the normal flow so it never overlaps the hero */
  .topbar {
    position: static;
    padding: 1.1rem 1.25rem;
  }
  .wordmark { font-size: 1.2rem; }
  .topnav { gap: 0.5rem; }
  .topnav a { padding: 0.45rem 0.75rem; }
  /* GitHub collapses to icon-only to keep the bar on one line */
  .topnav a:last-child span { display: none; }
  .topnav a:last-child { padding: 0.45rem 0.6rem; }

  main {
    min-height: 0;
    align-items: start;
    padding: 2.5rem 1.25rem 4rem;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-copy {
    align-items: center;
    text-align: center;
    gap: 1.75rem;
  }
  .subheadline { max-width: 52ch; }
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #1a1200;
  box-shadow: 0 8px 24px -8px rgba(245, 158, 11, 0.5);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -8px rgba(245, 158, 11, 0.6);
}

.install-snippet {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(20, 22, 29, 0.7);
  padding: 0.6rem 0.7rem 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
}

.install-snippet code::before {
  content: '$ ';
  color: var(--accent);
}

.copy-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  border-radius: 5px;
  transition: color 0.15s ease, background 0.15s ease;
}

.copy-btn:hover {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

/* Terminal as the hero centrepiece — lifted off the background with a soft amber-tinted glow */
.terminal {
  margin-top: 0.5rem;
  box-shadow:
    0 24px 70px -20px rgba(0, 0, 0, 0.8),
    0 0 60px -30px rgba(245, 158, 11, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
