/* ============================================================
   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;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;  /* the default dark thumb vanishes on the dark backdrop */
  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;
}

/* the nav stays put and only the hero beneath it scrolls, so the scrollbar doesn't run down beside the nav */
.entrance:has(> .bl-nav) { overflow: hidden; }
.bl-nav {
  flex: none;
  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;
}
/* buttons, not links, whatever a brand's custom CSS does to links */
.bl-btn,
.bl-btn:hover { text-decoration: none !important; }
.bl-btn:hover { 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 1 auto;
  align-items: flex-start;  /* not stretched to the scroller's height, so the content's bottom padding follows its end */
  min-height: 0;
  overflow-x: hidden;  /* never sideways, whatever sticks out, e.g. the glow behind the hero image */
  overflow-y: auto;
  color: #fff;
}
/* stacked: the hero image as a wide banner, with the copy in a readable column beneath it - brand heroes are all
   shapes and pitches all lengths, and a side-by-side split only balances when the two happen to match */
.bl-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: center;
  gap: 56px;
  /* on the content rather than the scrolling hero, where it would be lost past the last line */
  padding-top: 64px;
  padding-bottom: 120px;
}
/* one column for both, so the banner and the copy beneath it share their edges */
.bl-art,
.bl-copy { width: 100%; max-width: 760px; }
.bl-copy h1 { text-align: center; }
/* with just one of the two there's no banner to lead with, so it sits in the middle of the page */
.bl-hero.no-image,
.bl-hero.no-copy { align-items: safe center; }
.bl-hero.no-image .bl-hero-inner { text-align: center; }
.bl-hero.no-image .bl-cta { justify-content: center; }
.bl-hero.no-copy .bl-hero-inner { 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;
  overflow-wrap: anywhere;  /* brands' copy can have long URLs and addresses */
}
.bl-body :is(img, video, iframe, table) { max-width: 100%; }
.bl-body img { height: auto; }
.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;
}

/* an overhanging hero: the frame starts --overhang% down the image, and a copy of the image clipped to the part above
   it sits on top, so whatever crosses that line (e.g. a phone) is drawn over the frame's border */
/* padded by the frame width so the frame's border lands on the column's edges like a plain hero's does */
.bl-art-overhang { --frame: 6px; padding: 0 var(--frame); }
.bl-hero-overhang {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  /* a little past the frame's edge, over the same pixels of the photo, as meeting it exactly lands on a fraction of a
     pixel where both edges blend and the frame shows through as a hairline - but clear of its rounded corners */
  --line: calc(var(--overhang) * 1%);
  clip-path: polygon(
    0 0, 100% 0, 100% var(--line), calc(100% - 24px) var(--line), calc(100% - 24px) calc(var(--line) + 2px),
    24px calc(var(--line) + 2px), 24px var(--line), 0 var(--line)
  );
}
.bl-hero-frame {
  position: absolute;
  inset: calc(var(--overhang) * 1% - var(--frame)) 0 calc(-1 * var(--frame));
  overflow: hidden;
  border: var(--frame) 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;
}
.bl-hero-photo {
  position: absolute;
  top: calc(var(--overhang) / (100 - var(--overhang)) * -100%);
  left: 0;
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .bl-hero-inner { gap: 40px; padding-top: 40px; padding-bottom: 88px; }
}
@media (max-width: 540px) {
  .bl-container { padding-inline: 16px; }  /* not the shorthand, which would reset the hero's vertical padding */
  .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; }
}
