/* © 2026 Qder.ai (Itay Funes). All rights reserved. Proprietary and confidential; see LICENSE. */
/*
 * The sign-in page.
 *
 * Two halves on a wide screen: the brand on the navy ground the landing uses,
 * the form on bone. The brand half is a still from the film with the same
 * three promises the landing makes, so a manager who came from the landing
 * lands somewhere that looks like the same place. On a phone the picture is
 * dropped for a short navy header, because a login on a phone is a keyboard
 * and one field at a time, not a poster.
 *
 * Tokens come from poster.css, which loads first. This file only lays the
 * page out and adds what a sign-in form needs that a contract form does not:
 * a way to see the password, a Caps Lock warning, a busy state, a step marker.
 */

body { min-height: 100dvh; display: flex; flex-direction: column; }
.auth { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100dvh; }

/* ------------------------------------------------------------ the brand half */
.auth__brand {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(1.4rem, 3vw, 2.6rem) clamp(1.4rem, 4vw, 3.4rem);
}
.auth__brand img.still {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%;
  opacity: .85;
}
/* A scrim only where the words sit, not a full-frame wash. */
.auth__brand::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(8, 15, 40, .92) 0%, rgba(8, 15, 40, .55) 38%, rgba(8, 15, 40, .15) 70%, rgba(8, 15, 40, .35) 100%);
}
.auth__brand .lockup {
  display: inline-flex; align-items: center; gap: .55rem; direction: ltr; align-self: flex-start;
  font: 800 1.15rem var(--sc-font-display); color: #fff; text-decoration: none;
}
.auth__brand .lockup img { width: 28px; height: 28px; }
.auth__claim { display: grid; gap: 1.1rem; max-width: 30ch; }
.auth__claim h2 { font-size: clamp(1.7rem, 2.6vw, 2.6rem); color: #fff; }
.auth__claim p { color: rgba(255, 255, 255, .78); font-size: 1.02rem; max-width: 34ch; }
.auth__proof { display: flex; flex-wrap: wrap; gap: .5rem .6rem; margin: 0; padding: 0; list-style: none; }
.auth__proof li {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .38rem .75rem; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  font: 700 .84rem var(--sc-font-display); color: #fff; backdrop-filter: blur(6px);
}
.auth__proof svg { width: 14px; height: 14px; color: #8FB0FF; }

/* ------------------------------------------------------------- the form half */
.auth__form {
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(1.4rem, 4vw, 3rem) clamp(1.2rem, 5vw, 4rem);
}
.auth__top { width: 100%; max-width: 27rem; display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.auth__top .lockup { display: none; }
.auth__top a.quiet { color: var(--sc-ink-soft); font-weight: 700; font-size: .92rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.auth__top a.quiet:hover { color: var(--sc-ink); }

.panel { width: 100%; max-width: 27rem; margin: auto 0; padding-block: clamp(1.5rem, 5vh, 3rem); gap: 1.35rem; }
.panel h1 { font-size: clamp(1.75rem, 3vw, 2.3rem); }
.panel .lede { font-size: 1rem; color: var(--sc-ink-soft); margin-top: .5rem; }
.who { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.who span {
  font: 700 .8rem var(--sc-font-display); color: var(--sc-ink-soft);
  padding: .22rem .6rem; border-radius: 999px; background: var(--bone-deep);
}

form { display: flex; flex-direction: column; gap: 1rem; }
.field { gap: .38rem; }
.field .lblrow { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.field .lblrow a { font-size: .84rem; font-weight: 700; min-height: 32px; display: inline-flex; align-items: center; }
input { min-height: 48px; font-size: 1rem; }

/* The password with an eye. The toggle sits inside the field, at the far
   end for the writing direction, and is a real 44px button. */
/* The one box. Both inputs share a grid cell; the class decides which one
   is present, and the other fades out of the way. */
.morph { display: grid; }
.morph > * { grid-area: 1 / 1; transition: opacity .28s var(--e, ease), transform .28s var(--e, ease), visibility 0s linear .28s; }
.morph > .pw { opacity: 0; transform: translateY(8px); visibility: hidden; pointer-events: none; }
.morph.is-pw > .pw { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.morph:not(.is-pw) > #email { transition-delay: 0s; }
.morph.is-pw > #email { opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none; }
/* The address, folded into a line above the box. */
.chip {
  display: inline-flex; align-items: center; gap: .55rem; max-width: 100%; width: fit-content; align-self: flex-start; justify-self: start; margin-bottom: .45rem; padding: .3rem .7rem;
  border: 1px solid var(--line, #E4E9F4); border-radius: 999px; background: var(--bone-deep, #F1F4FB); color: var(--sc-ink-soft, #5B678A);
  font: 600 .86rem inherit; cursor: pointer; direction: ltr; animation: rise .28s var(--e, ease) both;
}
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip b { color: var(--sc-accent, #0B3FD9); font-weight: 700; direction: rtl; }
.chip:hover b { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .morph > *, .chip { transition: none; animation: none; } }
.pw { position: relative; }
.pw input { padding-inline-end: 3rem; }
.pw .eye {
  position: absolute; inset-block: 0; inset-inline-end: .25rem; margin: auto;
  width: 44px; height: 44px; border-radius: var(--sc-r-sm);
  display: grid; place-items: center; color: var(--sc-ink-soft);
  transition: color 150ms var(--sc-ease-out), background 150ms var(--sc-ease-out);
}
.pw .eye:hover { color: var(--sc-ink); background: var(--bone-deep); }
.pw .eye svg { width: 20px; height: 20px; }
.pw .eye .off { display: none; }
.pw .eye[aria-pressed="true"] .on { display: none; }
.pw .eye[aria-pressed="true"] .off { display: block; }
.caps { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 700; color: #8B5A00; }
.caps svg { width: 14px; height: 14px; }

.banner { display: flex; align-items: flex-start; gap: .55rem; line-height: 1.45; }
.banner svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: .1rem; }

.btn-lg { min-height: 50px; width: 100%; position: relative; }
.btn.is-busy { color: transparent; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.step {
  display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start;
  font: 800 .78rem var(--sc-font-display); color: var(--sc-accent);
  padding: .25rem .65rem; border-radius: 999px; background: #F1F5FE;
}
.tfa-lead { color: var(--sc-ink-soft); font-size: .96rem; }
#tfaCode { font: 700 1.35rem var(--sc-font-display); letter-spacing: .28em; text-align: center; direction: ltr; }
.back { align-self: center; font-size: .9rem; font-weight: 700; color: var(--sc-ink-soft); min-height: 44px; display: inline-flex; align-items: center; }
.back:hover { color: var(--sc-ink); }

.alt { text-align: center; }
.minifoot { width: 100%; max-width: 27rem; display: flex; flex-wrap: wrap; gap: .3rem .9rem; justify-content: center; font-size: .78rem; margin-top: auto; padding-top: 1.5rem; }
.minifoot a { color: var(--sc-ink-soft); text-decoration: none; }
.minifoot a:hover { color: var(--sc-ink); }
.minifoot .mf-copy { width: 100%; text-align: center; color: #8A94B0; margin-top: .25rem; }

/* A quiet arrival. Off when the person asked for less motion. */
.panel { animation: rise 320ms var(--sc-ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } .btn.is-busy::after { animation-duration: 1.4s; } }

/* ------------------------------------------------------------------ narrow */
@media (max-width: 900px) {
  /* Two rows: the header takes its own height, the form takes the rest. Without
     this the two auto rows split the screen and the header became a wall. */
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100dvh; }
  .auth__brand { min-height: 0; padding: .9rem 1.2rem; flex-direction: row; align-items: center; justify-content: space-between; }
  .auth__brand img.still, .auth__brand::after { display: none; }
  .auth__claim, .auth__proof { display: none; }
  .auth__brand .lockup { font-size: 1.05rem; }
  .auth__brand .lockup img { width: 24px; height: 24px; }
  .auth__top { display: none; }
  .auth__form { padding-top: 1.4rem; }
  .panel { padding-block: .5rem 1rem; }
}

/* ================================================================ sign-up
   Three steps on one form. The panels slide under a fixed-height track; the
   segment bar above says where you are; the password paints its own rules
   as they pass. Every motion is a transform or an opacity, and none of it
   runs for someone who asked for less. */
.su .su-head .eyebrow { margin: 0; }
.su .su-head h1 { margin-top: .4rem; }
.su .why { margin-top: .7rem; padding: .7rem .9rem; border-radius: var(--sc-r-sm, 10px); background: #F1F5FE; color: var(--sc-accent); font-size: .92rem; line-height: 1.5; }

.su-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; counter-reset: s; }
.su-steps li { display: grid; gap: .4rem; font: 700 .78rem var(--sc-font-display); color: var(--sc-ink-soft); }
.su-steps li i { display: block; height: 5px; border-radius: 999px; background: var(--bone-deep); overflow: hidden; position: relative; }
.su-steps li i::after { content: ""; position: absolute; inset: 0; background: var(--sc-accent); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--sc-ease-out); border-radius: 999px; }
.su-steps li.is-on i::after, .su-steps li.is-done i::after { transform: scaleX(1); }
.su-steps li.is-done i::after { background: #6E92F2; }
.su-steps li.is-on { color: var(--sc-ink); }
.su-steps li span::before { counter-increment: s; content: counter(s) " · "; color: var(--sc-accent); }

.su-track { position: relative; display: grid; }
.su-step { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 1rem; opacity: 0; transition: opacity .26s var(--sc-ease-out), transform .26s var(--sc-ease-out); }
.su-step.from-end { transform: translateX(-28px); }
.su-step.from-start { transform: translateX(28px); }
.su-step.is-on { opacity: 1; transform: none; }
.su-step[hidden] { display: none; }
.su-h { font-size: 1.15rem; }
.su-sub { color: var(--sc-ink-soft); font-size: .92rem; margin-top: -.4rem; }
.field .opt { font-weight: 600; font-size: .78rem; color: var(--sc-ink-faint, #8C96B2); margin-inline-start: .3rem; }
textarea { min-height: 72px; font-size: 1rem; }

/* Fields arrive one after another the first time a step is shown. */
.su-step.is-on > * { animation: rise .32s var(--sc-ease-out) both; }
.su-step.is-on > :nth-child(2) { animation-delay: .05s; }
.su-step.is-on > :nth-child(3) { animation-delay: .1s; }
.su-step.is-on > :nth-child(4) { animation-delay: .15s; }
.su-step.is-on > :nth-child(5) { animation-delay: .2s; }

/* A wrong answer nudges the field. */
.shake { animation: shake .42s var(--sc-ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(5px); } 40%, 80% { transform: translateX(-5px); } }

/* The password: five bars that fill, five rules that tick. */
.meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; margin-top: .2rem; }
.meter i { height: 5px; border-radius: 999px; background: var(--bone-deep); transition: background .25s var(--sc-ease-out), transform .25s var(--sc-ease-out); }
.meter i.is-on { transform: scaleY(1.25); }
.meter[data-level="weak"] i.is-on { background: #D9483F; }
.meter[data-level="mid"] i.is-on { background: #E0A100; }
.meter[data-level="strong"] i.is-on { background: #1B9E77; }
.rules { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.rules li {
  display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: 999px;
  border: 1px solid var(--line, #E4E9F4); background: #fff; color: var(--sc-ink-soft); font: 600 .78rem var(--sc-font-display);
  transition: background .25s var(--sc-ease-out), color .25s var(--sc-ease-out), border-color .25s var(--sc-ease-out);
}
.rules li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bone-deep); transition: background .25s var(--sc-ease-out), transform .25s var(--sc-ease-out); }
.rules li.is-ok { background: #E6F4F1; border-color: #B9E0D8; color: #06584F; }
.rules li.is-ok::before { background: #1B9E77; transform: scale(1.25); }

/* Suggestions for the profile: tap to add, tap again to remove. */
.quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.quick button {
  padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line, #E4E9F4); background: #fff;
  color: var(--sc-ink-soft); font: 700 .82rem var(--sc-font-display); cursor: pointer; min-height: 36px;
  transition: background .18s var(--sc-ease-out), color .18s var(--sc-ease-out), border-color .18s var(--sc-ease-out), transform .18s var(--sc-ease-out);
}
.quick button:hover { border-color: var(--sc-accent); color: var(--sc-accent); }
.quick button[aria-pressed="true"] { background: var(--sc-accent); border-color: var(--sc-accent); color: #fff; }
.quick button:active { transform: scale(.96); }

.su-actions { display: flex; gap: .6rem; align-items: stretch; }
.su-actions .btn { flex: 1 1 auto; }
.su-back { flex: 0 0 auto; min-height: 50px; padding-inline: 1.1rem; border-radius: var(--sc-r-sm, 10px); border: 1px solid var(--line, #E4E9F4); background: #fff; color: var(--sc-ink-soft); font: 700 .95rem var(--sc-font-display); cursor: pointer; }
.su-back:hover { color: var(--sc-ink); border-color: var(--sc-ink-soft); }
.su-back[hidden] { display: none; }

/* Done: a ring draws itself, then the tick. */
.su-done { display: grid; justify-items: center; gap: .5rem; text-align: center; padding: 1.5rem 0; animation: rise .32s var(--sc-ease-out) both; }
.su-done svg { width: 84px; height: 84px; }
.su-done .ring { fill: none; stroke: #1B9E77; stroke-width: 3; stroke-dasharray: 176; stroke-dashoffset: 176; animation: draw .6s var(--sc-ease-out) forwards; }
.su-done .tick { fill: none; stroke: #1B9E77; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .45s var(--sc-ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.su-done h2 { font-size: 1.4rem; }
.su-done p { color: var(--sc-ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .su-step, .su-steps li i::after, .meter i, .rules li, .quick button { transition: none; }
  .su-step.is-on > *, .shake, .su-done, .su-done .ring, .su-done .tick { animation: none; }
  .su-done .ring, .su-done .tick { stroke-dashoffset: 0; }
}
