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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --muted: #8b949e;
  --text: #e6edf3;
  --accent: #58a6ff;
  --accent2: #3fb950;
  --danger: #f85149;
  --mono: "JetBrains Mono", monospace;
  --sans: "DM Sans", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(88, 166, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 166, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--sans);
  font-size: 21px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: skewX(-7deg);
  transform-origin: left center;
}

.brand-bolt {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #d8efff;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-shadow:
    0 0 12px rgba(88, 166, 255, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-o {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 0.82em;
  height: 0.82em;
  margin: 0 0.02em;
  border: 0.16em solid currentColor;
  border-radius: 50%;
  transform: translateY(0.02em) skewX(7deg);
}

.brand-zap {
  position: absolute;
  color: #19c7ff;
  font-size: 0.95em;
  line-height: 1;
  transform: translateY(-0.02em) skewX(-11deg);
  filter:
    drop-shadow(0 0 2px #e5fbff)
    drop-shadow(0 0 8px rgba(25, 199, 255, 0.9));
}

.brand-cowork {
  color: #f7fbff;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  transform: skewX(7deg);
}

.nav-brand:hover {
  opacity: 1;
}

.nav-brand:hover .brand-zap {
  filter:
    drop-shadow(0 0 3px #ffffff)
    drop-shadow(0 0 11px rgba(25, 199, 255, 1));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    opacity 0.15s,
    transform 0.1s;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.85;
}
.btn:active {
  transform: scale(0.97);
}

.btn-ghost {
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  opacity: 1;
}

.btn-outline {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--muted);
  opacity: 1;
}

.btn-primary {
  color: #0d1117;
  background: var(--accent);
  border: 1px solid var(--accent);
  font-weight: 600;
}

/* ── HERO ── */
.hero {
  position: relative;
  z-index: 1;
  padding: 140px 2rem 80px;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2rem;
  background: var(--surface);
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

h1 {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

h1 .accent {
  color: var(--accent);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 10px 22px;
  font-size: 14px;
}

/* ── TERMINAL DEMO ── */
.terminal-wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 4rem auto 0;
  padding: 0 2rem;
}

.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

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

.terminal-title {
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
}

.terminal-body {
  padding: 16px 20px;
  line-height: 1.9;
}

.t-prompt {
  color: var(--accent2);
}
.t-cmd {
  color: var(--text);
}
.t-flag {
  color: var(--accent);
}
.t-string {
  color: #a5d6ff;
}
.t-dim {
  color: var(--muted);
}
.t-ok {
  color: var(--accent2);
}
.t-warn {
  color: #d29922;
}
.t-step {
  color: #bc8cff;
}

/* ── FEATURES ── */
.features {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 5rem auto 0;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--border);
}

.feature {
  background: var(--bg);
  padding: 1.75rem;
  transition: background 0.15s;
}

.feature:hover {
  background: var(--surface);
}

.feature-icon {
  font-size: 20px;
  margin-bottom: 0.75rem;
}

.feature h3 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.feature p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  margin-top: 6rem;
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
}

.footer-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-separator {
  color: var(--border);
}

.go-logo {
  display: inline-block;
  height: 2em;
  width: auto;
}

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

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

@media (max-width: 640px) {
  nav {
    padding: 0 1rem;
  }

  .nav-brand {
    gap: 6px;
    font-size: 17px;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-links .btn-ghost:first-child {
    display: none;
  }

  .btn {
    padding: 5px 9px;
  }
}

/* github icon */
.gh-icon {
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  height: 16px;
  margin-right: 4px;
}
