.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.site-body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.75;
    /* Improved readability */
    -webkit-font-smoothing: antialiased;
}

.section {
    padding: 6rem 0;
    /* Generous whitespace */
}

.site-header {
    padding: 1.25rem 0;
    background: var(--color-surface);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.main-nav .nav__list {
    display: flex;
    gap: 1.5rem;
}

.premium-footer {
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    background: #f1f5f9;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro {
    max-width: 65ch;
    margin: 0 auto;
}

.features-section:empty {
    display: none;
}

/* --- Layout Variants --- */

/* Centered Layout: Best for minimalist or authority sites */
.layout--centered #main-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.layout--centered .article-substance,
.layout--centered .intro {
    text-align: left;
    /* Keep text readable */
}

/* Split Layout: Hero on one side, content on other (often achieved via flex/grid) */
.layout--split .article-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 60vh;
}

@media (max-width: 768px) {
    .layout--split .article-header {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

/* Magazine Layout: More aggressive grid for bento-style cards */
.layout--magazine .nodes-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.layout--magazine .data-node:nth-child(3n) {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .layout--magazine .data-node:nth-child(3n) {
        grid-column: span 1;
    }
}

/* Sidebar Variants */
.layout--sidebar-right .layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.layout--sidebar-left .layout-with-sidebar {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

.layout--sidebar-left .sidebar {
    grid-column: 1;
    grid-row: 1;
}

.layout--sidebar-left .content {
    grid-column: 2;
}

@media (max-width: 1024px) {

    .layout--sidebar-right .layout-with-sidebar,
    .layout--sidebar-left .layout-with-sidebar {
        grid-template-columns: 1fr;
    }
}

/* --- Motion Utility System --- */
[data-animate] {
    --animation-duration: var(--energy-scale, 0.6s);
    --animation-delay: 0s;
    --animation-easing: var(--energy-easing, cubic-bezier(0.23, 1, 0.32, 1));

    opacity: 0;
    animation-fill-mode: forwards;
    animation-duration: var(--animation-duration);
    animation-delay: var(--animation-delay);
    animation-timing-function: var(--animation-easing);
}

[data-animate].is-visible {
    opacity: 1;
}

[data-animate="fade-up"].is-visible {
    animation-name: fadeUp;
}

[data-animate="fade-in"].is-visible {
    animation-name: fadeIn;
}

[data-animate="scale-in"].is-visible {
    animation-name: scaleIn;
}

[data-animate="glitch"].is-visible {
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-3px, 3px);
    }

    40% {
        transform: translate(-3px, -3px);
    }

    60% {
        transform: translate(3px, 3px);
    }

    80% {
        transform: translate(3px, -3px);
    }

    100% {
        transform: translate(0);
    }
}

/* Scroll Progress Tracker */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--color-accent);
    z-index: 2000;
    transition: width 0.1s ease;
}