/* Fonts, tokens, base elements and buttons shared by every page */
@font-face {
  font-family: "Mona Sans";
  src: url("fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --ground: #0c070b;
  --raised: #170e15;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #fff6f4;
  --text-2: rgba(255, 240, 238, 0.78);
  --text-3: rgba(255, 236, 234, 0.54);
  --glass: rgba(26, 13, 22, 0.5);
  --glass-solid: rgba(24, 12, 20, 0.88);
  --glass-blur: blur(30px) saturate(180%);
  --window-shadow: 0 40px 90px -36px rgba(0, 0, 0, 0.8);
  --window-edge: inset 0 0 0 1px rgba(255, 200, 210, 0.16), inset 0 1px 0 rgba(255, 225, 230, 0.28);
  --window-radius: 22px;
  --depth: 1500px;
  --accent: #ff6b7d;
  --accent-soft: rgba(255, 107, 125, 0.32);
  --peach: #ffb089;
  --cream: #fff4f1;
  --plum: #3a0a1c;
  --jelly-flow: linear-gradient(100deg, #ffc29a, #ff5b6b, #e0304f, #ff8fb0, #ff5b6b, #ffc29a);

  --sans: "Mona Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --page: 1240px;
  --margin: clamp(20px, 4vw, 48px);
  --bar: 60px;
  --columns-gap: clamp(40px, 5vw, 88px);
  --chapter-space: clamp(88px, 10vw, 150px);
  --radius: 12px;
  --radius-small: 8px;
  --clip-gap: clamp(20px, 2.4vw, 32px);
  --feature-space: clamp(56px, 8vw, 120px);
  --phone: 300px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --horse: clamp(100px, 9.5vw, 130px);
  --stride: 0.9s;
  --slide: 450ms;
  --reveal: 800ms;
}

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

html {
  background: var(--ground);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + 24px);
  scrollbar-color: var(--line-strong) var(--ground);
  scrollbar-width: thin;
  caret-color: var(--accent);
  /* No rubber-band bounce at the ends, so the top bar stays at the top. */
  overscroll-behavior-y: none;
}

html,
body { overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
}

::selection { background: var(--accent-soft); color: var(--text); }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

code {
  font-family: var(--mono);
  font-size: 0.84em;
  letter-spacing: -0.01em;
  color: var(--text);
}

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

.skip {
  position: absolute;
  left: var(--margin);
  top: -100px;
  z-index: 20;
  background: var(--text);
  color: var(--ground);
  padding: 10px 14px;
  border-radius: var(--radius-small);
}
.skip:focus { top: 10px; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.78em 1.2em;
  border-radius: 999px;
  background: var(--cream);
  color: var(--plum);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 200ms var(--ease);
}
.button:hover { background: #ffffff; }
.button--small { padding: 0.55em 1em; font-size: 0.85rem; }
.button--glass {
  background: rgba(255, 244, 241, 0.08);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 228, 0.32);
}
.button--glass:hover { background: rgba(255, 244, 241, 0.16); }
.button--pending {
  background: rgba(255, 244, 241, 0.08);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 228, 0.32);
  cursor: default;
}
.button--pending:hover { background: rgba(255, 244, 241, 0.08); }

/* Command: a copy-paste shell line on glass with its copy button */
.command__label {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 620;
  letter-spacing: -0.015em;
}
.command__line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  border-radius: var(--radius);
  background: var(--glass-solid);
  box-shadow: var(--window-edge);
}
.command { min-width: 0; }
.command__line code {
  flex: 1;
  min-width: 0;
  padding-block: 6px;
  font-size: clamp(0.78rem, 1vw, 0.86rem);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.command__copy {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.45em;
  padding: 0.5em 0.85em;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 244, 241, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 228, 0.32);
  color: var(--text);
  font: 600 0.82rem/1.2 var(--sans);
  cursor: pointer;
  transition: background-color 200ms var(--ease);
}
.command__copy:hover { background: rgba(255, 244, 241, 0.16); }
.command__copy svg { width: 1.05em; height: 1.05em; }
.command__copy .command__done { display: none; }
.command__copy.is-copied .command__done { display: block; }
.command__copy.is-copied .command__icon { display: none; }
