:root {
    --bg-color: #0c0c0e;
    --card-bg: #161618;
    --accent-gold: #f1c40f;
    --accent-gold-glow: rgba(241, 196, 15, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #88888b;
    --radius: 12px;
    --font-mono: 'JetBrains Mono', monospace;
    --flap-width: 60px;
    --flap-height: 90px;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@700&family=Outfit:wght@300;600;800&display=swap');

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(241, 196, 15, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(241, 196, 15, 0.03) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Header */
header {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(12, 12, 14, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo-container img {
    height: 88px;
    transition: height 0.3s ease;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-gold);
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin-left: 2rem;
    padding: 10px;
    z-index: 1100;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--accent-gold);
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: #0a0a0c;
    z-index: 2000;
    padding: 120px 40px;
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-left: 1px solid rgba(241, 196, 15, 0.1);
}

.mobile-nav-overlay.active {
    right: 0;
}

.mobile-nav-overlay a {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.mobile-nav-overlay a:hover {
    color: var(--accent-gold);
}

@media (max-width: 900px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 5%;
    }

    .logo-container {
        margin-bottom: 1rem;
    }

    nav {
        width: 100%;
        justify-content: flex-end;
    }

    nav a:not(.btn-primary) {
        display: none; /* Hide standard links, use hamburger */
    }

    .logo-container img {
        height: 50px;
    }
}

/* Hero Section */
.story-hero-container {
    max-width: 900px;
    margin: 0 auto 3rem auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 20px rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.story-hero-container img {
    width: 100%;
    display: block;
    mix-blend-mode: luminosity;
    transition: mix-blend-mode 0.5s ease;
}

.story-hero-container:hover img {
    mix-blend-mode: normal;
}

.hero {
    padding: 8rem 5% 4rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.badge {
    display: inline-block;
    background: rgba(241, 196, 15, 0.1);
    color: var(--accent-gold);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    border: 1px solid rgba(241, 196, 15, 0.2);
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.hero-title .highlight {
    color: var(--accent-gold);
    background: linear-gradient(to bottom, var(--accent-gold), #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subheadline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.btn-primary {
    display: inline-block;
    background: var(--accent-gold);
    color: #000;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(241, 196, 15, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(241, 196, 15, 0.5);
    background: #ffdb4d;
}

/* Flip-Flap Integration */
.flip-flap-section {
    margin: 4rem 0;
    display: flex;
    justify-content: center;
}

.flip-flap-container {
    display: grid;
    grid-template-columns: repeat(15, 50px);
    gap: 4px;
    perspective: 1000px;
    width: fit-content;
    margin: 0 auto;
}

.flap {
    width: 50px;
    height: 75px;
    background-color: var(--card-bg);
    border-radius: 4px;
    position: relative;
    font-family: var(--font-mono);
    font-size: 3rem;
    color: #f5f5f7;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

.flap-unit {
    position: absolute;
    width: 100%;
    height: 50%;
    left: 0;
    overflow: hidden;
    background-color: #1a1a1c;
    backface-visibility: hidden;
}

.flap-unit span {
    position: absolute;
    width: 100%;
    height: var(--flap-height);
    display: flex;
    justify-content: center;
    align-items: center;
    left: 0;
}

.flap-top {
    top: 0;
    border-radius: 8px 8px 0 0;
    z-index: 1;
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

.flap-top span { top: 0; }

.flap-bottom {
    bottom: 0;
    border-radius: 0 0 8px 8px;
    z-index: 0;
}

.flap-bottom span { top: -37.5px; }

.flap-leaf {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: 10;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom center;
    transform-style: preserve-3d;
}

.flap-leaf-front {
    background-color: #1a1a1c;
    border-radius: 8px 8px 0 0;
    z-index: 2;
    backface-visibility: hidden;
}

.flap-leaf-back {
    background-color: #1a1a1c;
    border-radius: 0 0 8px 8px;
    transform: rotateX(-180deg);
    z-index: 1;
    backface-visibility: hidden;
}

.flap-leaf-front span { top: 0; }
.flap-leaf-back span { top: -37.5px; }

.flipping .flap-leaf {
    transform: rotateX(-180deg);
}

/* Features Grid */
.features {
    padding: 6rem 5%;
    background: linear-gradient(to bottom, transparent, rgba(241, 196, 15, 0.02));
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(241, 196, 15, 0.2);
}

.feature-tag {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.feature-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.vault-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: left;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-family: var(--font-mono);
    color: var(--accent-gold);
    font-weight: 700;
}

/* Footer */
footer {
    padding: 6rem 5%;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.footer-sub {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer-btn {
    background: transparent; 
    border: 2px solid var(--accent-gold); 
    color: var(--accent-gold);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

.footer-btn:hover {
    background: var(--accent-gold);
    color: #000;
}

@media (max-width: 1100px) {
    .flip-flap-container {
        transform: scale(0.8);
        transform-origin: center;
    }
}

@media (max-width: 900px) {
    .flip-flap-container {
        transform: scale(0.6);
        transform-origin: center;
    }
}

@media (max-width: 600px) {
    .hero { padding-top: 2rem; }
    .flip-flap-container {
        transform: scale(0.45);
        transform-origin: center;
    }
}
