/* tokens
   paper: #F3EFE2   ink: #1C1A16   muted/illegible: #9C957F   glass tint: rgba(176,199,183,.5)
   rim: #23231F   accent: #CCFF00 (chain neon - scrawl mark + copied flash only)
   type: Libre Bodoni (headline + clauses) / IBM Plex Mono (CA value, real case, always monospace)
   spacing scale: 8 / 16 / 24 / 32 / 48px
   corner radius: 0 everywhere except the lens itself, which is a literal glass circle
   motion: the lens tracks the pointer, nothing else moves except the scrawl drawing in once on load
*/

@font-face {
  font-family: "Libre Bodoni";
  src: url("assets/fonts/libre-bodoni-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Libre Bodoni";
  src: url("assets/fonts/libre-bodoni-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #f3efe2;
  color: #1c1a16;
  font-family: "Libre Bodoni", Georgia, serif;
}

body {
  cursor: none;
}

.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.tag {
  position: absolute;
  top: 20px;
  left: 24px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(28, 26, 22, 0.55);
}

.doc {
  position: relative;
  width: min(560px, 92vw);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5.4vh, 42px);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
}

.lede {
  margin: 0 0 28px;
  text-align: center;
  font-size: clamp(14px, 2.1vh, 17px);
  color: rgba(28, 26, 22, 0.75);
  font-style: italic;
}

.clauses {
  margin: 0 0 24px;
  padding-left: 22px;
  font-size: clamp(15px, 2.2vh, 18px);
  line-height: 1.55;
}

.clauses li + li {
  margin-top: 10px;
}

.footnote {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(28, 26, 22, 0.55);
}

.buried {
  position: relative;
  display: inline-block;
}

.buried .ghost,
.buried .clear {
  font: inherit;
}

li.buried {
  display: list-item;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: rgba(28, 26, 22, 0.4);
}

li.buried .ghost {
  filter: blur(1.3px);
  color: #9c957f;
}

li.buried .clear {
  position: absolute;
  inset: 0;
  color: #1c1a16;
  white-space: nowrap;
  clip-path: circle(56px at var(--lx, -999px) var(--ly, -999px));
}

.buried-ca {
  margin-left: 2px;
  vertical-align: baseline;
}

.buried-ca .ghost,
.buried-ca .clear {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  padding: 3px 2px;
}

.buried-ca .ghost {
  filter: blur(1.3px);
  color: #9c957f;
}

.buried-ca .clear {
  appearance: none;
  border: none;
  background: none;
  position: absolute;
  inset: 0;
  color: #1c1a16;
  cursor: pointer;
  clip-path: circle(56px at var(--lx, -999px) var(--ly, -999px));
}

.buried-ca .clear:focus-visible {
  clip-path: none;
  outline: 1px solid #4a5f14;
  outline-offset: 2px;
}

.buried-ca .clear:hover {
  color: #4a5f14;
}

.scrawl {
  position: absolute;
  width: 190px;
  height: auto;
  right: -34px;
  bottom: -30px;
  pointer-events: none;
}

.scrawl path {
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw 900ms ease-out 400ms forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.lens {
  position: fixed;
  top: 0;
  left: 0;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid #23231f;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.35), rgba(176, 199, 183, 0.42) 55%, rgba(120, 140, 128, 0.35));
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
  z-index: 5;
}

.lens::after {
  /* ручка висела в воздухе: начиналась на 46px НИЖЕ стекла и крутилась не в ту сторону
     (владелец, 10.09.2026). Теперь начинается на самом ободке в нижней правой точке
     под 45 градусами и уходит от стекла наружу. */
  content: "";
  position: absolute;
  width: 12px;
  height: 68px;
  background: #3a2418;
  left: 114px;
  top: 118px;
  border-radius: 0 0 4px 4px;
  transform: rotate(-45deg);
  transform-origin: top center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}

.chrome {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(28, 26, 22, 0.5);
  flex-wrap: wrap;
  padding: 0 16px;
  text-align: center;
}

.chrome a {
  color: rgba(28, 26, 22, 0.7);
  text-decoration: none;
}

.chrome a:hover,
.chrome a:focus-visible {
  text-decoration: underline;
}

.chrome .sep {
  color: rgba(28, 26, 22, 0.3);
}

@media (max-width: 480px) {
  .page { padding: 24px 18px 56px; }
  .scrawl { width: 150px; right: -18px; bottom: -22px; }
  .chrome .network { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .lens { transition: none; }
  .scrawl path { animation: none; stroke-dashoffset: 0; }
}
