* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(31, 25, 20, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(31, 25, 20, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 72px 72px, 72px 72px, auto;
  font-family: var(--sans);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 22% 12%, rgba(200, 75, 27, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(116, 82, 48, 0.08));
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
}

main {
  position: relative;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(115deg, rgba(31, 25, 20, 0.04) 25%, transparent 25%),
    linear-gradient(245deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%);
  background-size: 6px 6px;
  mix-blend-mode: multiply;
}

.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  width: var(--rail);
  border-right: 1px solid var(--line);
  background: rgba(239, 228, 207, 0.45);
  backdrop-filter: blur(10px);
}

.rail span {
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid var(--ink);
  transform: translateX(-50%) rotate(45deg);
}

.rail span:nth-child(1) {
  top: 18%;
}

.rail span:nth-child(2) {
  top: 50%;
}

.rail span:nth-child(3) {
  top: 82%;
}

.cross {
  position: fixed;
  z-index: 6;
  width: 34px;
  height: 34px;
  pointer-events: none;
}

.cross::before,
.cross::after {
  position: absolute;
  background: var(--ink);
  content: "";
}

.cross::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.cross::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
}

.cross--tr {
  top: 28px;
  right: 28px;
}

.cross--bl {
  bottom: 28px;
  left: 82px;
}

.cross--br {
  right: 28px;
  bottom: 28px;
}

.section {
  position: relative;
  width: min(var(--max), calc(100vw - var(--rail) - 48px));
  margin-left: calc(var(--rail) + max(24px, (100vw - var(--rail) - var(--max)) / 2));
  padding: 116px 0;
  overflow-wrap: anywhere;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.site-nav {
  position: fixed;
  top: 18px;
  left: calc(var(--rail) + 24px);
  right: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(31, 25, 20, 0.14);
  background: rgba(239, 228, 207, 0.58);
  backdrop-filter: blur(16px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.site-nav.is-scrolled {
  border-color: rgba(31, 25, 20, 0.28);
  background: rgba(239, 228, 207, 0.84);
  transform: translateY(-4px);
}

.nav-brand {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
  content: "";
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--orange);
  color: var(--paper);
  border-color: var(--orange);
}

.text-link {
  display: inline-flex;
  width: fit-content;
  border-bottom: 1px solid var(--orange);
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms ease, transform 700ms ease;
}

.noscript {
  margin-left: var(--rail);
  padding: 24px;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
