/* Hero & dashboard mock-specific styles */

/* ----- HERO ----- */
.hero {
  position: relative;
  padding: 80px 0 110px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 75%;
  background:
    radial-gradient(60% 80% at 75% 10%, rgba(196,181,253,0.45), transparent 60%),
    radial-gradient(50% 70% at 15% 25%, rgba(167,243,208,0.30), transparent 60%),
    radial-gradient(80% 90% at 50% 0%, rgba(243,244,246,0.7), transparent 60%);
  z-index: -1;
  filter: blur(2px);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(15,17,21,0.045) 1px, transparent 0);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 22%, black 70%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, black 22%, black 70%, transparent 100%);
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.45fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { max-width: 580px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 5.6vw, 76px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 22px 0 22px;
}
.hero h1 .accent {
  font-style: italic;
  color: var(--accent);
}
.hero h1 .underlined {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.hero h1 .underlined::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -4px;
  height: 8px;
  background: var(--accent-soft);
  border-radius: 8px;
  z-index: -1;
}

.hero .lead { margin: 0 0 32px; font-size: 19px; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.hero-cta .btn { padding: 14px 22px; }

.hero-trust {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.hero-trust .dots {
  display: flex;
  margin-right: 4px;
}
.hero-trust .dots span {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-300), var(--purple-600));
  margin-left: -8px;
  border: 2px solid #fff;
  display: grid; place-items: center;
  color: #fff; font-size: 11px; font-weight: 700;
}
.hero-trust .dots span:nth-child(1) { background: linear-gradient(135deg, hsl(280,70%,68%), hsl(310,70%,52%)); }
.hero-trust .dots span:nth-child(2) { background: linear-gradient(135deg, hsl(200,75%,65%), hsl(230,80%,55%)); }
.hero-trust .dots span:nth-child(3) { background: linear-gradient(135deg, hsl(160,55%,55%), hsl(180,60%,42%)); }
.hero-trust .dots span:nth-child(4) { background: linear-gradient(135deg, hsl(20,80%,68%),  hsl(345,75%,55%)); }
.hero-trust strong { color: var(--ink-2); font-weight: 700; }

/* ----- HERO DASHBOARD MOCK ----- */
.hero-dash {
  position: relative;
  --tilt-rx: 2deg;
  --tilt-ry: -6deg;
  --tilt-px: 0px;
  --tilt-py: 0px;
  transform: perspective(1800px)
             rotateY(var(--tilt-ry))
             rotateX(var(--tilt-rx))
             translate3d(var(--tilt-px), var(--tilt-py), 0);
  transform-origin: 30% 50%;
  transform-style: preserve-3d;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  /* overflow visible so float cards can escape above the frame */
  overflow: visible;
  will-change: transform;
}
.hero-dash:hover {
  transition: transform 60ms linear;
}
/* inner clip handles border-radius, shadow, and overflow clipping for the app UI */
.hero-dash-clip {
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 30px 80px -30px rgba(76,29,149,0.32),
    0 16px 48px -20px rgba(15,17,21,0.22);
}
.hero-dash .app-body {
  grid-template-columns: 52px 1fr;
  min-height: 540px;
}
/* collapsed icon-only sidebar — hides labels so cases table gets the space */
.hero-dash .app-sidebar {
  overflow: hidden;
  padding: 14px 6px;
}
.hero-dash .app-sidebar > div:first-child {
  justify-content: center;
  padding: 4px 0 14px;
}
.hero-dash .ws-title { display: none; }
.hero-dash .nav-item {
  justify-content: center;
  padding: 8px;
  gap: 0;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.hero-dash .nav-item .ic { opacity: 0.65; width: 16px; height: 16px; }
.hero-dash .nav-item.active .ic { opacity: 1; }
/* hide text labels and badges — sidebar is icon-only at this width */
.hero-dash .nav-label,
.hero-dash .badge { display: none; }
.hero-dash .nav-item:hover:not(.active) {
  background: var(--bg-3);
  color: var(--ink);
}
/* table rows interactive */
.hero-dash .dash-row:not(.dash-head) {
  cursor: pointer;
  transition: background 160ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-dash .dash-row:not(.dash-head):hover {
  background: var(--bg-2);
  transform: translateZ(8px);
}
/* segmented control buttons clickable */
.hero-dash .seg button {
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.hero-dash .seg button:hover:not(.active) {
  color: var(--ink);
}
/* float cards lift slightly on dashboard hover */
.hero-dash .float-card {
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 380ms ease;
}
.hero-dash:hover .float-questionnaire {
  transform: translateZ(40px) translate(-4px, -4px);
}
.hero-dash:hover .float-doc {
  transform: translateZ(40px) translate(4px, 4px);
}

/* hero mockup: 6-column layout — drop Lawyer (5) + Priority (6) for space */
.hero-dash .dash-row {
  grid-template-columns: 1.0fr 1.4fr 1.15fr 1.25fr 1.1fr 1.7fr;
  gap: 16px;
  padding: 13px 18px;
}
.hero-dash .dash-row > div:nth-child(5),
.hero-dash .dash-row > div:nth-child(6) { display: none; }

.dash-newcase {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 6px 14px -6px rgba(124,58,237,0.5);
}
.dash-newcase svg { width: 12px; height: 12px; }

.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  background: var(--bg-3);
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.seg-count {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
}
.dash-search {
  flex: 1;
  min-width: 160px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
}
.dash-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.dash-filter svg { width: 12px; height: 12px; opacity: 0.6; }

.dash-table {
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.dash-row {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 0.8fr 1fr 0.4fr 0.75fr 0.8fr 1.3fr;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 12px;
  border-top: 1px solid var(--line-2);
  transition: background 0.2s;
}
/* allow grid cells to shrink and clip — prevents pills overflowing into neighbours */
.dash-row > div { min-width: 0; overflow: hidden; }
.dash-row:first-child { border-top: 0; }
.dash-row.dash-head {
  background: #fafbfd;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
}
.dash-row .ref {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-row .client {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
}
.dash-row .client span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage-cell { display: flex; align-items: center; gap: 6px; }
.stage-bar {
  flex: 1;
  height: 4px;
  background: var(--line-2);
  border-radius: 999px;
  overflow: hidden;
}
.stage-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--purple-500), var(--purple-700));
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(.2,.7,.2,1);
}
.stage-num { font-size: 10px; color: var(--muted); font-weight: 600; min-width: 24px; }
.dash-row .action {
  font-size: 11px;
  overflow: hidden;
}
.dash-row .action-when { color: var(--accent); font-weight: 700; white-space: nowrap; }
.dash-row .action-what {
  color: var(--ink-3);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* floating side cards */
.float-card {
  position: absolute;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 16px 36px -10px rgba(15,17,21,0.24),
    0 4px 12px -4px rgba(15,17,21,0.12);
  border: 1px solid rgba(15,17,21,0.06);
  width: 250px;
  transform: rotate(0deg);
  animation: gentle-float 6s ease-in-out infinite;
}
.float-questionnaire {
  top: -64px;
  left: 24px;
  width: 280px;
  animation-delay: -1s;
}
.float-doc {
  bottom: 8%;
  right: 10px;
  width: 270px;
  transform: rotate(3deg);
  animation-delay: -3s;
}
@keyframes gentle-float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-6px) rotate(var(--r, 0deg)); }
}
.float-questionnaire { --r: -3deg; }
.float-doc { --r: 3deg; }

.fc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fc-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.fc-icon svg { width: 16px; height: 16px; }
.fc-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.fc-sub { font-size: 11px; color: var(--muted); }

.fc-flag {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  background: var(--rose-soft);
  color: #be123c;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 500;
}
.fc-flag svg { width: 12px; height: 12px; flex-shrink: 0; }

.fc-progress { display: flex; align-items: center; gap: 8px; }
.fc-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--line-2);
  border-radius: 999px;
  overflow: hidden;
}
.fc-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #059669);
  border-radius: 999px;
}
.fc-progress-num { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ----- LOGO STRIP ----- */
.logos {
  padding: 28px 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  background: var(--bg-2);
}
.logos .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.logos .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.logo-marks {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  opacity: 0.65;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.logo-mark svg { width: 22px; height: 22px; }

/* ----- FEATURE SECTIONS ----- */
.section {
  padding: clamp(64px, 9vw, 110px) 0;
  position: relative;
}
.section-tinted {
  background: linear-gradient(180deg, transparent 0%, var(--bg-2) 18%, var(--bg-2) 82%, transparent 100%);
}
.section-blue {
  background: linear-gradient(160deg, #1e293b 0%, #312e81 50%, #4c1d95 100%);
  color: #e9eaf3;
  padding: clamp(72px, 10vw, 130px) 0;
  position: relative;
  overflow: hidden;
}
.section-blue::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, black, transparent);
          mask-image: radial-gradient(80% 80% at 50% 50%, black, transparent);
}
.section-blue h2.display, .section-blue h2.sans { color: #fff; }
.section-blue .lead { color: rgba(255,255,255,0.78); }
.section-blue .eyebrow { background: rgba(255,255,255,0.1); color: #c4b5fd; }
.section-blue .eyebrow .dot { background: #c4b5fd; }

.feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: center;
  overflow-x: hidden;
}
.feature.reverse { grid-template-columns: 1.1fr 1fr; }
.feature.reverse .feature-text { order: 2; }

.feature-text .eyebrow { margin-bottom: 18px; }
.feature-text h2 { margin-bottom: 18px; }
.feature-text .lead { margin: 0 0 24px; }
.feature-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 14px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
}
.feature-list .check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.feature-list .check svg { width: 12px; height: 12px; }
.section-blue .feature-list li { color: rgba(255,255,255,0.85); }
.section-blue .feature-list .check {
  background: rgba(196,181,253,0.18);
  color: #c4b5fd;
}

.feature-mock {
  position: relative;
}

/* ----- STATS / FINAL CTA ----- */
.stats-strip {
  padding: 60px 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: 6px;
}
.stat .label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.final-cta {
  padding: 100px 0 120px;
  text-align: center;
}
.final-cta .card {
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(167,139,250,0.28) 0%, transparent 60%),
    radial-gradient(80% 120% at 100% 100%, rgba(167,243,208,0.20) 0%, transparent 60%),
    linear-gradient(150deg, #1e293b 0%, #312e81 60%, #4c1d95 120%);
  border-radius: 28px;
  padding: 80px 56px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.final-cta .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(60% 80% at 50% 30%, black, transparent);
          mask-image: radial-gradient(60% 80% at 50% 30%, black, transparent);
}
.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 4.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: #fff;
  position: relative;
}
.final-cta h2 em { font-style: italic; color: #c4b5fd; }
.final-cta p { color: rgba(255,255,255,0.78); max-width: 560px; margin: 0 auto 32px; font-size: 17px; line-height: 1.55; position: relative; }
.final-cta .btn-row { display: inline-flex; gap: 12px; position: relative; }
.final-cta .btn-primary {
  background: #fff; color: var(--accent-deep);
  box-shadow: 0 12px 32px -10px rgba(0,0,0,0.4);
}
.final-cta .btn-primary:hover { background: #f4f4f7; }
.final-cta .btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}
.final-cta .btn-ghost:hover { background: rgba(255,255,255,0.14); }

/* ----- MINI FEATURE GRID (everything else) ----- */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
}
.mini-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 28px 28px 26px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 8px 22px -16px rgba(15,17,21,0.08);
}
.mini-card:hover {
  border-color: var(--ink-3);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 18px 36px -18px rgba(15,17,21,0.16);
}
.mini-card::after {
  content: "→";
  position: absolute;
  top: 28px;
  right: 26px;
  font-size: 18px;
  color: var(--muted-2);
  transition: all 0.2s ease;
}
.mini-card:hover::after {
  color: var(--ink);
  transform: translateX(4px);
}
.mini-ic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--ink);
  margin-bottom: 18px;
}
.mini-ic svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}
.mini-card h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}
.mini-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
  padding-right: 24px;
}
@media (max-width: 720px) {
  .mini-grid { grid-template-columns: 1fr; }
}

/* ----- TESTIMONIALS ----- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.testimonial {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 12px 28px -16px rgba(15,17,21,0.10);
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--ink);
}
.testimonial .who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial .who-name { font-size: 14px; font-weight: 600; }
.testimonial .who-role { font-size: 12px; color: var(--muted); }

/* ----- responsive ----- */
@media (max-width: 980px) {
  .hero-grid, .feature, .feature.reverse { grid-template-columns: 1fr; gap: 48px; }
  .feature.reverse .feature-text { order: 0; }
  .float-questionnaire { left: 16px; top: -56px; width: 260px; }
  .float-doc { right: 4px; }
  .stats-grid, .testimonials { grid-template-columns: 1fr 1fr; }
  .feature-mock { overflow: hidden; border-radius: 16px; width: 100%; }
  .feature-mock .mock-window { width: 100%; box-sizing: border-box; }
}
@media (max-width: 640px) {
  .stats-grid, .testimonials { grid-template-columns: 1fr; }
  .hero-dash { transform: none !important; }
  .float-questionnaire, .float-doc { display: none; }
  .final-cta .card { padding: 56px 28px; }

  /* Simplified hero dashboard for mobile */
  .hero-dash .app-sidebar { display: none; }
  .hero-dash .app-body { grid-template-columns: 1fr; }
  .hero-dash .app-content { padding: 14px 12px; }
  .hero-dash .dash-filter { display: none; }
  .hero-dash .dash-search { min-width: 0; flex: 1; }

  /* 3-column table: client · status · next action */
  .hero-dash .dash-row {
    grid-template-columns: 1.6fr 1fr 1.2fr;
    gap: 8px;
    padding: 9px 10px;
  }
  /* hide reference, visa, stage, lawyer, priority columns */
  .hero-dash .dash-row > div:nth-child(1),
  .hero-dash .dash-row > div:nth-child(3),
  .hero-dash .dash-row > div:nth-child(4),
  .hero-dash .dash-row > div:nth-child(5),
  .hero-dash .dash-row > div:nth-child(6) { display: none; }

  /* Prevent feature mocks from bleeding past the viewport edge */
  .feature-mock {
    overflow: hidden;
    border-radius: 16px;
    width: 100%;
  }
  .feature-mock .mock-window { width: 100%; box-sizing: border-box; }
  .mcc-name { font-size: 12px; }
  .mcc-row { font-size: 10px; }

  /* btn-row wraps on narrow screens */
  .final-cta .btn-row { flex-wrap: wrap; justify-content: center; }

  /* hero trust dots wrap on very small screens */
  .hero-trust { flex-wrap: wrap; gap: 12px; }
}
