/* ==========================================================================
   Some1Elsewhere productions (S1E)
   Placeholder site. Vanilla CSS, no build step, no runtime third-party request.

   Design system
   -------------
   Direction  : clean editorial, warm monochrome, light.
   Accent     : none. Ink itself is the accent. The brand device is a printed
                "slug" (filled ink rectangle) around the 1 in Some1Elsewhere.
   Radius lock: 0 everywhere. Sharp, print-like. No exceptions.
   Type       : Archivo (variable wght + wdth) display and UI, JetBrains Mono
                for catalogue metadata. Both self-hosted in /fonts.

   Motion thesis
   -------------
   The world is a printing press; the page is a sheet going through it.
     Focal moment : the hero. The wordmark sets, the slug prints itself, and
                    on scroll the ink plate drifts out of register with the
                    paper "1" while the crop marks pull apart.
     Continuity   : ink wipes left to right, the direction the press travels.
     Depth        : scroll-driven parallax in register layers.
     Feedback     : hover is ink arriving, from the side you came from.
   Parallax and scrub are CSS scroll-driven animations, so they run off the
   main thread. Where unsupported they simply do not run and the page is
   still complete. Nothing here uses a scroll event listener.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Fonts (self-hosted, same-origin only)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Warm monochrome ground */
  --paper: #f4f2ed;
  --paper-lift: #faf9f6;
  --ink: #16150f;
  --ink-2: #34322b;
  --muted: #66635a;
  --hair: rgba(22, 21, 15, 0.12);
  --hair-soft: rgba(22, 21, 15, 0.07);

  /* Type */
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text",
    "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;

  /* Rhythm */
  --pad: clamp(1.25rem, 4.2vw, 3.75rem);
  --maxw: 1180px;
  --sec: clamp(4.5rem, 9vw, 8.5rem);
  --header-h: 68px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Browser surfaces belong to the design too. */
  caret-color: var(--ink);
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 21, 15, 0.26) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(22, 21, 15, 0.22);
  border: 3px solid var(--paper);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(22, 21, 15, 0.38);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

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

.skip {
  position: absolute;
  left: var(--pad);
  top: 0;
  z-index: 40;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: translateY(-120%);
}

.skip:focus-visible {
  transform: translateY(0);
  outline-offset: -4px;
}

/* --------------------------------------------------------------------------
   3. Ambient ground (fixed, pointer-events: none, never on scrolling content)
   -------------------------------------------------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(54vw 48vw at 20% 8%, rgba(148, 126, 98, 0.075), transparent 72%),
    radial-gradient(58vw 52vw at 88% 82%, rgba(118, 116, 104, 0.06), transparent 74%);
  animation: drift 34s var(--ease-in-out) infinite;
  will-change: transform;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-2.5%, 2%, 0) scale(1.08);
  }
}

/* --------------------------------------------------------------------------
   4. The slug - the brand device
   Ink rectangle with the character reversed out of it.
   .slug__reg is the ink plate: it is the layer that can go out of register.
   -------------------------------------------------------------------------- */

.slug {
  position: relative;
  display: inline-block;
  line-height: 0.92;
  padding-inline: 0.155em;
  margin-inline: 0.055em;
  color: var(--paper);
  z-index: 0;
}

.slug__reg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.slug__fill {
  position: absolute;
  inset: 0.071em 0 -0.011em 0;
  background: var(--ink);
  transform-origin: left center;
}

.slug__char {
  position: relative;
}

/* --------------------------------------------------------------------------
   5. Header + press rule
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 242, 237, 0.84);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--hair-soft);
}

.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

/* Travel of the sheet through the press: reading position, drawn as ink
   filling the header's own hairline rather than as a bar of its own. */
.press-rule {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: 1px;
  z-index: 21;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.mark {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  font-variation-settings: "wdth" 94, "wght" 700;
  line-height: 0.92;
  white-space: nowrap;
}

.mark .slug {
  padding-inline: 0.18em;
  margin-inline: 0.05em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.6vw, 1.85rem);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  color: var(--muted);
  padding-block: 0.4rem;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.1rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease-out);
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

@media (hover: hover) and (pointer: fine) {
  .nav a:hover {
    color: var(--ink);
  }
  .nav a:hover::after {
    transform: scaleX(1);
  }
}

/* --------------------------------------------------------------------------
   6. Layout shells
   -------------------------------------------------------------------------- */

.main {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
}

.section {
  padding-block: var(--sec);
  border-top: 1px solid var(--hair);
}

.section--after-hero {
  padding-top: clamp(3.25rem, 6vw, 5rem);
}

.page-head {
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(2.5rem, 5vw, 4rem);
}

.page-head__lead {
  margin-top: clamp(1.15rem, 2.4vw, 1.75rem);
}

.prose {
  max-width: 68ch;
}

.prose__lead {
  max-width: 30ch;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
  padding-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
  border-bottom: 1px solid var(--hair);
}

@media (min-width: 1000px) {
  .prose {
    padding-left: 12%;
  }
}

/* --------------------------------------------------------------------------
   7. Typography scale
   -------------------------------------------------------------------------- */

.wordmark {
  font-weight: 620;
  font-variation-settings: "wdth" 92, "wght" 620;
  /* Low floor on purpose: the mark must never clip inside .hero__mask. */
  font-size: clamp(2.1rem, 11vw, 8.8rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.h-display {
  font-weight: 600;
  font-variation-settings: "wdth" 96, "wght" 600;
  font-size: clamp(2.1rem, 6.4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.h-mid {
  font-weight: 600;
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.026em;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.2rem, 2.3vw, 1.6rem);
  line-height: 1.42;
  letter-spacing: -0.016em;
  max-width: 30ch;
}

.body {
  max-width: 60ch;
  color: var(--ink-2);
}

.body + .body {
  margin-top: 1.15rem;
}

.meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   8. Buttons and links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.05rem 0.95rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  /* --mx/--my are written by the magnetic pointer handler in script.js */
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: background-color 0.2s ease, transform 0.45s var(--ease-out);
}

.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  background: rgba(244, 242, 237, 0.14);
  transition: transform 0.24s var(--ease-out), background-color 0.2s ease;
}

.btn:active {
  transition-duration: 0.12s;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(0.985);
}

@media (hover: hover) and (pointer: fine) {
  /* While the pointer is inside, the button tracks it: shorter transition so
     it feels attached rather than trailing. */
  .btn.is-magnetic {
    transition-duration: 0.12s;
  }
  .btn:hover {
    background: var(--ink-2);
  }
  .btn:hover .btn__icon {
    background: rgba(244, 242, 237, 0.24);
    transform: translate3d(2px, -2px, 0);
  }
}

/* Secondary: a text link that inks its rule in from the left on hover. */
.link-more {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.4rem;
  font-size: 0.95rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.link-more::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(1);
  transform-origin: right center;
  transition: transform 0.4s var(--ease-out);
}

.link-more svg {
  transition: transform 0.3s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .link-more:hover::after {
    transform: scaleX(0);
  }
  .link-more:hover svg {
    transform: translate3d(3px, -3px, 0);
  }
}

.link {
  position: relative;
  display: inline-block;
  font-weight: 550;
  letter-spacing: -0.01em;
  padding-bottom: 2px;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left center;
  transition: transform 0.28s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .link::after {
    transform: scaleX(0.999);
  }
  .link:hover::after {
    transform: scaleX(0);
    transform-origin: right center;
  }
}

/* --------------------------------------------------------------------------
   9. Home - hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: calc(100dvh - var(--header-h));
  display: grid;
  align-content: end;
  padding-block: clamp(5rem, 16vw, 11rem) clamp(2.75rem, 6vw, 4.5rem);
}

.hero__wrap {
  position: relative;
}

.hero__mask {
  overflow: hidden;
  padding-block: 0.14em 0.1em;
  margin-block: -0.14em -0.1em;
}

.hero__tagline {
  margin-top: clamp(1.4rem, 3.2vw, 2.4rem);
}

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin-top: clamp(2.5rem, 6vw, 4.25rem);
  padding-top: 1.35rem;
  border-top: 1px solid var(--hair);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

/* Registration marks. Printer's crop marks, and the layer that shows the
   sheet moving: they pull apart as the hero scrolls. */
.reg {
  position: absolute;
  width: 28px;
  height: 28px;
  color: var(--muted);
  opacity: 0.78;
  overflow: visible;
}

.reg--tl {
  left: var(--pad);
  top: clamp(-4.5rem, -6vw, -2.75rem);
}

.reg--br {
  right: var(--pad);
  bottom: clamp(-4.5rem, -6vw, -2.75rem);
}

.reg .rl {
  stroke: currentColor;
  fill: none;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* --------------------------------------------------------------------------
   10. Home - index rows
   -------------------------------------------------------------------------- */

.index-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.5rem 2rem;
  padding-block: clamp(1.6rem, 3.6vw, 2.5rem);
  border-top: 1px solid var(--hair-soft);
}

.index-row:first-child {
  border-top: 0;
}

/* Ink arrives from the side the pointer entered. --o is set in script.js. */
.index-row__rule {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: var(--o, left) center;
  transition: transform 0.5s var(--ease-out);
}

.index-row__label {
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
  transition: transform 0.45s var(--ease-out);
}

.index-row--lead {
  padding-block: clamp(2.1rem, 4.6vw, 3.25rem);
}

.index-row--lead .index-row__label {
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  letter-spacing: -0.04em;
  font-variation-settings: "wdth" 96;
}

.index-row__note {
  grid-column: 1 / -1;
  max-width: 46ch;
  color: var(--muted);
  font-size: 0.975rem;
  margin-top: 0.4rem;
  transition: transform 0.45s var(--ease-out) 40ms, color 0.3s ease;
}

.index-row__arrow {
  align-self: center;
  display: inline-flex;
  color: var(--muted);
  transition: transform 0.4s var(--ease-out), color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .index-row:hover .index-row__rule {
    transform: scaleX(1);
  }
  .index-row:hover .index-row__label,
  .index-row:hover .index-row__note {
    transform: translate3d(10px, 0, 0);
  }
  .index-row:hover .index-row__note {
    color: var(--ink-2);
  }
  .index-row:hover .index-row__arrow {
    transform: translate3d(6px, -6px, 0);
    color: var(--ink);
  }
}

/* --------------------------------------------------------------------------
   11. Releases - sleeves
   -------------------------------------------------------------------------- */

.slots {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: clamp(1.5rem, 3.4vw, 3rem);
  align-items: start;
}

.slot__cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--paper-lift);
  border: 1px solid var(--hair);
  display: grid;
  place-items: center;
  overflow: hidden;
  --rule-a: 0.055;
  --lift: 0;
}

/* Fine diagonal ruling: an unprinted sleeve, with real surface and no image. */
.slot__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(22, 21, 15, var(--rule-a)) 0 1px,
    transparent 1px 9px
  );
  transition: background-image 0.45s ease;
}

.slot__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(38% 26% at 50% 50%, rgba(250, 249, 246, 0.94), transparent 72%);
}

/* The ink roller passing across the sheet. */
.sweep {
  position: absolute;
  inset: -10% -30%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    102deg,
    transparent 40%,
    rgba(22, 21, 15, 0.09) 50%,
    transparent 60%
  );
  transform: translate3d(-32%, 0, 0);
  transition: transform 0.95s var(--ease-out), opacity 0.35s ease;
}

.slot__glyph {
  position: relative;
  z-index: 3;
  font-weight: 700;
  font-variation-settings: "wdth" 94, "wght" 700;
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--ink);
  opacity: 0.58;
  transition: opacity 0.4s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .slot:hover .slot__cover {
    --rule-a: 0.1;
  }
  .slot:hover .slot__glyph {
    opacity: 0.92;
  }
  .slot:hover .sweep {
    opacity: 1;
    transform: translate3d(32%, 0, 0);
  }
  .slot:hover .redact {
    transform: scaleX(1.03);
  }
}

.slot__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 1.1rem;
  font-variant-numeric: tabular-nums;
}

/* Unnamed things print as a bar. Same device as the slug. */
.redact {
  display: block;
  height: clamp(1.15rem, 2.4vw, 1.55rem);
  margin-top: 0.85rem;
  background: rgba(22, 21, 15, 0.1);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(22, 21, 15, 0.06) 0 5px,
    transparent 5px 10px
  );
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out);
}

/* Empty link slots. Square outline chips read as "a link goes here", and stay
   at full --muted contrast rather than being faded below AA. */
.slot__services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.95rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.slot__services li {
  padding: 0.3rem 0.5rem;
  border: 1px dashed var(--hair);
  line-height: 1;
}

/* --------------------------------------------------------------------------
   12. Contact
   -------------------------------------------------------------------------- */

.mailto {
  display: inline-block;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  font-variation-settings: "wdth" 94, "wght" 600;
  font-size: clamp(1.45rem, 5.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.034em;
  overflow-wrap: anywhere;
  border-bottom: 2px solid var(--hair);
  padding-bottom: 0.12em;
  transition: border-color 0.24s ease;
}

@media (hover: hover) and (pointer: fine) {
  .mailto:hover {
    border-color: var(--ink);
  }
}

.note {
  margin-top: clamp(2.5rem, 5.5vw, 4rem);
  color: var(--muted);
  max-width: 52ch;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   13. 404
   -------------------------------------------------------------------------- */

.notfound {
  min-height: calc(100dvh - var(--header-h));
  display: grid;
  align-content: center;
  padding-block: clamp(4rem, 12vw, 8rem);
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  border-top: 1px solid var(--hair);
  padding-block: clamp(2.25rem, 4.5vw, 3.25rem);
}

.site-footer__in {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2.5rem;
}

.site-footer__legal {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.site-footer__mail {
  font-size: 0.95rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   15. Entrance choreography
   Gated on .js so the page is fully readable without JavaScript.
   -------------------------------------------------------------------------- */

.js .wordmark {
  transform: translateY(132%);
  transition: transform 0.95s var(--ease-out) 60ms;
}

.js.is-ready .wordmark {
  transform: none;
}

/* The hero slug prints itself a beat after the letters land. That delay is the
   whole point of the move: it shows the mark being set. */
.js .slug__fill {
  transform: scaleX(0);
  transition: transform 0.7s var(--ease-out) 780ms;
}

.js.is-ready .slug__fill {
  transform: none;
}

/* Every other instance of the mark is seen on every single page load, so it
   does not animate at all. */
.js .site-header .slug__fill,
.js .site-footer .slug__fill,
.js .slot__cover .slug__fill {
  transform: none;
  transition: none;
}

/* Crop marks draw themselves in. */
.js .reg .rl {
  stroke-dashoffset: 1;
  stroke-dasharray: 1;
  transition: stroke-dashoffset 1.1s var(--ease-out) var(--d, 900ms);
}

.js.is-ready .reg .rl {
  stroke-dashoffset: 0;
}

.js [data-rise] {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 0.7s var(--ease-out) var(--d, 0ms),
    transform 0.7s var(--ease-out) var(--d, 0ms);
}

.js.is-ready [data-rise] {
  opacity: 1;
  transform: none;
}

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.65s var(--ease-out) var(--d, 0ms),
    transform 0.65s var(--ease-out) var(--d, 0ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Printed elements arrive the way a press lays ink down: left to right.
   Driven by the same observer as [data-reveal], so above-the-fold headings
   ink in at load and below-the-fold ones ink in when they are reached. */
.js [data-ink] {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.85s var(--ease-out) var(--d, 0ms);
}

.js [data-ink].is-in {
  clip-path: inset(0 0 0 0);
}

/* --------------------------------------------------------------------------
   16. Scroll-driven motion (off the main thread; enhancement only)
   -------------------------------------------------------------------------- */

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Hero register layers. Larger --px means the layer lags further behind
       the scroll, so it reads as further away. */
    .px {
      animation-name: px-lag;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
      animation-range: 0 100vh;
      will-change: transform;
    }

    @keyframes px-lag {
      to {
        transform: translate3d(0, var(--px, 0), 0);
      }
    }

    /* The focal moment: the ink plate drifts out of register with the paper
       "1" as the sheet travels, and re-registers when you scroll back. */
    .hero .slug__reg {
      animation-name: dereg;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
      animation-range: 0 70vh;
      will-change: transform;
    }

    @keyframes dereg {
      to {
        transform: translate3d(0.075em, -0.05em, 0);
      }
    }

    /* Crop marks pull apart: the sheet is moving under them. */
    .reg--tl {
      animation-name: reg-tl;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
      animation-range: 0 80vh;
    }

    .reg--br {
      animation-name: reg-br;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
      animation-range: 0 80vh;
    }

    @keyframes reg-tl {
      to {
        transform: translate3d(-14px, -22px, 0);
        opacity: 0;
      }
    }

    @keyframes reg-br {
      to {
        transform: translate3d(14px, 22px, 0);
        opacity: 0;
      }
    }

    /* Reading position. */
    .press-rule {
      animation-name: press-travel;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
    }

    @keyframes press-travel {
      to {
        transform: scaleX(1);
      }
    }
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Sleeves slide against their own captions at three different depths, so
       the three sheets pass each other like a stack being fanned. */
    .slot__cover {
      animation-name: sheet;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
      will-change: transform;
    }

    @keyframes sheet {
      from {
        transform: translate3d(0, var(--sheet, 20px), 0);
      }
      to {
        transform: translate3d(0, calc(var(--sheet, 20px) * -1), 0);
      }
    }

    /* Body copy lags its own heading very slightly: the same out-of-register
       idea, at a whisper. */
    .drift {
      animation-name: copy-lag;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }

    @keyframes copy-lag {
      from {
        transform: translate3d(0, 8px, 0);
      }
      to {
        transform: translate3d(0, -8px, 0);
      }
    }
  }
}

/* --------------------------------------------------------------------------
   17. Cross-document view transitions
   The mark holds still while the page changes around it.
   -------------------------------------------------------------------------- */

@view-transition {
  navigation: auto;
}

.site-header .mark {
  view-transition-name: s1e-mark;
}

::view-transition-old(root) {
  animation: vt-out 0.24s var(--ease-out) both;
}

::view-transition-new(root) {
  animation: vt-in 0.42s var(--ease-out) both;
}

@keyframes vt-out {
  to {
    opacity: 0;
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
}

/* --------------------------------------------------------------------------
   18. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .slots {
    grid-template-columns: 1fr 1fr;
  }
  .slot:first-child {
    grid-column: 1 / -1;
    max-width: 62%;
  }
}

@media (max-width: 620px) {
  :root {
    --header-h: 60px;
  }

  .nav {
    gap: 0.85rem;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .site-header__in {
    gap: 0.75rem;
  }

  /* Single column, stepped in and down so three empty sleeves read as a
     descending sequence instead of three identical voids. */
  .slots {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .slot:first-child {
    max-width: 90%;
  }

  .slot:nth-child(2) {
    max-width: 74%;
    margin-left: auto;
  }

  .slot:nth-child(3) {
    max-width: 60%;
  }

  .index-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  /* A full-viewport hero on a phone is mostly empty air. Cap it so the first
     index row is already visible at the fold. */
  .hero {
    min-height: min(calc(100dvh - var(--header-h)), 28rem);
    align-content: center;
    padding-block: 4rem 2.5rem;
  }

  .hero__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .site-footer__in {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

  .lead {
    max-width: none;
  }

  /* Crop marks would collide with the copy at phone width. */
  .reg {
    display: none;
  }
}

@media (max-width: 400px) {
  .nav {
    gap: 0.7rem;
    font-size: 0.645rem;
  }
  .mark {
    font-size: 0.95rem;
  }
}

/* --------------------------------------------------------------------------
   19. Reduced motion - fewer and gentler, not zero
   Position, parallax and register drift are removed. Ink, colour and state
   feedback stay, because they carry meaning.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ambient {
    animation: none;
  }

  .js .wordmark,
  .js .slug__fill,
  .js [data-rise],
  .js [data-reveal],
  .js [data-ink],
  .js .reg .rl {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    stroke-dashoffset: 0 !important;
    transition-duration: 0.01ms !important;
  }

  .px,
  .hero .slug__reg,
  .reg--tl,
  .reg--br,
  .slot__cover,
  .drift {
    animation: none !important;
    transform: none !important;
  }

  /* The reading position still updates, it just does not animate. */
  .press-rule {
    display: none;
  }

  .btn,
  .btn__icon,
  .index-row__label,
  .index-row__note,
  .index-row__arrow,
  .index-row__rule,
  .nav a::after,
  .link::after,
  .link-more::after,
  .link-more svg,
  .sweep,
  .redact,
  .slot__glyph {
    transition-duration: 0.01ms !important;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
