/* Sign-in page. Self-contained: one typeface, one canvas, no other file. Says nothing.
   The picture: three strands of a double helix standing upright side by side on the right side, turning slowly (door.js).
   The form is flat: a solid surface with a hairline, no gradient, no blur, no glow.
   Four skins, chosen with the swatches bottom left and remembered in this browser: white, black, blue, serpent. */
@font-face { font-family: "Door Text"; src: url("text.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@view-transition { navigation: auto; }

:root, :root[data-skin="white"] {
  color-scheme: light;
  --bg: #f2f1ed; --surface: #f8f7f4; --ink: #0b0b0c; --mute: #5d5b55; --line: rgba(11, 11, 12, .22); --alert: #a3271b;
  --strand: 11, 11, 12; --ground: none;
}
:root[data-skin="black"] {
  color-scheme: dark;
  --bg: #0b0b0c; --surface: #141416; --ink: #efeee9; --mute: #8f8d86; --line: rgba(239, 238, 233, .22); --alert: #f08a7c;
  --strand: 239, 238, 233;
}
:root[data-skin="blue"] {
  /* the blue of the second app, value for value: ground, its one solid surface, text, second text, hairline (its stronger
     border), and its accent for the focus line */
  color-scheme: dark;
  --bg: #032230; --surface: #06293A; --ink: #EAF3F8; --mute: #8FAEC0; --line: rgba(143, 190, 213, .28); --alert: #f08a7c;
  --strand: 143, 190, 213; --focus: #8FBED5;
  --ground: radial-gradient(ellipse 80% 60% at 20% 0%, rgba(15,77,110,0.35), transparent 60%), radial-gradient(ellipse 70% 50% at 85% 100%, rgba(0,53,78,0.45), transparent 60%), linear-gradient(180deg, #032230 0%, #001A26 100%);
}
:root[data-skin="serpent"] {
  /* the serpent of the second app, value for value: wet stone, its one solid surface, scale light (not pure white), second
     text, hairline, and the eye as the one signal (the focus line), never as an area */
  color-scheme: dark;
  --bg: #131315; --surface: #1C1C20; --ink: #F7E9EC; --mute: #C6A6AE; --line: rgba(247, 233, 236, .26); --alert: #f08a7c;
  --strand: 235, 205, 212; --focus: #C97E8C;
  --ground: radial-gradient(ellipse 75% 55% at 18% 0%, rgba(247,233,236,0.10), transparent 62%), radial-gradient(ellipse 65% 50% at 88% 100%, rgba(201,126,140,0.13), transparent 60%), linear-gradient(180deg, #17171A 0%, #0C0C0E 100%);
}

*, *::before, *::after { box-sizing: border-box; }
/* Serpent's ground is its gradient only (16.11.2026: no structure in the colour skin): the body paints --ground. */
html { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100%; color: var(--ink); background-color: var(--bg); background-image: var(--ground);
  font: 400 1.0625rem/1.45 "Door Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
.door__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the form sits in the middle of the page's height; on a wide screen in the left part, the three strands stand in the right part */
.door {
  position: relative; z-index: 1; isolation: isolate; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: max(4.75rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right)) max(4.75rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
}
.door__sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.door__col { width: 100%; max-width: 23.5rem; }

.door__pane {
  display: block; width: 100%; margin: 0; padding: 1.6rem 1.5rem 1.5rem; border-radius: 1rem;
  background: var(--surface); border: 1px solid var(--line);
  transition: opacity .32s ease;
}
.door__pane.is-shut { opacity: 0; pointer-events: none; }
.door__pane.is-wrong { animation: door-no .45s .1s cubic-bezier(.3, .1, .3, 1); }

.door__title { margin: 0 0 .5rem; font-size: 1.375rem; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.door__lead { margin: 0 0 .6rem; color: var(--mute); font-size: .98rem; max-width: 36ch; }
.door__msg { margin: 0 0 .7rem; padding-left: 1.05rem; position: relative; color: var(--alert); font-size: .95rem; font-weight: 500; }
.door__msg::before { content: ""; position: absolute; left: 0; top: .5em; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }

.door__field { position: relative; margin-top: 1.05rem; }
.door__field:first-of-type { margin-top: 0; }
.door__field label { display: block; font-size: .8125rem; font-weight: 500; letter-spacing: .01em; color: var(--mute); transition: color .2s ease; }
.door__field input {
  display: block; width: 100%; min-height: 2.9rem; margin: 0; padding: .5rem 0 .6rem; border: 0; border-radius: 0; outline: 0;
  background: transparent; color: var(--ink); caret-color: var(--ink);
  font: 500 1.0625rem/1.3 "Door Text", ui-sans-serif, system-ui, sans-serif; letter-spacing: .005em;
  -webkit-appearance: none; appearance: none;
}
.door__field input[type="password"] { padding-right: 3rem; letter-spacing: .08em; }
.door__field input:-webkit-autofill, .door__field input:-webkit-autofill:hover, .door__field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink);
  -webkit-box-shadow: 0 0 0 100px var(--surface) inset; transition: background-color 99999s ease-out 0s;
}
/* the line under a field: a hairline at rest, a full line drawn from the left on focus */
.door__field i { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); pointer-events: none; }
.door__field i::before { content: ""; position: absolute; left: 0; right: 0; top: -.5px; height: 2px; background: var(--focus, var(--ink)); transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s cubic-bezier(.2, .8, .1, 1); }
.door__field:focus-within label { color: var(--ink); }
.door__field:focus-within i::before { transform: scaleX(1); }

.door__eye {
  position: absolute; right: -.55rem; bottom: .1rem; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--mute); cursor: pointer; display: grid; place-items: center; transition: color .2s ease;
}
.door__eye svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.door__eyeline { stroke-dasharray: 23; stroke-dashoffset: 0; transition: stroke-dashoffset .25s ease; }
.door__eye[aria-pressed="true"] .door__eyeline { stroke-dashoffset: 23; }
.door__eye:hover { color: var(--ink); }
.door__caps { margin: .6rem 0 0; font-size: .85rem; color: var(--ink); font-weight: 500; }
.door__caps[hidden] { display: none; }

.door__go {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; min-height: 3.4rem; margin: 1.5rem 0 0; padding: 0 1rem 0 1.4rem; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg); cursor: pointer; text-decoration: none;
  font: 600 1.0625rem/1 "Door Text", ui-sans-serif, system-ui, sans-serif; letter-spacing: .005em;
  transition: opacity .2s ease, transform .12s ease; -webkit-tap-highlight-color: transparent;
}
.door__go:hover { opacity: .88; }
.door__go:active { transform: scale(.99); }
.door__go svg { width: 1.6rem; height: 1.6rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; transform: rotate(-90deg); }
.door__go circle { stroke-dasharray: 53.4; stroke-dashoffset: 0; transition: stroke-dashoffset .25s ease; }
.door__go.is-going { pointer-events: none; opacity: 1; }
.door__go.is-going svg { animation: door-turn .8s linear infinite; }
.door__go.is-going circle { stroke-dashoffset: 36; }

.door__eye:focus-visible, .door__go:focus-visible, .door__skin:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 3px; }

/* bottom line: the four skins left, the hour right */
.door__foot {
  position: absolute; left: max(1.5rem, env(safe-area-inset-left)); right: max(1.5rem, env(safe-area-inset-right)); bottom: max(.9rem, env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 2.75rem;
  color: var(--mute); font-size: .8125rem; font-variant-numeric: tabular-nums; transition: opacity .32s ease;
}
.door.is-leaving .door__foot { opacity: 0; }
.door__skins { display: flex; margin-left: -.75rem; }
.door__skin { width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.door__skin::before { content: ""; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s ease; }
.door__skin[aria-pressed="true"]::before { box-shadow: 0 0 0 1px var(--bg), 0 0 0 2.5px var(--ink); }
.door__skin[data-skin-set="white"] { --dot: #f2f1ed; }
.door__skin[data-skin-set="black"] { --dot: #0b0b0c; }
.door__skin[data-skin-set="blue"] { --dot: #032230; }
.door__skin[data-skin-set="serpent"] { --dot: linear-gradient(135deg, #F4DDE2 0%, #F4DDE2 48%, #17171A 52%, #17171A 100%); }

@media (min-width: 56rem) {
  .door__pane { padding: 1.9rem 1.9rem 1.8rem; }
}
/* a wide screen: the form in the middle of the left 58 %, clear of the strands in the right 42 % */
@media (min-width: 46rem) {
  .door { grid-template-columns: 58fr 42fr; }
  .door__col { grid-column: 1; }
}
/* no room beside the form: the strands stand on the right part of the screen behind the solid form, and the bottom line
   becomes a solid strip in front of them, so no line runs through a dot or the hour */
@media (max-width: 45.99rem) {
  .door__foot { left: 0; right: 0; bottom: 0; min-height: 0; padding: .3rem max(1.5rem, env(safe-area-inset-right)) max(.3rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
    background: var(--surface); border-top: 1px solid var(--line); }
}
/* a phone: the form takes the whole width, so it sits in the upper part (free of the keyboard) */
@media (max-width: 37.5rem) {
  .door { align-items: start; padding-top: max(3.5rem, 11vh); padding-top: max(3.5rem, 11svh); }
}
/* short windows (a phone with the keyboard up): keep the form reachable, let the page scroll */
@media (max-height: 34rem) {
  .door { padding-top: 1.25rem; align-items: start; }
  .door__go { margin-top: 1.1rem; }
}

@keyframes door-turn { to { transform: rotate(270deg); } }
@keyframes door-no { 0%, 100% { translate: 0 0; } 20% { translate: -.45rem 0; } 45% { translate: .35rem 0; } 70% { translate: -.18rem 0; } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .door__pane, .door__go, .door__field i::before, .door__foot { transition: none; }
  .door__pane.is-wrong, .door__go.is-going svg { animation: none; }
}
