:root {
    --bg-primary: #0F0F0F;
    --bg-secondary: #1A1A1A;
    --bg-tertiary: #252525;
    --text-primary: #E8E8E8;
    --text-secondary: #A0A0A0;
    --accent: #D4A843;
    --accent-hover: #E0B850;
    --border: #333333;
    --max-width: 1100px;
    --radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* -- Header ------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.wordmark:hover {
    color: var(--text-primary);
}

.wordmark-icon {
    border-radius: 4px;
}

.site-header nav {
    display: flex;
    gap: 1.5rem;
}

.site-header nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.site-header nav a:hover {
    color: var(--accent);
}

/* -- Hero --------------------------------------------------- */

.hero {
    padding: 4rem 1.5rem 3rem;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--accent);
    color: #0F0F0F;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: #0F0F0F;
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    border-color: var(--accent-hover);
    color: var(--accent-hover);
}

.hero-screenshot {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    max-width: 960px;
    margin: 0 auto;
}

/* -- Sections (shared) -------------------------------------- */

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.section-inner h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 2.5rem;
    letter-spacing: -0.01em;
}

/* -- Features ----------------------------------------------- */

.features {
    background-color: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.feature-card {
    background-color: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.features-more {
    text-align: center;
    margin: 2rem 0 0;
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* -- Views -------------------------------------------------- */

.views-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.views-grid .view-item:nth-child(4),
.views-grid .view-item:nth-child(5) {
    /* Center the last two items in a 3-column grid */
}

.view-item {
    text-align: center;
}

.view-item img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.view-label {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* -- Themes crossfade --------------------------------------- */

.themes {
    background-color: var(--bg-secondary);
}

.themes-crossfade {
    max-width: 960px;
    margin: 0 auto;
}

.crossfade-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.crossfade-container img:first-child {
    position: relative;
}

.crossfade-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    animation: crossfade 16s infinite;
}

.crossfade-image:first-child {
    position: relative;
}

.crossfade-1 { animation-delay: 0s; }
.crossfade-2 { animation-delay: 4s; }
.crossfade-3 { animation-delay: 8s; }
.crossfade-4 { animation-delay: 12s; }

@keyframes crossfade {
    0%   { opacity: 0; }
    4%   { opacity: 1; }
    25%  { opacity: 1; }
    29%  { opacity: 0; }
    100% { opacity: 0; }
}

.theme-labels {
    position: relative;
    height: 2rem;
    margin-top: 1rem;
    text-align: center;
}

.theme-label {
    position: absolute;
    left: 0;
    right: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: crossfade 16s infinite;
}

.theme-label-1 {
    color: #D4A843;
    animation-delay: 0s;
}

.theme-label-2 {
    color: #C85A4A;
    animation-delay: 4s;
}

.theme-label-3 {
    color: #9B6EC5;
    animation-delay: 8s;
}

.theme-label-4 {
    color: #5B8FA8;
    animation-delay: 12s;
}

/* -- Footer ------------------------------------------------- */

.site-footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

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

.footer-author {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 0.35rem;
}

.footer-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.7;
}

/* -- Responsive: tablet (768px) ----------------------------- */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .views-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-inner h2 {
        font-size: 1.75rem;
    }
}

/* -- Responsive: small tablet (640px) ----------------------- */

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* -- Responsive: mobile (480px) ----------------------------- */

@media (max-width: 480px) {
    .hero {
        padding: 2.5rem 1rem 2rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .section-inner {
        padding: 3rem 1rem;
    }

    .section-inner h2 {
        font-size: 1.5rem;
    }

    .views-grid {
        grid-template-columns: 1fr;
    }

    .site-header nav {
        gap: 1rem;
    }

    .site-header nav a {
        font-size: 0.8rem;
    }
}
