/* Toto's site. The same world as the app: an unlit screen, one monospace face, amber for whatever
   is yours or is waiting on you. One left-aligned column, set like a terminal session. */
:root {
  color-scheme: dark;
  --tube: #11140f;
  --bezel: #1d2119;
  --rule: #30362a;
  --phosphor: #ece6d2;
  --ghost: #959b85;
  --amber: #ffb000;
  --signal: #8bd45f;
  --raspberry: #f25c82;
  --sky: #7fc8e8;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--tube); }
/* No background on the body: the landscape sits between the page's colour and its content. */
#land { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
body { margin: 0; color: var(--phosphor); font-family: var(--mono); font-size: 15px; line-height: 1.6; padding-inline: 20px; padding-block: 0 80px; }
main, header.top, footer { max-width: 1000px; margin-inline: auto; }
main, footer { position: relative; }

a { color: var(--sky); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(28px, 6vw, 40px); max-width: 16ch; letter-spacing: -1px; }
h2 { font-size: 22px; letter-spacing: -0.3px; }
h3 { font-size: 15px; }
p { margin: 0; max-width: 64ch; }
code, kbd { font-family: inherit; color: var(--amber); }
pre { margin: 0; font-family: inherit; }
.dim { color: var(--ghost); }
.amber { color: var(--amber); }

header.top { position: relative; z-index: 1; display: flex; align-items: center; gap: 20px; padding-block: 18px; border-bottom: 1px solid var(--rule); }
header.top .name { font-weight: 700; color: var(--phosphor); text-decoration: none; margin-right: auto; }
header.top .name span { color: var(--amber); }
header.top nav { display: flex; gap: 20px; }
header.top nav a { color: var(--ghost); text-decoration: none; }
header.top nav a[aria-current], header.top nav a:hover { color: var(--phosphor); }

main { display: flex; flex-direction: column; gap: 64px; padding-top: 56px; }
section { display: flex; flex-direction: column; gap: 18px; }
section + section { border-top: 1px solid var(--rule); padding-top: 40px; }

/* The mark: text, moved by swapping characters. */
.face { font-weight: 700; line-height: 1.25; white-space: pre; margin: 0; }
.face .nose { display: block; margin-top: -0.5em; color: var(--amber); }
.face.waiting, .face.waiting .nose { color: var(--amber); }
.face.offline, .face.offline .nose { color: var(--ghost); }

/* The wall of dogs behind the opening: an avatar for each of a few hundred ids, fading out below. */
.wall { --s: 64px; --gap: 14px; position: absolute; inset: 62px 0 auto; height: 440px; overflow: hidden; z-index: 0; pointer-events: none; display: grid; grid-template-columns: repeat(auto-fill, var(--s)); gap: var(--gap); justify-content: center; align-content: start; padding-top: 24px; -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 88%); mask-image: linear-gradient(to bottom, #000 40%, transparent 88%); }
.av { width: var(--s); height: var(--s); border-radius: 50%; background: var(--fill); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; font-weight: 700; font-size: calc(var(--s) * 0.25); line-height: 1.15; white-space: pre; transform: rotate(var(--tilt)); }
.av > span { display: block; }
.av > .m { margin-top: -0.4em; }
/* The hero starts below the wall, which fades out behind its first lines. */
.has-wall main { padding-top: 330px; }
@media (max-width: 600px) { .wall { --s: 44px; --gap: 10px; height: 330px; } .has-wall main { padding-top: 262px; } }

/* The opening: what it is on the left, the app at its defining moment on the right. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 40px 64px; align-items: center; }
.hero .lead { display: flex; flex-direction: column; gap: 28px; }
.hero .wallnote button { font: inherit; color: var(--sky); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hero .face { font-size: clamp(56px, 17vw, 112px); }
.hero h1 { font-size: clamp(30px, 5.2vw, 52px); letter-spacing: -1.5px; max-width: 12ch; }
.hero .pitch { font-size: 19px; max-width: 36ch; }
.shot { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.shot .session { box-shadow: 0 0 0 8px var(--tube), 0 0 0 9px var(--rule); }
.shot figcaption { font-size: 13px; }
.start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 56px; align-items: start; }

/* The live count, drawn like the status line at the bottom of the app. */
.statusline { display: flex; align-items: center; gap: 14px; background: var(--bezel); padding: 12px 16px; max-width: 520px; }
.statusline .face { font-size: 14px; }
.statusline .face .nose { display: none; }
.statusline b { font-weight: 500; }

.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px 32px; }
.points > div { display: flex; flex-direction: column; gap: 6px; }
.points h3::before { content: '❯ '; color: var(--amber); }

/* A conversation as the app shows it. */
.session { background: var(--tube); border: 1px solid var(--rule); max-width: 440px; padding-block: 14px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.session > * { padding-inline: 16px; }
.session .you { display: flex; gap: 10px; font-weight: 500; }
.session .you::before { content: '❯'; color: var(--amber); font-weight: 700; }
.session .tool b { font-weight: 500; }
.session .tool small { display: block; padding-left: 18px; font-size: 12px; color: var(--ghost); }
.session .ask { background: var(--amber); color: var(--tube); padding-block: 14px; display: flex; flex-direction: column; gap: 10px; }
.session .ask b { display: flex; gap: 12px; }
.session .ask .buttons { display: flex; gap: 10px; }
.session .ask .buttons span { padding: 10px 22px; font-weight: 700; border: 1.5px solid var(--tube); }
.session .ask .buttons span:first-child { background: var(--tube); color: var(--amber); flex: 1; text-align: center; }

/* How it fits together: phone, relay and Toto drawn as boxes and lines, and stacked on a narrow screen. */
.map { margin: 0; display: flex; flex-direction: column; gap: 18px; }
.map .grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(48px, 0.6fr) minmax(0, 1fr) minmax(48px, 0.6fr) minmax(0, 1.6fr); align-items: center; }
.node { border: 1px solid var(--rule); background: var(--bezel); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.node h3::before { content: '❯ '; color: var(--amber); }
.node p { font-size: 14px; }
.node.phone { grid-area: 1 / 1 / 3 / 2; align-self: stretch; border-color: var(--amber); }
.node.relay { grid-area: 2 / 3; }
.node.box { grid-area: 1 / 5 / 3 / 6; }
.inside { padding-left: 18px; gap: 10px; font-size: 14px; }
.lane { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; text-align: center; font-size: 12px; color: var(--ghost); }
.lane { position: relative; justify-content: center; }
.lane span { position: absolute; bottom: calc(50% + 4px); left: 6px; right: 6px; }
.lane::after { content: ''; align-self: stretch; border-top: 1px solid var(--ghost); }
.lane.direct { grid-area: 1 / 2 / 2 / 5; color: var(--phosphor); }
.lane.direct::after { border-top-color: var(--phosphor); }
.map figcaption { font-size: 13px; }

.parts { margin: 0; }
.parts dt { font-weight: 700; }
.parts dt::before { content: '❯ '; color: var(--amber); }
.parts dd { margin: 0; }

ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
ol.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4ch 1fr; gap: 12px; max-width: 66ch; }
ol.steps li::before { content: counter(step); color: var(--amber); font-weight: 700; }

/* The one thing on the page to act on. */
.get { display: flex; flex-direction: column; gap: 2px; align-self: flex-start; background: var(--amber); color: var(--tube); padding: 14px 20px; text-decoration: none; }
.get:hover { background: var(--phosphor); }
.get > span { font-size: 13px; }
.note { border-left: 2px solid var(--amber); padding-left: 16px; max-width: 64ch; }
.block { background: var(--bezel); padding: 14px 16px; overflow-x: auto; max-width: 100%; }
.block .c { color: var(--ghost); }
ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; max-width: 64ch; }
table { border-collapse: collapse; }
.scroll { overflow-x: auto; }
th, td { text-align: left; padding: 8px 20px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--ghost); font-weight: 400; }

/* Documentation: the sections down the side on a wide screen, and a menu that folds away on a narrow one. */
.docs header.top, .docs footer, .with-side { max-width: 1000px; margin-inline: auto; }
.with-side { display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 40px; align-items: start; }
.with-side main { margin: 0; }
.contents { position: sticky; top: 24px; margin-top: 56px; }
.contents summary { display: none; }
.contents nav { display: flex; flex-direction: column; gap: 6px; }
.contents a { color: var(--ghost); text-decoration: none; }
.contents a:hover, .contents a[aria-current] { color: var(--phosphor); }
.contents a[aria-current]::before { content: '❯ '; color: var(--amber); }
.doc h2 { scroll-margin-top: 24px; }
@media (max-width: 900px) {
  .with-side { display: block; }
  .contents { top: 0; z-index: 1; margin: 0 -20px; background: var(--bezel); border-bottom: 1px solid var(--rule); }
  .contents summary { display: block; cursor: pointer; padding: 12px 20px; list-style: none; }
  .contents summary::-webkit-details-marker { display: none; }
  .contents summary::before { content: '+ '; color: var(--amber); }
  .contents[open] summary::before { content: '- '; }
  .contents nav { padding: 0 20px 14px; gap: 10px; }
  .doc h2 { scroll-margin-top: 64px; }
}

footer { margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--ghost); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { color: var(--ghost); }

@media (max-width: 860px) {
  .hero, .start { grid-template-columns: minmax(0, 1fr); }
  .map .grid { display: flex; flex-direction: column; align-items: stretch; }
  .lane { flex-direction: row; justify-content: flex-start; text-align: left; margin-left: 24px; padding: 10px 0 10px 16px; border-left: 1px solid var(--ghost); }
  .lane span { position: static; }
  .lane::after, .lane.direct { display: none; }
}
