:root {
  --bg: #0A0A0C;
  --fg: #EDEDE8;
  --orange: #FF5C1F;
  --green: #3DDC84;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

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

html, body { background: var(--bg); color: var(--fg); }
body { font-family: var(--body); overflow-x: hidden; }

#bg-log, #bg-gl {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
#bg-log { opacity: 0.05; }
#bg-log.poster { opacity: 0.06; }
#bg-gl { z-index: 1; }

.scanlines {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(237, 237, 232, 0.06) 0 1px, transparent 1px 3px);
  opacity: 0.6;
  mix-blend-mode: overlay;
}

.hero {
  position: relative; z-index: 3;
  min-height: max(100vh, 720px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 7vw;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  align-items: center;
  flex: 1;
}

.hero-content { grid-column: 1 / 7; }
.hero-demo { grid-column: 8 / 13; perspective: 1000px; }

/* ---- prompt label ---- */
.prompt-label {
  position: relative;
  display: inline-flex; align-items: baseline;
  background: none; border: 0; cursor: pointer;
  font-family: var(--mono); font-size: 0.75rem;
  color: rgba(237, 237, 232, 0.6);
  padding: 0.25rem 0; margin-bottom: 1.75rem;
  text-align: left;
}
.prompt-typed .dollar { color: var(--orange); }
.cursor {
  display: inline-block; width: 0.55em; height: 1.1em;
  margin-left: 2px; background: rgba(237, 237, 232, 0.6);
  vertical-align: text-bottom;
  animation: blink 1.06s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.copy-toast {
  position: absolute; left: calc(100% + 0.75rem); top: 0.1rem;
  font-family: var(--mono); font-size: 0.7rem; color: var(--green);
  opacity: 0; transition: opacity 0.2s; white-space: nowrap;
}
.copy-toast.show { opacity: 1; }

/* ---- headline ---- */
.headline {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(3.25rem, 6.5vw, 8rem);
  line-height: 0.95; letter-spacing: -0.03em;
  text-transform: lowercase;
}
.headline .line { display: block; }
.headline .nowrap { white-space: nowrap; }
.headline .word { display: inline-block; opacity: 0; transform: translateY(0.4em); }
.guard-word { color: var(--orange); }

/* ---- subtitle ---- */
.subtitle {
  font-size: 1.1rem; line-height: 1.55;
  color: rgba(237, 237, 232, 0.7);
  max-width: 560px; margin-top: 1.75rem;
  opacity: 0; transform: translateY(14px);
}

/* ---- CTAs ---- */
.ctas {
  display: flex; align-items: flex-start; gap: 1.5rem;
  margin-top: 2.25rem; flex-wrap: wrap;
  opacity: 0; transform: translateY(14px);
}
.cta-primary-wrap { display: flex; flex-direction: column; gap: 0.45rem; }
.cta-primary {
  display: inline-block; background: var(--orange); color: #0A0A0C;
  font-family: var(--mono); font-weight: 500; font-size: 0.95rem;
  padding: 0.85rem 1.5rem; border-radius: 4px; text-decoration: none;
  will-change: transform; transition: filter 0.15s;
}
.cta-primary:hover { filter: brightness(1.08); }
.cta-micro {
  font-family: var(--mono); font-size: 0.7rem;
  color: rgba(237, 237, 232, 0.45);
}
.cta-secondary-wrap { position: relative; }
.cta-secondary {
  display: inline-block; color: var(--fg);
  border: 1px solid rgba(237, 237, 232, 0.3);
  font-family: var(--mono); font-size: 0.95rem;
  padding: 0.85rem 1.5rem; border-radius: 4px; text-decoration: none;
  transition: border-color 0.15s;
}
.cta-secondary:hover { border-color: rgba(237, 237, 232, 0.7); }
.cta-tooltip {
  position: absolute; left: 50%; bottom: calc(100% + 0.6rem);
  transform: translateX(-50%);
  background: #16161a; border: 1px solid rgba(237, 237, 232, 0.15);
  font-family: var(--mono); font-size: 0.7rem; white-space: nowrap;
  padding: 0.4rem 0.7rem; border-radius: 4px;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.cta-secondary-wrap:hover .cta-tooltip { opacity: 1; }
.cta-github {
  font-family: var(--mono); font-size: 0.85rem;
  color: rgba(237, 237, 232, 0.7); text-decoration: underline;
  text-underline-offset: 3px; align-self: center; padding: 0.85rem 0;
  transition: color 0.15s;
}
.cta-github:hover { color: var(--orange); }

.es-badge {
  display: inline-block; margin-top: 2rem;
  font-family: var(--mono); font-size: 0.7rem;
  color: rgba(237, 237, 232, 0.5);
  border: 1px solid rgba(237, 237, 232, 0.15);
  border-radius: 4px; padding: 0.3rem 0.6rem;
  cursor: help; opacity: 0;
}

/* ---- terminal demo ---- */
.terminal {
  background: #101014;
  border: 1px solid rgba(237, 237, 232, 0.12);
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
  opacity: 0;
}
.terminal-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid rgba(237, 237, 232, 0.08);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #3a3a40; }
.dot-y { background: #2e2e34; }
.dot-g { background: #26262c; }
.terminal-tab {
  margin-left: 0.6rem; font-family: var(--mono); font-size: 0.7rem;
  color: rgba(237, 237, 232, 0.5);
  border: 1px solid rgba(237, 237, 232, 0.12);
  border-radius: 3px; padding: 0.15rem 0.5rem;
}
.replay {
  margin-left: auto; background: none; border: 0; cursor: pointer;
  font-family: var(--mono); font-size: 0.7rem;
  color: rgba(237, 237, 232, 0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.replay.show { opacity: 1; pointer-events: auto; }
.replay:hover { color: var(--orange); }
.terminal-body {
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.7;
  padding: 1rem 1.1rem 1.25rem; min-height: 190px;
  color: rgba(237, 237, 232, 0.85);
}
.terminal-body .t-line { display: block; white-space: pre-wrap; }
.t-you { color: rgba(237, 237, 232, 0.55); }
.t-agent { color: rgba(237, 237, 232, 0.85); }
.t-refused { color: var(--orange); }
.t-refused.flash { animation: guardflash 0.6s ease-out 2; }
.t-clean { color: var(--green); }
@keyframes guardflash { 30% { background: rgba(255, 92, 31, 0.18); } }

/* ---- trust strip ---- */
.trust-strip {
  font-family: var(--mono); font-size: 0.75rem;
  color: rgba(237, 237, 232, 0.4);
  padding: 2rem 0 2.25rem;
  opacity: 0;
}

/* ---- mobile ---- */
@media (max-width: 900px) {
  .hero { padding: 4rem 7vw 0; justify-content: flex-start; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-content, .hero-demo { grid-column: 1; }
  .hero-demo { perspective: none; }
  .terminal { transform: none !important; }
  .headline { font-size: clamp(2.6rem, 12vw, 4rem); }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  .t-refused.flash { animation: none; }
  .headline .word, .subtitle, .ctas, .terminal, .trust-strip, .es-badge {
    opacity: 1 !important; transform: none !important;
  }
}
