/* ============================================
   hadal.top — Deep Sea to Summit Design System
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;500;600;700;900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;700&display=swap');

/* ---- Custom Properties ---- */
:root {
  /* Deep Sea Palette */
  --abyss: #000814;
  --deep: #001d3d;
  --ocean: #003566;
  --surface: #005f73;
  --glow-cyan: #00f5d4;
  --glow-blue: #0077b6;
  --glow-teal: #00b4d8;
  --glow-violet: #7209b7;
  --glow-magenta: #f72585;
  --summit-light: #e0e1dd;
  --snow: #f0f0f0;

  /* Text */
  --text-primary: #e8e8e8;
  --text-secondary: #94a3b8;
  --text-accent: #00f5d4;
  --text-dim: #475569;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-display: 'Cinzel Decorative', 'Cinzel', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --section-py: clamp(5rem, 12vh, 10rem);
  --section-px: clamp(1.5rem, 5vw, 6rem);

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--glow-cyan) var(--abyss);
}

html::-webkit-scrollbar {
  width: 6px;
}
html::-webkit-scrollbar-track {
  background: var(--abyss);
}
html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--glow-cyan), var(--glow-blue));
  border-radius: 3px;
}

body {
  font-family: var(--font-body);
  background: var(--abyss);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ---- Utility ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--section-px);
}

/* ---- Selection ---- */
::selection {
  background: rgba(0, 245, 212, 0.3);
  color: #fff;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.5s var(--ease-out);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(0, 8, 20, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.8rem 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.15em;
  transition: color 0.3s;
}

.nav-logo .dot {
  color: var(--glow-cyan);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s, transform 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--glow-cyan);
  transition: width 0.3s var(--ease-out);
}

.nav-links a:hover {
  color: var(--glow-cyan);
}

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

/* Mobile menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
  border-radius: 1px;
}

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, #001d3d 0%, #000814 60%);
}

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

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 11rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #a8dadc 40%, #00b4d8 80%, #0077b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(0, 180, 216, 0.3));
  animation: heroTitleIn 1.5s var(--ease-out) both;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--text-secondary);
  text-transform: uppercase;
  animation: fadeSlideUp 1s var(--ease-out) 0.5s both;
}

.hero-slogan {
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 2.2vw, 1.35rem);
  font-weight: 400;
  color: var(--text-accent);
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
  min-height: 2em;
  animation: fadeIn 0.5s var(--ease-out) 1s both;
}

.hero-slogan .cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--glow-cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 1s var(--ease-out) 2s both;
}

.scroll-indicator span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-indicator .chevron {
  width: 20px;
  height: 20px;
  border-right: 1.5px solid var(--text-dim);
  border-bottom: 1.5px solid var(--text-dim);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
#about {
  position: relative;
  padding: var(--section-py) 0;
  background: linear-gradient(180deg, var(--abyss) 0%, #000d1f 50%, var(--deep) 100%);
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.about-text h2 .highlight {
  background: linear-gradient(90deg, var(--glow-cyan), var(--glow-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.about-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glow-cyan), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.about-card:hover {
  background: var(--glass-hover);
  transform: translateY(-4px);
  border-color: rgba(0, 245, 212, 0.15);
}

.about-card:hover::before {
  opacity: 1;
}

.about-card .card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.about-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.about-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Light rays effect */
.light-rays {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 119, 182, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* ============================================
   SMP SECTION — The Star
   ============================================ */
#smp {
  position: relative;
  padding: var(--section-py) 0;
  background: #000;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.smp-bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.08;
  pointer-events: none;
}

.smp-bg-glow.glow-1 {
  top: 10%;
  left: -10%;
  background: var(--glow-blue);
}

.smp-bg-glow.glow-2 {
  bottom: 10%;
  right: -10%;
  background: var(--glow-violet);
}

.ascii-art-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 0;
  margin-bottom: 4rem;
}

.ascii-art {
  font-family: var(--font-mono);
  font-size: clamp(0.28rem, 0.85vw, 0.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.92);
  white-space: pre;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.15);
  user-select: none;
}

.ascii-art .char {
  display: inline-block;
  opacity: 0;
  transition: opacity 0.08s ease;
}

.ascii-art .char.visible {
  opacity: 1;
}

.ascii-art .char.glow {
  text-shadow: 0 0 8px rgba(0, 245, 212, 0.5), 0 0 20px rgba(0, 245, 212, 0.2);
  color: #fff;
}

/* Poetic text */
.smp-text {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--section-px);
  text-align: center;
}

.smp-text .poem-line {
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s var(--ease-out);
}

.smp-text .poem-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.smp-text .poem-line.highlight-line {
  color: var(--text-primary);
  font-weight: 500;
}

.smp-text .poem-line.accent-line {
  color: var(--glow-cyan);
  font-weight: 600;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
}

.smp-text .poem-break {
  height: 1.5rem;
}

.smp-text .poem-line em {
  font-style: italic;
  color: var(--text-primary);
}

/* Divider line */
.smp-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glow-cyan), transparent);
  margin: 2.5rem auto;
  opacity: 0;
  transition: opacity 0.8s, width 0.8s var(--ease-out);
}

.smp-divider.visible {
  opacity: 1;
  width: 120px;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
#features {
  position: relative;
  padding: var(--section-py) 0;
  background: linear-gradient(180deg, #000 0%, #000a14 30%, #001020 100%);
}

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

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.5s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.2), transparent 50%, rgba(114, 9, 183, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s;
}

.feature-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.06);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), rgba(0, 119, 182, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ============================================
   JOIN / CTA SECTION
   ============================================ */
#join {
  position: relative;
  padding: var(--section-py) 0;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #001020 0%, #0a0a1a 30%, #0f0f1f 60%, #1a1a2e 100%);
  overflow: hidden;
}

/* Mountain silhouette */
.mountain-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
}

.mountain-layer svg {
  width: 100%;
  height: auto;
  display: block;
}

.join-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.join-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(180deg, #ffffff 20%, #a8dadc 60%, #0077b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.join-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 480px;
}

.server-ip-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 245, 212, 0.05);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: 14px;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
}

.server-ip-box:hover {
  background: rgba(0, 245, 212, 0.1);
  border-color: rgba(0, 245, 212, 0.4);
  transform: scale(1.02);
}

.server-ip-box .ip-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.server-ip-box .ip-address {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--glow-cyan);
  letter-spacing: 0.05em;
}

.server-ip-box .copy-icon {
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.server-ip-box:hover .copy-icon {
  color: var(--glow-cyan);
}

.copy-feedback {
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--glow-cyan);
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}

.copy-feedback.show {
  opacity: 1;
  top: -2.5rem;
}

.join-version {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 2rem 0;
  text-align: center;
  background: #0a0a14;
  border-top: 1px solid var(--glass-border);
}

footer p {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

footer .footer-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes heroTitleIn {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(30px);
    filter: blur(10px) drop-shadow(0 0 40px rgba(0, 180, 216, 0.3));
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0) drop-shadow(0 0 40px rgba(0, 180, 216, 0.3));
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.1);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 245, 212, 0.2);
  }
}

/* Scroll reveal classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .about-cards {
    grid-template-columns: 1fr;
  }

  .ascii-art {
    font-size: clamp(0.18rem, 1.3vw, 0.5rem);
  }

  .server-ip-box .ip-address {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    letter-spacing: 0.08em;
  }

  .ascii-art {
    font-size: clamp(0.15rem, 1.6vw, 0.4rem);
  }

  .smp-text .poem-line {
    font-size: 0.9rem;
  }
}
