:root {
  --bg: #FBF7F4;
  --ink: #1B1033;
  --ink-2: #5A4E73;
  --ink-3: #8A80A0;
  --line: rgba(27, 16, 51, 0.10);
  --glass: rgba(255, 255, 255, 0.55);
  --coral: #FF6B4A;
  --violet: #7B5CFF;
  --sky: #38BDF8;
  --sun: #FFC14D;
  --grad: linear-gradient(100deg, var(--coral), var(--violet) 55%, var(--sky));
  --sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1180px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; position: relative; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Living background: soft colour blobs that drift */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
  animation: drift 26s var(--ease) infinite alternate;
}
.aurora span:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: -12vw; background: var(--coral); opacity: .30; }
.aurora span:nth-child(2) { width: 40vw; height: 40vw; right: -8vw; top: 4vw; background: var(--violet); opacity: .30; animation-duration: 32s; animation-delay: -6s; }
.aurora span:nth-child(3) { width: 36vw; height: 36vw; left: 30vw; top: 60vh; background: var(--sky); opacity: .22; animation-duration: 38s; animation-delay: -12s; }
.aurora span:nth-child(4) { width: 26vw; height: 26vw; right: 18vw; top: 120vh; background: var(--sun); opacity: .25; animation-duration: 30s; animation-delay: -3s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, 4vw) scale(1.15); }
  100% { transform: translate(-4vw, 8vw) scale(.95); }
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Header */
.site-header { position: fixed; top: 14px; left: 0; right: 0; z-index: 20; }
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px; padding: 0 10px 0 18px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 8px 30px rgba(27,16,51,.06);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo .mark { width: 24px; height: auto; }
.logo .word { height: 20px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.nav a.plain { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); transition: background .2s, color .2s; }
.nav a.plain:hover { background: rgba(27,16,51,.06); color: var(--ink); }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 500; font-size: 15px; color: #fff; background: var(--ink);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  will-change: transform; overflow: hidden; isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grad);
  opacity: 0; transition: opacity .35s var(--ease);
}
.btn:hover::before { opacity: 1; }
.btn:hover { box-shadow: 0 12px 30px rgba(123,92,255,.35); }
.btn.small { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.ghost { color: var(--ink); background: rgba(255,255,255,.6); border: 1px solid var(--line); }
.btn.ghost:hover { color: #fff; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .wrap { width: 100%; padding-top: 120px; padding-bottom: 80px; pointer-events: none; }
.hero .wrap > * { pointer-events: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--glass); border: 1px solid rgba(255,255,255,.8); backdrop-filter: blur(10px);
  font-size: 13px; color: var(--ink-2);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(255,107,74,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,107,74,0); } 100% { box-shadow: 0 0 0 0 rgba(255,107,74,0); } }
.hero h1 {
  font-weight: 500; letter-spacing: -0.05em; line-height: .98;
  font-size: clamp(46px, 8vw, 116px); margin: 26px 0 26px; max-width: 11ch;
}
.rotator { display: inline-grid; vertical-align: bottom; }
.rotator > span {
  grid-area: 1 / 1; opacity: 0; transform: translateY(45%) rotateX(-60deg); filter: blur(6px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease);
  white-space: nowrap; padding-bottom: .08em;
}
.rotator > span.on { opacity: 1; transform: none; filter: none; }
.rotator > span.off { opacity: 0; transform: translateY(-45%) rotateX(60deg); filter: blur(6px); }
.hero p.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 44ch; margin: 0 0 36px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hint i { width: 22px; height: 36px; border: 1.5px solid var(--ink-3); border-radius: 12px; position: relative; }
.hint i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--ink-2); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
.tip { position: absolute; right: 24px; bottom: 30px; }

/* Ticker */
.ticker { border-block: 1px solid var(--line); background: rgba(255,255,255,.35); overflow: hidden; padding: 18px 0; }
.ticker .track { display: flex; gap: 48px; width: max-content; animation: scroll 32s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
.ticker span { font-size: clamp(22px, 3vw, 36px); letter-spacing: -0.03em; font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 48px; }
.ticker span::after { content: "✦"; font-size: .6em; color: var(--coral); }
.ticker span:nth-child(3n+2)::after { color: var(--violet); }
.ticker span:nth-child(3n)::after { color: var(--sky); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Section heads */
section.block { padding: 120px 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 56px; }
.head h2 { font-weight: 500; letter-spacing: -0.045em; line-height: 1.02; font-size: clamp(36px, 5vw, 68px); margin: 14px 0 0; max-width: 14ch; }
.head p { color: var(--ink-2); max-width: 38ch; margin: 0; }

/* Cards with tilt and a glow that follows the cursor */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1200px; }
.card {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; padding: 32px 28px 34px; border-radius: 24px; min-height: 300px;
  background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(27,16,51,.06);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(123,92,255,.18), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.card:hover::before { opacity: 1; }
.card:hover { box-shadow: 0 30px 60px rgba(27,16,51,.12); }
.card .icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; margin-bottom: 64px; transform: translateZ(30px); }
.card:nth-child(1) .icon { background: linear-gradient(135deg, var(--coral), var(--sun)); }
.card:nth-child(2) .icon { background: linear-gradient(135deg, var(--violet), var(--coral)); }
.card:nth-child(3) .icon { background: linear-gradient(135deg, var(--sky), var(--violet)); }
.card h3 { font-weight: 500; font-size: 24px; letter-spacing: -0.02em; margin: 0 0 10px; transform: translateZ(20px); }
.card p { margin: 0; color: var(--ink-2); transform: translateZ(10px); }
.card .num { position: absolute; top: 28px; right: 28px; }

/* Retrieval demo */
.demo {
  display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 20px; align-items: center;
  padding: 28px; border-radius: 28px; background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 10px 40px rgba(27,16,51,.06);
}
.stage { display: flex; flex-direction: column; gap: 10px; }
.stage > .mono { margin-bottom: 4px; }
.bubble { padding: 16px 18px; border-radius: 18px 18px 18px 6px; background: var(--ink); color: #fff; font-size: 16px; opacity: 0; transform: translateY(10px); transition: all .5s var(--ease); }
.doc {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); font-size: 14px; color: var(--ink-2);
  opacity: .35; transform: scale(.98); transition: all .45s var(--ease);
}
.doc b { font-weight: 500; color: var(--ink); }
.doc .ico { width: 30px; height: 36px; border-radius: 6px; background: linear-gradient(135deg, #efeaf7, #fff); border: 1px solid var(--line); flex: none; }
.answer { padding: 18px; border-radius: 18px 18px 6px 18px; background: #fff; border: 1px solid var(--line); min-height: 92px; opacity: 0; transform: translateY(10px); transition: all .5s var(--ease); }
.answer .text { font-size: 16px; }
.cite { display: inline-flex; margin-top: 10px; padding: 4px 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; color: #fff; background: var(--grad); opacity: 0; transform: scale(.8); transition: all .4s var(--ease) .2s; }
.demo.s1 .bubble, .demo.s2 .bubble, .demo.s3 .bubble, .demo.s4 .bubble { opacity: 1; transform: none; }
.demo.s2 .doc { opacity: 1; animation: scan 1s var(--ease) infinite; }
.demo.s2 .doc:nth-child(3) { animation-delay: .15s; }
.demo.s2 .doc:nth-child(4) { animation-delay: .3s; }
@keyframes scan { 50% { border-color: rgba(123,92,255,.6); transform: scale(1); } }
.demo.s3 .doc, .demo.s4 .doc { opacity: .4; }
.demo.s3 .doc.hit, .demo.s4 .doc.hit { opacity: 1; transform: scale(1.03); border-color: transparent; box-shadow: 0 0 0 2px var(--violet), 0 14px 30px rgba(123,92,255,.25); }
.demo.s4 .answer { opacity: 1; transform: none; }
.demo.done .cite { opacity: 1; transform: none; }
.caret { display: inline-block; width: 2px; height: 1.05em; vertical-align: -0.15em; background: var(--violet); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.demo-note { margin-top: 14px; text-align: center; }

/* Contact */
.contact { padding: 140px 0 120px; text-align: center; }
.contact h2 { font-weight: 500; letter-spacing: -0.055em; line-height: .95; font-size: clamp(56px, 11vw, 160px); margin: 18px 0 40px; }
.contact .btn { height: 60px; padding: 0 32px; font-size: 17px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 30px; font-size: 13px; color: var(--ink-3); }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a:hover { color: var(--ink); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

/* Simple pages */
.page .wrap { padding-top: 150px; padding-bottom: 120px; max-width: 760px; }
.page h1 { font-weight: 500; letter-spacing: -0.045em; line-height: 1.02; font-size: clamp(42px, 6vw, 72px); margin: 18px 0 28px; }
.page h2 { font-weight: 500; font-size: 19px; margin: 36px 0 8px; }
.page p, .page li { color: var(--ink-2); }
.page a:not(.btn) { border-bottom: 1px solid var(--ink-3); }

a:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; border-radius: 8px; }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card .icon { margin-bottom: 36px; }
  .demo { grid-template-columns: 1fr; }
  .nav a.plain { display: none; }
  .hero { align-items: flex-start; }
  .hero .wrap { padding-top: 110px; padding-bottom: 46vh; }
  .tip { display: none; }
  section.block { padding: 88px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker .track { transform: none; }
}
