/* Prevent scroll when mobile nav menu is open */
body.home-nav-menu-open {
  overflow: hidden;
}

@media (min-width: 768px) {
  body.home-nav-menu-open {
    overflow: auto;
  }
}

/* Hero + provider only — multi-stop pastel gradient (marketing mockup) */
.home-intro {
  position: relative;
  overflow: hidden;
  background: #ebe9f6;
}

/* Layered corners + bright center (lavender TL, pink TR, periwinkle BL, peach BR) */
.home-intro__gradient {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #ebe9f6;
  background-image:
    radial-gradient(
      ellipse 95% 75% at 50% 36%,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.55) 22%,
      rgba(255, 255, 255, 0) 58%
    ),
    radial-gradient(ellipse 72% 58% at 0% 0%, #d4d7f5 0%, transparent 62%),
    radial-gradient(ellipse 68% 52% at 100% 0%, #f6eef8 0%, transparent 58%),
    radial-gradient(ellipse 78% 62% at 0% 100%, #c4c9ef 0%, transparent 55%),
    radial-gradient(ellipse 72% 58% at 100% 100%, #fce8f2 0%, transparent 52%),
    linear-gradient(125deg, #d6d8f2 0%, #e6e2f6 38%, #f3eef8 72%, #fdf2f8 100%);
}

.home-intro__grain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.13;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

/* Soft handoff to phone panel (#f8fafc) — second fold is separate */
.home-intro::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: clamp(2rem, 8vw, 4rem);
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, #f8fafc 100%);
}

/* Home hero + floating nav */
.home-hero-nav-wrap {
  width: 100%;
  max-width: var(--home-nav-max, 72rem);
  margin-left: auto;
  margin-right: auto;
}

.home-hero-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(203, 213, 225, 0.75);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@media (min-width: 640px) {
  .home-hero-nav {
    min-height: 4rem;
    padding: 0.625rem 1.25rem;
  }
}

@media (min-width: 768px) {
  .home-hero-nav {
    min-height: 4.5rem;
    padding: 0.75rem 2rem;
  }
}

@media (max-width: 767.98px) {
  .home-intro {
    overflow: visible;
  }

  .home-hero__inner {
    padding: 0.75rem 0.875rem 0;
  }

  .home-hero__content {
    padding-top: 1.25rem;
  }

  .home-hero__title {
    font-size: clamp(1.25rem, 6.2vw, 1.875rem);
    line-height: 1.2;
    padding: 0 0.25rem;
    max-width: 21rem;
  }

  .home-hero__subtitle {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0 0.5rem;
    max-width: 22.5rem;
  }

  .home-hero__cta-row {
    margin-top: 1.25rem;
    width: 100%;
    max-width: 16rem;
  }

  .home-hero-app-badge {
    width: 100%;
    max-width: 12.5rem;
  }

  .home-hero {
    padding-bottom: 1rem;
  }
}

.home-hero-nav__side {
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  z-index: 1;
}

.home-hero-nav__side--left {
  justify-content: flex-start;
}

.home-hero-nav__side--right {
  justify-content: flex-end;
  gap: 0.5rem;
}

.home-hero-nav__links {
  display: none;
  align-items: center;
  gap: 0.125rem;
}

@media (min-width: 768px) {
  .home-hero-nav__links {
    display: flex;
  }
}

.home-hero-nav__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}

.home-hero-nav__logo-link {
  display: inline-flex;
  pointer-events: auto;
  border-radius: 0.375rem;
  outline: none;
}

.home-hero-nav__logo-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(10, 101, 252, 0.35);
}

.home-hero-nav__logo-img {
  display: block;
  height: 2.25rem;
  width: auto;
  max-width: 100%;
}

@media (min-width: 640px) {
  .home-hero-nav__logo-img {
    height: 2.5rem;
  }
}

@media (min-width: 768px) {
  .home-hero-nav__logo-img {
    height: 2.75rem;
  }
}

@media (min-width: 1024px) {
  .home-hero-nav__logo-img {
    height: 3rem;
  }
}

@media (max-width: 767.98px) {
  .home-hero-nav {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem;
    min-height: 3.25rem;
    padding: 0.5rem 1rem;
  }

  .home-hero-nav__side--left {
    display: none;
  }

  .home-hero-nav__side--right {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
  }

  .home-hero-nav__logo {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: none;
    pointer-events: auto;
  }

  .home-hero-nav__logo-img {
    height: 2rem;
    max-width: min(9.5rem, 52vw);
  }
}

.home-hero-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: #111111;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.home-hero-nav__link:hover,
.home-hero-nav__link:focus-visible {
  background-color: #ffffff;
  outline: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.home-hero-nav__menu-btn {
  position: relative;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .home-hero-nav__menu-btn {
    display: none;
  }
}

.home-hero-nav__menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #374151;
  cursor: pointer;
}

.home-hero-nav__dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 50;
  width: min(18rem, calc(100vw - 2rem));
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 0.5rem 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.home-hero-nav__dropdown-link {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  text-decoration: none;
}

.home-hero-nav__dropdown-divider {
  margin: 0.375rem 0;
  border-top: 1px solid #f3f4f6;
}

/* Hero content area (gradient is on .home-intro) */
.home-hero {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.home-hero__inner {
  position: relative;
  z-index: 3;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 75rem;
  padding: 1rem 1rem 0;
}

@media (min-width: 640px) {
  .home-hero__inner {
    padding: 1.5rem 1.5rem 0;
  }
}

@media (min-width: 1024px) {
  .home-hero__inner {
    padding: 2rem 2rem 0;
  }
}

.home-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.5rem;
  text-align: center;
}

@media (min-width: 1024px) {
  .home-hero__content {
    padding-top: 3.5rem;
  }
}

.home-hero__title {
  max-width: 57.5rem;
  font-size: clamp(1.75rem, 4.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #111111;
}

.home-hero__title-highlight {
  color: #0a65fc;
}

.home-hero__subtitle {
  margin-top: 1rem;
  max-width: 46.375rem;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: #111111;
}

.home-hero__cta-row {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .home-hero__cta-row {
    flex-direction: row;
    gap: 1.25rem;
    margin-top: 2rem;
  }
}

.home-hero__cta-caption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.home-hero-app-badge {
  display: block;
  width: 11.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .home-hero-app-badge {
    width: 13.75rem;
  }
}

.home-hero-app-badge img {
  display: block;
  width: 100%;
  height: auto;
}

/* Provider sits on the curve; waist tucks behind app panel (mockup layering) */
.home-intro__provider {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  margin-top: clamp(0.5rem, 2vw, 1.5rem);
  margin-bottom: clamp(-4rem, -12vw, -9rem);
  line-height: 0;
  pointer-events: none;
}

.home-intro__provider-img {
  width: auto;
  height: auto;
  max-width: min(92vw, 22rem);
  object-fit: contain;
  object-position: bottom center;
}

@media (min-width: 640px) {
  .home-intro__provider-img {
    max-width: min(88vw, 34rem);
  }
}

@media (min-width: 1024px) {
  .home-intro__provider-img {
    max-width: min(90vw, 46rem);
  }
}

@media (max-width: 767.98px) {
  /* Full provider visible; phones sit below without clipping */
  .home-intro__provider {
    z-index: 1;
    margin-top: 0.75rem;
    margin-bottom: 0;
    padding: 0 0.5rem;
  }

  .home-intro__provider-img {
    display: block;
    width: 100%;
    max-width: min(92vw, 26rem);
    height: auto;
    object-fit: contain;
    object-position: bottom center;
  }
}

/* Sticky header on public subpages (terms, area, contact, etc.) */
.home-public-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 0.75rem 1rem;
}

.home-public-header__inner {
  max-width: var(--home-nav-max);
  margin: 0 auto;
}

.home-hero-nav--subpage {
  max-width: none;
  margin: 0;
}
