/* ── RESET & CUSTOM PROPERTIES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080c14;
  --surface:   rgba(255, 255, 255, 0.04);
  --surface2:  rgba(255, 255, 255, 0.02);
  --border:    rgba(255, 255, 255, 0.08);
  --border-sm: rgba(255, 255, 255, 0.06);
  --text:      #e6ecf5;
  --text-head: #f0f4fb;
  --muted:     rgba(232, 232, 227, 0.55);
  --muted2:    rgba(232, 232, 227, 0.4);
  --accent:    #c8ff5e;
  --accent-dim: rgba(200, 255, 94, 0.08);
  --accent-border: rgba(200, 255, 94, 0.25);
  --blue:      #9ec5ff;
  --yellow:    #ffd166;
  --radius:    8px;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 50% -5%, rgba(200, 255, 94, 0.10), transparent 60%),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(200, 255, 94, 0.04), transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}

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

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(16px);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
  letter-spacing: 0.2px;
  text-decoration: none;
}

.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-label-mobile { display: none; }

/* ── HERO ── */
.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 84px 40px 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 4px;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: rgba(200, 255, 94, 0.9);
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.badge-sep { flex-shrink: 0; opacity: 0.5; }

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -2.5px;
  line-height: 1.02;
  margin-bottom: 22px;
  color: var(--text-head);
  text-wrap: balance;
}

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

.hero p {
  font-size: 17.5px;
  color: rgba(232, 232, 227, 0.62);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.5;
  text-wrap: pretty;
}

.install-box {
  display: inline-flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  cursor: default;
  user-select: none;
}

.install-box .prompt { color: var(--accent); }
.install-box .install-cmd { white-space: nowrap; overflow-x: auto; flex: 1; }
.install-box .copy-btn { flex-shrink: 0; }

.install-box .copy-btn,
.terminal-titlebar .copy-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--muted2);
  cursor: pointer;
  padding: 3px 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  margin-left: 4px;
  transition: color 0.15s, border-color 0.15s;
}

.install-box .copy-btn:hover,
.terminal-titlebar .copy-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.install-box .copy-btn.copied,
.terminal-titlebar .copy-btn.copied { color: var(--accent); border-color: var(--accent-border); }

.hero-cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: opacity 0.15s, transform 0.1s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn-primary  { background: var(--accent); color: var(--bg); }
.btn-primary:hover { color: var(--bg); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { color: var(--text); }

/* ── TERMINAL DEMO ── */
.demo {
  max-width: 880px;
  margin: 0 auto 72px;
  padding: 8px 40px 40px;
}

.terminal {
  background: linear-gradient(180deg, #11172a, #0c1220);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  box-shadow:
    0 50px 120px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 80px rgba(200, 255, 94, 0.08);
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.terminal-dots { display: flex; gap: 6px; }
.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--muted2);
}

/* "live" blinking badge in terminal titlebar */
.terminal-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--accent-dim);
}

.terminal-live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.2s ease-in-out infinite;
}

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

.terminal-body { padding: 22px 26px; overflow-x: auto; }

.line { display: flex; gap: 10px; margin-bottom: 4px; }
.line .ps  { color: var(--accent); white-space: nowrap; }
.line .cmd { color: var(--text); }
.line .kw  { color: var(--text); }
.line .arg { color: var(--yellow); }
.line .out { color: var(--muted); margin-left: 2px; }
.line .url { color: var(--accent); border-bottom: 1px dotted rgba(200, 255, 94, 0.4); }
.line .ok  { color: var(--accent); }
.line .meth { color: var(--blue); }
.blank { height: 0.8rem; }

/* ── SECTIONS ── */
section {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

.section-title {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text-head);
}

.section-sub {
  color: var(--muted);
  margin-bottom: 40px;
  font-size: 14px;
}

/* ── HOW IT WORKS ── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-head);
}

.step p { font-size: 13.5px; color: var(--muted); }

/* ── INSTALL ── */
.install-methods {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.method {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.method-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  font-weight: 600;
}

.code-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}

.code-block .$ { color: var(--accent); }

.method-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}

/* ── USAGE ── */
.usage-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.usage-subsection { margin-bottom: 40px; }
.usage-subsection:last-child { margin-bottom: 0; }

.usage-subsection-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border-sm);
  padding: 32px 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ── LANG SWITCHER ── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 16px;
  border-left: 1px solid var(--border-sm);
  margin-left: 8px;
}

.lang-flag {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.15s;
  text-decoration: none;
  position: relative;
}

.lang-flag svg { border-radius: 3px; display: block; }

.lang-flag:hover { opacity: 1; }

.lang-flag.lang-active { opacity: 1; }

.lang-flag.lang-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav { padding: 14px 14px; }
  .hero { padding: 60px 20px 32px; }
  .demo { padding: 8px 20px 40px; }
  section { padding: 0 20px 60px; }
  footer { padding: 24px 20px; }
  /* hide text-only nav links on mobile */
  .nav-links li:nth-child(1),
  .nav-links li:nth-child(2) { display: none; }
  /* keep GitHub icon links — show short mobile label */
  .nav-links li:nth-child(3) a,
  .nav-links li:nth-child(4) a { gap: 4px; }
  .nav-links li:nth-child(3) a svg,
  .nav-links li:nth-child(4) a svg { width: 18px; height: 18px; }
  .nav-label-desktop { display: none; }
  .nav-label-mobile { display: inline; font-size: 11px; }
  /* tighten nav items gap */
  .nav-links { gap: 12px; }
  .install-box { max-width: 100%; overflow-x: auto; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); letter-spacing: -1px; }
  body { background-attachment: scroll; }
  /* drop "written in Go" + its preceding separator on narrow screens */
  .badge-hide-mobile { display: none; }
}

/* ── PROSE (long-form pages: terms, privacy) ── */
.prose {
  max-width: 740px;
  margin: 0 auto;
  padding: 60px 40px 80px;
}

.prose article h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 28px;
  color: var(--text-head);
}

.prose article h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-top: 40px;
  margin-bottom: 14px;
  color: var(--text-head);
}

.prose article p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 14px;
  max-width: 66ch;
}

.prose article ul {
  margin: 0 0 14px 1.4em;
  padding: 0;
}

.prose article ul li {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 6px;
}

.prose article code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--accent);
}

.prose article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

.prose-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
}

.prose-meta a { color: var(--muted); }
.prose-meta a:hover { color: var(--accent); }

/* LT flag shown as inactive (no /lt/terms yet) */
.lang-flag.lang-inactive {
  opacity: 0.25;
  cursor: default;
}

.lang-flag.lang-inactive:hover { opacity: 0.25; }

@media (max-width: 640px) {
  .prose { padding: 40px 20px 60px; }
}
