/* ===== cache collective — STYLE ===== */

:root {
  --bg: #000000;
  --bg-alt: #050510;
  --navy: #0a0a2e;
  --steel: #4a6fa5;
  --steel-light: #6b8fc5;
  --lavender: #9b8ffa;
  --lavender-dim: rgba(155, 143, 250, 0.15);
  --silver: #c0c8d8;
  --white: #e8ecf4;
  --text: #c0c8d8;
  --text-dim: #5a6578;
  --accent: #7b9fe6;
  --glow: rgba(123, 159, 230, 0.3);
  --font: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

::selection {
  background: var(--lavender);
  color: var(--bg);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--steel) var(--bg);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}

@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor, .cursor-trail { display: none !important; }
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
  width: 8px;
  height: 8px;
  background: var(--lavender);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transition: transform 0.1s;
}

.cursor-trail {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(155, 143, 250, 0.4);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease-out, width 0.2s, height 0.2s;
}

body:has(a:hover) .cursor-trail,
body:has(button:hover) .cursor-trail {
  width: 48px;
  height: 48px;
  border-color: var(--lavender);
}

/* ===== NOISE OVERLAY ===== */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(155, 143, 250, 0.06);
  transition: all 0.4s ease;
}

.nav.scrolled {
  padding: 1rem 3rem;
  background: rgba(0, 0, 0, 0.85);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
}

.nav-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.nav-logo-text {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 4px;
  position: relative;
}

.nav-logo-text::before {
  content: attr(data-glitch);
  position: absolute;
  left: 2px;
  text-shadow: -1px 0 var(--lavender);
  clip-path: inset(0 0 0 0);
  animation: glitch-1 4s infinite linear alternate-reverse;
  opacity: 0.6;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--text-dim);
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--white);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--lavender);
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(30px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  font-family: var(--mono);
  font-size: 1.5rem;
  letter-spacing: 6px;
  color: var(--white);
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.mobile-menu.active .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.4s; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: flex; }
  .nav { padding: 1rem 1.5rem; }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#crystalCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.hero-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-tag-text {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 4px;
  color: var(--text-dim);
}

.hero-tag-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--steel));
}

.hero-title {
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
}

.hero-title-line {
  display: block;
  background: linear-gradient(135deg, var(--white) 0%, var(--steel-light) 50%, var(--lavender) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title-line.accent {
  background: linear-gradient(135deg, var(--lavender) 0%, var(--steel-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-weight: 300;
  font-size: 0.6em;
  letter-spacing: 12px;
}

.hero-subtitle {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 3rem;
  min-height: 1.4em;
}

.typewriter-cursor {
  animation: blink 1s step-end infinite;
  color: var(--lavender);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.btn {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 3px;
  padding: 1rem 2rem;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--lavender), var(--steel));
  color: var(--bg);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(155, 143, 250, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(155, 143, 250, 0.2);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-ghost:hover {
  border-color: var(--lavender);
  color: var(--white);
}

.btn-icon {
  transition: transform 0.3s;
}

.btn:hover .btn-icon {
  transform: translateX(4px);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
}

.stat-plus, .stat-unit {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--lavender);
}

.stat-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 3px;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(transparent, var(--steel), transparent);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scroll-indicator span {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 4px;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--steel);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--lavender);
  animation: scroll-down 2s infinite;
}

/* ===== SECTIONS ===== */
.section {
  padding: 8rem 3rem;
  position: relative;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-number {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 4px;
  color: var(--lavender);
  display: block;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  position: relative;
}

.section-title.center {
  text-align: center;
}

.section-header-center {
  text-align: center;
  margin-bottom: 4rem;
}

.section-sub {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .section { padding: 4rem 1.5rem; }
  .section-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ===== ABOUT ===== */
.about {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 50%, var(--bg) 100%);
}

.about-text {
  margin-bottom: 3rem;
}

.about-lead {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--white);
  margin-bottom: 1rem;
}

.about-text p {
  line-height: 1.8;
  color: var(--text);
}

.about-text strong {
  color: var(--lavender);
}

.feature {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(155, 143, 250, 0.08);
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.6s ease;
}

.feature.revealed {
  opacity: 1;
  transform: translateX(0);
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(155, 143, 250, 0.2);
  border-radius: 8px;
  color: var(--lavender);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature h3 {
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.feature p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ===== RELEASES ===== */
.releases {
  background: var(--bg);
}

.releases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.release-card {
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.release-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .releases-grid { grid-template-columns: 1fr; max-width: 500px; }
}

/* ===== THE VAULT ===== */
.vault {
  background: var(--bg-alt);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.vault-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.vault-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(155, 143, 250, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 143, 250, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: grid-move 20s linear infinite;
}

.vault-container {
  width: 100%;
  max-width: 700px;
  min-height: 400px;
  position: relative;
  z-index: 2;
}

.vault-stage {
  display: none;
  animation: fadeInUp 0.6s ease;
}

.vault-stage.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Vault Door */
.vault-door {
  cursor: pointer;
  text-align: center;
  padding: 4rem;
}

.vault-door-frame {
  width: 160px;
  height: 160px;
  border: 2px solid rgba(155, 143, 250, 0.3);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: all 0.4s;
  position: relative;
}

.vault-door:hover .vault-door-frame {
  border-color: var(--lavender);
  box-shadow: 0 0 40px rgba(155, 143, 250, 0.2), inset 0 0 40px rgba(155, 143, 250, 0.05);
  transform: scale(1.05);
}

.vault-door:hover .lock-icon {
  animation: shake 0.5s ease;
}

.lock-icon {
  width: 48px;
  height: 48px;
  color: var(--lavender);
  transition: all 0.3s;
}

.vault-prompt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: var(--text-dim);
  margin-top: 1rem;
  animation: pulse-text 2s infinite;
}

/* Terminal Form */
.vault-terminal {
  background: rgba(10, 10, 30, 0.8);
  border: 1px solid rgba(155, 143, 250, 0.15);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  backdrop-filter: blur(10px);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(155, 143, 250, 0.05);
  border-bottom: 1px solid rgba(155, 143, 250, 0.1);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-left: auto;
}

.terminal-body {
  padding: 1.5rem;
}

.terminal-line {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.terminal-prompt {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--lavender);
  flex-shrink: 0;
  margin-top: 2px;
}

.terminal-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--steel-light);
  flex-shrink: 0;
  min-width: 100px;
  margin-top: 3px;
}

.terminal-input {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(155, 143, 250, 0.15);
  color: var(--white);
  flex: 1;
  padding: 4px 0;
  outline: none;
  transition: border-color 0.3s;
}

.terminal-input:focus {
  border-color: var(--lavender);
}

.terminal-input::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
}

.terminal-select {
  -webkit-appearance: none;
  cursor: pointer;
}

.terminal-select option {
  background: var(--navy);
  color: var(--white);
}

.terminal-textarea {
  resize: none;
}

.vault-submit {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--lavender), var(--steel));
  color: var(--bg);
  border: none;
  padding: 0.75rem 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: all 0.3s;
}

.vault-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(155, 143, 250, 0.3);
}

/* Upload Animation */
.upload-visual {
  text-align: center;
}

.upload-progress-ring {
  width: 140px;
  height: 140px;
  margin: 0 auto 2rem;
  position: relative;
}

.upload-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(155, 143, 250, 0.1);
  stroke-width: 4;
}

.ring-progress {
  fill: none;
  stroke: var(--lavender);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.1s;
}

.upload-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.upload-status {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--lavender);
  margin-bottom: 0.5rem;
}

.upload-hash {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  word-break: break-all;
}

/* Success */
.success-visual {
  text-align: center;
}

.success-check {
  width: 80px;
  height: 80px;
  border: 2px solid #28c840;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #28c840;
  animation: scaleIn 0.4s ease;
}

.success-check svg {
  width: 36px;
  height: 36px;
}

.success-title {
  font-family: var(--mono);
  font-size: 1.2rem;
  letter-spacing: 4px;
  color: var(--white);
  margin-bottom: 1rem;
}

.success-text {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.success-text code {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--lavender);
}

/* ===== CONTACT ===== */
.contact {
  background: var(--bg);
  padding-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(155, 143, 250, 0.08);
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s;
}

.contact-item:hover {
  padding-left: 1rem;
  color: var(--white);
}

.contact-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--text-dim);
  min-width: 100px;
}

.contact-value {
  flex: 1;
  font-size: 1.1rem;
}

.contact-arrow {
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s;
}

.contact-item:hover .contact-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ===== FOOTER ===== */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(155, 143, 250, 0.08);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer-logo {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  opacity: 0.6;
}

.footer-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 4px;
  color: var(--text-dim);
}

@media (max-width: 768px) {
  .footer { flex-direction: column; gap: 1rem; text-align: center; }
  .hero-stats { flex-direction: column; gap: 1.5rem; }
  .stat-divider { width: 40px; height: 1px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .terminal-line { flex-wrap: wrap; }
  .terminal-label { min-width: auto; }
}

/* ===== ANIMATIONS ===== */
@keyframes glitch-1 {
  0%, 95% { clip-path: inset(0 0 100% 0); }
  96% { clip-path: inset(20% 0 40% 0); }
  97% { clip-path: inset(60% 0 10% 0); }
  98% { clip-path: inset(40% 0 30% 0); }
  99% { clip-path: inset(10% 0 70% 0); }
  100% { clip-path: inset(0 0 100% 0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes scroll-down {
  0% { top: -100%; }
  100% { top: 100%; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* ===== REVEAL ANIMATIONS ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
