/* ---------- DESIGN TOKENS ---------- */
:root {
    /* Monochrome Palette */
    --color-bg: #050505;
    --color-surface: #0f0f0f;
    --color-surface-elevated: #1a1a1a;
    --color-text-primary: #ffffff;
    --color-text-secondary: #aaaaaa;
    --color-text-muted: #555555;

    --color-border: rgba(255, 255, 255, 0.1);
    --color-accent: #ffffff;
    --color-accent-hover: #cccccc;

    /* Typography */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --section-padding: 120px 24px;

    /* Animation */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

::selection {
    background-color: var(--color-text-primary);
    color: var(--color-bg);
}

/* ---------- UTILITIES ---------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

.section-padding {
    padding: var(--section-padding);
}

.text-center {
    text-align: center;
}

/* Texture Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ---------- TYPOGRAPHY ---------- */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 2rem;
}

.body-large {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
}

.body-text {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.3s var(--ease-out-expo);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-primary);
    border-color: var(--color-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--color-text-primary);
    transform: translateY(-2px);
}

.btn-icon {
    transition: transform 0.3s;
}

.btn:hover .btn-icon {
    transform: translate(2px, -2px);
}

/* ---------- HERO SECTION ---------- */
.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    /* Extra height for desktop parallax */
    z-index: 0;
    pointer-events: none;
}

/* Both video and fallback img always fill the hero fully */
.hero-bg img,
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    object-fit: cover;
    object-position: center center;
    opacity: 0.65;
    filter: grayscale(100%) contrast(1.2) brightness(0.75);
}

.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--color-bg) 100%);
    background: linear-gradient(to bottom,
            rgba(5, 5, 5, 0.7) 0%,
            rgba(5, 5, 5, 0) 40%,
            rgba(5, 5, 5, 0) 60%,
            rgba(5, 5, 5, 1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    margin-top: 10vh;
    /* Push slightly down relative to image logic */
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- ABOUT SECTION ---------- */
.about {
    background-color: var(--color-bg);
    position: relative;
    z-index: 2;
}

.about-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.separator {
    width: 60px;
    height: 2px;
    background-color: var(--color-accent);
    margin: 2rem auto;
}

/* ---------- PHILOSOPHY SECTION ---------- */
.philosophy {
    position: relative;
    background-color: var(--color-bg);
    background-image: url('bg.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    overflow: hidden;
    padding: 150px 24px;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

/* Dark overlay so text stays legible */
.philosophy::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(5, 5, 5, 0.75) 0%,
            rgba(5, 5, 5, 0.55) 50%,
            rgba(5, 5, 5, 0.75) 100%);
    filter: grayscale(100%);
    z-index: 0;
}

/* Ensure content sits above overlay */
.philosophy .container,
.philosophy-stack,
.gradient-sphere,
.dust-particles {
    position: relative;
    z-index: 1;
}

.philosophy-stack {
    display: flex;
    flex-direction: column;
    gap: 15vh;
}

.phil-statement {
    display: flex;
    width: 100%;
}

.phil-statement.align-right {
    justify-content: flex-end;
    text-align: right;
}

.phil-statement.center {
    justify-content: center;
    text-align: center;
}

.phil-statement h3 {
    font-size: clamp(2rem, 4vw, 4rem);
    color: var(--color-text-secondary);
    max-width: 800px;
    transition: color 0.5s;
}

.phil-statement.is-active h3 {
    color: var(--color-text-primary);
}

.text-glow {
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

/* Cinematic BG depth */
.gradient-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- TOKEN SECTION ---------- */
.token {
    background-color: var(--color-bg);
    position: relative;
    z-index: 2;
}

.token-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 3rem;
    color: var(--color-text-secondary);
}

.contract-box {
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    padding: 2.5rem;
    border-radius: 4px;
    display: inline-block;
    max-width: 100%;
}

.contract-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
}

.contract-address-wrapper {
    display: flex;
    align-items: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 1rem;
    border-radius: 2px;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

#contract-address {
    font-family: monospace;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--color-text-primary);
    word-break: break-all;
    user-select: all;
}

.copy-btn {
    background: var(--color-text-primary);
    color: var(--color-bg);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: var(--color-accent-hover);
}

.copy-btn.copied {
    background: #4caf50;
    color: white;
}

/* ---------- FOOTER ---------- */
.footer {
    border-top: 1px solid var(--color-border);
    padding: 3rem 24px;
    background-color: var(--color-bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-primary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s;
}

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

/* ---------- RESPONSIVE ---------- */

/* Tablet & Mobile (≤ 768px) */
@media (max-width: 768px) {

    /* Globals */
    :root {
        --section-padding: 80px 20px;
    }

    /* Hero */
    .hero {
        min-height: 100svh;
        align-items: flex-end;
        padding-bottom: 10vh;
    }

    .hero-content {
        margin-top: 0;
        padding: 0 16px;
    }

    .hero-title {
        font-size: clamp(2.4rem, 12vw, 4rem);
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4.5vw, 1.4rem);
        margin-bottom: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    /* About section */
    .about-grid {
        text-align: center;
    }

    .section-title {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .body-large {
        font-size: 1.05rem;
    }

    .body-text {
        font-size: 1rem;
    }

    /* Philosophy section */
    .philosophy {
        padding: 100px 20px;
        background-attachment: scroll;
        /* fixed doesn't work on iOS */
    }

    .philosophy-stack {
        gap: 10vh;
    }

    .phil-statement,
    .phil-statement.align-right,
    .phil-statement.center {
        justify-content: center;
        text-align: center;
    }

    .phil-statement h3 {
        font-size: clamp(1.6rem, 8vw, 3rem);
    }

    /* Token section */
    .token-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .contract-box {
        padding: 1.25rem;
        width: 100%;
    }

    .contract-label {
        font-size: 0.7rem;
        letter-spacing: 0.15em;
    }

    .contract-address-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    #contract-address {
        font-size: 0.78rem;
        word-break: break-all;
        text-align: center;
    }

    .copy-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 20px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
    }

    .footer-brand {
        font-size: 1.2rem;
    }

    .footer-links {
        gap: 1.5rem;
    }
}

/* Small phones (≤ 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2rem, 13vw, 3rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        max-width: 100%;
    }

    #contract-address {
        font-size: 0.7rem;
    }
}