:root {
  --bg: #12161f;
  --bg-2: #171c27;
  --card: #1a2030;
  --line: #262d3d;
  --text: #f4f6f8;
  --muted: #9aa3b2;
  --teal: #2ec5b6;
  --teal-dim: #1f8b80;
  --amber: #f2b84b;
  --violet: #9b8cff;
  --radius: 18px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max); margin: 0 auto; padding: 14px 20px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: .02em; }
.brand img { border-radius: 9px; }
.brand b { font-weight: 300; letter-spacing: .25em; text-transform: uppercase; font-size: .85em; margin-left: 2px; }
.links { display: flex; align-items: center; gap: 28px; }
.links a { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
.links a:hover { color: var(--text); }
.links .pill { color: var(--bg); background: var(--teal); padding: 8px 18px; border-radius: 999px; font-weight: 500; }
.links .pill:hover { color: var(--bg); background: #45d6c8; }
.menu-btn { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform .25s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Hero */
.hero { max-width: var(--max); margin: 0 auto; padding: 12px 20px 40px; }
.banner { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(46,197,182,.25); }
.hero-copy { text-align: center; max-width: 720px; margin: 56px auto 0; }
.eyebrow { color: var(--teal); text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; font-weight: 500; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.12; font-weight: 800; margin: 0 0 18px; letter-spacing: -.02em; }
h1 span { color: var(--teal); }
.lede { color: var(--muted); font-size: 1.08rem; margin: 0 auto 30px; max-width: 560px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; text-decoration: none; padding: 13px 24px; border-radius: 999px; font-weight: 500; font-size: .98rem; transition: transform .15s, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--teal); color: var(--bg); }
.btn.primary:hover { background: #45d6c8; }
.btn.ghost { border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--teal); }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: 80px 20px; }
.section-head { text-align: center; margin-bottom: 44px; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 600; margin: 0; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 10px 0 0; }

/* Project cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); border-color: #34405a; }
.card.featured { grid-column: 1 / -1; flex-direction: row; }
.card.featured .card-art { flex: 0 0 42%; min-height: 240px; }
.card.featured .card-body { padding: 36px; justify-content: center; }
.card.featured h3 { font-size: 1.8rem; }
.card-art { height: 160px; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, rgba(46,197,182,.18), transparent 60%), var(--bg-2); border-bottom: 1px solid var(--line); }
.card.featured .card-art { border-bottom: 0; border-right: 1px solid var(--line); }
.card-art svg { width: 60%; max-width: 200px; fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.card-art .dot { fill: var(--teal); stroke: none; }
.art-chess { background: radial-gradient(circle at 70% 20%, rgba(242,184,75,.16), transparent 60%), var(--bg-2); }
.art-chess .dot { fill: var(--amber); }
.art-hive { background: radial-gradient(circle at 50% 80%, rgba(155,140,255,.16), transparent 60%), var(--bg-2); }
.art-hive .dot { fill: var(--violet); }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 6px 0 2px; font-size: 1.3rem; font-weight: 600; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.card-links { margin-top: auto; padding-top: 14px; font-size: .9rem; }
.card-links a { color: var(--teal); text-decoration: none; font-weight: 500; }
.card-links a:hover { text-decoration: underline; }
.muted { color: #6f7889; }
.tag { align-self: flex-start; font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.tag-dev { background: rgba(46,197,182,.12); color: var(--teal); }
.tag-test { background: rgba(242,184,75,.12); color: var(--amber); }
.tag-tool { background: rgba(155,140,255,.14); color: var(--violet); }

/* Fair play */
.fair { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: none; background: linear-gradient(180deg, transparent, rgba(46,197,182,.04), transparent); }
.promises { list-style: none; padding: 0; margin: 0 auto; max-width: var(--max); display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.promises .num { color: var(--teal); font-weight: 300; font-size: .9rem; letter-spacing: .15em; }
.promises h3 { margin: 6px 0 8px; font-size: 1.25rem; font-weight: 600; }
.promises p { color: var(--muted); margin: 0; }

/* Community */
.socials { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 18px; justify-content: center; }
.social { display: flex; align-items: center; gap: 16px; padding: 22px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s, transform .2s; }
.social:hover { border-color: var(--teal); transform: translateY(-3px); }
.social svg { width: 34px; height: 34px; fill: var(--teal); flex: 0 0 auto; }
.social strong { display: block; font-weight: 600; }
.social span { color: var(--muted); font-size: .9rem; }

/* Contact */
.contact { display: flex; align-items: center; gap: 36px; justify-content: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 60px; padding: 44px; max-width: 860px; }
.contact img { border-radius: 24px; border: 1px solid var(--line); flex: 0 0 auto; }
.contact p { color: var(--muted); margin: 8px 0 20px; }

/* Footer */
.footer { max-width: var(--max); margin: 0 auto; padding: 28px 20px 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #6f7889; font-size: .9rem; border-top: 1px solid var(--line); }
.footer p { margin: 0; }
.footer nav { display: flex; gap: 22px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); 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; }
  html { scroll-behavior: auto; }
}

/* Legal page */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.25rem; margin: 36px 0 8px; }
.legal p, .legal li { color: #c3cad6; }
.legal a { color: var(--teal); }

/* Responsive */
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .promises { grid-template-columns: 1fr; gap: 28px; max-width: 560px; }
}
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .links.open { display: flex; }
  .links a { padding: 10px 0; width: 100%; text-align: center; }
  .grid { grid-template-columns: 1fr; }
  .card.featured { flex-direction: column; }
  .card.featured .card-art { flex: none; min-height: 170px; border-right: 0; border-bottom: 1px solid var(--line); }
  .card.featured .card-body { padding: 24px; }
  .card.featured h3 { font-size: 1.4rem; }
  .socials { grid-template-columns: 1fr; }
  .contact { flex-direction: column; text-align: center; padding: 32px 20px; gap: 20px; margin-left: 16px; margin-right: 16px; }
  .section { padding: 60px 16px; }
  .hero { padding: 8px 16px 20px; }
  .hero-copy { margin-top: 36px; }
  .banner { border-radius: 12px; }
}
