:root {
  --bg: #eef1f6;
  --bg-2: #f8fafc;
  --panel: #ffffff;
  --fg: #14171d;
  --text: #3a414c;
  --muted: #5a616c;
  --line: rgba(20, 23, 29, 0.09);
  --line-2: rgba(20, 23, 29, 0.16);
  --accent: #1a56ff;
  --accent-dim: #1746cc;
  --maxw: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(
    ellipse 120% 80% at 50% 0%,
    #000 30%,
    transparent 80%
  );
  mask-image: radial-gradient(
    ellipse 120% 80% at 50% 0%,
    #000 30%,
    transparent 80%
  );
  opacity: 0.6;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 36px;
  position: relative;
  z-index: 1;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- NAV ---------- */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition:
    background 0.4s var(--ease),
    border-color 0.4s;
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background: rgba(238, 241, 246, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}

.brand .sq {
  width: 10px;
  height: 10px;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(26, 86, 255, 0.14);
}

.brand b {
  font-weight: 500;
}

.brand span {
  color: var(--muted);
}

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

.nav-links a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-cta {
  border: 1px solid var(--line-2);
  color: var(--fg) !important;
  padding: 8px 16px;
  transition:
    border-color 0.25s,
    color 0.25s,
    background 0.25s;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg) !important;
}

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line-2);
  color: var(--fg);
  padding: 8px 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  cursor: pointer;
  transition:
    border-color 0.25s,
    color 0.25s;
}

.menu-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- MOBILE NAV ---------- */

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(238, 241, 246, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-2);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  transition:
    color 0.2s,
    background 0.2s;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  color: var(--accent);
  background: rgba(26, 86, 255, 0.04);
}

.mobile-nav .nav-cta {
  margin: 12px 22px 16px;
  padding: 12px 16px;
  text-align: center;
  border: 1px solid var(--line-2);
  color: var(--fg) !important;
  display: block;
}

.mobile-nav .nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg) !important;
}

/* ---------- REVEAL ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- FOOTER ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.foot-links {
  display: flex;
  gap: 22px;
}

.foot-links a:hover {
  color: var(--accent);
}

/* ---------- ACCESSIBILITY ---------- */

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .menu-btn {
    display: block;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 22px;
  }
  body {
    font-size: 16px;
  }
}
