/*
 * OwnBase's landing page. Orange is your server and gold is the people who
 * connect to it, in the pixel scenes and everywhere else on the page. The type
 * is the app's own: Onest, with Geist Mono only for what people type.
 */

@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --dusk: #24204f;
  --night: #0b0a20;
  --heather: #5b3f7e;
  --gold: #ffd27a;
  --host: #f97316;
  --host-hover: #ff8b3d;
  --fog: #eceef4;
  --paper: #f7f8fb;
  --ink: #1d1b33;
  --ink-2: #4a4862;
  --ink-3: #64627c;
  --line: #d5d7e3;
  --deep: #111115;
  --font: "Onest", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", monospace;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(88px, 12vw, 168px);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
pre {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

code,
pre {
  font-family: var(--mono);
}

:where(p, li) code {
  font-size: 0.86em;
  padding: 0.12em 0.38em;
  border-radius: 4px;
  background: rgb(29 27 51 / 0.07);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--host);
  outline-offset: 3px;
}

.wrap {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  translate: 0 -200%;
}
.skip:focus {
  translate: 0 0;
}

/* Corners stepped like the scene's pixels. --n is one step. */
.btn,
.stage,
.step-num,
.tree,
.terminal,
.plan,
.platforms {
  clip-path: polygon(
    0 calc(var(--n) * 2),
    var(--n) calc(var(--n) * 2),
    var(--n) var(--n),
    calc(var(--n) * 2) var(--n),
    calc(var(--n) * 2) 0,
    calc(100% - var(--n) * 2) 0,
    calc(100% - var(--n) * 2) var(--n),
    calc(100% - var(--n)) var(--n),
    calc(100% - var(--n)) calc(var(--n) * 2),
    100% calc(var(--n) * 2),
    100% calc(100% - var(--n) * 2),
    calc(100% - var(--n)) calc(100% - var(--n) * 2),
    calc(100% - var(--n)) calc(100% - var(--n)),
    calc(100% - var(--n) * 2) calc(100% - var(--n)),
    calc(100% - var(--n) * 2) 100%,
    calc(var(--n) * 2) 100%,
    calc(var(--n) * 2) calc(100% - var(--n)),
    var(--n) calc(100% - var(--n)),
    var(--n) calc(100% - var(--n) * 2),
    0 calc(100% - var(--n) * 2)
  );
}

/* Buttons. A clip-path would cut an outside focus ring, so theirs sits inside. */
.btn {
  --n: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s;
}
.btn:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: -7px;
}
.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}
.btn-host {
  background: var(--host);
  color: #1a1a1f;
}
.btn-host:hover {
  background: var(--host-hover);
}
.btn-glass {
  background: rgb(20 17 54 / 0.55);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22);
  color: #fff;
  backdrop-filter: blur(8px);
}
.btn-glass:hover {
  background: rgb(20 17 54 / 0.75);
}
.btn-light {
  background: rgb(255 255 255 / 0.94);
  color: var(--ink);
}
.btn-light:hover {
  background: #fff;
}
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover {
  background: #2e2b4c;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* The hero. */

.hero {
  position: relative;
  min-height: max(100svh, 780px);
  overflow: hidden;
  background: var(--dusk);
  color: #fff;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* Beta, beside the name: a quiet tag on the glass the buttons use. */
.beta {
  padding: 2px 7px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.12);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.24);
  color: rgb(255 255 255 / 0.9);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: rgb(255 255 255 / 0.82);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: clamp(28px, 6vh, 72px);
}

.headline {
  font-size: clamp(48px, 6.4vw, 96px);
  font-weight: 650;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.headline > span {
  display: block;
}

/* The full stops are pixels. The last is the server, and lights with the cabin. */
.stop {
  display: inline-block;
  width: 0.15em;
  height: 0.15em;
  margin-left: 0.05em;
  overflow: hidden;
  background: #fff;
  color: transparent;
  font-style: normal;
  line-height: 0;
  vertical-align: baseline;
}
.stop-host {
  background: #4a3a5c;
  animation: light-up 0.3s steps(2) 0.5s forwards;
}
@keyframes light-up {
  50% {
    background: var(--host);
    box-shadow: 0 0 0.3em rgb(249 115 22 / 0.5);
  }
  51% {
    background: #4a3a5c;
    box-shadow: none;
  }
  to {
    background: var(--host);
    box-shadow: 0 0 0.35em rgb(249 115 22 / 0.65);
  }
}

.lede {
  max-width: 50ch;
  text-wrap: pretty;
  margin-top: clamp(20px, 2.4vw, 30px);
  color: rgb(255 255 255 / 0.86);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.55;
  text-shadow: 0 1px 2px rgb(20 17 54 / 0.5);
}

.hero .actions {
  margin-top: 28px;
}

/* The cards that appear as people connect, pinned to points in the scene. */
.chips {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.chip {
  position: absolute;
  display: flex;
  gap: 10px;
  width: max-content;
  max-width: 270px;
  padding: 10px 14px 10px 12px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 12px;
  background: rgb(17 17 21 / 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgb(8 6 30 / 0.35);
  color: #f3f3f5;
  font-size: 13.5px;
  line-height: 1.35;
  opacity: 0;
  transition:
    opacity 0.45s ease-out,
    translate 0.45s ease-out;
  translate: 0 8px;
}
.chip.is-on {
  opacity: 1;
  translate: 0 0;
}
.chip strong {
  display: block;
  font-weight: 600;
}
.chip-meta {
  display: block;
  color: #b9bac0;
}
.chip-meta b {
  color: #f3f3f5;
  font-weight: 600;
}
.chip-host {
  flex-direction: column;
  gap: 4px;
  transform: translate(64px, 18px);
}
.chip-host code {
  color: #f9d29e;
  font-size: 13px;
}
.chip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.live {
  width: 8px;
  height: 8px;
  background: var(--host);
  box-shadow: 0 0 8px rgb(249 115 22 / 0.8);
}
.chip-person {
  align-items: center;
}
.chip-house {
  transform: translate(-50%, calc(-100% - 22px));
}
.chip-city {
  transform: translate(-60%, calc(-100% - 30px));
}
.avatar-sam {
  --av: #8d4fb6;
}
.avatar-priya {
  --av: #3566c2;
}
.avatar {
  display: grid;
  flex: none;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--av);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
}

/* Sections on the page. */

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-head h2 {
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.section-head p {
  max-width: 60ch;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: clamp(17px, 1.3vw, 19px);
}

h3 {
  font-size: 18px;
  font-weight: 620;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* A screenshot on the app's own dark ground, with stepped corners. */
.stage {
  --n: 6px;
  padding: clamp(8px, 1.2vw, 14px);
  background: var(--deep);
}
.stage img {
  width: 100%;
  border-radius: 6px;
}
.stage figcaption {
  padding: 14px 6px 4px;
  color: #b9bac0;
  font-size: 14px;
}

.showcase {
  padding-block: clamp(64px, 9vw, 120px) var(--section);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(28px, 4vw, 56px);
  margin-top: clamp(48px, 6vw, 72px);
}
.features p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 16px;
}

/* Hosting, in three steps. */

.hosting {
  padding-block: var(--section);
  background: var(--paper);
}

.steps {
  --gap: clamp(72px, 10vw, 136px);
  --pad: clamp(8px, 3vw, 40px);
  display: grid;
  gap: var(--gap);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
/* A dotted rail from each number to the next, running from the server's orange to the people's gold. */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: calc(var(--pad) + 44px);
  bottom: calc(14px - var(--gap) - var(--pad));
  left: 19px;
  width: 2px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 6px, var(--paper) 6px 12px),
    linear-gradient(to bottom, var(--from), var(--to));
}
.step:nth-child(1) {
  --from: var(--host);
  --to: #fb9a3c;
}
.step:nth-child(2) {
  --from: #fb9a3c;
  --to: var(--gold);
}
.step-text {
  position: relative;
  padding-top: var(--pad);
  padding-left: 72px;
}
.step-num {
  --n: 3px;
  position: absolute;
  top: calc(var(--pad) - 6px);
  left: 0;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-weight: 650;
}
.step h3 {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 650;
  letter-spacing: -0.025em;
}
.step-text > p:not(.reach) {
  max-width: 46ch;
  margin-top: 14px;
  color: var(--ink-2);
}

/* How the workspace is reached after each step: an address, or the link itself. */
.reach {
  display: grid;
  gap: 6px;
  margin-top: 24px;
}
.reach span {
  color: var(--ink-3);
  font-size: 14px;
}
.reach code {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.reach code::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--host);
  vertical-align: 0.05em;
}
.step:last-child .reach code::before {
  background: #e0a63a;
}

.stage-tall {
  max-width: 560px;
  justify-self: center;
  width: 100%;
}
.step-shots {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr);
  gap: 16px;
  align-items: end;
}
.step-shots .stage-tall {
  max-width: none;
}

.footnote {
  max-width: 60ch;
  margin-top: clamp(48px, 6vw, 72px);
  color: var(--ink-3);
  font-size: 15px;
}
.footnote a {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* One folder. */

.folder {
  padding-block: var(--section);
}
.folder-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.tree {
  --n: 5px;
  padding: clamp(24px, 3vw, 36px);
  background: #fff;
  font-family: var(--mono);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 2;
}
.tree-root {
  font-weight: 600;
}
.tree dl {
  margin: 0;
}
.tree dl > div {
  display: grid;
  grid-template-columns: 15ch minmax(0, 1fr);
  gap: 0 16px;
  align-items: baseline;
}
.tree dt {
  white-space: pre;
}
.tree dt span {
  color: var(--ink-3);
}
.tree dd {
  margin: 0;
  color: var(--ink-3);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}
.folder-facts {
  display: grid;
  gap: 32px;
}
.folder-facts p {
  margin-top: 6px;
  color: var(--ink-2);
}

.terminal {
  --n: 5px;
  margin-top: 40px;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--ink);
  color: #e9e7f6;
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.75;
  overflow-x: auto;
}
.terminal pre {
  white-space: pre;
}
.terminal:focus-visible {
  outline-offset: -4px;
}
.prompt {
  color: var(--host);
  user-select: none;
}
.comment {
  color: #9895b2;
}

/* Calls, on the dusk colour. */

.calls {
  padding-block: var(--section);
  background: var(--dusk);
  color: #fff;
}
.calls .section-head p,
.calls .features p {
  color: rgb(255 255 255 / 0.76);
}
.calls .stage {
  background: #0b0a1e;
}
.features-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Bots. */

.bots {
  padding-block: var(--section);
}
.bots-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.bots-grid .terminal {
  margin-top: 0;
}

/* Downloads. download.js marks the row for this device and fills in the files. */

/* On the glass the second button uses, so it reads over the treeline too. */
.get-note {
  width: fit-content;
  max-width: min(56ch, 100%);
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: 6px;
  background: rgb(20 17 54 / 0.62);
  backdrop-filter: blur(8px);
  color: rgb(255 255 255 / 0.86);
  font-size: 15px;
}
.get-note a {
  color: #fff;
  font-weight: 600;
  text-underline-offset: 3px;
}

.download {
  padding-block: var(--section);
}
.platforms {
  --n: 6px;
  background: #fff;
}
.platform {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px 48px;
  align-items: center;
  padding: clamp(22px, 3vw, 32px) clamp(22px, 3vw, 36px);
  border-top: 1px solid var(--line);
}
.platform:first-child {
  border-top: 0;
}
.platform-text p {
  max-width: 62ch;
  margin-top: 6px;
  color: var(--ink-2);
}
.platform pre {
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: 6px;
  background: var(--fog);
  font-size: 14px;
  overflow-x: auto;
}
.platform pre code {
  padding: 0;
  background: none;
  font-size: inherit;
  white-space: pre;
}
.platform-get {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.platform-meta {
  max-width: 34ch;
  color: var(--ink-3);
  font-size: 14px;
}
.platform.is-yours {
  background: #fff7ef;
}
.platform.is-yours::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  width: 4px;
  background: var(--host);
}
.yours {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgb(249 115 22 / 0.14);
  color: #943b00;
  font-size: 13px;
  font-weight: 600;
  vertical-align: 2px;
}
.yours[hidden] {
  display: none;
}

/* Plans. */

.plans {
  padding-bottom: var(--section);
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.plan {
  --n: 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 36px);
  background: #fff;
}
.plan > p:not(.price, .soon) {
  color: var(--ink-2);
  font-size: 16px;
}
.plan .price {
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.plan .btn {
  margin-top: auto;
  align-self: flex-start;
}
.plan-now {
  background: var(--ink);
  color: #fff;
}
.plan-now > p:not(.price) {
  color: rgb(255 255 255 / 0.78);
}
.soon {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--ink-3);
  font-size: 14px;
}
.soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid var(--ink-3);
}

/* The footer: the scene again, late, with everyone connected. */

.end {
  background: #0c181f;
  color: #fff;
}
.end-scene {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--night);
}
.end-copy {
  position: relative;
  z-index: 1;
  padding-top: clamp(96px, 11vw, 140px);
}
.end-copy h2 {
  max-width: 15ch;
  margin-bottom: 32px;
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  padding-block: 8px 40px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.footer-links a {
  color: rgb(255 255 255 / 0.8);
  font-size: 15px;
  text-underline-offset: 3px;
}
.footer-links a:hover {
  color: #fff;
}
.legal {
  flex-basis: 100%;
  color: rgb(255 255 255 / 0.62);
  font-size: 14px;
}
.legal code {
  background: rgb(255 255 255 / 0.1);
}

/* The 404 page: one screen of night, with a link that never arrives. */

.lost {
  position: relative;
  min-height: max(100svh, 620px);
  overflow: hidden;
  background: var(--night);
  color: #fff;
}
.lost-copy {
  position: relative;
  z-index: 1;
  padding-top: clamp(48px, 12vh, 140px);
}
.lost h1 {
  max-width: 13ch;
  font-size: clamp(42px, 6vw, 88px);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.lost-copy p {
  max-width: 44ch;
  margin: 24px 0 32px;
  color: rgb(255 255 255 / 0.82);
  font-size: clamp(17px, 1.35vw, 20px);
  text-shadow: 0 1px 2px rgb(11 10 32 / 0.6);
}

/* Narrower screens. */

@media (max-width: 1000px) {
  .nav-links {
    display: none;
  }
  .nav .btn {
    margin-left: auto;
  }
  .step,
  .folder-grid,
  .bots-grid,
  .platform {
    grid-template-columns: minmax(0, 1fr);
  }
  .step::before {
    display: none;
  }
  .stage-tall {
    max-width: 520px;
    justify-self: start;
  }
  .chip-house,
  .chip-city {
    display: none;
  }
  .chip-host {
    transform: translate(calc(-100% - 40px), 24px);
  }
  .features,
  .features-three,
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .hero {
    min-height: max(100svh, 720px);
  }
  .actions .btn {
    flex: 1 1 100%;
  }
  .features,
  .features-three,
  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .step-text {
    padding-left: 0;
    padding-top: 56px;
  }
  .step-num {
    top: 0;
  }
  .step-shots {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
  }
  .end-scene {
    min-height: 640px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .stop-host {
    animation: none;
    background: var(--host);
    box-shadow: 0 0 0.35em rgb(249 115 22 / 0.65);
  }
  .chip {
    transition: none;
  }
}
