/* ── NAV ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 26px;
  width: auto;
  filter: invert(45%) sepia(60%) saturate(500%) hue-rotate(145deg)
    brightness(90%);
}

.nav-logo-text {
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.nav-logo-text span {
  color: var(--teal);
}

/* ── HERO / SELECTOR SECTION ── */
.selector-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 88px 32px 32px;
  position: relative;
  background: var(--white);
  overflow: hidden;
}

.selector-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 100% 55% at 50% 0%,
      oklch(94% 0.06 192 / 0.55) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 55% 50% at 10% 100%,
      oklch(94% 0.06 192 / 0.3) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 55% 50% at 90% 100%,
      oklch(94% 0.06 192 / 0.25) 0%,
      transparent 60%
    );
  pointer-events: none;
}

.selector-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    black 10%,
    transparent 80%
  );
  opacity: 0.35;
  pointer-events: none;
}

.selector-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ── HEADER TEXT ── */
.selector-header {
  text-align: center;
  max-width: 960px;
}

.selector-subtitle {
  font-family: var(--ff-display);
  font-size: clamp(20px, 2vw, 36px);
  line-height: 1.1;
  color: var(--ink);
  margin-top: 20px;
  text-wrap: pretty;
  margin-bottom: 36px;
}

.selector-tagline {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
  margin-top: 12px;
}

.selector-prompt {
  font-size: 15px;
  font-weight: 500;
  color: var(--teal-dark);
  letter-spacing: 0.01em;
  margin-top: 10px;
}

/* ── CARDS (shared styles, used in both hub and mobile stack) ── */
.selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 960px;
}

/* ── HUB LAYOUT ── */
.selector-hub-wrap {
  width: 100%;
}

.hub-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 100px;
  row-gap: 40px;
  align-items: center;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  position: relative;
}

/* SVG connector lines layer */
.hub-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

/* TMP Center Circle */
.hub-center {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  position: relative;
  z-index: 3;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--teal-mid);
  box-shadow:
    0 0 0 10px oklch(94% 0.06 192 / 0.18),
    0 0 0 22px oklch(94% 0.06 192 / 0.08),
    0 4px 32px oklch(56% 0.13 192 / 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 20px 16px;
  animation: hubPulse 3.5s ease-in-out infinite;
}

@keyframes hubPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 10px oklch(94% 0.06 192 / 0.18),
      0 0 0 22px oklch(94% 0.06 192 / 0.08),
      0 4px 32px oklch(56% 0.13 192 / 0.15);
  }
  50% {
    box-shadow:
      0 0 0 14px oklch(94% 0.06 192 / 0.22),
      0 0 0 30px oklch(94% 0.06 192 / 0.1),
      0 6px 40px oklch(56% 0.13 192 / 0.22);
  }
}

.hub-center-logo {
  height: 34px;
  width: auto;
  filter: invert(45%) sepia(60%) saturate(500%) hue-rotate(145deg)
    brightness(90%);
}

.hub-center-name {
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--teal-dark);
  line-height: 1.4;
  text-transform: uppercase;
}

.hub-center-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
  font-style: italic;
}

/* Hub Cards — grid placement */
.hub-card {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hub-card-caregiver {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 340px;
}

.hub-card-provider {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  width: 340px;
}

.hub-card-ehr {
  grid-column: 1 / 4;
  grid-row: 2;
  justify-self: center;
  align-self: start;
  width: 340px;
}

.hub-card-ehr .card-image-hero img {
  height: 160px;
}

/* SVG Flow Line styles */
.hub-line {
  stroke: oklch(56% 0.13 192 / 0.22);
  stroke-width: 1.5;
  fill: none;
}

.hub-dot {
  fill: var(--teal);
  opacity: 0.7;
}

.selector-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 160px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 24px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.18s;
  position: relative;
  overflow: hidden;
}

.selector-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    oklch(94% 0.06 192 / 0.4) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.selector-card:hover {
  border-color: var(--teal-mid);
  box-shadow: 0 8px 40px oklch(56% 0.13 192 / 0.12);
  transform: translateY(-4px);
}

.selector-card:hover::before {
  opacity: 1;
}

.selector-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-color: var(--teal);
}

.selector-card:focus:not(:focus-visible) {
  outline: none;
}

.card-image-hero {
  margin: -28px -28px 0;
  line-height: 0;
}

.card-image-hero img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-icon {
  width: 120px;
  height: 120px;
  background: var(--teal-light);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.selector-card:hover .card-icon {
  background: oklch(88% 0.08 192);
}

.card-icon svg {
  width: 60px;
  height: 60px;
  color: var(--teal-dark);
}

.card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.card-title {
  font-family: var(--ff-display);
  font-size: 24px;
  line-height: 1.15;
  color: var(--ink);
}

.card-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-top: 8px;
  background: var(--teal-light);
  color: var(--teal-dark);
  flex-shrink: 0;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.card-cta svg {
  width: 16px;
  height: 16px;
}

.selector-card:hover .card-cta {
  transform: scale(1.1);
}

/* ── FOOTER ── */
.footer {
  background: var(--navy);
  color: oklch(65% 0.02 240);
  padding: 32px;
  text-align: center;
  font-size: 12px;
}

.footer a {
  color: oklch(65% 0.02 240);
  text-decoration: none;
  transition: color 0.15s;
}

.footer a:hover {
  color: var(--teal-mid);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hub-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-bottom: 8px;
  }

  .hub-svg {
    display: none;
  }

  .hub-center {
    display: none;
  }

  .hub-card,
  .hub-card-caregiver,
  .hub-card-provider,
  .hub-card-ehr {
    width: 100%;
    max-width: 480px;
    grid-column: unset;
    grid-row: unset;
    justify-self: unset;
    align-self: unset;
  }

  .selector-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}
