/* billjalouk.com, the door page: the hidden way in. Plain CSS, no build step. Loaded by the door pages only,
   after home.css. The behaviour is in door.js. Chosen by Bill from two live ideas on 2026-11-14: hold the word.
   Nothing on this page shows that it can be held. Without scripts none of this applies and the page is plain. */

/* the binary keeps its place and its look, and becomes a 44 px target for the keyboard */
.simple-cipher {
  position: relative; display: inline-block; height: 44px; line-height: 44px; padding: 0 14px; margin: -14px;
  --hold: 0; --door-frame: 1;
}
/* what is held: no menu, no selection, no scroll while a finger rests on it. Two fingers still zoom. */
.door-spot {
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pinch-zoom;
  -webkit-tap-highlight-color: transparent;
}
.door-spot:focus { outline: none; }
.door-spot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* the agents take the words away, from the end of each line back to its start (--wipe 0 to 1) */
.door-wipe { clip-path: inset(-0.5em calc(var(--wipe, 0) * 100%) -0.5em -0.5em); }
html[dir="rtl"] .door-wipe { clip-path: inset(-0.5em -0.5em -0.5em calc(var(--wipe, 0) * 100%)); }

/* in a right-to-left page the agents work at the right edge: their labels hang to the left, inside the window */
html[dir="rtl"] .agent-label { left: auto; right: 22px; }

/* then the binary is read: a rose line fills under it (--hold 0 to 1) */
.simple-cipher::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 9px; height: 1px; background: var(--accent);
  box-shadow: 0 0 8px var(--accent); transform: scaleX(var(--hold)); transform-origin: 0 50%;
}
/* the bits being read are bright, and a finished byte becomes the letter it stands for */
.simple-cipher .bit { display: inline-block; }
.simple-cipher .bit.hot { color: var(--ink); text-shadow: 0 0 8px var(--accent); }
.simple-cipher .l {
  display: inline-block; padding: 0 3px; font-weight: var(--w-black); font-size: 22px; letter-spacing: 0; line-height: 1;
  color: var(--ink); text-shadow: 0 0 12px var(--accent); vertical-align: -3px;
}
.simple-cipher .bit[hidden], .simple-cipher .l[hidden] { display: none; }
/* the door opens: one flash, as on the homepage. The brackets are the homepage door's own (.access-frame). */
.simple-cipher::before {
  content: ""; position: absolute; inset: 0; border-radius: 6px; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, color-mix(in oklab, var(--accent) 45%, transparent), transparent 70%);
}
.door-open .simple-cipher::before { animation: door-flash 0.5s var(--ease-out); }
@keyframes door-flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .door-open .simple-cipher::before { animation: none; }
}
