/* =====================================================================
   Skye Road Systems — AI Strategy & Engineering
   Design system derived from the SRS Brand Guide v0.1
   Palette 60/30/10 — Deep Navy (dominant) / Mist Gray (structure) / Signal Yellow (accent)
   ===================================================================== */

:root {
  /* Core palette */
  --navy-900: #11141D;
  --navy-800: #181d29;
  --navy-700: #212738;
  --navy-500: #4A5266;
  --navy-200: #8C93A3;
  --navy-50:  #DDE0E6;

  --yellow-50:  #FFF1DB;
  --yellow-200: #FFD08F;
  --yellow-500: #FF9A00;
  --yellow-700: #C77600;
  --yellow-900: #7A4900;

  --gray-0:   #FFFFFF;
  --gray-100: #F2F2F2;
  --gray-200: #E5E5E5;
  --gray-400: #B8B8B8;
  --gray-600: #7A7A7A;

  /* Semantic — LIGHT theme (dark "islands" opt back in via .on-dark) */
  --bg:        #F7F8FA;          /* off-white page */
  --bg-raised: #FFFFFF;          /* cards / raised surfaces */
  --surface:   #FFFFFF;
  --line:      rgba(33, 39, 56, 0.12);
  --line-strong: rgba(33, 39, 56, 0.22);
  --text:      var(--navy-900);  /* near-black navy for copy */
  --text-soft: #424a5c;          /* body text */
  --text-mute: #6b7385;          /* muted labels */
  --accent:    var(--yellow-500);          /* fills, shapes, large display */
  --accent-soft: var(--yellow-200);
  --accent-ink: #B06E00;         /* legible yellow for SMALL text on light */

  /* Type */
  --font-display: "Michroma", "Saira", "Eurostile", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", monospace;

  /* Scale (1.25 ratio) */
  --fs-display-xl: clamp(2.6rem, 6.2vw, 4.6rem);
  --fs-display-l:  clamp(2rem, 4.6vw, 3.2rem);
  --fs-h1: clamp(1.7rem, 3.2vw, 2.4rem);
  --fs-h2: clamp(1.4rem, 2.4vw, 1.85rem);
  --fs-h3: 1.35rem;
  --fs-body-l: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-caption: 0.75rem;

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 14px;
  --radius-sm: 9px;

  --shadow: 0 20px 48px -24px rgba(33, 39, 56, 0.28);
  --shadow-soft: 0 2px 10px -4px rgba(33, 39, 56, 0.12);
  --shadow-glow: 0 0 0 1px rgba(255, 154, 0, 0.30), 0 20px 60px -24px rgba(255, 154, 0, 0.28);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark "islands" on the light page — re-declare semantic tokens to dark.
   Any descendant using var(--bg/--text/--line/...) flips automatically. */
.on-dark {
  --bg:        var(--navy-900);
  --bg-raised: var(--navy-800);
  --surface:   var(--navy-700);
  --line:      rgba(140, 147, 163, 0.18);
  --line-strong: rgba(140, 147, 163, 0.32);
  --text:      var(--gray-100);
  --text-soft: #aab0bd;
  --text-mute: var(--navy-200);
  --accent-ink: var(--yellow-500);   /* bright yellow reads fine on dark */
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  color: var(--text);                /* so headings (which inherit color) flip light */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle engineered grid + glow backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(64rem 42rem at 82% -10%, rgba(255, 154, 0, 0.22), transparent 60%),
    radial-gradient(50rem 50rem at -5% 105%, rgba(255, 154, 0, 0.10), transparent 55%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(33,39,56,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33,39,56,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 80%);
  pointer-events: none;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { position: relative; }
.section-pad { padding-block: clamp(4.5rem, 10vw, 8rem); }

/* ---------- Type helpers ---------- */
.display { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.05; }
h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem; height: 2px;
  background: var(--accent);
  display: inline-block;
}
.lead { font-size: var(--fs-body-l); color: var(--text-soft); max-width: 56ch; }
.accent { color: var(--accent); }
.muted { color: var(--text-mute); }

/* ---------- Buttons ---------- */
.btn {
  --bg-btn: var(--accent);
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: var(--navy-900); box-shadow: 0 10px 30px -12px rgba(255,154,0,0.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(255,154,0,0.7); background: #ffa61c; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(247, 248, 250, 0.86);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 76px; }
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img, .nav-logo svg { height: 40px; width: auto; }
.footer-brand img { height: 64px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { font-size: 0.92rem; color: var(--text-soft); transition: color 0.2s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0; background: var(--accent); transition: width 0.25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0.5rem; cursor: pointer; color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: var(--fs-display-xl); margin-block: 1.4rem 1.3rem; }
.hero h1 .display { display: block; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 48ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero-trust { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; align-items: center; color: var(--text-mute); font-size: var(--fs-small); }
.hero-trust .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 0.5rem; vertical-align: middle; }

/* Hero visual: the AI assistant, in action */
.hero-visual {
  position: relative; border-radius: var(--radius);
  background:
    radial-gradient(30rem 18rem at 80% -10%, rgba(255,154,0,0.12), transparent 60%),
    linear-gradient(160deg, var(--navy-700), var(--navy-900));
  border: 1px solid var(--line); overflow: hidden;
  box-shadow: var(--shadow);
  padding: 1.35rem;
  display: flex;
}
.assistant-mock { flex: 1; display: flex; flex-direction: column; gap: 0.9rem; min-height: 24rem; }
.am-head { display: flex; align-items: center; gap: 0.7rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.am-avatar { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: var(--navy-900); display: grid; place-items: center; flex: none; }
.am-name { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.am-status { font-size: 0.72rem; color: var(--text-mute); display: flex; align-items: center; gap: 0.4rem; }
.am-live { width: 7px; height: 7px; border-radius: 50%; background: #46d39a; animation: ping 2s var(--ease) infinite; }
.am-body { flex: 1; display: flex; flex-direction: column; gap: 0.75rem; justify-content: center; padding: 0.4rem 0; }
.am-msg { max-width: 90%; padding: 0.75rem 0.95rem; border-radius: 14px; font-size: 0.92rem; line-height: 1.5; }
.am-msg.user { align-self: flex-end; background: var(--accent); color: var(--navy-900); border-top-right-radius: 4px; font-weight: 500; }
.am-msg.bot { align-self: flex-start; background: rgba(140,147,163,0.12); border: 1px solid var(--line); color: var(--text); border-top-left-radius: 4px; }
.am-msg.bot strong { color: var(--accent); font-weight: 700; }
.am-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; }
.am-btn { font-size: 0.78rem; font-weight: 600; padding: 0.42rem 0.85rem; border-radius: 100px; white-space: nowrap; }
.am-btn.primary { background: var(--accent); color: var(--navy-900); }
.am-btn.ghost { background: transparent; color: var(--text-soft); border: 1px solid var(--line-strong); }
.am-foot { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--text-mute); padding-top: 0.85rem; border-top: 1px solid var(--line); }
.am-foot svg { color: #46d39a; flex: none; }

/* ---------- Logos / credibility strip ---------- */
.cred { border-block: 1px solid var(--line); }
.cred-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; padding-block: 1.5rem; }
.cred-label { font-family: var(--font-mono); font-size: var(--fs-caption); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-mute); }
.cred-items { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.cred-items span { font-size: var(--fs-small); color: var(--text-soft); display: inline-flex; align-items: center; gap: 0.5rem; }
.cred-items span::before { content: "▹"; color: var(--accent); }

/* ---------- Section heading ---------- */
.sec-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.sec-head h2 { font-size: var(--fs-display-l); margin-top: 1rem; }
.sec-head .lead { margin-top: 1.1rem; }

/* ---------- Problem / belief ---------- */
.belief-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.belief {
  padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-raised); box-shadow: var(--shadow-soft);
}
.belief .q { font-family: var(--font-mono); color: var(--accent-ink); font-size: 0.8rem; letter-spacing: 0.1em; }
.belief h3 { font-size: 1.15rem; margin-block: 0.75rem 0.5rem; }
.belief p { color: var(--text-soft); font-size: var(--fs-small); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.service {
  position: relative; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-raised); overflow: hidden; box-shadow: var(--shadow-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.service::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent);
  transform: scaleY(0); transform-origin: top; transition: transform 0.35s var(--ease);
}
.service:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.service:hover::before { transform: scaleY(1); }
.service .ix { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-ink); letter-spacing: 0.1em; }
.service h3 { font-size: 1.3rem; margin-block: 0.9rem 0.7rem; }
.service p { color: var(--text-soft); font-size: var(--fs-small); }
.service ul { list-style: none; margin-top: 1rem; display: grid; gap: 0.5rem; }
.service li { font-size: var(--fs-small); color: var(--text-mute); display: flex; gap: 0.6rem; }
.service li::before { content: "—"; color: var(--accent); }

/* ---------- Process / road ---------- */
.process { position: relative; }
.process-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; position: relative; }
.process-track::before {
  content: ""; position: absolute; top: 26px; left: 6%; right: 6%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 28px);
  opacity: 0.5;
}
.step { position: relative; }
.step .node {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.1rem; color: var(--navy-900);
  background: var(--accent); position: relative; z-index: 1;
  box-shadow: 0 0 0 6px var(--bg);
}
.step h3 { font-size: 1.1rem; margin-block: 1.1rem 0.5rem; }
.step p { font-size: var(--fs-small); color: var(--text-soft); }

/* ---------- Use cases ---------- */
.usecases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.usecase {
  padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); box-shadow: var(--shadow-soft);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.usecase:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); }
.usecase .ic { width: 38px; height: 38px; color: var(--accent-ink); margin-bottom: 0.9rem; }
.usecase h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.usecase p { font-size: var(--fs-small); color: var(--text-soft); }

/* ---------- Why us / split ---------- */
.why-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.why-list { display: grid; gap: 1rem; }
.why-item { display: flex; gap: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); box-shadow: var(--shadow-soft); }
.why-item .ic { flex: none; width: 26px; height: 26px; color: var(--accent-ink); margin-top: 2px; }
.why-item h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.why-item p { font-size: var(--fs-small); color: var(--text-soft); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0.75rem; max-width: 820px; margin-inline: auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); overflow: hidden; box-shadow: var(--shadow-soft); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer; color: var(--text);
  font-family: var(--font-body); font-size: 1.02rem; font-weight: 600;
  padding: 1.15rem 1.35rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-q:hover { color: var(--accent); }
.faq-q .chev { flex: none; transition: transform 0.3s var(--ease); color: var(--accent); }
.faq-item[open] .faq-q .chev { transform: rotate(45deg); }
.faq-a { padding: 0 1.35rem 1.25rem; color: var(--text-soft); font-size: var(--fs-small); max-width: 70ch; }

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid var(--line-strong); border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(40rem 20rem at 85% -20%, rgba(255,154,0,0.18), transparent 60%),
    linear-gradient(160deg, var(--navy-700), var(--navy-900));
  padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; overflow: hidden; position: relative;
}
.cta-band h2 { font-size: var(--fs-display-l); max-width: 22ch; margin-inline: auto; }
.cta-band .lead { margin-inline: auto; margin-top: 1rem; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 3.5rem 2.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid p { color: var(--text-soft); font-size: var(--fs-small); max-width: 34ch; margin-top: 1rem; }
.footer-col h4 { font-family: var(--font-mono); font-size: var(--fs-caption); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: grid; gap: 0.6rem; }
.footer-col a { font-size: var(--fs-small); color: var(--text-soft); transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--text-mute); font-size: var(--fs-caption); font-family: var(--font-mono); letter-spacing: 0.04em; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* =====================================================================
   AI Responder — floating widget + panel
   ===================================================================== */
.chat-fab {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 60;
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--accent); color: var(--navy-900); font-weight: 600; font-size: 0.92rem;
  border: none; border-radius: 100px; padding: 0.85rem 1.3rem; cursor: pointer;
  box-shadow: 0 14px 36px -10px rgba(255,154,0,0.6);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -10px rgba(255,154,0,0.75); }
.chat-fab .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--navy-900); position: relative; }
.chat-fab .pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--navy-900); opacity: 0.5; animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(0.8); opacity: 0.6; } 100% { transform: scale(2.2); opacity: 0; } }

.chat-panel {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 61;
  width: min(400px, calc(100vw - 2rem)); height: min(620px, calc(100vh - 2rem));
  display: flex; flex-direction: column;
  background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(0.98); pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.chat-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.chat-head { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--navy-700); }
.chat-head .avatar { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: var(--navy-900); flex: none; }
.chat-head h3 { font-size: 0.98rem; }
.chat-head .status { font-size: 0.72rem; color: var(--text-mute); display: flex; align-items: center; gap: 0.4rem; }
.chat-head .status .live { width: 7px; height: 7px; border-radius: 50%; background: #46d39a; box-shadow: 0 0 0 0 rgba(70,211,154,0.5); animation: ping 2s infinite; }
.chat-close { margin-left: auto; background: none; border: none; color: var(--text-mute); cursor: pointer; padding: 0.3rem; border-radius: 6px; }
.chat-close:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.chat-log { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.85rem; scrollbar-width: thin; }
.msg { max-width: 85%; padding: 0.75rem 0.95rem; border-radius: 13px; font-size: 0.9rem; line-height: 1.55; white-space: pre-wrap; }
.msg.bot { background: var(--navy-700); border: 1px solid var(--line); border-top-left-radius: 4px; align-self: flex-start; color: var(--text); white-space: normal; }
.msg.user { background: var(--accent); color: var(--navy-900); border-top-right-radius: 4px; align-self: flex-end; font-weight: 500; }
/* Rendered markdown inside bot replies */
.msg.bot p { margin: 0 0 0.5rem; }
.msg.bot p:last-child { margin-bottom: 0; }
.msg.bot ul, .msg.bot ol { margin: 0.35rem 0 0.55rem; padding-left: 1.25rem; }
.msg.bot ul:last-child, .msg.bot ol:last-child { margin-bottom: 0; }
.msg.bot li { margin-bottom: 0.25rem; }
.msg.bot li:last-child { margin-bottom: 0; }
.msg.bot strong { font-weight: 700; }
.msg.bot code { background: rgba(255,255,255,0.08); padding: 0.05rem 0.32rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85em; }
.msg.bot a { color: var(--accent); text-decoration: underline; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.1rem 0.5rem; }
.chip { font-size: 0.78rem; color: var(--text-soft); background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 100px; padding: 0.45rem 0.8rem; cursor: pointer; transition: all 0.2s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-mute); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.chat-form { display: flex; gap: 0.5rem; padding: 0.85rem; border-top: 1px solid var(--line); background: var(--navy-800); }
.chat-form textarea {
  flex: 1; resize: none; background: var(--navy-900); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-family: var(--font-body); font-size: 0.9rem; padding: 0.6rem 0.75rem; max-height: 110px; line-height: 1.4;
}
.chat-form textarea:focus { outline: none; border-color: var(--accent); }
.chat-send { flex: none; width: 42px; height: 42px; border-radius: 10px; border: none; background: var(--accent); color: var(--navy-900); cursor: pointer; display: grid; place-items: center; transition: transform 0.2s, opacity 0.2s; }
.chat-send:hover { transform: translateY(-1px); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-foot { text-align: center; font-size: 0.68rem; color: var(--text-mute); padding: 0.4rem; background: var(--navy-800); }

/* ---------- Responsive ---------- */
/* Tighten nav spacing in the tablet band so 5 items stay on one line each. */
@media (max-width: 980px) and (min-width: 641px) {
  .nav-links { gap: 1.15rem; }
  .nav-links a { white-space: nowrap; font-size: 0.88rem; }
  .nav-cta { gap: 0.5rem; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; order: -1; }
  .belief-grid, .usecases { grid-template-columns: 1fr 1fr; }
  .services { grid-template-columns: 1fr; }
  .process-track { grid-template-columns: 1fr 1fr; gap: 2rem 1.25rem; }
  .process-track::before { display: none; }
  .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  /* Collapse nav to logo + hamburger; the floating FAB carries "Ask our AI". */
  .nav-links, .nav-cta .btn { display: none; }
  .nav .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0;
    background: rgba(17,20,29,0.97); border-bottom: 1px solid var(--line); padding: 1.5rem var(--gutter); gap: 1.25rem; backdrop-filter: blur(12px);
  }
  .belief-grid, .usecases, .process-track, .footer-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 100%; }
  .assistant-mock { min-height: 21rem; }
}
