/* Keystone access page — the LOGIN screen only. Nothing else uses this file.
 *
 * 🔴 WHY THIS FILE EXISTS AT ALL, because it is the point of the 2026-08-11 change:
 * the login page's CSS used to be a hardcoded string inside Gate.cs, so changing a
 * colour meant editing C#, rebuilding a win-x86 self-contained app and re-uploading a
 * DLL. Now the markup links this file and Gate.cs serves it from wwwroot, so every
 * later change to how the access page LOOKS is a plain file replacement in Plesk with
 * no build and no DLL. One rebuild was paid to never pay it again.
 *
 * 🔴 THE GATE MUST LET THIS FILE THROUGH BEFORE LOGIN. Gate.cs allowlists `/gate.css`
 * and anything under the `/gate-` prefix precisely so the access page can style itself
 * while the visitor is still locked out. Everything else in wwwroot -- app.js,
 * index.html, style.css and keystone-datacenter-report.pdf -- stays behind the gate.
 * ⚠️ So: only ever name a PUBLIC login asset `gate-*`. A file called `gate-secrets.txt`
 * in wwwroot would be readable by anyone.
 *
 * Design carried over from ~/Desktop/gate-preview/index.html (Keystone variant, card
 * bottom-centre, compact 300px) as chosen by Ken 2026-08-11.
 */

:root { color-scheme: dark }
* { box-sizing: border-box }
html, body { margin: 0; height: 100% }

body {
  font: 15px/1.5 ui-sans-serif, system-ui, 'Segoe UI', Roboto, sans-serif;
  /* The flat colour is the FALLBACK, and it is deliberate: if the background image ever
     fails to load the page is still a legible dark panel rather than white-on-white. */
  background: #05070a;
  color: #dbe4ee;
}

.stage { position: relative; min-height: 100vh }

.bg {
  position: absolute; inset: 0; z-index: 0;
  background: url('/gate-bg.jpg') center / cover no-repeat;
}

/* The scrim is what keeps the form readable over an arbitrary image: a soft vignette
   plus a top-and-bottom darkening, so text contrast does not depend on which part of
   the photograph happens to sit behind the card. */
.scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(78% 62% at 50% 34%, rgba(5, 8, 13, 0), rgba(5, 8, 13, .20) 60%, rgba(5, 8, 13, .72) 100%),
    linear-gradient(180deg, rgba(5, 8, 13, .42), rgba(5, 8, 13, 0) 34%, rgba(5, 8, 13, .55));
}

/* Card placement: bottom, centred. `align-items:end` puts it at the bottom of the grid
   and `justify-items:center` centres it horizontally. */
.place {
  position: absolute; inset: 0; z-index: 2;
  display: grid; align-items: end; justify-items: center;
  padding: 28px 28px 44px;
}

.card {
  width: 300px; max-width: calc(100vw - 32px);
  border-radius: 12px; padding: 20px 20px 22px;
  background: rgba(16, 23, 33, .62);
  border: 1px solid rgba(60, 84, 110, .45);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  /* Frosted glass. Unsupported browsers simply get the semi-transparent panel above,
     which is why the background colour carries real opacity rather than relying on it. */
  backdrop-filter: blur(16px) saturate(120%);
}

h1 { margin: 0 0 2px; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: #eaf2fa }
.sub { margin: 0 0 14px; font-size: 11px; line-height: 1.4; color: #93a8bf }

label {
  display: block; margin: 9px 0 3px;
  font-size: 9.5px; letter-spacing: .11em; text-transform: uppercase; color: #8fa3b8;
}

input {
  width: 100%; padding: 7px 9px; border-radius: 6px; font: inherit; font-size: 13px;
  border: 1px solid rgba(70, 95, 124, .5); background: rgba(7, 11, 17, .6); color: #e8f0f8;
}
input:focus { outline: 2px solid #2f81f7; outline-offset: -1px; border-color: transparent }

button.enter {
  width: 100%; margin-top: 16px; padding: 9px;
  border: 0; border-radius: 6px; font: 600 13px/1 inherit; cursor: pointer;
  background: #2f81f7; color: #fff;
}
button.enter:hover { background: #4a93fa }

.err {
  margin: 13px 0 0; padding: 9px 11px; border-radius: 6px; font-size: 12px;
  background: rgba(58, 21, 24, .85); border: 1px solid #5c2126; color: #ffb4ac;
}

.foot { margin: 13px 0 0; font-size: 10.5px; line-height: 1.45; text-align: center; color: #7488a0 }
.foot a { color: #93a8bf; text-decoration: none }
.foot a:hover { color: #2f81f7; text-decoration: underline }

/* On a short screen -- a phone in landscape, or a laptop with a small viewport -- pinning
   the card to the bottom can crowd it against the edge. Centre it instead. The design
   floor is a constrained device, so this is a real case rather than a hypothetical. */
@media (max-height: 560px) {
  .place { align-items: center; padding-bottom: 28px }
}

/* ---------------------------------------------------------------------------
   MATCH IGC'S PROPORTIONS — `[Ken, 2026-08-11]` "make keystone look like igc".
   The fields were already identical to IGC's; the only thing making this card
   taller was the wordy invitation note. Hidden here rather than removed from
   the page, so it is a stylesheet change with no rebuild — and reversible by
   deleting these two lines.
   The `:has(a)` test keeps the small "← Phoenician Industries" back-link and
   hides only the paragraph that has no link in it.
   --------------------------------------------------------------------------- */
p.foot:not(:has(a)) { display: none }
