/* Responsive expansion for Our Vision card (desktop/tablet) */
.vision-card {
  display: flex !important;
  flex-direction: column;
  flex: 0 1 420px;
  min-width: 260px;
  max-width: 480px;
  margin-left: auto;
  margin-right: 24px;
  align-self: stretch;
  height: 100%;
}
.vision-card.cards {
  display: flex !important;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
}
.cards:not(.vision-card) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}
@media (max-width: 1200px) {
  .vision-card {
    margin-right: 0;
    max-width: 100%;
  }
}
@media (max-width: 900px) {
  .vision-flex {
    flex-direction: column;
    gap: 32px;
  }
  .vision-card {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
    height: auto;
  }
}
/* Our Vision Flex Layout */

/* Our Vision Flex Layout - Improved */
.vision-flex {
  display: flex;
  gap: 56px;
  align-items: stretch;
  margin-top: 32px;
  justify-content: flex-start;
}
.vision-text {
  flex: 1 1 0%;
  min-width: 0;
  margin-right: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.vision-card {
  flex: 0 0 320px;
  min-width: 260px;
  max-width: 340px;
  margin-left: auto;
  margin-right: 24px;
  align-self: flex-start;
}
@media (max-width: 1200px) {
  .vision-card {
    margin-right: 0;
  }
}
@media (max-width: 900px) {
  .vision-flex {
    flex-direction: column;
    gap: 32px;
  }
  .vision-card {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
  }
}
:root {
  --bg: #ffffff;
  --text: #101114;
  --muted: rgba(16, 17, 20, 0.7);
  --line: rgba(16, 17, 20, 0.12);

  --red: #c1121f; /* primary */
  --red2: #ff2d2d; /* highlight */
  --tint: #fff5f6; /* light red wash */
  --shadow: 0 18px 60px rgba(16, 17, 20, 0.12);

  --radius: 18px;
  --wrap: 1120px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.55;
}

/* Layout */
.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin: 0 auto;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 220px;
}
.brand__mark {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, var(--red2), var(--red));
  box-shadow: 0 10px 30px rgba(193, 18, 31, 0.35);
}
.brand__name {
  font-weight: 650;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-left: auto;
}
.nav__link {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-weight: 520;
  padding: 6px 0;
  transition: color 180ms ease;
}
.nav__link:hover {
  color: var(--text);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 100%;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}
.nav__link.is-active {
  color: var(--text);
}
.nav__link.is-active::after {
  transform: scaleX(1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 12px 16px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: linear-gradient(135deg, var(--red), #8b0f18);
  color: white;
  box-shadow: 0 14px 34px rgba(193, 18, 31, 0.28);
}
.btn--primary:hover {
  box-shadow: 0 18px 46px rgba(193, 18, 31, 0.34);
  transform: translateY(-1px);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: rgba(193, 18, 31, 0.28);
  transform: translateY(-1px);
}
.btn--full {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(0.95) contrast(1.05);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      900px 420px at 18% 35%,
      rgba(255, 255, 255, 0.92),
      rgba(255, 255, 255, 0.55) 48%,
      rgba(255, 255, 255, 0.25) 70%
    ),
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.68),
      rgba(255, 255, 255, 0.25)
    );
}
.hero__content {
  position: relative;
  padding: 76px 0 72px;
}
.hero__text {
  max-width: 720px;
}
.kicker {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(193, 18, 31, 0.09);
  color: #7a0d14;
  font-weight: 750;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  font-size: 12px;
}
.headline {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.7px;
}
.subheadline {
  margin: 0 0 22px;
  font-size: 16px;
  color: var(--muted);
  max-width: 560px;
}
.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
}
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.trust__chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(16, 17, 20, 0.08);
  color: rgba(16, 17, 20, 0.78);
  font-weight: 550;
  font-size: 13px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 10px 20px rgba(193, 18, 31, 0.25);
}

/* Sections */
.section {
  padding: 66px 0;
}
.section--tint {
  background: var(--tint);
  border-top: 1px solid rgba(193, 18, 31, 0.08);
  border-bottom: 1px solid rgba(193, 18, 31, 0.08);
}
.section__title {
  margin: 0 0 18px;
  font-size: 26px;
  letter-spacing: -0.3px;
}
.vision p {
  margin: 0 0 14px;
  color: rgba(16, 17, 20, 0.82);
  max-width: 900px;
}

/* Attorney cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(16, 17, 20, 0.12);
  background: white;
  box-shadow: 0 10px 30px rgba(16, 17, 20, 0.08);
  transform: translateY(0);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(193, 18, 31, 0.22);
  box-shadow: 0 18px 54px rgba(16, 17, 20, 0.13);
}
.card__media img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.card__body {
  padding: 18px 18px 16px;
}
.card__name {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.2px;
}
.card__role {
  color: #7a0d14;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.divider {
  height: 1px;
  background: rgba(16, 17, 20, 0.12);
  margin: 14px 0;
}
.card__meta {
  display: grid;
  gap: 8px;
  color: rgba(16, 17, 20, 0.78);
}
.card__meta a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(193, 18, 31, 0.35);
}
.card__meta a:hover {
  border-bottom-style: solid;
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 26px;
  margin-top: 18px;
}
.contact__subtitle {
  margin: 0 0 10px;
  font-size: 16px;
}
.contact__line {
  margin: 0 0 14px;
  color: rgba(16, 17, 20, 0.82);
}
.link {
  color: #7a0d14;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(193, 18, 31, 0.25);
}
.link:hover {
  border-bottom-color: rgba(193, 18, 31, 0.6);
}
.map {
  margin-top: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(16, 17, 20, 0.12);
  box-shadow: 0 12px 34px rgba(16, 17, 20, 0.08);
}
.map iframe {
  width: 100%;
  height: 240px;
  border: 0;
  display: block;
}

/* Form */
.form {
  border-radius: var(--radius);
  border: 1px solid rgba(16, 17, 20, 0.12);
  background: white;
  padding: 18px;
  box-shadow: 0 12px 40px rgba(16, 17, 20, 0.08);
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.input,
.textarea {
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(16, 17, 20, 0.14);
  outline: none;
  font: inherit;
  background: rgba(255, 255, 255, 0.9);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}
.input:focus,
.textarea:focus {
  border-color: rgba(193, 18, 31, 0.42);
  box-shadow: 0 0 0 4px rgba(193, 18, 31, 0.12);
}
.form__note {
  margin-top: 10px;
  color: rgba(16, 17, 20, 0.6);
  font-size: 12px;
}

/* Back to top */
.backtotop {
  margin-top: 24px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: rgba(16, 17, 20, 0.72);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Reveal animation (replicates “scroll-in” transitions) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Chat (IDs match rag.js expectations) */
.chatFab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--red), #8b0f18);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 44px rgba(193, 18, 31, 0.35);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}
.chatFab:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(193, 18, 31, 0.42);
}

.chatPanel {
  position: fixed;
  right: 18px;
  bottom: 72px;
  width: min(380px, calc(100% - 36px));
  height: 520px;
  z-index: 60;

  /* IMPORTANT: flex column so body can scroll */
  display: none; /* rag.js toggles to flex */
  flex-direction: column;
  min-height: 0; /* ✅ allows children to scroll */

  background: white;
  border: 1px solid rgba(16, 17, 20, 0.12);
  border-radius: 18px;
  box-shadow: var(--shadow);

  /* IMPORTANT: only panel clips; inner scroll is chatBody */
  overflow: hidden;
  overscroll-behavior: contain; /* ✅ prevents page scroll chaining on touchpads */
}

.chatPanel__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(16, 17, 20, 0.12);
  background: rgba(193, 18, 31, 0.06);
}
.chatPanel__title {
  font-weight: 850;
}
.chatPanel__close {
  border: 0;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
}
.chatPanel__close:hover {
  background: rgba(16, 17, 20, 0.06);
}

/* ✅ THIS is the scroll container */
.chatBody {
  flex: 1 1 auto;
  min-height: 0; /* ✅ required in flex for scrolling */
  overflow-y: auto; /* ✅ enable vertical scroll */
  overflow-x: hidden;
  padding: 12px;

  -webkit-overflow-scrolling: touch; /* smoother iOS scroll */
  overscroll-behavior: contain;
}

.msg {
  display: flex;
  margin: 10px 0;
}
.msg.user {
  justify-content: flex-end;
}
.bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(16, 17, 20, 0.12);
  background: #fff;
  white-space: pre-wrap;
}
.msg.user .bubble {
  background: rgba(193, 18, 31, 0.08);
  border-color: rgba(193, 18, 31, 0.18);
}
.sources {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(16, 17, 20, 0.6);
}

/* Contact form lives inside panel, should NOT scroll separately */
.chatContactWrap {
  flex: 0 0 auto;
  padding: 12px;
  border-top: 1px solid rgba(16, 17, 20, 0.12);
  background: rgba(193, 18, 31, 0.04);
}

.chatComposer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(16, 17, 20, 0.12);
  background: #fff;
}

.chatInput {
  border-radius: 12px;
  border: 1px solid rgba(16, 17, 20, 0.14);
  padding: 10px 12px;
  outline: none;
}
.chatInput:focus {
  border-color: rgba(193, 18, 31, 0.42);
  box-shadow: 0 0 0 4px rgba(193, 18, 31, 0.12);
}
.chatSend {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--red), #8b0f18);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

/* Chat form fields */
.chatContactTitle {
  font-weight: 900;
  margin: 4px 0 10px;
}
.chatContactForm {
  display: grid;
  gap: 10px;
}
.chatGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.chatField {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(16, 17, 20, 0.14);
  padding: 10px 12px;
  outline: none;
  font: inherit;
  background: #fff;
}
.chatField:focus {
  border-color: rgba(193, 18, 31, 0.42);
  box-shadow: 0 0 0 4px rgba(193, 18, 31, 0.12);
}
.chatTextarea {
  resize: vertical;
}
.chatSend--full {
  width: 100%;
}
.chatTiny {
  font-size: 11px;
  color: rgba(16, 17, 20, 0.65);
  line-height: 1.3;
}
@media (max-width: 420px) {
  .chatGrid {
    grid-template-columns: 1fr;
  }
}

/* Accessibility helpers */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 960px) {
  .nav {
    display: none;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .contact {
    grid-template-columns: 1fr;
  }
  .brand {
    min-width: unset;
  }
}
