@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400..700;1,14..32,400..800&family=JetBrains+Mono:ital,wght@0,400..700;1,400..700&display=swap");

:root {
  color-scheme: light;
  /* Core palette copied from the Skills directory theme */
  --paper: #fbf2e4; /* warm cream background */
  --paper-soft: #f7ecd9; /* slightly deeper cream for panels/hover */
  --panel: #f6ead6; /* code + card panel cream */
  --ink: #16202b; /* near-black navy for titles, mono */
  --muted: #5e6e7c; /* slate-blue body text */
  --muted-soft: #8a97a2; /* faint labels */
  --line: #ddd3c1; /* warm hairline border */
  --line-strong: #cdbfa6;
  --badge-bg: #c9cfea; /* periwinkle tag background */
  --badge-ink: #303c6e; /* tag navy text */
  --link: #44539b; /* blue accent for links/icons */

  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

/* Never let media/code blocks push the page wider than the viewport. */
img,
pre,
table,
canvas,
svg {
  max-width: 100%;
}

html {
  background-color: var(--paper);
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Ambient animated background (decorative, theme-matched) ---------- */
/* Drifting soft "aurora" orbs in periwinkle + warm cream tones. */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
  background: url("/assets/bg-hero-opt.jpg") center / cover no-repeat;
  opacity: 0.62;
  filter: blur(3px) saturate(0.92);
  animation: bg-drift 30s ease-in-out infinite alternate;
}

/* Faint dot grid for a quiet "developer surface" texture. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(22, 32, 43, 0.06) 1px, transparent 1.6px);
  background-size: 26px 26px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 55%, transparent 100%);
  animation: bg-grid 60s linear infinite;
}

@keyframes bg-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2.5%, -2%, 0) scale(1.07) rotate(0.5deg);
  }
  100% {
    transform: translate3d(-2%, 2.5%, 0) scale(1.04) rotate(-0.5deg);
  }
}

@keyframes bg-grid {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 26px 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}

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

/* Small uppercase mono label, used throughout the reference design */
.eyebrow,
.label {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-highlight {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid #9fcb28;
  border-radius: 6px;
  color: #172026;
  background: #c5f542;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(68, 83, 155, 0.14);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 242, 228, 0.9);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.brand-mark {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

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

nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

nav a:hover {
  color: var(--ink);
}

.nav-cta {
  padding: 8px 14px;
  border: 1px solid var(--link);
  border-radius: 6px;
  color: var(--link);
}

.nav-cta:hover {
  background: var(--badge-bg);
  color: var(--badge-ink);
}

.nav-login {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.nav-login:hover {
  background: #0e1822;
  color: var(--paper);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 640px);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  padding: clamp(24px, 4.5vw, 56px) clamp(20px, 5vw, 72px) clamp(28px, 4.5vw, 48px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 760px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-family: var(--mono);
  font-size: clamp(38px, 5.4vw, 68px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.lede {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.6;
}

.lede strong {
  color: var(--ink);
  font-weight: 700;
}

/* Tag row */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.tag {
  padding: 7px 12px;
  border: 1px solid rgba(48, 60, 110, 0.18);
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary {
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
}

.primary:hover {
  background: #0e1822;
}

.secondary {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
}

.secondary:hover {
  background: var(--paper-soft);
}

/* ---------- Code / terminal panels (light cream, per reference) ---------- */
.terminal,
.code-card,
.try .code-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.terminal-bar .copy {
  color: var(--muted);
  cursor: default;
}

pre {
  margin: 0;
  white-space: pre-wrap;
}

code {
  display: block;
  padding: 20px 22px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
}

code .prompt {
  color: var(--muted-soft);
}

code .out {
  color: var(--muted);
}

/* ---------- Hero terminal: Claude Code style (dark) ---------- */
.terminal {
  background: #1b1916;
  border: 1px solid #36312a;
  box-shadow: 0 24px 60px rgba(22, 18, 12, 0.28);
}

.terminal .terminal-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #a8a294;
}

.terminal .terminal-bar .copy {
  color: #a8a294;
}

.terminal .term-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.terminal .term-dots {
  display: inline-flex;
  gap: 7px;
}

.terminal .term-dots span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #ec6a5e; /* red */
}

.terminal .term-dots span:nth-child(2) {
  background: #f4bf4f; /* amber */
}

.terminal .term-dots span:nth-child(3) {
  background: #61c554; /* green */
}

.terminal code {
  color: #ece7da; /* command text, near-white warm */
  padding: 24px 26px;
  font-size: 14px;
  line-height: 1.78;
}

.terminal code .prompt {
  color: #7fcf6b; /* terminal green $ */
}

.terminal code .k {
  color: #e0b057; /* amber field labels: Query/Summary/URL/Claims */
  font-weight: 600;
}

.terminal code .out {
  color: #a39d90; /* muted output */
}

.terminal code .status {
  color: #aab4ff; /* light periwinkle id/status line */
  font-weight: 600;
}

/* Interactive session (typewriter) */
.terminal code .term-line {
  display: block;
  min-height: 1.78em;
}

.terminal code .q {
  color: #7fcf6b; /* the "?" prompt glyph */
}

.terminal code .qq {
  color: #8a8478; /* inquirer question text, muted */
}

.terminal code .ans {
  color: #ece7da; /* the answer the builder types */
}

.terminal code .cursor {
  color: #ece7da;
  animation: term-blink 1s steps(1) infinite;
}

@keyframes term-blink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

/* Hero terminal column + one-line CLI command under it */
.hero-term-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-cli {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
}

.hero-cli code {
  display: inline;
  padding: 0;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-cli .prompt {
  color: var(--muted-soft);
  margin-right: 6px;
}

.hero-cli-copy {
  flex: none;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}

.hero-cli-copy:hover {
  background: var(--badge-bg);
  color: var(--badge-ink);
  border-color: var(--link);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(54px, 8vw, 96px) clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.steps,
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.steps article,
.plan-grid article {
  min-height: 200px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.steps article:hover,
.plan-grid article:hover {
  border-color: var(--line-strong);
  background: var(--paper-soft);
}

.steps p,
.plan-grid p,
.split p {
  color: var(--muted);
  line-height: 1.65;
}

.step-number {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(48, 60, 110, 0.18);
  border-radius: 6px;
  color: var(--badge-ink);
  background: var(--badge-bg);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.8fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
}

.split p {
  margin-top: 18px;
}

.price {
  margin: 4px 0 18px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
}

.price small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.try {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(360px, 1fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: start;
  border-bottom: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- See it in action (animated 3-step demo) ---------- */
.demo {
  padding-top: clamp(28px, 4vw, 48px);
  background: var(--paper-soft);
}

.demo-head {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.demo-pill {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.demo-head h2 {
  font-size: clamp(26px, 3.6vw, 42px);
}

.demo-head .hl {
  color: var(--link);
}

.demo-sub {
  margin: 16px auto 0;
  max-width: 600px;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.6;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.window {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-strong);
}

.window-dots {
  display: inline-flex;
  gap: 7px;
}

.window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #d97b66; /* terracotta */
  box-shadow: inset 0 0 0 1px rgba(22, 32, 43, 0.12);
}

.window-dots span:nth-child(2) {
  background: #d9a440; /* amber */
}

.window-dots span:nth-child(3) {
  background: #5f9e6f; /* sage green */
}

.window-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.window-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 0;
}

.step-badge {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(48, 60, 110, 0.18);
  border-radius: 6px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.step-cap {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.window-body {
  flex: 1;
  padding: 16px;
  min-height: 178px;
}

.window-body pre {
  white-space: pre-wrap;
}

.window-body code {
  padding: 0;
  font-size: 12.5px;
  line-height: 1.9;
}

.window-body .ln {
  display: block;
}

.flag {
  color: var(--link);
}

.agent-flag {
  color: var(--ink);
}

.status {
  color: var(--badge-ink);
  font-weight: 600;
}

.reply {
  color: var(--ink);
  font-weight: 600;
}

/* Scan line + animated dots */
.scan-line {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.scan-line .dots i {
  opacity: 0.2;
  animation: dotpulse 1.2s infinite;
}

.scan-line .dots i:nth-child(2) {
  animation-delay: 0.2s;
}

.scan-line .dots i:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotpulse {
  0%,
  60%,
  100% {
    opacity: 0.2;
  }
  30% {
    opacity: 1;
  }
}

/* Progress bar */
.progress {
  height: 6px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--link);
}

.window.scanning .progress > i {
  width: 100%;
  transition: width 1.1s ease;
}

/* Finding card */
.finding {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  opacity: 0;
  transform: scale(0.96);
}

.window.found .finding {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.finding-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.finding-title {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.finding-desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* Chips */
.chip {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid rgba(48, 60, 110, 0.18);
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.chip.warn {
  border-color: rgba(180, 83, 9, 0.3);
  background: rgba(180, 83, 9, 0.12);
  color: #92400e;
}

.chip.ok {
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.matched {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.resolved {
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* Reveal primitive */
.reveal {
  opacity: 0;
  transform: translateY(6px);
}

.reveal.show {
  opacity: 1;
  transform: none;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

/* Reduced-motion / static fallback: show everything */
.demo.static-final .reveal {
  opacity: 1;
  transform: none;
}

.demo.static-final .progress > i {
  width: 100%;
}

.demo.static-final .finding {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .progress > i {
    width: 100%;
    transition: none;
  }
  .finding {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scan-line .dots i {
    animation: none;
    opacity: 1;
  }
}

/* ---------- Responsive ---------- *
 * All rules live inside max-width queries so the desktop layout is unchanged;
 * these only refine tablet and phone rendering. */

/* Tablet: stack the paired hero/split/try layouts, drop card grids to 2-up. */
@media (max-width: 960px) {
  .hero,
  .split,
  .try {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-term-col {
    min-width: 0;
  }

  .steps,
  .plan-grid,
  .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Large phone / small tablet: single column, stacked header nav. */
@media (max-width: 760px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 14px 18px;
  }

  .steps,
  .plan-grid,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .steps article,
  .plan-grid article {
    min-height: 0;
  }
}

/* Phone: tighten spacing, scale type, make actions/footer full width. */
@media (max-width: 560px) {
  .section {
    padding: 44px 18px;
  }

  .hero {
    padding: 24px 18px 30px;
  }

  h1 {
    font-size: clamp(28px, 8.6vw, 40px);
  }

  .lede {
    font-size: 16px;
    margin-top: 18px;
  }

  code {
    padding: 16px 16px;
    font-size: 12.5px;
  }

  .terminal code {
    padding: 16px 16px;
    font-size: 12.5px;
    line-height: 1.7;
  }

  .actions {
    width: 100%;
  }

  .actions .button {
    flex: 1 1 auto;
  }

  .hero-cli code {
    font-size: 12px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
