/* 2FA — flat violet space scene modelled on secure-the-unknown.cyera.com.
   No inline styles in the HTML: the server CSP is style-src 'self' (fonts: font-src 'self'). */
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "NotoSC-2FA"; src: url("fonts/noto-sans-sc.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
:root {
  --cjk: "Hanken Grotesk", "NotoSC-2FA", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --digits: "Hanken Grotesk", "NotoSC-2FA", "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
  --ink: #130a1f;
  --green: #7be26a;
  --pod: clamp(230px, min(21.5vw, 36vh), 420px);
  --px: 63%; --py: 34%;       /* pod centre */
  --t0: 1.4s;                 /* intro length; 0 when the intro was already shown this session */
  color-scheme: dark;
}
.seen { --t0: 0s; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; color: #fff; font-family: var(--cjk); overflow-x: hidden; background: #6d2d93; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
button, input { font: inherit; color: inherit; }
.defs { position: absolute; width: 0; height: 0; }
/* generated pictures swapped in by app.js (see art.js) behave like the drawings they replace */
img.f, img.lc, img.pod-art, img.ground { max-width: none; object-fit: contain; }
img.ground { display: block; }
/* a drawing is hidden while its replacement picture loads (art.js adds html.art-<name>) */
html.art-pod svg.pod-art, html.art-groundL svg.ground-l, html.art-groundR svg.ground-r { visibility: hidden; }
html.art-rock svg.f:has(use[href="#rock"]), html.art-vrock svg.f:has(use[href="#vrock"]), html.art-pebble svg.f:has(use[href="#pebble"]), html.art-leaf svg.f:has(use[href="#leaf"]),
html.art-bar svg.f:has(use[href="#bar"]), html.art-slab svg.f:has(use[href="#slab"]), html.art-dodeca svg.f:has(use[href="#dodeca"]), html.art-gem svg.f:has(use[href="#gem"]),
html.art-leaf svg.lc:has(use[href="#leaf"]), html.art-bar svg.lc:has(use[href="#bar"]), html.art-gem svg.lc:has(use[href="#gem"]), html.art-slab svg.lc:has(use[href="#slab"]) { visibility: hidden; }

/* ---------- loading intro ---------- */
.loader { position: fixed; inset: 0; z-index: 100; background: #6d2d93; pointer-events: none; overflow: hidden; animation: loaderOut .75s cubic-bezier(.6, 0, .3, 1) calc(var(--t0) - .05s) forwards; }
.seen .loader { display: none; }
@keyframes loaderOut { to { opacity: 0; visibility: hidden; transform: translateY(-4%); } }
.beam-big { width: 20vw; min-width: 150px; margin-left: max(-10vw, -75px); height: 62%; filter: blur(26px); opacity: .55; animation: none; background: linear-gradient(180deg, rgba(235, 215, 255, .5), rgba(200, 160, 235, .38) 70%, rgba(200, 160, 235, 0)); }
.beam {
  position: absolute; top: -4%; left: 50%; width: 9vw; min-width: 70px; height: 58%; margin-left: max(-4.5vw, -35px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .22) 55%, rgba(255, 255, 255, 0));
  filter: blur(12px); animation: beam 2.4s ease-in-out infinite alternate;
}
@keyframes beam { from { opacity: .7; } to { opacity: 1; } }
.lstack { position: absolute; left: 0; right: 0; top: 27%; display: flex; flex-direction: column; align-items: center; }
.lbrand { display: flex; align-items: center; gap: 9px; font: 600 clamp(28px, 3.4vw, 46px)/1 var(--digits); letter-spacing: -.02em; }
.lbrand svg { width: .95em; height: .95em; }
.lbrand span { font-weight: 300; font-family: var(--cjk); letter-spacing: 0; }
.lload { margin: 14px 0 0; font-size: 15px; letter-spacing: .02em; }
.lbar { position: relative; display: block; width: 130px; height: 2px; margin-top: 21vh; background: rgba(255, 255, 255, .3); overflow: hidden; }
.lbar b { position: absolute; left: 0; top: 0; bottom: 0; width: 42%; background: #fff; animation: bar 1.1s linear infinite; }
@keyframes bar { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
.lc { position: absolute; display: block; overflow: visible; height: auto; aspect-ratio: 1; animation: lfloat 3.6s ease-in-out infinite alternate; }
.lbrand span { margin-left: .22em; }
.l1 { left: 41.5%; top: 17%; width: 1.5vw; aspect-ratio: .6; rotate: 18deg; }
.l2 { left: 47%; top: 22%; width: 2vw; animation-delay: -1s; }
.l3 { left: 55.5%; top: 18%; width: 1.4vw; aspect-ratio: .3; rotate: -72deg; animation-delay: -2s; }
.l4 { left: 40%; top: 35%; width: 1.8vw; aspect-ratio: .6; rotate: 20deg; animation-delay: -.6s; }
.l5 { left: 49.3%; top: 36.5%; width: 1.7vw; animation-delay: -1.6s; }
@keyframes lfloat { from { transform: translate3d(0, -.6vw, 0) rotate(-12deg); } to { transform: translate3d(.3vw, .6vw, 0) rotate(12deg); } }

/* ---------- background: plum gradient + vignette + paper grain + soft clouds ---------- */
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(62% 56% at 96% -4%, rgba(160, 90, 200, .6) 0%, transparent 70%),
    radial-gradient(60% 75% at -4% 48%, rgba(26, 8, 46, .8) 0%, transparent 72%),
    radial-gradient(56% 50% at var(--px) var(--py), rgba(124, 62, 166, .55) 0%, transparent 74%),
    radial-gradient(80% 42% at 92% 104%, rgba(24, 6, 46, .55) 0%, transparent 70%),
    linear-gradient(180deg, #5a2d7e 0%, #532a74 55%, #4a2368 100%);
}
/* looping ambient video (light shafts, bokeh, dust): black background + screen blend = it only adds light */
.bgvideo { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 2.4s ease; }
.bgvideo.on { opacity: .95; }
.sky.has-bg { background: radial-gradient(60% 75% at -4% 48%, rgba(26, 8, 46, .55) 0%, transparent 72%), radial-gradient(80% 42% at 92% 104%, rgba(24, 6, 46, .4) 0%, transparent 70%), var(--bg-img) center / cover no-repeat; }
.clouds { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: .32; mix-blend-mode: soft-light; }
.grain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: .26; mix-blend-mode: overlay; }
/* ---------- debris ---------- */
.space { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; animation: fadeIn 1.1s ease var(--t0) both; }
.space.near { z-index: 4; }
.r { position: absolute; display: block; aspect-ratio: 1; translate: 0 0; transition: translate .9s cubic-bezier(.2, .7, .2, 1); }
.f { display: block; width: 100%; height: 100%; overflow: visible; animation: drift var(--dur, 12s) ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(0, -.7vw, 0) rotate(calc(var(--rot, 8deg) * -1)); } to { transform: translate3d(.2vw, .7vw, 0) rotate(var(--rot, 8deg)); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.a1  { left: 55.6%; top: 4%;   width: 12.5vw; } .a1 .f  { --dur: 15s; --rot: 4deg; }
.a2  { left: 90.5%; top: -2%;  width: 9.5vw; }  .a2 .f  { --dur: 17s; --rot: -5deg; }
.a3  { left: 37.5%; top: 21%;  width: 6.2vw; }  .a3 .f  { --dur: 12s; --rot: -9deg; }
.a4  { left: 46.8%; top: 25.5%; width: 1.8vw; aspect-ratio: .3; } .a4 .f { --dur: 11s; --rot: 7deg; }
.a5  { left: 74.5%; top: 18.5%; width: 6.4vw; rotate: -8deg; } .a5 .f  { --dur: 10s; --rot: -7deg; }
.a6  { left: -1.6%; top: 31%;  width: 6.5vw; }  .a6 .f  { --dur: 14s; --rot: 6deg; }
.a7  { left: 25%; top: 25%;    width: 2.2vw; }  .a7 .f  { --dur: 9s; --rot: 12deg; }
.a8  { left: 14%; top: 13%;    width: 1.5vw; }  .a8 .f  { --dur: 10s; --rot: 10deg; }
.a9  { left: 17%; top: 28%;    width: 2.4vw; aspect-ratio: .6; rotate: -28deg; } .a9 .f { --dur: 8s; --rot: 9deg; }
.a10 { left: 91%; top: 59%;    width: 1.5vw; aspect-ratio: .3; rotate: 48deg; } .a10 .f { --dur: 12s; --rot: -8deg; }
.a11 { left: 73.5%; top: 63%;  width: 10vw; }   .a11 .f { --dur: 16s; --rot: -4deg; }
.a12 { left: 86%; top: 69%;    width: 2.4vw; }  .a12 .f { --dur: 9s; --rot: 12deg; }
.a13 { left: 63%; top: 79%;    width: 3vw; }    .a13 .f { --dur: 13s; --rot: -8deg; }
.a14 { left: 22%; top: 18%;    width: 1.8vw; }  .a14 .f { --dur: 11s; --rot: 9deg; }
.a15 { left: 86%; top: 55%;    width: 2.6vw; aspect-ratio: .6; rotate: 38deg; } .a15 .f { --dur: 10s; --rot: 8deg; }
.n1  { left: 24%; top: 74%;    width: 12vw; }   .n1 .f  { --dur: 18s; --rot: 3deg; }
.n2  { left: 5%; top: 80%;     width: 7.5vw; }  .n2 .f  { --dur: 14s; --rot: -5deg; }
/* ---------- terrain ---------- */
.ground { position: fixed; bottom: 0; z-index: 4; pointer-events: none; height: auto; translate: 0 0; transition: translate .9s cubic-bezier(.2, .7, .2, 1); animation: groundIn 1.2s cubic-bezier(.2, .8, .2, 1) var(--t0) both; }
.ground-l { left: -3vw; width: 44vw; }
.ground-r { right: -3vw; width: 24vw; }
@keyframes groundIn { from { opacity: 0; transform: translate3d(0, 7%, 0); } to { opacity: 1; transform: none; } }

/* ---------- header ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10; height: 70px; padding: 0 clamp(16px, 2.4vw, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; animation: fadeIn .8s ease var(--t0) both;
}
.topbar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: 600 19px/1 var(--digits); letter-spacing: -.02em; }
.brand svg { width: 21px; height: 21px; }
.brand span { font-weight: 300; font-family: var(--cjk); font-size: 18px; letter-spacing: 0; margin-left: 1px; }
.actions { display: flex; align-items: center; gap: 8px; }
.link, .pill { font: 500 14px/1 var(--cjk); cursor: pointer; transition: opacity .2s, transform .15s, background .2s; }
.link { background: none; border: 0; padding: 12px 10px; color: #fff; }
.pill { background: #fff; color: #3a0d6a; border: 0; border-radius: 9px; padding: 12px 18px; }
.link:disabled, .pill:disabled { opacity: .55; cursor: default; }
.pill:not(:disabled):hover { transform: translateY(-1px); background: #f4ecff; }
.link:not(:disabled):hover { opacity: .75; }

/* ---------- pod ---------- */
.page { position: relative; z-index: 5; min-height: 100vh; min-height: 100dvh; overflow: clip; }
.pod-wrap {
  position: absolute; left: var(--px); top: var(--py); width: var(--pod); aspect-ratio: 1; margin: calc(var(--pod) * -.5) 0 0 calc(var(--pod) * -.5);
  translate: 0 0; transition: translate .9s cubic-bezier(.2, .7, .2, 1); animation: podIn 1.1s cubic-bezier(.2, .8, .2, 1) calc(var(--t0) + .1s) both;
}
@keyframes bob { from { translate: 0 -1.4%; } to { translate: 0 1.4%; } }
@keyframes podIn { from { opacity: 0; transform: scale(1.14) translateY(-3%); } to { opacity: 1; transform: none; } }
.orbits { position: absolute; left: 50%; top: 50%; width: 215%; aspect-ratio: 1; transform: translate(-50%, -50%); overflow: visible; pointer-events: none; }
.orbits circle { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 1.1px; vector-effect: non-scaling-stroke; }
.orbits circle:nth-child(1) { stroke-dasharray: 2 7; stroke: rgba(255, 255, 255, .28); }
.orbits circle:nth-child(2) { stroke: rgba(255, 255, 255, .12); }
.orbits circle:nth-child(3) { stroke-dasharray: 2 7; stroke: rgba(255, 255, 255, .18); }
.orbits .ring-bg, .orbits .ring-fg { vector-effect: none; }
.orbits .ring-bg { stroke: rgba(255, 255, 255, .26); stroke-dasharray: .35 .8; stroke-width: .3; }
.orbits .ring-fg {
  stroke: var(--green); stroke-width: .42; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset .25s linear, opacity .3s, stroke .3s;
}
.page.has-code .ring-fg { opacity: 1; stroke-dashoffset: calc((1 - var(--left, 1)) * 100); }
.page.urgent .ring-fg { stroke: #ff8fc0; }

.pod { animation: bob 7s ease-in-out infinite alternate; position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; display: block; container-type: inline-size; color: #f6ecff; }
.pod:disabled { cursor: default; color: #f6ecff; }
.pod:not(:disabled):hover .pod-art { transform: scale(1.015); filter: brightness(1.06); }
.pod-art { transition: transform .3s, filter .25s; }
.pod.copied .pod-art { filter: brightness(1.16) saturate(1.1); }
.pod.copied .code { text-shadow: 0 0 4.2cqw rgba(225, 190, 255, .95); transition: text-shadow .2s; }
.pod-art { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .3s; }
.pod:focus-visible { outline: 2px solid #fff; outline-offset: 6px; border-radius: 50%; }
.code {
  position: absolute; left: var(--cl, 43.75%); top: var(--ct, 26.5%); width: var(--cw, 46.75%); height: var(--ch, 36.5%); display: flex; align-items: center; justify-content: center;
  font: 700 9.6cqw/1 var(--digits); letter-spacing: .02em; font-variant-numeric: tabular-nums; color: #f6ecff; text-shadow: 0 0 2.2cqw rgba(190, 140, 255, .55);
}
.code:empty::before { content: "--- ---"; color: rgba(246, 236, 255, .3); letter-spacing: .06em; }
.code .gap { display: inline-block; width: .4em; }
/* text sits on the slanted glass: follow each window's perspective tilt */
.code { transform: rotate(var(--cr, 3.1deg)); }
.secs { transform: rotate(var(--sr, -7deg)); }
.secs b { color: #f6ecff; }
.page:not(.has-code) .secs b { color: rgba(246, 236, 255, .3); }
.page:not(.has-code) .secs i { opacity: .35; }
.secs { position: absolute; left: var(--sl, 7%); top: var(--st, 29%); width: var(--sw, 21%); height: var(--sh, 38%); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.secs b { font: 700 8cqw/1 var(--digits); font-variant-numeric: tabular-nums; text-shadow: 0 .4cqw 1.2cqw rgba(30, 8, 60, .6); }
.secs i { font-style: normal; font-size: 3.2cqw; opacity: .8; margin-top: .8cqw; }
.page.urgent .code, .page.urgent .secs b { color: #ff9ac6; }

/* ---------- headline + input ---------- */
.hero { position: absolute; left: 0; right: 0; top: calc(var(--py) + var(--pod) * .5 - 6.4vh); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 16px; }
.headline { margin: 0; font-weight: 500; font-size: clamp(28px, min(6vw, 10vh), 100px); line-height: 1.12; letter-spacing: -.01em; text-shadow: 0 2px 26px rgba(38, 8, 70, .35); }
.w { display: inline-block; animation: word 1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--t0) + .15s + var(--i, 0) * .1s); }
.w:nth-of-type(2) { --i: 1; } .w:nth-of-type(3) { --i: 2; } .w:nth-of-type(4) { --i: 3; } .w:nth-of-type(5) { --i: 4; } .w:nth-of-type(6) { --i: 5; } .w:nth-of-type(7) { --i: 6; } .w:nth-of-type(8) { --i: 7; }
@keyframes word { from { color: rgba(214, 180, 250, .32); transform: translate3d(0, .2em, 0); } to { color: #fff; transform: none; } }
.cta {
  margin-top: clamp(18px, 3.2vh, 34px); width: clamp(300px, 27vw, 430px); max-width: 88vw; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 24px;
  background: var(--ink); border-radius: 14px; box-shadow: 0 14px 36px rgba(20, 4, 40, .4), inset 0 0 0 1px rgba(255, 255, 255, .07);
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) calc(var(--t0) + .55s) both;
}
.cta:focus-within { box-shadow: 0 14px 36px rgba(20, 4, 40, .4), 0 0 0 2px rgba(255, 255, 255, .85); }
#secret {
  flex: 1; min-width: 0; height: 46px; border: 0; outline: none; background: transparent; color: #fff; text-align: left; text-overflow: ellipsis;
  font: 500 15px/1 "Cascadia Mono", Consolas, ui-monospace, monospace; letter-spacing: .02em; caret-color: #fff;
}
#secret::placeholder { color: #fff; font-family: var(--cjk); font-weight: 500; font-size: 16px; letter-spacing: 0; }
.go { flex: none; width: 46px; height: 46px; border: 0; border-radius: 10px; background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .2s; }
.go svg { width: 22px; height: 22px; }
.go:hover { background: #f4ecff; transform: translateY(-1px); }
.status { text-shadow: 0 1px 14px rgba(30, 6, 56, .6); margin: 16px 0 0; min-height: 1.5em; font-size: 14px; letter-spacing: .04em; color: rgba(255, 255, 255, .82); animation: rise .9s cubic-bezier(.2, .8, .2, 1) calc(var(--t0) + .65s) both; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .bgvideo { display: none; }
  .f, .lc, .beam, .lbar b, .w, .cta, .status, .pod-wrap, .ground, .space, .topbar { animation: none; }
  .loader { display: none; }
  .r, .ground, .pod-wrap { transition: none; }
}

/* ---------- toast / banner ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 14px); opacity: 0; pointer-events: none; z-index: 20;
  padding: 11px 22px; border-radius: 12px; font: 500 15px/1.4 var(--cjk); color: #fff; background: var(--ink); box-shadow: 0 8px 24px rgba(25, 6, 48, .45);
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #8a1f55; }
.banner { position: fixed; top: 0; left: 0; right: 0; z-index: 30; margin: 0; padding: 10px 14px; background: #8a1f55; color: #fff; text-align: center; }

/* ---------- narrow / portrait: pod centred on top, headline under it ---------- */
@media (max-width: 900px), (max-aspect-ratio: 1 / 1) {
  :root { --pod: clamp(220px, min(64vw, 31vh), 400px); --px: 50%; --py: 27%; }
  .topbar { height: 58px; }
  .pill { padding: 10px 14px; }
  .link { padding: 10px 6px; }
  .brand { font-size: 17px; } .brand span { font-size: 16px; }
  .hero { top: calc(var(--py) + var(--pod) * .5 - 1.4vh); }
  .headline { font-size: clamp(22px, 7.3vw, 52px); }
  .ground-l { width: 104vw; left: -6vw; }
  .ground-r { width: 60vw; }
  .a1 { left: 66%; top: 2%; width: 24vw; }
  .a2 { left: 88%; top: 15%; width: 18vw; }
  .a3 { left: 6%; top: 20%; width: 13vw; }
  .a5 { left: 80%; top: 33%; width: 15vw; }
  .a6, .a8, .a14, .a15 { display: none; }
  .a9 { left: 8%; top: 40%; width: 6vw; }
  .a11 { left: 70%; top: 70%; width: 22vw; }
  .a12 { left: 90%; top: 80%; width: 6vw; }
  .a13 { left: 50%; top: 86%; width: 7vw; }
  .n1 { left: 34%; top: 80%; width: 24vw; }
  .n2 { left: 4%; top: 86%; width: 15vw; }
  .a10 { left: 3%; top: 50%; width: 3vw; }
}
