/* ==========================================================================
   Naturalistico student auth — v3 design
   --------------------------------------------------------------------------
   The sign-in page rebuilt on the homepage's v3 language (lms/css/home_v3.css):
   same tokens, same Fraunces/Inter/Poppins type, same pill buttons and inputs,
   same watercolour tree art in the brand panel.

   Serves both auth pages — sign-in and sign-up. They share every control; the
   only structural difference is that sign-up needs a wider column for its
   two-up field rows, which is why the column width is a token (--au-col) that
   .nlp-auth.is-signup raises rather than a second set of rules.

   Everything is scoped under .nlp-auth. Unlike the homepage this page runs in
   its own layout (frontend/layout/auth_v3_layout.blade.php) which deliberately
   does NOT load Bootstrap or Nifty, so there is no theme cascade to fight and
   no !important anywhere in this file. The scope stays for two reasons: it
   documents ownership, and it keeps the file droppable into a Bootstrap page
   later without renaming a single rule.

   Layout is a two-column grid: the form column scrolls, the brand column is
   decorative and is removed entirely below 992px so a phone never downloads
   the tree artwork.
   ========================================================================== */

/* The one unscoped rule in this file, and it has to be: the auth layout loads
   no Bootstrap and therefore no reset, so the UA's default 8px body margin
   ringed the two-column shell in white and pushed min-height:100vh past the
   viewport into a permanent scrollbar. The background is the literal value of
   --paper rather than the token, because the token is declared on .nlp-auth
   and is not in scope up here; it only shows through in overscroll. */
html,
body {
  margin: 0;
  padding: 0;
  background: #FDFEFE;
}

.nlp-auth {
  --sky: #3FA9E8;
  --sky-deep: #2286C7;
  --sky-tint: #EDF6FC;
  --sky-line: #D3E9F8;
  --ink: #12303B;
  --teal: #0F6E78;
  --teal-deep: #0A4F57;
  --teal-tint: #EAF4F3;
  --teal-line: #CFE5E2;
  --paper: #FDFEFE;
  --mist: #F6FAFA;
  --line: #E6EDEC;
  --white: #ffffff;
  --text: #3D5058;
  --text-soft: #66787E;
  --gold: #F0C033;
  --gold-deep: #B08A3E;
  --orange-deep: #B9700E;
  --green: #2EA194;
  --green-deep: #1F7A6F;
  --green-soft: #E7F3F0;
  --sage: #8FAE9B;
  --danger: #C0453B;
  --danger-tint: #FCEFEE;
  --danger-line: #F3D5D2;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 80, 95, .04), 0 8px 24px -10px rgba(15, 80, 95, .09);
  --shadow-lift: 0 3px 6px rgba(15, 80, 95, .05), 0 18px 40px -14px rgba(15, 80, 95, .16);

  /* Width of the form column's content — the card, the logo row above it and
     the footer below all key off this so the three stay in one vertical line.
     Sign-up widens it (see .is-signup) because it carries six fields. */
  --au-col: 470px;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.nlp-auth *,
.nlp-auth *::before,
.nlp-auth *::after {
  box-sizing: border-box;
}

.nlp-auth h1,
.nlp-auth h2 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  line-height: 1.14;
  letter-spacing: -0.012em;
  font-weight: 600;
  margin: 0;
}

.nlp-auth p {
  margin: 0;
}

.nlp-auth a {
  color: inherit;
  text-decoration: none;
}

.nlp-auth img {
  max-width: 100%;
  display: block;
}

.nlp-auth button {
  font-family: inherit;
  cursor: pointer;
}

.nlp-auth :focus-visible {
  outline: 2px solid var(--sky-deep);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============ shell ============ */
/* 100svh, not 100vh: on iOS the address bar makes vh taller than the visible
   viewport, which pushed the footer under the browser chrome on first paint. */
.nlp-auth .au-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}

/* ---- form column ---- */
.nlp-auth .au-main {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  padding: 26px 30px 30px;
}

.nlp-auth .au-top {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  max-width: var(--au-col);
  width: 100%;
  margin: 0 auto;
}

.nlp-auth .au-top .au-logo img {
  height: 32px;
  width: auto;
}

.nlp-auth .au-back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  transition: color .15s ease;
}

.nlp-auth .au-back:hover {
  color: var(--sky-deep);
}

.nlp-auth .au-back svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

/* The card is centred in whatever height is left under the logo row. */
.nlp-auth .au-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 0 26px;
}

.nlp-auth .au-card {
  width: 100%;
  max-width: var(--au-col);
}

/* Sign-up. Six fields instead of two, paired into two-up rows, so the column
   needs the extra room — at 470px each half is too narrow to hold a password
   placeholder next to a leading icon and a reveal button. */
.nlp-auth.is-signup {
  --au-col: 560px;
}

.nlp-auth .kicker {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sky-deep);
}

.nlp-auth .au-card h1 {
  font-size: clamp(30px, 3.6vw, 40px);
  font-weight: 500;
  margin: 10px 0 10px;
}

.nlp-auth .au-card h1 em {
  font-style: italic;
  color: var(--teal);
  font-weight: 500;
}

.nlp-auth .au-lede {
  font-size: 15.5px;
  color: var(--text-soft);
  max-width: 46ch;
}

/* ============ flash + validation messages ============ */
.nlp-auth .au-alert {
  margin-top: 22px;
  border-radius: 14px;
  padding: 13px 17px;
  font-size: 14px;
  border: 1px solid transparent;
}

.nlp-auth .au-alert.ok {
  background: var(--green-soft);
  border-color: var(--teal-line);
  color: var(--teal-deep);
}

.nlp-auth .au-alert.info {
  background: var(--sky-tint);
  border-color: var(--sky-line);
  color: var(--sky-deep);
}

.nlp-auth .au-alert.bad {
  background: var(--danger-tint);
  border-color: var(--danger-line);
  color: var(--danger);
}

.nlp-auth .au-alert a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ google ============ */
.nlp-auth .au-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 26px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  padding: 12px 22px;
  font-family: 'Poppins', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.nlp-auth .au-google:hover,
.nlp-auth .au-google:focus {
  border-color: var(--sky-line);
  background: var(--sky-tint);
  box-shadow: var(--shadow);
}

.nlp-auth .au-google img {
  height: 20px;
  width: 20px;
}

/* ---- "or" rule ---- */
.nlp-auth .au-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.nlp-auth .au-or::before,
.nlp-auth .au-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ============ fields ============ */
.nlp-auth .au-field {
  margin-top: 18px;
}

.nlp-auth .au-field>label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 7px 2px;
}

.nlp-auth .au-field>label .req {
  color: var(--orange-deep);
}

.nlp-auth .au-control {
  position: relative;
  display: block;
}

.nlp-auth .au-control .lead-ico {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-soft);
  pointer-events: none;
}

/* Pill inputs, matching the homepage newsletter field. */
.nlp-auth .au-control input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 13px 20px 13px 46px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.nlp-auth .au-control input::placeholder {
  color: #9BAAAF;
}

.nlp-auth .au-control input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(63, 169, 232, .14);
}

.nlp-auth .au-control.has-reveal input {
  padding-right: 50px;
}

/* Password reveal. Keeps the .reveal_password hook the rest of the LMS uses so
   the toggle script stays interchangeable, but it is a real <button> here —
   the old markup hung the handler on a <span> inside an input-group, which no
   keyboard user could reach. */
.nlp-auth .au-control .reveal_password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  padding: 0;
  transition: background .15s ease, color .15s ease;
}

.nlp-auth .au-control .reveal_password:hover {
  background: var(--sky-tint);
  color: var(--sky-deep);
}

.nlp-auth .au-control .reveal_password svg {
  width: 19px;
  height: 19px;
}

/* One <svg> pair, swapped by a class the toggle script flips. */
.nlp-auth .au-control .reveal_password .eye-off {
  display: none;
}

.nlp-auth .au-control .reveal_password.is-shown .eye-on {
  display: none;
}

.nlp-auth .au-control .reveal_password.is-shown .eye-off {
  display: block;
}

/* Two fields side by side. auto-fit rather than a media query: the form column
   is a grid fraction, so its width tracks the viewport continuously and there
   is a band around 992–1200px where the page is still two columns but each
   half is already too narrow for a password placeholder plus its icons. This
   drops to one column on available width, wherever that happens to fall. */
.nlp-auth .au-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 0 18px;
}

.nlp-auth .au-error {
  display: block;
  margin: 7px 0 0 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
}

/* The phone error is rendered empty and toggled by the page script, so it needs
   to honour [hidden] — display:block above would otherwise beat the UA rule. */
.nlp-auth .au-error[hidden] {
  display: none;
}

.nlp-auth .au-field.is-bad .au-control input {
  border-color: var(--danger-line);
}

.nlp-auth .au-field.is-bad .au-control input:focus {
  box-shadow: 0 0 0 4px rgba(192, 69, 59, .12);
}

.nlp-auth .au-forgot {
  display: block;
  margin: 12px 2px 0;
  text-align: right;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sky-deep);
}

.nlp-auth .au-forgot:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ phone (intl-tel-input) ============ */
/* The plugin wraps the input in its own <div class="iti"> and drops a flag
   button into the left inset. Skinned here rather than in the plugin's own
   stylesheet so an upgrade cannot silently revert the look; every rule is a
   scoped override, and the plugin sheet still ships unedited underneath.
   The phone field takes no .lead-ico — the flag is the leading affordance. */
.nlp-auth .au-control .iti {
  display: block;
}

.nlp-auth .au-control .iti input {
  padding-left: 60px;
}

.nlp-auth .au-control .iti__flag-container {
  padding: 3px;
}

.nlp-auth .au-control .iti__selected-flag {
  border-radius: 999px;
  padding: 0 9px 0 15px;
  transition: background .15s ease;
}

.nlp-auth .au-control .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag,
.nlp-auth .au-control .iti__flag-container:focus-within .iti__selected-flag {
  background: var(--sky-tint);
}

.nlp-auth .au-control .iti__arrow {
  border-top-color: var(--text-soft);
}

.nlp-auth .au-control .iti__arrow--up {
  border-bottom-color: var(--text-soft);
}

/* Country dropdown. overflow-y:auto, not the plugin's `scroll`: on Windows a
   permanent gutter sat next to the short preferred-countries list. */
.nlp-auth .au-control .iti__country-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  padding: 6px;
  margin-top: 6px;
  max-height: 240px;
  overflow-y: auto;
  font-size: 14px;
}

.nlp-auth .au-control .iti__country {
  border-radius: 9px;
  padding: 7px 10px;
  color: var(--text);
}

.nlp-auth .au-control .iti__country.iti__highlight {
  background: var(--sky-tint);
}

.nlp-auth .au-control .iti__divider {
  border-bottom-color: var(--line);
  margin: 6px 4px;
}

.nlp-auth .au-control .iti__dial-code {
  color: var(--text-soft);
}

/* ============ submit ============ */
.nlp-auth .au-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--sky);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  box-shadow: 0 6px 16px -6px rgba(63, 169, 232, .45);
  transition: background .15s ease, transform .1s ease;
}

.nlp-auth .au-submit:hover,
.nlp-auth .au-submit:focus {
  background: var(--sky-deep);
  color: #fff;
}

.nlp-auth .au-submit:active {
  transform: scale(.985);
}

.nlp-auth .au-submit svg {
  width: 17px;
  height: 17px;
}

.nlp-auth .au-switch {
  margin-top: 22px;
  text-align: center;
  font-size: 14.5px;
  color: var(--text-soft);
}

.nlp-auth .au-switch a {
  color: var(--sky-deep);
  font-weight: 700;
  margin-left: 5px;
}

.nlp-auth .au-switch a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Text-only trust line under the card, shown only where the brand panel is
   not. No <img> in it on purpose: a hidden accreditation strip would still be
   fetched on phones, which is exactly what dropping the panel avoids. */
.nlp-auth .au-proof {
  display: none;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.nlp-auth .au-proof b {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.nlp-auth .au-foot {
  max-width: var(--au-col);
  width: 100%;
  margin: 0 auto;
  font-size: 12.5px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nlp-auth .au-foot a:hover {
  color: var(--sky-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ brand panel ============ */
.nlp-auth .au-brand {
  position: relative;
  overflow: clip;
  display: flex;
  align-items: center;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--sky-tint) 0%, rgba(237, 246, 252, 0) 58%),
    radial-gradient(110% 80% at 0% 100%, var(--teal-tint) 0%, rgba(234, 244, 243, 0) 60%),
    linear-gradient(160deg, var(--white) 0%, var(--mist) 100%);
  border-left: 1px solid var(--line);
  padding: 48px 54px;
}

/* Two soft organic blobs, the same trick the homepage manifesto uses. */
.nlp-auth .au-brand::before,
.nlp-auth .au-brand::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 46% 54% 60% 40% / 50% 44% 56% 50%;
  pointer-events: none;
}

.nlp-auth .au-brand::before {
  right: -130px;
  top: -90px;
  background: var(--sky-tint);
  opacity: .8;
}

.nlp-auth .au-brand::after {
  left: -150px;
  bottom: -120px;
  background: var(--teal-tint);
  opacity: .7;
}

.nlp-auth .au-brand-in {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.nlp-auth .au-brand h2 {
  font-size: clamp(30px, 3.1vw, 44px);
  font-weight: 500;
  margin-top: 12px;
}

.nlp-auth .au-brand h2 em {
  font-style: italic;
  color: var(--teal);
  position: relative;
  white-space: nowrap;
  font-weight: 500;
}

.nlp-auth .au-brand h2 em svg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  width: 100%;
  height: 11px;
  color: var(--gold);
}

.nlp-auth .au-brand .au-brand-sub {
  font-size: 15.5px;
  color: var(--text-soft);
  max-width: 44ch;
  margin-top: 20px;
}

/* ---- tree art ---- */
/* Same watercolour feather as the homepage hero: the .webp carries a
   rectangular pale wash, dissolved here with a union of off-centre ellipses so
   the edge never reads as a straight cut. */
.nlp-auth .au-art {
  position: relative;
  margin: 6px -22px 0;
  isolation: isolate;
}

.nlp-auth .au-art img.trees {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
  --tree-feather:
    radial-gradient(54% 60% at 52% 55%, #000 38%, rgba(0, 0, 0, .88) 58%, rgba(0, 0, 0, .42) 80%, transparent 100%),
    radial-gradient(34% 40% at 56% 45%, #000 58%, rgba(0, 0, 0, .7) 82%, transparent 100%),
    radial-gradient(42% 27% at 53% 84%, #000 52%, rgba(0, 0, 0, .6) 80%, transparent 100%),
    radial-gradient(23% 27% at 30% 63%, rgba(0, 0, 0, .8) 26%, transparent 100%),
    radial-gradient(21% 25% at 78% 51%, rgba(0, 0, 0, .72) 26%, transparent 100%),
    radial-gradient(18% 21% at 35% 27%, rgba(0, 0, 0, .5) 18%, transparent 100%),
    radial-gradient(15% 18% at 71% 24%, rgba(0, 0, 0, .4) 16%, transparent 100%);
  -webkit-mask-image: var(--tree-feather);
  mask-image: var(--tree-feather);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-composite: source-over;
  mask-composite: add;
}

.nlp-auth .au-art .bird {
  position: absolute;
  z-index: 2;
  color: var(--sky-deep);
  opacity: .55;
  animation: nlp-auth-drift 5.5s ease-in-out infinite;
}

.nlp-auth .au-art .bird svg {
  width: 24px;
  height: 17px;
}

.nlp-auth .au-art .bird.b1 {
  left: 7%;
  top: 10%;
}

.nlp-auth .au-art .bird.b2 {
  left: 23%;
  top: 22%;
  animation-delay: 1.4s;
}

.nlp-auth .au-art .bird.b2 svg {
  width: 17px;
  height: 12px;
}

@keyframes nlp-auth-drift {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes nlp-auth-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Entrance gated in CSS, never on a JS-added class — same reasoning as the
   homepage hero: an element left at opacity:0 until a deferred script runs is
   not an eligible LCP candidate. */
@media (prefers-reduced-motion: no-preference) {
  .nlp-auth .au-brand-in>* {
    animation: nlp-auth-rise .55s ease backwards;
  }

  .nlp-auth .au-brand-in>*:nth-child(2) {
    animation-delay: .07s;
  }

  .nlp-auth .au-brand-in>*:nth-child(3) {
    animation-delay: .14s;
  }

  .nlp-auth .au-brand-in>*:nth-child(4) {
    animation-delay: .21s;
  }

  .nlp-auth .au-brand-in>*:nth-child(5) {
    animation-delay: .28s;
  }
}

/* ---- stats + accreditation ---- */
.nlp-auth .au-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.nlp-auth .au-stat {
  text-align: center;
}

.nlp-auth .au-stat+.au-stat {
  border-left: 1px solid var(--line);
}

.nlp-auth .au-stat b {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 32px);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.nlp-auth .au-stat span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.nlp-auth .au-accred {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.nlp-auth .au-accred span {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.nlp-auth .au-accred img {
  height: 40px;
  width: auto;
}

/* ============ responsive ============ */
@media (max-width: 1200px) {
  .nlp-auth .au-brand {
    padding: 40px 34px;
  }

  .nlp-auth .au-main {
    padding: 24px 26px 26px;
  }
}

/* Below this the brand column goes, artwork and all — the form is the page. */
@media (max-width: 991px) {
  .nlp-auth .au-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .nlp-auth .au-brand {
    display: none;
  }

  .nlp-auth .au-proof {
    display: block;
  }

  .nlp-auth .au-center {
    padding: 26px 0 20px;
  }
}

@media (max-width: 575px) {
  .nlp-auth .au-main {
    padding: 20px 18px 22px;
  }

  .nlp-auth .au-card h1 {
    font-size: 29px;
  }

  .nlp-auth .au-lede {
    font-size: 15px;
  }

  .nlp-auth .au-top .au-logo img {
    height: 28px;
  }

  /* The back link drops to its own line rather than squeezing the logo. */
  .nlp-auth .au-back {
    font-size: 12.5px;
  }

  .nlp-auth .au-foot {
    justify-content: center;
    text-align: center;
    gap: 12px;
  }
}