:root {
    /* Apple-inspired Color Palette */
    --primary-yellow: #f5c518;
    --primary-yellow-hover: #e0b000;
    
    /* Dark Mode (Default) */
    --bg-color: #000000;
    --card-bg: #161617;
    --text-color: #f5f5f7;
    --text-secondary: #86868b;
    --nav-bg: rgba(22, 22, 23, 0.8);
    --border-color: #424245;
}

[data-theme="light"] {
    /* Light Mode */
    --bg-color: #ffffff;
    --card-bg: #f5f5f7;
    --text-color: #1d1d1f;
    --text-secondary: #86868b;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --border-color: #d2d2d7;
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 44px;
    background-color: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 980px;
    height: 100%;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 1;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    opacity: 0.8;
}

.theme-toggle:hover { 
    opacity: 1; 
}

/* Mobile Hamburger Menu Toggle Button */
.menu-toggle {
    display: none !important; /* Force hide on laptop/desktop */
    background: transparent;
    border: 0;
    outline: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    width: 22px;
    height: 14px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.menu-toggle:focus,
.menu-toggle:active {
    outline: none;
    background: transparent;
    box-shadow: none;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Responsive Drawer Styling */
@media screen and (max-width: 734px) {
    .menu-toggle {
        display: flex !important;
        position: relative;
    }

    .nav-menu {
        position: fixed;
        top: 44px;
        left: 0;
        width: 100%;
        height: 0;
        background-color: var(--bg-color);
        overflow: hidden;
        transition: height 0.35s cubic-bezier(0.32, 0.08, 0.24, 1);
    }

    .nav-menu.is-active {
        height: calc(100vh - 44px);
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 40px;
        gap: 16px;
    }

    .nav-links a {
        font-size: 17px;
        font-weight: 600;
        opacity: 1;
    }

    /* Crisp Animated Hamburger to "X" */
    .menu-toggle.is-active .hamburger-line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .menu-toggle.is-active .hamburger-line:nth-child(2) {
        transform: scale(0); /* Instantly collapses horizontally without ghosting */
        transition: transform 0.1s ease-out;
    }

    .menu-toggle.is-active .hamburger-line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

/* Main Hero Section */
main {
    flex: 1;
    margin-top: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
}

.hero-title {
    font-size: 56px;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 28px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 32px;
    font-weight: 400;
}

.cta-button {
    background-color: var(--primary-yellow);
    color: #000000;
    font-weight: 600;
    font-size: 17px;
    padding: 12px 24px;
    border-radius: 980px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s, transform 0.2s;
}

.cta-button:hover {
    background-color: var(--primary-yellow-hover);
    transform: scale(1.02);
}

/* Footer Section */
footer {
    background-color: var(--card-bg);
    font-size: 12px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding: 32px 0 20px 0;
}

.footer-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.footer-column h4 {
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 12px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 6px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-column a:hover {
    color: var(--text-color);
}

.legal-line {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.legal-links {
    display: flex;
    gap: 12px;
    list-style: none;
}

.legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.legal-links a:hover {
    color: var(--text-color);
}

.legal-links li:not(:last-child)::after {
    content: "|";
    margin-left: 12px;
    opacity: 0.4;
}

/* Butterfly 404 Animations */
.butterfly-container {
    perspective: 600px;
    margin-bottom: 20px;
    animation: floatUpDown 3s ease-in-out infinite;
}

.butterfly {
    overflow: visible;
}

.wing {
    transform-origin: 100px 100px;
}

.wing-left {
    animation: flapLeft 0.6s ease-in-out infinite alternate;
}

.wing-right {
    animation: flapRight 0.6s ease-in-out infinite alternate;
}

/* Vertical Floating Animation */
@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(0px) rotate(-2deg);
    }
    50% {
        transform: translateY(-18px) rotate(2deg);
    }
}

/* Wing Flapping Animations */
@keyframes flapLeft {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(65deg);
    }
}

@keyframes flapRight {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(-65deg);
    }
}

