/*
 * styles.css
 * Main stylesheet for the DoNAD landing page.
 * Uses CSS variables, a mobile-first approach, and respects reduced motion.
 * Assumes an image asset exists at 'assets/DoNAD.png'.
*/

/* ------------------- */
/* CSS Variables & Reset */
/* ------------------- */
:root {
  --color-bg-deep: #110b19;
  --color-bg-mid: #1e1231;
  --color-panel: rgba(30, 18, 49, 0.5);
  --color-panel-border: rgba(168, 85, 247, 0.2);
  --color-primary-purple: #a855f7; /* Purple-500 */
  --color-accent-lilac: #d8b4fe; /* Purple-300 */
  --color-text-primary: #f3e8ff; /* Purple-50 */
  --color-text-secondary: #e9d5ff; /* Purple-200 */
  --color-glow: rgba(168, 85, 247, 0.4);
  --color-telegram-dark: #229ed9; /* Telegram official color */
  --color-x-dark: #000000; /* X official color (black) */

  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol';

  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

body,
html {
  cursor: none !important;
}

/* Hide custom cursor on touch devices */
@media (hover: none) or (pointer: coarse) {
  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }
}
/* Hilangin semua cursor default dari semua elemen */
* {
  cursor: none !important;
}

/* Pastikan elemen interaktif juga ga munculin pointer */
a,
button,
input,
textarea,
select {
  cursor: none !important;
}

/* ------------------- */
/* Custom Cursor       */
/* ------------------- */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  will-change: transform;
  z-index: 9999;
  pointer-events: none; /* Tambahkan ini */
}
.cursor-dot {
  width: 48px;
  height: 48px;
  background: url('DoNAD3.png') center center no-repeat;
  background-size: contain;
  border: none;
  box-shadow: none;
  transition: transform 0.2s ease-out;
}
.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-primary-purple);
  transition: transform 0.2s ease-out, width 0.3s ease-out, height 0.3s ease-out;
}
.cursor-outline.grow {
  transform: translate(-50%, -50%) scale(1.5);
  border-color: var(--color-accent-lilac);
}
.cursor-dot.grow {
  transform: translate(-50%, -50%) scale(1.3);
}

/* ------------------- */
/* Background Effects  */
/* ------------------- */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 80% 10%, #fff, transparent),
    radial-gradient(1px 1px at 50% 70%, #fff, transparent),
    radial-gradient(2px 2px at 90% 40%, #fff, transparent),
    radial-gradient(2px 2px at 40% 90%, #ddd, transparent),
    radial-gradient(2px 2px at 10% 10%, #ddd, transparent);
  background-size: 100% 100%;
  z-index: -2;
  will-change: transform;
}
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    transparent 40%,
    var(--color-bg-deep) 80%
  );
  z-index: -1;
}

/* ------------------- */
/* Utility & Layout    */
/* ------------------- */
.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

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

/* ------------------- */
/* Header & Navigation */
/* ------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background-color: rgba(17, 11, 25, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease;
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-text-primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--color-primary-purple);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}
.hamburger-box {
  width: 30px;
  height: 24px;
  display: inline-block;
  position: relative;
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 30px;
  height: 3px;
  background-color: var(--color-text-primary);
  border-radius: 4px;
  position: absolute;
  transition: transform 0.2s ease-in-out, opacity 0.2s ease;
}
.hamburger-inner {
  top: 50%;
  transform: translateY(-50%);
}
.hamburger-inner::before,
.hamburger-inner::after {
  content: '';
  display: block;
}
.hamburger-inner::before {
  top: -10px;
}
.hamburger-inner::after {
  bottom: -10px;
}

/* Hamburger Active State */
.hamburger.is-active .hamburger-inner {
  background-color: transparent;
}
.hamburger.is-active .hamburger-inner::before {
  transform: translateY(10px) rotate(45deg);
}
.hamburger.is-active .hamburger-inner::after {
  transform: translateY(-10px) rotate(-45deg);
}

/* ------------------- */
/* Hero Section        */
/* ------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding-top: var(--header-height);
}
.hero-text {
  text-align: left;
}
.hero-headline {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  /* NEW: Full color gradient */
  background: linear-gradient(
    90deg,
    #9b5de5,
    #c282ef,
    #00f5d4,
    #fee440,
    #f15bb5
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* text-fill-color: transparent; Fallback for some browsers */
}
.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-secondary);
}
.hero-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero-donad {
  max-width: 500px;
  width: 100%;
  filter: drop-shadow(0 0 45px var(--color-glow));
  animation: float 6s ease-in-out infinite;
  will-change: transform;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ------------------- */
/* General Sections    */
/* ------------------- */
.content-section {
  padding: 6rem 0;
  position: relative;
}
.content-section h2 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  margin-bottom: 1rem;
  text-align: center;
}
.content-section .section-intro {
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--color-text-secondary);
}
.section-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .section-content {
    grid-template-columns: 2fr 1fr;
    text-align: left;
  }
  .content-section h2 {
    text-align: left;
  }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.hero-headline.reveal {
  transition-delay: 0.2s;
}
.hero-tagline.reveal {
  transition-delay: 0.4s;
}

/* Buttons */
.button-group {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex; /* Added for social buttons */
  align-items: center; /* Added for social buttons */
  justify-content: center; /* Added for social buttons */
  gap: 0.5rem; /* Added for social buttons */
}
.btn-primary {
  background-image: linear-gradient(
    90deg,
    var(--color-primary-purple),
    #7e22ce
  );
  color: white;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(168, 85, 247, 0.2);
}
.btn-secondary {
  background-color: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-primary-purple);
}
.btn-secondary:hover {
  background-color: var(--color-primary-purple);
  color: white;
}

/* ------------------- */
/* Tokenomics Section  */
/* ------------------- */
#tokenomics {
  overflow: hidden;
}
.panel {
  background: var(--color-panel);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  padding: 3rem;
  position: relative;
  z-index: 1;
}
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .panel {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}
.tokenomics-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}
@media (min-width: 768px) {
  .tokenomics-layout {
    flex-direction: row;
    justify-content: center;
  }
}

/* Decorative BG Image & Blending */
.decorative-donad-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background-image: url('DoNAD3.png');
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

/* Approach B: Radial blur mask (Default)
   This approach provides a more premium, consistent glow effect. */
.blend-radial-blur {
  opacity: 0.2;
  filter: blur(80px);
  transform: translate(-50%, -50%) scale(1.2);
  mask-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 1) 30%,
    rgba(0, 0, 0, 0) 70%
  );
  -webkit-mask-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 1) 30%,
    rgba(0, 0, 0, 0) 70%
  );
}

/* Approach A: mix-blend-mode (Alternative)
   To use this, change the class on the div in index.html to 'blend-screen'.
   This can have inconsistent results across browsers but is simpler. */
.blend-screen {
  mix-blend-mode: screen;
  opacity: 0.12;
  filter: blur(6px);
  transform: translate(-50%, -50%);
}

/* Donut Chart */
.donut-chart {
  display: block;
  margin: 0 auto;
}
.donut-segment {
  fill: none;
  stroke-width: 25;
  stroke-linecap: round;
}
.chart-text {
  font-family: var(--font-family-sans);
}
.chart-number {
  font-size: 2.5rem;
  font-weight: 700;
  fill: var(--color-text-primary);
}
.chart-label {
  font-size: 0.9rem;
  fill: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Legend */
.legend {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1rem;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-block;
}

/* ------------------- */
/* Social & Footer (REVISED) */
/* ------------------- */
#social {
  background: linear-gradient(
    180deg,
    var(--color-bg-deep) 0%,
    var(--color-bg-mid) 100%
  );
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.btn-social {
  padding: 1rem 2rem;
  border-radius: 50px; /* More rounded, modern look */
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden; /* For glow effect */
}

.btn-social::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2); /* Soft white glow */
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease-out, height 0.4s ease-out, opacity 0.4s ease-out;
  opacity: 0;
  z-index: 1;
}

.btn-social:hover::before {
  width: 200%;
  height: 200%;
  opacity: 1;
}

.btn-social svg {
  margin-right: 0.5rem;
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
  z-index: 2; /* Keep SVG above glow */
  position: relative;
}

.btn-social:hover svg {
  transform: scale(1.1);
}

.btn-telegram {
  background: linear-gradient(
    45deg,
    #9b5de5,
    #c282ef
  ); /* Telegram blue gradient */
  border-color: #9b5de5;
}
.btn-telegram:hover {
  box-shadow: 0 8px 25px rgba(155, 93, 229, 0.4);
  transform: translateY(-3px);
}

.btn-x {
  background: linear-gradient(
    45deg,
    #9b5de5,
    #c282ef
  ); /* Darker gradient for X */
  border-color: #9b5de5;
  color: white; /* Ensure text is white against dark background */
}
.btn-x:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}

.site-footer-bottom {
  padding: 2.5rem 0;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  background: var(--color-bg-deep); /* Deeper background for footer */
  border-top: 1px solid rgba(168, 85, 247, 0.1); /* Subtle border */
}

.footer-social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-social-icons a {
  color: var(--color-text-secondary);
  transition: color 0.3s ease, transform 0.3s ease, filter 0.3s ease;
  padding: 0.5rem; /* Make clickable area larger */
  border-radius: 8px; /* Soft rounded corners */
}

.footer-social-icons a:hover {
  color: var(--color-accent-lilac);
  transform: translateY(-4px) scale(1.1);
  filter: drop-shadow(0 0 15px var(--color-primary-purple)); /* Glow effect */
}

.footer-social-icons a svg {
  width: 28px;
  height: 28px;
}

/* ------------------- */
/* Accessibility       */
/* ------------------- */
:focus-visible {
  outline: 2px solid var(--color-primary-purple);
  outline-offset: 4px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-donad {
    animation: none;
  }
  .btn-social::before {
    transition: none !important;
    opacity: 0;
  } /* Disable glow animation */
  .btn-social:hover::before {
    opacity: 0;
  } /* Ensure no glow */
  .footer-social-icons a:hover {
    transform: none;
    filter: none;
  } /* Disable hover animations */
}

/* ------------------- */
/* Responsive Design   */
/* ------------------- */
@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(70vw, 300px);
    height: 100vh;

    /* [UBAHAN] Background dibuat transparan dengan efek blur (glassmorphism) */
    background-color: rgba(
      30,
      18,
      49,
      0.85
    ); /* Warna dari --color-panel dengan opacity */
    backdrop-filter: blur(17px);
    -webkit-backdrop-filter: blur(17px);
    border-left: 1px solid var(--color-panel-border); /* Garis tepi tipis untuk definisi */

    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Transisi lebih halus */
    padding-top: 6rem;

    /* [UBAHAN] Ini adalah kunci untuk efek gelombang! */
    clip-path: url(#nav-wave-clip);
  }

  .main-nav.is-active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;

    /* [UBAHAN] Teks digeser ke kiri dan diberi padding agar tidak terpotong gelombang */
    align-items: flex-start;
    padding-left: 2.5rem; /* Beri ruang dari tepi bergelombang */

    gap: 2.5rem;
  }

  .hamburger {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--header-height) + 2rem);
  }
  .hero-text {
    order: 2;
  }
  .hero-image-wrapper {
    order: 1;
  }
  .hero-donad {
    max-width: 300px;
  }

  .button-group {
    justify-content: center;
  }

  .panel {
    padding: 2rem;
  }

  .social-buttons {
    flex-direction: column;
    align-items: center;
  }
  .btn-social {
    width: 100%;
    max-width: 280px; /* Limit button width on small screens */
  }
}
