/* Base Reset & Variables */
:root {
    --bg-color: #f4f5f0;
    /* Warm off-white, paper-like */
    --text-primary: #1a1a1a;
    --text-secondary: #555;
    --accent-green: #2d4f1e;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --sidebar-width: 35vw;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.8;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 10;
    overflow: hidden;
    /* Ensure zoomed image stays within bounds */
}

/* Animated Background Layer */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/roseiben.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    /* Behind content */
    animation: kenburns 60s infinite alternate linear;
    filter: contrast(1.2) brightness(0.9);
    /* Increased contrast and slight dim for text readability */
}

@keyframes kenburns {
    0% {
        transform: scale(1);
        background-position: center;
    }

    50% {
        transform: scale(1.1);
        background-position: top;
    }

    100% {
        transform: scale(1.2);
        background-position: bottom;
    }
}

/* Overlay on sidebar for contrast */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 79, 30, 0.3);
    /* Green tint */
}

.sidebar-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    color: white;
    z-index: 2;
}

.logo {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.tagline {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 4rem 6rem;
}

/* Navigation */
.top-nav {
    margin-bottom: 6rem;
    position: sticky;
    top: 0;
    /* Changed from 2rem to 0 to block content at the very top if desired, or keep 2rem but ensure background covers */
    padding: 0.5rem 1rem;
    /* Add vertical padding */
    background-color: #eee;
    /* Light gray background */
    z-index: 100;
    /* mix-blend-mode: difference; REMOVED to fix color issue */
}

.top-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    /* background: #eee; Moved to parent */
}

.top-nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.top-nav a:hover {
    text-decoration: underline;
}

/* Sections */
.section {
    margin-bottom: 8rem;
    position: relative;
    max-width: 800px;
    scroll-margin-top: 120px;
    /* Offset for sticky nav overlap */
}

.section-number {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 1rem;
    display: padding-block;
    border-top: 1px solid var(--accent-green);
    padding-top: 0.5rem;
    display: inline-block;
}

.large-text {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 300;
    color: var(--text-primary);
}

.headline {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 400;
    font-style: italic;
}

.text-block {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.text-block p {
    margin-bottom: 1.5rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    border-top: 1px solid #ddd;
    padding-top: 3rem;
}

.feature-item h4 {
    font-family: var(--font-sans);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: var(--accent-green);
}

.feature-item p {
    font-size: 0.95rem;
}

.highlight {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--accent-green);
    font-style: italic;
}

/* Footer */
footer {
    border-top: 1px solid #ddd;
    padding-top: 2rem;
    font-size: 0.8rem;
    color: #999;
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: 50vh;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 2rem;
    }

    .large-text {
        font-size: 2.5rem;
    }

    .top-nav {
        display: none;
        /* Hide nav on mobile or change to hamburger */
    }

    .section-number {
        display: none;
    }
}