/* ============================================================
   GNext — gnext.dev · Next-Generation Development Layer
   Cyber-minimalist · dark · precise
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #07090F;
  --surface: #0E1119;
  --elevated: #141925;
  --elevated-2: #1A2030;
  --border: #1B2030;
  --border-2: #283044;
  --ink: #EDEFF5;
  --slate: #8A93A6;
  --muted: #5A6376;
  --blue: #4D7CFF;
  --violet: #9A5CFF;
  --acc: #6E8BFF;
  --grad: linear-gradient(110deg, #4D7CFF, #9A5CFF);
  --grad-soft: linear-gradient(110deg, rgba(77,124,255,.16), rgba(154,92,255,.16));
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1140px;
  --fd: 'Space Grotesk', system-ui, sans-serif;
  --fb: 'Inter', system-ui, -apple-system, sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, monospace;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--fb); background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 15.5px; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--acc); text-decoration: none; }
a:hover { color: var(--ink); }
ul { list-style: none; }
code, kbd, pre { font-family: var(--fm); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 300; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* kbd */
kbd { font-family: var(--fm); font-size: 11px; background: var(--elevated); border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; color: var(--slate); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fd); font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; transition: transform .14s, box-shadow .14s, border-color .14s, background .14s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); color: inherit; }
.btn-grad { background: var(--grad); color: #fff; }
.btn-grad:hover { box-shadow: 0 12px 34px rgba(110,90,255,.34); }
.btn-ghost { background: rgba(255,255,255,0.02); color: var(--ink); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--acc); }
.btn-sm { padding: 8px 15px; font-size: 13px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(7,9,15,0.82); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--fd); font-weight: 700; font-size: 19px; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand .dev { color: var(--muted); font-weight: 500; }
.nav { display: none; }
.nav ul { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--slate); font-size: 14px; font-weight: 500; padding: 8px 13px; border-radius: 7px; }
.nav a:hover { color: var(--ink); background: var(--elevated); }
.header-cta { display: flex; align-items: center; gap: 10px; }
.cmdk-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 8px; padding: 7px 10px 7px 13px; color: var(--muted); font-size: 13px; cursor: pointer; transition: border-color .14s; }
.cmdk-btn:hover { border-color: var(--acc); color: var(--slate); }
.cmdk-btn kbd { pointer-events: none; }
@media (max-width: 600px) { .cmdk-btn .lbl { display: none; } }
.nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
@media (min-width: 920px) { .nav { display: block; } .nav-toggle { display: none; } }
.mobile-nav { display: none; border-top: 1px solid var(--border); }
.mobile-nav.open { display: block; }
.mobile-nav ul { flex-direction: column; padding: 8px 0; }
.mobile-nav a { display: block; padding: 12px 22px; color: var(--slate); font-weight: 500; }
@media (min-width: 920px) { .mobile-nav { display: none !important; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: 90px 70px; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; opacity: .25; mask-image: radial-gradient(ellipse 60% 55% at 50% 28%, #000, transparent 72%); pointer-events: none; }
.hero::after { content: ""; position: absolute; top: -160px; left: 50%; transform: translateX(-50%); width: 720px; height: 440px; background: radial-gradient(ellipse, rgba(110,90,255,.16), transparent 64%); pointer-events: none; }
.hero-inner { position: relative; max-width: 820px; }
.tagline { display: inline-flex; align-items: center; gap: 9px; font-family: var(--fm); font-size: 12.5px; color: var(--slate); background: var(--surface); border: 1px solid var(--border-2); border-radius: 999px; padding: 6px 15px; margin-bottom: 28px; }
.tagline .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.hero h1 { font-family: var(--fd); font-size: clamp(40px, 8vw, 78px); font-weight: 700; line-height: 1.0; letter-spacing: -0.035em; margin-bottom: 22px; }
.hero p.sub { font-size: clamp(16px, 2.3vw, 20px); color: var(--slate); max-width: 56ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-hint { margin-top: 18px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* Terminal */
.terminal { margin-top: 52px; max-width: 680px; background: #05070C; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 90px rgba(0,0,0,.5); position: relative; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.term-bar .d { width: 11px; height: 11px; border-radius: 50%; background: var(--elevated-2); }
.term-bar .t { margin-left: 8px; font-family: var(--fm); font-size: 12px; color: var(--muted); }
.terminal pre { margin: 0; padding: 20px; font-family: var(--fm); font-size: 13px; line-height: 1.95; color: #C9D2E3; min-height: 168px; overflow-x: auto; }
.term-pmt { color: var(--acc); } .term-cmd { color: var(--ink); } .term-ok { color: #4ADE80; } .term-dim { color: var(--muted); } .term-acc { color: var(--violet); }
.term-cursor { display: inline-block; width: 8px; height: 15px; background: var(--acc); vertical-align: text-bottom; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 0%,50%{opacity:1} 50.01%,100%{opacity:0} }
@media (prefers-reduced-motion: reduce){ .term-cursor{ animation: none; } }

/* Section */
.section { padding-block: 80px; }
.section.bordered { border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 50px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-block; font-family: var(--fm); font-size: 12.5px; color: var(--acc); margin-bottom: 14px; letter-spacing: .02em; }
.section-title { font-family: var(--fd); font-size: clamp(28px, 4.5vw, 44px); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
.section-head p { margin-top: 14px; color: var(--slate); font-size: 16.5px; }

/* Products trio */
.products { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 820px) { .products { grid-template-columns: repeat(3, 1fr); } }
.product { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; overflow: hidden; transition: transform .2s, border-color .2s; }
.product::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .25s; pointer-events: none; }
.product:hover { transform: translateY(-5px); border-color: var(--border-2); }
.product:hover::before { opacity: 1; }
.product > * { position: relative; }
.product-ic { width: 46px; height: 46px; border-radius: 11px; background: var(--elevated); border: 1px solid var(--border-2); display: grid; place-items: center; margin-bottom: 18px; }
.product-ic svg { width: 23px; height: 23px; }
.product .tag { font-family: var(--fm); font-size: 11px; color: var(--muted); }
.product h3 { font-family: var(--fd); font-size: 21px; font-weight: 600; margin: 4px 0 9px; }
.product p { font-size: 14.5px; color: var(--slate); line-height: 1.6; }
.product .pmore { display: inline-block; margin-top: 16px; font-family: var(--fm); font-size: 12.5px; color: var(--acc); }

/* Flow steps */
.flow { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .flow { grid-template-columns: repeat(4, 1fr); } }
.flow-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; position: relative; }
.flow-step .n { font-family: var(--fm); font-size: 12px; color: var(--acc); margin-bottom: 14px; }
.flow-step h4 { font-family: var(--fd); font-size: 17px; font-weight: 600; margin-bottom: 7px; }
.flow-step p { font-size: 13.5px; color: var(--slate); line-height: 1.55; }

/* Code showcase */
.code-split { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: center; }
@media (min-width: 920px) { .code-split { grid-template-columns: 1fr 1.05fr; } }
.code-copy h2 { font-family: var(--fd); font-size: clamp(24px,3.6vw,34px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.code-copy p { color: var(--slate); font-size: 15.5px; margin-bottom: 20px; }
.code-feats { display: flex; flex-direction: column; gap: 12px; }
.code-feat { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--slate); }
.code-feat .ck { color: var(--acc); font-family: var(--fm); flex-shrink: 0; }
.codeblock { background: #05070C; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.codeblock .cb-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-family: var(--fm); font-size: 12px; color: var(--muted); }
.codeblock .cb-bar .lang { margin-left: auto; }
.codeblock pre { margin: 0; padding: 18px; overflow-x: auto; font-size: 13px; line-height: 1.85; color: #C9D2E3; }
.c-c{color:#5A6376}.c-k{color:#9A5CFF}.c-s{color:#7FB4FF}.c-f{color:#6E8BFF}.c-o{color:#4ADE80}

/* Principles */
.principles { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 640px) { .principles { grid-template-columns: 1fr 1fr; } }
.principle { background: var(--bg); padding: 26px 24px; }
.principle .pn { font-family: var(--fm); font-size: 12px; color: var(--muted); }
.principle h4 { font-family: var(--fd); font-size: 17px; font-weight: 600; margin: 8px 0 6px; }
.principle p { font-size: 14px; color: var(--slate); line-height: 1.6; }

/* CTA */
.cta { position: relative; overflow: hidden; border: 1px solid var(--border-2); border-radius: 22px; padding: 70px 30px; text-align: center; background: var(--surface); }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(110,90,255,.22), transparent 62%); pointer-events: none; }
.cta h2 { position: relative; font-family: var(--fd); font-size: clamp(28px,5vw,46px); font-weight: 700; letter-spacing: -0.025em; margin-bottom: 14px; }
.cta p { position: relative; color: var(--slate); font-size: 17px; max-width: 48ch; margin: 0 auto 28px; }
.cta .hero-actions { position: relative; justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding-block: 50px 30px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 30px; border-bottom: 1px solid var(--border); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 13.5px; color: var(--slate); max-width: 34ch; }
.footer-col h4 { font-family: var(--fm); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 13px; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--slate); font-size: 13.5px; }
.footer-col a:hover { color: var(--acc); }
.footer-bottom { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-family: var(--fm); font-size: 12px; color: var(--muted); }

/* ============ COMMAND PALETTE ============ */
.cmdk-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(5,7,12,.7); backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.cmdk-overlay.open { display: flex; }
.cmdk { width: 100%; max-width: 600px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: 0 40px 100px rgba(0,0,0,.6); overflow: hidden; animation: cmdk-in .16s ease; }
@keyframes cmdk-in { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce){ .cmdk{ animation: none; } }
.cmdk-input-row { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.cmdk-input-row .ic { color: var(--muted); font-family: var(--fm); }
.cmdk-input-row input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--ink); font-family: var(--fb); font-size: 16px; }
.cmdk-input-row input::placeholder { color: var(--muted); }
.cmdk-results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.cmdk-group-label { font-family: var(--fm); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px 6px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; cursor: pointer; }
.cmdk-item .ci-ic { width: 26px; height: 26px; border-radius: 6px; background: var(--elevated); border: 1px solid var(--border); display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.cmdk-item .ci-title { font-size: 14.5px; color: var(--ink); }
.cmdk-item .ci-sub { font-size: 12px; color: var(--muted); margin-left: auto; font-family: var(--fm); }
.cmdk-item.active { background: var(--grad-soft); }
.cmdk-item.active .ci-ic { border-color: var(--acc); }
.cmdk-empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 6px; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============ ABOUT / MANIFESTO ============ */
.manifesto { position: relative; overflow: hidden; padding-block: 86px 50px; }
.manifesto::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; opacity: .2; mask-image: radial-gradient(ellipse 60% 50% at 50% 25%, #000, transparent 72%); pointer-events: none; }
.manifesto-inner { position: relative; max-width: 840px; }
.manifesto .eyebrow { margin-bottom: 22px; }
.manifesto h1 { font-family: var(--fd); font-size: clamp(32px, 6vw, 60px); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 24px; }
.manifesto .thesis { font-size: clamp(18px, 2.6vw, 23px); color: var(--slate); max-width: 60ch; line-height: 1.6; }
.manifesto .thesis b { color: var(--ink); }

.arg-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--border); }
.arg { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 28px 0; border-bottom: 1px solid var(--border); }
@media (min-width: 760px) { .arg { grid-template-columns: 200px 1fr; gap: 30px; } }
.arg .arg-k { font-family: var(--fm); font-size: 13px; color: var(--acc); }
.arg h3 { font-family: var(--fd); font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.arg p { font-size: 15.5px; color: var(--slate); line-height: 1.65; }
.arg p strong { color: var(--ink); }

.pullquote { font-family: var(--fd); font-size: clamp(22px, 3.6vw, 32px); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; color: var(--ink); max-width: 24ch; margin: 6px 0; }

.how-map { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 26px; }
@media (min-width: 760px) { .how-map { grid-template-columns: repeat(3, 1fr); } }
.how-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.how-card .hc-k { font-family: var(--fm); font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.how-card h4 { font-family: var(--fd); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.how-card p { font-size: 13.5px; color: var(--slate); line-height: 1.6; }
.prose-narrow { max-width: 720px; }
.prose-narrow p { font-size: 16.5px; color: var(--slate); line-height: 1.75; margin-bottom: 16px; }
.prose-narrow p strong { color: var(--ink); }
