/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #ffffff;
  background: #07101a;
  background-image: radial-gradient(ellipse at 50% 0%, rgba(78,195,212,0.08) 0%, transparent 60%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== THREE.JS CANVAS ===== */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#shatter-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 16, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 40px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0a1424, #0c1a2e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon.small {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.logo-icon svg { width: 18px; height: 18px; }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}
.nav-links a:hover { color: #ffffff; }

.header-right { display: flex; align-items: center; gap: 12px; }

.btn-header-ghost {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}
.btn-header-ghost:hover { color: #ffffff; background: rgba(255,255,255,0.06); }

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4ec3d4;
  color: #07101a;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-header:hover {
  box-shadow: 0 2px 16px rgba(78, 195, 212, 0.4);
  filter: brightness(1.1);
}
.btn-header:active {
  transform: scale(0.97);
}

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 60px 100px 80px;
  min-height: calc(100vh - 64px);
  gap: 60px;
  position: relative;
  z-index: 2;
}

.hero-content { max-width: 520px; flex-shrink: 0; }

/* Discord user pill */
.discord-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(78, 195, 212, 0.08);
  border: 1px solid rgba(78, 195, 212, 0.18);
  padding: 6px 18px 6px 6px;
  border-radius: 100px;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.discord-user-pill.loaded {
  opacity: 1;
  transform: translateY(0);
}
.discord-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(78, 195, 212, 0.15);
  flex-shrink: 0;
}
.discord-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.1px;
  white-space: nowrap;
}

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

.hero-title {
  font-size: 60px;
  font-weight: 800;
  line-height: 1.05;
  color: #ffffff;
  margin-bottom: 24px;
  letter-spacing: -2px;
}

.gradient-text {
  background: linear-gradient(135deg, #4ec3d4, #9d6fd9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 420px;
  font-weight: 400;
}

.hero-actions { display: flex; align-items: center; gap: 24px; margin-bottom: 56px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #4ec3d4;
  color: #07101a;
  font-size: 15px;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.1px;
  font-family: inherit;
}
.btn-primary svg { transition: transform 0.3s; }
.btn-primary:hover {
  box-shadow: 0 4px 28px rgba(78, 195, 212, 0.45);
  filter: brightness(1.1);
}
.btn-primary:active { transform: scale(0.97); }

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: color 0.2s;
}
.btn-text:hover { color: #ffffff; }
.btn-text-arrow { transition: transform 0.2s; }
.btn-text:hover .btn-text-arrow { transform: translateX(3px); }

.hero-stats { display: flex; align-items: center; gap: 32px; }
.stat-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
  margin-top: 2px;
}
.stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.08); }

/* ===== HERO VISUAL — Large decorative card ===== */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.hero-card {
  width: 100%;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.hero-card-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hero-card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}
.hero-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #0a1424, #0c1a2e);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-card-icon svg { width: 16px; height: 16px; stroke: white; }

.hero-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #4ec3d4;
}
.status-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ec3d4;
  animation: dotPulse 2s ease-in-out infinite;
}

.hero-card-body {
  height: 320px;
  position: relative;
  background: linear-gradient(180deg, rgba(78,195,212,0.03) 0%, rgba(157,111,217,0.06) 100%);
  overflow: hidden;
}

.hero-card-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(78,195,212,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78,195,212,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-float-eth {
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 55px;
  animation: heroFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 6px 20px rgba(78,195,212,0.55));
}
.hero-float-eth svg { width: 100%; height: 100%; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(calc(-50% - 8px)) translateX(3px); }
}

.hero-float-token {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  animation: heroFloatToken 4s ease-in-out infinite 1s;
  filter: drop-shadow(0 4px 18px rgba(157,111,217,0.55));
}
.hero-float-token svg { width: 100%; height: 100%; }

@keyframes heroFloatToken {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(calc(-50% + 6px)) translateX(-3px); }
}

.hero-connect-line {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 20px;
}

.hero-trail {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(78,195,212,0.25);
  top: 50%;
}
.hero-trail.t1 { left: 38%; animation: trailFloat 3s ease-in-out infinite 0s; }
.hero-trail.t2 { left: 46%; animation: trailFloat 3s ease-in-out infinite 0.6s; }
.hero-trail.t3 { left: 54%; animation: trailFloat 3s ease-in-out infinite 1.2s; }
.hero-trail.t4 { left: 62%; animation: trailFloat 3s ease-in-out infinite 1.8s; }

@keyframes trailFloat {
  0%, 100% { opacity: 0.2; transform: translateY(-50%) scale(0.8); }
  50% { opacity: 0.6; transform: translateY(calc(-50% - 4px)) scale(1.2); }
}

.hero-card-footer {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.hero-card-brand {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}
.hero-card-badge-verified {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #4ec3d4;
}

/* ===== FEATURES SECTION ===== */
.features-section {
  padding: 120px 60px;
  position: relative;
  z-index: 2;
}

.features-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #4ec3d4;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: 40px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.4);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  overflow: hidden;
}

.feature-card {
  padding: 44px 36px;
  background: rgba(7,16,26,0.9);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.feature-card:hover {
  background: rgba(78,195,212,0.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 2;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: transform 0.35s, box-shadow 0.35s;
}
.feature-card:hover .feature-icon { transform: scale(1.06); }
.feature-icon svg { width: 22px; height: 22px; }

.feature-icon.orange { background: #4ec3d4; box-shadow: 0 4px 16px rgba(78,195,212,0.3); }
.feature-icon.red { background: #9d6fd9; box-shadow: 0 4px 16px rgba(157,111,217,0.3); }
.feature-icon.flame { background: #f2607a; box-shadow: 0 4px 16px rgba(242,96,122,0.3); }
.feature-icon.amber { background: #e8a85a; box-shadow: 0 4px 16px rgba(232,168,90,0.3); }

.feature-card:hover .feature-icon.orange { box-shadow: 0 6px 24px rgba(78,195,212,0.45); }
.feature-card:hover .feature-icon.red { box-shadow: 0 6px 24px rgba(157,111,217,0.45); }
.feature-card:hover .feature-icon.flame { box-shadow: 0 6px 24px rgba(242,96,122,0.45); }
.feature-card:hover .feature-icon.amber { box-shadow: 0 6px 24px rgba(232,168,90,0.45); }

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.feature-card p {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
}

/* ===== CODE SECTION ===== */
.code-section {
  display: flex;
  align-items: center;
  gap: 80px;
  padding: 100px 80px;
  position: relative;
  z-index: 2;
}

.code-left { max-width: 400px; flex-shrink: 0; }
.code-left .section-title { text-align: left; }
.code-left .section-subtitle { text-align: left; margin: 0 0 28px; }

.code-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.tech-badge {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}

.code-right { flex: 1; min-width: 0; }

.code-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 16px 48px rgba(0,0,0,0.3);
}
.code-top {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.code-dots { display: flex; gap: 6px; }
.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.code-dots span:first-child { background: #4ec3d4; }
.code-dots span:nth-child(2) { background: #9d6fd9; }
.code-dots span:nth-child(3) { background: #f2607a; }
.code-filename { font-size: 12px; color: rgba(255,255,255,0.3); font-weight: 500; }

.code-body {
  padding: 24px 24px;
  font-size: 13.5px;
  line-height: 1.8;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  color: rgba(255,255,255,0.55);
  overflow-x: auto;
}
.code-kw { color: #4ec3d4; }
.code-str { color: #f2607a; }
.code-fn { color: #b3a3eb; }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 60px;
  position: relative;
  z-index: 2;
  background: rgba(7,16,26,0.8);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}
.footer-desc { font-size: 13px; color: rgba(255,255,255,0.3); }
.footer-right p { font-size: 13px; color: rgba(255,255,255,0.3); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .hero {
    flex-direction: column;
    padding: 60px 32px;
    text-align: center;
    min-height: auto;
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }

  .hero-visual { width: 100%; }
  .hero-card { max-width: 480px; margin: 0 auto; }

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

  .code-section {
    flex-direction: column;
    padding: 80px 32px;
    gap: 48px;
  }
  .code-left { max-width: 100%; text-align: center; }
  .code-left .section-title { text-align: center; }
  .code-left .section-subtitle { text-align: center; margin: 0 auto 28px; }
  .code-badges { justify-content: center; }
}

@media (max-width: 768px) {
  .header { padding: 0 20px; }
  .nav-links { display: none; }
  .btn-header-ghost { display: none; }

  .hero { padding: 48px 24px 64px; gap: 48px; }
  .hero-title { font-size: 40px; letter-spacing: -1.2px; }
  .hero-subtitle { font-size: 15px; }

  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .stat-num { font-size: 24px; }
  .stat-divider { display: none; }

  .hero-card-body { height: 240px; }
  .hero-float-eth { left: 30px; width: 30px; height: 49px; }
  .hero-float-token { right: 30px; width: 44px; height: 44px; }

  .features-section { padding: 80px 24px; }
  .section-title { font-size: 30px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 32px 28px; }

  .code-section { padding: 60px 24px; }
  .code-body { font-size: 12px; }

  .footer { padding: 32px 24px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 420px) {
  .hero-title { font-size: 32px; }
  .hero-actions { flex-direction: column; gap: 16px; }
  .btn-primary { width: 100%; justify-content: center; }
  .hero-card-body { height: 200px; }
  .hero-float-eth { left: 20px; width: 26px; height: 42px; }
  .hero-float-token { right: 20px; width: 38px; height: 38px; }
}