@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #070b12;
  --surface: #0c1420;
  --surface-raised: #111d2a;
  --line: #25374a;
  --line-soft: #1a2b3d;
  --text: #eaf1f6;
  --muted: #99aabc;
  --faint: #667c91;
  --cyan: #29d9df;
  --orange: #ffad42;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 77% 8%, rgba(22, 67, 83, .21), transparent 34rem),
    radial-gradient(ellipse at 4% 31%, rgba(16, 44, 61, .2), transparent 30rem),
    var(--bg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  content: "";
  opacity: .11;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 10;
  padding: .75rem 1rem;
  color: var(--bg);
  background: var(--cyan);
  border-radius: 3px;
  font-weight: 800;
}
.skip-link:focus { top: 1rem; }

.topbar {
  height: 70px;
  padding: 0 clamp(1.1rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(74, 102, 125, .32);
  background: rgba(7, 11, 18, .78);
}

.wordmark, .topbar-right, .demo-state, .top-link, .brand-mark {
  display: inline-flex;
  align-items: center;
}
.wordmark {
  gap: .65rem;
  color: var(--text);
  text-decoration: none;
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: -.04em;
}
.brand-mark {
  width: 19px;
  height: 19px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  transform: rotate(-8deg);
}
.brand-mark i { display: block; background: var(--cyan); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { opacity: .52; }
.version {
  margin-left: .3rem;
  padding: .29rem .42rem;
  border: 1px solid #2a4053;
  color: #a9bfd1;
  font: 500 .59rem var(--font-mono);
  letter-spacing: .08em;
}
.topbar-right { gap: 1.6rem; }
.demo-state {
  gap: .5rem;
  color: var(--muted);
  font: 400 .68rem var(--font-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(41, 217, 223, .1);
}
.top-link, .text-link, .step-link {
  gap: .55rem;
  color: var(--cyan);
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
}
.top-link:hover, .text-link:hover, .step-link:hover { color: #fff; transform: translateX(2px); }

main { width: min(1192px, calc(100% - 3rem)); margin: 0 auto; }

.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .75fr);
  gap: clamp(2rem, 6vw, 6.7rem);
  align-items: center;
  padding: clamp(4.3rem, 9vw, 7.7rem) 0 clamp(4.5rem, 8vw, 7rem);
  border-bottom: 1px solid var(--line-soft);
  animation: enter .65s cubic-bezier(.2,.72,.2,1) both;
}
.intro::before {
  content: "";
  position: absolute;
  top: 4.2rem;
  left: -4.7rem;
  width: 1px;
  height: 175px;
  background: linear-gradient(var(--cyan), transparent);
  opacity: .55;
}
.eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--orange);
  font: 500 .65rem var(--font-mono);
  letter-spacing: .16em;
}
.eyebrow-rule { width: 26px; height: 1px; background: #9a6e37; }
.intro h1 {
  margin: 1.25rem 0 1.3rem;
  max-width: 760px;
  font-size: clamp(2.8rem, 6.4vw, 5.6rem);
  line-height: .99;
  letter-spacing: -.075em;
  font-weight: 700;
}
.intro h1 em {
  color: var(--cyan);
  font-style: normal;
}
.intro-lede {
  max-width: 650px;
  margin: 0;
  color: #a5b6c5;
  font-size: clamp(.94rem, 1.35vw, 1.07rem);
  line-height: 1.8;
}
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 2rem;
}
.button {
  min-height: 48px;
  padding: .1rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  border: 1px solid transparent;
  text-decoration: none;
  text-transform: uppercase;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
  color: #031217;
  background: var(--cyan);
}
.button-primary:hover { background: #72edf0; }

.signal-panel {
  position: relative;
  padding: 1.15rem 1.25rem 1rem;
  border: 1px solid #284054;
  background:
    linear-gradient(140deg, rgba(25, 44, 59, .52), rgba(12, 20, 32, .98) 59%),
    var(--surface);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .23);
}
.signal-panel::after {
  content: "";
  position: absolute;
  top: -1px;
  right: 25px;
  width: 66px;
  height: 2px;
  background: var(--cyan);
}
.signal-head, .signal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--faint);
  font: 500 .57rem var(--font-mono);
  letter-spacing: .1em;
}
.signal-index { color: #7690a6; }
.flow { padding: 1.15rem 0 .95rem; }
.flow-node {
  min-height: 61px;
  padding: .65rem .75rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  border: 1px solid #26394c;
  background: rgba(6, 12, 19, .47);
}
.gemini-node { border-color: rgba(41, 217, 223, .42); background: rgba(15, 39, 47, .48); }
.output-node { border-color: rgba(255, 173, 66, .28); }
.flow-number { color: var(--faint); font: 500 .62rem var(--font-mono); }
.flow-copy { display: grid; gap: .22rem; }
.flow-copy b { font-size: .77rem; font-weight: 700; }
.flow-copy small { color: var(--muted); font-size: .62rem; }
.flow-symbol { margin-left: auto; color: #7890a2; font: 500 .8rem var(--font-mono); }
.gemini-node .flow-symbol { color: var(--cyan); }
.output-node .flow-symbol { color: var(--orange); }
.flow-link { height: 19px; padding-left: 1.35rem; }
.flow-link span { height: 100%; display: block; width: 1px; background: #395266; position: relative; }
.flow-link span::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -2px;
  width: 5px;
  height: 5px;
  border: solid #52718a;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}
.signal-foot { gap: .55rem; font-size: .48rem; }
.signal-foot span:last-child { color: #a1afbb; }
.signal-line { height: 1px; flex: 1; background: #293b4b; }

.walkthrough { padding: clamp(3.5rem, 6vw, 5rem) 0; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 2.25rem;
}
.section-heading h2, .grounding-title h2, .reference-cta h2 {
  margin: .8rem 0 0;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -.06em;
}
.section-aside {
  max-width: 265px;
  margin: 0 0 .12rem;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.65;
}
.steps { border-top: 1px solid var(--line); }
.step {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 110px;
  gap: 1.1rem;
  padding: 1.45rem 0 1.55rem;
  border-bottom: 1px solid var(--line-soft);
  animation: enter .55s cubic-bezier(.2,.72,.2,1) both;
}
.step:nth-child(2) { animation-delay: .06s; }
.step:nth-child(3) { animation-delay: .12s; }
.step:nth-child(4) { animation-delay: .18s; }
.step-rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .8rem;
  color: var(--orange);
  font: 500 .67rem var(--font-mono);
}
.rail-line { width: 1px; flex: 1; min-height: 18px; margin-left: 4px; background: linear-gradient(var(--line), transparent); }
.step h3 { margin: -.12rem 0 .45rem; font-size: 1.08rem; letter-spacing: -.035em; }
.step p { max-width: 760px; margin: 0; color: #9aabba; font-size: .82rem; line-height: 1.75; }
.step .step-detail { margin-top: .55rem; color: #778ca0; font-size: .73rem; }
.step-detail b { color: #c2d0db; }
.step-link { display: inline-flex; margin-top: .85rem; font-size: .69rem; }
.step-tag {
  justify-self: end;
  align-self: start;
  padding: .35rem .45rem;
  border: 1px solid #273b4e;
  color: #8198aa;
  font: 500 .52rem var(--font-mono);
  letter-spacing: .08em;
  white-space: nowrap;
}

.grounding {
  position: relative;
  padding: clamp(2.2rem, 4vw, 3.3rem);
  border: 1px solid #2a3d50;
  background:
    linear-gradient(115deg, rgba(17, 39, 51, .72), rgba(12, 20, 32, .9) 62%),
    var(--surface);
}
.grounding-title { margin-bottom: 2.2rem; }
.grounding-title h2 { max-width: 550px; }
.grounding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 5vw, 4.5rem);
}
.grounding-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: .8rem;
  padding: 1.15rem 0;
  border-top: 1px solid #2a3a4b;
}
.item-mark {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(41, 217, 223, .45);
  color: var(--cyan);
  font: 500 .64rem var(--font-mono);
}
.grounding-item h3 { margin: 0 0 .42rem; font-size: .86rem; letter-spacing: -.02em; }
.grounding-item p { max-width: 440px; margin: 0; color: #91a3b3; font-size: .73rem; line-height: 1.75; }

.reference-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 4rem 0;
}
.reference-cta h2 { max-width: 600px; }
.button-outline { flex: 0 0 auto; border-color: #466174; color: var(--text); }
.button-outline:hover { border-color: var(--cyan); background: rgba(41, 217, 223, .08); }

.footer {
  min-height: 75px;
  padding: 1rem clamp(1.1rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: .66rem;
}
.footer-brand { color: #d0dbe3; font-weight: 800; text-decoration: none; white-space: nowrap; }
.footer-brand span { margin-left: .35rem; color: #73889a; font: 500 .55rem var(--font-mono); }
.footer p { margin: 0; text-align: center; }
.footer > a:last-child { color: var(--cyan); text-decoration: none; white-space: nowrap; }

@keyframes enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; gap: 2.5rem; }
  .signal-panel { max-width: 510px; }
  .intro::before { display: none; }
}

@media (max-width: 600px) {
  .topbar { height: 62px; padding-inline: 1rem; }
  .topbar-right { gap: .8rem; }
  .demo-state { font-size: .55rem; }
  .top-link { font-size: .65rem; }
  .version { display: none; }
  main { width: calc(100% - 2rem); }
  .intro { padding: 3.4rem 0 3rem; }
  .intro h1 { font-size: clamp(2.65rem, 13vw, 4.25rem); }
  .intro-actions { align-items: flex-start; flex-direction: column; gap: 1.1rem; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: .8rem; }
  .section-aside { max-width: 370px; }
  .step { grid-template-columns: 35px minmax(0, 1fr); gap: .8rem; }
  .step-tag { grid-column: 2; justify-self: start; grid-row: 2; margin-top: .15rem; }
  .step-content { grid-column: 2; }
  .step-rail { grid-row: 1 / span 2; }
  .step-rail .rail-line { min-height: 40px; }
  .grounding { padding: 1.5rem 1.2rem; }
  .grounding-grid { grid-template-columns: 1fr; }
  .reference-cta { align-items: flex-start; flex-direction: column; padding: 3rem 0; gap: 1.4rem; }
  .footer { align-items: flex-start; flex-direction: column; padding: 1.35rem 1rem; gap: .75rem; }
  .footer p { text-align: left; }
}

@media (max-width: 370px) {
  .demo-state { display: none; }
  .wordmark { gap: .5rem; }
  .signal-panel { padding-inline: .85rem; }
}