/* Company sign-in (login.php only). A construction drawing sheet on the left, the form on the right.
   Colours come from tokens.css only; the display face is Bahnschrift (ships with Windows), DIN-style fallbacks elsewhere. */

.login-split {
  --display: "Bahnschrift", "DIN Alternate", "D-DIN", "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  min-height: 100vh; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  background: var(--pearl); place-items: stretch;
}

/* ---------- the drawing sheet ---------- */
.sheet {
  position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px;
  padding: 44px 52px 40px; color: var(--on-emerald); overflow: hidden;
  background: radial-gradient(120% 70% at 30% 100%, rgba(11, 122, 94, .35), transparent 60%),
              linear-gradient(170deg, var(--emerald), var(--emerald-900));
}
/* stays in view while a long form (apply) scrolls */
.sheet { position: sticky; top: 0; height: 100vh; align-self: start; }
.sheet::before { /* drawing border */
  content: ""; position: absolute; inset: 18px; border: 1px solid var(--on-emerald-line); pointer-events: none;
}

.mark { display: inline-flex; align-items: center; gap: 16px; justify-self: start; color: inherit; text-decoration: none; position: relative; }
.mark img { width: 56px; height: 56px; border-radius: 13px; flex: none; }
.mark b { display: block; font: 700 46px/0.9 var(--display); letter-spacing: -.01em; }
.mark small { display: block; margin-top: 7px; font: 600 13px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }

.drawing { width: 100%; height: 100%; min-height: 0; max-height: 560px; align-self: center; }
.drawing .ln  { fill: none; stroke: var(--on-emerald-soft); stroke-width: 1.5; stroke-linejoin: round; }
.drawing .lt  { fill: none; stroke: var(--on-emerald-muted); stroke-width: 1; }
.drawing .dsh { fill: none; stroke: var(--on-emerald-muted); stroke-width: 1; stroke-dasharray: 5 4; }
.drawing .gld { fill: none; stroke: var(--gold); stroke-width: 1.25; }
.drawing text { fill: var(--on-emerald-muted); font: 500 11px var(--display); letter-spacing: .06em; }
.drawing .bub text { fill: var(--on-emerald-strong); font-size: 12px; text-anchor: middle; }
.drawing .gl text { fill: var(--gold); }

.sheet-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; position: relative; }
.sheet-foot p { margin: 0; max-width: 360px; font: 400 25px/1.2 var(--display); color: var(--on-emerald-strong); }
.sheet-foot p em { font-style: normal; color: var(--gold); }

/* title block, as on a real drawing sheet */
.tb { flex: none; display: grid; grid-template-columns: auto auto auto; border: 1px solid var(--on-emerald-line); font-family: var(--display); }
.tb > * { padding: 9px 14px; border-left: 1px solid var(--on-emerald-line); }
.tb > :first-child { border-left: 0; }
.tb .maker { grid-row: span 2; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.tb .maker img { width: 46px; height: 46px; border-radius: 50%; flex: none; }
.tb .maker b { color: var(--on-emerald); display: block; font-size: 18px; font-weight: 700; letter-spacing: .05em; }
.tb dt, .tb .maker small { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-emerald-muted); }
.tb dl { margin: 0; }
.tb dd { margin: 3px 0 0; font-size: 15px; color: var(--on-emerald-strong); }
.tb .r2 { border-top: 1px solid var(--on-emerald-line); }
.tb a:hover b, .tb a:focus-visible b, .mark:hover b { color: var(--gold); }
.sheet a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ---------- the form side ---------- */
.login-split > main { align-self: center; justify-self: center; width: min(420px, calc(100% - 48px)); margin: 24px 0; padding: 36px 34px 30px; box-shadow: var(--shadow-pop); border-top: 4px solid var(--gold); }
.login-split > main.wide { width: min(620px, calc(100% - 48px)); }
.login-split .login-card .brand { display: none; }
.login-split .login-card h1 { font: 700 34px/1 var(--display); margin: 0 0 8px; letter-spacing: -.005em; }
.login-split .login-card .sub { margin-bottom: 24px; }
.login-made { display: none; }

/* ---------- motion: the frame is drawn, then the crane sets the block ---------- */
@media (prefers-reduced-motion: no-preference) {
  .drawing .draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: mx-draw 1.6s cubic-bezier(.4, 0, .2, 1) forwards; }
  .drawing .d2 { animation-delay: .5s; }
  .drawing .d3 { animation-delay: .9s; }
  .drawing .fade { opacity: 0; animation: mx-fade .8s ease 1.4s forwards; }
  .drawing .load { animation: mx-lower 1.4s cubic-bezier(.3, 0, .2, 1) 1.6s both; }
  .drawing .cable { transform-box: fill-box; transform-origin: top; animation: mx-cable 1.4s cubic-bezier(.3, 0, .2, 1) 1.6s both; }
}
@keyframes mx-draw  { to { stroke-dashoffset: 0; } }
@keyframes mx-fade  { to { opacity: 1; } }
@keyframes mx-lower { from { transform: translateY(-46px); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes mx-cable { from { transform: scaleY(.1); } to { transform: none; } }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .sheet { padding: 40px 40px 36px; }
  .sheet-foot { flex-direction: column; align-items: flex-start; gap: 18px; }
}
@media (max-width: 760px) {
  .login-split { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; }
  .sheet { position: relative; height: auto; padding: 26px 20px 22px; gap: 0; grid-template-rows: auto; }
  .sheet::before { inset: 8px; }
  .mark img { width: 44px; height: 44px; border-radius: 11px; }
  .mark b { font-size: 34px; }
  .mark small { font-size: 12px; }
  .drawing, .sheet-foot { display: none; }
  .login-split > main, .login-split > main.wide { align-self: start; width: auto; margin: 18px 16px 0; padding: 26px 20px 22px; }
  .login-split .login-card h1 { font-size: 28px; }
  .login-made { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 16px 28px; color: var(--smoky); font-size: var(--text-s); text-decoration: none; }
  .login-made img { width: 32px; height: 32px; border-radius: 50%; }
  .login-made b { color: var(--emerald); }
}
