/* =========================================================================
   THE ENTRANCE — sign-in, sign-up, password and two-factor screens.

   One composition for every door into the product: the brand wall on the
   left, the form on the right, edge to edge. Loaded only by
   allauth/layouts/entrance.html and the client portal's sign-in, so nothing
   here can reach the application's chrome.

   Why a stylesheet and not utilities in the template:

     * the brand wall is a wash between three stops of ONE colour, and
       _check_ai_sweep.py forbids a literal gradient inside any .html — with
       good reason, since the tell it guards against is the saturated 135°
       square behind an icon. A full-height brand wall is a different object
       and it belongs where page-level treatments already live, the same way
       .vs-dash owns the Overview;
     * every colour below is derived from --color-primary with color-mix, so
       a white-labelled workspace repaints the whole door by setting one
       value. Nothing here hardcodes violet.

   The fields keep the markup allauth/elements/field.html renders — label,
   glyph, reveal button, errors. This file only changes how they are drawn:
   a rule under the field instead of a box around it.
   ========================================================================= */

.vs-entrance {
  /* The three stops of the wall, all one hue.
     --ent-ink is the colour the wall falls into: the brand mixed down into
     near-black, so a red workspace lands on deep maroon and never on our
     indigo. */
  --ent-ink: color-mix(in srgb, var(--color-primary) 16%, #0a0612);
  --ent-lift: color-mix(in srgb, var(--color-primary) 86%, white);
  --ent-rule: #e5e7eb;
  --ent-muted: #6b7280;
  /* The product's display cut. --font-display is declared in a GRC partial
     these pages do not include, so asking for it here fell back to the body
     face and the headings were never set in Space Grotesk at all. */
  --ent-display: "Space Grotesk", "Satoshi", system-ui, sans-serif;
  --ent-text: "Satoshi", system-ui, sans-serif;

  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: #fff;
}

/* ── The brand wall ─────────────────────────────────────────────────────── */

.vs-entrance__brand {
  display: none;                      /* one column until there is room */
  position: relative;
  overflow: hidden;
  flex: 0 0 56%;
  padding: clamp(40px, 5vw, 76px);
  color: #fff;
  /* Ink, lit by the brand, rather than a field of brand colour.
     The mark is a violet gradient: on a bright violet wall its petals and the
     bright wall are the same value and it reads as a smudge, which is the
     complaint that sent the first two versions back. On ink the petals glow
     and the shield holds its edge. The brand is still what colours this
     wall — it is the light on it — so a red workspace still gets a red door. */
  background:
    radial-gradient(64% 52% at 16% 10%,
      color-mix(in srgb, var(--color-primary) 82%, transparent) 0%, transparent 66%),
    radial-gradient(58% 48% at 92% 88%,
      color-mix(in srgb, var(--color-primary) 34%, transparent) 0%, transparent 62%),
    linear-gradient(158deg,
      color-mix(in srgb, var(--color-primary) 22%, var(--ent-ink)) 0%,
      var(--ent-ink) 58%,
      #070310 100%);
}

@media (min-width: 1024px) {
  .vs-entrance__brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* The arcs. Concentric, anchored past the right edge, so what crosses the
   wall is the sweep and not the circle: the same figure the lotus makes. */
.vs-entrance__arcs {
  position: absolute;
  top: 50%;
  right: -26%;
  width: 122%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.11);
  pointer-events: none;
}

/* ── The client's door is not the staff door ────────────────────────────── */

/* Same composition, mirrored, so the two read as siblings and nobody has to
   check the URL to know which one they are looking at: the sweep comes from
   the other side, the light sits in the opposite corner, and the lotus stands
   in the background as a watermark rather than only as a mark. */
.vs-entrance--portal .vs-entrance__brand {
  background:
    radial-gradient(64% 52% at 84% 10%,
      color-mix(in srgb, var(--color-primary) 82%, transparent) 0%, transparent 66%),
    radial-gradient(58% 48% at 8% 88%,
      color-mix(in srgb, var(--color-primary) 34%, transparent) 0%, transparent 62%),
    linear-gradient(202deg,
      color-mix(in srgb, var(--color-primary) 22%, var(--ent-ink)) 0%,
      var(--ent-ink) 58%,
      #070310 100%);
}

.vs-entrance--portal .vs-entrance__arcs {
  right: auto;
  left: -26%;
  transform: translateY(-50%) scaleX(-1);
}

.vs-entrance__petal {
  position: absolute;
  right: -10%;
  bottom: -18%;
  width: 74%;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

.vs-entrance__brandInner {
  position: relative;
  z-index: 1;
  max-width: 34ch;
}

/* The mark stands on a white plate, and that is not decoration.

   The lotus is a violet gradient with the shield drawn in WHITE line: on a
   violet wall the outline and the V dissolve into the background and what
   is left reads as a smudge — the first build shipped exactly that. A plate
   gives the mark its own ground, which is how a coloured logo is placed on
   a coloured surface. */
.vs-entrance__mark {
  display: block;
  width: clamp(104px, 8.5vw, 132px);
  height: auto;
  margin-bottom: clamp(34px, 4.5vw, 52px);
}

.vs-entrance__hello {
  font-family: var(--ent-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 4.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.vs-entrance__hello span {
  display: block;
}

.vs-entrance__helloLead {
  opacity: 0.72;
  font-weight: 600;
}

/* The slogan closes the composition, so it is set, not dropped in: a short
   rule, the display face, and the last two words carrying the weight. The
   sentence is the product's and is never translated. */
.vs-entrance__rule {
  width: 56px;
  height: 1px;
  border: 0;
  margin: clamp(30px, 3.6vw, 42px) 0 clamp(18px, 2vw, 24px);
  background: rgba(255, 255, 255, 0.3);
}

.vs-entrance__slogan {
  margin: 0;
  font-family: var(--ent-text);
  font-size: clamp(1.3125rem, 1.85vw, 1.6875rem);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0;
  max-width: 26ch;
  color: rgba(255, 255, 255, 0.88);
}

.vs-entrance__eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.vs-entrance__host {
  margin: 0;
  font-family: var(--ent-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

/* ── The form side ──────────────────────────────────────────────────────── */

.vs-entrance__panel {
  flex: 1 1 auto;
  min-width: 0;                       /* or the column sets the page width */
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 56px) clamp(24px, 4vw, 64px);
  background: #fff;
}

.vs-entrance__col {
  width: 100%;
  max-width: min(27rem, 100%);
  margin: 0 auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* The workspace's name, as a label over the title — not a second heading
   stranded at the top of the column with a quarter of the page underneath
   it. Small, tracked and grey, so the eye goes to the title. */
.vs-entrance__wordmark {
  font-family: var(--ent-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ca3af;
  margin: 0 0 12px;
}

.vs-entrance__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 6vh, 64px) 0;
}

.vs-entrance__title {
  font-family: var(--ent-display);
  font-weight: 600;
  font-size: clamp(1.875rem, 2.7vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #111827;
  margin: 0;
}

.vs-entrance__sub {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ent-muted);
}

.vs-entrance__sub a,
.vs-entrance__foot a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vs-entrance__sub a:hover,
.vs-entrance__foot a:hover {
  color: color-mix(in srgb, var(--color-primary) 78%, black);
}

.vs-entrance__form {
  margin-top: clamp(26px, 4vh, 38px);
}

/* ── Single sign-on ─────────────────────────────────────────────────────── */

/* The corporate door. It sits ABOVE the password form and is drawn as the
   quieter of the two actions, not the louder: it is the shortcut for people
   the directory already knows, and the brand-filled button stays with the
   deliberate act of typing a password. */
.vs-entrance__sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  /* A <button> does not inherit the page font: without this it was drawn in
     the browser's default face, heavier and wider than everything around it. */
  font-family: var(--ent-text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: #1f2937;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.vs-entrance__sso:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent);
}

.vs-entrance__sso:hover {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 4%, white);
}

.vs-entrance__sso i {
  font-size: 0.875rem;
  color: var(--color-primary);
}

.vs-entrance__or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: #9ca3af;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vs-entrance__or::before,
.vs-entrance__or::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--ent-rule);
}

/* The one paragraph a door is allowed: what happens next, when the answer
   must be the same for every address typed into the form. */
.vs-entrance__note {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #4b5563;
}

.vs-entrance__foot--alt {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--ent-rule);
}

/* The other door, drawn as a door: a quiet outlined control, not a bare
   underlined word floating under a rule. */
.vs-entrance__portal {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px 9px 13px;
  border: 1px solid var(--ent-rule);
  border-radius: 999px;
  background: #fff;
  font-family: var(--ent-text);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151 !important;
  text-decoration: none !important;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.vs-entrance__portal i {
  font-size: 0.75rem;
  color: var(--color-primary);
}
.vs-entrance__portal i:last-child {
  font-size: 0.625rem;
  color: #9ca3af;
  transition: transform 0.18s ease, color 0.18s ease;
}
.vs-entrance__portal:hover {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 4%, white);
  color: #111827 !important;
}
.vs-entrance__portal:hover i:last-child {
  transform: translateX(2px);
  color: var(--color-primary);
}

.vs-entrance__foot {
  margin: 22px 0 0;
  font-size: 0.8125rem;
  color: var(--ent-muted);
  text-align: center;
}

/* The product signs its own entrance. Sits at the foot of the form column,
   never on the wall: the wall is the workspace's half of the page. */
.vs-entrance__signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 11px;
  color: #9ca3af;
}

.vs-entrance__signature img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* ── Fields: a rule under, not a box around ─────────────────────────────── */

.vs-entrance label {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280 !important;
  margin-bottom: 6px !important;
}

/* The asterisk is noise where every field is required and the browser says
   so anyway. */
.vs-entrance label .text-red-500 {
  display: none;
}

.vs-entrance input[type="text"],
.vs-entrance input[type="email"],
.vs-entrance input[type="password"],
.vs-entrance input[type="tel"] {
  border: 0 !important;
  border-bottom: 1.5px solid var(--ent-rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 10px 40px 10px 28px !important;
  font-size: 0.9375rem !important;
  transition: border-color 0.18s ease;
}

.vs-entrance input::placeholder {
  color: #c6c8cd !important;
}

.vs-entrance input[type="text"]:focus,
.vs-entrance input[type="email"]:focus,
.vs-entrance input[type="password"]:focus,
.vs-entrance input[type="tel"]:focus {
  border-bottom-color: var(--color-primary) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* The glyph sits on the rule, not inside a box, so it loses the box's inset. */
.vs-entrance .fa-envelope,
.vs-entrance .fa-lock,
.vs-entrance .fa-user {
  margin-left: -0.25rem;
}

.vs-entrance input:-webkit-autofill,
.vs-entrance input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
}

/* Remember me: a checkbox, at the size of the text it belongs to. */
.vs-entrance input[type="checkbox"] {
  width: 1rem !important;
  height: 1rem !important;
  accent-color: var(--color-primary);
}

.vs-entrance input[type="checkbox"] + label {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #4b5563 !important;
  margin-bottom: 0 !important;
}

/* The action carries the brand and the full width of the column, and it is
   never crowded by the field above it. */
.vs-entrance__action {
  margin-top: 26px;
}

.vs-entrance__action button[type="submit"],
.vs-entrance__action a {
  border-radius: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}
