/* ==========================================================================
   base — reset, type primitives, the rule
   ========================================================================== */

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

html, body { margin: 0; padding: 0; }

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  font-weight: 400;
  font-variation-settings: "wdth" 100, "wght" 400;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, p, figure, blockquote, pre { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, video, canvas, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--blue); color: var(--paper); }

/* ── type primitives ───────────────────────────────────────────────────── */

.meta {
  font-family: var(--f-mono);
  font-size: var(--t-meta);
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--ink-3);
}

.tnum { font-variant-numeric: tabular-nums; }

.lead {
  font-size: var(--t-lead);
  line-height: 1.38;
  font-variation-settings: "wdth" 96, "wght" 380;
  color: var(--ink-2);
}

/* Devanagari runs a touch larger than Latin at the same nominal size — its
   x-height equivalent sits lower and the shirorekha eats the top. */
[lang="hi"], .deva { font-family: var(--f-deva); font-size: 1.06em; }

.sep { color: var(--blue); margin: 0 0.7em; }

/* ── the rule ──────────────────────────────────────────────────────────────
   The site's one graphic device: a hairline that things hang from. It is
   always drawn by scaling X from the left, never by animating width, so it
   never lays anything out.
   ------------------------------------------------------------------------ */

.rule {
  display: block;
  height: var(--rule);
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.rule.is-drawn { transform: scaleX(1); }

/* ── split text ────────────────────────────────────────────────────────── */

.sp-line { display: block; overflow: hidden; }
.sp-w, .sp-c { display: inline-block; will-change: transform; }

/* Per-character spans in the hero. `will-change: font-variation-settings` is
   deliberately NOT set: it is not a compositable property, the hint buys
   nothing, and on a long headline it just tells the browser to keep dozens of
   extra layers alive. */
.ax { display: inline-block; }

/* ── paper ─────────────────────────────────────────────────────────────────
   A fibre texture at very low opacity. The site is about print; a flat
   #f0efe9 field reads as a screen colour, and a little grain in the paper is
   what stops it.
   ------------------------------------------------------------------------ */

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='0.28'/></svg>");
}

/* ── accessibility ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

.skip {
  position: absolute;
  top: 0.6rem; left: 0.6rem;
  z-index: 500;
  padding: 0.6rem 1rem;
  background: var(--blue);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: var(--t-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateY(-180%);
  transition: transform 0.3s var(--ease);
}

.skip:focus-visible { transform: translateY(0); }

.dot {
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 0.6em;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: 0.1em;
}
