/* SnarkAPI GitHub Pages site. Dark, royal-blue, loosely echoing the
   Fulcrum / Meridian / ClearBudget landing language, with the app's own
   rain + typewriter personality. */
:root {
  --bg: #080c1f;
  --surface: #121832;
  --raised: #0d1330;
  --border: #263258;
  --text: #e9edf7;
  --muted: #9aa6c4;
  --accent: #6ea8ff;
  --accent-bright: #9cc4ff;
  --rain: rgba(174, 194, 255, 0.5);
  --maxw: 1120px;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", "Fira Code",
    Consolas, "Liberation Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #0c1330 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Rain canvas: fixed behind everything, never intercepts clicks. */
#rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}
body > *:not(#rain) { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); }
h1, h2, h3, h4 { line-height: 1.2; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

header.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 12, 31, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--accent-bright); }

.hero {
  position: relative;
  text-align: center;
  padding: 100px 0 78px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    58% 50% at 50% 0,
    rgba(110, 168, 255, 0.22),
    transparent 70%
  );
  pointer-events: none;
}
.hero .logo {
  width: 116px;
  height: 116px;
  margin-bottom: 20px;
  filter: drop-shadow(0 10px 34px rgba(110, 168, 255, 0.35));
}
.hero h1 {
  font-size: clamp(42px, 7vw, 72px);
  margin: 0;
  letter-spacing: -0.02em;
}
.tagline {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 13px;
  margin-top: 10px;
}
.lede {
  max-width: 660px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 19px;
}

/* Live demo "screen" in the hero: shows the typewriter effect off the API. */
.demo {
  max-width: 720px;
  margin: 34px auto 0;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.demo .bar {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.demo .bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border);
}
.demo .bar .addr {
  margin-left: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}
.demo .screen {
  /* Fixed height so the box never grows/shrinks as lines are typed and wiped,
     which would otherwise reflow the whole page. Tall enough for the longest
     sample (up to three wrapped lines); text stays vertically centred. */
  height: 210px;
  display: grid;
  place-items: center;
  padding: 24px 26px;
  text-align: center;
  font-weight: 800;
  font-size: clamp(18px, 2.6vw, 26px);
  color: #fff;
  overflow: hidden;
}
.caret {
  display: inline-block;
  margin-left: 0.06em;
  font-weight: 400;
  color: var(--accent-bright);
  animation: caret-blink 1s steps(1, end) infinite;
}
@keyframes caret-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: 0.15s ease;
}
.btn-primary { background: var(--accent); color: #071026; }
.btn-primary:hover { background: var(--accent-bright); color: #071026; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); }
.badges {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.badges span { margin: 0 10px; }

section { padding: 74px 0; }
section.alt {
  background: linear-gradient(180deg, rgba(18, 24, 50, 0.5), transparent);
}
.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 36px);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.section-sub {
  color: var(--muted);
  margin: 0 0 42px;
  font-size: 17px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.feature .fnum {
  color: var(--accent);
  font-weight: 700;
  font-size: 20px;
}
.feature h3 { margin: 10px 0 8px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* API usage: terminal frame with a request + response. */
.terminal {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.5);
  max-width: 820px;
}
.terminal .bar {
  display: flex;
  gap: 7px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.terminal .bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border);
}
.terminal pre {
  margin: 0;
  padding: 22px 24px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
}
.terminal .prompt { color: var(--accent); }
.terminal .cmt { color: var(--muted); }
.endpoint {
  margin-top: 24px;
  color: var(--muted);
  font-size: 15px;
}
.endpoint code {
  font-family: var(--mono);
  color: var(--accent-bright);
  background: rgba(110, 168, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-inner strong { color: var(--text); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .nav-links { gap: 16px; }
  .nav-links a:nth-child(1),
  .nav-links a:nth-child(2) { display: none; }
}
