:root {
  --navy: #040912;
  --navy2: #0a1230;
  --ink: #0f172a;
  --mut: #5b6478;
  --mut2: #8a93a8;
  --line: #e6eaf2;
  --bg: #ffffff;
  --bg2: #f7f9fd;
  --ac: #3b6ef5;
  --ac2: #5b8cff;
  --grad: linear-gradient(92deg, #3b6ef5 0%, #6a5cf0 100%);
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #b91c1c;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow: 0 24px 50px -24px rgba(15, 23, 42, 0.18);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; gap: 14px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo img { width: 38px; height: 38px; border-radius: 10px; }
.logo b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.logo small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mut2); margin-top: -1px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: var(--mut); text-decoration: none; font-size: 13.5px; font-weight: 600;
  padding: 8px 13px; border-radius: 9px; transition: .18s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; font-size: 14px; font-weight: 700;
  text-decoration: none; border: none; transition: .2s;
}
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -8px rgba(59,110,245,.55); }
.btn.primary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn.navy { background: var(--navy); color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: var(--bg2); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.menu-btn { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; }

.hero { padding: 72px 0 18px; position: relative; overflow: hidden; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(800px 500px at 50% -10%, rgba(59,110,245,.09), transparent 60%),
    radial-gradient(600px 400px at 90% 20%, rgba(106,92,240,.07), transparent 60%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ac); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--grad); border-radius: 2px; }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px); line-height: 1.08; letter-spacing: -.035em;
  font-weight: 900; color: var(--navy);
}
.hero h1 .grad {
  background: linear-gradient(92deg, #3b6ef5, #6a5cf0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { color: var(--mut); font-size: clamp(15px, 2vw, 18px); max-width: 640px; margin: 16px auto 0; }
.hero .sub b { color: var(--ink); }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 42px 0 8px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px;
  box-shadow: 0 8px 25px #0f172a0b;
}
.stat .k { font-size: 10.5px; color: var(--mut2); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stat .n { font-size: 26px; font-weight: 900; margin-top: 4px; letter-spacing: -.03em; color: var(--navy); }

.toolbar {
  position: sticky; top: 66px; z-index: 40;
  background: rgba(247,249,253,.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin: 28px 0 22px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search {
  flex: 1 1 220px; min-width: 180px;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px 12px; outline: none;
}
.search:focus { border-color: #c5d4ff; box-shadow: 0 0 0 3px rgba(59,110,245,.15); }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--mut);
  border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 700;
}
.chip.on, .chip:hover { border-color: #c5d4ff; color: var(--ac); background: #eef3ff; }
.chip-count { color: var(--mut2); font-weight: 800; margin-left: 4px; }
.cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cats .chip { font-size: 12px; padding: 6px 10px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  cursor: pointer; transition: .22s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d5dcec; }
.thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .thumb img { transform: scale(1.04); }
.thumb .ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0f1f38, #214878); color: #dbe6f5; font-weight: 800;
}
.badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; backdrop-filter: blur(8px);
}
.badge.deployed { background: #dcfce7; color: #166534; }
.badge.offline { background: #fee2e2; color: #991b1b; }
.badge.local { background: #e0e7ff; color: #3730a3; }
.badge.international { background: #fef3c7; color: #92400e; }
.badge.featured { background: #0f1f38; color: #fff; }
.badge.sample { background: rgba(15,31,56,.78); color: #fff; }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cat { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ac); }
.card h3 { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.card p { color: var(--mut); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; gap: 8px; color: var(--mut2); font-size: 12px; font-weight: 600; }

.empty {
  text-align: center; padding: 70px 20px; color: var(--mut);
  border: 1px dashed var(--line); border-radius: 20px; background: var(--bg2);
}
.empty b { display: block; color: var(--navy); font-size: 18px; margin-bottom: 6px; }

.overlay {
  position: fixed; inset: 0; background: rgba(4,9,18,.55);
  z-index: 80; display: none; padding: 24px; overflow: auto;
}
.overlay.open { display: block; }
.sheet {
  width: min(980px, 100%); margin: 24px auto; background: #fff;
  border-radius: 22px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(15,23,42,.35);
}
.sheet-hero { position: relative; aspect-ratio: 16 / 7; background: #0f1f38; }
.sheet-hero img { width: 100%; height: 100%; object-fit: cover; }
.sheet-close {
  position: absolute; top: 14px; right: 14px; border: 0; background: #fff;
  width: 36px; height: 36px; border-radius: 10px; font-size: 20px; font-weight: 700;
}
.sheet-body { padding: 28px 28px 32px; }
.sheet-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.sheet-top h2 { font-size: 28px; font-weight: 900; letter-spacing: -.03em; color: var(--navy); }
.sheet-desc { color: var(--mut); margin-top: 14px; white-space: pre-wrap; font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0; }
.fact { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.fact .k { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mut2); }
.fact .v { font-size: 14px; font-weight: 800; margin-top: 4px; color: var(--navy); }
.res-block { margin-top: 22px; }
.res-block .cat { margin-bottom: 10px; }
.res-list { display: flex; flex-wrap: wrap; gap: 8px; }
.res-list a {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-radius: 11px; padding: 9px 12px; font-size: 13px; font-weight: 700;
  text-decoration: none; max-width: 100%;
}
.res-list a:hover { border-color: #c5d4ff; background: #eef3ff; color: var(--ac); }
.res-list .kind {
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mut2);
}
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.stack span {
  background: #eef3ff; color: #214878; border-radius: 999px;
  padding: 5px 10px; font-size: 12px; font-weight: 700;
}
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.gallery img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }

.cta-band {
  margin: 72px 0 20px; background: var(--navy); color: #e6eaf6;
  border-radius: 28px; padding: 48px 40px; text-align: center; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 400px at 85% 0%, rgba(59,110,245,.22), transparent 60%);
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 900; color: #fff; letter-spacing: -.03em; }
.cta-band p { color: #9fa9c2; margin-top: 10px; }
.cta-band .hero-cta { position: relative; }

footer { border-top: 1px solid var(--line); margin-top: 70px; padding: 28px 0 40px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.cr { color: var(--mut2); font-size: 12.5px; }
.foot-links { display: flex; gap: 16px; }
.foot-links a { color: var(--mut2); text-decoration: none; font-size: 13px; font-weight: 600; }
.foot-links a:hover { color: var(--ink); }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 16px; right: 16px; top: 64px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px;
    flex-direction: column; align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .stats { grid-template-columns: 1fr 1fr; }
  .grid, .gallery { grid-template-columns: 1fr; }
  .hero { padding-top: 46px; }
  .sheet-body { padding: 20px; }
  .cta-band { padding: 34px 20px; }
}
