/* Vandelay Industries — a plausible B2B manufacturer site with an assistant
 * docked to it.
 *
 * The site itself has to be boring and credible: the demo is about the widget,
 * and a flashy host page would compete with it. Every claim on the page is also
 * a fact the assistant can cite, so the two never contradict each other.
 */

:root {
  --ink: #131a24;
  --muted: #5a6575;
  --line: #e3e7ed;
  --bg: #ffffff;
  --alt: #f5f7fa;
  --navy: #0d2242;
  --accent: #1663c7;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }
a { color: inherit; }

/* ------------------------------------------------------------------ nav -- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 26px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  /* Reserves the fixed language switch's corner. Measured: at 96px the quote
   * button cleared it by 9px, which reads as a collision even though it isn't. */
  padding-right: 112px;
}
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 650; font-size: 15px; }
.logo em { font-style: normal; font-weight: 400; color: var(--muted); }
.mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px; background: var(--navy); color: #fff;
  font-weight: 700; font-size: 15px;
}
.nav nav { display: flex; gap: 20px; margin-left: auto; }
.nav nav a { text-decoration: none; font-size: 14px; color: var(--muted); }
.nav nav a:hover { color: var(--ink); }
.cta {
  display: inline-block;
  background: var(--navy); color: #fff;
  text-decoration: none;
  font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: 8px;
  white-space: nowrap;
}
.cta:hover { background: #16305c; }

/* ----------------------------------------------------------------- hero -- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 28px 56px;
}
.eyebrow {
  margin: 0 0 14px;
  font: 600 11.5px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent);
}
.hero h1 { margin: 0 0 16px; font-size: clamp(30px, 4.4vw, 46px); font-weight: 680; max-width: 17ch; }
.lead { margin: 0 0 26px; font-size: 17px; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.linkish {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: 600 14px/1 var(--font-body); color: var(--accent); padding: 9px 2px;
}
.linkish:hover { text-decoration: underline; }

.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.stats li {
  border-left: 3px solid var(--navy);
  padding-left: 14px;
}
.stats strong { display: block; font-size: 24px; font-weight: 680; letter-spacing: -0.02em; }
.stats span { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- bands -- */
.band { max-width: 1080px; margin: 0 auto; padding: 56px 28px; }
.band.alt { max-width: none; background: var(--alt); border-block: 1px solid var(--line); }
.band.alt > * { max-width: 1080px; margin-inline: auto; }
.band h2 { margin: 0 0 26px; font-size: clamp(21px, 2.6vw, 27px); font-weight: 660; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px 20px;
  background: #fff;
}
.card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 640; }
.card p { margin: 0; font-size: 13.6px; color: var(--muted); }
.card .figure {
  display: block;
  margin-top: 12px;
  font: 600 12px/1 ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.contact p { font-size: 16px; color: var(--muted); max-width: 56ch; margin: 0 0 10px; }
.contact p.fineprint { font-size: 12.5px; }

.foot {
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  max-width: 1080px; margin: 0 auto;
  padding: 26px 28px 72px;
  font-size: 12.5px; color: var(--muted);
}

/* ------------------------------------------------------------- launcher -- */
.launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--navy); color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(13, 34, 66, 0.32);
  transition: transform 0.15s ease;
}
.launcher:hover { transform: translateY(-2px); }
.launcher svg { width: 25px; height: 25px; }
.launcher[aria-expanded="true"] { display: none; }
.pip {
  position: absolute; top: -2px; right: -2px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: #c9342b; color: #fff;
  font: 700 11px/1 var(--font-body);
  border: 2px solid #fff;
}
.pip.hide { display: none; }

/* ---------------------------------------------------------------- panel -- */
.panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 61;
  width: min(384px, calc(100vw - 40px));
  height: min(560px, calc(100vh - 40px));
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(13, 34, 66, 0.28);
  animation: rise 0.18s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } }
.panel[hidden] { display: none; }

.panel-head {
  flex: none;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 14px 14px 13px 16px;
  background: var(--navy); color: #fff;
}
.panel-head strong { display: block; font-size: 14.5px; font-weight: 620; }
.panel-head span { font-size: 11.8px; opacity: 0.76; }
.panel-head button {
  appearance: none; border: 0; background: rgba(255, 255, 255, 0.14);
  color: #fff; width: 26px; height: 26px; flex: none;
  border-radius: 7px; cursor: pointer; font-size: 17px; line-height: 1;
}
.panel-head button:hover { background: rgba(255, 255, 255, 0.26); }

.panel-log {
  flex: 1; overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.bub {
  max-width: 88%;
  font-size: 13.7px; line-height: 1.5;
  padding: 10px 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: pop 0.16s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .bub { animation: none; } }
.bub.bot  { align-self: flex-start; background: var(--alt); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bub.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }

.cite {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 9px; padding-top: 8px;
  border-top: 1px solid var(--line);
}
.cite a {
  font: 600 10.8px/1 var(--font-body);
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(22, 99, 199, 0.32);
  border-radius: 999px;
  padding: 4px 8px;
}
.cite a:hover { background: rgba(22, 99, 199, 0.08); }
.cite b { font: 600 10.8px/1 var(--font-body); color: var(--muted); align-self: center; margin-right: 2px; }

.dots { align-self: flex-start; display: inline-flex; gap: 3px; padding: 12px 13px;
        background: var(--alt); border: 1px solid var(--line); border-radius: 12px; border-bottom-left-radius: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #9aa6b4; animation: blink 1.15s infinite; }
.dots i:nth-child(2) { animation-delay: .18s; }
.dots i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%,60%,100% { opacity: .35 } 30% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: .6 } }

.panel-chips { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 2px; }
.panel-chips:empty { padding: 0; }
.panel-chips button {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line); background: #fff;
  color: var(--ink);
  font: 550 12.2px/1 var(--font-body);
  padding: 8px 10px; border-radius: 999px;
}
.panel-chips button:hover { border-color: var(--navy); }

.panel-compose { flex: none; display: flex; gap: 7px; padding: 10px 12px 8px; }
.panel-compose input {
  flex: 1; min-width: 0;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 14px;
  font: 400 13.6px/1.2 var(--font-body);
  color: var(--ink);
}
.panel-compose input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.panel-compose button {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--navy); color: #fff; cursor: pointer;
}
.panel-compose button svg { width: 18px; height: 18px; }
.panel-foot {
  flex: none; margin: 0;
  padding: 0 14px 12px;
  font-size: 10.8px; color: var(--muted);
}

/* --------------------------------------------------------------- narrow -- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; align-items: start; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .nav nav { display: none; }
}
@media (max-width: 560px) {
  .nav { padding: 12px 16px; padding-right: 92px; gap: 12px; }
  .nav .cta { display: none; }
  .band { padding: 40px 16px; }
  .hero { padding: 36px 16px 40px; }
  /* Full-bleed panel: a 384px card on a 390px screen is worse than a sheet. */
  .panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .foot { padding: 22px 16px 76px; }
}
