/* Sign-in page (T-54, Abdo 2026-11-14). Two halves on a computer: the Valero One story on the start side, the sign-in card on the
   other. Tablet and phone: one column, logo on top. Tokens only (DECISIONS #181). Public page: it shows nothing about what is inside the app (Abdo 2026-11-14). Clerk's own card is styled from auth.js
   (appearance), so this file only lays out the page around it. Logical properties, so Arabic (RTL) mirrors by itself. */
body.no-shell main#view { padding: 0; }
body.no-shell .ctxbar { display: none; }
body.pre-sign #view > .loading { visibility: hidden; } /* signed out: page colour only until the sign-in page draws */

.si { display: grid; grid-template-columns: minmax(380px, 46fr) 54fr; min-height: 100vh; min-height: 100dvh; }

/* Start side: the brand. White, a soft glow from the logo's orange and the V as a large faint mark. */
.si-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: var(--sp-6) clamp(32px, 5vw, 64px);
  background:
    radial-gradient(120% 70% at 0% 100%, var(--tint-orange-soft), transparent 60%),
    radial-gradient(90% 60% at 100% 0%, var(--tint-blue-soft), transparent 55%),
    var(--c-card);
  border-inline-end: 1px solid var(--c-card-line); }
.si-brand .si-logo svg { width: 180px; height: auto; color: var(--c-ink); display: block; }
.si-pitch { margin-block: auto; max-width: 460px; padding-block: var(--sp-6); position: relative; z-index: 1; }
.si-pitch h1 { margin: 0; color: var(--c-ink); font-size: calc(var(--fs-kpi) * 1.25); line-height: 1.15; font-weight: var(--fw-semibold); letter-spacing: -.02em; }
.si-v { position: absolute; inset-inline-end: -90px; inset-block-end: -70px; width: 380px; opacity: .06; pointer-events: none; }
.si-v svg { width: 100%; height: auto; display: block; }
.si-legal { margin: 0; color: var(--c-faint); font-size: var(--fs-hint); position: relative; z-index: 1; }

/* Other side: the card, centred. */
.si-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-4); padding: var(--sp-6) var(--sp-4); }
.si-mlogo { display: none; }
.si-box { width: min(400px, 100%); display: flex; justify-content: center; }
.si-box > * { width: 100%; }
.si-help { margin: 0; display: flex; justify-content: center; max-width: 400px; align-items: center; gap: var(--sp-2); color: var(--c-muted); font-size: var(--fs-table); text-align: center; }
.si-help .ico { width: 14px; height: 14px; color: var(--c-faint); flex: none; }

/* While Clerk downloads: a still card the same size as Clerk's, so nothing jumps when the real one lands (no blinking, said-once #2). */
.si-skel { background: var(--c-card); border: 1px solid var(--c-card-line); border-radius: var(--r-lg); box-shadow: var(--card-shadow); padding: 36px 32px; display: grid; gap: var(--sp-3); min-height: 356px; align-content: start; }
.si-skel i { display: block; height: 12px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--c-select) 0%, var(--c-line) 50%, var(--c-select) 100%); background-size: 200% 100%; animation: si-shine 1.4s ease-in-out infinite; }
.si-skel .t { width: 55%; height: 18px; justify-self: center; }
.si-skel .s { width: 70%; justify-self: center; margin-block-end: var(--sp-4); }
.si-skel .l { width: 30%; }
.si-skel .f { height: 40px; border-radius: var(--r-md); }
.si-skel .b { height: 40px; border-radius: var(--r-md); margin-block-start: var(--sp-2); background: var(--c-accent-line); animation: none; }
@keyframes si-shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .si-skel i { animation: none; } }

/* Arabic: the Cairo font on the page parts we draw. */
.si[dir="rtl"] { font-family: Cairo, var(--font); }
.si[dir="rtl"] .si-logo svg, .si[dir="rtl"] .si-mlogo svg { direction: ltr; } /* the sign's words stay VALERO / ONE */
.si[dir="rtl"] .si-pitch h1 { letter-spacing: 0; line-height: 1.35; }

/* Tablet and phone: one column, the logo above the card, the story hidden (people here just want in). */
@media (max-width: 900px) {
  .si { grid-template-columns: 1fr; }
  .si-brand { display: none; }
  .si-main { justify-content: flex-start; padding-block-start: 12vh;
    background: radial-gradient(100% 45% at 50% 0%, var(--tint-orange-soft), transparent 70%), var(--c-page); }
  .si-mlogo { display: block; margin-block-end: var(--sp-3); }
  .si-mlogo svg { width: 170px; height: auto; color: var(--c-ink); display: block; }
}
@media (max-width: 480px) { .si-main { padding-block-start: 8vh; } }
