/* =========================================================
   CSS custom properties — mirrors the Tailwind palette used
   in App.tsx so colors/spacing stay consistent.
   ========================================================= */
:root {
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  --slate-50: #f8fafc;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white:    #ffffff;
  --green-100:#dcfce7;
  --green-600:#16a34a;
  --yellow-400:#facc15;
  --indigo-100:#e0e7ff;

  --max-w: 80rem;   /* max-w-7xl */
  --px:    1rem;    /* mobile padding */
  --radius-full: 9999px;
}

/* =========================================================
   Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
}

::selection { background: var(--blue-100); color: var(--blue-900); }

img { display: block; max-width: 100%; }
a  { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }

/* =========================================================
   Utilities
   ========================================================= */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--px);
}

@media (min-width: 640px)  { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

.text-blue   { color: var(--blue-600); }
.text-white  { color: var(--white); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: background .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 4px 14px 0 rgba(37,99,235,.3);
}
.btn-primary:hover {
  background: var(--blue-700);
  transform: scale(1.03);
}

.btn-outline {
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}
.btn-outline:hover { background: var(--gray-100); }

.btn-sm  { padding: .625rem 1.5rem; font-size: .9375rem; }
.btn-md  { padding: .75rem 2rem;    font-size: 1rem; }
.btn-lg  { padding: 1rem 2rem;      font-size: 1.125rem; }
.btn-xl  { padding: 1.25rem 2.5rem; font-size: 1.25rem; }
.btn-full { width: 100%; }

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}

.nav-toggle { display: none; }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.nav-logo .logo-img {
  height: 2.5rem;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a:not(.btn) {
  color: var(--gray-600);
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:not(.btn):hover { color: var(--blue-600); }

/* Hamburger label (hidden on desktop) */
.nav-hamburger {
  display: none;
  cursor: pointer;
  color: var(--gray-600);
}

.nav-hamburger .icon-close { display: none; }

/* Mobile panel */
.nav-mobile {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  padding: .5rem 1rem 1.5rem;
  flex-direction: column;
  gap: .25rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.nav-mobile a:not(.btn) {
  display: block;
  color: var(--gray-600);
  font-weight: 500;
  padding: .625rem 0;
}
.nav-mobile .btn { margin-top: .75rem; }

/* CSS-only toggle: checkbox siblings control mobile panel */
.nav-toggle:checked ~ .nav-mobile { display: flex; }
.nav-toggle:checked ~ .nav-inner .icon-menu  { display: none; }
.nav-toggle:checked ~ .nav-inner .icon-close { display: block; }

/* The checkbox and inner/mobile divs must be direct children of nav.
   Structure: nav > input.nav-toggle + .nav-inner + .nav-mobile      */

@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* =========================================================
   Sections — shared
   ========================================================= */
.section { padding-block: 6rem; }

.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: .75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.section-header {
  text-align: center;
  max-width: 48rem;
  margin-inline: auto;
  margin-bottom: 4rem;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding-top: 8rem;
  padding-bottom: 5rem;
  background: var(--slate-50);
  overflow: hidden;
  position: relative;
}

@media (min-width: 1024px) {
  .hero { padding-top: 10rem; padding-bottom: 7rem; }
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
}

.hero-blob-right {
  top: -10rem; right: -10rem;
  width: 50rem; height: 50rem;
  background: rgba(219,234,254,.5);
}

.hero-blob-left {
  bottom: -10rem; left: -10rem;
  width: 37.5rem; height: 37.5rem;
  background: rgba(224,231,255,.5);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ---- text side ---- */
.hero-text { max-width: 40rem; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .75rem;
  border-radius: var(--radius-full);
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 500;
  font-size: .875rem;
  border: 1px solid var(--blue-100);
  margin-bottom: 1.5rem;
}

.hero-badge svg { flex-shrink: 0; }

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--gray-900);
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-actions .btn-primary svg {
  transition: transform .2s;
}
.hero-actions .btn-primary:hover svg { transform: translateX(4px); }

.social-proof {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .875rem;
  color: var(--gray-500);
  font-weight: 500;
}

.avatar-stack {
  display: flex;
}

.avatar-stack img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid var(--white);
  object-fit: cover;
  margin-left: -.75rem;
}

.avatar-stack img:first-child { margin-left: 0; }

/* ---- image side ---- */
.hero-media {
  position: relative;
}

.hero-image-frame {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, rgba(37,99,235,.2), transparent);
  border-radius: 1.5rem;
  transform: rotate(3deg) scale(1.05);
}

.hero-image {
  position: relative;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px rgba(0,0,0,.2);
  object-fit: cover;
  width: 100%;
  height: 31.25rem;
}

.trust-badge {
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  background: var(--white);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--gray-100);
}

.trust-icon {
  background: var(--green-100);
  padding: .75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-label { font-size: .875rem; color: var(--gray-500); font-weight: 500; }
.trust-value { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); line-height: 1.2; }

/* =========================================================
   Stats bar
   ========================================================= */
.stats {
  background: var(--blue-900);
  padding-block: 4rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    divide-x: 1px solid var(--blue-800);
  }
}

.stat {
  text-align: center;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .stat { border-left: 1px solid rgba(255,255,255,.15); }
  .stat:first-child { border-left: none; }
}

.stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: .5rem;
}

.stat-label {
  font-size: .9375rem;
  color: #bfdbfe; /* blue-200 */
  font-weight: 500;
}

/* =========================================================
   Categories
   ========================================================= */
.categories { background: var(--white); }

.cards-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.category-card {
  background: var(--slate-50);
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--gray-100);
  transition: box-shadow .2s;
}

.category-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,.1); }

.card-image-wrapper {
  height: 12rem;
  overflow: hidden;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.category-card:hover .card-image-wrapper img { transform: scale(1.05); }

.card-body { padding: 2rem; }

.card-icon {
  background: var(--white);
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  margin-top: -4rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .75rem;
}

.card-desc {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  min-height: 5rem;
  line-height: 1.6;
}

.roles-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gray-900);
  margin-bottom: .75rem;
}

.roles-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.role-tag {
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: .75rem;
  font-weight: 500;
  padding: .25rem .75rem;
  border-radius: var(--radius-full);
}

/* =========================================================
   Process
   ========================================================= */
.process { background: var(--slate-50); }

.process-timeline {
  position: relative;
  max-width: 56rem;
  margin-inline: auto;
}

/* vertical centre line */
.process-timeline::before {
  content: '';
  display: none;
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 4px;
  background: var(--blue-100);
  border-radius: 2px;
  transform: translateX(-50%);
}

@media (min-width: 768px) { .process-timeline::before { display: block; } }

.process-steps { display: flex; flex-direction: column; gap: 3rem; }

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .process-step {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }

  /* even steps (0, 2, 4) — content on the left */
  .process-step:nth-child(odd) { flex-direction: row-reverse; }
}

.process-spacer {
  display: none;
}

@media (min-width: 768px) {
  .process-spacer { display: block; flex: 1; }
}

.process-icon-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 8px 20px rgba(37,99,235,.35);
  border: 4px solid var(--slate-50);
}

@media (min-width: 768px) {
  .process-icon-wrap { margin-inline: 0; }
}

.step-number {
  position: absolute;
  top: -.5rem; right: -.5rem;
  background: var(--white);
  color: var(--blue-600);
  font-size: .625rem;
  font-weight: 700;
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  border: 1px solid var(--blue-100);
}

.process-content {
  flex: 1;
  text-align: center;
}

@media (min-width: 768px) {
  /* odd step: content on the right, add left padding */
  .process-step:nth-child(even) .process-content {
    text-align: left;
    padding-left: 3rem;
  }

  /* even step (reversed): content on the left, add right padding */
  .process-step:nth-child(odd) .process-content {
    text-align: right;
    padding-right: 3rem;
  }
}

.process-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--gray-100);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: box-shadow .2s;
}

.process-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,.08); }

.process-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .75rem;
}

.process-card-desc { color: var(--gray-600); line-height: 1.6; }

/* =========================================================
   Testimonials
   ========================================================= */
.testimonials { background: var(--white); }

.testimonials-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .testimonials-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.testimonials-header-text { max-width: 40rem; }

.view-all {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--blue-600);
  font-weight: 600;
  transition: color .2s;
  flex-shrink: 0;
}
.view-all:hover { color: var(--blue-800); }

.testimonials-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) { .testimonials-grid { grid-template-columns: 1fr 1fr; } }

.testimonial-card {
  padding: 2.5rem;
  border-radius: 1.5rem;
}

.testimonial-card--light { background: var(--slate-50); }
.testimonial-card--dark  { background: var(--blue-600); color: var(--white); }

.stars {
  display: flex;
  gap: .25rem;
  color: var(--yellow-400);
  margin-bottom: 1.5rem;
}

.testimonial-quote {
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.testimonial-card--light .testimonial-quote { color: var(--gray-700); }
.testimonial-card--dark  .testimonial-quote { color: #eff6ff; }

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-author img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-card--dark .testimonial-author img {
  border: 2px solid rgba(255,255,255,.2);
}

.author-name {
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}
.testimonial-card--dark .author-name { color: var(--white); }

.author-role { font-size: .875rem; color: var(--gray-500); }
.testimonial-card--dark .author-role { color: #bfdbfe; }

/* =========================================================
   CTA
   ========================================================= */
.cta {
  padding-block: 6rem;
  background: var(--gray-900);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(30,58,138,.4), transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin-inline: auto;
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.cta-title span { color: #60a5fa; }

.cta-desc {
  font-size: 1.25rem;
  color: var(--gray-400);
  margin-bottom: 2.5rem;
  max-width: 40rem;
  margin-inline: auto;
  line-height: 1.6;
}

.cta-note {
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--gray-500);
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand { grid-column: 1 / -1; }

@media (min-width: 1024px) { .footer-brand { grid-column: auto; } }

.footer-logo { margin-bottom: 1.5rem; }
.footer-logo img { height: 2.75rem; width: auto; opacity: .9; }

.footer-tagline {
  color: var(--gray-500);
  max-width: 24rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: .875rem;
  font-weight: 700;
  transition: background .2s, color .2s;
  cursor: pointer;
}
.social-icon:hover { background: var(--blue-100); color: var(--blue-600); }

.footer-col h4 {
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: .75rem; }

.footer-col a {
  color: var(--gray-500);
  font-size: .9375rem;
  transition: color .2s;
}
.footer-col a:hover { color: var(--blue-600); }

.footer-bottom {
  border-top: 1px solid var(--gray-100);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .footer-bottom p:last-child { text-align: right; }
}

.footer-bottom p {
  font-size: .875rem;
  color: var(--gray-400);
  max-width: 40rem;
  line-height: 1.5;
}

/* =========================================================
   Icon helpers
   ========================================================= */
.icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

/* =========================================================
   Subtle entrance animations (skip if user prefers reduced motion)
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp .6s ease forwards;
  }

  .fade-in-delay-1 { animation-delay: .1s; }
  .fade-in-delay-2 { animation-delay: .2s; }
  .fade-in-delay-3 { animation-delay: .3s; }
  .fade-in-delay-4 { animation-delay: .4s; }

  @keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* When reduced motion is set, ensure items are still visible */
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; }
}
