/*
  N. Never named: the ∩ sign, a dark gold wall, and as few words as the page can get away with.
  Three pages share this sheet: the home (sign + one button), the application, and the images.
  Palette: dark gold wall lit by the sign's amber halo; parchment ink. Opacity and transform only.
*/
@font-face { font-family: 'MD Text'; src: url('fonts/roboto-flex-text.woff2') format('woff2'); font-weight: 300 400; font-display: swap; }

:root {
  --wall-edge: #120c03;
  --wall: #241806;
  --wall-lit: #4a3410;
  --amber: #f2a65a;
  --amber-pale: #fbd6a6;
  --face: #2a2724;
  --ink: #e6d9bf;
  --mute: #a89468;
  --dim: #6b5a37;
  --line: rgba(230, 217, 191, .22);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
html, body { height: 100%; margin: 0; }
body {
  background: var(--wall-edge);
  color: var(--ink);
  font-family: 'MD Text', 'Roboto Flex', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
body.home { overflow: hidden; }

/* the wall: dark gold, lit from the sign, with a faint grain so it reads as a surface */
.wall { position: fixed; inset: 0; z-index: 0; background: radial-gradient(120% 90% at 50% 44%, var(--wall-lit) 0%, var(--wall) 45%, var(--wall-edge) 100%); }
.wall::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: .05; mix-blend-mode: overlay; }

/* the wash on the wall behind the sign: two soft amber pools, breathing very slowly */
.halo { position: fixed; left: 50%; top: 44%; width: 0; height: 0; z-index: 1; pointer-events: none; }
.halo i { position: absolute; left: 50%; top: 50%; display: block; border-radius: 50%; transform: translate(-50%, -50%); }
.halo .wide  { width: min(120vw, 1100px); height: min(90vh, 760px); background: radial-gradient(closest-side, rgba(242, 166, 90, .20), rgba(242, 166, 90, .06) 45%, rgba(242, 166, 90, 0) 100%); }
.halo .tight { width: min(70vw, 520px); height: min(60vh, 460px); background: radial-gradient(closest-side, rgba(251, 214, 166, .30), rgba(245, 178, 107, .11) 50%, rgba(242, 166, 90, 0) 100%); }
/* the heartbeat: two soft swells, then rest. The page's clock adds .beat every six seconds and the hum swells on the same tick. */
@keyframes heartbeat { 0% { opacity: .72; } 18% { opacity: 1; } 45% { opacity: .76; } 63% { opacity: .96; } 100% { opacity: .72; } }
.halo .wide, .halo .tight, .sign .glow { opacity: .72; }
.halo i.beat, .sign .glow.beat { animation: heartbeat 2s ease-in-out 1; }

/* the sign */
.sign { position: fixed; left: 50%; top: 44%; z-index: 2; margin: 0; transform: translate(-50%, -50%); width: min(44vw, 240px); }
.sign a { display: block; outline: none; }
.sign svg { display: block; width: 100%; height: auto; overflow: visible; transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .sign a:hover svg { transform: scale(1.02); } }
.sign a:active svg { transform: scale(0.98); }
.sign a:focus-visible svg { outline: 1px solid var(--amber-pale); outline-offset: 18px; }

/* the one button */
.cta { position: fixed; left: 0; right: 0; z-index: 2; top: calc(44% + min(22vw, 120px) + 64px); margin: 0; text-align: center; padding: 0 24px; }
.btn {
  display: inline-block; color: var(--ink); text-decoration: none; background: none;
  font: inherit; font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  padding: 13px 26px; border: 1px solid var(--line); cursor: pointer;
  transition: color 220ms var(--ease-out), border-color 220ms var(--ease-out), transform 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .btn:hover { color: var(--amber-pale); border-color: rgba(251, 214, 166, .55); } }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 1px solid var(--amber-pale); outline-offset: 6px; }

/* arrival: the wash comes up first, then the words. opacity only. */
.halo, .sign, .cta, .page { opacity: 0; transition: opacity 1600ms var(--ease-out); }
.cta, .page { transition-delay: 700ms; }
.ready .halo, .ready .sign, .ready .cta, .ready .page { opacity: 1; }

/* the key: a brass outline in the bottom-right corner, dim until the pointer rests on it, then lit */
.key { position: fixed; right: 22px; bottom: 20px; z-index: 5; width: 22px; height: 22px; color: #c9a85c; opacity: .28; outline: none; transition: opacity 320ms var(--ease-out), filter 320ms var(--ease-out), transform 160ms var(--ease-out); }
.key svg { display: block; width: 100%; height: 100%; }
@media (hover: hover) and (pointer: fine) { .key:hover { opacity: 1; filter: drop-shadow(0 0 6px rgba(251, 214, 166, .9)) drop-shadow(0 0 16px rgba(242, 166, 90, .55)); } }
.key:focus-visible { opacity: 1; filter: drop-shadow(0 0 6px rgba(251, 214, 166, .9)); }
.key:active { transform: scale(0.94); }
.ready .key { transition-delay: 0ms; }

/* the hum's mark: a speaker outline in the lower-left corner, as dim as the key; the waves show while it hums */
.hum { position: fixed; left: 22px; bottom: 20px; z-index: 5; width: 22px; height: 22px; padding: 0; background: none; border: 0; color: #c9a85c; opacity: .28; cursor: pointer; outline: none; transition: opacity 320ms var(--ease-out), transform 160ms var(--ease-out); }
.hum svg { display: block; width: 100%; height: 100%; }
.hum .w1, .hum .w2 { opacity: 0; transition: opacity 600ms var(--ease-out); }
.humming .hum .w1 { opacity: 1; } .humming .hum .w2 { opacity: .7; }
@media (hover: hover) and (pointer: fine) { .hum:hover { opacity: 1; } }
.hum:focus-visible { opacity: 1; outline: 1px solid var(--amber-pale); outline-offset: 6px; }
.hum:active { transform: scale(0.94); }

/* the door: name and the six digits from the authenticator */
.enter .page { max-width: 360px; padding-top: 140px; }
.enter .field input { letter-spacing: .04em; }
.enter .code input { font-size: 22px; letter-spacing: .34em; font-variant-numeric: tabular-nums; }
.enter .nope { margin: 0 0 26px; font-size: 12.5px; color: var(--mute); }

/* a small sign in the corner of the inner pages, the way home */
.corner { position: fixed; left: 24px; top: 20px; z-index: 5; width: 34px; }
.corner a { display: block; outline: none; }
.corner svg { display: block; width: 100%; height: auto; overflow: visible; opacity: .85; transition: opacity 200ms var(--ease-out), transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .corner a:hover svg { opacity: 1; } }
.corner a:active svg { transform: scale(0.96); }
.corner a:focus-visible svg { outline: 1px solid var(--amber-pale); outline-offset: 8px; }

/* the application */
.page { position: relative; z-index: 2; max-width: 440px; margin: 0 auto; padding: 120px 24px 80px; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.field label small { margin-left: 8px; letter-spacing: .1em; text-transform: none; color: var(--dim); }
.field input {
  box-sizing: border-box; width: 100%; padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--ink); font: inherit; font-size: 16px; outline: none; border-radius: 0;
  transition: border-color 220ms var(--ease-out);
}
.field input:focus { border-bottom-color: var(--amber-pale); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px var(--wall) inset; }
.form .send { margin-top: 10px; }
.note { margin: 30px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--mute); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* the images: three, one screen each, each a box on the wall, nothing else */
body.images { overflow: hidden; }
.images .wall { position: fixed; }
.frames { position: relative; z-index: 2; margin: 0; padding: 0; }
.frame { position: relative; height: 100vh; height: 100dvh; margin: 0; display: grid; place-items: center; }
.frame .pic { position: relative; display: block; width: min(78vw, 1200px, 108vh); aspect-ratio: 3 / 2; border: 1px solid rgba(230, 217, 191, .10); box-shadow: 0 30px 90px rgba(0, 0, 0, .5); cursor: pointer; background: #0f0a03; }
@media (max-width: 640px) { .frame .pic { width: calc(100vw - 32px); } }
.images .frames { opacity: 0; transition: opacity 1600ms var(--ease-out); }
.images.ready .frames { opacity: 1; }

@media (max-width: 640px) {
  .btn { font-size: 12px; letter-spacing: .14em; padding: 12px 22px; }
  .page { padding: 100px 20px 60px; }
  .corner { left: 18px; top: 16px; width: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .halo i.beat, .sign .glow.beat { animation: none; }
  .halo, .sign, .cta, .page, .images .frames { transition-duration: 400ms; transition-delay: 0ms; }
}
