:root {
    /* --- MONOCHROME PALETTE --- */
    --bg-white:      #ffffff;
    --text-black:    #111111; 
    --text-gray:     #6e6e73; 
    --btn-hover:     #333333;

    /* --- TYPOGRAPHY --- */
    --font-ui:       system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    --font-serif:    system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

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

body {
    background-color: var(--bg-white);
    color: var(--text-black);
    font-family: var(--font-ui);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- HERO SECTION --- */
.hero {
    /* Use 'dvh' (Dynamic Viewport Height) for better mobile support 
       (fixes the issue where mobile URL bars cover content) */
    min-height: 100dvh; 
    display: flex;
    flex-direction: column;
    position: relative;
    background-image: url('assets/images/hero-painting.png');
    background-size: cover;
    background-position: center; /* Or 'center top' if you want to see more sky */
    background-repeat: no-repeat;
    background-position-y: 87%;
    
    /* Remove 'justify-content' if you had it. We will use margins instead. */
    padding: 0; /* Let children handle padding */
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, transparent, var(--bg-white));
    pointer-events: none;
}

/* --- NAVIGATION (The Duna/Apple Layout) --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    z-index: 200;
    width: 100%;
    position: fixed; /* follow the screen as it scrolls */
    top: 0;
    left: 0;
    right: 0;
    /* start transparent; JS will adjust backdrop-filter and background alpha */
    background-color: rgba(255,255,255,0);
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
    transition: background-color 220ms linear, -webkit-backdrop-filter 220ms linear, backdrop-filter 220ms linear, transform 220ms ease;
}

.nav-left { flex: 1; display: flex; justify-content: flex-start; }
.nav-center { flex: 2; display: flex; justify-content: center; gap: 0.5rem; }
.nav-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; }

.logo-img {
    height: 26px;
    width: auto;
    filter: brightness(0);
    opacity: 0.8;
    position: relative;
    z-index: 102;
    /* logo image already has a transition so we can animate transforms on it */
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease;
}
.logo-home-link {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
    text-decoration: none;
}
.logo-home-header {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-ui); font-size: 1.4rem; font-weight: 500; 
    color: var(--text-black);
    padding: 0.3rem 1rem;
    letter-spacing: -0.05rem;
    white-space: nowrap;
}

.logo-home-link:hover { opacity: 0.8; }
.logo-home-link:hover { transform: translateY(-2px); }
.nav-link { 
    font-family: var(--font-ui); font-size: 1.05rem; font-weight: 500; 
    color: var(--text-white); text-decoration: none; padding: 0.3rem 1rem; 
    border-radius: 30px; transition: all 0.2s ease;
    opacity:0.7; 
}

.nav-link:hover { font-weight:500; color: var(--bg-white); opacity: 1; background-color: rgba(0,0,0,0.55); }

.btn-login {
    white-space: nowrap; font-family: var(--font-ui); font-size: 1rem; 
    font-weight: 400; color: var(--bg-white); background-color: var(--text-black); 
    padding: 0.3rem 1rem; border-radius: 50px; text-decoration: none; 
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    opacity:0.9;
    
}

.menu-toggle {
    display: none; /* Default hidden */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 102; /* Must be above the overlay */
    padding: 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-black);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger Animation State (Turns into X) */
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); background-color: var(--bg-white); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background-color: var(--bg-white); }

/* --- MOBILE OVERLAY (Hidden by default) --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.50); /* Dark transparent gray */
    backdrop-filter: blur(5px); /* The "Cool" Blur Effect */
    z-index: 101;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* Animation Initial State */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Links Styling */
.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: left;
    margin-bottom: 4rem;
}

.mobile-link {
    font-family: var(--font-ui);
    font-size: 2.5rem; /* Big text */
    color: #ffffff; /* White text on dark overlay */
    text-decoration: none;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

/* Staggered Animation for Links */
.mobile-menu-overlay.is-active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-overlay.is-active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.is-active .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-overlay.is-active .mobile-link:nth-child(3) { transition-delay: 0.3s; }

/* Mobile Footer (Sign In) */
.mobile-footer {
    position: absolute;
    bottom: 3rem;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease 0.4s; /* Delays appearance */
}
.mobile-menu-overlay.is-active .mobile-footer { opacity: 1; }

.mobile-btn {
    background-color: #ffffff; /* Invert colors for dark menu */
    color: #000000;
    padding: 0.7rem 5rem;
    font-size: 1rem;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .menu-toggle { display: flex; } /* Show hamburger */
    nav { padding: 1.5rem; }
    .logo-home-header { display: none; }
}

.btn-login:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}


/* --- HERO CONTENT --- */
.hero-content {
    /* This pushes the content to the bottom of the flex container */
    margin-top: auto; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin-left: auto; /* Centers the block horizontally */
    margin-right: auto;
    z-index: 10;
    
    /* 3. The "Certain Amount" from the bottom
       Using 'clamp' makes it responsive:
       - Minimum: 3rem (so it's never touching the edge on tiny phones)
       - Ideal: 10vh (10% of screen height - keeps it proportional)
       - Maximum: 6rem (stops it from floating too high on giant screens) */
    padding-bottom: clamp(2rem, 6vh, 6rem);
    padding-left: 2rem;
    padding-right: 2rem;
}

h1 {
    /* Remove margin-top: 35rem; <--- DELETE THIS */
    margin-top: 0; 
    opacity:0.9;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: clamp(3rem, 4.5vw, 5rem);
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    color: var(--text-black);
    font-variation-settings: "SOFT" 50, "WONK" 0; 
}

.subtitle {
    font-family: var(--font-ui);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--text-black);
    opacity: 0.7;
    margin-bottom: 3rem;
    max-width: 520px;
}

/* --- PRIMARY CTA BUTTON --- */
.btn-primary {
    display: inline-block;
    background-color: var(--text-black);
    color: var(--bg-white);
    padding: 0.4rem 1.2rem; /* Adjusted for better balance */
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
    opacity: 0.9;
}

.btn-primary:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* --- MANIFESTO --- */
.manifesto-section {
    background-color: var(--bg-white);
    padding: 4rem 2rem 10rem 2rem;
    display: flex;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 5;
}

article {
    max-width: 680px;
}

.highlight-quote {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 2.5rem);
    line-height: 1.3;
    color: var(--text-black);
    margin: 4rem 0;
    font-variation-settings: "SOFT" 50, "WONK" 0;
}

article p {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* --- FOOTER --- */
footer {
    background-color: #fafafa;
    color: var(--text-gray);
    padding: 5rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-content h3 {
    color: var(--text-black);
    font-family: var(--font-serif);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.links {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s;
}

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

.copyright { font-size: 0.8rem; opacity: 0.5; }

/* Lock scroll when menu is open */
body.no-scroll {
    overflow: hidden;
}