@import url('https://fonts.googleapis.com/css2?family=Proza+Libre:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    --cream: #F2D29C;
    --brown: #330E05;
    --dark-brown: #1a0701;
    --white: #FFFFFF;
    --gold: #d4af37;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Proza Libre', sans-serif;
    background-color: var(--dark-brown);
    background-image: linear-gradient(180deg, var(--dark-brown) 0%, var(--brown) 100%);
    color: var(--white);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* SLEEK UNIFIED HEADER & NAV */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(26, 7, 1, 0.95);
    border-bottom: 2px solid var(--cream);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.nav-brand img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    border: 2px solid var(--cream);
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--cream);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px #000;
}

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

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--cream);
}

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

/* HERO SECTION */
.hero {
    padding: 6rem 0;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    width: 100%;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--cream);
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: var(--cream);
    color: var(--brown);
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(242, 210, 156, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(242, 210, 156, 0.6);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 300px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    border: 3px solid var(--cream);
}

/* SECTION HEADERS */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--cream);
    margin: 4rem 0 3rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* GAME MODES */
.game-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.feature-box {
    background-color: rgba(242, 210, 156, 0.05);
    border: 2px solid rgba(242, 210, 156, 0.2);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(5px);
}

.feature-box:hover {
    transform: translateY(-5px);
    border-color: var(--cream);
    background-color: rgba(242, 210, 156, 0.1);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.feature-box h3 {
    color: var(--cream);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.feature-box p {
    color: var(--white);
    font-size: 1.1rem;
}

.badge {
    display: inline-block;
    background-color: var(--cream);
    color: var(--brown);
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    vertical-align: middle;
    margin-left: 8px;
    font-weight: 800;
}

/* NOTEBOOK GALLERY */
.gallery-section {
    padding-bottom: 5rem;
}

.notebook-gallery {
    position: relative;
    width: 320px;
    height: 580px;
    margin: 0 auto;
    perspective: 1500px;
    transform-origin: left center;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.notebook-gallery.book-open {
    transform: translateX(160px);
}

.notebook-gallery::before {
    content: '';
    position: absolute;
    top: -15px;
    bottom: -15px;
    left: -20px;
    width: 40px;
    background: linear-gradient(to right, #0a0300, #330E05, #0a0300);
    border-radius: 10px;
    z-index: 0;
    box-shadow: inset 2px 0 5px rgba(255,255,255,0.1), 5px 0 15px rgba(0,0,0,0.8);
}

.notebook-page {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform-origin: left center;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    cursor: pointer;
    border-radius: 3px 20px 20px 3px;
    transform-style: preserve-3d;
}

.page-front, .page-back {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    backface-visibility: hidden;
    overflow: hidden;
}

.page-front {
    box-shadow: 5px 10px 25px rgba(0,0,0,0.6);
    border-radius: 3px 20px 20px 3px;
}

.page-back {
    background-color: var(--cream);
    transform: rotateY(180deg);
    box-shadow: -5px 10px 25px rgba(0,0,0,0.6);
    border: 3px solid var(--brown);
    border-right: none;
    border-radius: 20px 3px 3px 20px; /* Rounded on the outside, sharp on the spine */
    background-image: repeating-linear-gradient(rgba(51, 14, 5, 0.1) 0, rgba(51, 14, 5, 0.1) 1px, transparent 1px, transparent 25px);
    background-position: 0 35px;
}

.page-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid var(--cream);
    border-left: none; /* spine side */
    border-radius: 3px 20px 20px 3px;
}

.back-content {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--brown);
}

.back-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-weight: 800;
    border-bottom: 3px solid var(--brown);
    padding-bottom: 0.5rem;
    text-shadow: none;
}

.back-content p {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.8;
    color: var(--brown);
}

.notebook-controls {
    text-align: center;
    margin-top: 3rem;
}

.notebook-controls button {
    background: linear-gradient(to bottom, var(--cream), #d6b278);
    color: var(--brown);
    border: 2px solid var(--white);
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-family: 'Proza Libre', sans-serif;
    font-weight: 800;
    border-radius: 25px;
    cursor: pointer;
    margin: 0 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    text-transform: uppercase;
}

.notebook-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.7), 0 0 15px rgba(242, 210, 156, 0.5);
}

.visuals-details {
    text-align: center;
    max-width: 800px;
    margin: 3rem auto 0 auto;
}

.visuals-details p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* CARDS FOR TERMS/PRIVACY */
.legal-card {
    background-color: var(--cream);
    color: var(--brown);
    padding: 4rem;
    border-radius: 20px;
    margin: 4rem auto;
    max-width: 900px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.legal-card h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    color: var(--brown);
    margin-top: 0;
    margin-bottom: 1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(242, 210, 156, 0.2);
    color: rgba(255,255,255,0.6);
    background-color: var(--dark-brown);
}

/* MOBILE */
@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        gap: 15px;
        padding: 1rem;
    }
    .hero {
        padding: 3rem 0;
    }
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    .section-title {
        font-size: 1.8rem;
        margin: 2rem 0 2rem 0;
    }
    .feature-box {
        padding: 1.5rem;
    }
    .feature-icon {
        font-size: 2.5rem;
    }
    .feature-box h3 {
        font-size: 1.3rem;
    }
    .feature-box p {
        font-size: 1rem;
    }
    .visuals-details p {
        font-size: 1rem;
    }
    
    .notebook-gallery {
        width: 150px;
        height: 270px;
        transform-origin: center center; /* Resetting origin since we don't scale anymore */
    }
    
    .notebook-gallery.book-open {
        transform: translateX(75px);
    }

    .back-content {
        padding: 1.5rem 1rem;
    }
    
    .back-content h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.2rem;
        border-bottom-width: 2px;
    }
    
    .back-content p {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .notebook-controls {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        margin-top: 2rem;
    }

    .notebook-controls button {
        margin: 0;
        width: auto;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

.legal-card h4 {
    color: var(--brown);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.legal-card hr {
    border: 0;
    height: 2px;
    background: var(--brown);
    margin: 1.5rem 0; /* Reduced spacing */
    opacity: 0.2;
}

.legal-card ul {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem; /* Reduced indent */
}

@media (max-width: 768px) {
    .legal-card {
        padding: 1.2rem;
        margin: 2rem auto;
    }
    
    .legal-card h2 {
        font-size: 1.8rem;
    }
    
    .legal-card h3 {
        font-size: 1.4rem;
        margin-top: 1.5rem;
    }
    
    .legal-card h4 {
        font-size: 1.1rem;
    }
    
    .legal-card p, .legal-card ul {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .legal-card hr {
        margin: 1rem 0;
    }
}
