/* ==========================================================================
   tokens.css — design tokens, reset, base type, shared primitives
   ========================================================================== */

:root {
  /* palette */
  --paper: #F6F6F2;
  --night: #0E0E0C;
  --surface: #FFFFFF;
  --ink: #1A1A18;
  --ink-2: #6F6F6A;
  --ink-3: #9A9A93;
  --line: #E7E7E1;
  --line-2: #DCDCD4;
  --lime: #C8F31D;
  --lime-ink: #7FA000; /* lime that still passes contrast on paper */

  /* type */
  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --latin: "Fraunces", "Noto Serif SC", Georgia, serif;

  /* metrics */
  --pad: clamp(20px, 3.6vw, 56px);
  --maxw: 1560px;
  --nav-h: 74px;
  --radius: 0px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.9;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--lime); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.on-dark :focus-visible { outline-color: var(--lime); }

/* ---------- film grain ---------- */
.grain::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- type primitives ---------- */
.mono {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .19em;
  text-transform: uppercase;
  line-height: 1.5;
}
.lat {
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: .15em;
  font-weight: 400;
  font-variant-numeric: lining-nums;
}
.serif { font-family: var(--serif); }

.display {
  font-family: var(--serif);
  font-weight: 600;
  line-height: .93;
  letter-spacing: -.032em;
}

/* ---------- layout helpers ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.rule { height: 1px; background: var(--line); border: 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 16px;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -.012em;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.section-head h2 em {
  font-family: var(--latin);
  font-style: italic;
  font-weight: 300;
  font-size: 12.5px;
  letter-spacing: .14em;
  color: var(--ink-2);
  text-transform: uppercase;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .13em;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color .35s var(--ease);
}
.btn > * { position: relative; z-index: 1; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--lime);
  transform: translateY(101%);
  transition: transform .45s var(--ease);
}
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: translateY(0); }
.btn svg { width: 14px; height: 14px; }

.link-u {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  letter-spacing: .08em;
  position: relative;
  padding-bottom: 4px;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size .45s var(--ease);
}
.link-u:hover { background-size: 100% 1px; }
.link-u svg { width: 13px; height: 13px; }

/* lime tick used for list markers */
.tick {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--lime);
  flex: 0 0 auto;
}

/* ---------- scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
/* mask-reveal for media */
[data-unveil] {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-unveil].is-in { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-unveil] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

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

.skip-link {
  position: fixed;
  left: 12px; top: -60px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: .1em;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 12px; }
