/* ============================================================
   NICOLAS NECHITCH — DESIGN SYSTEM
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --bg-soft: #F4F4F5;
  --bg-tint: #FAFAFB;
  --ink: #0A0A0A;
  --ink-soft: #1A1A1A;
  --ink-muted: #6B6B70;
  --line: #E5E5E7;
  --line-soft: #EFEFF1;
  --blue: #0040FF;
  --blue-glow: rgba(0, 64, 255, 0.08);
  --blue-deep: #0030CC;

  --shadow-xs: 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow-sm: 0 4px 12px rgba(10, 10, 10, 0.04), 0 1px 3px rgba(10, 10, 10, 0.06);
  --shadow-md: 0 12px 32px rgba(10, 10, 10, 0.06), 0 2px 8px rgba(10, 10, 10, 0.04);
  --shadow-lg: 0 24px 64px rgba(10, 10, 10, 0.08), 0 8px 24px rgba(10, 10, 10, 0.04);
  --shadow-blue: 0 12px 40px rgba(0, 64, 255, 0.18);
  --shadow-blue-lg: 0 24px 80px rgba(0, 64, 255, 0.25);

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 32px;

  --easing: cubic-bezier(0.65, 0, 0.35, 1);
  --easing-out: cubic-bezier(0.16, 1, 0.3, 1);
  --easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-display: "Onest", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-body: "Onest", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  font-stretch: 75%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  cursor: none;
}

/* Reset cursor on touch/no-fine-pointer */
@media (pointer: coarse) {
  body { cursor: auto; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: none; border: 0; background: 0; }
img { display: block; max-width: 100%; }

/* ===== TYPOGRAPHY ===== */
.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }
.serif { font-family: var(--font-serif); font-style: italic; }
.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-glow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== CUSTOM CURSOR ===== */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--blue);
  border-radius: 50%;
  transition: transform 0.05s linear, width 0.3s var(--easing), height 0.3s var(--easing);
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  transition: transform 0.15s var(--easing-out), width 0.3s var(--easing), height 0.3s var(--easing), background 0.3s, border-color 0.3s, opacity 0.3s;
  margin: -16px 0 0 -16px;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  background: var(--blue);
  border-color: var(--blue);
  mix-blend-mode: difference;
}
.cursor-ring.is-hover ~ .cursor-dot,
.cursor-dot.is-hover { opacity: 0; }
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ===== LAYOUT ===== */
.shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 768px) {
  .shell { padding: 0 24px; }
}

section { position: relative; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 16px; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}
.nav-brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand-dot {
  width: 8px; height: 8px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-muted);
  transition: all 0.3s var(--easing);
  position: relative;
}
.nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.nav-link.is-active { color: var(--bg); background: var(--ink); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  margin-left: 4px;
  transition: all 0.3s var(--easing);
}
.nav-cta:hover { background: var(--blue-deep); transform: translateY(-1px); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.4s var(--easing);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn-primary .arrow { transition: transform 0.3s var(--easing); }
.btn-primary:hover .arrow { transform: translate(4px, -4px); }

.btn-blue {
  background: var(--blue);
  color: white;
  box-shadow: var(--shadow-blue);
}
.btn-blue:hover { box-shadow: var(--shadow-blue-lg); transform: translateY(-2px); }

.btn-green {
  background: #1DB954;
  color: white;
  box-shadow: 0 8px 24px rgba(29, 185, 84, 0.28);
}
.btn-green:hover { box-shadow: 0 12px 32px rgba(29, 185, 84, 0.38); transform: translateY(-2px); }

.btn-ghost {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); }

/* ===== REVEAL ANIMATIONS ===== */
.reveal-word {
  display: inline-block;
  vertical-align: top;
  clip-path: inset(-20% -20% -10% -5%);
  -webkit-clip-path: inset(-20% -20% -10% -5%);
  padding-right: 0.08em;
}
.reveal-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--easing-out);
  will-change: transform;
}
.reveal-word.is-in > span { transform: translateY(0); }

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--easing-out), transform 0.9s var(--easing-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-up.is-in { opacity: 1; transform: translateY(0); }

.reveal-fade {
  opacity: 0;
  transition: opacity 1.2s var(--easing-out);
}
.reveal-fade.is-in { opacity: 1; }

/* ===== MARQUEE ===== */
.marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  user-select: none;
}
.marquee-track {
  display: flex;
  gap: 64px;
  animation: scroll-x 40s linear infinite;
  flex-shrink: 0;
  padding-right: 64px;
}
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ===== UTILITY ===== */
.no-cursor { cursor: none !important; }
.text-blue { color: var(--blue); }
.text-muted { color: var(--ink-muted); }

/* Selection */
::selection { background: var(--blue); color: white; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }
