/* ============================================================
   BuildMeAI LegalOS — Enterprise AI for Law Firms
   Ivory paper · navy ink · royal blue · serif display
   ============================================================ */

:root {
  --paper: #ffffff;
  --paper-2: #f6f8fd;
  --card: #ffffff;
  --ink: #0b1220;
  --navy: #0a1633;
  --navy-2: #10224d;
  --body: #47526b;
  --muted: #7a86a0;
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.09);
  --gold: #b8860b;
  --line: rgba(10, 22, 51, 0.09);
  --line-strong: rgba(10, 22, 51, 0.14);

  --grad-brand: linear-gradient(120deg, #1e3a8a 0%, #2563eb 55%, #4f8cff 100%);
  --grad-text: linear-gradient(100deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
  --grad-text-light: linear-gradient(100deg, #93c5fd, #60a5fa 50%, #a5c8ff);

  --shadow-sm: 0 1px 2px rgba(10, 22, 51, 0.05), 0 4px 12px rgba(10, 22, 51, 0.05);
  --shadow-md: 0 2px 6px rgba(10, 22, 51, 0.05), 0 16px 40px -12px rgba(10, 22, 51, 0.14);
  --shadow-lg: 0 4px 12px rgba(10, 22, 51, 0.06), 0 32px 80px -24px rgba(10, 22, 51, 0.28);

  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* BuildMeAI design language: Inter everywhere (was Fraunces serif) */
  --serif: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; }
::selection { background: rgba(36, 86, 230, 0.16); }

.container { width: min(1180px, 100% - 48px); margin-inline: auto; }

/* ---------- Type ---------- */
h1, h2 {
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--navy);
}
h1 em, h2 em {
  font-style: normal;
  font-weight: inherit;
  background: var(--grad-text);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
/* Light gradient variant inside dark panels */
.sec-head h2 em, .cta-panel h2 em {
  background: var(--grad-text-light);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}
.kicker-light { color: #9db9ff; }

/* ---------- Pill ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
}
.pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 86, 230, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(36, 86, 230, 0.16); }
  50% { box-shadow: 0 0 0 6px rgba(36, 86, 230, 0.07); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn-icon { width: 17px; height: 17px; transition: transform 0.35s var(--ease); }
.btn:hover .btn-icon { transform: translateX(3px); }

.btn-primary {
  position: relative;
  overflow: hidden;
  padding: 14px 28px;
  color: #fff;
  background: var(--grad-brand);
  background-size: 150% 150%;
  box-shadow: 0 8px 24px -8px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.35) 50%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.75s var(--ease);
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(130%); }
.btn-primary:hover {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow: 0 14px 32px -8px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #fff;
}

.btn-secondary {
  padding: 14px 28px;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--navy); background: rgba(255, 255, 255, 0.6); }

.btn-light {
  padding: 15px 30px;
  color: var(--navy);
  background: var(--paper);
  box-shadow: 0 14px 36px -10px rgba(2, 8, 30, 0.6);
}
.btn-light:hover { transform: translateY(-2px); background: #fff; }

.btn-outline {
  padding: 15px 30px;
  color: #cfe0ff;
  background: transparent;
  border: 1px solid rgba(157, 185, 255, 0.35);
}
.btn-outline:hover { border-color: rgba(157, 185, 255, 0.7); background: rgba(157, 185, 255, 0.07); }

.btn-sm { padding: 10px 22px; font-size: 0.875rem; }
.btn-lg { padding: 16px 34px; font-size: 1rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 16px 0;
  border-bottom: 1px solid transparent;
  transition: padding 0.35s var(--ease), background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.nav.scrolled {
  padding: 9px 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 34px -18px rgba(16, 22, 46, 0.14);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--navy);
  color: #c8d8ff;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px -8px rgba(10, 22, 51, 0.55);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { font-size: 0.66rem; font-weight: 550; color: var(--muted); letter-spacing: 0.03em; }
.nav .brand-text, footer .footer-brand strong {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.nav-links { display: flex; gap: 2px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--body);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--navy); background: rgba(16, 22, 46, 0.05); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
}
.nav-toggle span { width: 16px; height: 2px; margin-inline: auto; border-radius: 2px; background: var(--navy); transition: transform 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 172px 0 40px; overflow: clip; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-arc {
  position: absolute;
  left: 50%; top: -46%;
  width: 1400px; height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(37, 99, 235, 0.12), rgba(96, 165, 250, 0.06) 45%, transparent 70%);
}
.hero-copy { text-align: center; max-width: 820px; margin: 0 auto; }
.hero h1 {
  margin: 30px 0 24px;
  font-size: clamp(2.7rem, 6vw, 4.8rem);
}
.hero-sub {
  max-width: 40rem;
  margin: 0 auto;
  font-size: clamp(1.05rem, 1.5vw, 1.19rem);
  color: var(--body);
  line-height: 1.7;
}
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 38px; }
.hero-note {
  margin-top: 26px;
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* --- Hero product shot --- */
.hero-shot { position: relative; margin-top: 74px; perspective: 1600px; }
/* transform is driven by JS (settle-on-scroll); no CSS transition to avoid fighting it */
.shot {
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotateX(4deg);
  transform-origin: center top;
  will-change: transform;
}
.shot-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8faff;
}
.shot-chrome .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.shot-url {
  margin-left: 12px;
  padding: 4px 16px;
  border-radius: 999px;
  background: rgba(16, 22, 46, 0.045);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.shot-body { display: grid; grid-template-columns: 168px 1fr 218px; min-height: 420px; }

.shot-side {
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: #f8faff;
}
.shot-logo { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; color: var(--navy); padding: 4px 12px 18px; letter-spacing: 0.05em; }
.shot-nav { display: flex; flex-direction: column; gap: 2px; }
.shot-nav span { padding: 8px 12px; border-radius: 8px; font-size: 0.76rem; font-weight: 550; color: var(--muted); }
.shot-nav span.active { background: var(--blue-soft); color: var(--blue); }
.shot-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--navy);
}
.shot-user small { display: block; font-size: 0.6rem; font-weight: 500; color: var(--muted); }
.shot-user i {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #c8d8ff;
  font-style: normal;
  font-size: 0.58rem;
  font-weight: 700;
}

.shot-main { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.shot-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shot-head h4 { font-family: var(--sans); font-size: 1.1rem; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }
.shot-head small { font-size: 0.68rem; color: var(--muted); }
.shot-search {
  padding: 6px 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
  background: #f8faff;
}

.shot-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.skpi {
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f9fbff;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.skpi small { font-size: 0.6rem; font-weight: 550; color: var(--muted); }
.skpi strong { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); font-variant-numeric: tabular-nums; }
.skpi span { font-size: 0.58rem; font-weight: 650; }
.skpi .up { color: #0f7b52; }
.skpi .warn { color: #b45309; }

.shot-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.strow {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.9fr 0.8fr;
  gap: 10px;
  align-items: center;
  padding: 10px 15px;
  font-size: 0.71rem;
  font-weight: 550;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.strow:last-child { border-bottom: none; }
.strow.head {
  background: #f8faff;
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.strow span:nth-child(2), .strow span:nth-child(4) { color: var(--muted); font-weight: 500; }

.st {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.03em;
}
.st-blue { background: rgba(36, 86, 230, 0.1); color: var(--blue); }
.st-amber { background: rgba(180, 83, 9, 0.1); color: #b45309; }
.st-green { background: rgba(15, 123, 82, 0.1); color: #0f7b52; }

.shot-copilot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 14px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, #f8faff, #eef2fb);
}
.scp-head { font-size: 0.72rem; font-weight: 700; color: var(--navy); letter-spacing: 0.02em; }
.scp-msg {
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid rgba(36, 86, 230, 0.18);
  background: #fff;
  font-size: 0.66rem;
  line-height: 1.55;
  color: var(--body);
}
.scp-msg u { color: var(--blue); text-decoration-color: rgba(36, 86, 230, 0.4); font-weight: 600; }
.scp-chip {
  align-self: flex-start;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--navy);
  color: #c8d8ff;
  font-size: 0.62rem;
  font-weight: 650;
}

/* --- floating cards --- */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 17px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.95);
  outline: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  animation: floaty 7s ease-in-out infinite;
  will-change: transform;
}
.float-card strong { display: block; font-size: 0.76rem; font-weight: 650; color: var(--navy); }
.float-card span:not(.fc-ico) { font-size: 0.65rem; color: var(--muted); font-weight: 500; }
.fc-ico { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; flex-shrink: 0; }
.fc-ico svg { width: 17px; height: 17px; }
.fc-ico.ok { background: rgba(15, 123, 82, 0.1); color: #0f7b52; }
.fc-ico.cal { background: var(--blue-soft); color: var(--blue); }
.fc-a { top: -24px; right: 4%; }
.fc-b { bottom: 10%; left: -20px; animation-delay: 0.9s; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -11px; } }

/* ---------- Firms ---------- */
.firms { padding: 88px 0 30px; }
.firms-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 30px;
}
.firms-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 56px;
}
.firms-row span {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #97a1b8;
  transition: color 0.3s ease;
}
.firms-row span:hover { color: var(--navy); }

/* ---------- Stats band ---------- */
.stats-band { padding: 74px 0 30px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  padding: 40px 0;
  border-block: 1px solid var(--line);
}
.stat { text-align: center; padding: 0 12px; }
.stat strong {
  display: block;
  font-family: var(--sans);
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.stat span { font-size: 0.84rem; color: var(--body); line-height: 1.5; display: inline-block; max-width: 15rem; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-head { max-width: 660px; margin-bottom: 64px; }
.section-head h2, .deep h2, .sec-head h2, .cta h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 20px;
}
.section-head p { font-size: 1.05rem; color: var(--body); max-width: 36rem; }

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.b-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 30px 28px 26px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s ease;
}
.b-card:hover {
  transform: translateY(-5px);
  border-color: rgba(36, 86, 230, 0.28);
  box-shadow: var(--shadow-md);
}
.b-lg { grid-column: span 6; }
.b-md { grid-column: span 4; }
.b-sm { grid-column: span 3; }

.b-card h3 {
  font-family: var(--sans);
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--navy);
  margin-bottom: 8px;
}
.b-sm h3, .b-md h3 { font-size: 1.16rem; }
.b-card p { font-size: 0.875rem; color: var(--body); line-height: 1.62; }
.b-visual { margin-top: auto; }

/* mini visuals */
.chat-mini { display: flex; flex-direction: column; gap: 9px; }
.cm-msg { padding: 11px 14px; border-radius: 12px; font-size: 0.74rem; line-height: 1.55; }
.cm-msg.user { align-self: flex-end; max-width: 78%; background: var(--navy); color: #dbe6ff; border-bottom-right-radius: 4px; }
.cm-msg.ai { background: #f8f6f0; border: 1px solid var(--line); color: var(--body); border-bottom-left-radius: 4px; }
.cm-msg.ai b { color: var(--navy); }
.cm-cite {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.6rem;
  font-weight: 700;
}

.doc-mini { display: flex; flex-direction: column; gap: 9px; padding: 18px; border-radius: 14px; background: #f8f6f0; border: 1px solid var(--line); }
.dm-line { height: 8px; border-radius: 4px; background: rgba(16, 22, 46, 0.1); }
.dm-line.w85 { width: 85%; } .dm-line.w80 { width: 80%; } .dm-line.w70 { width: 70%; }
.dm-redline {
  padding: 9px 12px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid rgba(36, 86, 230, 0.3);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--body);
}
.dm-redline del { color: #b91c1c; text-decoration-color: rgba(185, 28, 28, 0.5); }
.dm-redline ins { color: var(--blue); text-decoration: none; font-weight: 600; }
.dm-redline i {
  float: right;
  font-style: normal;
  font-size: 0.56rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--navy);
  color: #c8d8ff;
}
.dm-actions { display: flex; gap: 8px; }
.dm-actions span {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.66rem;
  font-weight: 650;
  color: var(--body);
}
.dm-actions .accept { background: var(--navy); border-color: var(--navy); color: #fff; }

.list-mini { display: flex; flex-direction: column; gap: 7px; }
.list-mini span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f9fbff;
  font-size: 0.72rem;
  font-weight: 550;
  color: var(--ink);
}

.client-mini { display: flex; flex-direction: column; gap: 7px; }
.cl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f9fbff;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--navy);
}
.cl-row em { margin-left: auto; font-style: normal; font-size: 0.62rem; font-weight: 550; color: var(--muted); }
.cl-av {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: #c8d8ff;
  font-style: normal;
  font-size: 0.56rem;
  font-weight: 700;
}
.cl-av.a2 { background: var(--blue); color: #fff; }

.file-mini { display: flex; flex-direction: column; gap: 7px; }
.f-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f9fbff;
  font-size: 0.7rem;
  font-weight: 550;
  color: var(--ink);
}
.f-row em { margin-left: auto; font-style: normal; font-size: 0.6rem; color: var(--muted); font-family: var(--mono); }
.f-row i {
  font-style: normal;
  font-size: 0.52rem;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(185, 28, 28, 0.09);
  color: #b91c1c;
  letter-spacing: 0.04em;
}
.f-row i.dx { background: var(--blue-soft); color: var(--blue); }

.kb-mini .kb-q {
  display: block;
  padding: 11px 15px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.cal-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.cal-mini span {
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f9fbff;
  font-size: 0.54rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.cal-mini .ev { background: var(--navy); border-color: var(--navy); color: #c8d8ff; }
.cal-mini .ev2 { background: var(--blue-soft); border-color: rgba(36, 86, 230, 0.25); color: var(--blue); }

.portal-mini small { display: block; margin-top: 8px; font-size: 0.62rem; color: var(--muted); }
.pt-bar { height: 9px; border-radius: 999px; background: rgba(16, 22, 46, 0.07); overflow: hidden; }
.pt-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy), var(--blue)); }

.bars-mini { display: flex; align-items: flex-end; gap: 7px; height: 62px; }
.bars-mini i { flex: 1; border-radius: 5px 5px 2px 2px; background: rgba(16, 22, 46, 0.12); }
.bars-mini i.hot { background: linear-gradient(180deg, var(--blue), var(--navy)); }

/* ---------- Deep dives ---------- */
.deep { padding-block: 90px; }
.deep-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.deep-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.deep-copy p { font-size: 1.02rem; color: var(--body); line-height: 1.7; max-width: 32rem; }
.deep-list { margin-top: 26px; display: flex; flex-direction: column; gap: 13px; }
.deep-list li {
  position: relative;
  padding-left: 30px;
  font-size: 0.93rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.55;
}
.deep-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--blue-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4.5 8.5 2.5 2.5 4.5-5.5' stroke='%232456e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Copilot panel (dark) */
.copilot-panel {
  border-radius: 20px;
  padding: 22px;
  background: linear-gradient(165deg, var(--navy), var(--navy-2));
  box-shadow: 0 40px 90px -30px rgba(10, 22, 51, 0.55);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.cp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 650;
  color: #e2eaff;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(157, 185, 255, 0.14);
}
.cp-spark { color: #9db9ff; }
.cp-scope {
  margin-left: auto;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(157, 185, 255, 0.1);
  font-size: 0.6rem;
  font-weight: 600;
  color: #9db9ff;
}
.cp-msg { border-radius: 13px; font-size: 0.78rem; line-height: 1.6; }
.cp-msg.user {
  align-self: flex-end;
  max-width: 82%;
  padding: 11px 15px;
  background: rgba(36, 86, 230, 0.32);
  color: #e2eaff;
  border-bottom-right-radius: 4px;
}
.cp-msg.ai {
  padding: 14px 15px;
  background: rgba(157, 185, 255, 0.07);
  border: 1px solid rgba(157, 185, 255, 0.12);
  color: #b9c7e8;
  border-bottom-left-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cp-msg.ai b { color: #fff; }
.cp-table { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.cp-table span {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(157, 185, 255, 0.07);
  border: 1px solid rgba(157, 185, 255, 0.1);
  font-size: 0.62rem;
  font-weight: 550;
  color: #9db9ff;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cp-table em { font-style: normal; font-weight: 700; color: #fff; font-size: 0.72rem; }
.cp-foot { color: #e2eaff; font-weight: 550; }
.cp-actions { display: flex; gap: 8px; }
.cp-actions span {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(157, 185, 255, 0.22);
  font-size: 0.68rem;
  font-weight: 650;
  color: #cfe0ff;
}
.cp-actions .primary { background: #fff; border-color: #fff; color: var(--navy); }

/* Editor panel (light) */
.editor-panel {
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.ed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8faff;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--navy);
}
.ed-badge {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.ed-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 13px; }
.ed-body p { font-size: 0.8rem; line-height: 1.65; color: var(--body); }
.ed-h { font-weight: 700; letter-spacing: 0.05em; color: var(--navy) !important; font-size: 0.74rem !important; }
.ed-change {
  padding: 12px 14px;
  border-radius: 11px;
  background: rgba(36, 86, 230, 0.05);
  border: 1px solid rgba(36, 86, 230, 0.28);
  color: var(--ink) !important;
}
.ed-change del { color: #b91c1c; text-decoration-color: rgba(185, 28, 28, 0.5); }
.ed-change ins { color: var(--blue); font-weight: 600; text-decoration: none; }
.ed-tag { display: block; margin-top: 8px; font-size: 0.64rem; font-weight: 650; color: var(--blue); }
.ed-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 15px 20px; border-top: 1px solid var(--line); background: #f8faff; }
.ed-foot span {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--body);
}
.ed-foot .accept { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Security ---------- */
.security { padding-block: 60px 110px; }
.sec-panel {
  position: relative;
  border-radius: var(--r-xl);
  padding: clamp(44px, 6vw, 80px) clamp(24px, 5vw, 72px);
  background: linear-gradient(165deg, #081128, var(--navy) 55%, var(--navy-2));
  overflow: hidden;
  box-shadow: 0 50px 120px -34px rgba(6, 13, 33, 0.6);
}
.sec-glow {
  position: absolute;
  width: 700px; height: 700px;
  top: -380px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(36, 86, 230, 0.28), rgba(36, 86, 230, 0.09) 40%, transparent 65%);
  pointer-events: none;
}
.sec-head { position: relative; text-align: center; max-width: 640px; margin: 0 auto 52px; }
.sec-head h2 { color: #f5f7ff; }
.sec-head h2 em { color: #9db9ff; }
.sec-head p { color: #9dabce; font-size: 1.04rem; line-height: 1.7; }
.sec-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.sec-card {
  padding: 26px 24px;
  border-radius: 18px;
  background: rgba(157, 185, 255, 0.05);
  border: 1px solid rgba(157, 185, 255, 0.12);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease);
}
.sec-card:hover {
  background: rgba(157, 185, 255, 0.09);
  border-color: rgba(157, 185, 255, 0.24);
  transform: translateY(-3px);
}
.sec-card h4 {
  font-family: var(--sans);
  font-size: 1.04rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #eef2fb;
  margin-bottom: 9px;
}
.sec-card p { font-size: 0.83rem; line-height: 1.62; color: #9dabce; }
.sec-badges {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 44px;
}
.sec-badges span {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(157, 185, 255, 0.2);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: #cfe0ff;
}

/* ---------- Quotes ---------- */
.quotes { padding-block: 100px 60px; }
.quotes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.q-card {
  padding: 42px 40px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 30px;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.q-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.q-card blockquote {
  font-family: var(--sans);
  font-size: clamp(1.08rem, 1.6vw, 1.26rem);
  font-weight: 550;
  line-height: 1.55;
  letter-spacing: -0.015em;
  color: var(--navy);
  flex: 1;
}
.q-card figcaption { display: flex; align-items: center; gap: 14px; }
.q-av {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: #c8d8ff;
  font-size: 0.8rem;
  font-weight: 700;
}
.q-av2 { background: var(--blue); color: #fff; }
.q-card figcaption strong { display: block; font-size: 0.92rem; font-weight: 650; color: var(--navy); }
.q-card figcaption div span { font-size: 0.78rem; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { padding-block: 50px 110px; }
.cta-panel {
  position: relative;
  border-radius: var(--r-xl);
  padding: clamp(56px, 8vw, 100px) clamp(24px, 6vw, 80px);
  text-align: center;
  background: linear-gradient(165deg, #081128, var(--navy) 55%, var(--navy-2));
  overflow: hidden;
  box-shadow: 0 50px 120px -34px rgba(6, 13, 33, 0.65);
}
.cta-glow {
  position: absolute;
  width: 640px; height: 640px;
  bottom: -420px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(36, 86, 230, 0.36), rgba(36, 86, 230, 0.12) 40%, transparent 65%);
  pointer-events: none;
}
.cta-panel h2 { position: relative; color: #f5f7ff; margin-bottom: 20px; }
.cta-panel h2 em { color: #9db9ff; }
.cta-panel > p {
  position: relative;
  max-width: 32rem;
  margin: 0 auto 38px;
  color: #9dabce;
  font-size: 1.05rem;
  line-height: 1.7;
}
.cta-actions { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cta-note {
  position: relative;
  margin-top: 30px;
  font-size: 0.78rem;
  font-weight: 550;
  color: #6d7ea8;
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */
.footer { padding: 44px 0; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand div { display: flex; flex-direction: column; line-height: 1.3; }
.footer-brand span { font-size: 0.76rem; color: var(--muted); }
.footer-brand span a { color: var(--blue); font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer-links a { font-size: 0.86rem; font-weight: 500; color: var(--body); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--navy); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 0.9s var(--ease), translate 0.9s var(--ease);
}
.reveal.in { opacity: 1; translate: 0 0; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.bento .reveal { transition-delay: calc(var(--stagger, 0) * 70ms); }
.sec-grid .reveal { transition-delay: calc(var(--stagger, 0) * 70ms); }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .b-lg { grid-column: span 12; }
  .b-md { grid-column: span 4; }
  .b-sm { grid-column: span 6; }
  .deep-grid { grid-template-columns: 1fr; gap: 48px; }
  .deep-grid.flip .deep-visual { order: 2; }
  .sec-grid { grid-template-columns: 1fr 1fr; }
  .quotes-grid { grid-template-columns: 1fr; max-width: 680px; margin-inline: auto; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 34px 22px; }
  .shot-copilot { display: none; }
  .shot-body { grid-template-columns: 168px 1fr; }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    position: fixed;
    top: 68px;
    left: 16px; right: 16px;
    flex-direction: column;
    padding: 12px;
    border-radius: var(--r-md);
    background: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }
  .nav-links.open a { padding: 13px 16px; font-size: 1rem; }

  .section { padding: 78px 0; }
  .hero { padding-top: 140px; }
  .b-md { grid-column: span 12; }
  .b-sm { grid-column: span 6; }
  .shot-side { display: none; }
  .shot-body { grid-template-columns: 1fr; min-height: 0; }
  .shot-kpis { grid-template-columns: 1fr 1fr; }
  .strow { grid-template-columns: 1.5fr 0.9fr 0.8fr; }
  .strow span:nth-child(2) { display: none; }
  .fc-a { top: -20px; right: 0; }
  .fc-b { bottom: 6%; left: 0; }
}

@media (max-width: 620px) {
  .container { width: calc(100% - 36px); }
  .hero-ctas .btn, .cta-actions .btn { width: 100%; }
  .b-sm { grid-column: span 12; }
  .sec-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .q-card { padding: 32px 26px; }
  .firms-row { gap: 14px 32px; }
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 300;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
  pointer-events: none;
}

/* ---------- Mobile performance: no expensive glass on small screens ---------- */
@media (max-width: 820px) {
  .nav.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.98);
  }
  .nav-links.open { backdrop-filter: none; background: #ffffff; }
  .hero-shot { perspective: none; }
  .shot { transform: none !important; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; translate: 0 0; }
}
