/* ============================================================
   Entrance pages - sign in, sign up, billing and the other pages outside the app (no_nav.html): a card on the dark
   backdrop at the top of the marketing site's landing page, tinted by the brand's own colors (--entrance-rgb and
   --entrance-accent-rgb, set by no_nav.html) so branded sites get their own version of it.

   Card rules are wrapped in :where(.entrance) so they're no more specific than the pages' own .content-card rules,
   which come later and so can still size the card.
   ============================================================ */

.entrance {
  --e-brand: rgb(var(--entrance-rgb));
  --e-accent: rgb(var(--entrance-accent-rgb));
  --e-ink: color-mix(in oklab, var(--e-brand) 34%, #050a16);
  --e-deep: color-mix(in oklab, var(--e-brand) 70%, #0b1426);
  --e-text: #14171f;
  --e-text-soft: #4a5160;
  --e-text-mute: #7b8290;
  --e-line: #e7e3da;
  --e-line-strong: #d6d1c4;

  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  overflow-y: auto;
  color: var(--e-text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.entrance > .background {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 700px 500px at 108% 6%, rgba(255, 255, 255, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 620px 480px at -8% 96%, color-mix(in oklab, var(--e-accent) 45%, transparent) 0%, transparent 62%),
    linear-gradient(135deg, var(--e-ink) 0%, var(--e-deep) 50%, var(--e-brand) 100%);
}
.entrance > .background::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, #000 0%, transparent 100%);
          mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, #000 0%, transparent 100%);
}
/* a soft glow behind the card */
.entrance > .background::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 760px;
  height: 760px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.13) 0%, transparent 62%);
}

.entrance-top,
.entrance-bottom {
  flex: 1 0 40px;
}
.entrance-bottom {
  flex-grow: 2;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 13px;
}
.entrance-bottom a { color: #fff; }

.entrance-middle {
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

/* ---------- the card ---------- */
:where(.entrance) .content-card {
  width: 460px;
  max-width: 100%;
  margin: 0;
  padding: 40px 44px 36px;
  border: none;
  border-radius: 22px;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 40px 90px -30px rgba(3, 8, 20, 0.6),
    0 12px 30px -12px rgba(3, 8, 20, 0.35);
  color: var(--e-text);

  /* the app's form widgets, reshaped to the marketing site's fields */
  --curvature: 10px;
  --curvature-widget: 10px;
  --color-widget-border: var(--e-line-strong);
  --color-widget-text: var(--e-text);
  --color-placeholder: var(--e-text-mute);
  --temba-textinput-padding: 12px 14px;
  --temba-textinput-font-size: 15px;
  --widget-box-shadow: none;
  --color-focus: var(--e-brand);
  --widget-box-shadow-focused: 0 0 0 3px rgba(var(--entrance-rgb), 0.18);
  --color-primary-dark: var(--e-brand);
  --color-link-primary: var(--e-brand);
}

/* the sign in and sign up forms are a little wider than allauth's 400px, and its signed in pages have a menu */
.entrance .content-card:has(.panels.signin) { max-width: 440px; }
.entrance .content-card:has(.panels .menu) { width: 820px; }

.entrance-card-head {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.entrance-card-head:has(.top-right > *) { justify-content: space-between; }
.entrance-card-head .brand a { display: block; }
:where(.entrance) .main-logo {
  display: block;
  max-width: 200px;
  max-height: 48px;
  margin: 0;
}

/* ---------- type ---------- */
.entrance .content-card h1,
.entrance .content-card .page-title,
.entrance .panels.signin h2:first-of-type {
  margin: 0 0 8px;
  padding: 0;
  border: none;
  color: var(--e-text);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.entrance .content-card h2 {
  color: var(--e-text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.entrance .content-card p,
.entrance .content-card .summary {
  color: var(--e-text-soft);
  font-size: 15px;
  line-height: 1.55;
}
.entrance .content-card a:not([type="button"]):not([class*="button"]) {
  color: color-mix(in oklab, var(--e-brand) 82%, #000);
  font-weight: 500;
}
.entrance .content-card a:not([type="button"]):not([class*="button"]):hover {
  color: var(--e-brand);
  text-decoration: none;
}

/* sign in and sign up read as a centered welcome (sign up's is an h2 and a div) */
.entrance .panels.signin h1,
.entrance .panels.signin h1 + p,
.entrance .panels.signin h2:first-of-type,
.entrance .panels.signin h2:first-of-type + div,
.entrance .sign-in-notice {
  text-align: center;
}
.entrance .panels.signin h2:first-of-type + div { color: var(--e-text-soft); font-size: 15px; line-height: 1.55; }
.entrance .panels.signin > .flex-grow { margin-right: 0; }
.entrance .panels.signin p { text-align: center; }
.entrance .panels.signin form ~ p { margin-top: 18px; font-size: 14px; }
.entrance .field.first_name_container,
.entrance .field.last_name_container { width: calc(50% - 6px); }
.entrance .field.first_name_container { margin-right: 8px; }
.entrance .sign-in-notice {
  margin-top: 22px;
  color: var(--e-text-soft);
  font-size: 14px;
}

/* ---------- the signed in account pages' menu ---------- */
.entrance .panels .menu {
  margin-right: 36px;
  padding: 4px 28px 0 0;
  border-color: var(--e-line);
}
.entrance .panels .menu ul { margin: 0; padding: 0; list-style: none; }
.entrance .panels .menu li a {
  display: block;
  margin-bottom: 2px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--e-text-soft) !important;
  font-size: 14.5px;
  font-weight: 500;
}
.entrance .panels .menu li a:hover { background: #f4f2ec; color: var(--e-text) !important; }
.entrance .panels .menu li.active a {
  background: rgba(var(--entrance-rgb), 0.1);
  color: color-mix(in oklab, var(--e-brand) 80%, #000) !important;
}

/* ---------- fields ---------- */
.entrance .content-card .field { margin-top: 16px; }
.entrance .content-card .help-text,
.entrance .content-card .help-text a {
  font-size: 13px;
}
.entrance .content-card input[type="text"],
.entrance .content-card input[type="email"],
.entrance .content-card input[type="password"],
.entrance .content-card input[type="number"] {
  padding: 12px 14px;
  border: 1px solid var(--e-line-strong);
  border-radius: 10px;
  box-shadow: none;
  color: var(--e-text);
  font-size: 15px;
}
.entrance .content-card input:focus {
  border-color: var(--e-brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--entrance-rgb), 0.18);
}

/* ---------- buttons ---------- */
.entrance .content-card button[type="submit"],
.entrance .content-card input[type="submit"],
.entrance .content-card .button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  margin-top: 22px;
  padding: 13px 24px;
  border: none;
  border-radius: 999px;
  background: var(--e-brand);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 8px 18px -8px rgba(var(--entrance-rgb), 0.7);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.entrance .content-card button[type="submit"]:hover,
.entrance .content-card input[type="submit"]:hover,
.entrance .content-card .button-primary:hover {
  background: color-mix(in oklab, var(--e-brand) 80%, #000);
  transform: translateY(-1px);
}
.entrance .panels.signin button[type="submit"],
.entrance .content-card form#subscription-form button[type="submit"] {
  display: flex;
  width: 100%;
}
.entrance .content-card .button-danger {
  background: #c9372c;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 8px 18px -8px rgba(201, 55, 44, 0.7);
}
.entrance .content-card .button-danger:hover { background: #a82b22; }
.entrance .content-card .button-light {
  height: auto;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  text-align: center;
}

/* ---------- single sign on ---------- */
.entrance .sso-providers {
  margin: 22px 0 0;
  padding: 0;
  border: none;
  background: none;
  list-style: none;
}
.entrance .sso-providers::before {
  content: "or";
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  color: var(--e-text-mute);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.entrance .sso-providers::before {
  background:
    linear-gradient(var(--e-line), var(--e-line)) left center / calc(50% - 22px) 1px no-repeat,
    linear-gradient(var(--e-line), var(--e-line)) right center / calc(50% - 22px) 1px no-repeat;
  justify-content: center;
}
.entrance .sso-providers li + li { margin-top: 10px; }
.entrance .sso-providers a[type="button"] {
  margin: 0;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--e-line-strong);
  border-radius: 999px;
  background-color: #fff;
  background-position: 18px 50% !important;
  color: var(--e-text);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.entrance .sso-providers a[type="button"]:hover {
  border-color: var(--e-brand);
  background-color: #fff;
  transform: translateY(-1px);
}
.entrance .sso-providers a[title="UNICEF"] { background-position: 14px 50% !important; }

/* ---------- alerts ---------- */
.entrance .content-card .errorlist {
  border-radius: 10px;
}

/* ---------- phones ---------- */
@media (max-width: 540px) {
  .entrance-top,
  .entrance-bottom { flex-basis: 16px; }
  :where(.entrance) .content-card {
    padding: 30px 22px 26px;
    border-radius: 18px;
  }
  .entrance .content-card h1,
  .entrance .content-card .page-title { font-size: 24px; }
}

/* ============================================================
   A branded site's landing page (public/public_index.html)
   ============================================================ */
.bl-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.bl-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid rgba(var(--entrance-rgb), 0.18);
}
.bl-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 84px;
}
.bl-logo { display: block; }
.bl-nav .main-logo { max-height: 44px; max-width: 220px; }
.bl-nav-actions { display: flex; align-items: center; gap: 10px; }

.bl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.bl-btn:hover { text-decoration: none; transform: translateY(-1px); }
.bl-btn-lg { padding: 14px 26px; }
.bl-btn-primary {
  background: var(--e-brand);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 8px 18px -8px rgba(var(--entrance-rgb), 0.7);
  color: #fff !important;
}
.bl-btn-primary:hover { background: color-mix(in oklab, var(--e-brand) 80%, #000); }
.bl-btn-ghost {
  border: 1px solid rgba(var(--entrance-rgb), 0.35);
  background: rgba(var(--entrance-rgb), 0.08);
  color: color-mix(in oklab, var(--e-brand) 80%, #000) !important;
}
.bl-btn-ghost:hover { border-color: var(--e-brand); }
.bl-btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}
.bl-btn-outline:hover { background: rgba(255, 255, 255, 0.16); }
/* on the dark hero the primary button is white, so it stands off the brand color behind it */
.bl-hero .bl-btn-primary {
  background: #fff;
  box-shadow: 0 10px 24px -10px rgba(3, 8, 20, 0.6);
  color: color-mix(in oklab, var(--e-brand) 75%, #000) !important;
}
.bl-hero .bl-btn-primary:hover { background: #f2f4f8; }

.bl-hero {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  padding: 88px 0 110px;
  color: #fff;
}
.bl-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 64px;
}
.bl-hero.no-image .bl-hero-inner { grid-template-columns: minmax(0, 760px); justify-content: center; text-align: center; }
.bl-hero.no-image .bl-cta { justify-content: center; }
.bl-hero.no-copy .bl-hero-inner {
  grid-template-columns: minmax(0, 960px);
  justify-content: center;
  justify-items: center;
  gap: 40px;
}

.bl-copy h1 {
  margin: 0 0 22px;
  color: #fff;
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.bl-body {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.6;
}
.bl-body p { margin: 0; }
.bl-body > * + * { margin-top: 14px !important; }
.bl-body a {
  color: #fff;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}
.bl-body a:hover { text-decoration-color: #fff; }
.bl-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.bl-hero.no-copy .bl-cta { margin-top: 0; }

.bl-art { position: relative; }
.bl-art::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16) 0%, transparent 100%);
}
.bl-hero-image {
  display: block;
  width: 100%;
  height: auto;
  border: 6px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 40px 90px -30px rgba(3, 8, 20, 0.7), 0 12px 30px -12px rgba(3, 8, 20, 0.4);
  background-clip: padding-box;
}

@media (max-width: 900px) {
  .bl-hero { padding: 56px 0 72px; }
  .bl-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 44px; }
}
@media (max-width: 540px) {
  .bl-container { padding: 0 16px; }
  .bl-nav-inner { min-height: 68px; }
  .bl-nav .main-logo { max-height: 34px; max-width: 150px; }
  .bl-nav .bl-btn-ghost { display: none; }
  .bl-body { font-size: 16px; }
}
