/* The simple front page of epicquest.bio (index.html, front.js, pore.js): a dark field where a nanopore reads
 * molecules (WebGL, behind everything), the headline drawn as a lattice by pore.js, one glass card to sign up on.
 * Colours are fluorescence channels on black: cyan, violet, magenta, amber. */
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-VF.woff2") format("woff2"); font-weight: 100 900;
  font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono.woff2") format("woff2"); font-weight: 100 800;
  font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader.woff2") format("woff2"); font-weight: 380 650;
  font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader-Italic.woff2") format("woff2"); font-style: italic;
  font-weight: 380 650; font-display: swap; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --void: #04060c;
  --bone: #eef1f8;
  --soft: rgba(226, 232, 246, .86);
  --dim: rgba(205, 214, 236, .62);
  --faint: rgba(190, 205, 255, .13);
  --cy: #5ef0ff;
  --vi: #a98bff;
  --mg: #ff4fb0;
  --am: #ffb84d;
  --gold: #ffd89a;
  --gut: clamp(16px, 4.4vw, 60px);
  --sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --spectrum: #5ef0ff, #a98bff, #ff4fb0, #ffb84d, #5ef0ff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--void); }
body { margin: 0; min-height: 100vh; background: var(--void); color: var(--bone); font: 400 17px/1.55 var(--sans);
  overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; }
::selection { background: rgba(94, 240, 255, .3); color: #fff; }

#scene { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; display: block;
  pointer-events: none; }
.grain { position: fixed; inset: -60px; z-index: 1; pointer-events: none; opacity: .055; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.no-gl body, .no-gl { background:
  radial-gradient(60% 50% at 30% 78%, rgba(255, 150, 70, .22), transparent 70%),
  radial-gradient(50% 45% at 100% 10%, rgba(255, 79, 176, .12), transparent 70%),
  radial-gradient(60% 50% at 0% 0%, rgba(94, 160, 255, .14), transparent 70%), var(--void); }

.top, .page, .foot { position: relative; z-index: 2; }

/* ---------------------------------------------------------------- top bar */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) var(--gut) 0; }
.mark { display: inline-flex; align-items: center; gap: 10px; font: 800 14px/1 var(--sans); font-stretch: 80%;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.mark sup { font-size: .55em; letter-spacing: 0; margin-left: -.12em; }
.glyph { width: 18px; height: 18px; border-radius: 50%; position: relative; flex: none;
  background: radial-gradient(circle, #fff3dc 0 18%, rgba(255, 184, 77, .9) 26%, transparent 44%);
  box-shadow: 0 0 0 1.5px rgba(94, 240, 255, .75), 0 0 14px rgba(255, 184, 77, .55); }
.signin { font: 500 12.5px/1 var(--mono); letter-spacing: .04em; color: var(--soft); text-decoration: none;
  padding: 9px 14px; border-radius: 99px; border: 1px solid var(--faint); background: rgba(8, 12, 24, .45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: border-color .2s, color .2s; }
.signin:hover { border-color: rgba(94, 240, 255, .5); color: #fff; }

/* ---------------------------------------------------------------- layout: one column on phones, two on desktop */
.page { max-width: 1360px; margin: 0 auto; padding: 0 var(--gut) 30px; display: grid;
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "card" "story" "reward"; gap: 26px; }
.hero { grid-area: hero; }
.card-wrap { grid-area: card; scroll-margin-top: 16px; }
.story { grid-area: story; }
.reward { grid-area: reward; }

.hero { display: flex; flex-direction: column; min-height: calc(100vh - 64px); min-height: calc(100svh - 64px);
  padding-top: clamp(26px, 6vh, 64px); text-shadow: 0 2px 26px rgba(0, 0, 0, .55); }
.stage { flex: 1 1 auto; min-height: 30vh; min-height: 30svh; }
@media (min-width: 1000px) {
  .page { grid-template-columns: minmax(0, 1.22fr) minmax(400px, .78fr); column-gap: clamp(40px, 6vw, 110px);
    grid-template-areas: "hero card" "story card" "reward card"; align-items: start; }
  .hero { min-height: calc(100vh - 70px); padding-top: clamp(34px, 7vh, 80px); }
  .stage { min-height: 26vh; }
  .card-wrap { position: sticky; top: 24px; padding-top: clamp(34px, 7vh, 80px); }
}

/* ---------------------------------------------------------------- the headline and its company */
.kicker { margin: 0 0 22px; font: 500 11.5px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim); max-width: 44em; }
.live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--cy);
  margin-right: 10px; vertical-align: 1px; box-shadow: 0 0 0 0 rgba(94, 240, 255, .6); animation: ping 2.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(94, 240, 255, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(94, 240, 255, 0); } }
.head { margin: 0; font-family: var(--sans); font-weight: 900; font-stretch: 75%; text-transform: uppercase;
  line-height: .86; letter-spacing: 0; }
.head .l { display: block; white-space: nowrap; font-size: clamp(56px, 16vw, 170px); }
.gl .head .l { color: transparent; text-shadow: none; }
.no-gl .head .l, html:not(.js) .head .l { color: var(--bone); }
.no-gl .head .l + .l, html:not(.js) .head .l + .l { background: linear-gradient(90deg, var(--spectrum));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: clamp(16px, 2.6vh, 28px) 0 0; font: italic 400 clamp(25px, 3.1vw, 40px)/1.15 var(--serif);
  color: var(--gold); text-shadow: 0 0 30px rgba(255, 184, 77, .28), 0 2px 20px rgba(0, 0, 0, .6); }
.lede em { font-style: italic; }

.caption { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; max-width: 34em; align-self: flex-start;
  font: 400 11.5px/1.55 var(--mono); color: var(--dim); padding: 10px 14px; border-radius: 12px; text-shadow: none;
  background: rgba(4, 6, 12, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.no-gl .caption { display: none; }
.no-gl .stage { flex: 0 0 auto; min-height: 8vh; }
.no-gl .hero { min-height: 0; }
.caption b { color: var(--soft); font-weight: 600; }
.pip { flex: none; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--am);
  box-shadow: 0 0 10px var(--am); animation: blink 2.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

.cta { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding: 17px 22px;
  border-radius: 16px; text-decoration: none; color: #05060c; font: 900 21px/1 var(--sans); font-stretch: 75%;
  text-transform: uppercase; letter-spacing: .02em; text-shadow: none;
  background: linear-gradient(110deg, #dffbff 0%, #ffffff 22%, #f1e6ff 40%, #ffe3f3 56%, #fff1d9 74%, #e1fbff 100%);
  background-size: 220% 100%; animation: foil 7s ease-in-out infinite alternate;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 14px 44px -14px rgba(94, 240, 255, .6),
    0 18px 60px -24px rgba(255, 79, 176, .55); }
.cta .arr { font-family: var(--mono); font-weight: 700; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
@media (min-width: 1000px) { .cta { display: none; } }

/* ---------------------------------------------------------------- the glass card */
.card { position: relative; isolation: isolate; border-radius: 24px; padding: 22px clamp(18px, 2.4vw, 30px) 24px;
  background: linear-gradient(165deg, rgba(22, 28, 48, .74), rgba(7, 9, 18, .84));
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 60px 120px -50px rgba(0, 0, 0, .95);
  animation: arrive 1s cubic-bezier(.2, .8, .2, 1) both .25s; }
.card::before, .card::after { content: ""; position: absolute; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--spin), var(--spectrum)); animation: spin 9s linear infinite; }
.card::before { inset: 0; padding: 1.2px; opacity: .8;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
.card::after { inset: 8%; z-index: -1; filter: blur(46px); opacity: .22; }
@keyframes spin { to { --spin: 360deg; } }
@keyframes arrive { from { opacity: 0; transform: translateY(30px) scale(.98); } }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px;
  font: 500 10.5px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--dim);
  padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.card-top .open { display: inline-flex; align-items: center; gap: 8px; color: #9dffc0; }
.card-top .open b { width: 6px; height: 6px; border-radius: 50%; background: #6dff9e; box-shadow: 0 0 10px #6dff9e;
  animation: blink 1.6s ease-in-out infinite; }
.card h2 { margin: 0; font: 900 clamp(38px, 3.6vw, 48px)/.9 var(--sans); font-stretch: 75%; text-transform: uppercase;
  letter-spacing: .005em; }
.how { list-style: none; margin: 14px 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px;
  font: 400 12.5px/1.3 var(--mono); color: var(--soft); }
.how li { display: inline-flex; align-items: center; gap: 7px; }
.how b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; flex: none;
  font: 700 10.5px/1 var(--mono); color: var(--cy); box-shadow: inset 0 0 0 1px rgba(94, 240, 255, .55);
  background: rgba(94, 240, 255, .08); }

.field { display: block; margin: 0 0 15px; padding: 0; border: 0; min-width: 0; }
.field > span, .field legend > span { display: block; margin-bottom: 7px; font: 500 10.5px/1.3 var(--mono);
  letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.field legend { display: flex; align-items: baseline; gap: 8px; padding: 0; margin-bottom: 7px; }
.field legend > span { margin: 0; }
.field i { font: italic 400 12px/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--dim); }
.field input { width: 100%; font: 500 16.5px/1.25 var(--sans); color: var(--bone); padding: 14px 15px;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .11); border-radius: 12px;
  outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s, background .2s; }
.field input::placeholder { color: rgba(205, 214, 236, .38); }
.field input:hover { border-color: rgba(255, 255, 255, .2); }
.field input:focus { border-color: rgba(94, 240, 255, .75); background: rgba(94, 240, 255, .05);
  box-shadow: 0 0 0 4px rgba(94, 240, 255, .12), 0 0 30px -6px rgba(94, 240, 255, .45); }
.field input.word { font: 700 16px/1.25 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.field input.word::placeholder { font-weight: 400; letter-spacing: 0; text-transform: none; }
.door.has input { color: var(--gold); border-style: dashed; border-color: rgba(255, 184, 77, .6);
  background: rgba(255, 184, 77, .06); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.chip { font: 500 13px/1 var(--mono); color: var(--soft); background: rgba(255, 255, 255, .03); cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px; padding: 9px 13px; min-height: 38px;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }
.chip:hover { border-color: rgba(94, 240, 255, .5); color: #fff; }
.chip[aria-checked="true"] { background: var(--cy); border-color: var(--cy); color: #031016; font-weight: 700;
  box-shadow: 0 0 22px -4px rgba(94, 240, 255, .8); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.go { position: relative; overflow: hidden; width: 100%; margin-top: 8px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 19px 22px; min-height: 62px; border: 0; border-radius: 15px;
  cursor: pointer; color: #05060c; font: 900 clamp(21px, 2vw, 24px)/1 var(--sans); font-stretch: 75%;
  text-transform: uppercase; letter-spacing: .02em;
  background: linear-gradient(110deg, #dffbff 0%, #ffffff 22%, #f1e6ff 40%, #ffe3f3 56%, #fff1d9 74%, #e1fbff 100%);
  background-size: 220% 100%; animation: foil 7s ease-in-out infinite alternate;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 14px 44px -14px rgba(94, 240, 255, .6),
    0 18px 60px -24px rgba(255, 79, 176, .55);
  transition: transform .18s, box-shadow .25s; }
.go::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%); transition: transform .8s;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .95) 50%, transparent 70%); }
.go:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px #fff, 0 20px 56px -14px rgba(94, 240, 255, .75),
  0 24px 70px -22px rgba(255, 79, 176, .7); }
.go:hover::after, .go:focus-visible::after { transform: translateX(120%); }
.go:active { transform: translateY(0); }
.go .t, .go .arr { position: relative; z-index: 1; }
.go .arr { font-family: var(--mono); font-weight: 700; transition: transform .25s; }
.go:hover .arr { transform: translateX(5px); }
.go[disabled] { cursor: progress; opacity: .75; }
@keyframes foil { to { background-position: 100% 0; } }
.err { margin: 10px 0 0; font: 600 13.5px/1.4 var(--mono); color: #ff8fb8; }
.err:empty { margin: 0; }
.fine { margin: 14px 0 0; font: 400 12px/1.6 var(--mono); color: var(--dim); }
.fine b { color: var(--soft); font-weight: 600; }
.fine a { color: var(--cy); text-decoration-color: rgba(94, 240, 255, .4); text-underline-offset: 3px; }

.state[hidden] { display: none; }
.state { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.badge { position: relative; display: inline-block; margin: 0 0 16px; padding: 8px 14px; border-radius: 99px;
  font: 700 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
  background: rgba(255, 184, 77, .1); box-shadow: inset 0 0 0 1px rgba(255, 184, 77, .55), 0 0 30px -6px rgba(255, 184, 77, .6);
  animation: stamp .6s cubic-bezier(.3, 1.5, .5, 1) both .1s; }
.badge.in { color: #9dffc0; background: rgba(109, 255, 158, .08);
  box-shadow: inset 0 0 0 1px rgba(109, 255, 158, .5), 0 0 30px -6px rgba(109, 255, 158, .55); }
@keyframes stamp { from { opacity: 0; transform: scale(1.6); letter-spacing: .5em; } }
.big { margin: 12px 0 0; font: 400 18px/1.5 var(--sans); color: var(--soft); }
.big b { color: #fff; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ghost { font: 500 13px/1 var(--mono); color: var(--soft); background: rgba(255, 255, 255, .04); cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; padding: 12px 15px; min-height: 44px;
  transition: border-color .2s, color .2s; }
.ghost:hover { border-color: rgba(94, 240, 255, .55); color: #fff; }
.ghost[disabled] { opacity: .45; cursor: default; }
.note { margin: 12px 0 0; font: 400 12.5px/1.5 var(--mono); color: var(--dim); }
.note:empty { display: none; }

/* ---------------------------------------------------------------- the story and the reward */
.story { padding-top: 10px; }
.story p { margin: 0 0 1.05em; max-width: 34em; font: 400 clamp(19px, 1.55vw, 22px)/1.6 var(--serif);
  color: var(--soft); text-shadow: 0 1px 18px rgba(0, 0, 0, .75); }
.story b { font-weight: 600; color: #fff; }
.reward { position: relative; margin-top: 6px; padding: 30px 0 10px; max-width: 40em; }
.reward::before { content: ""; position: absolute; top: 0; left: 0; width: min(420px, 80%); height: 1px;
  background: linear-gradient(90deg, var(--am), rgba(255, 184, 77, 0)); }
.reward .k { margin: 0; font: 900 clamp(64px, 8vw, 104px)/.82 var(--sans); font-stretch: 75%; text-transform: uppercase;
  letter-spacing: .01em; background: linear-gradient(100deg, #b36b16 0%, #ffd89a 22%, #fff6e2 34%, #ffb84d 48%,
  #a8600f 64%, #ffe3ae 82%, #ffb84d 100%); background-size: 240% 100%; -webkit-background-clip: text;
  background-clip: text; color: transparent; animation: foil 9s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 30px rgba(255, 170, 60, .28)); }
.reward .v { margin: 14px 0 0; font: italic 400 clamp(20px, 1.8vw, 25px)/1.45 var(--serif); color: var(--bone);
  text-shadow: 0 1px 18px rgba(0, 0, 0, .75); }
.reward .jump { display: inline-flex; margin-top: 22px; font: 600 12px/1 var(--mono); letter-spacing: .14em;
  text-transform: uppercase; color: var(--cy); text-decoration: none; padding: 12px 16px; border-radius: 99px;
  border: 1px solid rgba(94, 240, 255, .4); background: rgba(94, 240, 255, .06); }
@media (min-width: 1000px) { .reward .jump { display: none; } }

/* ---------------------------------------------------------------- footer */
.foot { max-width: 1360px; margin: 0 auto; padding: 30px var(--gut) max(34px, env(safe-area-inset-bottom));
  font: 400 12px/1.65 var(--mono); color: var(--dim); }
.foot::before { content: ""; display: block; height: 1px; margin-bottom: 24px;
  background: linear-gradient(90deg, rgba(94, 240, 255, .35), rgba(255, 79, 176, .2), transparent); }
.foot p { margin: 0 0 10px; max-width: 62em; }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--soft); text-decoration-color: var(--faint); text-underline-offset: 4px; }
.foot a:hover { color: #fff; }

:focus-visible { outline: 2px solid var(--cy); outline-offset: 3px; }
.field input:focus-visible { outline: none; }

@media (max-width: 420px) {
  .card { border-radius: 20px; }
  .how { gap: 7px 12px; }
  .chip { padding: 8px 11px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------- the cursor is a molecule (pore.js draws it) */
html.molcursor body, html.molcursor .hero, html.molcursor .story, html.molcursor .reward, html.molcursor .foot p { cursor: none; }
html.molcursor .card, html.molcursor .card *, html.molcursor .top, html.molcursor .top * { cursor: auto; }
html.molcursor .caption { cursor: none; }
html.molcursor a, html.molcursor button, html.molcursor label, html.molcursor .chip { cursor: pointer; }
html.molcursor input, html.molcursor textarea { cursor: text; }

/* the scroll is a journey through the pore: give it room on wide screens, and keep the words readable over it */
.story, .reward { position: relative; }
.story::before, .reward::before { content: ""; position: absolute; inset: -40px -60px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(4, 5, 14, .72), rgba(4, 5, 14, .45) 60%, transparent); }
.reward::before { top: -10px; }
@media (min-width: 1000px) {
  .story { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; }
  .reward { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
}
.caption .how-hint { display: block; margin-top: 6px; color: var(--soft); }
@media (max-width: 999px) {
  .story::before, .reward::before { inset: -30px -16px; background: linear-gradient(180deg, transparent,
    rgba(4, 5, 14, .66) 60px, rgba(4, 5, 14, .66) calc(100% - 60px), transparent); }
}
