:root {
    --primary: #000000;
    --secondary: #6366f1;
    --bg: #ffffff;
    --text: #0a0a0a;
    --text-muted: #666666;
    --font-main: 'Outfit', sans-serif;
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --glass: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Optimized Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* --- WebGL Canvas Performance --- */
#webgl-canvas,
#tree-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
}

#webgl-canvas {
    position: fixed;
    z-index: -1;
}

/* --- Navigation Visibility Fix --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    /* Solidified for clarity */
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Added subtle border */
    color: var(--text);
    /* Fixed mix-blend-mode issue */
    transition: all 0.4s ease;
}

nav.scrolled {
    padding: 15px 60px;
    background: rgba(255, 255, 255, 0.95);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Typography Helpers --- */
.line-wrap {
    overflow: hidden;
}

.line-inner {
    display: inline-block;
}

/* --- Sections --- */
section {
    min-height: 100vh;
    width: 100%;
    padding: 100px 10%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hero */
.hero h1 {
    font-size: 10vw;
    line-height: 0.85;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.subheading {
    margin-top: 40px;
    font-size: 24px;
    max-width: 600px;
    color: var(--text-muted);
}

/* Tool Portal (The 3D Hub) */
.portal-section {
    background: #000;
    color: #fff;
    overflow: hidden;
    padding: 150px 10%;
    height: 120vh;
}

.portal-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
    height: 100%;
}

.portal-text h2 {
    font-size: 5vw;
    margin-bottom: 30px;
    line-height: 1;
}

.portal-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portal-item {
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-decoration: none;
    color: white;
    transition: 0.5s var(--ease-out-expo);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

.portal-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(20px);
    border-color: var(--secondary);
}

.portal-item h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.portal-item p {
    opacity: 0.5;
    font-size: 14px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 80px;
}

.f-card {
    padding: 40px;
    background: #f9f9fb;
    border-radius: 30px;
    transition: 0.4s;
}

.f-card:hover {
    transform: translateY(-10px);
    background: #fff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
}

.f-card .icon {
    font-size: 32px;
    margin-bottom: 20px;
}

.f-card h4 {
    font-size: 22px;
    margin-bottom: 15px;
}

/* Content Sections */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.info-image {
    width: 100%;
    aspect-ratio: 4/5;
    background: #eee;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
}

.info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Page Transition */
.curtain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    transform: translateY(100%);
}

footer {
    color: black;
    padding: 100px 10%;
    background: #f4f4f7;
}

/* Tree Section */
.tree-section {
    height: 100vh;
    background: #000;
    position: relative;
    cursor: crosshair;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#tree-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.tree-overlay {
    position: relative;
    z-index: 10;
    text-align: center;
    pointer-events: none;
    color: white;
}

.tree-overlay h2 {
    font-size: 6vw;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.tree-overlay p {
    font-size: 18px;
    opacity: 0.5;
    max-width: 500px;
    margin: 0 auto;
}

/* Tool Ecosystem Bento Grid */
.ecosystem-section {
    padding: 150px 10%;
    background: #fff;
    color: #000;
    /* Consolidating User Preference */
}

.category-block {
    margin-bottom: 120px;
    will-change: transform, opacity;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.category-header h2 {
    font-size: 3.5vw;
    font-weight: 800;
}

.category-tag {
    background: #000;
    color: #fff;
    padding: 6px 15px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 20px;
}

.bento-item {
    background: #f8f8fa;
    border-radius: 30px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.6s var(--ease-out-expo);
    border: 1px solid transparent;
    text-decoration: none;
    color: #7d7d7d;
    /* Consolidating User Preference */
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    /* Force GPU */
}

.bento-item:hover {
    background: #fff;
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.08);
    border-color: #eee;
}

.bento-item.large {
    grid-column: span 2;
    grid-row: span 2;
    background: #000;
    color: #fff;
}

.bento-item.medium {
    grid-column: span 2;
}

.bento-item .status {
    font-size: 11px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.bento-item h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.bento-item p {
    margin-top: 15px;
    opacity: 0.5;
    font-size: 15px;
}

.bento-item .arrow {
    width: 50px;
    height: 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    transition: 0.4s;
}

.bento-item.large .arrow {
    border-color: rgba(255, 255, 255, 0.2);
}

.bento-item:hover .arrow {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    transform: rotate(-45deg);
}

.bento-img {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 60%;
    opacity: 0.8;
}

/* Sidebar Analytics Mockup */
.tool-stats {
    display: flex;
    gap: 20px;
    margin-top: auto;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 12px;
}

.stat-pill span {
    display: block;
    font-size: 10px;
    opacity: 0.5;
}

.stat-pill strong {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 1024px) {

    .portal-container,
    .info-section {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Hook Section (Testimonials / Trust) */
.hook-section {
    padding: 150px 10%;
    background: #000;
    color: #fff;
    text-align: center;
}

.hook-section h2 {
    font-size: 4vw;
    font-weight: 800;
    margin-bottom: 60px;
}

.quote-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.quote-card {
    padding: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.02);
    text-align: left;
    transition: 0.5s;
}

.quote-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--secondary);
}

.quote-card p {
    font-size: 18px;
    margin-bottom: 30px;
    font-style: italic;
    opacity: 0.8;
}

.author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-img {
    width: 40px;
    height: 40px;
    background: #eee;
    border-radius: 50%;
}

/* Membership Section */
.membership-section {
    color: #7d7d7d;
    padding: 150px 10%;
    text-align: center;
}

.membership-card {
    max-width: 800px;
    margin: 60px auto;
    padding: 80px;
    background: #f8f8fa;
    border-radius: 100px;
    position: relative;
    overflow: hidden;
}

.membership-card h3 {
    font-size: 48px;
    margin-bottom: 20px;
}

.membership-card p {
    opacity: 0.6;
    margin-bottom: 40px;
}

.membership-btn {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 20px 60px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: 0.4s;
}

.membership-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

/* Visibility Fixes for Dark Sections */
.portal-section,
.hook-section {
    position: relative;
    z-index: 5;
}

@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .bento-item.large,
    .bento-item.medium {
        grid-column: span 2;
    }
}