:root {
    --primary: #c2ad3e;
    --accent: #ffea00;
    --bg: #ffffff;
    --bg-alt: #f5f5f7;
    --text: #1d1d1f;
    --text-muted: #86868b;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --border-color: #d2d2d7;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --bg-alt: #1a1a1a;
        --text: #f5f5f7;
        --text-muted: #a1a1a6;
        --nav-bg: rgba(0, 0, 0, 0.8);
        --border-color: #333;
    }
}

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

body {
    font-family: var(--font-stack), serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.5;
    scroll-behavior: smooth;
}

/* Constitution Layout */
.constitution-main {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
    gap: 4rem;
}

.toc {
    width: 280px;
    position: sticky;
    top: 100px;
    height: fit-content;
    align-self: start;
}

.toc ul {
    list-style: none;
    padding: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    text-decoration: none;
    color: var(--text-muted) !important;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    display: block;
    padding: 0.5rem 0;
    border-left: 2px solid transparent;
    padding-left: 1rem;
}

.toc a:hover {
    color: var(--primary) !important;
    border-left-color: var(--primary);
}

.toc ul ul {
    margin-left: 1.5rem;
    margin-top: 0.25rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: var(--primary);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Mobile Menu (No JS) */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 4rem 5% 2rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--primary);
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary);
    color: #000000;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background: #e6c200;
}

/* Sections */
.section {
    padding: 3rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Override section centering for constitution */
.constitution-main .section {
    text-align: left;
    padding: 0;
}

.section.alternate {
    background: var(--bg-alt);
    max-width: 100%;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    padding: 2rem;
    background: var(--bg-alt);
    border-radius: 20px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.content-split {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.text {
    flex: 1;
}

.text ul {
    list-style: none;
    margin-top: 1.5rem;
}

.text li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.text li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

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

.perf-box {
    width: 200px;
    height: 200px;
    background: #e5e4d9;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 2rem;
    border-radius: 40px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

footer {
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid #333;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Content styles */
.manifesto-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    font-size: 1.2rem;
    line-height: 1.8;
}

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

.manifesto-text h2, .manifesto-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

@media (max-width: 768px) {
    .constitution-main {
        flex-direction: column;
    }
    .toc {
        width: 100%;
        position: relative;
        top: 0;
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-toggle-label {
        display: block;
        position: relative;
        width: 30px;
        height: 30px;
    }

    .nav-toggle-label span {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--primary);
        position: absolute;
        top: 14px;
        left: 5px;
        transition: var(--transition);
    }

    .nav-toggle-label span::before, .nav-toggle-label span::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background: var(--primary);
        transition: var(--transition);
    }

    .nav-toggle-label span::before { top: -8px; }
    .nav-toggle-label span::after { top: 8px; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg);
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
        text-align: center;
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex;
    }

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

    .content-split {
        flex-direction: column;
        text-align: center;
    }

    .text li {
        text-align: left;
    }
}
