:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent: #cd7f32;
    --accent-hover: #b87333;
    --border: #333333;
    --code-bg: #2d2d2d;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at top center, #1e3a8a 0%, #020617 80%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.container {
    max-width: 900px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    overflow: hidden;
}

header {
    text-align: center;
    padding: 6rem 2rem 2rem 2rem; 
    background: linear-gradient(to bottom, #252525, #1e1e1e);
}
.logo-placeholder {
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    
    /* Remove the old margin/padding that pushed it down */
    margin-top: 0;
    padding: 1rem;
    
    /* Visual styling for the bar */
    border-bottom: 1px solid var(--border);
    /* We remove the top border as it sits flush against the window top */
    border-top: none; 
    transition: all 0.3s ease;
}

/* Apply the "Fixed" positioning only on screens larger than mobile */
@media (min-width: 601px) {
    nav {
        position: fixed;
        top: 0;
        /* Center the fixed element relative to the viewport */
        left: 50%;
        transform: translateX(-50%);
        
        /* Match the container dimensions */
        width: 100%;
        max-width: 900px;
        
        /* Ensure it sits on top of everything else */
        z-index: 1000;
        
        /* Add a background so content doesn't show through messy */
        background-color: rgba(30, 30, 30, 0.95); /* Nearly opaque card color */
        backdrop-filter: blur(10px); /* Modern "frosted glass" effect */
        
        /* Round the bottom corners to match the card aesthetic */
        border-radius: 0 0 12px 12px;
        
        /* Add a shadow to lift it off the content */
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

nav a:hover {
    color: white;
    background-color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(205, 127, 50, 0.3);
}

nav a.active {
    color: var(--accent);
    border-color: var(--accent);
    background-color: rgba(205, 127, 50, 0.1);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

.screenshot-container {
    width: 100%;
    padding: 2rem; 
    text-align: center;
    background: linear-gradient(to bottom, #1e1e1e, #181818);
}

img {
    max-width: 100%;
    height: auto;
}

.frontpage-screenshot-img {
    width: 100%;
    max-width: 650px;
    height: auto;
    display: inline-block;
    
    border-radius: 12px;
    border: 1px solid #333;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    
    transform: perspective(1000px) rotateX(2deg);
    transition: all 0.4s ease;
}

.frontpage-screenshot-img:hover {
    transform: perspective(1400px) rotateX(-1deg) scale(1.1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.9);
}

.screenshot-img {
    width: auto;
    height: auto;
    
    border-radius: 12px;
    border: 1px solid #333;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    
    transform: perspective(1000px) rotateX(2deg);
    transition: all 0.4s ease;
}

.screenshot-img:hover {
    transform: perspective(1400px) rotateX(-1deg) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.9);
}

main {
    padding: 3rem 2rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    color: var(--accent);
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: var(--text-main);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

main a:hover, footer a:hover {
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background-color: rgba(255, 255, 255, 0.03);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--accent);
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Code Blocks */
code {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

pre {
    background-color: var(--code-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

pre code {
    background-color: transparent;
    padding: 0;
    color: var(--text-muted);
}

/* Blockquotes */
blockquote {
    background-color: rgba(205, 127, 50, 0.1);
    border-left: 4px solid var(--accent);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 6px 6px 0;
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: background-color 0.2s ease;
    cursor: default;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* New Wrapper for the Icon + Title */
.feature-header {
    display: flex;
    align-items: center;
    width: 100%;
}

.feature-header svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    fill: var(--accent);
}

.feature-text {
    font-size: 0.95rem;
    font-weight: 600;
}

/* The Fold Out Animation */
.feature-details {
    /* Hidden State */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    
    /* Aesthetics */
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 32px; /* Indent to align with text, ignoring icon width */
    
    /* The Animation */
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-top 0.4s ease;
}

/* The Trigger */
.feature-item:hover .feature-details {
    max-height: 150px; /* Set this large enough to fit your text */
    opacity: 1;
    margin-top: 0.8rem;
}

/* Audio Demos */
.audio-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.audio-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 6px;
}

.audio-title {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.audio-organ {
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

audio {
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    filter: invert(0.9) hue-rotate(180deg);
}

.download-links {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
}

.download-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 10px;
    border-bottom: 1px dotted var(--text-muted);
}

.download-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Buttons & Actions */
.action-area {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding-bottom: 2em;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 200px;
}

.btn svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background-color: rgba(255,255,255,0.05);
    text-decoration: none;
}

.btn-secondary svg {
    fill: var(--text-main);
}

.btn-primary svg {
    fill: white;
}

/* Footer */
footer {
    background-color: #151515;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.license-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.license-info svg {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    h1 { font-size: 2rem; }
    .action-area { flex-direction: column; align-items: stretch; }
    
    /* Mobile Nav Tweaks */
    nav { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 10px;
        /* Reset margins/borders for mobile flow */
        margin-top: 1.5rem;
        border-top: 1px solid var(--border);
        border-bottom: none;
    }
    nav a { text-align: center; }
    
    /* Reset header padding on mobile since nav isn't fixed there */
    header {
        padding-top: 3rem;
    }
    
    pre { font-size: 0.8rem; }
}