:root {
    --bg: #050507;
    --text: #ffffff;
    --text-sec: #94a3b8;
    
    /* Capix Digital Colors */
    --digital-base: #00e5ff;
    --digital-dark: #007bb5;
    
    /* Capix Systems Colors */
    --systems-base: #ff5e00;
    --systems-dark: #b52c00;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
}

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

/* Loader */
#loader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    display: flex;
}

.loader-text span {
    opacity: 0;
    transform: translateY(20px);
}

.progress-bar {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.progress {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--digital-base), var(--systems-base));
}

/* Navigation */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    background: rgba(10, 10, 12, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 5%;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    font-weight: 300;
    color: var(--text-sec);
}

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

.nav-links a:hover {
    color: var(--digital-base);
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn.outline {
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
}

.btn.outline:hover {
    background: #fff;
    color: #000;
}

.btn.solid {
    background: linear-gradient(45deg, var(--digital-base), var(--systems-dark));
    color: #fff;
    border: none;
}

.btn.solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,229,255,0.2);
}

/* Global utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.center-text {
    text-align: center;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100vw;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent, #050507 80%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

/* Title Glitch / Split Effect handled by JS/CSS */

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-sec);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 30px; /* Force to absolute bottom */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-sec);
    animation: bounce 2s infinite;
    z-index: 10;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* About Section */
.about {
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
    background: var(--bg);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
}

.section-title span {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.2);
    background: linear-gradient(90deg, var(--digital-base), var(--systems-base));
    background-clip: text;
    -webkit-background-clip: text;
    animation: shine 3s infinite linear;
    background-size: 200% auto;
}

@keyframes shine {
    to { background-position: 200% center; }
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.2rem;
    color: var(--text-sec);
    margin-bottom: 1.5rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-item {
    background: rgba(20, 20, 24, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 2.5rem;
    border-radius: 24px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--digital-base), var(--digital-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-item:nth-child(2) .stat-icon {
    background: linear-gradient(45deg, var(--systems-base), var(--systems-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-sec);
    font-size: 0.9rem;
}

/* Custom Scroll Sequence Section (GSAP Pinning) */
.scroll-anim-section {
    position: relative;
    background: #000;
    /* Extra space so scrolling triggers the pin */
}

.pin-container {
    height: 100vh;
    display: flex;
    position: relative;
    overflow: hidden;
}

.canvas-container {
    width: 50%;
    height: 100%;
    position: absolute;
    right: 0; top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-gfx {
    position: relative;
    width: 300px;
    height: 300px;
}

.circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.c1 { width: 100%; height: 100%; border-color: rgba(255,255,255,0.1); border-top-color: var(--digital-base); animation: spin 10s linear infinite; }
.c2 { width: 70%; height: 70%; border-color: rgba(255,255,255,0.1); border-bottom-color: var(--systems-base); animation: spin 7s linear infinite reverse; }
.c3 { width: 40%; height: 40%; background: linear-gradient(45deg, var(--digital-dark), var(--systems-dark)); filter: blur(20px); opacity: 0.5; animation: pulse 4s ease-in-out infinite alternate; }

@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes pulse { 100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; } }

.scroll-content {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5%;
}

.step {
    position: absolute;
    opacity: 0;
    transform: translateY(50px);
}

.step h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.step p {
    font-size: 1.2rem;
    color: var(--text-sec);
}

/* Two Pillars (Split Screen scroll fx) */
.pillars {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.pillar {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 5%;
    overflow: hidden;
    transition: flex 0.5s ease;
}

.pillar:hover {
    flex: 1.2;
}

.pillar-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    opacity: 0.1;
    transition: opacity 0.5s;
    background-size: cover;
    background-position: center;
}

.digital-bg {
    background-image: url('assets/images/digital_bg.png');
    background-size: cover;
    background-position: center;
    background-color: var(--digital-dark);
    background-blend-mode: overlay;
}
.systems-bg {
    background-image: url('assets/images/systems_bg.png');
    background-size: cover;
    background-position: center;
    background-color: var(--systems-dark);
    background-blend-mode: overlay;
}

.pillar:hover .pillar-bg {
    opacity: 0.2;
}

.pillar-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
    width: 100%;
}

.pillar-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}
.digital .pillar-icon { color: var(--digital-base); }
.systems .pillar-icon { color: var(--systems-base); }

.pillar-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.digital .pillar-title span { color: var(--digital-base); }
.systems .pillar-title span { color: var(--systems-base); }

.pillar-desc {
    font-size: 1.1rem;
    color: var(--text-sec);
    margin-bottom: 2rem;
}

.features-list {
    list-style: none;
    margin-bottom: 3rem;
}

.features-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dedede;
}

.digital .features-list i { color: var(--digital-base); }
.systems .features-list i { color: var(--systems-base); }

.digital-btn:hover { background: var(--digital-base); border-color: var(--digital-base); }
.systems-btn:hover { background: var(--systems-base); border-color: var(--systems-base); }

/* CTA Contact */
.cta {
    padding: 150px 0;
    background: linear-gradient(180deg, transparent, #09090c);
    border-top: 1px solid rgba(255,255,255,0.02);
}

.cta h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.cta p {
    color: var(--text-sec);
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    gap: 1.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.05);
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    background: #020202;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-sec);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h3, .footer-social h3 {
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.footer-links a {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-sec);
}
.footer-links a:hover {
    color: #fff;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.social-icons a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-sec);
    font-size: 0.9rem;
}

/* Media Queries */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .about-grid { grid-template-columns: 1fr; }
    .scroll-anim-section { display: none; } /* Simplified on mobile */
    .pillars { flex-direction: column; }
    .input-group { flex-direction: column; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .social-icons { justify-content: center; }
}

/* Premium Apple-Style Utilities */
.glass-panel {
    background: rgba(20, 20, 24, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.reveal-text {
    opacity: 0;
    transform: translateY(30px);
}

/* Custom Cursor */
@media (pointer: fine) {
    body { cursor: none; }
    a, button, input, textarea, select, .slot, .time-slot, .hamburger { cursor: none !important; }
}

.cursor, .cursor-follower {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: transform 0.1s ease-out, opacity 0.2s;
    display: none;
}

@media (pointer: fine) {
    .cursor, .cursor-follower { display: block; }
}

.cursor {
    width: 6px;
    height: 6px;
    background: #fff;
}

.cursor-follower {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.15s ease-out, width 0.3s, height 0.3s, background 0.3s, border-color 0.3s;
}

.cursor-follower.active {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

/* Hamburger Menu & Mobile Nav */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger .line {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: var(--transition);
}

.hamburger.active .line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .line:nth-child(2) { opacity: 0; }
.hamburger.active .line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 100%; height: 100vh;
    background: rgba(5, 5, 7, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.active { right: 0; }

.mobile-menu a {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s, color 0.3s;
}

.mobile-menu a:hover { color: var(--digital-base); }
.mobile-menu.active a { opacity: 1; transform: translateY(0); }

.mobile-menu.active a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active a:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active a:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active a:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active a:nth-child(5) { transition-delay: 0.3s; }

/* Tech Stack Section */
.tech-stack {
    padding: 100px 0;
    background: linear-gradient(0deg, #050507, #0a0a0c);
    position: relative;
    z-index: 2;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.tech-item {
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s, background 0.3s, border-color 0.3s;
}

.tech-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.tech-icon {
    font-size: 3.5rem;
    background: linear-gradient(45deg, var(--digital-base), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tech-item:nth-child(even) .tech-icon {
    background: linear-gradient(45deg, var(--systems-base), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
