:root {
    --bg: #0c0a1a;
    --ink: #f5f7ff;
    --muted: rgba(255, 255, 255, .75);
    --primary: #7b4dff;
    --secondary: #00c7ff;
    --peach: #ffad66;
    --card: rgba(255, 255, 255, .06);
    --border: rgba(255, 255, 255, .12);
    --success: #3bd184;
    --warning: #ffe6a6;
    --danger: #ff6b6b;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.6;
    background: radial-gradient(1100px 800px at 10% -10%, rgba(123, 77, 255, .16), transparent 60%), radial-gradient(900px 600px at 92% 8%, rgba(0, 199, 255, .14), transparent 60%), radial-gradient(700px 480px at 50% 120%, rgba(255, 173, 102, .14), transparent 65%), var(--bg);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .9rem 1.4rem;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: .2px;
    transition: .25s;
    text-align: center;
    min-height: 44px;
    /* Touch-friendly size */
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #0b1220
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary)
}

.btn-outline:hover {
    background: var(--primary);
    color: #0b1220
}

.pill {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .06);
    border-radius: 999px;
    padding: .35rem .7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.muted {
    color: var(--muted)
}

.shadow {
    filter: drop-shadow(0 10px 30px rgba(123, 77, 255, .35))
}

section {
    padding: 3rem 0;
}

/* Header */
/* header {
            position: fixed;
            width:100%;
            top: 0;
            z-index: 999;
            background: rgba(12,10,26,.78);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border);
            
        }

        .nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: .9rem 0;
            position: fixed;
            width:100%;
            padding:10px ;
            
            margin-bottom:10px;
        } */
/* Keep header fixed (or use sticky if you prefer), but DO NOT fix .nav as well */
header {
    position: fixed;
    padding: 10px !important;
    /* you can also use: position: sticky; top:0; */
    top: 0;
    width: 100%;
    z-index: 999;
    background: rgba(12, 10, 26, .78);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

/* Remove fixed positioning from .nav */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 0;
    /* remove: position: fixed; width:100%; padding:10px; margin-bottom:10px; */
}

.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    z-index: 1000;
}

.brand img {
    width: 44px;
    height: 44px;
}

.brand .t {
    font-weight: 900;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 1.05rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav a:hover,
.nav a.is-active {
    color: var(--secondary)
}

.hamburger {
    display: none;
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1000;
    margin-bottom: 10px;
}

/* Hero */
.hero {
    position: relative;
    padding: 5rem 0 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 1.6rem;
    align-items: center
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    margin: 0 0 .8rem;
    line-height: 1.2;
}

.hero p {
    max-width: 640px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.hero .logo {
    width: min(360px, 60%);
    margin: 0 auto
}

.stamp-row {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: 1rem
}

.stamp {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .06);
    padding: .4rem .7rem;
    border-radius: 10px;
    font-size: 0.85rem;
}

/* KPI */
.kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.kpi {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
}

.kpi .n {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, var(--secondary), var(--peach));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Titles + Cards */
.title {
    text-align: center;
    margin-bottom: 2.2rem;
}

.title h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.grid {
    display: grid;
    gap: 1.2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.2rem;
}

.card h3 {
    margin: .2rem 0 .5rem;
    font-size: 1.2rem;
}

.icon {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: .4rem;
}

/* Intro */
.intro {
    background: rgba(255, 255, 255, .04);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border)
}

.intro-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 1.2rem;
    align-items: start;
}

.kw {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin-top: .8rem;
}

.kw .k {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .7rem;
    font-weight: 800;
    font-size: 0.9rem;
}

/* Swap */
.swap-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 1.2rem;
}

.swap-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.1rem;
}

.swap-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .6rem;
    align-items: center;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .75rem;
}

.swap-row input {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.05rem;
    outline: none;
    width: 100%;
}

.swap-row select {
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 10px;
    padding: .45rem .6rem;
}

/* dApp chips (logos) */
.chips {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .06);
    padding: .45rem .65rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
}

.chip img {
    width: 18px;
    height: 18px;
    filter: invert(1) brightness(2);
}

/* Exchange logos row */
.logo-row {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
}

.ex {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .7rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .06);
    font-size: 0.9rem;
}

.ex img {
    width: 22px;
    height: 22px;
    filter: invert(1) brightness(2);
}

.ex span {
    font-weight: 800;
    font-size: .9rem;
}

/* Staking */
.stake-tabs {
    display: flex;
    gap: .8rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tab {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .06);
    padding: .5rem .9rem;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.tab.active {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #0b1220;
}

.stake-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.stake-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.1rem;
}

.row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .6rem;
    align-items: center;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .75rem;
    margin: .5rem 0;
}

.row input {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.05rem;
    outline: none;
    width: 100%;
}

.meta {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    font-size: .9rem;
    margin: .4rem 0;
}

.actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Roadmap */
.filters {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter {
    cursor: pointer;
    white-space: nowrap;
}

.filter.active {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #0b1220;
    border-color: transparent;
}

.roadmap .timeline {
    position: relative;
    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

.roadmap .timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(123, 77, 255, 0) 0%, rgba(123, 77, 255, .7) 20%, rgba(0, 199, 255, .7) 80%, rgba(0, 199, 255, 0) 100%);
    transform: translateX(-50%);
}

.rm {
    display: flex;
    gap: 18px;
    margin: 36px 0;
}

.rm .side {
    flex: 1 1 50%;
}

.rm:nth-child(odd) {
    flex-direction: row-reverse;
}

.rm:nth-child(even) {
    flex-direction: row;
}

.wave {
    position: relative;
    width: max(280px, 58%);
    padding: 20px 22px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .04));
    border: 1px solid var(--border);
}

.badge {
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
}

.badge span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    border: 4px solid rgba(255, 255, 255, .14);
}

.pin {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--peach));
}

.h {
    margin: .1rem 0 .4rem;
    font-weight: 900;
    font-size: 1.3rem;
}

.h em {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
    background: #bfefff;
    color: #0b1220;
    margin-left: .4rem;
}

.list {
    margin: .4rem 0 0;
    padding-left: 1.1rem;
    opacity: .9;
    font-size: 0.95rem;
}

.list li {
    margin-bottom: 0.3rem;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: .45s;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

.metaR {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .6rem;
}

.q {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .06);
    border-radius: 8px;
    padding: .2rem .5rem;
    font-weight: 800;
    font-size: .75rem;
}

/* Whitepaper */
.whitepaper .meta {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.whitepaper .download {
    display: flex;
    gap: .6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

details {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

summary {
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    padding: 0.5rem;
}

summary::-webkit-details-marker {
    display: none;
}

.toc {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin-top: 1rem;
}

.paper-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .8rem;
    font-size: 0.9rem;
}

/* CTA & Footer */
.cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, .15);
    border-bottom: 1px solid rgba(255, 255, 255, .15);
}

footer {
    background: #080612;
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 2rem 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.back {
    position: fixed;
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: #bfefff;
    color: #0b1220;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: .3s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    cursor: pointer;
    z-index: 999;
}

.back.show {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 5%;
    }

}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .intro-grid,
    .swap-grid {
        grid-template-columns: 1fr;
    }

    .stake-panels {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 900px) {
    .roadmap .timeline::before {
        left: 30px;
        transform: none;
    }

    .rm,
    .rm:nth-child(odd),
    .rm:nth-child(even) {
        flex-direction: row;
    }

    .rm .side:first-child {
        flex: 0 0 60px;
    }

    .pin {
        left: 30px;
    }

    .badge {
        left: 30px;
        transform: translate(-50%, -50%);
    }

    .wave {
        width: 100%;
        margin-left: 30px;
    }

    .toc {
        grid-template-columns: 1fr;
    }

}

/* @@media (max-width: 768px) {
            section

        {
            padding: 2rem 0;
        }

        .hamburger {
            display: block;
        }

        .nav ul {
            position: fixed;
            top: 70px;
            left: 0;
            right: 0;
            background: rgba(12,10,26,.98);
            backdrop-filter: blur(10px);
            flex-direction: column;
            border-bottom: 1px solid var(--border);
            padding: 1rem;
            transform: translateY(-100%);
            transition: transform 0.3s ease;
            z-index: 999;
        }

            .nav ul.open {
                transform: translateY(0);
            }

            .nav ul li {
                width: 100%;
                text-align: center;
            }

            .nav ul a {
                display: block;
                padding: 1rem;
            }

        .kw {
            grid-template-columns: 1fr;
        }

        .grid-3, .grid-2 {
            grid-template-columns: 1fr;
        }

        .hero {
            padding: 4rem 0 2rem;
        }

        .stamp-row {
            justify-content: center;
        }

        .kpis {
            grid-template-columns: 1fr;
        }

        .footer-links {
            flex-direction: column;
            align-items: center;
        }

        } */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav ul {
        position: fixed;
        top: 70px;
        /* below header */
        left: 0;
        right: 0;
        background: rgba(12, 10, 26, .98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-self: end;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        transform: translateY(-100%);
        transition: transform .3s ease, visibility .3s ease;
        z-index: 999;
        /* NEW: prevent peeking & clicks while closed */
        visibility: hidden;
        pointer-events: none;
        overflow: hidden;
        /* hides any single-item "peek" */
        max-height: 100vh;
    }
    
    .nav ul.open {
        width: 200px;
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
        max-height: 100vh;
    }

    .nav ul li {
        width: 100%;
        text-align:center;
    }

    .nav ul a {
        display: block;
        padding: 1rem;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .brand .t {
        font-size: 1.1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    .stake-tabs {
        flex-direction: column;
        width: 100%;
    }

    .tab {
        width: 100%;
        justify-content: center;
    }

    .actions {
        flex-direction: column;
    }

    .footer-links {
        gap: 0.5rem;
    }

    .footer-links .pill {
        font-size: 0.85rem;
    }

    .filters {
        justify-content: flex-start;
    }

    .wave {
        padding: 15px;
    }

    .h {
        font-size: 1.1rem;
    }

    .status {
        display: block;
        margin: 0.5rem 0 0;
    }

}

@media (max-width: 360px) {
    .brand .t {
        display: none;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .stamp {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .chip,
    .ex {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

}

/* Prevent horizontal scrolling */
body,
html {
    overflow-x: hidden;
    width: 100%;
}
.success-box {
  margin-top: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(59, 209, 132, 0.1), rgba(59, 209, 132, 0.05));
  border: 1px solid rgba(59, 209, 132, 0.4);
  color: var(--success, #3bd184);
  font-size: 0.9rem;
}
.scan-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
}
.scan-link:hover {
  text-decoration: underline;
}
