:root {
  --bg:        #0d1117;
  --bg-alt:    #11161f;
  --panel:     #161b24;
  --panel-2:   #1b212c;
  --border:    #262d3a;
  --text:      #d7dde6;
  --muted:     #8b95a5;
  --green:     #3dd68c;
  --green-2:   #2bb673;
  --yellow:    #f5c542;
  --yellow-2:  #e0ac1f;
  --blue:      #5aa9ff;
  --red:       #ff6b6b;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 14px;
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--yellow); }

code { font-family: var(--mono); font-size: 0.92em; }

h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.15; margin: 0 0 .6rem; letter-spacing: -.02em; }
h3 { margin: 0 0 .5rem; font-size: 1.15rem; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(13,17,23,.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__brand img { height: 30px; display: block; }
.nav__links { display: flex; align-items: center; gap: clamp(.7rem, 2vw, 1.6rem); }
.nav__links a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav__links a:hover { color: var(--text); }
.nav__gh {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .8rem; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text) !important;
}
.nav__gh:hover { border-color: var(--green); }
.nav__links a.active { color: var(--green); }

/* hamburger button — hidden on desktop */
.nav__toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 38px; padding: 0 9px;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; z-index: 60;
}
.nav__toggle span {
  display: block; height: 2px; width: 100%; border-radius: 2px;
  background: var(--text); transition: transform .25s ease, opacity .2s ease;
}
body.nav-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav__toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* slide-in drawer + backdrop */
.nav__drawer {
  position: fixed; top: 0; right: 0; z-index: 90;
  display: flex; flex-direction: column; gap: .3rem;
  width: min(260px, 78vw); height: 100%;
  padding: 5rem 1.2rem 1.2rem;
  background: var(--panel); border-left: 1px solid var(--border);
  box-shadow: -20px 0 60px -30px rgba(0,0,0,.9);
  transform: translateX(100%); transition: transform .28s ease;
}
body.nav-open .nav__drawer { transform: translateX(0); }
.nav__drawer a {
  color: var(--text); font-weight: 500; font-size: 1.05rem;
  padding: .7rem .6rem; border-radius: 8px;
}
.nav__drawer a:hover { background: var(--panel-2); color: var(--green); }
.nav__drawer a.active { color: var(--green); background: rgba(61,214,140,.08); }

.nav__backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(5,7,10,.6);
  opacity: 0; pointer-events: none; transition: opacity .28s ease;
}
body.nav-open .nav__backdrop { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 2rem) 0;
  overflow: hidden;
}
.hero__glow {
  position: absolute; inset: -30% 0 auto 0; height: 600px;
  background:
    radial-gradient(60% 60% at 30% 0%, rgba(61,214,140,.18), transparent 70%),
    radial-gradient(50% 50% at 75% 10%, rgba(245,197,66,.14), transparent 70%);
  filter: blur(10px);
  pointer-events: none; z-index: 0;
}
.hero__inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }
.hero__logo { width: min(420px, 80%); margin-bottom: 1.2rem; }
.hero__tagline {
  font-size: clamp(1.2rem, 2.8vw, 1.7rem);
  font-weight: 700; color: var(--text); margin: 0 0 1rem; letter-spacing: -.01em;
}
.hero__sub { color: var(--muted); font-size: 1.05rem; margin: 0 auto 1.6rem; max-width: 660px; }
.hero__sub code { color: var(--green); }

.badges { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: 1.6rem; }
.badges img { height: 20px; }

.hero__cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.4rem; }

.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .75rem 1.4rem; border-radius: 10px;
  font-weight: 600; font-size: .98rem; transition: .18s ease;
  border: 1px solid transparent;
}
.btn--primary { background: var(--green); color: #06231a !important; }
.btn--primary:hover { background: var(--yellow); color: #2a2102 !important; transform: translateY(-2px); }
.btn--ghost { border-color: var(--border); color: var(--text) !important; }
.btn--ghost:hover { border-color: var(--green); transform: translateY(-2px); }

.hero__install-hint {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: .55rem .55rem .55rem .9rem;
  font-family: var(--mono); font-size: .95rem;
}
.hero__install-hint code { color: var(--text); }
.prompt { color: var(--green); margin-right: .5rem; user-select: none; }

.hero__shot {
  position: relative; z-index: 1;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0; max-width: var(--maxw);
  padding: 0 clamp(1rem, 4vw, 2rem);
}
.hero__shot img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02);
}

/* ---------- SECTIONS ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 5vw, 2rem); max-width: var(--maxw); margin: 0 auto; }
.section--alt { background: var(--bg-alt); max-width: none; }
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section__head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .16em;
  font-size: .76rem; font-weight: 700; color: var(--green); margin-bottom: .8rem;
}

/* ---------- FEATURE CARDS ---------- */
.cards {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.card {
  position: relative;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.3rem;
  transition: .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--green); background: var(--panel-2); }
.card__key {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.1rem; height: 2.1rem; padding: 0 .55rem;
  font-family: var(--mono); font-weight: 700; font-size: .9rem;
  color: var(--green); background: rgba(61,214,140,.1);
  border: 1px solid rgba(61,214,140,.3); border-radius: 8px;
  margin-bottom: .9rem;
}
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.card code { color: var(--yellow); }

/* ---------- GALLERY ---------- */
.gallery {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}
.shot { margin: 0; }
.shot img {
  width: 100%; border-radius: 12px; border: 1px solid var(--border);
  box-shadow: 0 16px 40px -20px rgba(0,0,0,.7);
  cursor: zoom-in; transition: .2s ease; display: block;
}
.shot img:hover { transform: translateY(-3px); border-color: var(--green); }
.shot figcaption { color: var(--muted); font-size: .9rem; margin-top: .7rem; text-align: center; }
.shot--bare img { cursor: default; }
.shot--bare img:hover { transform: none; }

/* ---------- INSTALL ---------- */
.install-grid {
  display: grid; gap: 1rem; margin-bottom: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.install-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
}
.tag {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--yellow);
}
.install-note { color: var(--muted); margin: .3rem 0 0; font-size: .95rem; }

.code-block {
  position: relative;
  background: #0a0e14; border: 1px solid var(--border);
  border-radius: 10px; padding: .9rem 1rem; margin-top: .8rem;
  font-family: var(--mono); font-size: .9rem; overflow-x: auto;
}
.code-block code, .code-block pre { color: var(--text); white-space: pre; margin: 0; }
.code-block--wide { font-size: .92rem; }
.comment { color: var(--muted); }

.copy-btn {
  position: absolute; top: .5rem; right: .5rem;
  background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px;
  font-family: var(--mono); font-size: .72rem; padding: .25rem .55rem;
  cursor: pointer; transition: .15s ease;
}
.copy-btn:hover { color: var(--green); border-color: var(--green); }
.copy-btn.copied { color: #06231a; background: var(--green); border-color: var(--green); }

.shell-integration {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem;
}
.shell-integration p { color: var(--muted); }
.muted { color: var(--muted); font-weight: 400; }

/* ---------- CLI ---------- */
.cli-wrap {
  display: grid; gap: 1.6rem; align-items: center;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 820px) { .cli-wrap { grid-template-columns: 1fr; } }

/* ---------- KEYMAP ---------- */
.keymap {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.keymap__col {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
}
.keymap__col h4 {
  margin: 0 0 1rem; color: var(--yellow); font-size: .95rem;
  text-transform: uppercase; letter-spacing: .08em;
}
.keymap__col ul { list-style: none; margin: 0; padding: 0; }
.keymap__col li {
  display: flex; align-items: center; gap: .7rem;
  padding: .42rem 0; border-bottom: 1px dashed var(--border);
  font-size: .94rem;
}
.keymap__col li:last-child { border-bottom: none; }
.keymap__col li span { color: var(--muted); }
kbd {
  font-family: var(--mono); font-size: .8rem;
  background: var(--panel-2); border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 6px;
  padding: .12rem .45rem; color: var(--green); white-space: nowrap;
}

/* ---------- CHIPS ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; }
.chip {
  font-family: var(--mono); font-size: .85rem;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; padding: .35rem .85rem; color: var(--text);
  transition: .15s ease;
}
.chip:hover { border-color: var(--green); color: var(--green); }
.chip--req { border-color: var(--yellow); color: var(--yellow); }

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  padding: clamp(3.5rem, 8vw, 6rem) 1rem;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(61,214,140,.12), transparent 70%),
    var(--bg-alt);
  border-top: 1px solid var(--border);
}
.cta__inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.cta h2 { margin: 0; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center; padding: 2.5rem 1rem; color: var(--muted);
  border-top: 1px solid var(--border); font-size: .92rem;
}
.footer img { height: 28px; margin-bottom: .8rem; opacity: .85; }
.footer code { color: var(--green); }
.footer__links { margin-top: .6rem; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--green); }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(5,7,10,.92); padding: 2rem; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 95vw; max-height: 90vh; border-radius: 10px;
  border: 1px solid var(--border); box-shadow: 0 30px 80px -20px rgba(0,0,0,.9);
}
.lightbox__close {
  position: absolute; top: 1rem; right: 1.5rem;
  background: none; border: none; color: #fff; font-size: 2.4rem;
  cursor: pointer; line-height: 1;
}

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .nav__drawer, .nav__backdrop, .nav__toggle span { transition: none; }
}
