@font-face { font-family: "Josefin Sans"; font-weight: 300; font-display: swap; src: url(/f/josefin-sans/josefin-sans-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-display: swap; src: url(/f/instrument-serif/instrument-serif-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url(/f/instrument-serif/instrument-serif-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url(/f/dm-sans/dm-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url(/f/dm-sans/dm-sans-latin-500-normal.woff2) format("woff2"); }

:root {
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", "Segoe UI", system-ui, sans-serif;
}
/* colours: theme.css. On black these pages use two shades of their own. */
:root:not([data-theme="light"]) { --mute: #5f5b55; --line: #24211e; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--black); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }

#hole { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0; transition: opacity 2s ease; }
#hole.on { opacity: 1; }

.top { position: fixed; top: 0; left: 0; right: 0; z-index: 2; padding: 30px clamp(24px, 4vw, 56px); }
.brand { font: 400 1.5rem/1 var(--serif); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.note { position: fixed; bottom: 30px; left: clamp(24px, 4vw, 56px); z-index: 2; margin: 0; font-size: .8rem; color: var(--mute); }

.stage { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: flex-end; padding: 110px clamp(24px, 9vw, 160px); }
.card { width: 100%; max-width: 372px; }
.card h1 { font: 400 clamp(3.4rem, 5.6vw, 4.6rem)/.98 var(--serif); letter-spacing: -.02em; margin: 0 0 14px; }
.card h1 em { font-style: italic; color: var(--ember); }
.lede { color: var(--soft); margin: 0 0 36px; max-width: 32ch; }

.lbl { display: block; font: 500 .8rem var(--sans); color: var(--soft); margin: 0 0 8px; }
.field { margin: 0 0 18px; }
.box {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px; min-width: 0;
  background: var(--field); border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s;
}
.box:focus-within { border-color: var(--ember); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ember) 12%, transparent); }
button.box { cursor: pointer; color: var(--mute); font: 400 1rem var(--sans); text-align: left; }
button.box:hover { border-color: var(--line-2); }
button.box.set { color: var(--ink); }
button.box:focus-visible { outline: none; border-color: var(--ember); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ember) 12%, transparent); }
.fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hint { flex: none; font-size: .8rem; color: var(--soft); }
.box input[type=text] { letter-spacing: 0; }
.box input { flex: 1; min-width: 0; height: 50px; background: none; border: 0; outline: none; color: var(--ink); font: 400 1rem var(--sans); letter-spacing: .12em; }

.go {
  display: block; width: 100%; height: 54px; margin-top: 26px; cursor: pointer;
  background: var(--ink); color: var(--on-fill); border: 0; border-radius: 12px;
  font: 500 1rem var(--sans); transition: background .2s, transform .1s;
}
.go:hover { background: var(--ink-max); }
.go:active { transform: scale(.985); }
.go:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.go:disabled { background: var(--line-2); color: var(--soft); cursor: wait; }
#migration { height: auto; padding: 10px; margin-top: 12px; background: transparent; color: var(--mute); font-size: .8rem; }
#migration:hover { color: var(--ink); }
#migration-fields input[type=file] { width: 100%; color: var(--ink); margin-bottom: 12px; }

.fine { font-size: .8rem; color: var(--mute); margin: -4px 0 0; }
.go.link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.status { min-height: 1.5em; margin: 16px 0 0; font-size: .875rem; color: var(--soft); }
.status.err { color: var(--bad); }
.status.ok { color: var(--ember); }
[hidden] { display: none !important; }

/* granted: the page is drawn into the hole */
.card, .top, .note { transition: opacity 1s ease-in, transform 1.2s cubic-bezier(.6, 0, .9, .4), filter 1s ease-in; }
.granted .card { opacity: 0; transform: translateX(-32vw) scale(.3); filter: blur(6px); }
.granted .top, .granted .note { opacity: 0; }

@media (max-aspect-ratio: 115/100), (max-width: 760px) {
  .top { position: absolute; text-align: center; padding: 26px 16px; }
  .note { position: static; text-align: center; padding: 0 16px 30px; }
  .stage { min-height: 0; display: block; padding: 56vh 20px 40px; background: linear-gradient(to bottom, transparent 42vh, color-mix(in srgb, var(--black) 85%, transparent) 58vh, var(--black) 72vh); }
  .card { max-width: 420px; margin: 0 auto; }
  .card h1 { font-size: 3.2rem; }
  .granted .card { transform: translateY(-34vh) scale(.3); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* the name of the system at the top of the sign-in, new-key and invitation pages */
.top .cyg { display: inline-flex; align-items: center; text-decoration: none; font-size: 1.75rem; color: var(--soft); }
.top .cyg-name { font: 300 1em/1 "Josefin Sans", "DM Sans", system-ui, sans-serif; text-transform: uppercase; letter-spacing: .36em; margin-right: -.36em; color: var(--ink); }
.top .cyg .brand-sub { align-self: flex-end; margin: 0 0 .25em 10px; font: 400 .8rem "DM Sans", system-ui, sans-serif; color: var(--soft); letter-spacing: .02em; }
