/* ============================================
   Eigenlabs — MAIN STYLES
   Tech-Minimalism Design System
   ============================================ */

:root {
  --black: #000000;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --gray-950: #0a0a0a;

  --accent: #c8ff00;
  --accent-dim: #a3cc00;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Instrument Sans', -apple-system, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  --header-height: 72px;
  --content-max: 1440px;
  --content-pad: clamp(20px, 4vw, 80px);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --transition-fast: 0.2s var(--ease-out-quart);
  --transition-med: 0.4s var(--ease-out-expo);
  --transition-slow: 0.8s var(--ease-out-expo);
}

/* --- RESET --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
  cursor: none;
}
a { text-decoration: none; color: inherit; cursor: none; }
button { border: none; background: none; font-family: inherit; cursor: none; }
input { font-family: inherit; border: none; outline: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
em { font-family: var(--font-display); font-style: italic; }

::selection {
  background: var(--black);
  color: var(--accent);
}

/* --- CUSTOM CURSOR --- */
/* .custom-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--black);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100000;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo), background 0.3s;
}
.custom-cursor.hovering {
  width: 48px; height: 48px;
  background: var(--accent);
  mix-blend-mode: normal;
}
.custom-cursor-trail {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.5s var(--ease-out-expo), height 0.5s var(--ease-out-expo), border-color 0.3s;
}
.custom-cursor-trail.hovering {
  width: 64px; height: 64px;
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .custom-cursor, .custom-cursor-trail { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }
} */

/* --- PAGE LOADER --- */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-in-out), transform 0.6s var(--ease-in-out);
}
.page-loader.hidden {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}
.loader-inner { text-align: center; }
.loader-text {
  font-family: var(--font-body);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.3em;
  margin-bottom: 40px;
  display: flex;
  gap: 2px;
  justify-content: center;
}
.loader-letter, .loader-dot {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: loaderFadeUp 0.5s var(--ease-out-expo) forwards;
  animation-delay: calc(var(--i) * 0.08s);
}
.loader-dot { color: var(--accent); }
@keyframes loaderFadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.loader-bar {
  width: 200px;
  height: 2px;
  background: var(--gray-800);
  margin: 0 auto 16px;
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.1s linear;
}
.loader-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-500);
  letter-spacing: 0.2em;
}

/* --- HEADER --- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  z-index: 1000;
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
.site-header.scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  z-index: 10;
}
.logo-mark {
  font-size: 0.7rem;
  color: var(--accent);
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.logo-dot { color: var(--accent); }

.main-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}
.nav-link .nav-index {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--gray-400);
  transition: color var(--transition-fast);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 1.5px;
  background: var(--black);
  transition: width var(--transition-med);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}
.nav-link.active .nav-index { color: var(--accent-dim); }
.nav-link:hover .nav-index { color: var(--accent-dim); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 10;
}
.burger-line {
  width: 24px;
  height: 1.5px;
  background: var(--black);
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s;
}
.burger.active .burger-line:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.burger.active .burger-line:nth-child(2) { opacity: 0; }
.burger.active .burger-line:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .burger { display: flex; }
}

/* --- MOBILE NAV --- */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out-expo);
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-nav-inner { text-align: center; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo), color 0.2s;
}
.mobile-nav.open .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}
.mobile-nav.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.open .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-nav.open .mobile-nav-link:nth-child(6) { transition-delay: 0.35s; }
.mobile-nav-link:hover { color: var(--gray-500); }
.mobile-nav-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-400);
}
.mobile-nav-footer {
  margin-top: 48px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 2;
}

/* --- MAIN CONTENT --- */
.main-content {
  min-height: 100vh;
  padding-top: var(--header-height);
}

/* --- FOOTER --- */
.site-footer {
  background: var(--gray-950);
  color: var(--gray-300);
  padding: 0 var(--content-pad);
}
.footer-top {
  padding: 120px 0 80px;
  border-bottom: 1px solid var(--gray-800);
}
.footer-cta { max-width: 700px; }
.footer-heading {
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}
.footer-heading em {
  color: var(--accent);
}
.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  border: 1px solid var(--gray-700);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all var(--transition-med);
}
.footer-cta-btn:hover {
  background: var(--accent);
  color: var(--black);
  border-color: var(--accent);
}
.footer-cta-btn .arrow {
  transition: transform var(--transition-fast);
}
.footer-cta-btn:hover .arrow {
  transform: translateX(4px);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 60px 0;
  border-bottom: 1px solid var(--gray-800);
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.footer-col a {
  font-size: 0.85rem;
  color: var(--gray-400);
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--white); }
.footer-sub-text {
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.5;
}
.footer-form {
  display: flex;
  gap: 0;
  margin-top: 8px;
  border: 1px solid var(--gray-700);
}
.footer-input {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  color: var(--white);
  font-size: 0.8rem;
}
.footer-input::placeholder { color: var(--gray-600); }
.footer-submit {
  padding: 12px 20px;
  background: var(--gray-800);
  color: var(--white);
  font-size: 1rem;
  transition: background var(--transition-fast);
}
.footer-submit:hover { background: var(--accent); color: var(--black); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 0.7rem;
  color: var(--gray-600);
}
.footer-socials { display: flex; gap: 16px; }
.social-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}
.social-link:hover { color: var(--accent); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-600); }
