/* ============================================================
   UFO Capital — shared styles
   ============================================================ */
:root {
  --paper: #F5F1EA;
  --paper-2: #EFE9DD;
  --ink: #0E0E10;
  --ink-2: #2A2A2E;
  --ink-3: #6B6A66;
  --ink-4: #A8A59C;
  --line: #1f1f22;
  --halo: #E6E0D4;
  --accent: #2E3FE0;
  --accent-soft: #C8CFFB;
}

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

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: none;
}
body {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(14,14,16,0.025) 1px, transparent 0);
  background-size: 3px 3px;
}
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration: none; cursor: none; }
button, input, textarea, select, label { font-family: inherit; cursor: none; }

.serif { font-family: 'Instrument Serif', 'Times New Roman', serif; font-weight: 400; letter-spacing: -0.01em; }
.mono  { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.italic { font-style: italic; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; }

/* ---------- Nav ---------- */
nav.top {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px 40px;
  display: flex; align-items: center; justify-content: space-between;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  background: rgba(245, 241, 234, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
nav.top.scrolled {
  border-bottom-color: rgba(14,14,16,0.08);
  background: rgba(245, 241, 234, 0.85);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Instrument Serif', serif;
  font-size: 22px; letter-spacing: -0.01em;
}
.brand .mark {
  width: 28px; height: 18px;
  display: inline-flex; align-items: center;
}
.brand .mark svg { display: block; }
.nav-links {
  display: flex; gap: 36px;
  font-size: 13px; color: var(--ink-2);
}
.nav-links a { position: relative; transition: color .2s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; border: 1px solid var(--ink);
  transition: transform .2s ease, background .2s ease;
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); }
.nav-cta .arrow { transition: transform .2s ease; }
.nav-cta:hover .arrow { transform: translateX(3px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px; border-radius: 999px;
  font-size: 14px; border: 1px solid var(--ink);
  transition: all .25s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Eyebrow + reveals ---------- */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--ink-3);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow .num { color: var(--ink-4); }
.eyebrow .line { flex: 0 0 40px; height: 1px; background: var(--ink); }

.reveal {
  opacity: 0; transform: translateY(30px); filter: blur(6px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.2,.8,.2,1), filter 1s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); filter: blur(0); }
.reveal.d1 { transition-delay: .05s; }
.reveal.d2 { transition-delay: .15s; }
.reveal.d3 { transition-delay: .25s; }
.reveal.d4 { transition-delay: .35s; }

/* ---------- Page header (subpages) ---------- */
.page-header {
  position: relative;
  padding: 200px 0 100px;
  border-bottom: 1px solid rgba(14,14,16,0.08);
  overflow: hidden;
}
.page-header .crumbs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--ink-3);
  margin-bottom: 32px;
  display: flex; gap: 12px; align-items: center;
}
.page-header .crumbs a:hover { color: var(--ink); }
.page-header .crumbs .sep { color: var(--ink-4); }

.page-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(56px, 9vw, 144px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  max-width: 1100px;
}
.page-title .ital { font-style: italic; color: var(--ink-2); }

.page-lede {
  font-size: 20px; line-height: 1.5;
  color: var(--ink-2); max-width: 720px;
}

.page-side-orb {
  position: absolute;
  right: -120px; top: 50%;
  transform: translateY(-50%);
  width: 480px; height: 280px;
  background: url('assets/ufo.png') center/contain no-repeat;
  opacity: 0.55;
  filter: drop-shadow(0 20px 40px rgba(14,14,16,0.15));
  pointer-events: none;
  animation: float-side 8s ease-in-out infinite;
}
@keyframes float-side {
  0%, 100% { transform: translateY(-50%) rotate(-2deg); }
  50%      { transform: translateY(calc(-50% - 14px)) rotate(2deg); }
}

/* ---------- Section base ---------- */
section.block {
  position: relative;
  padding: 120px 0;
  border-top: 1px solid rgba(14,14,16,0.08);
}
section.block:first-of-type { border-top: 0; }

/* ---------- Footer ---------- */
footer {
  padding: 60px 0 40px;
  border-top: 1px solid rgba(14,14,16,0.1);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--ink-3);
}
.foot-row {
  display: flex; justify-content: space-between; align-items: end;
}
.foot-mark {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(80px, 14vw, 220px);
  line-height: 0.85;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-top: 60px; text-transform: none; user-select: none;
}
.foot-mark .ital { font-style: italic; color: var(--ink-2); }
.foot-links { display: flex; gap: 28px; align-items: center; }
.foot-links a:hover { color: var(--ink); }
.foot-links a.x-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(14,14,16,0.18);
  color: var(--ink);
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.foot-links a.x-link:hover {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
  transform: translateY(-2px);
}
.foot-links a.x-link svg { width: 14px; height: 14px; display: block; }

/* ---------- UFO Cursor ---------- */
#ufoCursor {
  position: fixed; top: 0; left: 0;
  width: 56px; height: 56px;
  pointer-events: none; z-index: 9999;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
}
#ufoCursor .craft {
  position: absolute; inset: 0;
  transform: translate(-50%, -50%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  filter: drop-shadow(0 6px 14px rgba(14,14,16,0.18));
  animation: cursor-tilt 4s ease-in-out infinite;
}
@keyframes cursor-tilt {
  0%, 100% { rotate: -4deg; }
  50%      { rotate: 4deg; }
}
#ufoCursor .craft svg { display: block; width: 100%; height: 100%; }
#ufoCursor .beam-c {
  position: absolute;
  left: 0; top: 9px;
  width: 36px; height: 90px;
  transform: translate(-50%, 0) scaleY(0.6);
  transform-origin: 50% 0%;
  background: radial-gradient(ellipse 80% 100% at 50% 0%,
    rgba(46,63,224,0.55) 0%,
    rgba(46,63,224,0.22) 35%,
    transparent 75%);
  clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
  filter: blur(3px);
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
}
#ufoCursor.hover .craft { transform: translate(-50%, -50%) scale(1.25); }
#ufoCursor.hover .beam-c { opacity: 1; transform: translate(-50%, 0) scaleY(1); }

@media (hover: none) {
  html, body, a, button, input, textarea, select, label { cursor: auto; }
  #ufoCursor { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  nav.top { padding: 16px 24px; }
  .nav-links { display: none; }
  .page-header { padding: 140px 0 60px; }
  .page-side-orb { display: none; }
  section.block { padding: 80px 0; }
  .foot-row { flex-direction: column; gap: 24px; align-items: flex-start; }
}
