/* ============================================================
   D&S Group — auth (login / register) experience
   Visual layer only. No behaviour, field names, or routes change.
   ============================================================ */

:root {
  --ink:        #15191f;
  --graphite:   #222932;
  --graphite-2: #2b333d;
  --steel:      #8c96a2;
  --steel-dim:  #5c6671;
  --hairline:   rgba(255,255,255,.09);
  --galv:       #eaedf1;
  --galv-deep:  #dfe3e9;
  --paper:      #ffffff;
  --text:       #1a1f26;
  --text-soft:  #5b646e;
  --orange:     #eb7e3c;
  --orange-deep:#d96e2e;
  --orange-soft:#f6e0cd;
  --danger:     #c0392b;

  --display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

body.auth {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--text);
  background: var(--galv);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.auth-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

/* grid children must be allowed to shrink, or letter-spaced text widens the track */
.auth-brand,
.auth-panel { min-width: 0; }

/* ---------- left: the worksite panel ---------- */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 4vw, 4rem);
  color: #f4f6f8;
  background:
    radial-gradient(120% 90% at 12% 8%, #2a323c 0%, var(--graphite) 42%, var(--ink) 100%);
  border-right: 3px solid var(--orange);
}

/* faint engineered grid, like a measuring drawing */
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(120% 90% at 12% 8%, #000 0%, transparent 70%);
          mask-image: radial-gradient(120% 90% at 12% 8%, #000 0%, transparent 70%);
  opacity: .5;
  pointer-events: none;
}

.auth-brand > * { position: relative; z-index: 1; }

.brand-mark {
  display: flex;
  align-items: baseline;
  gap: .55rem;
}
.brand-mark .ds {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -.02em;
}
.brand-mark .ds em {
  font-style: normal;
  color: var(--orange);
}
.brand-mark .group {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--steel);
  padding-bottom: .15em;
}

.brand-tag {
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--steel);
}

.brand-headline {
  margin: auto 0 0;
  padding-top: clamp(2rem, 6vh, 4rem);
}
.brand-headline h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: .98;
  letter-spacing: -.025em;
  margin: 0;
  max-width: 14ch;
}
.brand-headline h2 .accent { color: var(--orange); }
.brand-headline p {
  margin: 1.1rem 0 0;
  max-width: 38ch;
  color: #c7ced6;
  font-size: clamp(.95rem, 1.1vw, 1.05rem);
  line-height: 1.55;
}

.brand-meta {
  margin-top: clamp(1.5rem, 4vh, 2.25rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0 2.5rem;
  border-top: 1px solid var(--hairline);
  padding-top: 1.1rem;
}
.brand-meta div { display: flex; flex-direction: column; gap: .2rem; }
.brand-meta dt {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--steel-dim);
}
.brand-meta dd {
  margin: 0;
  font-size: .9rem;
  font-weight: 500;
  color: #e6eaef;
}

/* ---------- right: the login column ---------- */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
}

.auth-form {
  width: 100%;
  max-width: 380px;
}

.auth-eyebrow {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin: 0 0 .85rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.auth-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--orange);
}

.auth-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  letter-spacing: -.02em;
  line-height: 1;
  margin: 0 0 .6rem;
  color: var(--ink);
}
.auth-lead {
  margin: 0 0 2rem;
  color: var(--text-soft);
  font-size: .98rem;
  line-height: 1.5;
}

/* flash messages (errors / notices) keep working — restyled */
.auth-flash {
  margin: 0 0 1.5rem;
  padding: .85rem 1rem .85rem 1.1rem;
  background: #fff;
  border: 1px solid var(--galv-deep);
  border-left: 3px solid var(--orange);
  border-radius: 8px;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--text);
  box-shadow: 0 6px 20px rgba(21,25,31,.05);
}

.field { margin-bottom: 1.05rem; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: .45rem;
}
.field label .field-hint {
  color: var(--steel-dim);
  letter-spacing: .1em;
  margin-left: .35em;
}
.field input {
  width: 100%;
  padding: .8rem .95rem;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--galv-deep);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: #aab2bb; }
.field input:hover { border-color: #c2c9d2; }
.field input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(235,126,60,.18);
}

.auth-submit {
  width: 100%;
  margin-top: .6rem;
  padding: .9rem 1.25rem;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--orange);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
  box-shadow: 0 8px 22px rgba(235,126,60,.28);
}
.auth-submit:hover { background: var(--orange-deep); box-shadow: 0 10px 26px rgba(217,110,46,.32); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--orange);
}
.auth-submit svg { transition: transform .15s ease; }
.auth-submit:hover svg { transform: translateX(3px); }

.auth-alt {
  margin: 1.75rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--galv-deep);
  font-size: .92rem;
  color: var(--text-soft);
}
.auth-alt a {
  color: var(--orange-deep);
  font-weight: 600;
  text-decoration: none;
}
.auth-alt a:hover { text-decoration: underline; }

/* ---------- responsive: stack the stage ---------- */
@media (max-width: 860px) {
  .auth-stage { grid-template-columns: 1fr; }
  .auth-brand {
    padding: 1.75rem 1.5rem 1.5rem;
    border-right: 0;
    border-bottom: 3px solid var(--orange);
  }
  .brand-headline { margin-top: 1.5rem; padding-top: 1.5rem; }
  .brand-headline h2 { font-size: clamp(1.7rem, 7vw, 2.3rem); }
  .brand-meta { display: none; }
  .auth-panel { padding: 2rem 1.5rem 3rem; }
  .auth-form { max-width: 440px; }
}

@media (max-width: 420px) {
  .brand-headline p { display: none; }
}

/* page-load motion — quiet, and disabled when reduced motion is asked for */
@media (prefers-reduced-motion: no-preference) {
  .auth-brand > *,
  .auth-form > * {
    animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards;
  }
  .brand-mark      { animation-delay: .02s; }
  .brand-tag       { animation-delay: .06s; }
  .brand-headline  { animation-delay: .12s; }
  .brand-meta      { animation-delay: .26s; }

  .auth-eyebrow { animation-delay: .10s; }
  .auth-title   { animation-delay: .14s; }
  .auth-lead    { animation-delay: .18s; }
  .auth-flash   { animation-delay: .20s; }
  .auth-form form { animation-delay: .22s; }
  .auth-alt     { animation-delay: .28s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
