/* Truss auth pages (/signin, /reset), on the Arkemis v3 system (/shared.css loads first): white page,
   a small capsule with the mark and one way back, the form on the left and, from 900 px, the deep
   navy-to-sky panel with a product capture on the right. Scoped to body.auth-page; the scripts and
   their element ids are untouched. */

.auth-page { min-height: 100vh; min-height: 100svh; }
.auth-page .auth { background-color: var(--bg); background-image: var(--grain); }

/* ---- capsule: mark + wordmark, one way back (same capsule as the site nav) */
.auth-nav { position: fixed; z-index: 50; top: 8px; left: 50%; transform: translateX(-50%); width: calc(100% - 16px); max-width: 460px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 6px 14px;
  border: 1px solid var(--hair); border-radius: var(--r-nav); background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 8px 28px -16px rgba(11, 18, 32, .35); }
.auth-nav .brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--ink); text-decoration: none; }
.auth-nav .mark { width: 16px; height: 18px; fill: currentColor; }
.auth-nav .wordmark { font: 600 20px/1 "Bricolage", var(--f); letter-spacing: -.02em; transform: translateY(-1px); }
.auth-nav .btn-sm { min-height: 40px; }
@media (max-width: 900px) { .auth-nav .btn-sm { min-height: 44px; } }

/* ---- page */
.auth-page .auth { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100svh; padding: 96px 20px 32px; place-items: start center; }
.auth-form { width: 100%; display: grid; place-items: center; }
.auth-visual { display: none; }
.auth-page .card { width: 100%; max-width: 400px; }
.auth-kicker { margin: 0 0 18px; }
.auth-page .card h1 { margin: 0; font: 600 32px/1.08 var(--display); font-stretch: 118%; letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
.auth-page .card #sub { margin: 12px 0 24px; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.auth-page #f { display: grid; gap: 14px; }
.auth-page #f[hidden] { display: none; }
.auth-fld { display: grid; gap: 6px; font: 500 13.5px var(--f); color: var(--ink-2); }
.auth-fld:has(> input[style*="display: none"]), .auth-fld:has(> input[style*="display:none"]) { display: none; }
.auth-page .card input { display: block; width: 100%; height: 48px; margin: 0; padding: 0 14px; border: 1px solid var(--hair-2); border-radius: var(--r-btn); background: #fff; color: var(--ink); font: 400 16px var(--f); transition: border-color .15s, box-shadow .15s; }
.auth-page .card input::placeholder { color: #9aa1ad; }
.auth-page .card input:hover { border-color: rgba(11, 18, 32, .36); }
.auth-page .card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.auth-page .card .err { color: #a3241b; font-size: 14px; line-height: 1.45; }
.auth-page .card .err:empty { display: none; }
.auth-page .card .err:not(:empty) { margin: 0; padding: 10px 12px; border-radius: var(--r-btn); background: #fde5d4; }
/* the submit is .btn.btn-pri.btn-lg (shared.css); here only its width */
.auth-page .card button[type=submit] { width: 100%; margin-top: 6px; }
.auth-page .card button[type=submit]:disabled { opacity: .6; cursor: progress; }

/* text actions under the form (switch mode, forgot password, resend) */
.auth-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin-top: 10px; }
.auth-page .card .switch { display: inline-flex; align-items: center; min-height: 44px; margin: 0 !important; padding: 0; background: none; border: 0; color: var(--ink); font: 500 14.5px var(--f); text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 4px; cursor: pointer; }
.auth-page .card .switch:hover { text-decoration-color: var(--ink); }
.auth-page .card .switch:disabled { color: var(--ink-3); cursor: default; }
.auth-page .card .resend { margin-top: 2px !important; }
.auth-links > div { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; width: 100%; margin: 4px 0 6px; }
.auth-links > div input { flex: 1 1 200px; }
.auth-page .card .demo { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 15px; color: var(--ink-2); }
.auth-page .card .demo a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink); text-underline-offset: 4px; }
.auth-page .card .back { display: inline-flex; align-items: center; min-height: 44px; font: 500 12px var(--mono); letter-spacing: .04em; color: var(--ink-3); text-decoration: none; }
.auth-page .card .back:hover { color: var(--ink); }

/* ---- the navy-to-sky panel with a product capture (900 px and up) */
@media (min-width: 900px) {
  .auth-nav { top: 12px; width: max-content; max-width: calc(100% - 24px); padding: 6px 6px 6px 16px; gap: 28px; }
  .auth-page .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); padding: 12px; gap: 12px; place-items: stretch; }
  .auth-form { padding: 104px clamp(24px, 5vw, 72px) 48px; }
  .auth-page .card h1 { font-size: clamp(32px, 2.8vw, 42px); }
  .auth-visual { display: block; position: relative; overflow: hidden; border-radius: var(--r-nav); min-height: calc(100svh - 24px); color: #fff; border: 1px solid rgba(255, 255, 255, .22);
    background: radial-gradient(40% 55% at 100% 0%, rgba(255, 255, 255, .14), transparent 70%), linear-gradient(135deg, #173a6e 0%, #2557a0 60%, #2f68b8 100%); }
  .auth-visual-in { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; padding: clamp(96px, 12vh, 140px) 0 0 clamp(32px, 4vw, 64px); }
  .auth-quote { margin: 0; max-width: 18ch; font: 600 clamp(30px, 2.8vw, 42px)/1.06 var(--display); font-stretch: 118%; letter-spacing: -.03em; }
  .auth-note { margin: 14px 0 0; max-width: 42ch; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .86); }
  .auth-shot { margin: auto 0 0; padding-top: 40px; }
  .auth-shot img { display: block; width: min(900px, 120%); max-width: none; height: auto; border-radius: var(--r-win) 0 0 0; border: 1px solid rgba(255, 255, 255, .35); border-right: 0; border-bottom: 0; box-shadow: 0 30px 70px -20px rgba(4, 12, 28, .5); }
}
@media (min-width: 900px) and (max-height: 760px) { .auth-form { padding-top: 88px; } .auth-visual-in { padding-top: 88px; } }
/* wide screens: the capsule sits over the form column, clear of the panel */
@media (min-width: 900px) { .auth-nav { left: 24px; transform: none; } }
