/* ========================================
   K'NIHL — Homepage Styles
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0f;
  --bg-card: #111118;
  --bg-card-hover: #1a1a24;
  --text: #e8e8f0;
  --text-dim: #8888a0;
  --accent: #e63946;
  --accent-glow: rgba(230, 57, 70, 0.3);
  --accent-secondary: #f77f00;
  --white: #ffffff;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

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

/* --- Three.js Canvas --- */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Loading Screen --- */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-text {
  display: flex;
  gap: 4px;
}

.loader-letter {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  opacity: 0;
  transform: translateY(20px);
  animation: letterIn 0.5s var(--ease-out) forwards;
}

.loader-letter:nth-child(1) { animation-delay: 0.1s; }
.loader-letter:nth-child(2) { animation-delay: 0.15s; }
.loader-letter:nth-child(3) { animation-delay: 0.2s; }
.loader-letter:nth-child(4) { animation-delay: 0.25s; }
.loader-letter:nth-child(5) { animation-delay: 0.3s; }
.loader-letter:nth-child(6) { animation-delay: 0.35s; }

@keyframes letterIn {
  to { opacity: 1; transform: translateY(0); }
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.loader-progress {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  animation: loadProgress 1.5s var(--ease-in-out) 0.5s forwards;
}

@keyframes loadProgress {
  to { width: 100%; }
}

/* --- Navigation --- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s ease, padding 0.4s ease;
}

#nav.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 40px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding-bottom: 2px;
}

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

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

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

.nav-link-accent {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-link-accent::after {
  display: none;
}

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

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

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

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Mobile Menu --- */
#mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99;
  background: rgba(10, 10, 15, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}

#mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-link {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-dim);
  transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-link:hover {
  color: var(--accent);
  transform: translateX(10px);
}

/* --- Content --- */
#content {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0;
  position: relative;
}

/* --- Hero Section --- */
.section-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 6px;
  color: var(--accent);
  margin-bottom: 24px;
  font-weight: 400;
}

.hero-title {
  font-size: clamp(4rem, 12vw, 12rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--white);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.8;
  letter-spacing: 0.5px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Glitch Effect --- */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch::before {
  color: #0ff;
  z-index: -1;
  animation: glitch-1 4s infinite linear alternate-reverse;
}

.glitch::after {
  color: var(--accent);
  z-index: -2;
  animation: glitch-2 4s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0%, 88%, 92%, 96%, 100% { opacity: 0; transform: none; }
  89% { opacity: 0.8; transform: translate(2px, -2px); clip-path: inset(20% 0 60% 0); }
  91% { opacity: 0.6; transform: translate(-2px, 2px); clip-path: inset(60% 0 10% 0); }
  93% { opacity: 0; }
  95% { opacity: 0.5; transform: translate(1px, -1px); clip-path: inset(40% 0 30% 0); }
  97% { opacity: 0; }
}

@keyframes glitch-2 {
  0%, 86%, 90%, 94%, 98%, 100% { opacity: 0; transform: none; }
  87% { opacity: 0.6; transform: translate(-2px, 2px); clip-path: inset(10% 0 70% 0); }
  89% { opacity: 0; }
  91% { opacity: 0.8; transform: translate(2px, -1px); clip-path: inset(50% 0 20% 0); }
  93% { opacity: 0.4; transform: translate(-1px, 1px); clip-path: inset(30% 0 40% 0); }
  95% { opacity: 0; }
  99% { opacity: 0.3; transform: translate(1px, 0); clip-path: inset(70% 0 10% 0); }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.6); }
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
  color: var(--white);
}

/* --- Labels --- */
.about-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.label-line {
  display: block;
  width: 50px;
  height: 1px;
  background: var(--accent);
}

.label-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: var(--accent);
  font-weight: 400;
}

/* --- Section Titles --- */
.section-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 40px;
}

/* --- About Section --- */
.section-about {
  background: linear-gradient(180deg, transparent 0%, rgba(10,10,15,0.95) 20%, rgba(10,10,15,0.95) 80%, transparent 100%);
}

.section-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 60px;
  align-items: start;
}

.about-content {
  max-width: 700px;
}

.about-text {
  font-size: 1.1rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 48px;
}

.about-stats {
  display: flex;
  gap: 48px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* --- Music Section --- */
.section-music {
  background: linear-gradient(180deg, transparent 0%, rgba(10,10,15,0.97) 15%, rgba(10,10,15,0.97) 85%, transparent 100%);
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.album-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.4s var(--ease-out), border-color 0.4s ease, box-shadow 0.4s ease;
}

.album-card:hover {
  transform: translateY(-8px);
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px var(--accent-glow);
}

.album-art {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.album-art-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.album-art-placeholder.upcoming {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b2e 50%, #3d1a1a 100%);
}

.album-art-icon {
  color: rgba(255,255,255,0.15);
  animation: spin 20s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.upcoming-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: var(--accent);
  background: rgba(230, 57, 70, 0.1);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(230, 57, 70, 0.3);
}

.album-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.album-card:hover .album-overlay {
  opacity: 1;
}

.album-play-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--white);
  border: 1px solid var(--white);
  padding: 12px 24px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.album-play-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.album-info {
  padding: 24px;
}

.album-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 6px;
}

.album-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.album-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 16px;
}

.album-links {
  display: flex;
  gap: 12px;
}

.album-links a {
  color: var(--text-dim);
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
}

.album-links a:hover {
  color: var(--accent);
  transform: scale(1.2);
}

/* --- Quote Section --- */
.section-quote {
  min-height: auto;
  padding: 160px 0;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(10,10,15,0.9) 30%, rgba(10,10,15,0.9) 70%, transparent 100%);
}

.manifesto {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.quote-mark {
  font-family: var(--font-mono);
  font-size: 8rem;
  color: var(--accent);
  line-height: 0;
  position: absolute;
  top: 30px;
  left: -30px;
  opacity: 0.3;
}

.manifesto p {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 300;
  line-height: 1.4;
  color: var(--white);
  font-style: italic;
}

.manifesto cite {
  display: block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: var(--accent);
  font-style: normal;
}

/* --- Contact Section --- */
.section-contact {
  background: linear-gradient(180deg, transparent 0%, rgba(10,10,15,0.97) 15%);
  padding-bottom: 80px;
}

.contact-single {
  margin-top: 48px;
  margin-bottom: 60px;
  text-align: center;
}

.contact-text {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.contact-email-main {
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 1px;
  padding: 16px 32px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  display: inline-block;
  transition: all 0.3s var(--ease-out);
  background: var(--bg-card);
}

.contact-email-main:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 30px var(--accent-glow);
  transform: translateY(-4px);
}

/* --- Social Links --- */
.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim);
  transition: all 0.3s var(--ease-out);
}

.social-link:hover {
  color: var(--white);
  border-color: var(--accent);
  background: rgba(230, 57, 70, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 32px 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-sep {
  color: rgba(255,255,255,0.15);
}

/* --- Reveal Animations --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

/* --- Responsive --- */
@media (max-width: 1024px) {
  .albums-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  
  .section-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }
  
  #nav {
    padding: 16px 24px;
  }
  
  #nav.scrolled {
    padding: 12px 24px;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .section {
    padding: 80px 0;
  }
  
  .section-hero {
    padding: 0;
  }
  
  .hero-title {
    font-size: clamp(3rem, 15vw, 8rem);
  }
  
  .albums-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  
  .contact-single {
    margin-top: 32px;
  }
  
  .about-stats {
    flex-wrap: wrap;
    gap: 32px;
  }
  
  .quote-mark {
    position: static;
    display: block;
    margin-bottom: -40px;
  }
  
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .social-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero-subtitle {
    font-size: 0.95rem;
    padding: 0 16px;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }
}
