/* Public marketing pages: home, user role selection, unified login */

.public-page {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.75rem 1rem 0.85rem;
  box-sizing: border-box;
}

.public-page .public-brand {
  margin-bottom: 0.5rem;
}

.public-page .public-brand-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.2rem;
}

.public-page .public-brand-name {
  font-size: 1.05rem;
}

.public-page .public-brand-tagline {
  font-size: 0.7rem;
}

.public-brand {
  text-align: center;
  margin-bottom: 1rem;
}

.public-brand-link {
  display: inline-block;
  text-decoration: none !important;
  color: inherit;
}

.public-brand-icon {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 0.35rem;
  display: block;
  object-fit: contain;
}

.public-brand-name {
  margin: 0;
  font-family: 'Nunito', 'Lato', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #4c1d95;
}

.public-brand-tagline {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.public-brand-tagline--connection {
  color: #6d28d9;
}

.public-brand-tagline--trust .tag-care {
  color: #2563eb;
}

.public-brand-tagline--trust .tag-compassion {
  color: #db2777;
}

.public-brand-tagline--trust .tag-trust {
  color: #0d9488;
}

/* Home landing — matches mobile mockup, fits one viewport */
.public-home {
  max-width: 26rem;
  margin: 0 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.public-home-hero {
  flex: 0 0 auto;
  padding: 0.6rem 1.1rem 0.45rem;
}

.public-home-hero .public-brand {
  margin-bottom: 0;
}

.public-home-hero .public-brand-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.2rem;
}

.public-home-hero .public-brand-name {
  font-size: 1.05rem;
}

.public-home-hero .public-brand-tagline {
  font-size: 0.7rem;
  color: #6b7280;
  font-weight: 600;
}

.public-home-title {
  margin: 0 0 0.4rem;
  font-family: 'Nunito', 'Lato', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.18;
  text-align: left;
  color: #4c1d95;
}

.public-home-title-accent {
  display: block;
  color: #7c3aed;
}

.public-home-lead {
  margin: 0;
  text-align: left;
  color: #374151;
  font-size: 0.72rem;
  line-height: 1.45;
}

.public-home-video-wrap {
  position: relative;
  overflow: hidden;
  background: #e5e7eb;
  flex: 1 1 auto;
  min-height: 0;
}

.public-home-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

.public-home-hero-overlay {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  right: 38%;
  z-index: 1;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(1.5px);
  border-radius: 0.75rem;
  padding: 0.65rem 0.7rem;
}

.public-home-video-wrap.is-playing .public-home-hero-overlay {
  display: none;
}

.public-home-play-btn {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.public-home-play-circle {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 9999px;
  background: #fff;
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.public-home-play-circle svg {
  margin-left: 0.2rem;
}

.public-home-video-wrap.is-playing .public-home-play-btn {
  display: none;
}

.public-home-panel {
  flex: 0 0 auto;
  margin-top: -1.25rem;
  padding: 0.9rem 1.1rem 0.85rem;
  border-radius: 1.5rem 1.5rem 0 0;
  background: #fff;
  box-shadow: 0 -8px 28px rgba(91, 33, 182, 0.08);
  position: relative;
  z-index: 1;
}

.public-home-learn-btn {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(180deg, #b060f8 0%, #7c3aed 45%, #5b21b6 100%);
  color: #fff;
  font-family: 'Nunito', 'Lato', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.25), inset 0 -3px 6px rgba(0,0,0,0.2), 0 7px 20px rgba(109,40,217,0.45), 0 3px 0 rgba(55,10,130,0.5);
  position: relative;
  overflow: hidden;
}

.public-home-learn-btn:hover {
  filter: brightness(1.04);
}

.public-home-learn-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.public-home-learn-text {
  text-align: center;
}

.public-home-learn-chevron {
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.95;
}

.public-home-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0.75rem 0 0.7rem;
}

.public-home-feature {
  text-align: center;
  color: #1f2937;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 0.1rem 0.2rem;
}

.public-home-feature + .public-home-feature {
  border-left: 1px solid #e9d5ff;
}

.public-home-feature svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0 auto 0.3rem;
  box-sizing: content-box;
  padding: 0.4rem;
  border-radius: 9999px;
  background: #ede9fe;
  color: #6d28d9;
}

.public-home-quote {
  margin: 0;
  padding: 0.6rem 0.7rem 0.6rem 2.1rem;
  border-radius: 0.85rem;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  position: relative;
  color: #4c1d95;
  font-size: 0.66rem;
  line-height: 1.45;
}

.public-home-quote p {
  margin: 0;
}

.public-home-quote strong {
  color: #5b21b6;
}

.public-home-quote-mark {
  position: absolute;
  left: 0.65rem;
  top: 0.35rem;
  font-size: 2rem;
  line-height: 1;
  color: #a78bfa;
  font-family: Georgia, serif;
}

.public-quote-box {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1rem;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  padding: 0.65rem 0.85rem;
}

.public-quote-icon {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.public-quote-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-quote-text {
  margin: 0;
  color: #374151;
  font-size: 0.66rem;
  line-height: 1.45;
  text-align: left;
}

.public-quote-box strong {
  color: #6d28d9;
}

/* btn-glassy button group for role selection cards */
.public-role-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.public-role-btn-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
  max-width: 300px;
}

.public-role-btn-pair .btn-glassy {
  max-width: none;
  min-width: 0;
  width: 100%;
}

.public-login-submit-wrap {
  display: flex;
  justify-content: center;
}

/* Role selection (user page) */
.public-role-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
}

.public-role-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ede9fe;
  box-shadow: 0 6px 20px rgba(91, 33, 182, 0.12);
  padding: 0.75rem;
}

.public-role-top {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex: 1 1 0;
  min-height: 0;
}

.public-role-text {
  flex: 1 0 46%;
  min-width: 0;
  padding-bottom: 0.25rem;
}

.public-role-top img {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  display: block;
  border-radius: 0.6rem;
}

.public-role-title {
  margin: 0 0 0.3rem;
  font-family: 'Nunito', 'Lato', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
  color: #4c1d95;
}

.public-role-subtitle {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #6b7280;
}

.public-role-btn-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 0.5rem;
  align-items: stretch;
}

.public-btn-card-outline {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 2.6rem;
  padding: 0.3rem 0.4rem;
  border-radius: 9999px;
  border: none;
  background: linear-gradient(180deg, #b060f8 0%, #7c3aed 45%, #5b21b6 100%);
  color: #fff;
  font-family: 'Nunito', 'Lato', sans-serif;
  font-weight: 800;
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none !important;
  line-height: 1.25;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.25), inset 0 -3px 5px rgba(0,0,0,0.18), 0 5px 15px rgba(109,40,217,0.4), 0 3px 0 rgba(55,10,130,0.45);
  position: relative;
  overflow: hidden;
}

.public-btn-card-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.6rem;
  padding: 0.3rem 0.6rem;
  border-radius: 9999px;
  border: none;
  background: linear-gradient(180deg, #b060f8 0%, #7c3aed 45%, #5b21b6 100%);
  color: #fff;
  font-family: 'Nunito', 'Lato', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.25), inset 0 -3px 6px rgba(0,0,0,0.2), 0 6px 16px rgba(109,40,217,0.4), 0 3px 0 rgba(55,10,130,0.5);
  position: relative;
  overflow: hidden;
}

/* keep old btn classes for any other usage */
.public-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 9999px;
  border: none;
  background: linear-gradient(180deg, #b060f8 0%, #7c3aed 45%, #5b21b6 100%);
  color: #fff;
  font-family: 'Nunito', 'Lato', sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none !important;
  line-height: 1.2;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.25), inset 0 -3px 5px rgba(0,0,0,0.18), 0 5px 15px rgba(109,40,217,0.4), 0 3px 0 rgba(55,10,130,0.45);
  position: relative;
  overflow: hidden;
}

.public-btn-solid-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 9999px;
  border: none;
  background: linear-gradient(180deg, #b060f8 0%, #7c3aed 45%, #5b21b6 100%);
  color: #fff;
  font-family: 'Nunito', 'Lato', sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.25), inset 0 -3px 5px rgba(0,0,0,0.18), 0 5px 15px rgba(109,40,217,0.4), 0 3px 0 rgba(55,10,130,0.45);
  position: relative;
  overflow: hidden;
}

.public-btn-outline:hover,
.public-btn-solid-sm:hover,
.public-btn-card-outline:hover,
.public-btn-card-solid:hover {
  filter: brightness(1.06);
}

/* 3D gloss overlay — top-half highlight */
.public-home-learn-btn::before,
.public-btn-card-outline::before,
.public-btn-card-solid::before,
.public-btn-outline::before,
.public-btn-solid-sm::before,
.public-login-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 100%);
  border-radius: 9999px 9999px 100% 100% / 9999px 9999px 80% 80%;
  pointer-events: none;
}

/* 3D shine dots — top-left corner */
.public-home-learn-btn::after,
.public-btn-card-outline::after,
.public-btn-card-solid::after,
.public-btn-outline::after,
.public-btn-solid-sm::after,
.public-login-submit::after {
  content: '';
  position: absolute;
  top: 0.35rem;
  left: 0.65rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.72);
  box-shadow: 0.46rem 0.04rem 0 rgba(255,255,255,0.5);
  pointer-events: none;
}

/* Unified login */
.public-login-page {
  position: relative;
  max-width: 28rem;
  margin: 0 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.75rem 1rem 0.85rem;
  box-sizing: border-box;
}

.public-login-page .public-brand {
  align-self: flex-start;
  display: inline-block;
  text-align: center;
  margin-bottom: 0.5rem;
}

.public-login-page .public-brand-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.2rem;
}

.public-login-page .public-brand-name {
  font-size: 1.05rem;
}

.public-login-page .public-brand-tagline {
  font-size: 0.7rem;
}

.public-login-hero-img {
  position: absolute;
  top: 0;
  right: 0;
  width: 44%;
  max-width: 10.5rem;
  height: auto;
  pointer-events: none;
  z-index: 0;
  border-bottom-left-radius: 1.25rem;
}

.public-login-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 0.5rem;
}

.public-login-welcome {
  font-family: 'Nunito', 'Lato', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #6d28d9;
  margin: 0 0 0.3rem;
}

.public-login-lead {
  color: #4b5563;
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0 0 0.9rem;
  max-width: 52%;
}

.public-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.public-input-wrap {
  position: relative;
}

.public-input-wrap > svg {
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 1.1rem;
  height: 1.1rem;
  box-sizing: content-box;
  padding: 0.45rem;
  border-radius: 9999px;
  background: #6d28d9;
  color: #fff;
  pointer-events: none;
}

.public-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  min-height: 3rem;
  padding: 0.6rem 2.75rem 0.6rem 3.1rem;
  border: 1px solid #ede9fe;
  border-radius: 9999px;
  background: #fff;
  color: #4c1d95;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(91, 33, 182, 0.1);
}

.public-input-wrap input::placeholder {
  color: #6b7280;
  opacity: 0.9;
}

.public-input-wrap input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #7c3aed, 0 4px 14px rgba(91, 33, 182, 0.1);
}

.public-input-wrap .password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.public-login-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6d28d9;
  font-weight: 700;
  font-size: 0.9rem;
}

.public-login-remember input {
  width: 1rem;
  height: 1rem;
  accent-color: #7c3aed;
}

.public-login-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #6d28d9;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0.25rem 0;
}

.public-login-divider::before,
.public-login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #c4b5fd;
}

.public-login-submit-wrap {
  margin-top: 0.25rem;
}

.public-login-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 3rem;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(180deg, #b060f8 0%, #7c3aed 45%, #5b21b6 100%);
  color: #fff;
  font-family: 'Nunito', 'Lato', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.25), inset 0 -3px 6px rgba(0,0,0,0.2), 0 7px 20px rgba(109,40,217,0.45), 0 3px 0 rgba(55,10,130,0.5);
  overflow: hidden;
  cursor: pointer;
}

.public-login-submit svg {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  box-sizing: content-box;
  padding: 0.3rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
}

.public-login-forgot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.public-login-forgot svg {
  flex-shrink: 0;
  color: #7c3aed;
}

.public-login-thanks {
  margin-top: auto;
  padding: 0.85rem;
  border-radius: 1rem;
  background: #faf5ff;
  border: 1px solid #ede9fe;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.public-login-thanks-icon {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(91, 33, 182, 0.15);
}

.public-login-thanks-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.public-login-thanks-body {
  flex: 1;
  min-width: 0;
}

.public-login-thanks-title {
  margin: 0 0 0.2rem;
  font-family: 'Nunito', 'Lato', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #6d28d9;
}

.public-login-thanks-text {
  margin: 0;
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .public-page {
    max-width: 80%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .public-home,
  .public-login-page {
    max-width: 40%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* Home: video fills the vertical space showing the whole frame */
  .public-home-video-wrap {
    flex: 1 1 auto;
    min-height: 0;
    background: #fff;
  }

  .public-home-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
  }

  .public-home-panel {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* Role page: logo on top, cards side by side filling the height */
  .public-role-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    flex: 1 1 auto;
    min-height: 0;
  }

  .public-role-card {
    padding: 1.1rem;
  }

  .public-role-top {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 0.6rem;
  }

  .public-role-top img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .public-role-text {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    right: 42%;
    z-index: 1;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(1.5px);
    border-radius: 0.75rem;
    padding: 0.75rem 0.85rem;
  }

  .public-role-title {
    font-size: 1rem;
  }

  .public-role-subtitle {
    font-size: 0.8rem;
  }

  .public-login-hero-img {
    max-width: 16rem;
  }

  .public-login-welcome {
    margin-top: 3rem;
  }

  .public-login-form {
    margin-top: 5rem;
  }

  .public-login-thanks {
    margin-top: 1.5rem;
  }
}

@media (max-width: 767px) {
  /* All 3 buttons in a single compact row — no scrolling needed */
  .public-role-btns {
    flex-direction: row;
    align-items: stretch;
    gap: 0.3rem;
  }

  /* Dissolve the pair wrapper so LOG IN and REGISTER join the same flex row */
  .public-role-btn-pair {
    display: contents;
  }

  /* Equal-width compact buttons */
  .public-role-btns .btn-glassy {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
  }

  .public-role-btns .btn-glassy.btn-glassy-font-lg {
    font-size: 11px !important;
  }

  /* Higher specificity to override base.html's a.btn-glassy.btn-glassy-register-role (0,2,1) */
  .public-role-btns .btn-glassy.btn-glassy-register-role {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
  }
}
