/* Hallmark · gateway · two doors, each showing its own world at work: white for construction, soft blue for agents · tokens from corbel.css · v2.1.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R4 V4 · weakest: E, the doors carry no photograph yet; the Monday report and the agents' desk stand in until footage arrives */
/* Hallmark · waive 7b · pure white is pinned by the owner: white for every background is one of the four colours, by request */

/* The gateway: two doors. A visitor knows which side is theirs before reading a word, because each door shows its work:
   the owner's Monday report on the white door, the agents' drafts waiting for a person on the soft-blue door. Both are
   light: the two sides of one company, not two companies. */
html, body { background: var(--paper); }
.gate { position: relative; display: flex; height: 100svh; min-height: 640px; }
.cap { position: absolute; z-index: 5; inset: 0 0 auto; height: 12px; background: var(--brown); transform-origin: center; }
.mast { position: absolute; z-index: 6; top: 12px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-4) var(--space-6); background: var(--paper); border: 2px solid var(--ink); border-top: 0; }
.mast-logo { display: flex; align-items: center; gap: var(--space-3); }
.mast .mk { width: 34px; height: 34px; }
.mast .wm { width: auto; height: 27px; }
/* The mast says there is a choice to make. */
.ask { font: 500 13px/1 var(--font-outlier); color: var(--ink); white-space: nowrap; }

.door { position: relative; flex: 1 1 50%; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 112px var(--gutter) 136px; overflow: hidden; cursor: pointer; color: var(--ink); background: var(--paper); text-decoration: none; transition: flex-grow var(--turn) var(--set); }
.door-a { background: var(--sky); border-left: 2px solid var(--ink); }
.door:hover, .door:focus-visible { flex-grow: 1.36; }
.door:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }
.door:focus-visible .say { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 10px; }

.side { display: flex; justify-content: space-between; gap: var(--space-4); font: 500 13px/1 var(--font-outlier); color: var(--ink-muted); }
.say { margin-top: 20px; max-width: 11ch; font: 800 clamp(44px, min(5.6vw, 8.4vh), 92px)/0.9 var(--font-display); font-stretch: 112.5%; letter-spacing: -0.03em; overflow-wrap: break-word; min-width: 0; }
.sub { margin-top: 20px; max-width: 34ch; font-size: 18px; line-height: 1.45; color: var(--ink-muted); }
.door > * { transition: opacity var(--turn) var(--set); }

/* Each door has a handle: a black bar across its foot. The one you point at turns brown, the one thing to press, and
   the other door steps back. */
.handle { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 40px; display: flex; min-height: 64px; color: var(--paper); background: var(--ink); border: 2px solid var(--ink); transition: background-color var(--state), border-color var(--state); }
.h-t { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: var(--space-1); padding: 0 20px; font: 700 20px/1.1 var(--font-display); font-stretch: 112.5%; }
.h-t small { font: 500 12px/1 var(--font-outlier); opacity: 0.7; }
.h-a { display: grid; place-items: center; width: 64px; border-left: 2px solid var(--paper); }
.h-a svg { transition: transform var(--state); }
.door:hover .handle, .door:focus-visible .handle { background: var(--brown); border-color: var(--brown); }
.door:hover .h-a svg, .door:focus-visible .h-a svg { transform: translateX(6px); }
.gate:has(.door:hover) .door:not(:hover) > :not(.handle), .gate:has(.door:hover) .door:not(:hover) .handle { opacity: 0.4; }

/* Construction door: the job itself. Each week is a course laid out of the wall between the doors, each one reaching
   further than the last, like a corbel. This week is soft blue: the one in progress. */
.door-c { padding-right: 0; }
.door-c > div:first-child { padding-right: var(--gutter); }
.build { position: absolute; right: 0; bottom: 124px; width: 72%; }
.b-head { display: flex; justify-content: space-between; gap: var(--space-4); padding: 0 var(--gutter) var(--space-2) 0; font: 500 11px/1.2 var(--font-outlier); color: var(--ink-muted); }
.b-head span:first-child { color: var(--ink); }
.corbel { display: flex; flex-direction: column; align-items: flex-end; }
.corbel li { display: flex; align-items: center; gap: var(--space-3); width: calc(46% + var(--w) * 9%); height: clamp(28px, 4.4vh, 42px); margin-top: -2px; padding: 0 var(--gutter) 0 var(--space-4); background: var(--paper); border: 2px solid var(--ink); border-right: 0; font-size: 14px; white-space: nowrap; overflow: hidden; transition: transform var(--turn) var(--set); }
.corbel li b { min-width: 52px; font: 500 12px/1 var(--font-outlier); }
.corbel li span { overflow: hidden; text-overflow: ellipsis; }
.corbel li .stamp { flex: none; margin-left: auto; padding: var(--space-1) var(--space-2); font-size: 10px; }
.corbel li.now { background: var(--sky); }
.door-c:hover .corbel li.now { transform: translateX(-10px); }

/* Agents door: four drafts, each finished by software and waiting for a person. */
.desk { position: absolute; right: var(--gutter); bottom: 128px; width: min(420px, 48%); perspective: 1200px; }
.cards { position: relative; height: 300px; transform-style: preserve-3d; transform: rotateX(14deg) rotateY(-16deg); transition: transform var(--turn) var(--set); }
.door-a:hover .cards { transform: rotateX(6deg) rotateY(-6deg); }
.card { position: absolute; inset: 0 0 auto; color: var(--ink); padding: var(--space-4) 20px; background: var(--paper); border: 2px solid var(--ink); transform: translate3d(calc(var(--k) * 26px), calc(var(--k) * 56px), calc(var(--k) * -70px)); }
.card .who { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.card b { font: 800 30px/1 var(--font-display); font-stretch: 125%; letter-spacing: -0.02em; }
.card .stamp { padding: var(--space-2) var(--space-2); font-size: 11px; }
.card p { margin-top: var(--space-3); font-size: 14px; line-height: 1.45; }
.card small { display: block; margin-top: var(--space-2); font: 400 12px/1.3 var(--font-outlier); color: var(--ink-muted); }

/* Load: the cap draws, the doors open from the middle, the logo drops, then the stamps press and the desk starts to turn
   over its drafts. Only under .motion; without it every door is simply there. */
.js.motion .cap { animation: cap var(--turn) var(--set) both; }
.js.motion .mast { animation: drop 700ms var(--set) 500ms both; }
.js.motion .door-c { animation: open-l var(--pass) var(--set) both; }
.js.motion .door-a { animation: open-r var(--pass) var(--set) both; }
.js.motion .corbel li { animation: lay 520ms var(--set) both; animation-delay: calc(900ms + var(--i) * 140ms); }
.js.motion .card { animation: shuffle 12s var(--set) infinite; animation-delay: calc(var(--k) * -3s); }
/* Once the doors are open, each handle knocks twice, construction first, for a visitor who has not moved yet. */
.js.motion .h-a svg { animation: knock 1100ms var(--set) 2400ms both; }
.js.motion .door-a .h-a svg { animation-delay: 3000ms; }
@keyframes cap { from { transform: scaleX(0); } }
@keyframes drop { from { transform: translate(-50%, -110%); } }
@keyframes open-l { from { clip-path: inset(0 0 0 100%); } }
@keyframes open-r { from { clip-path: inset(0 100% 0 0); } }
@keyframes knock { 0%, 40%, 80%, 100% { transform: none; } 20%, 60% { transform: translateX(8px); } }
@keyframes lay { from { transform: translateX(101%); } }
@keyframes shuffle {
  0%, 21% { transform: translate3d(0, 0, 0); opacity: 1; }
  25%, 46% { transform: translate3d(78px, 168px, -210px); opacity: 0.55; }
  50%, 71% { transform: translate3d(52px, 112px, -140px); opacity: 0.75; }
  75%, 96% { transform: translate3d(26px, 56px, -70px); opacity: 0.9; }
  100% { transform: translate3d(0, 0, 0); opacity: 1; }
}

/* Narrower desktops: the corbel takes more of the door and drops the stamp so every week reads in full. Short screens
   show the latest four weeks, so the stack stays clear of the sentence. */
@media (min-width: 901px) and (max-width: 1279px) {
  .build { width: 82%; }
  .corbel li { font-size: 13px; }
  .corbel li b { min-width: 44px; }
  .corbel li .stamp { display: none; }
}
@media (min-width: 901px) and (max-height: 820px) {
  .corbel li { font-size: 13px; }
  .corbel li:nth-child(n+5) { display: none; }
}

/* On a phone both doors share the first screen, so the choice is visible before any scrolling: the logo tab, then
   each door as its line, its sentence and its handle. The corbel and the desk stay on larger screens. */
@media (max-width: 900px) {
  .gate { flex-direction: column; height: auto; min-height: 100svh; padding-top: var(--space-3); }
  .mast { position: static; align-self: center; transform: none; padding: var(--space-3) var(--space-4); }
  .js.motion .mast { animation-name: drop-m; }
  .door { flex: 1 1 auto; min-height: 0; padding: var(--space-6) var(--space-4) 104px; }
  .door-c { padding-right: var(--space-4); }
  .door-c > div:first-child { padding-right: 0; }
  .door-a { border-left: 0; border-top: 2px solid var(--ink); }
  .door:hover, .door:focus-visible { flex-grow: 1; }
  .gate:has(.door:hover) .door:not(:hover) > :not(.handle), .gate:has(.door:hover) .door:not(:hover) .handle { opacity: 1; }
  .build, .desk { display: none; }
  .say { margin-top: var(--space-3); max-width: none; font-size: clamp(34px, 10.4vw, 44px); line-height: 0.95; }
  .sub { margin-top: var(--space-3); max-width: none; font-size: 16px; }
  .handle { left: var(--space-4); right: var(--space-4); bottom: var(--space-6); min-height: 56px; }
  .h-t { font-size: 18px; padding: 0 var(--space-4); }
  .h-a { width: 56px; }
  .ask { font-size: 12px; }
  .mast .mk { width: 28px; height: 28px; }
  .mast .wm { height: 22px; }
}
@keyframes drop-m { from { transform: translateY(-110%); } }
