/* ==========================================================================
   Family Court Sidekick — Marketing Site
   Palette ported from the app's MUI theme (src/theme/theme.ts):
     primary   #667eea
     secondary #8b5cf6 (purple, 600 #7c3aed, 700 #6d28d9)
     accent    #FFC758 (gold, 600 #f59e0b)
     gray      Tailwind gray scale (#f9fafb ... #111827)
   ========================================================================== */

:root {
  --primary: #667eea;
  --secondary: #8b5cf6;
  --secondary-600: #7c3aed;
  --secondary-700: #6d28d9;
  --accent: #ffc758;
  --accent-600: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  --gradient-accent: linear-gradient(135deg, #ffc758 0%, #f59e0b 100%);
  --gradient-dark: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  --gradient-light: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);

  --radius: 16px;
  --radius-sm: 12px;
  --shadow-purple: 0 10px 25px rgba(139, 92, 246, 0.2);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica",
    "Arial", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--gray-900);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--secondary);
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
}

h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.4;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-md {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: scale(1.03);
}

.btn-accent {
  background: var(--gradient-accent);
  color: var(--gray-900);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-outline-light {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline-dark {
  background: transparent;
  color: var(--gray-900);
  border: 2px solid var(--gray-900);
}

.btn-outline-dark:hover {
  background: rgba(17, 24, 39, 0.08);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.15rem;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gray-900);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}

.brand svg {
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.98rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--secondary);
}

.nav-links .btn {
  padding: 9px 20px;
  font-size: 0.95rem;
  color: var(--gray-900);
}

/* --------------------------------------------------------------------------
   Announcement bar
   -------------------------------------------------------------------------- */

.announcement {
  background: var(--gradient-accent);
  color: var(--gray-900);
  text-align: center;
  padding: 12px 24px;
  font-weight: 600;
  position: relative;
  z-index: 10;
}

.announcement a {
  color: var(--gray-900);
  text-decoration: underline;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  background: var(--gradient-primary);
  color: #ffffff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero.hero-dark {
  background: #000000;
}

.hero-title-block {
  text-align: center;
  margin-bottom: 48px;
}

.hero-kicker {
  font-weight: 500;
  font-size: 1.35rem;
  opacity: 0.9;
  margin-bottom: 6px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-lead {
  font-size: 1.3rem;
  opacity: 0.92;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.1rem;
  opacity: 0.82;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: 72px 0;
}

.section-light {
  background-color: var(--gray-50);
}

.section-gradient-light {
  background: var(--gradient-light);
}

.section-dark {
  background: var(--gradient-dark);
  color: #ffffff;
}

.section-accent {
  background: var(--gradient-accent);
  color: var(--gray-900);
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 2.5rem);
  text-align: center;
  margin-bottom: 16px;
  color: var(--secondary);
}

.section-dark .section-title,
.section-accent .section-title {
  color: inherit;
}

.section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  color: var(--gray-600);
  max-width: 800px;
  margin: 0 auto 48px;
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--secondary);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-purple);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.feature-card.border-accent {
  border-color: var(--accent-600);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.15);
}

.feature-card.border-dark {
  border-color: var(--gray-800);
  box-shadow: 0 10px 25px rgba(31, 41, 55, 0.12);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 12px;
}

.feature-card.border-accent h3 {
  color: var(--accent-600);
}

.feature-card.border-dark h3 {
  color: var(--gray-800);
}

.feature-card p {
  color: var(--gray-600);
  margin-bottom: 16px;
}

.check-list {
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--gray-600);
}

.check-list li::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 5px;
  border-radius: 50%;
  background-color: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/></svg>')
    center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/></svg>')
    center / contain no-repeat;
  color: var(--secondary);
}

.check-list.checks-gold li::before {
  color: var(--accent);
}

.check-list.checks-white li,
.check-list.checks-white li::before {
  color: #ffffff;
}

.check-list.checks-dark li,
.check-list.checks-dark li::before {
  color: var(--gray-900);
}

.check-list.checks-light li {
  color: var(--gray-100);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.check-list.checks-light li::before {
  color: var(--accent);
  width: 22px;
  height: 22px;
}

/* --------------------------------------------------------------------------
   How it works — vertical steps
   -------------------------------------------------------------------------- */

.steps {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius);
  margin-bottom: 48px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.step:last-child {
  margin-bottom: 0;
}

.step:hover {
  transform: translateX(8px);
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.2);
  border-color: var(--secondary);
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 70px;
  top: 100%;
  width: 4px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: 2px;
  z-index: 0;
}

.step-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
  font-size: 1.4rem;
}

.step-badge span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.step h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 10px;
}

.step p {
  color: var(--gray-600);
  font-size: 1.08rem;
}

/* --------------------------------------------------------------------------
   Quote / panels
   -------------------------------------------------------------------------- */

.panel {
  border-radius: var(--radius);
  padding: 36px;
}

.panel-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.panel-accent {
  background: var(--gradient-accent);
  color: var(--gray-900);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.panel-glass {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.panel h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.panel p {
  margin-bottom: 16px;
}

.panel .fine {
  opacity: 0.8;
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq {
  max-width: 860px;
  margin: 40px auto 0;
}

.faq details {
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  background: #ffffff;
  overflow: hidden;
}

.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--secondary);
  background: rgba(139, 92, 246, 0.05);
  list-style: none;
  position: relative;
  padding-right: 48px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--secondary);
  border-bottom: 2px solid var(--secondary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq details p {
  padding: 18px 22px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer-cta {
  background: var(--gradient-dark);
  color: #ffffff;
  text-align: center;
  padding: 64px 0;
}

.footer-cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 16px;
}

.footer-cta p {
  font-size: 1.2rem;
  margin-bottom: 32px;
  opacity: 0.9;
}

.footer-cta .hero-actions {
  justify-content: center;
}

.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 40px 0;
  border-top: 1px solid var(--gray-800);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  list-style: none;
}

.footer-links a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* --------------------------------------------------------------------------
   Legal / prose pages
   -------------------------------------------------------------------------- */

.prose-wrap {
  padding: 64px 0;
}

.prose {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.08);
}

.prose h1 {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.prose .updated {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.prose h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

.prose p {
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.error-page .code {
  font-size: 6rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .card-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .hero {
    padding: 56px 0;
  }

  .section {
    padding: 56px 0;
  }

  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .step:not(:last-child)::after {
    left: 50%;
    margin-left: -2px;
  }

  .step:hover {
    transform: translateY(-4px);
  }

  .prose {
    padding: 28px 20px;
  }

  .nav-inner {
    justify-content: center;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}
