/* ==========================================================================
   SQUARE PANELS CORE STYLESHEET
   File: css/core.css
   ========================================================================== */

:root {
    /* Brand Palette */
    --bg-color: #050505;
    --bg-secondary: #111111;
    --text-main: #ffffff;
    --text-muted: #999999;
    --accent: #db3131; /* Square Panels Red */
    
    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout & Spacing */
    --header-height: 80px;     
    --container-width: 1440px; 
    --gutter-x: 40px;          
    
    /* Effects */
    --glass-bg: rgba(5, 5, 5, 0.85); 
    --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   [SECTION 1] RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { width: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    width: 100%;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-main);
    text-transform: uppercase; 
    letter-spacing: -0.02em;
    margin-top: 0;
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.7;
}

a { color: inherit; text-decoration: none; transition: var(--transition-slow); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gutter-x);
}

.container-fluid { width: 100%; padding: 0 var(--gutter-x); }
.hidden { display: none !important; }

/* ==========================================================================
   [SECTION 2] TYPOGRAPHY UTILITIES
   ========================================================================== */
.hero-title {
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1;
    font-weight: 300;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 20px;
}

.read-line {
    font-size: clamp(2.5rem, 4.5vw, 5rem);
    line-height: 1.1;
    font-weight: 600;
    color: #222; 
    transition: color 0.6s ease;
}
.read-line.is-visible { color: #fff; }
.highlight { color: inherit; }
.read-line.is-visible .highlight { color: var(--accent); }

.text-sub {
    font-size: 1.25rem;
    border-left: 1px solid var(--accent);
    padding-left: 20px;
}

/* ==========================================================================
   [SECTION 3] ANIMATION UTILITIES
   ========================================================================== */
.reveal-wrap { overflow: hidden; display: block; padding-bottom: 5px; }
.reveal-content {
    display: block;
    transform: translateY(110%);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.is-visible .reveal-content { transform: translateY(0); }

.fade-in-up {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-up.is-visible { opacity: 1; transform: translateY(0); }
.delay-3 { transition-delay: 0.3s; }

/* ==========================================================================
   [SECTION 4] NAVIGATION (DESKTOP)
   ========================================================================== */
#header-placeholder {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar {
    height: var(--header-height);
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    width: 100%;
    transition: var(--transition-slow);
}

.navbar.scrolled {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--accent);
}

.navbar .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    /* MODIFIED: Padding removed to flush edges */
    padding: 0; 
}

/* --- LOGO LOGIC (UPDATED) --- */
.logo {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    z-index: 2005;
    gap: 20px; /* Increased gap for better visual separation */
}

.logo-badge {
    background-color: var(--accent);
    /* MODIFIED: Full height to remove top margin/black space */
    height: 100%; 
    aspect-ratio: 1 / 1; /* Forces a perfect square */
    width: auto; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px; /* Adjust inner icon padding */
    transition: transform 0.3s ease;
}
/* Optional: subtle hover effect on the badge */
.logo:hover .logo-badge { filter: brightness(1.1); }

.logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: #fff;
    text-transform: uppercase;
    display: block; 
}

/* Desktop Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
    height: 100%;
    margin: 0 auto;
    list-style: none;
    padding: 0;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover, 
.nav-links a.active {
    color: #fff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -28px; left: 0;
    width: 0; height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}
.nav-links a:hover::after, 
.nav-links a.active::after {
    width: 100%;
}

/* Right Side Actions */
.nav-action {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 20px; 
}

.cta-box {
    background: var(--accent);
    color: #fff; 
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 40px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}
.cta-box:hover {
    background: #fff;
    color: #000;
}

/* Mobile Triggers */
.mobile-only, .mobile-menu-footer, .hamburger { display: none; }


/* ==========================================================================
   [SECTION 5] MOBILE NAVIGATION (Max-Width 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .cta-box { display: none; }
    
    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 80px; /* Slightly wider touch target */
        height: 100%;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 2005;
    }
    
    /* Ensure nav action still has padding on mobile */
    .nav-action { padding-right: 0; } 

    .nav-links {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        padding: 40px;
        margin: 0;
        gap: 0;
        z-index: 2000;
    }

    .nav-links.active { display: flex; }

    .nav-links .nav-item {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateY(20px);
        animation: menuReveal 0.5s ease forwards;
    }
    
    .nav-links .nav-item:nth-child(1) { animation-delay: 0.1s; }
    .nav-links .nav-item:nth-child(2) { animation-delay: 0.15s; }
    .nav-links .nav-item:nth-child(3) { animation-delay: 0.2s; }
    .nav-links .nav-item:nth-child(4) { animation-delay: 0.25s; }
    .nav-links .nav-item:nth-child(5) { animation-delay: 0.3s; }
    .nav-links .nav-item:nth-child(6) { animation-delay: 0.35s; }

    .nav-links a {
        font-family: var(--font-heading);
        font-size: clamp(2rem, 8vw, 3.5rem);
        font-weight: 300;
        color: #555;
        padding: 10px 0;
        display: block;
        transition: color 0.3s ease, transform 0.3s ease;
    }
    .nav-links a::after { display: none; }

    .nav-links a:hover, .nav-links a.active {
        color: #fff;
        transform: scale(1.05);
    }
    
    .mobile-only { display: block; margin-top: 20px; }
    .highlight-link { color: var(--accent) !important; }

    .mobile-menu-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 40px;
        opacity: 0;
        animation: menuReveal 0.5s ease forwards 0.5s;
    }
    .menu-label {
        font-family: monospace;
        color: var(--accent);
        font-size: 0.7rem;
        text-transform: uppercase;
        margin-bottom: 15px;
    }
    .menu-socials { display: flex; gap: 20px; }
    .menu-socials a {
        font-size: 1.5rem;
        color: #fff;
        border: 1px solid #333;
        width: 50px; height: 50px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
    }
}

@keyframes menuReveal {
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   [SECTION 6] FOOTER STYLES
   ========================================================================== */
.footer-hybrid {
    background-color: #080808;
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 100;
}

.cta-container {
    padding: 100px var(--gutter-x);
    display: flex; justify-content: center;
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.smart-panel-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    padding: 60px 80px;
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.4s ease;
}

.smart-panel-cta:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.panel-text { display: flex; flex-direction: column; }
.panel-sub {
    font-family: monospace;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.panel-heading-mask { height: 3.5rem; overflow: hidden; position: relative; }
.panel-heading {
    display: block;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 300;
    text-transform: uppercase;
    line-height: 1;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-heading.hover-state {
    position: absolute; top: 0; left: 0;
    color: var(--accent);
    transform: translateY(100%);
}
.smart-panel-cta:hover .panel-heading.original { transform: translateY(-100%); }
.smart-panel-cta:hover .panel-heading.hover-state { transform: translateY(0); }

.panel-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    transition: 0.4s ease;
}
.smart-panel-cta:hover .panel-icon {
    background: var(--accent);
    color: #fff;
    transform: rotate(-45deg);
}

.footer-schematic { background-color: #050505; }
.schematic-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.schematic-box {
    padding: 60px 40px;
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex; flex-direction: column;
}
.schematic-box:last-child { border-right: none; }
.box-label {
    font-family: monospace;
    font-size: 0.75rem;
    color: #555;
    text-transform: uppercase;
    margin-bottom: 25px;
    display: block;
}

.schematic-desc { font-size: 0.95rem; color: #888; max-width: 300px; }
.contact-box address { font-style: normal; color: #fff; margin-bottom: 20px; font-weight: 300; }
.contact-links a { display: block; color: #888; margin-bottom: 5px; }
.contact-links a:hover { color: var(--accent); }

.social-matrix { display: flex; flex-direction: column; gap: 15px; }
.social-node {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #fff; font-size: 0.9rem;
}
.social-node:hover { padding-left: 10px; color: var(--accent); border-color: var(--accent); }

.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: #888; text-transform: uppercase; font-size: 0.85rem; }
.footer-nav a:hover { color: #fff; }

.footer-base { padding: 20px 0; background: #000; }
.base-flex { display: flex; justify-content: space-between; align-items: center; }
.mono-text { font-family: monospace; font-size: 0.7rem; color: #444; text-transform: uppercase; }
.base-links a { color: #444; font-size: 0.7rem; text-transform: uppercase; margin-left: 20px; }
.base-links a:hover { color: #fff; }

/* Responsive Footer */
@media (max-width: 1024px) {
    .schematic-grid { grid-template-columns: 1fr 1fr; }
    .schematic-box { border-bottom: 1px solid rgba(255,255,255,0.1); }
    .schematic-box:nth-child(2) { border-right: none; }
}
@media (max-width: 768px) {
    .cta-container { padding: 60px 20px; }
    .smart-panel-cta { flex-direction: column; text-align: center; gap: 30px; padding: 40px 20px; }
    .panel-heading { font-size: 2.5rem; white-space: normal; }
    .panel-heading-mask { height: auto; overflow: visible; }
    .panel-heading.hover-state { display: none; }
    .smart-panel-cta:hover .panel-heading.original { transform: none; }
    .schematic-grid { display: flex; flex-direction: column; }
    .schematic-box { border-right: none; padding: 40px 20px; text-align: center; align-items: center; }
    .schematic-desc { text-align: center; }
    .base-flex { flex-direction: column; gap: 15px; }
}