/* Gooby website. Two colors per palette (--ink, --paper), square corners,
   2px borders, solid offset shadows, stepped motion only. */

@font-face {
  font-family: "Departure Mono";
  src: url("assets/fonts/DepartureMono-Regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("assets/fonts/Silkscreen-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --muted: color-mix(in srgb, var(--ink) 60%, var(--paper));
  --hint: #808080;
  --shadow: 4px 4px 0 var(--ink);
  --dither: repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 0 0 / 4px 4px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ffffff;
    --paper: #000000;
  }
}

html,
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
body {
  font-family: "Departure Mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: none;
  /* Phones must not enlarge the pixel fonts on their own (iOS in landscape) */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}
* {
  box-sizing: border-box;
  border-radius: 0;
}
a {
  color: var(--ink);
}
a:hover {
  background: var(--ink);
  color: var(--paper);
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
::selection {
  background: var(--ink);
  color: var(--paper);
}
[hidden] {
  display: none !important;
}
button {
  font-family: "Departure Mono", ui-monospace, monospace;
  font-size: 14px;
  cursor: pointer;
}
p {
  margin: 0;
}
.skip {
  position: absolute;
  left: 8px;
  top: -64px;
  z-index: 60;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus {
  top: 8px;
}

/* Layout */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow {
  max-width: 880px;
}
.stack {
  display: flex;
  flex-direction: column;
}
.section {
  padding: clamp(64px, 10vw, 112px) 0;
}
.section-tight {
  padding: clamp(48px, 8vw, 96px) 0;
}
.rule {
  border-top: 2px solid var(--ink);
}
.dither {
  height: 12px;
  background: var(--dither);
}
.sprite {
  display: block;
  line-height: 0;
}
/* Official marks (Brand.astro): flat, in the page's ink */
.brand {
  display: block;
  flex: none;
}
.grid {
  display: grid;
  gap: 24px;
}
.grid-260 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.grid-280 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.grid-300 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

/* Type */
.display {
  margin: 0;
  font-family: "Silkscreen", ui-monospace, monospace;
  font-weight: 400;
  letter-spacing: 0.125em;
  text-transform: uppercase;
}
.h1 {
  font-size: clamp(40px, 7vw, 80px);
  font-size: clamp(40px, round(down, 7vw, 8px), 80px);
  line-height: 1.1;
}
.h2 {
  font-size: clamp(24px, 4.2vw, 40px);
  font-size: clamp(24px, round(down, 4.2vw, 8px), 40px);
  line-height: 1.2;
}
.h2-xl {
  font-size: clamp(32px, 5.6vw, 64px);
  font-size: clamp(32px, round(down, 5.6vw, 8px), 64px);
  line-height: 1.15;
  text-wrap: balance;
}
.h3 {
  font-size: 24px;
  line-height: 1.25;
}
.big {
  font-size: 40px;
  line-height: 1;
}
.caps {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.lead {
  font-size: 22px;
  line-height: 1.45;
}
.muted {
  color: var(--muted);
}
.hint {
  color: var(--hint);
}
.pretty {
  text-wrap: pretty;
}

/* Buttons and chips */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
}
/* Buttons are links too, but a button says it's being hovered by going down, not by inverting */
.btn:hover {
  background: transparent;
  color: var(--ink);
}
.btn-primary,
.btn-primary:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-sm {
  padding: 10px 16px;
}
.btn-xl {
  padding: 18px 28px;
  font-size: 22px;
}
.chip {
  padding: 4px 8px;
  border: 2px solid var(--ink);
}
.chip-inv {
  padding: 4px 8px;
  background: var(--ink);
  color: var(--paper);
  letter-spacing: 0.08em;
}
.feat-visual picture {
  display: block;
}
.shot {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}
.box {
  border: 2px solid var(--ink);
}
.box-shadow {
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}
.inv {
  background: var(--ink);
  color: var(--paper);
}
.bullet {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  background: currentColor;
}
.caret {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  background: var(--ink);
  vertical-align: -0.15em;
}

/* Header */
.site-header {
  position: relative;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
@media (min-width: 760px) {
  .site-header {
    position: sticky;
  }
}
.header-row {
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.logo:hover {
  background: transparent;
  color: var(--ink);
}
.wordmark {
  font-size: 24px;
  line-height: 1;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.nav a {
  padding: 4px 8px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.header-end {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.discord-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Colors menu */
.look {
  position: relative;
}
.look-btn {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0.08em;
}
.look-btn[aria-expanded="true"] {
  background: var(--ink);
  color: var(--paper);
}
.look-icon {
  width: 14px;
  height: 14px;
  display: flex;
  border: 2px solid currentColor;
}
.look-icon::before {
  content: "";
  flex: 1;
  background: currentColor;
}
.look-icon::after {
  content: "";
  flex: 1;
}
.look-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  width: 248px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.tile {
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid var(--ink);
  display: flex;
  background: var(--paper);
}
.tile span {
  flex: 1;
}
.modes {
  display: flex;
  border: 2px solid var(--ink);
}
.modes button {
  flex: 1;
  height: 32px;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
}
.modes button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* Hero */
.hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}
.hero-copy {
  flex: 1 1 460px;
  min-width: 0;
  gap: 24px;
  align-items: flex-start;
}
.hero-copy .lead {
  max-width: 30ch;
  text-wrap: pretty;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.stage {
  flex: 1 1 380px;
  min-width: 0;
  position: relative;
  height: 340px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stage-note {
  position: absolute;
  top: 12px;
  left: 16px;
}
/* Gooby and his laptop share the bottom of the stage; he walks over to it.
   No floor: the stage's edge is enough. */
.stage-desk {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 48px;
  height: 220px;
}
.stage-gooby,
.stage-laptop,
.stage-sound {
  position: absolute;
  bottom: 0;
}
.stage-gooby {
  left: 0;
  z-index: 2;
}
.stage-laptop {
  right: 0;
  z-index: 1;
}
.stage-sound {
  left: 0;
  bottom: 152px;
}
@media (max-width: 639px) {
  .stage-desk {
    left: 16px;
    right: 16px;
  }
  .stage-sound {
    bottom: 116px;
  }
}

/* Section heads */
.head {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.head > .stack {
  gap: 12px;
}

/* Demo */
.demo-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.seg {
  display: flex;
  border: 2px solid var(--ink);
}
.seg button {
  padding: 10px 16px;
  border: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink);
}
.seg button[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
}
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.keys {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.key {
  padding: 10px 12px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0.08em;
}
.key-space {
  padding-left: 48px;
  padding-right: 48px;
}
.keys.down .key {
  background: var(--ink);
  color: var(--paper);
}
.try-btn {
  padding: 12px 20px;
}
.demo-stage {
  position: relative;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 56px;
}
.window {
  background: var(--paper);
}
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.winbtns {
  display: flex;
  gap: 6px;
}
.winbtns span {
  width: 10px;
  height: 10px;
  border: 2px solid var(--paper);
}
.winbtns span:last-child {
  background: var(--paper);
}
.mail-row {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--ink);
}
.mail-row > span:first-child {
  width: 72px;
  color: var(--muted);
}
.mail-body {
  padding: 20px 16px;
  min-height: 160px;
  text-wrap: pretty;
}
.chat {
  gap: 16px;
  padding: 16px;
  min-height: 220px;
  justify-content: flex-end;
}
.chat-msg {
  gap: 4px;
  align-items: flex-start;
}
.chat-msg > span:last-child {
  padding: 8px 12px;
  border: 2px solid var(--ink);
}
.composer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 2px solid var(--ink);
  min-height: 56px;
}
.composer > span:last-child {
  flex: 1;
  min-width: 0;
}
.code {
  padding: 16px;
  min-height: 220px;
  gap: 4px;
}
.code-line {
  display: flex;
  gap: 16px;
}
.code-line .in {
  min-width: 0;
  padding-left: 32px;
}
.code-note {
  margin: auto 0 0;
  padding-top: 24px;
}
.pill {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 2px var(--paper);
  white-space: nowrap;
}
.bars {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
}
.bars span {
  width: 6px;
  height: 4px;
  background: var(--paper);
}
.pill-status {
  min-width: 88px;
}
.said {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  gap: 8px;
}
.said p {
  min-height: 2.9em;
}
.said-phone {
  display: none;
}

/* How it works */
.step {
  padding: 24px;
  gap: 16px;
}
.step-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Features */
.features {
  gap: clamp(64px, 9vw, 112px);
}
.feat {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}
.feat.rev {
  flex-direction: row-reverse;
}
.feat-text {
  flex: 1 1 340px;
  min-width: 0;
  max-width: 520px;
  gap: 16px;
}
.feat-visual {
  flex: 1 1 420px;
  min-width: 0;
}
.scene-box {
  padding: 32px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.compare {
  gap: 16px;
}
.compare-box {
  padding: 16px;
  gap: 8px;
}
.hat-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding-left: 16px;
}
.hat-row .chip-inv {
  margin-bottom: 8px;
}
.bubble {
  visibility: hidden;
  display: flex;
}
.bubble-text {
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  letter-spacing: 0.08em;
}
.toggle {
  width: 48px;
  height: 24px;
  border: 2px solid var(--ink);
  padding: 2px;
  display: flex;
  justify-content: flex-end;
  background: var(--ink);
}
.toggle span {
  width: 16px;
  height: 16px;
  background: var(--paper);
}
.hey-bubble {
  visibility: hidden;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0.08em;
}
.perch {
  position: relative;
  padding-top: 56px;
}
.perch .sprite {
  position: absolute;
  right: 32px;
  top: -6px;
}
.pal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 16px;
}
.pal-card {
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  text-align: left;
}
.pal-swatch {
  display: flex;
  height: 72px;
  width: 100%;
}
.pal-swatch > span {
  flex: 1;
  display: flex;
  justify-content: center;
}
.pal-light {
  align-items: flex-end;
  padding-bottom: 8px;
}
.pal-dark {
  align-items: center;
  font-family: "Silkscreen", ui-monospace, monospace;
  font-size: 16px;
}
.pal-name {
  padding: 8px 12px;
  border-top: 2px solid var(--ink);
  letter-spacing: 0.08em;
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.ums {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 24px 48px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.ums-text {
  gap: 8px;
  flex: 1 1 240px;
  max-width: 320px;
}
.ums-count {
  color: var(--muted);
}
/* Gooby floats over the sentence (no floor under him); the bin sits in the corner. */
.ums-stage {
  position: relative;
  flex: 999 1 420px;
  min-height: 168px;
  padding: 72px 0 8px 0;
}
.ums-gooby {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
}
.ums-bin {
  display: inline-block;
  vertical-align: bottom;
  margin-bottom: 6px;
}
.ums-line {
  margin: 0;
  font-size: 22px;
  line-height: 1.9;
}
.ums-line .w {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  vertical-align: top;
  box-sizing: border-box;
}
.ums-line .f,
.um-fly {
  padding: 0 6px;
  background: var(--ink);
  color: var(--paper);
}
.um-fly {
  position: absolute;
  z-index: 3;
  font-size: 22px;
  line-height: 1.9;
  white-space: nowrap;
}
.um-fly.ball {
  padding: 0;
  background: transparent;
  color: var(--ink);
  line-height: 0;
}
@media (max-width: 639px) {
  /* Parachutes land beside the heading, not through it */
  .head {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .head > .stack {
    flex: 1;
    min-width: 0;
  }
  .scene-box {
    min-height: 0;
    padding: 20px;
  }
  .case-art {
    height: 72px;
  }
  /* These screens can't be cropped to phone width without cutting sentences */
  .shot-wide {
    display: none;
  }
  .ums {
    padding: 20px;
  }
  .ums-stage {
    flex-basis: 100%;
    min-height: 200px;
    padding: 56px 0 8px 0;
  }
  .ums-line,
  .um-fly {
    font-size: 18px;
  }
}

/* Use cases */
.case {
  padding: 24px;
  gap: 12px;
}
.case:hover {
  box-shadow: var(--shadow);
}
.case-art {
  height: 96px;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.juggle {
  position: absolute;
  left: 24px;
  top: 8px;
  width: 16px;
  height: 24px;
}
.juggle span {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 22px;
  line-height: 1;
}

/* Privacy (inverted) */
.privacy {
  background: var(--ink);
  color: var(--paper);
}
.privacy .hint {
  color: var(--hint);
}
.privacy-top {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-end;
  justify-content: space-between;
}
.privacy-top > .stack {
  flex: 1 1 480px;
  min-width: 0;
  gap: 16px;
}
.guard {
  flex: 0 1 480px;
  min-width: 0;
  gap: 12px;
}
/* The guard scene: everything is placed by the engine except the computer and Gooby */
.guard-scene {
  position: relative;
  height: 240px;
  overflow: hidden;
}
.guard-pc {
  position: absolute;
  left: 0;
  bottom: 0;
}
.guard-gooby {
  position: absolute;
  left: 112px;
  bottom: 0;
}
.guard-cloud {
  position: absolute;
  left: 0;
  top: 0;
}
.guard-cloud:not([style]) {
  left: auto;
  right: 0;
}
.guard-line {
  position: absolute;
  width: 4px;
  height: 0;
  background: currentColor;
  visibility: hidden;
}
.guard-hook {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
}
.guard-bubble {
  position: absolute;
  left: 112px;
  bottom: 96px;
  padding: 8px 12px;
  border: 2px solid currentColor;
  font-family: "Silkscreen", ui-monospace, monospace;
  font-size: 16px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  visibility: hidden;
}
[data-zero].inv {
  background: var(--paper);
  color: var(--ink);
  align-self: flex-start;
}
@media (max-width: 639px) {
  .guard {
    flex-basis: 100%;
  }
  .guard-scene {
    height: 200px;
  }
  .guard-gooby {
    left: 88px;
  }
  .guard-line {
    width: 3px;
  }
  .guard-bubble {
    left: 88px;
    bottom: 76px;
    font-size: 14px;
  }
}
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 16px;
}
.flow-box {
  flex: 1 1 160px;
  border: 2px solid var(--paper);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  letter-spacing: 0.08em;
}
.flow-box.plain {
  border-color: transparent;
  color: var(--hint);
}
.flow-pc {
  flex: 2 1 280px;
  border: 2px solid var(--paper);
  box-shadow: 4px 4px 0 var(--paper);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.flow-pc .stack {
  gap: 8px;
}
.flow-pc .tag {
  padding: 4px 8px;
  background: var(--paper);
  color: var(--ink);
  align-self: flex-start;
  letter-spacing: 0.08em;
}
.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.bullets > div {
  display: flex;
  gap: 12px;
}

/* Why */
.why {
  padding: 32px;
  gap: 16px;
  min-height: 220px;
  justify-content: flex-end;
}
.why .big {
  line-height: 1.1;
}

/* Download */
.dl-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.dl-top > .stack {
  gap: 12px;
}
.seat {
  position: relative;
  padding-top: 72px;
}
.seat .sprite {
  position: absolute;
  right: 16px;
  bottom: calc(100% - 72px);
  z-index: 2;
}
.os {
  padding: 24px;
  gap: 16px;
}
.os.here {
  box-shadow: var(--shadow);
}
.os-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
}
.cmd code {
  padding: 12px;
  font-family: "Departure Mono", ui-monospace, monospace;
  font-size: 14px;
  word-break: break-all;
  background: var(--ink);
  color: var(--paper);
}
.cmd button {
  padding: 10px 16px;
  border: 0;
  border-top: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.alpha {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
}

/* FAQ */
.faq-list {
  border-bottom: 2px solid var(--ink);
}
.faq-item {
  border-top: 2px solid var(--ink);
}
.faq-item h3 {
  margin: 0;
  font: inherit;
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.faq-q[aria-expanded="true"] {
  background: var(--ink);
  color: var(--paper);
}
.faq-sign {
  font-family: "Silkscreen", ui-monospace, monospace;
  font-size: 24px;
  line-height: 1;
}
.faq-a {
  padding: 16px 8px 24px;
  max-width: 60ch;
}

/* Community */
.community {
  align-items: center;
  text-align: center;
  gap: 24px;
}
.community .lead {
  max-width: 36ch;
}
.community .btn-row {
  justify-content: center;
}

/* Footer */
.site-footer {
  border-top: 2px solid var(--ink);
  padding: 48px 0 64px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.footer-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-word {
  font-size: 40px;
  line-height: 1;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}
.footer-nav a {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-copy {
  letter-spacing: 0.08em;
}
.footer-nav .with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Keys: everything clickable works like an old keyboard key. It sits up on a
   solid shadow, sinks halfway under the pointer and bottoms out when pressed
   or selected. Whole pixels and no easing, like the rest of the motion.
   Hover only where there's a pointer, so a tapped key doesn't stay down. */
.btn,
.key,
.look-btn,
.pal-card,
.tile {
  --d: 4px;
  --h: 2px;
  box-shadow: var(--d) var(--d) 0 var(--ink);
}
.btn-sm,
.look-btn,
.tile {
  --d: 2px;
  --h: 1px;
}
@media (hover: hover) {
  .btn:hover,
  .look-btn:hover,
  .pal-card:hover,
  .tile:hover,
  .keys:hover .key {
    transform: translate(var(--h), var(--h));
    box-shadow: var(--h) var(--h) 0 var(--ink);
  }
}
.btn:focus-visible,
.look-btn:focus-visible,
.pal-card:focus-visible,
.tile:focus-visible,
.keys:focus-visible .key {
  transform: translate(var(--h), var(--h));
  box-shadow: var(--h) var(--h) 0 var(--ink);
}
.btn:active,
.look-btn:active,
.look-btn[aria-expanded="true"],
.pal-card:active,
.pal-card[aria-pressed="true"],
.tile:active,
.tile[aria-pressed="true"],
.keys:active .key,
.keys.down .key {
  transform: translate(var(--d), var(--d));
  box-shadow: 0 0 0 var(--ink);
}

/* Keys in a row (tabs, the light/dark switch, the copy button, FAQ rows):
   a raised edge, and the label sinks 1px on hover, 2px when pressed or
   selected. Padding moves the label so the row never changes size. */
.seg button,
.modes button,
.cmd button {
  box-shadow: inset -2px -2px 0 var(--ink);
}
.seg button[aria-selected="true"],
.modes button[aria-pressed="true"],
.seg button:active,
.modes button:active,
.cmd button:active {
  box-shadow: none;
}
@media (hover: hover) {
  .seg button:hover,
  .cmd button:hover {
    padding: 11px 15px 9px 17px;
  }
  .modes button:hover {
    padding: 2px 0 0 2px;
  }
  .faq-q:hover {
    padding: 21px 7px 19px 9px;
  }
}
.seg button[aria-selected="true"],
.seg button:active,
.cmd button:active {
  padding: 12px 14px 8px 18px;
}
.modes button[aria-pressed="true"],
.modes button:active {
  padding: 4px 0 0 4px;
}
.faq-q:active {
  padding: 22px 6px 18px 10px;
}
.nav a:active,
.discord-link:active,
.footer-nav a:active {
  transform: translate(0, 2px);
}

/* Phones: one column, centered where it's a single thing to look at
   (hero, footer), and buttons as wide as the screen */
@media (max-width: 639px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  /* Header: logo, Discord and colors on the first row; the four tabs spread
     across the second. The hero's button is right below, so no Download here */
  .header-row {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 8px;
  }
  .header-end {
    grid-area: 1 / 2;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .header-dl {
    display: none;
  }
  .discord-link {
    padding: 8px;
  }
  .discord-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .nav {
    grid-area: 2 / 1 / 3 / 3;
    justify-content: space-between;
    gap: 0;
    margin: 0 -4px;
  }
  .nav a {
    padding: 8px 4px;
  }

  .hero-copy {
    align-items: center;
    text-align: center;
  }
  .hero-copy .chip-inv {
    text-wrap: balance;
  }
  /* "Gooby types." stays on one line: the largest whole 8px size whose 12
     letters fit the screen */
  .hero-title {
    font-size: clamp(24px, round(down, (100vw - 32px) / 9.9, 8px), 40px);
    /* Even out the spacing after the last letter, so the lines sit centered */
    padding-left: 0.125em;
  }
  .hero-title .line {
    white-space: nowrap;
  }
  /* The lead breaks after each phrase, not wherever the line runs out */
  .hero-copy .lead {
    max-width: none;
  }
  .line-phone {
    display: block;
  }
  .btn-row {
    align-self: stretch;
    flex-direction: column;
  }
  .btn-row .btn,
  .seat .btn,
  .os-links .btn,
  .try-btn {
    justify-content: center;
    text-align: center;
  }

  .seg {
    width: 100%;
  }
  .seg button {
    flex: 1;
  }
  .keys {
    width: 100%;
  }
  .key-space {
    flex: 1;
    padding-left: 12px;
    padding-right: 12px;
  }
  .try-btn {
    flex: 1;
  }
  /* Live demo: a phone has no keyboard, so just the tabs, one button and
     the window */
  .demo-top {
    gap: 16px;
  }
  .keys,
  .said-desk {
    display: none;
  }
  .said-phone {
    display: inline;
  }
  .said p {
    font-size: 18px;
  }
  .pill {
    gap: 8px;
    padding: 8px 12px;
  }

  /* No more ums belongs with Smart formatting, so it follows it here
     (on wide screens it closes the section as a banner) */
  .features > * {
    order: 1;
  }
  .features > .head,
  .features > .feat-format,
  .features > .ums {
    order: 0;
  }

  /* What runs where: one line down the screen, each arrow pointing at the
     next box, and the cloud left out at the bottom */
  .flow {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .flow-box,
  .flow-pc {
    flex: none;
  }
  .flow-pc {
    justify-content: center;
  }
  .flow-arrow .sprite {
    transform: rotate(90deg);
  }
  .flow-box.plain {
    flex-direction: row;
    margin-top: 16px;
    padding: 16px 0 0;
    border-top: 2px dashed var(--hint);
  }

  .seat {
    width: 100%;
  }
  .seat .btn {
    width: 100%;
  }
  .os-links {
    align-self: stretch;
  }
  .os-links .btn {
    flex: 1 1 auto;
  }

  .footer-row {
    flex-direction: column;
    align-items: center;
  }
  .footer-nav {
    justify-content: center;
  }
}
@media (max-width: 379px) {
  .hero-copy .lead {
    font-size: 18px;
  }
}
