/* FN Keys: night prairie, northern lights, backlit keys. Dark only. */
:root {
  --night: #04070d;
  --deep: #0a1224;
  --glass: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .15);
  --text: #eaf0ec;
  --muted: #9fb0ab;
  --aurora: #4dffb4;
  --violet: #9a78ff;
  --ember: #ff6a45;
  --on-aurora: #03110b;
  --font-display: 'Unbounded', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-syl: 'Noto Sans Canadian Aboriginal', 'Euphemia UCAS', 'Gadugi', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  background:
    radial-gradient(1100px 600px at 85% -8%, rgba(77, 255, 180, .10), transparent 62%),
    radial-gradient(900px 520px at -5% 38%, rgba(154, 120, 255, .10), transparent 62%),
    var(--night);
}
img { max-width: 100%; }
a { color: var(--aurora); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible, .tile:focus-visible, .kb-tab:focus-visible {
  outline: 3px solid var(--aurora);
  outline-offset: 4px;
}
.wrap { width: 100%; max-width: 70rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.skip { position: absolute; left: -999px; top: 0; background: var(--aurora); color: var(--on-aurora); padding: .6rem 1rem; z-index: 200; }
.skip:focus { left: 0; }

/* boot screen, home page, first visit per session */
#boot { display: none; }
html.boot #boot {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--night);
  text-align: center;
  animation: bootout .6s ease 2.4s forwards;
  transition: opacity .6s ease, visibility .6s ease;
}
#boot.done { opacity: 0; visibility: hidden; }
#boot img { display: block; margin: 0 auto 1.25rem; height: 2.4rem; width: auto; }
#boot p { margin: 0; font: 300 .8rem var(--font-display); letter-spacing: .2em; color: var(--muted); }
@keyframes bootout { to { opacity: 0; visibility: hidden; } }

/* header floats over the page */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 20; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding-block: 1.5rem; }
.brand { display: block; line-height: 0; }
.brand img { display: block; height: 1.9rem; width: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.6rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font: 300 .72rem var(--font-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-block: .4rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--aurora); color: var(--aurora); }

/* type */
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; text-wrap: balance; margin: 0; text-transform: uppercase; }
h1 { font-size: clamp(1.7rem, 5.2vw, 3.7rem); line-height: 1.12; letter-spacing: .01em; margin-block: .5rem 1.25rem; }
h2 { font-size: clamp(1.25rem, 3vw, 1.95rem); line-height: 1.2; letter-spacing: .02em; margin-bottom: 1.25rem; }
h3 { font-size: 1.15rem; line-height: 1.3; }
.eyebrow { font-size: .85rem; letter-spacing: .08em; font-weight: 500; color: var(--aurora); margin: 0; }
.lede { font-size: 1.2rem; max-width: 38rem; margin: 0; color: var(--text); }
.syl { font-family: var(--font-syl); }
.prose { max-width: 40rem; color: #d3ddd8; }
.prose p { margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }
.soon { margin-top: 2rem !important; }

/* buttons with corner brackets */
.actions { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 2rem; }
.actions.center { justify-content: center; }
.btn {
  position: relative;
  display: inline-block;
  background: var(--aurora);
  color: var(--on-aurora);
  border: 0;
  border-radius: 0;
  padding: .95rem 1.6rem;
  font: 500 .74rem var(--font-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow .2s ease, transform .2s ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: -7px;
  pointer-events: none;
  --c: var(--aurora);
  background:
    linear-gradient(var(--c), var(--c)) top left / 9px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px 9px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 9px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px 9px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 9px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 9px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 9px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 9px no-repeat;
}
.btn:hover { box-shadow: 0 0 32px rgba(77, 255, 180, .55); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.btn.ghost::before { --c: rgba(255, 255, 255, .6); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--aurora), 0 0 28px rgba(77, 255, 180, .25); color: var(--aurora); }

/* home stage */
.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 7rem 0 5rem;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(4, 7, 13, .62), transparent 62%),
    linear-gradient(to bottom, transparent 70%, var(--night));
}
.stage-copy { position: relative; z-index: 2; }
.stage h1 { max-width: 22ch; margin-inline: auto; font-weight: 200; font-size: clamp(1.8rem, 5.6vw, 4rem); text-shadow: 0 0 60px rgba(4, 7, 13, .9); }
.stage .lede { margin-inline: auto; color: #cfdcd6; max-width: 36rem; font-size: clamp(1rem, 2vw, 1.15rem); }
.cue { position: absolute; z-index: 3; left: 50%; bottom: 1.5rem; width: 1.6rem; height: 2.6rem; margin-left: -.8rem; border: 1px solid rgba(255, 255, 255, .4); border-radius: 1rem; }
.cue span { position: absolute; left: 50%; top: .5rem; width: 3px; height: .55rem; margin-left: -1.5px; border-radius: 2px; background: var(--aurora); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(.9rem); } }

/* inner page hero */
.hero { display: grid; gap: 2.5rem; align-items: center; padding-block: clamp(7rem, 14vw, 9rem) clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 820px) { .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.hero.solo { grid-template-columns: minmax(0, 1fr); padding-bottom: 2rem; }
.hero-copy { min-width: 0; }
.board-wrap { min-width: 0; }
.board-caption { margin: 1.1rem 0 0; font-size: .85rem; color: var(--muted); }
.display { margin: .25rem 0 .75rem; font-weight: 200; line-height: 1.05; color: var(--aurora); text-shadow: 0 0 40px rgba(77, 255, 180, .45); font-size: clamp(3rem, 10vw, 6.5rem); overflow-wrap: anywhere; }

/* photos */
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: .5rem; }
.photo figcaption { margin-top: .7rem; font-size: .85rem; color: var(--muted); }
.photo.small { max-width: 24rem; margin-top: 2rem; }
.photo-band { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.photo-band .photo img { box-shadow: 0 30px 120px rgba(77, 255, 180, .14); }

/* language tiles: dashboard blades */
.tiles { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); margin-top: 2rem; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 21rem;
  padding: 1.6rem;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: linear-gradient(160deg, rgba(77, 255, 180, .10), rgba(154, 120, 255, .07) 55%, transparent), var(--glass);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-5px);
  border-color: var(--aurora);
  box-shadow: 0 0 0 1px var(--aurora), 0 20px 70px rgba(77, 255, 180, .2);
}
.tile-art {
  position: absolute;
  top: 1.3rem;
  left: 1.5rem;
  right: 1.5rem;
  font-weight: 200;
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  line-height: 1.12;
  color: var(--aurora);
  text-shadow: 0 0 30px rgba(77, 255, 180, .55);
  overflow-wrap: anywhere;
}
.tile-name { font: 300 1.3rem var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.tile-note { margin-top: .45rem; color: var(--muted); font-size: .98rem; }
.tile.next { border-style: dashed; background: linear-gradient(160deg, rgba(154, 120, 255, .16), transparent 70%), var(--glass); }
.tile.next .tile-art { color: var(--violet); text-shadow: 0 0 30px rgba(154, 120, 255, .6); }

/* sections */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.split { display: grid; gap: 1.5rem 3.5rem; }
@media (min-width: 820px) { .split { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }
.split > * { min-width: 0; }
.tag {
  display: inline-block;
  font: 500 .65rem var(--font-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ember);
  border: 1px solid var(--ember);
  padding: .25rem .6rem;
  margin-bottom: .75rem;
}
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 40rem; }
.facts li { padding: .85rem 0; border-bottom: 1px solid var(--line); }

/* illustrated keycap board (Dene page) */
.board { --k: clamp(3rem, 11vw, 4.6rem); display: grid; gap: .6rem; justify-content: start; }
.keyrow { display: flex; gap: .6rem; }
.keyrow:nth-child(2) { margin-left: calc(var(--k) * .3); }
.keyrow:nth-child(3) { margin-left: calc(var(--k) * .6); }
.keyrow:nth-child(4) { margin-left: calc(var(--k) * .9); }
.key {
  display: grid;
  place-items: center;
  width: var(--k);
  height: var(--k);
  background: var(--glass);
  color: var(--aurora);
  text-shadow: 0 0 18px rgba(77, 255, 180, .7);
  border: 1px solid rgba(255, 255, 255, .22);
  border-bottom-width: 5px;
  border-radius: .45rem;
  font-family: var(--font-syl);
  font-size: clamp(1.4rem, 4.2vw, 2.1rem);
  line-height: 1;
  user-select: none;
  transition: transform .08s ease, border-bottom-width .08s ease;
}
.key.latin { font-family: var(--font-body); font-weight: 500; }
.key:hover, .key:active { transform: translateY(3px); border-bottom-width: 2px; }
.key.space { width: calc(var(--k) * 4 + 1.8rem); height: calc(var(--k) * .6); }

/* glyph band (about page) */
.glyph-band { overflow: hidden; border-block: 1px solid var(--line); padding-block: 1.25rem; user-select: none; }
.glyph-row { display: flex; gap: 1.75rem; white-space: nowrap; font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.2; color: var(--aurora); opacity: .55; margin-left: -1rem; font-weight: 200; text-shadow: 0 0 30px rgba(77, 255, 180, .5); }
.glyph-row.dene { color: var(--violet); opacity: .45; font-family: var(--font-display); margin-top: .25rem; }
.glyph-row .g.syl { font-family: var(--font-syl); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.25rem 2.75rem; color: var(--muted); font-size: .95rem; }
.site-footer .row { display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
.site-footer p { margin: 0; }
.email { overflow-wrap: anywhere; }

/* try-it virtual keyboard: backlit glass keys */
.kbdemo { margin-top: 1.5rem; max-width: 66rem; }
.kb-switch { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.1rem; }
.kb-tab {
  font: 500 .72rem var(--font-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: .7rem 1.1rem;
  cursor: pointer;
}
.kb-tab[aria-pressed="true"] { border-color: var(--aurora); color: var(--aurora); box-shadow: 0 0 22px rgba(77, 255, 180, .25); }
.kb-label { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); margin-bottom: .4rem; }
.kb-text {
  display: block;
  width: 100%;
  font-family: var(--font-syl), var(--font-body);
  font-weight: 300;
  font-size: 1.6rem;
  line-height: 1.4;
  padding: .8rem 1rem;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  caret-color: var(--aurora);
  border: 1px solid var(--line);
  border-radius: .4rem;
  resize: vertical;
  margin-bottom: 1.4rem;
}
.kb-text:focus-visible { outline: 0; border-color: var(--aurora); box-shadow: 0 0 0 1px var(--aurora), 0 0 36px rgba(77, 255, 180, .22); }
.kb-scroll { container-type: inline-size; padding-bottom: .5rem; }
.kb { width: 100%; font-size: clamp(.55rem, 3.4cqw, 1.3rem); user-select: none; }
.kb-row { display: grid; grid-template-columns: repeat(60, 1fr); grid-auto-rows: calc(100cqw / 15); }
.kb-cell { padding: 2px; min-width: 0; }
.kb-key {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  color: var(--aurora);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .2);
  border-bottom-width: 4px;
  border-radius: clamp(.15rem, .8cqw, .4rem);
  cursor: pointer;
  text-shadow: 0 0 14px rgba(77, 255, 180, .65);
  transition: transform .08s ease, border-bottom-width .08s ease, background .12s ease;
}
.kb-key.mod { background: rgba(255, 255, 255, .02); color: var(--muted); text-shadow: none; font: 500 .5em var(--font-display); letter-spacing: .08em; text-transform: uppercase; cursor: default; overflow: hidden; }
@container (max-width: 560px) { .kb-key.mod { font-size: .4em; letter-spacing: .02em; } }
.kb-key[data-act="shift"], .kb-key[data-act="bs"], .kb-key[data-act="enter"] { cursor: pointer; }
.kb-key[data-act="shift"].on { background: var(--violet); color: #0b0620; border-color: var(--violet); text-shadow: none; }
.kb-key .n { font-family: var(--font-body); font-weight: 400; line-height: 1; }
.kb-key .n.syl, .kb-key .s.syl { font-family: var(--font-syl); font-weight: 300; }
.kb-key .s { position: absolute; top: .2em; right: .3em; font-size: .55em; line-height: 1; color: var(--muted); text-shadow: none; }
.kb-key.empty .n { opacity: 0; }
.kb-key.down, .kb-key[data-sc]:active { transform: translateY(2px); border-bottom-width: 2px; background: rgba(77, 255, 180, .2); border-color: var(--aurora); }
.kb.shifted .kb-key[data-sc] .n { color: var(--violet); text-shadow: 0 0 14px rgba(154, 120, 255, .8); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cue span { animation: none; opacity: 1; }
  .key, .kb-key, .tile, .btn { transition: none; }
  html.boot #boot { animation-duration: .01s; animation-delay: .01s; }
}

/* Dene character explainer */
.display.latin { font-family: var(--font-display); }
.chars { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); margin-top: 2rem; }
.char { display: flex; flex-direction: column; gap: .35rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: .6rem; background: linear-gradient(160deg, rgba(77, 255, 180, .07), transparent 65%), var(--glass); }
.char p { margin: 0; }
.char-glyph { font: 200 clamp(2.4rem, 5vw, 3.2rem)/1.15 var(--font-display); color: var(--aurora); text-shadow: 0 0 28px rgba(77, 255, 180, .5); overflow-wrap: anywhere; margin-bottom: .5rem !important; }
.char h3 { font-size: .95rem; letter-spacing: .06em; }
.char p:not(.char-glyph):not(.char-key) { color: #cbd7d2; font-size: .98rem; }
.char-key { margin-top: auto !important; padding-top: .9rem; color: var(--muted); font-size: .9rem; }
kbd { display: inline-block; min-width: 1.9rem; padding: .1rem .5rem; margin-left: .35rem; text-align: center; font: 500 .85rem var(--font-body); color: var(--aurora); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .22); border-bottom-width: 3px; border-radius: .35rem; }
.char-note { max-width: 40rem; margin: 2rem 0 0; color: var(--muted); font-size: .95rem; }
.credit-photo { max-width: 40rem; margin-top: 1.75rem; }
.kb-note { margin: 1.25rem 0 0; font-size: .85rem; color: var(--muted); }

/* Phone keypad: only the keys the layout uses, large enough to tap */
.kb.pad { font-size: 1.5rem; }
.kb.pad .kb-row.kb-pad { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 3.3rem; gap: 0; }
.kb.pad .kb-cell { padding: 3px; }
.kb.pad .kb-key.mod { font-size: .62rem; letter-spacing: .06em; }
.kb.pad .kb-key .n.sp { font: 500 .6rem var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-shadow: none; }
.kb.pad .kb-key .s { font-size: .6rem; }
