@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #F6F8FB;
  --bg-1: #FFFFFF;
  --bg-2: #EEF2F8;
  --bg-3: #E2E8F2;
  --line: #D5DCE8;
  --line-soft: #E4EAF2;
  --text: #0B1220;
  --text-2: #44515F;
  --text-3: #8793A4;
  --accent: #2E6BFF;
  --accent-2: #7B4DFF;
  --accent-cyan: #0A8C85;
  --accent-amber: #C26A1F;
  --grad: linear-gradient(120deg, #2E6BFF 0%, #7B4DFF 100%);
  --grad-soft: linear-gradient(120deg, rgba(46,107,255,.10), rgba(123,77,255,.10));
  --radius: 10px;
  --max: 1120px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.03);
  --shadow-md: 0 6px 18px rgba(15,23,42,.06), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 24px 60px rgba(15,23,42,.10), 0 8px 18px rgba(15,23,42,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 12% -8%, rgba(46,107,255,.10), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(123,77,255,.08), transparent 38%);
  background-attachment: fixed;
  position: relative;
}
body:before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(46,107,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,107,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 80%);
}

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: var(--text);
}

a { color: inherit; }

.mono { font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.02em; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246,248,251,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.nav-logo svg { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  position: relative;
}
.lang-switch .lang-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
  z-index: 1;
}
.lang-switch select {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-1);
  border: 1px solid var(--text-3);
  border-radius: 8px;
  padding: 6px 24px 6px 30px;
  min-width: 108px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .15s, transform .15s;
}
.lang-switch select:hover { border-color: var(--accent); transform: translateY(-1px); }
.lang-switch select:hover ~ .lang-icon { color: var(--accent); }
.lang-switch select:focus { outline: none; border-color: var(--accent); }
.lang-switch .lang-caret {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-2);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover { color: var(--text); border-color: var(--accent); }
.nav-links a.nav-gh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--text-3);
  border-bottom: 1px solid var(--text-3);
  background: var(--bg-1);
  color: var(--text) !important;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: border-color .15s, transform .15s, background .15s;
}
.nav-links a.nav-gh:hover { border-color: var(--accent); border-bottom-color: var(--accent); transform: translateY(-1px); background: #fff; }
.nav-gh svg { color: var(--text-2); transition: color .15s; }
.nav-gh:hover svg { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 0; overflow: hidden; position: relative; }
.hero .wrap { display: flex; flex-direction: column; gap: 40px; align-items: stretch; position: relative; z-index: 1; }
.hero-text { width: 100%; max-width: none; }
.quill-shell { width: 100%; }
.hero-eyebrow {
  font-size: 12.5px;
  color: var(--accent);
  margin: 32px 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--bg-1);
  box-shadow: var(--shadow-sm);
}
.hero-eyebrow:before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,107,255,.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.hero h1 { font-size: clamp(36px, 5vw, 56px); }
.hero p.lede { color: var(--text-2); font-size: 17px; margin: 20px 0 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 14.5px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(46,107,255,.28); }
.btn-primary:hover { box-shadow: 0 8px 26px rgba(46,107,255,.42); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--bg-1); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ---------- signature: app stage ---------- */
.stage {
  position: relative;
  border-radius: 14px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-4deg) rotateX(1.5deg);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.stage:hover { transform: perspective(1400px) rotateY(0deg) rotateX(0deg); }
.stage:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(46,107,255,.04), transparent 28%);
  pointer-events: none;
}
.stage-chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  position: relative;
  z-index: 2;
}
.tl { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.tl-r { background: #FF6058; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.tl-y { background: #FFBC2C; }
.tl-g { background: #28C840; }
.stage-path {
  font-size: 11.5px;
  color: var(--text-3);
  margin-left: 6px;
}
.stage-path [data-vault] { color: var(--accent); }

.stage-body {
  display: grid;
  grid-template-columns: 36px 224px 1fr;
  height: 460px;
  position: relative;
  z-index: 1;
  background: var(--bg);
}

/* Right pane: screenshot */
.pane-shot {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pane-shot:before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46,107,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,107,255,.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.shot-img {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shot-empty {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  text-align: center;
  padding: 16px;
}
.shot-empty svg { color: var(--text-3); opacity: .55; }
.shot-empty code {
  font-family: inherit;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--accent);
}
.shot-spin {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: shot-spin .7s linear infinite;
}
@keyframes shot-spin { to { transform: rotate(360deg); } }
.pane-shot:has(.shot-img[style*="display:none"]) .shot-empty,
.pane-shot:has(.shot-img:not([src])) .shot-empty { z-index: 2; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stage { transform: none; }
  .stage-body { height: 360px; grid-template-columns: 36px 200px 1fr; }
}

/* ---------- sections ---------- */
.section { padding: 32px 0; position: relative; }
#capabilities { padding-top: 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head .eyebrow { font-size: 12.5px; color: var(--accent); margin-bottom: 4px; display: block; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); }
.section-head p { color: var(--text-2); font-size: 15.5px; }

/* ---------- capability grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0; background: #fff; border-top: 1px solid var(--brd, #dde2f0); border-left: 1px solid var(--brd, #dde2f0); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.card { border-right: 1px solid var(--brd, #dde2f0); border-bottom: 1px solid var(--brd, #dde2f0); }
.card {
  background: var(--bg-1);
  padding: 30px 28px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background .2s;
  position: relative;
}
.card:hover { background: var(--bg-2); }
.card:hover .glyph { color: var(--accent); transform: translateY(-2px); }
.card .glyph {
  color: var(--accent);
  transition: color .2s, transform .2s;
}
.card h3 { font-size: 19px; }
.card p { color: var(--text-2); font-size: 14px; margin: 0; flex: 1; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card .tags span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--text);
  border-radius: 4px;
  padding: 3px 7px;
  background: var(--bg-2);
  transition: background .15s ease;
}
.card:hover .tags span {
  background: color-mix(in oklab, var(--accent) 12%, var(--bg-2));
}
.card .go { font-size: 13px; color: var(--accent); margin-left: auto; align-self: flex-end; }
.card:after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.card:hover:after { transform: scaleX(1); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 0; height: 52px; display: flex; align-items: center; color: var(--text-3); font-size: 13.5px; }
.footer .wrap { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.footer a { color: var(--text-3); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ---------- detail page ---------- */
.detail-hero { padding: 32px 0 0; }
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.breadcrumb a { text-decoration: none; color: var(--text-3); }
.breadcrumb a:hover { color: var(--accent); }
.detail-hero h1 { font-size: clamp(28px, 4vw, 42px); max-width: 20ch; }
.detail-hero .lede { color: var(--text-2); max-width: 56ch; font-size: 16.5px; margin-top: 14px; }
.detail-hero .tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.detail-hero .tags span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  border: 1px solid var(--line);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--bg-1);
}

.feature-list { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 8px; box-shadow: var(--shadow-md); }
.feature-row { background: var(--bg-1); padding: 26px 30px; display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.feature-row .k { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--accent); }
.feature-row .v { color: var(--text-2); font-size: 15px; }
.feature-row .v ul { margin: 0; padding-left: 18px; }
.feature-row .v li { margin-bottom: 4px; }
@media (max-width: 640px) { .feature-row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- screenshot gallery ---------- */
.shot-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 8px; }
.shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-1); transition: border-color .2s, transform .2s, box-shadow .2s; box-shadow: var(--shadow-sm); }
.shot:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.shot img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.shot .cap { padding: 12px 16px; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line-soft); text-align: center; }
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; padding: 24px;
}
.lightbox img { max-width: 95vw; max-height: 95vh; box-shadow: 0 8px 40px rgba(0,0,0,.4); }
.shot.empty {
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 13px;
  font-family: 'IBM Plex Mono', monospace;
  text-align: center;
  padding: 16px;
  background:
    repeating-linear-gradient(45deg, var(--bg-2), var(--bg-2) 10px, var(--bg-1) 10px, var(--bg-1) 20px);
}

.next-links { display: flex; justify-content: space-between; padding: 24px 0 0; font-size: 13px; margin-top: 20px; }
.next-links a { text-decoration: none; color: var(--accent); transition: opacity .15s ease; }
.next-links a:hover { opacity: .75; }

@media (prefers-reduced-motion: reduce) {
  .stage, .btn, .shot, .card:after, .wave span, .caret, .hero-eyebrow:before { transition: none; animation: none; }
}
