:root {
    --bg-color: #F6F6F6;
    --text-primary: #1A1A1A;
    --text-secondary: #4a4a4a;
    --accent-orange: #FA5922;
    --accent-blue: #A9E1E8;
    --accent-yellow: #F8C112;
    --accent-purple: #D1BAF8;
    --card-bg: #ffffff;
    --font-heading: 'Andada Pro', serif;
    --font-body: 'Montserrat', sans-serif;
    --nav-height: 80px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    text-wrap: pretty;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(246, 246, 246, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

nav {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1001;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 1002;
}

.logo img {
    height: 52px;
    width: auto;
    display: block;
}

.logo-text {
    display: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Header App Store Link - Hidden until launch link is ready. Remove 'display: none;' to unhide */
.cta-button-img {
    display: none !important;
}

.cta-button-img img {
    height: 48px;
    /* Slightly larger than text links but balanced */
    width: auto;
    transition: transform 0.2s ease;
    display: block;
}

.cta-button-img:hover img {
    transform: scale(1.05);
}

/* Mobile Menu Button - STRICTLY HIDDEN ON DESKTOP */
.mobile-menu-btn {
    display: none !important;
    background: transparent;
    border: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    padding: 6px;
    margin: 0;
    cursor: pointer;
    position: relative;
    z-index: 1002;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-btn svg {
    display: block;
    width: 26px;
    height: 26px;
    stroke: var(--text-primary);
    transition: stroke 0.2s ease;
}

.mobile-menu-btn .line-top,
.mobile-menu-btn .line-mid,
.mobile-menu-btn .line-bot {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    transform-origin: 12px 12px;
}

/* Active animated SVG Hamburger -> X */
.mobile-menu-btn.active .line-top {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn.active .line-mid {
    opacity: 0;
}

.mobile-menu-btn.active .line-bot {
    transform: translateY(-6px) rotate(-45deg);
}

/* Hero Section */
#hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    /* P5 canvas above images but below text */
    pointer-events: none;
}

.hero-content {
    width: 100%;
    height: 100%;
    z-index: 10;
}

.carousel {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Overlay for better text readability */
.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Dark overlay */
    z-index: 1;
}

.carousel-item.active {
    opacity: 1;
    z-index: 2;
}

.carousel-text {
    position: relative;
    z-index: 20;
    /* Above overlay and canvas */
    max-width: 800px;
    padding: 0 2rem;
    transform: translateY(20px);
    transition: transform 0.8s ease-out 0.2s, opacity 0.8s ease-out 0.2s;
    opacity: 0;
    text-align: left;
    user-select: none;
}

.carousel-item.active .carousel-text {
    transform: translateY(0);
    opacity: 1;
}

h1 {
    font-family: 'Andada Pro', serif;
    font-size: 72px;
    font-style: normal;
    font-weight: 500;
    line-height: 0.9;
    margin-bottom: 1rem;
    color: #FFF;
    text-shadow: none;
}

p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    color: rgba(255, 255, 255, 0.9);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
    z-index: 10;
}

.scroll-arrow {
    display: inline-block;
    transform: rotate(90deg);
    font-size: 24px;
    line-height: 1;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Features Section */
/* Features Section */
#features {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#features h2,
#download h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
    line-height: 1.0;
}

/* Features Section - Overlapping Cards */
.features-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    /* Overlap handles the spacing */
    padding-bottom: 4rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 3.5rem;
    border-radius: 12px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 860px;
    position: sticky;
    top: 120px;
    margin-bottom: 4rem;
    transition: transform 0.3s ease;
}

/* Staggering the cards visually if they aren't sticky-scrolling (fallback or additional style) */
.feature-card:nth-child(1) {
    background-color: #FA5922;
    color: #FFFFFF;
    z-index: 1;
    transform: rotate(-2deg);
}

.feature-card:nth-child(2) {
    background-color: #A9E1E8;
    color: #1A1A1A;
    z-index: 2;
    transform: rotate(1deg) translateY(-20px);
    /* Slight overlap overlap if static */
    margin-top: -2rem;
    /* Pull up */
}

.feature-card:nth-child(3) {
    background-color: #F8C112;
    color: #1A1A1A;
    z-index: 3;
    transform: rotate(-1deg) translateY(-40px);
    margin-top: -2rem;
}

/* On hover, lift up to reveal */
.feature-card:hover {
    transform: translateY(-40px) scale(1.02) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    font-family: 'Andada Pro', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: inherit;
    line-height: 0.9;
}

.feature-card p {
    font-size: 1.125rem;
    color: inherit;
    line-height: 1.7;
    text-shadow: none;
    /* Ensure no shadow here too */
}

/* About Section */
#about {
    position: relative;
    padding: 7rem 0 5rem 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
}

/* Remove old overlay */
#about::before {
    display: none;
}

/* Background Parallax Image hooked to bottom right */
.about-bg-parallax-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.about-parallax-bg {
    position: absolute;
    bottom: -60px;
    right: 0;
    width: 65vw;
    max-width: 950px;
    min-width: 480px;
    height: auto;
    object-fit: contain;
    object-position: bottom right;
    pointer-events: none;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: transform 0.08s ease-out;
}

.about-container {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.co-founders-group {
    margin-bottom: 5rem;
}

.about-narrative-container {
    max-width: 720px;
    padding-bottom: 2rem;
}

.about-group {
    margin-bottom: 3.5rem;
}

.about-section-heading {
    font-family: var(--font-body) !important;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.0;
    letter-spacing: -0.01em;
}

.co-founders-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.founder-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.founder-card:hover {
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.06);
}

.founder-name-role {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    color: #111111;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.founder-name {
    color: #111111;
}

.founder-slash {
    color: #bbb;
    font-weight: 400;
}

.founder-role {
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 1.05rem;
}

.founder-bio {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: #4a4a4a;
}

.about-narrative-text {
    font-family: 'Andada Pro', serif;
    font-size: 1.35rem;
    line-height: 1.45;
    color: #222222;
}

.about-narrative-text strong {
    color: #111111;
    font-weight: 700;
}

/* App Store Link - Hidden until launch link is ready. Remove 'display: none;' to unhide */
.app-store-link {
    display: none !important;
}

.app-store-link.internal img {
    height: 60px;
    width: auto;
    transition: transform 0.2s ease;
}

.app-store-link.internal:hover img {
    transform: scale(1.05);
}

/* Footer removed, styles can be cleaned up */
#download {
    display: none;
}

.cta-container {
    margin-bottom: 4rem;
}

.app-store-link img {
    height: 60px;
    margin-top: 2rem;
    transition: transform 0.2s ease;
}

.app-store-link:hover img {
    transform: scale(1.05);
}

.footer-copyright {
    font-size: 10px;
    font-weight: 500;
    color: #333333;
    margin-top: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Montserrat', sans-serif;
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 2rem;
    font-size: 0.9rem;
}

/* Responsive Styles for Tablets and Mobile Phones (<= 1024px) */
@media (max-width: 1024px) {
    .logo img {
        height: 44px;
    }

    .mobile-menu-btn {
        display: flex !important;
        margin-left: auto;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0 1rem 0;
        margin-left: 0;
        transform: translateY(-130%);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
        z-index: 1000;
    }

    .nav-links.mobile-active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .nav-links a {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1.05rem;
        font-weight: 600;
        color: var(--text-primary);
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        display: block;
        text-align: left;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .nav-links a:hover,
    .nav-links a:active {
        background-color: rgba(250, 89, 34, 0.06);
        color: var(--accent-orange);
    }

    .co-founders-list {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Additional layout adjustments for Mobile Phones (<= 768px) */
@media (max-width: 768px) {
    .logo img {
        height: 40px;
    }

    h1 {
        font-size: 46px;
        line-height: 1.0;
    }

    .carousel-text {
        padding: 0 1rem;
        transform: translateY(10px);
    }

    #features,
    #about {
        padding: 4rem 1rem;
    }

    .about-content {
        padding: 2rem 1.5rem;
    }

    .about-container {
        width: 100%;
        padding: 0 0.5rem;
    }

    .co-founders-group {
        margin-bottom: 3.5rem;
    }

    .about-parallax-bg {
        width: 90vw;
        max-width: 600px;
        min-width: 320px;
        bottom: -30px;
        right: -10px;
        opacity: 0.85;
    }

    .about-narrative-container {
        max-width: 100%;
    }

    .about-section-heading {
        font-size: 1.85rem;
    }

    .about-narrative-text {
        font-size: 1.15rem;
    }

    .footer-note {
        margin-top: 2rem;
        text-align: center;
    }
}

/* Legal White Overlay Modals (Privacy Policy & Terms of Use) */
.legal-overlay,
.privacy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 2000;
    display: none;
    opacity: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    visibility: hidden;
}

.legal-overlay.active,
.privacy-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.legal-modal-close,
.privacy-modal-close {
    position: fixed;
    top: 2rem;
    right: 2.5rem;
    width: 46px;
    height: 46px;
    background: #f1f1f1;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1a1a1a;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
    z-index: 2100;
}

.legal-modal-close:hover,
.privacy-modal-close:hover {
    background: #e2e2e2;
    transform: scale(1.08);
    color: #000000;
}

.legal-modal-close:focus-visible,
.privacy-modal-close:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

.legal-modal-container,
.privacy-modal-container {
    position: relative;
    max-width: 780px;
    width: 90%;
    margin: 0 auto;
    padding: 6rem 1rem 6rem;
    min-height: 100vh;
}

.legal-modal-content,
.privacy-modal-content {
    animation: fadeInLegal 0.4s ease-out;
}

@keyframes fadeInLegal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legal-title,
.privacy-title {
    font-family: var(--font-heading);
    font-size: 46px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 1.75rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.legal-intro,
.privacy-intro {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
    color: #2b2b2b;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.legal-section,
.privacy-section {
    margin-bottom: 2.25rem;
}

.legal-section h2,
.privacy-section h2 {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.legal-section p,
.privacy-section p {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    color: #4f4f4f;
}

.legal-list {
    margin-top: 0.75rem;
    margin-left: 1.5rem;
    color: #4f4f4f;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-list li {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: #4f4f4f;
}

.legal-link,
.contact-email-link {
    color: var(--accent-orange);
    text-decoration: underline;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.legal-link:hover,
.contact-email-link:hover {
    opacity: 0.8;
}

.footer-privacy-link {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.footer-privacy-link:hover {
    color: var(--accent-orange);
}

@media (max-width: 768px) {
    .legal-modal-close,
    .privacy-modal-close {
        top: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
    }

    .legal-modal-container,
    .privacy-modal-container {
        padding: 4.5rem 0.5rem 4rem;
        width: 92%;
    }

    .legal-title,
    .privacy-title {
        font-size: 34px;
    }

    .legal-intro,
    .privacy-intro {
        font-size: 15px;
    }

    .legal-section h2,
    .privacy-section h2 {
        font-size: 18px;
    }

    .legal-section p,
    .privacy-section p,
    .legal-list li {
        font-size: 15px;
    }
}