@font-face {
  font-family: "Roboto Flex";
  src: url("/assets/fonts/roboto-flex-latin-wght-opsz.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* the Lurk dark scheme from the design system */
:root {
  --bg: #0d1516;          /* surface */
  --fg: #dce4e5;          /* onSurface: the L and the wordmark */
  --muted: #b7cace;       /* onSurfaceVariant */
  --primary: #36d9f0;     /* the face */
  --container: #0e4e57;   /* primaryContainer: the eye */
  --on-container: #9deffe;/* onPrimaryContainer: the pupil */
  --gutter: clamp(1rem, 3vw, 2.25rem);
  --font: "Roboto Flex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  --rise: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* nothing on the page is meant to be selected or long-pressed */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100svh;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
}

img, svg { -webkit-user-drag: none; }

/* readable by screen readers, invisible on screen */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/*
 * The emote field: 7TV emotes drifting across the page, placed and moved by
 * emotes.js. Each one is an <img> moved with a transform only, so the browser
 * composites them without re-laying anything out.
 */
.field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.emote {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  max-width: none;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 1.6s ease;
}

/* a pool of shade behind the wordmark so the name always reads, and a soft
   edge so emotes drift in out of the dark instead of popping in at the edge */
.veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 34% 30% at 50% 50%, rgb(13 21 22 / 0.88) 0%, rgb(13 21 22 / 0.6) 50%, rgb(13 21 22 / 0) 100%),
    radial-gradient(ellipse 130% 110% at 50% 50%, rgb(13 21 22 / 0) 60%, rgb(13 21 22 / 0.6) 100%);
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  text-align: center;
}

/*
 * The wordmark, as in the Figma lockup: Roboto Flex Bold. The optical size is
 * pinned to its display end so the letters keep the same shape at every size;
 * the L below is drawn from the same font's outline at those settings, so it
 * sits on the baseline exactly like a typed L would.
 */
.name {
  margin: 0;
  font-size: clamp(4.5rem, 24vw, 13rem);
  font-weight: 700;
  font-variation-settings: "opsz" 144;
  line-height: 1;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.word { display: inline-flex; align-items: baseline; }

.rest { display: inline-flex; }

/* the L: 1000 of 2048 font units wide, drawn from the cap height (1456) plus
   headroom down to the baseline, so its bottom edge is the baseline */
.el {
  display: block;
  flex-shrink: 0;
  width: 0.48828em;
  height: 0.78125em;
  margin-right: -0.015em;
  overflow: visible;
  opacity: 0;
  animation: rise 1.3s 0.15s var(--rise) forwards;
}

.wall { fill: var(--fg); }

/*
 * The face hides behind the stem of the L and pokes out into the space
 * above its foot, as on the splash screen. It is clipped to that space, so
 * when it slides left it disappears behind the stem rather than out the
 * other side. face.js moves it with springs; without script (or with reduced
 * motion) it simply stays peeking out, as on the static splash screen.
 */
.skin { fill: var(--primary); }
.white { fill: var(--container); }
.pupil { fill: var(--on-container); }

/* the rest of the word rises in letter by letter (site.js splits it) */
.name .l {
  display: inline-block;
  opacity: 0;
  animation: rise 1.3s calc(0.15s + var(--i) * 70ms) var(--rise) forwards;
}

.tag {
  margin: clamp(0.75rem, 1.8vw, 1.25rem) 0 0;
  color: var(--fg);
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 500;
  font-variation-settings: "opsz" 24;
  letter-spacing: 0.005em;
  opacity: 0;
  animation: rise 1.4s 0.55s var(--rise) forwards;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  margin: clamp(1.25rem, 2.6vw, 1.75rem) 0 0;
  color: var(--muted);
  font-size: clamp(0.75rem, 1.1vw, 0.875rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  /* letter-spacing adds space after the last letter too; balance it on the left */
  padding-left: 0.3em;
  opacity: 0;
  animation: rise 1.4s 0.8s var(--rise) forwards;
}

/* the ring is its own circle that scales and fades: an animated box-shadow
   gets clipped by WebKit when the page is zoomed */
.pulse {
  position: relative;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgb(54 217 240 / 0.55);
  animation: pulse 2s ease-out infinite;
}

/*
 * The GitHub link sits under the tagline as a round button. It opens into a
 * pill showing the repo name and its star count when it gets the .open class
 * (site.js: on hover with a mouse, on the first tap on a touch screen) or
 * keyboard focus: the second grid column grows from 0fr to 1fr, then the text
 * comes in. Closing reverses it: the text goes first, then the pill folds.
 */
.github {
  --ease: cubic-bezier(.2, .8, .2, 1);
  display: inline-grid;
  grid-template-columns: 44px 0fr;
  align-items: center;
  height: 44px;
  margin-top: clamp(1.5rem, 3.2vw, 2.25rem);
  border-radius: 22px;
  color: var(--fg);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgb(220 228 229 / 0.18);
  background: rgb(13 21 22 / 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  animation: fade-to 1.4s 1.3s ease forwards;
  /* closing: wait for the text to leave, then fold up */
  transition:
    grid-template-columns 0.85s 0.3s var(--ease),
    box-shadow 0.6s ease,
    background-color 0.6s ease;
}

.gh-icon { justify-self: center; width: 20px; height: 20px; }

.gh-more { min-width: 0; overflow: hidden; }

.gh-inner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-right: 1.1rem;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/*
 * The label comes in a piece at a time: each letter of the name, then the
 * star count (site.js splits them and numbers them with --i, and sets --n
 * to the total). Opening, they rise in left to right once the pill has
 * room; closing, they drop out right to left before it folds.
 */
.gc,
.gh-stars {
  opacity: 0;
  transform: translateY(0.45em);
  filter: blur(3px);
  transition:
    opacity 0.22s ease,
    transform 0.3s ease,
    filter 0.22s ease;
  transition-delay: calc((var(--n, 1) - var(--i, 0)) * 28ms);
}

.gc { display: inline-block; }

.github.open .gc,
.github.open .gh-stars,
.github:focus-visible .gc,
.github:focus-visible .gh-stars {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition:
    opacity 0.4s ease,
    transform 0.6s var(--ease),
    filter 0.4s ease;
  transition-delay: calc(0.28s + var(--i, 0) * 60ms);
}

.gh-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 0.7rem;
  border-left: 1px solid rgb(220 228 229 / 0.2);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.gh-stars[hidden] { display: none; }

.gh-stars svg { color: #ffd76a; }

.github.open,
.github:focus-visible {
  grid-template-columns: 44px 1fr;
  box-shadow: inset 0 0 0 1px rgb(54 217 240 / 0.55);
  background: rgb(14 78 87 / 0.55);
  /* opening: grow straight away */
  transition:
    grid-template-columns 0.95s 0s var(--ease),
    box-shadow 0.6s ease,
    background-color 0.6s ease;
}

.github:focus-visible {
  outline: 1px solid var(--primary);
  outline-offset: 3px;
}

/* 404 */
.lost .name { font-size: clamp(3.5rem, 14vw, 8rem); }
.lost .tag { opacity: 1; animation: none; }

.home {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid rgb(220 228 229 / 0.35);
  transition: border-color 0.25s ease;
}

.home:hover, .home:focus-visible { border-color: var(--primary); outline: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(0.35em); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes fade-to { to { opacity: 0.9; } }

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  80%, 100% { transform: scale(4.3); opacity: 0; }
}

@media (max-width: 520px) {
  .name { font-size: 28vw; }
  .soon { letter-spacing: 0.24em; padding-left: 0.24em; }
  .veil {
    background:
      radial-gradient(ellipse 62% 26% at 50% 50%, rgb(13 21 22 / 0.88) 0%, rgb(13 21 22 / 0.6) 50%, rgb(13 21 22 / 0) 100%),
      radial-gradient(ellipse 140% 110% at 50% 50%, rgb(13 21 22 / 0) 60%, rgb(13 21 22 / 0.6) 100%);
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .name { font-size: clamp(3.5rem, 24vh, 8rem); }
  .tag { margin-top: 0.5rem; }
  .soon { margin-top: 0.9rem; }
  .github { margin-top: 1rem; }
}

/* with reduced motion everything holds still, the face peeking out as on the
   static splash screen */
@media (prefers-reduced-motion: reduce) {
  .el, .name .l, .tag, .soon, .github { animation: none; opacity: 1; }
  .github { opacity: 0.9; }
  .pulse::after { animation: none; opacity: 0; }
  .github, .gc, .gh-stars { transition: none !important; }
  .emote { transition: none; }
}
