@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/JetBrainsMono-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/IBMPlexMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/IBMPlexMono-Medium.woff2') format('woff2');
}

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --border: #d7e1ec;
  --text: #16202c;
  --text-dim: #55647a;
  --text-faint: #8b97a8;
  --accent: #2f8fe0;
  --accent-hover: #1f6fc0;
  --accent-soft: rgba(47, 143, 224, 0.12);
  --accent-glow: rgba(47, 143, 224, 0.35);

  --font-display: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-body: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* A fixed overlay panel — stays put in the viewport while .bot-stage
   scrolls underneath it. */
.hero-top {
  position: fixed;
  top: max(2rem, env(safe-area-inset-top) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: calc(100% - 2.5rem);
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20, 40, 70, 0.1);
}

/* Tall enough to give the particle field room to breathe while scrolling.
   Sits behind .hero-top and scrolls normally while that panel stays fixed. */
.bot-stage {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 160vh;
  overflow: hidden;
}

.particle-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* purely decorative — lets scroll/click pass through */
}

.eyebrow {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: clamp(1.3rem, 4.5vw, 2rem);
  color: var(--text);
  margin: 0 0 0.4rem;
}

.subline {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  max-width: 46ch;
  margin: 0 0 1.75rem;
}
.subline strong { color: var(--text); font-weight: 500; }

.ask-form {
  width: 100%;
  max-width: 520px;
  display: flex;
  gap: 0.6rem;
}

.ask-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ask-input::placeholder { color: var(--text-faint); }
.ask-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.ask-submit {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ask-submit:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  max-width: 560px;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.chip:hover { color: var(--accent); border-color: var(--accent); }

.output {
  width: 100%;
  max-width: 560px;
  min-height: 1.6rem;
  margin-top: 1.5rem;
  padding: 0 0.25rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.75;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.output.visible { opacity: 1; }
.output.pending { color: var(--text-faint); font-style: italic; }

.gate-links {
  margin: 3rem 0 2.5rem;
  text-align: center;
  font-size: 0.8rem;
}
.gate-links a { text-decoration: none; border-bottom: 1px solid var(--border); padding-bottom: 2px; }
.gate-links a:hover { border-color: var(--accent); }
