/* Neon: near-black, with neon cyan and neon purple, each carrying a soft glow. Glows are
   for the name, edges and buttons; text that has to be read stays plain, because glowing
   small type blurs. */
:root {
  --bg:          #07060d;
  --cyan:        #2ef6ff;
  --purple:      #bc13fe;  /* the 'psy' in the name, so the button is the same purple */
  --purple-deep: #8a0cc4;
  --muted:       #8f8aa8;
  --glow-cyan:   rgba(46, 246, 255, .55);
  --glow-purple: rgba(188, 19, 254, .55);
}

* { box-sizing: border-box; }

/* The page never moves. A finger dragged anywhere - across the buttons too - is the
   grid's to play with, so the browser is told not to scroll, pan or bounce on it; a
   pinch still zooms. Nothing here is taller than the window, so nothing is lost by it. */
html, body {
  height: 100%; overflow: hidden; overscroll-behavior: none;
  touch-action: pinch-zoom;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
html { background: var(--bg); }
body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(138, 12, 196, .27), transparent 60%),
    radial-gradient(900px 520px at 100% 30%, rgba(46, 246, 255, .11), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(188, 19, 254, .14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: #d6d3ea;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* The grid (grid.js) between the background and the page. It takes no pointer events:
   grid.js listens on the window, so the page keeps every click. */
.grid { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }

/* The whole page, for now: the mark, the name, the buttons and the version, lit like a
   sign and centred in the window. */
.hero {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 16px; text-align: center;
}
.mark {
  display: block; width: 128px; height: 128px; margin-bottom: 22px;
  filter: drop-shadow(0 0 10px var(--glow-cyan)) drop-shadow(0 0 28px rgba(188, 19, 254, .35));
  animation: breathe 6s ease-in-out infinite;
}
/* Lettered like a mark: a neon colour with a heavy black outline round it, and no glow.
   The stroke is painted under the fill, so it thickens outward and never eats into the
   letters. */
h1 {
  margin: 0 0 36px; padding: 4px 24px 8px;
  font-size: 52px; font-weight: 700; letter-spacing: .04em; line-height: 1.1;
  -webkit-text-stroke: .14em #000;
  paint-order: stroke fill;
}
h1 .psy { color: var(--purple); }
h1 .name { color: #00ffff; }

/* [ platform v ] [ Download ]: the box, and the button that fetches what the box says.
   One height for both so they read as one control. */
.download {
  display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap;
  --h: 44px;
}
.select { position: relative; display: inline-block; }
.select::after {
  /* The box's own arrow, drawn here because appearance: none takes the platform's away. */
  content: ""; position: absolute; right: 14px; top: 50%; margin-top: -3px;
  border: 6px solid transparent; border-top-color: var(--cyan); border-bottom: 0;
  filter: drop-shadow(0 0 4px var(--glow-cyan)); pointer-events: none;
}
.select select {
  appearance: none; -webkit-appearance: none;
  height: var(--h); min-width: 170px; padding: 0 42px 0 16px; border-radius: 6px;
  background: rgba(17, 12, 30, .8); color: var(--cyan);
  border: 1px solid rgba(46, 246, 255, .45);
  box-shadow: 0 0 10px rgba(46, 246, 255, .12);
  font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: box-shadow .2s;
}
.select select:hover { box-shadow: 0 0 16px rgba(46, 246, 255, .35), 0 0 40px rgba(46, 246, 255, .12); }
.select select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
/* The open list is drawn by the platform; this is as much of it as can be coloured. */
.select option { background: #110c1e; color: var(--cyan); }

.button {
  display: inline-block; height: var(--h); padding: 0 24px; border-radius: 6px;
  background: linear-gradient(135deg, var(--purple-deep), var(--purple));
  color: #fff; font-family: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid rgba(228, 150, 255, .55);
  box-shadow: 0 0 14px rgba(188, 19, 254, .5), 0 0 36px rgba(138, 12, 196, .25), inset 0 0 10px rgba(255, 255, 255, .08);
  transition: box-shadow .2s, transform .2s;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(188, 19, 254, .75), 0 0 52px rgba(138, 12, 196, .4), inset 0 0 12px rgba(255, 255, 255, .12);
}
.button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* In place of the download control on a phone or tablet: the same height and edge as the
   box, lit the same cyan, so the row is a sign rather than a hole. */
.soon {
  margin: 0; height: 44px; padding: 0 22px; border-radius: 6px;
  display: inline-flex; align-items: center;
  font-size: 16px; font-weight: 600; letter-spacing: .3px; color: var(--cyan);
  text-shadow: 0 0 10px rgba(46, 246, 255, .45);
  background: rgba(17, 12, 30, .8);
  border: 1px solid rgba(46, 246, 255, .45);
  box-shadow: 0 0 12px rgba(46, 246, 255, .18), 0 0 36px rgba(188, 19, 254, .12);
}
/* Sent to every Mac in case it is an iPad, and shown only if it is one. */
.only-touch { display: none; }

/* The page starts as the background and one round button in the corner, on every
   device; the button brings the page up and takes it away again. Only with scripts
   running - ui.js marks the document - so that without them the page is simply shown. */
.opener { display: none; }
.js .opener {
  display: grid; place-items: center;
  position: fixed; right: 24px; bottom: 24px; z-index: 3;
  width: 56px; height: 56px; padding: 0; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-deep), var(--purple));
  color: #fff; cursor: pointer;
  border: 1px solid rgba(228, 150, 255, .55);
  box-shadow: 0 0 14px rgba(188, 19, 254, .5), 0 0 36px rgba(138, 12, 196, .25), inset 0 0 10px rgba(255, 255, 255, .08);
  transition: box-shadow .2s, transform .2s;
}
.js .opener:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(188, 19, 254, .75), 0 0 52px rgba(138, 12, 196, .4), inset 0 0 12px rgba(255, 255, 255, .12);
}
.opener:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.opener svg {
  width: 26px; height: 26px;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.opener .close, .opener[aria-expanded="true"] .get { display: none; }
.opener[aria-expanded="true"] .close { display: block; }

.js .hero.closable { transition: opacity .25s ease, visibility .25s; }
.js .hero.closable:not(.open) { opacity: 0; visibility: hidden; }

/* An iPad that says it is a Mac: the message in the download's place, as on any other
   tablet. */
@media (hover: none) and (pointer: coarse) {
  .mac .only-touch { display: inline-flex; }
  .mac .download { display: none; }
}

.version {
  margin: 22px 0 0; padding: 2px 12px; border-radius: 999px;
  font-size: 14px; color: #fff;
  /* A backing of its own, because the grid lights up behind it and small grey type
     has nothing to spare against a lit cell. */
  background: rgba(7, 6, 13, .85);
}

/* The copyright, on every view, open or shut: a pill like the version's in light grey,
   centred on the bottom of the window and lifted off it by half its own height. */
.footer {
  position: fixed; left: 50%; bottom: 0; z-index: 2;
  transform: translate(-50%, -50%);
  padding: 2px 12px; border-radius: 999px; white-space: nowrap;
  font-size: 14px; color: #c8c8c8;
  background: rgba(7, 6, 13, .85);
}

@keyframes breathe {
  0%, 100% { filter: drop-shadow(0 0 10px var(--glow-cyan)) drop-shadow(0 0 28px rgba(188, 19, 254, .35)); }
  50%      { filter: drop-shadow(0 0 16px rgba(46, 246, 255, .75)) drop-shadow(0 0 40px rgba(188, 19, 254, .5)); }
}

@media (prefers-reduced-motion: reduce) {
  .mark { animation: none; }
  .button, .select select, .js .opener, .js .hero.closable { transition: none; }
  .button:hover, .js .opener:hover { transform: none; }
}

@media (max-width: 560px) {
  h1 { font-size: 40px; }
  .mark { width: 96px; height: 96px; }
}

/* A phone on its side: the page cannot scroll, so it has to fit. */
@media (max-height: 520px) {
  .hero { padding: 12px 16px; }
  .mark { width: 64px; height: 64px; margin-bottom: 10px; }
  h1 { font-size: 34px; margin-bottom: 18px; }
  .version { margin-top: 12px; }
}
