/* ---------- Eshver universe — shared base ---------- */

:root {
  --paper:        #f3f0e7;
  --paper-warm:   #ece5d6;
  --ink:          #0e0e0e;
  --ink-soft:     #1a1a1a;
  --mute:         #6b6a64;
  --rule:         #d8d3c5;

  --ease-out:     cubic-bezier(.22,1,.36,1);
  --ease-in-out:  cubic-bezier(.65,0,.35,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; }
body {
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
  background: var(--paper);
  line-height: 1.4;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

::selection { background: #0e0e0e; color: #f3f0e7; }

/* ---------- type ---------- */
.serif { font-family: "Instrument Serif", "Cormorant Garamond", Georgia, serif; font-feature-settings: "ss01"; }
.mono  { font-family: "JetBrains Mono", ui-monospace, monospace; }

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  padding: 22px 32px;
  display: flex; align-items: center; justify-content: space-between;
  mix-blend-mode: difference;
  color: #fff;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-logo {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo .glyph {
  width: 18px; height: 18px;
  border: 1px solid currentColor;
  position: relative;
}
.nav-logo .glyph::after {
  content: ""; position: absolute; inset: 3px; background: currentColor;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
  opacity: .75;
  transition: opacity .3s var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-links a::after {
  content: "";
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a.active::after {
  transform: scaleX(1); transform-origin: left;
}

@media (max-width: 720px) {
  .nav { padding: 18px 18px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 10px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  border: 1px solid currentColor;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: color .35s var(--ease-out);
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: currentColor;
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
  z-index: 0;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover::before { transform: translateY(0); }
.btn.btn-fill::before { transform: translateY(0); }
.btn.btn-fill { color: var(--paper); }
.btn.btn-fill:hover::before { transform: translateY(-101%); }

.btn .arrow {
  width: 14px; height: 14px;
  position: relative;
}
.btn .arrow::before, .btn .arrow::after {
  content: ""; position: absolute; background: currentColor;
}
.btn .arrow::before { left: 0; right: 0; top: 50%; height: 1px; }
.btn .arrow::after {
  right: 0; top: 50%;
  width: 6px; height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  background: transparent;
  transform: translateY(-50%) rotate(45deg);
}

/* ---------- footer ---------- */
.footer {
  padding: 80px 32px 32px;
  border-top: 1px solid var(--rule);
}
.footer-inner {
  max-width: 1440px; margin: 0 auto;
  display: grid; gap: 80px;
}
.footer-mark {
  font-family: "Instrument Serif", serif;
  font-size: clamp(80px, 18vw, 280px);
  letter-spacing: -.02em;
  line-height: .85;
  font-style: italic;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 40px;
  font-size: 13px;
}
.footer-grid h4 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-grid a { display: block; padding: 4px 0; opacity: .8; transition: opacity .3s; }
.footer-grid a:hover { opacity: 1; }
.footer-legal {
  display: flex; justify-content: space-between;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-legal { flex-direction: column; gap: 12px; }
}

/* ---------- reveal utilities ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .40s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .48s; }

/* split words — clip vertically only so italic glyphs can bleed horizontally */
.split-word {
  display: inline-block;
  vertical-align: bottom;
  overflow-y: clip;
  overflow-x: visible;
  /* fallback for browsers without overflow:clip */
  clip-path: inset(-0.05em -0.4em 0 -0.05em);
  padding: 0 .04em;
}
.split-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out);
}
.in .split-word > span { transform: translateY(0); }
.split-word:nth-child(2) > span { transition-delay: .06s; }
.split-word:nth-child(3) > span { transition-delay: .12s; }
.split-word:nth-child(4) > span { transition-delay: .18s; }
.split-word:nth-child(5) > span { transition-delay: .24s; }
.split-word:nth-child(6) > span { transition-delay: .30s; }
.split-word:nth-child(7) > span { transition-delay: .36s; }
.split-word:nth-child(8) > span { transition-delay: .42s; }

/* ---------- noise overlay ---------- */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: .055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- ticker (marquee) ---------- */
.ticker {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: ticker 38s linear infinite;
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- shared cursor ---------- */
.cursor {
  position: fixed;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: currentColor;
  pointer-events: none;
  z-index: 999;
  mix-blend-mode: difference;
  color: #fff;
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease-out), height .3s var(--ease-out), opacity .3s;
  opacity: 0;
}
.cursor.show { opacity: 1; }
.cursor.grow { width: 56px; height: 56px; }
@media (hover: none) { .cursor { display: none; } }
