@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg:            #161D29;
  --bg-top:        #0B0B0B;
  --bg-elev:       #1C2534;
  --card:          #242D3B;
  --card-hover:    #2C3648;
  --prompt-bg:     #2E3847;
  --border:        rgba(120, 150, 200, 0.21);
  --border-str:    rgba(120, 150, 200, 0.35);
  --border-hi:     rgba(120, 150, 200, 0.45);
  --text:          #E7ECF3;
  --text-muted:    #9FA7B8;
  --text-faint:    #6B7484;
  --accent:        #5E84DC;
  --accent-bright: #83BCEB;
  --accent-dk:     #4A7DA8;
  --accent-soft:   #243358;
  --accent-ui:     #44598C;
  --green:         #49C27A;
  --amber:         #E0A040;
  --code-bg:       #0B111C;
  --code-fn:       #EAB07E;
  --code-kw:       #B57EE6;
  --code-num:      #F0A46BFF;
  --code-str:      #7CCDA0;
  --code-com:      #6B7484;
  --container-max: 1080px;
  --topbar-max:    var(--container-max);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-top);
  background-image: linear-gradient(to bottom, var(--bg-top) 0%, var(--bg) 320px);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--text); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 11, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 32px;
  max-width: var(--topbar-max);
  margin: 0 auto;
}

.topbar-brand {
  display: inline-flex;
  align-items: baseline;
  letter-spacing: -0.015em;
  color: var(--text);
  font-size: 17px;
}

.topbar-brand .rea { color: var(--accent-bright); font-weight: 300; }
.topbar-brand .assist { color: var(--accent); font-weight: 700; margin-left: 1px; }

.topbar-attribution {
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.topbar-attribution a {
  color: var(--text-muted);
  border-bottom: 1px dotted var(--border-str);
  padding-bottom: 1px;
}

.topbar-attribution a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.hero {
  padding: 56px 0 44px;
  text-align: center;
}

.hero-logo {
  max-width: 440px;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  margin: 0 auto 16px;
}

.hero-tagline {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--text);
}

.hero-tagline .light { font-weight: 400; color: var(--text-muted); }

.hero-accent {
  width: 56px;
  height: 2px;
  margin: 18px auto 22px;
  background: linear-gradient(to right,
    transparent 0%, var(--accent) 50%, transparent 100%);
  border-radius: 1px;
}

.hero-blurb {
  max-width: 620px;
  margin: 0 auto 22px;
  color: var(--text-muted);
  font-size: 17px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  background: var(--accent-soft);
  color: var(--accent-bright);
  border: 1px solid var(--accent-dk);
}

.hero-chip .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-bright);
}

.hero-chips {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto 28px;
}

.hero-cta {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-manual-link {
  margin: 14px 0 0;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-dk);
  color: #ffffff;
  border-color: var(--accent-dk);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border-str);
}

.btn-secondary:hover {
  background: var(--card-hover);
  border-color: var(--border-hi);
  color: var(--text);
}

.btn.btn-small {
  padding: 7px 13px;
  font-size: 12px;
  border-radius: 5px;
}

.btn svg { width: 16px; height: 16px; }

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  color: var(--text-faint);
  font-size: 13px;
  text-align: center;
}

footer a { color: var(--text-muted); }
footer a:hover { color: var(--text); }
footer .sep { color: var(--text-faint); margin: 0 8px; }

.backtop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-dk);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.36);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.backtop.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .container,
  .topbar-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .topbar-attribution {
    display: none;
  }

  body .hero {
    overflow: hidden;
    padding-top: 38px;
  }

  body .hero-logo {
    width: 82vw;
    max-width: 330px;
    height: auto;
  }

  body .hero-tagline {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    font-size: 28px;
    line-height: 1.25;
  }

  body .hero-blurb {
    max-width: 320px;
    overflow-wrap: break-word;
  }

  body .hero-cta {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    gap: 10px;
  }

  .btn {
    justify-content: center;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .backtop {
    right: 16px;
    bottom: 16px;
  }
}
