/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-black: #000000;
    --secondary-black: #1a1a1a;
    --gold: #FFD700;
    --gold-dark: #B8860B;
    --gold-light: #FFED4E;
    --white: #FFFFFF;
    --gray: #666666;
    --gray-light: #999999;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--primary-black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
}

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

/* ===========================
   Circuit Background Animation
   =========================== */
.circuit-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.circuit-line {
    position: absolute;
    opacity: 0.4;
}

/* Horizontal power lines from left */
.circuit-1 {
    width: 300px;
    height: 3px;
    top: 50%;
    left: 0;
    background: linear-gradient(90deg, var(--gold), transparent);
    animation: powerFlowToCore 3s ease-in-out infinite;
    animation-delay: 0s;
}

/* Horizontal power lines from right */
.circuit-2 {
    width: 300px;
    height: 3px;
    top: 50%;
    right: 0;
    background: linear-gradient(270deg, var(--gold), transparent);
    animation: powerFlowToCore 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* Vertical power lines from top */
.circuit-3 {
    width: 3px;
    height: 300px;
    left: 50%;
    top: 0;
    background: linear-gradient(180deg, var(--gold), transparent);
    animation: powerFlowToCore 3s ease-in-out infinite;
    animation-delay: 1s;
}

/* Vertical power lines from bottom */
.circuit-4 {
    width: 3px;
    height: 300px;
    left: 50%;
    bottom: 0;
    background: linear-gradient(0deg, var(--gold), transparent);
    animation: powerFlowToCore 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Diagonal power lines */
.diagonal-1,
.diagonal-2,
.diagonal-3,
.diagonal-4 {
    width: 400px;
    height: 3px;
    position: absolute;
    animation: powerFlowToCore 4s ease-in-out infinite;
}

.diagonal-1 {
    top: 25%;
    left: -100px;
    background: linear-gradient(45deg, var(--gold), transparent);
    transform: rotate(45deg);
    animation-delay: 2s;
}

.diagonal-2 {
    top: 75%;
    right: -100px;
    background: linear-gradient(135deg, var(--gold), transparent);
    transform: rotate(-45deg);
    animation-delay: 2.5s;
}

.diagonal-3 {
    top: 25%;
    right: -100px;
    background: linear-gradient(225deg, var(--gold), transparent);
    transform: rotate(45deg);
    animation-delay: 3s;
}

.diagonal-4 {
    top: 75%;
    left: -100px;
    background: linear-gradient(315deg, var(--gold), transparent);
    transform: rotate(-45deg);
    animation-delay: 3.5s;
}

/* Corner power lines */
.corner-1,
.corner-2,
.corner-3,
.corner-4 {
    width: 200px;
    height: 2px;
    position: absolute;
    background: linear-gradient(90deg, var(--gold), transparent);
    animation: powerFlowToCore 3.5s ease-in-out infinite;
}

.corner-1 {
    top: 10%;
    left: 10%;
    animation-delay: 4s;
}

.corner-2 {
    top: 10%;
    right: 10%;
    transform: scaleX(-1);
    animation-delay: 4.5s;
}

.corner-3 {
    bottom: 10%;
    left: 10%;
    animation-delay: 5s;
}

.corner-4 {
    bottom: 10%;
    right: 10%;
    transform: scaleX(-1);
    animation-delay: 5.5s;
}

/* Circuit nodes */
.circuit-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--gold);
    animation: nodeGlow 2s ease-in-out infinite alternate;
}

.node-1 { top: 20%; left: 15%; animation-delay: 0.5s; }
.node-2 { top: 20%; right: 15%; animation-delay: 1s; }
.node-3 { top: 50%; left: 10%; animation-delay: 1.5s; }
.node-4 { top: 50%; right: 10%; animation-delay: 2s; }
.node-5 { bottom: 20%; left: 15%; animation-delay: 2.5s; }
.node-6 { bottom: 20%; right: 15%; animation-delay: 3s; }
.node-7 { top: 10%; left: 50%; animation-delay: 3.5s; }
.node-8 { bottom: 10%; left: 50%; animation-delay: 4s; }

@keyframes powerFlowToCore {
    0% {
        opacity: 0.2;
        filter: brightness(0.5);
    }
    50% {
        opacity: 0.8;
        filter: brightness(1.5);
        box-shadow: 0 0 20px var(--gold);
    }
    100% {
        opacity: 0.2;
        filter: brightness(0.5);
    }
}

@keyframes nodeGlow {
    0% {
        opacity: 0.5;
        transform: scale(1);
        box-shadow: 0 0 10px var(--gold);
    }
    100% {
        opacity: 1;
        transform: scale(1.3);
        box-shadow: 0 0 25px var(--gold), 0 0 40px rgba(255, 215, 0, 0.3);
    }
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: var(--transition);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    padding-top: 80px; /* space for navbar */
    box-sizing: border-box;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gold-text {
    color: var(--gold);
    background: linear-gradient(45deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--gray-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--gold), var(--gold-light));
    color: var(--primary-black);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
}

.btn-secondary:hover {
    background: var(--gold);
    color: var(--primary-black);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-light);
}

/* Hero image + coin */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* coin + circuit container */
.hero-circuit {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatCoin 4s ease-in-out infinite;
}

/* SVG behind coin */
.circuit-svg {
    position: absolute;
    inset: 0;
    transform: scale(1.05);
}

/* golden traces inside hero coin */
.trace {
    fill: none;
    stroke: rgba(255, 215, 0, 0.35);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 12 10;
    stroke-dashoffset: 120;
    animation: traceFlow 6s linear infinite;
    opacity: 0.7;
    filter:
        drop-shadow(0 0 4px rgba(255, 215, 0, 0.4))
        drop-shadow(0 0 10px rgba(255, 215, 0, 0.15));
}

/* stagger lines */
.t-left1    { animation-delay: 0s; }
.t-left2    { animation-delay: 0.4s; }
.t-top1     { animation-delay: 0.8s; }
.t-top2     { animation-delay: 1.2s; }
.t-right1   { animation-delay: 1.6s; }
.t-right2   { animation-delay: 2s; }
.t-bottom1  { animation-delay: 2.4s; }
.t-bottom2  { animation-delay: 2.8s; }

@keyframes traceFlow {
    0% {
        stroke-dashoffset: 120;
        opacity: 0.3;
    }
    40% {
        opacity: 0.85;
    }
    100% {
        stroke-dashoffset: -40;
        opacity: 0.3;
    }
}

/* coin container */
.hero-logo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 3px solid var(--gold);
    box-shadow:
        0 0 25px rgba(255, 215, 0, 0.5),
        inset 0 0 18px rgba(0, 0, 0, 0.9);
    background: radial-gradient(circle, #000 40%, #111 100%);
    z-index: 2;
}

.hero-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

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

/* ===========================
   Sections
   =========================== */
section {
    padding: 5rem 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--gray-light);
}

/* About Section */
.about {
    background: var(--secondary-black);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--primary-black);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.1);
}

.card-icon {
    margin-bottom: 1.5rem;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--gold), var(--gold-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.about-card p {
    color: var(--gray-light);
    line-height: 1.6;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--secondary-black);
    padding: 2rem;
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--gold);
}

.service-card ul {
    list-style: none;
}

.service-card li {
    padding: 0.5rem 0;
    color: var(--gray-light);
    position: relative;
    padding-left: 1.5rem;
}

.service-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: bold;
}

/* Buy Token Section */
.buy-token {
    background: var(--secondary-black);
}

.token-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.token-card {
    background: var(--primary-black);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.token-card h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--gold);
    text-align: center;
}

.token-stats {
    margin-bottom: 2rem;
}

.token-stat {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.token-stat .label {
    color: var(--gray-light);
}

.token-stat .value {
    color: var(--white);
    font-weight: 600;
}

.contract-address {
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.token-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Roadmap */
.roadmap h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--gold);
    text-align: center;
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gold);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: 12px;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    border: 4px solid var(--primary-black);
}

.timeline-content h4 {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--gray-light);
    line-height: 1.6;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: var(--secondary-black);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.contact-card a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.contact-card a:hover {
    color: var(--gold);
}

.contact-form {
    background: var(--secondary-black);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--primary-black);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray);
}

/* Footer */
.footer {
    background: var(--secondary-black);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold);
}

.footer-description {
    color: var(--gray-light);
    line-height: 1.6;
}

.footer-section h4 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    padding: 0.5rem 1rem;
    background: var(--primary-black);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 25px;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gold);
    color: var(--primary-black);
    border-color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    color: var(--gray);
}

.disclaimer {
    font-size: 0.9rem;
    margin-top: 1rem;
    color: var(--gray);
}

/* Images loading animation */
img {
    transition: opacity 0.3s ease;
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* PCB fixed background */
.pcb-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background: radial-gradient(circle at 60% 50%, rgba(0,0,0,1) 40%, rgba(0,0,0,0.96) 100%);
}

.pcb-map {
    width: 100%;
    height: 100%;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        min-height: 100vh;
        padding-top: 90px;
        padding-bottom: 40px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.3rem;
        line-height: 1.3;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-logo {
        width: 200px;
        height: 200px;
    }

    .token-info {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .btn {
        width: 100%;
        max-width: 320px;
    }

    /* soften background effects on mobile for performance */
    .circuit-bg {
        opacity: 0.6;
    }
    .diagonal-1,
    .diagonal-2,
    .diagonal-3,
    .diagonal-4,
    .corner-1,
    .corner-2,
    .corner-3,
    .corner-4 {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
}
