/* Sign-in pages. Dark canvas, one sculpted ribbon (ribbon.js; poster first), accent used for rim light and focus only.
   Type: Sora (headings), IBM Plex Sans (text), Martian Mono (code boxes). 4/8 spacing. Strict CSP: no inline styles anywhere. */
@font-face { font-family: "Sora"; src: url("../fonts/Sora-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-var.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("../fonts/MartianMono-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --void: #030709; --panel: #071012; --ink: #eef3f2; --body: #b3bfbd; --dim: #8a9392;
  --signal: #7fe0d2; --signal-ink: #04201c; --fix: #f2a28c; --ok: #8fd6a4;
  --line: rgba(200, 235, 230, .12); --line-2: rgba(200, 235, 230, .22);
  --disp: "Sora", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --text: "IBM Plex Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--void); }
body.auth { margin: 0; background: var(--void); color: var(--body); font: 400 15px/1.55 var(--text); min-height: 100vh; }
a { color: var(--ink); text-decoration-color: rgba(200, 235, 230, .35); text-underline-offset: 3px; }
a:hover { color: var(--signal); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.stage { position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }

/* artwork: poster first (instant), live canvas fades in over it */
.art { position: absolute; inset: 0; z-index: -2; background: var(--void); }
.art::before { content: ""; position: absolute; inset: 0; background: url("ribbon-wide.webp") center / cover no-repeat; transition: opacity .6s ease .9s; }
.art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .9s ease; }
.art canvas.on { opacity: 1; }
.art:has(canvas.on)::before { opacity: 0; } /* poster fades out after the live ribbon has faded in: no double image */
.resend { margin: 14px 0 0; }
.resend .btn { width: 100%; }
.resend .btn:disabled { opacity: .6; cursor: default; }
.art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3, 7, 9, .94) 0%, rgba(3, 7, 9, .7) 30%, rgba(3, 7, 9, 0) 58%); pointer-events: none; }
.grain { position: absolute; inset: 0; z-index: -1; background: url("grain.png") repeat; background-size: 160px; opacity: .07; mix-blend-mode: overlay; pointer-events: none; }

.a-top { padding: 24px clamp(24px, 5vw, 64px); }
.a-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 600 1rem var(--disp); color: var(--ink); }
.a-brand img { border-radius: 8px; display: block; }

.a-main { display: flex; align-items: center; padding: 16px clamp(24px, 5vw, 64px) 48px; }
.a-wrap { position: relative; width: 100%; max-width: 480px; margin-left: clamp(0px, 6vw, 96px); }
.a-wrap::before { content: ""; position: absolute; left: 50%; top: 50%; width: 720px; height: 720px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(127, 224, 210, .17), rgba(127, 224, 210, .05) 50%, rgba(127, 224, 210, 0) 72%); z-index: -1; pointer-events: none; }
.a-card { background: rgba(7, 16, 18, .74); border: 1px solid var(--line); border-radius: 12px; padding: 32px; box-shadow: inset 0 1px 0 rgba(238, 243, 242, .06), 0 32px 80px -24px rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15); }
.a-card h1 { font: 600 clamp(1.45rem, 1.15rem + 1.1vw, 1.8rem)/1.2 var(--disp); letter-spacing: -.02em; color: var(--ink); margin: 0 0 12px; text-wrap: balance; }
.nb { white-space: nowrap; }
.a-card .lede { margin: 0 0 24px; color: var(--body); max-width: 36ch; }
.notice { margin: 0 0 24px; padding: 12px 16px; border: 1px solid rgba(127, 224, 210, .3); border-radius: 8px; background: rgba(127, 224, 210, .07); color: var(--ink); }
.notice.bad { border-color: rgba(242, 162, 140, .5); background: rgba(242, 162, 140, .07); color: var(--fix); }

form { margin: 0; }
.fld { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.fld label, .fld .lab { font-size: .875rem; color: var(--ink); }
.fld input[type="email"], .fld input[type="text"] { font: inherit; font-size: 1rem; color: var(--ink); background: rgba(3, 7, 9, .7); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 16px; height: 48px; width: 100%; transition: border-color .15s, box-shadow .15s; }
.fld input::placeholder { color: #66726f; }
.fld input:hover { border-color: rgba(200, 235, 230, .34); }
.fld input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 4px rgba(127, 224, 210, .16); }
.hint { font-size: .8125rem; color: var(--dim); margin: 0; }

.btn { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: 500 1rem var(--text); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; }
.btn:hover { border-color: var(--signal); color: var(--signal); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); font-weight: 600; box-shadow: 0 0 0 0 rgba(127, 224, 210, 0), 0 8px 24px -8px rgba(127, 224, 210, .45); }
.btn.primary:hover { background: #9be9de; color: var(--signal-ink); box-shadow: 0 0 0 4px rgba(127, 224, 210, .16), 0 10px 28px -8px rgba(127, 224, 210, .55); }
.btn.is-loading { pointer-events: none; color: transparent !important; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(4, 32, 28, .28); border-top-color: var(--signal-ink); animation: spin .7s linear infinite; }
.btn:not(.primary).is-loading::after { border-color: rgba(238, 243, 242, .25); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 24px 0 0; font-size: .875rem; color: var(--dim); }
.links a { color: var(--body); }

/* code input: one real input (paste, autofill and screen readers work) drawn as six cells once JS is on */
.otp { position: relative; }
.otp-cells { display: none; }
.otp input { font: 500 1.5rem/1 var(--mono); letter-spacing: .5em; text-align: center; width: 100%; height: 56px; color: var(--ink); background: rgba(3, 7, 9, .7); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 0 0 .5em; }
.otp input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 4px rgba(127, 224, 210, .16); }
.js .otp-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.js .otp input { position: absolute; inset: 0; opacity: 0; height: 100%; cursor: text; }
.cell { min-width: 0; height: 56px; display: grid; place-items: center; font: 500 1.5rem var(--mono); color: var(--ink); background: rgba(3, 7, 9, .7); border: 1px solid var(--line-2); border-radius: 8px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.cell.on { border-color: rgba(127, 224, 210, .5); }
.otp.focus .cell.cur { border-color: var(--signal); box-shadow: 0 0 0 4px rgba(127, 224, 210, .16); }
.otp.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97) both; }
.otp.bad .cell { border-color: rgba(242, 162, 140, .6); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }

/* staff enrolment */
.qr { display: grid; place-items: center; background: #eef3f2; border-radius: 8px; padding: 16px; width: 208px; height: 208px; margin: 0 0 16px; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret { font: 500 .875rem/1.4 var(--mono); letter-spacing: .06em; color: var(--ink); word-break: break-all; background: rgba(3, 7, 9, .7); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; user-select: all; }
.codes { list-style: none; padding: 16px; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font: 500 .9rem var(--mono); color: var(--ink); background: rgba(3, 7, 9, .7); border: 1px solid var(--line); border-radius: 8px; }
details.alt { margin: 16px 0 0; font-size: .875rem; }
details.alt summary { cursor: pointer; color: var(--body); }
details.alt .fld { margin-top: 16px; }
.btn.ghost { margin-top: 8px; }

.a-foot { padding: 16px clamp(24px, 5vw, 64px) 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .8125rem; color: var(--dim); }
.a-foot nav { display: flex; gap: 8px 16px; flex-wrap: wrap; }
.a-foot a { color: var(--dim); }

/* motion: one calm entrance for the card, nothing else moves unprompted */
@media (prefers-reduced-motion: no-preference) {
  .a-card { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
  .a-wrap::before { animation: bloom 1.4s ease-out both; }
}
@keyframes rise { from { transform: translateY(12px); } to { transform: none; } }
@keyframes bloom { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .art canvas, .btn, .cell, .fld input { transition: none; } }

/* phones: ribbon is a band at the top, the card overlaps its lower edge */
@media (max-width: 859px) {
  .art { bottom: auto; height: 56vh; height: 56svh;  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%); mask-image: linear-gradient(180deg, #000 60%, transparent 100%); }
  .art::after { background: none; }
  .art::before { background-image: url("ribbon-tall.webp"); background-position: center 30%; }
  .a-top { padding: 16px 24px; }
  .a-main { align-items: flex-start; padding: 24vh 16px 32px; padding-top: 24svh; }
  .a-wrap { margin-left: 0; max-width: none; }
  .a-wrap::before { width: 120%; height: 480px; }
  .a-card { padding: 24px; }
  .cell, .otp input { height: 52px; }
  .a-foot { padding: 8px 24px 24px; }
}
@media (max-width: 359px) { .a-card { padding: 16px; } .js .otp-cells { gap: 4px; } }
@media (min-width: 860px) and (max-height: 640px) { .a-main { align-items: flex-start; } }
@media print { .art, .grain { display: none; } }


/* Desert video background + centred glass card (Sean, 12 Nov 2026) */
.vart{background:#05030a}.vart::before{display:none}.vart video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}@media (prefers-reduced-motion:reduce){.vart video{display:none}.vart{background:#05030a url(desert/poster.webp) center/cover}}

/* Option B: centred glass card, no vignette */
.art::after{display:none!important}
.art{-webkit-mask-image:none!important;mask-image:none!important;height:auto!important;bottom:0!important}
.a-wrap::before{display:none}
.a-main{justify-content:center;align-items:center;padding:16px}
.a-wrap{margin:0 auto!important;max-width:440px}
.a-card{background:rgba(12,8,22,.74);border:1px solid rgba(255,255,255,.16);border-radius:22px;padding:36px;
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transform:translateZ(0);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),inset 0 0 0 1px rgba(255,255,255,.04),0 30px 80px -20px rgba(10,4,24,.55)}
.a-card h1,.a-card .lede,.a-card label{text-shadow:0 1px 12px rgba(0,0,0,.25)}
.a-card .lede{color:#fff;font-size:1.06em;line-height:1.55}.a-card h1,.a-card label{color:#fff}.a-card .fine,.a-card small,.a-card p,.a-card .links span{color:rgba(255,255,255,.95)}
.a-card input{background:rgba(255,255,255,.10)!important;font-size:16px!important;color:#fff!important;border:1px solid rgba(255,255,255,.22)!important;border-radius:12px!important}
.a-card .btn{border-radius:12px}
@media (max-width:860px){.a-main{align-items:center;padding:16px}.a-card{padding:26px}}
.grain{display:none}.a-card input::placeholder{color:rgba(255,255,255,.62)!important}.a-card label{font-weight:600}.a-top,.a-foot{text-shadow:0 1px 8px rgba(0,0,0,.6)}.a-foot,.a-foot a{color:rgba(255,255,255,.88)!important}