/* ════════════════════════════════════════
   layout.css — Nav, Sections, Footer, Cursor, Progress
   ════════════════════════════════════════ */

/* ── Progress Bar ── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--grad-violet-cyan);
  z-index: 1000;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── Custom Cursor ── */
.cursor {
  width: 8px; height: 8px;
  background: var(--violet);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease), height 0.2s var(--ease), background 0.2s;
  mix-blend-mode: screen;
  will-change: transform;
}

.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid rgba(167, 139, 250, 0.5);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s;
  will-change: transform;
}

.cursor--hover { width: 14px; height: 14px; background: var(--cyan); }
.cursor-ring--hover { width: 48px; height: 48px; border-color: rgba(56, 189, 248, 0.5); }

/* ── Noise overlay ── */
.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px var(--gutter);
  transition: padding 0.5s var(--ease), background 0.5s var(--ease), backdrop-filter 0.5s;
}

nav.scrolled {
  padding: 18px var(--gutter);
  background: rgba(7, 7, 12, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo__icon {
  flex-shrink: 0;
  display: block;
}

.nav-logo__text {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 8px;
  background: var(--grad-violet-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 44px;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 100%;
  height: 1px;
  background: var(--violet);
  transition: right 0.3s var(--ease);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { right: 0; }

.nav-cta {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--violet);
  border: 1px solid var(--border);
  padding: 10px 22px;
  border-radius: 2px;
  background: rgba(167, 139, 250, 0.04);
  transition: all 0.3s var(--ease);
}

.nav-cta:hover {
  background: rgba(167, 139, 250, 0.1);
  border-color: var(--border-h);
  transform: translateY(-1px);
}

/* ── Sections base ── */
section {
  position: relative;
  overflow: hidden;
}

.section-inner {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  padding: 140px var(--gutter);
}

.section-header {
  margin-bottom: 64px;
}

/* ── Footer ── */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px var(--gutter);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 6px;
  background: var(--grad-violet-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(240, 238, 255, 0.15);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  :root {
    --gutter: var(--gutter-sm);
  }

  nav { padding: 20px var(--gutter-sm); }
  nav.scrolled { padding: 16px var(--gutter-sm); }
  .nav-links { display: none; }

  .site-footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 32px var(--gutter-sm);
  }

  .footer-links { flex-wrap: wrap; justify-content: center; gap: 20px; }
}
