:root {
  --law-bg: #060D1A;
  --law-bg-alt: #09112A;
  --law-fg: #EEF2FF;
  --law-fg-muted: #7B8DB0;
  --law-accent: #a78bfa;
  --law-accent-dim: #7c5fc9;
  --law-sky: #818cf8;
  --law-sky-dim: #4f5fc7;
  --law-border: rgba(255,255,255,0.07);
  --law-card: #09112A;
  --law-radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--law-bg);
  color: var(--law-fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* — Navigation — */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 40px; height: 64px; display: flex; align-items: center;
  background: rgba(6,13,26,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--law-border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-wordmark { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px; color: var(--law-fg); }
.nav-links { display: flex; gap: 24px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--law-fg-muted); text-decoration: none; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--law-fg); }
.nav-link.demo-badge {
  background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.25);
  border-radius: 100px; padding: 6px 16px; color: var(--law-accent) !important;
}

/* — Law Hero — */
.law-hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 80px 80px; background: var(--law-bg); position: relative; overflow: hidden;
}
.law-hero::before {
  content: ''; position: absolute; top: -150px; right: -150px; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(167,139,250,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.law-hero-inner { max-width: 600px; }
.law-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: var(--law-accent);
  margin-bottom: 28px;
}
.law-badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--law-accent); box-shadow: 0 0 10px var(--law-accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.law-hero-headline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 4vw, 56px); font-weight: 800;
  line-height: 1.12; letter-spacing: -1.5px; color: var(--law-fg); margin-bottom: 24px;
}
.law-gradient {
  background: linear-gradient(135deg, var(--law-accent) 0%, var(--law-sky) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.law-hero-sub {
  font-size: 18px; color: var(--law-fg-muted); max-width: 520px;
  margin-bottom: 40px; line-height: 1.7;
}
.law-trust-row { display: flex; gap: 20px; flex-wrap: wrap; }
.law-trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--law-fg-muted);
}
.law-trust-item svg { color: var(--law-accent); }

/* — Law illustration — */
.law-illustration { position: absolute; right: 80px; top: 50%; transform: translateY(-50%); }
.scales-shape {
  width: 260px; height: 260px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.scales-beam {
  position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
  width: 200px; height: 4px; background: linear-gradient(90deg, transparent, var(--law-accent), var(--law-sky), transparent);
  border-radius: 2px;
  animation: beamGlow 3s ease-in-out infinite;
}
@keyframes beamGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(167,139,250,0.4); }
  50% { box-shadow: 0 0 24px rgba(167,139,250,0.7); }
}
.scales-pan {
  position: absolute; top: 20%;
  width: 50px; height: 8px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(167,139,250,0.15); border: 1px solid rgba(167,139,250,0.3);
}
.scales-pan.left { left: calc(50% - 100px); animation: tiltLeft 4s ease-in-out infinite; }
.scales-pan.right { right: calc(50% - 100px); animation: tiltRight 4s ease-in-out infinite; }
@keyframes tiltLeft { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(-2deg); } }
@keyframes tiltRight { 0%, 100% { transform: rotate(5deg); } 50% { transform: rotate(2deg); } }
.scales-weight {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--law-accent);
}
.scales-weight.heavy { background: var(--law-sky); width: 28px; height: 28px; }
.scales-pillar {
  position: absolute; bottom: 20%; left: 50%; transform: translateX(-50%);
  width: 6px; height: 80px; border-radius: 3px;
  background: linear-gradient(180deg, var(--law-accent), transparent);
}
.law-floating-tags { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.lf-tag {
  background: var(--law-card); border: 1px solid var(--law-border);
  border-radius: 100px; padding: 10px 20px; font-size: 13px; font-weight: 500;
  color: var(--law-fg); display: flex; align-items: center; gap: 8px;
  animation: tagPulse 4s ease-in-out infinite;
}
.lf-tag:nth-child(1) { animation-delay: 0.2s; }
.lf-tag:nth-child(2) { animation-delay: 0.5s; }
.lf-tag:nth-child(3) { animation-delay: 0.8s; }
@keyframes tagPulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }

/* — Shared section styles — */
.section-label {
  font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: var(--law-accent); margin-bottom: 16px;
}
.section-heading {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 3vw, 44px); font-weight: 700;
  line-height: 1.2; letter-spacing: -0.8px; color: var(--law-fg); margin-bottom: 56px;
}

/* — Law Demo Section — */
.law-demo-section {
  background: var(--law-bg); padding: 100px 80px;
  border-top: 1px solid var(--law-border);
}
.law-demo-inner { max-width: 1200px; margin: 0 auto; }
.law-demo-header { text-align: center; margin-bottom: 64px; }
.law-demo-subtitle {
  font-size: 18px; color: var(--law-fg-muted);
  max-width: 560px; margin: 16px auto 0;
}
.law-demo-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  max-width: 900px; margin: 0 auto; align-items: start;
}

/* — Law Chat Widget — */
.law-chat-wrapper {
  background: var(--law-card); border: 1px solid var(--law-border);
  border-radius: 20px; overflow: hidden; height: 520px;
  display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.law-avatar { background: linear-gradient(135deg, var(--law-accent), var(--law-sky)) !important; }
.law-avatar-sm { background: linear-gradient(135deg, var(--law-accent), var(--law-sky)) !important; }
.law-demo-info {
  background: var(--law-card); border: 1px solid var(--law-border);
  border-radius: 20px; padding: 36px;
}
.law-demo-info h3 {
  font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 700;
  color: var(--law-fg); margin-bottom: 24px;
}
.law-flow-steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.law-flow-step { display: flex; align-items: flex-start; gap: 16px; }
.flow-step-icon { font-size: 20px; flex-shrink: 0; }
.law-flow-step h4 { font-size: 14px; font-weight: 600; color: var(--law-fg); margin-bottom: 2px; }
.law-flow-step span { font-size: 13px; color: var(--law-fg-muted); }
.law-demo-services { display: flex; flex-wrap: wrap; gap: 8px; }
.law-svc-tag {
  background: rgba(167,139,250,0.08); border: 1px solid rgba(167,139,250,0.2);
  border-radius: 100px; padding: 6px 14px; font-size: 13px; font-weight: 500;
  color: var(--law-accent);
}

/* — Law Services Areas — */
.law-services-section {
  background: var(--law-bg-alt); padding: 100px 80px; border-top: 1px solid var(--law-border);
}
.law-services-inner { max-width: 1200px; margin: 0 auto; }
.law-services-sub {
  font-size: 18px; color: var(--law-fg-muted);
  max-width: 600px; margin: -36px auto 56px;
}
.law-areas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.law-area-card {
  background: var(--law-card); border: 1px solid var(--law-border);
  border-radius: var(--law-radius); padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
  display: flex; flex-direction: column;
}
.law-area-card:hover { border-color: rgba(167,139,250,0.3); transform: translateY(-4px); }
.law-area-icon { font-size: 32px; margin-bottom: 16px; }
.law-area-card h3 {
  font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700;
  color: var(--law-fg); margin-bottom: 10px;
}
.law-area-card p { font-size: 13px; color: var(--law-fg-muted); line-height: 1.6; margin-bottom: 16px; flex: 1; }
.law-area-tag {
  display: inline-block; background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.2); border-radius: 100px;
  font-size: 11px; font-weight: 600; color: var(--law-accent);
  padding: 4px 12px; align-self: flex-start;
}
.law-area-tag.priority {
  background: rgba(251,146,60,0.08); border-color: rgba(251,146,60,0.2);
  color: #fb923c;
}

/* — Law Closing — */
.law-closing-section {
  background: var(--law-bg); padding: 120px 80px; border-top: 1px solid var(--law-border);
}
.law-closing-inner { max-width: 800px; margin: 0 auto; text-align: center; }
.law-closing-card {
  background: var(--law-card); border: 1px solid rgba(167,139,250,0.15);
  border-radius: 24px; padding: 56px 64px;
  position: relative; overflow: hidden;
}
.law-closing-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--law-accent), var(--law-sky));
}
.law-closing-badge {
  display: inline-block; font-family: 'Syne', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--law-accent);
  background: rgba(167,139,250,0.08); border: 1px solid rgba(167,139,250,0.2);
  border-radius: 100px; padding: 6px 16px; margin-bottom: 24px;
}
.law-closing-headline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(24px, 3vw, 40px); font-weight: 800;
  line-height: 1.2; letter-spacing: -0.8px; color: var(--law-fg); margin-bottom: 20px;
}
.law-closing-sub {
  font-size: 17px; color: var(--law-fg-muted); line-height: 1.7;
  max-width: 520px; margin: 0 auto 40px;
}
.law-demo-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.law-demo-link {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 100px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; transition: opacity 0.2s, transform 0.15s;
  border: 1px solid var(--law-border);
  color: var(--law-fg-muted); background: var(--law-bg-alt);
}
.law-demo-link:hover { transform: translateY(-2px); color: var(--law-fg); }
.law-demo-link.active { color: var(--law-accent); border-color: rgba(167,139,250,0.3); background: rgba(167,139,250,0.05); }
.law-demo-link.hvac.active { color: #00E5C4; border-color: rgba(0,229,196,0.3); background: rgba(0,229,196,0.05); }
.law-demo-link.dental.active { color: #5ee7df; border-color: rgba(94,231,223,0.3); background: rgba(94,231,223,0.05); }
.law-contact-row {
  border-top: 1px solid var(--law-border); padding-top: 24px;
}
.law-contact-row p { font-size: 13px; color: var(--law-fg-muted); }

/* — Footer — */
.footer {
  background: var(--law-bg); padding: 48px 80px; border-top: 1px solid var(--law-border);
}
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px; color: var(--law-fg); }
.footer-note { font-size: 14px; color: var(--law-fg-muted); }

/* Shared chat widget styles */
.chat-header {
  padding: 20px 24px; background: var(--law-bg-alt); border-bottom: 1px solid var(--law-border);
  display: flex; align-items: center; gap: 12px;
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.chat-info h4 { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: var(--law-fg); }
.chat-info span { font-size: 12px; color: var(--law-accent); }
.chat-body {
  flex: 1; overflow-y: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.chat-bubble-wrap { display: flex; gap: 8px; align-items: flex-end; }
.chat-bubble-wrap.user { flex-direction: row-reverse; }
.chat-bubble-wrap.user .chat-bubble { background: var(--law-accent); color: #060D1A; }
.chat-avatar-small {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
}
.chat-bubble {
  background: var(--law-bg-alt); border: 1px solid var(--law-border);
  border-radius: 16px 16px 16px 4px; padding: 12px 16px;
  font-size: 14px; line-height: 1.55; color: var(--law-fg); max-width: 260px;
}
.chat-bubble-wrap.user .chat-bubble { border-radius: 16px 16px 4px 16px; }
.typing-indicator { display: flex; gap: 4px; padding: 4px 0; }
.typing-indicator span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--law-fg-muted); animation: typingBounce 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
.chat-input-area {
  padding: 16px 20px; background: var(--law-bg-alt);
  border-top: 1px solid var(--law-border); display: flex; gap: 10px; align-items: center;
}
.chat-input {
  flex: 1; background: var(--law-card); border: 1px solid var(--law-border);
  border-radius: 100px; padding: 10px 20px; font-size: 14px;
  color: var(--law-fg); font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.2s;
}
.chat-input::placeholder { color: var(--law-fg-muted); }
.chat-input:focus { border-color: var(--law-accent); }
.chat-send-btn {
  background: var(--law-accent); color: #060D1A; border: none;
  border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.2s, transform 0.15s; flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--law-accent-dim); transform: scale(1.08); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* — Responsive — */
@media (max-width: 900px) {
  .law-hero { padding: 100px 32px 60px; }
  .law-illustration { display: none; }
  .law-demo-section, .law-services-section, .law-closing-section { padding: 72px 32px; }
  .law-areas-grid { grid-template-columns: 1fr; }
  .law-demo-grid { grid-template-columns: 1fr; }
  .law-chat-wrapper { height: 420px; }
  .law-closing-card { padding: 36px 28px; }
  .nav { padding: 0 20px; }
  .nav-links { gap: 12px; }
  .nav-link { font-size: 13px; }
}