@font-face {
    font-family: 'Winter Draw';
    src: url('fonts/Winter Draw.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* --- TOKENS --- */
:root {
    --bg-paper: #F4F1EA;
    --bg-card: #EBE6DC;
    --ink: #1C1917;
    --ink-light: #44403C;
    --accent-color: #A3C9A8;
    /* soft sage green */

    --font-copy: 'Winter Draw', sans-serif;
    --font-heading: 'Winter Draw', sans-serif;
}

/* --- RESET --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
    /* Winter Draw is often small, let's bump the base size */
}

body {
    font-family: var(--font-copy);
    background: var(--bg-paper);
    color: var(--ink);
    overflow-x: hidden;
    line-height: 1.6;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
}

::selection {
    background: var(--accent-color);
    color: var(--ink);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-paper);
}

::-webkit-scrollbar-thumb {
    background: var(--ink-light);
    border-radius: 4px;
}

/* =========================================
   NAVBAR 
   ========================================= */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(244, 241, 234, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 2px solid var(--ink);
    transition: all 0.3s;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.8rem;
    color: var(--ink);
}

.nav-logo img {
    width: 45px;
    height: 45px;
    border-radius: 5px;
    border: 2px solid var(--ink);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 1.4rem;
    color: var(--ink);
    position: relative;
    padding: 0.2rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-cta-mobile {
    display: none;
}

.nav-socials-desktop {
    display: none;
}

.nav-socials-mobile {
    display: none;
}

.nav-cta {
    font-size: 1.4rem;
    padding: 0.4rem 1.2rem;
    background: transparent;
    border: 2px solid var(--ink);
    border-radius: 0;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--ink);
    color: var(--bg-paper);
}

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    /* Above mobile menu */
}

.hamburger .bar {
    width: 100%;
    height: 3px;
    background-color: var(--ink);
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding: 0.6rem 2rem;
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--ink);
    color: var(--bg-paper);
}

.btn-primary:hover {
    background: var(--ink-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.btn-xl {
    font-size: 1.8rem;
    padding: 0.8rem 2.5rem;
}

/* =========================================
   HERO
   ========================================= */
/* Video Backgrounds */
.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

.bg-video.loaded {
    opacity: 0.15;
}

#hero,
#tokenomics {
    position: relative;
    overflow: hidden;
}

#hero .hero-inner,
#tokenomics .container {
    position: relative;
    z-index: 1;
}

#hero {
    position: relative;
    padding-top: 100px;
    border-bottom: 2px solid var(--ink);
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    gap: 4rem;
    min-height: 80vh;
}

.hero-left {
    flex: 1;
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 1;
    margin-bottom: 2rem;
    color: var(--ink);
}

.hero-sub {
    font-size: 1.8rem;
    color: var(--ink-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Contract Copy */
.hero-ca-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.ca-label {
    font-size: 1.4rem;
}

.ca-pill {
    display: flex;
    align-items: center;
    border: 2px dashed var(--ink);
    background: transparent;
    padding: 0.4rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    gap: 1rem;
}

.ca-pill:hover {
    background: rgba(0, 0, 0, 0.03);
}

.ca-icon {
    border-left: 2px dashed var(--ink);
    padding-left: 1rem;
}

/* Social Logos */
.hero-socials {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid var(--ink);
    border-radius: 5px;
    color: var(--ink);
    transition: all 0.2s;
}

.social-icon:hover {
    background: var(--ink);
    color: var(--bg-paper);
    transform: translateY(-3px) rotate(5deg);
}

/* Hero Image */
.hero-img-wrap {
    position: relative;
    max-width: 500px;
}

.hero-img {
    width: 100%;
    border: 3px solid var(--ink);
    border-radius: 2px;
    box-shadow: 10px 10px 0 var(--accent-color);
}

/* =========================================
   SHARED SECTION FORMATTING
   ========================================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-divider {
    border-bottom: 2px solid var(--ink);
}

.sec-heading {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 4.5rem);
    color: var(--ink);
    margin-bottom: 3rem;
    line-height: 1.1;
    letter-spacing: 2px;
}

.sec-heading.white {
    color: var(--bg-paper);
}

.sec-heading.center {
    text-align: center;
}

/* =========================================
   ABOUT 
   ========================================= */
.about-wrap {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.polaroid {
    background: var(--bg-paper);
    padding: 15px 15px 50px;
    border: 2px solid var(--ink);
    box-shadow: 12px 12px 0 var(--ink);
    transform: rotate(-3deg);
    transition: transform 0.3s;
}

.polaroid:hover {
    transform: rotate(1deg);
}

.polaroid img {
    border: 2px solid var(--ink);
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.polaroid-caption {
    font-size: 1.6rem;
    text-align: center;
    margin-top: 15px;
    color: var(--ink);
}

.about-text-col p {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--ink-light);
}

.about-text-col .btn {
    margin-top: 1rem;
}

/* =========================================
   HOW TO BUY
   ========================================= */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.step-card {
    background: var(--bg-card);
    border: 2px solid var(--ink);
    padding: 2.5rem 1.5rem 1.5rem;
    position: relative;
    transition: transform 0.2s;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-num {
    position: absolute;
    top: -20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: var(--accent-color);
    border: 2px solid var(--ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--ink);
}

.step-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.step-card p {
    font-size: 1.2rem;
    color: var(--ink-light);
}

.htb-art {
    display: flex;
    justify-content: center;
}

.htb-img {
    max-width: 400px;
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    transform: rotate(2deg);
}

/* =========================================
   TOKENOMICS
   ========================================= */
.toke-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.toke-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.toke-card {
    border: 2px solid var(--ink);
    border-radius: 2px;
    padding: 2rem 1rem;
    text-align: center;
    background: var(--bg-paper);
    transition: background 0.2s;
}

.toke-card:hover {
    background: var(--bg-card);
}

.toke-label {
    font-size: 1.4rem;
    color: var(--ink-light);
    margin-bottom: 0.5rem;
}

.toke-val {
    font-size: 2rem;
    color: var(--ink);
}

.toke-art img {
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 var(--accent-color);
}

/* =========================================
   MEME GALLERY
   ========================================= */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    cursor: pointer;
    border: 2px solid var(--ink);
    background: var(--bg-paper);
    padding: 5px;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.05) rotate(1deg);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid var(--ink);
}

.gallery-see-more {
    display: none;
    justify-content: center;
    margin-top: 2rem;
}

/* =========================================
   CTA & FOOTER BLEND
   ========================================= */
#cta {
    position: relative;
    background: transparent;
    overflow: hidden;
    padding-top: 6rem;
}

.cta-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
    opacity: 0.8;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--bg-paper) 0%, rgba(28, 25, 23, 0.4) 50%, var(--ink) 100%);
    z-index: 1;
}

.cta-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding-bottom: 3rem;
}

#footer {
    position: relative;
    background: var(--ink);
    color: var(--bg-paper);
    padding: 2rem 2rem;
    z-index: 2;
}

.cta-sub.white {
    color: rgba(244, 241, 234, 0.8);
}

.white-border {
    border-color: var(--bg-paper);
    color: var(--bg-paper);
}

.white-border:hover {
    background: var(--bg-paper);
    color: var(--ink);
}

/* Fireflies */
.fireflies {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.fireflies::before,
.fireflies::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px 2px var(--accent-color), 0 0 20px 5px var(--bg-paper);
    animation: flyBefore 15s ease-in-out infinite alternate;
}

.fireflies::after {
    width: 4px;
    height: 4px;
    background: #fff;
    animation: flyAfter 18s ease-in-out infinite alternate;
}

@keyframes flyBefore {
    0% {
        transform: translate(10vw, 80px) scale(0.8);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    50% {
        transform: translate(50vw, -40px) scale(1.2);
        opacity: 0.4;
    }

    80% {
        opacity: 0.9;
    }

    100% {
        transform: translate(90vw, 60px) scale(0.6);
        opacity: 0;
    }
}

@keyframes flyAfter {
    0% {
        transform: translate(80vw, -20px) scale(0.5);
        opacity: 0;
    }

    30% {
        opacity: 0.7;
    }

    60% {
        transform: translate(30vw, 50px) scale(1.4);
        opacity: 0.9;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translate(10vw, -30px) scale(1);
        opacity: 0;
    }
}

.footer-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-mascot {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    border: 2px solid var(--bg-paper);
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    font-size: 1.4rem;
    color: var(--bg-paper);
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--bg-paper);
    transition: transform 0.2s;
}

.footer-social a:hover {
    transform: translateY(-3px);
}

.footer-disc {
    font-size: 1rem;
    opacity: 0.6;
    text-align: center;
    margin-bottom: 1rem;
    border-top: 1px dotted rgba(244, 241, 234, 0.3);
    padding-top: 1rem;
}

.footer-copy {
    text-align: center;
    font-size: 1.2rem;
    opacity: 0.8;
}

/* =========================================
   LIGHTBOX
   ========================================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 25, 23, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border: 4px solid var(--bg-paper);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lb-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--bg-paper);
    font-size: 3rem;
    cursor: pointer;
    font-family: sans-serif;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 968px) {
    .nav-socials-desktop {
        display: none !important;
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-actions,
    .hero-ca-wrap,
    .hero-socials {
        justify-content: center;
    }

    .about-wrap,
    .toke-layout {
        grid-template-columns: 1fr;
    }

    .about-img-col {
        order: -1;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 14px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-paper);
        background-image: url('assets/nav-mobile-bg.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: right 0.3s ease;
        border-left: 2px solid var(--ink);
    }

    .nav-links::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(244, 241, 234, 0.85);
        z-index: -1;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 2rem;
    }

    .nav-socials-mobile {
        display: flex;
        gap: 2rem;
        margin-top: 1rem;
    }

    .nav-socials-mobile a {
        border-bottom: none !important;
    }

    .nav-socials-mobile a::after {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .nav-cta-mobile {
        display: block;
        margin-top: 2rem;
        border: 2px solid var(--ink);
        padding: 0.5rem 2rem;
    }

    .hamburger {
        display: flex;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .toke-cards {
        grid-template-columns: 1fr;
    }

    .cta-bg-image {
        background-attachment: scroll;
    }

    .gallery.collapsed {
        max-height: 520px;
        overflow: hidden;
        position: relative;
    }

    .gallery.collapsed::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100px;
        background: linear-gradient(to bottom, transparent, var(--bg-paper));
        pointer-events: none;
    }

    .gallery-see-more {
        display: flex;
    }
}