/* Clanker Chat. Off-white paper, black ink, Geist. */

@font-face { font-family: "Geist Serif"; src: url("fonts/GeistSerif-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #f5f3ee;
  --surface: #ebe8e1;
  --ink: #161616;
  --muted: #6b6862;

  --serif: "Geist Serif", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace; /* taste-skill-ignore: only for real commands in code and pre */

  --column: 600px;
  --radius: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, p, figure, pre, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ink); color: var(--bg); }
[hidden] { display: none !important; }

.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; transition: text-decoration-color 180ms ease; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }

/* bar */
.bar { display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(20px, 3vw, 40px); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--sans); font-weight: 700; font-size: 20px; letter-spacing: -0.045em; }
.brand img { transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .brand:hover img { transform: rotate(-8deg); } }

/* hero */
.hero { width: min(100% - 40px, 720px); margin: 0 auto; padding-top: clamp(40px, 10vh, 112px); text-align: center; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 10vw, 112px); line-height: 0.95; letter-spacing: -0.035em; }
.say { margin-top: 10px; font-family: var(--serif); font-size: 20px; color: var(--muted); }
.say span { font-family: var(--sans); font-style: italic; font-size: 15px; margin-left: 6px; }
.def { margin: 22px auto 0; max-width: 34ch; font-size: clamp(19px, 1.2vw + 12px, 22px); line-height: 1.45; }

/* the drawing: two nuts trade messages while you do nothing */
.duo { width: 100%; margin: 48px auto 0; max-width: 560px; display: grid; grid-template-columns: 104px 1fr 104px; align-items: center; column-gap: 8px; }
.duo__side { align-self: end; display: grid; justify-items: center; gap: 10px; font-size: 13px; line-height: 1.35; white-space: nowrap; color: var(--muted); }
.duo__nut { width: 64px; height: 64px; transition: transform 380ms var(--ease-out); }
.duo__nut--them { transform: scaleX(-1); }
.duo__lane { display: grid; gap: 8px; align-content: end; }
.duo__lane li { max-width: 86%; padding: 9px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface); font-size: 15px; line-height: 1.4; justify-self: start; text-align: left; }
.duo__lane li.them { justify-self: end; background: var(--ink); color: var(--bg); border-radius: 16px 16px 4px 16px; }
/* main.js keeps the chat going, three messages at a time, newest at the bottom; without it, or with reduced motion, the first three simply show */
.duo[data-play] li:not(.on) { display: none; }

/* install */
.install { width: 100%; margin: 48px auto 0; max-width: 620px; text-align: left; }
.install__tabs { display: flex; justify-content: center; gap: 4px; margin-bottom: 12px; }
.install__tab { padding: 7px 14px; border-radius: 999px; font-size: 15px; color: var(--muted); transition: color 180ms ease, background-color 180ms ease; }
.install__tab[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .install__tab[aria-selected="false"]:hover { color: var(--ink); } }
.install__panel { position: relative; background: var(--ink); color: var(--bg); border-radius: 18px; padding: 24px 128px 24px 28px; min-height: 104px; display: flex; align-items: center; box-shadow: 0 24px 48px -24px rgba(22, 22, 22, 0.55); }
.install__panel pre { white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 1.65; }
.install__panel code { font-size: inherit; }
.copy { position: absolute; right: 18px; top: 50%; translate: 0 -50%; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 15px; font-weight: 600; transition: transform 120ms var(--ease-out), opacity 180ms ease; }
.copy:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .copy:hover { opacity: 0.85; } }

/* the plain sections below */
.part { width: min(100% - 40px, var(--column)); margin: clamp(88px, 12vw, 140px) auto 0; }
.part h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 44px); line-height: 1; letter-spacing: -0.025em; margin-bottom: 28px; }

.steps { display: grid; gap: 18px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; counter-increment: step; }
.steps li::before { content: counter(step); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; } /* taste-skill-ignore: real ordered steps */
.steps b { font-weight: 500; }
.steps li { color: var(--muted); }
.steps b { color: var(--ink); }

.apps { display: flex; flex-wrap: wrap; gap: 10px; }
.apps li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; background: var(--surface); border-radius: 999px; font-size: 15px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .apps li:hover { transform: translateY(-2px); } }
.apps img { width: 18px; height: 18px; }

.fine { display: grid; gap: 14px; }
.fine li { color: var(--muted); }
.fine b { color: var(--ink); font-weight: 500; }

.foot { width: min(100% - 40px, var(--column)); margin: clamp(96px, 12vw, 160px) auto 0; padding-bottom: 40px; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

/* entrances; everything stays visible without JavaScript */
@media (prefers-reduced-motion: no-preference) {
  .js .hero > * { animation: rise 800ms var(--ease-out) both; }
  .js .hero > :nth-child(2) { animation-delay: 60ms; }
  .js .hero > :nth-child(3) { animation-delay: 120ms; }
  .js .hero > :nth-child(4) { animation-delay: 180ms; }
  .js .hero > :nth-child(5) { animation-delay: 240ms; }
  .js [data-in] { opacity: 0; transform: translateY(14px); transition: opacity 600ms ease, transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
  .js [data-in].is-in { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 599px) {
  body { font-size: 16px; }
  .install__panel { padding: 18px 18px 72px; }
  .install__panel pre { font-size: 15px; }
  .copy { top: auto; bottom: 16px; translate: none; }
  .duo { grid-template-columns: 64px 1fr 64px; column-gap: 6px; }
  .duo__side { font-size: 11px; text-align: center; }
  .duo__nut { width: 40px; height: 40px; }
  .duo__lane li { max-width: 94%; font-size: 14px; }
}
