﻿/* Custom Styles */
body {
    overflow-x: hidden;
    background-color: #f0fdf4;
    color: #064e3b;
}

/* Glassmorphism */
.glass-nav {
    background: rgba(2, 44, 34, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(6, 78, 59, 0.1);
    transition: all 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -5px rgba(6, 78, 59, 0.15);
    border-color: #d97706;
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    background-color: #022c22;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    margin-top: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: #10b981;
    transition: width 0.1s linear;
}

/* Typography */
.text-gradient {
    background: linear-gradient(to right, #ffffff, #d97706);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Hero Slider */
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out 1s;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
    transition: opacity 1.5s ease-in-out 0s;
}

.hero-overlay {
    background: linear-gradient(to top, #022c22 10%, rgba(2, 44, 34, 0.4) 60%, rgba(2, 44, 34, 0.3) 100%);
}

/* Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #022c22;
}
::-webkit-scrollbar-thumb {
    background: #064e3b;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d97706;
}

/* Process Section Effects */
.process-step {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.process-step:hover {
    transform: translateY(-10px);
}

.process-icon {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.process-step:hover .process-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 25px rgba(217, 119, 6, 0.6);
    border-color: #d97706;
    background-color: #022c22;
    color: #d97706;
}

.process-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s ease;
    z-index: -1;
}

.process-step:hover .process-icon::after {
    opacity: 1;
    transform: scale(1);
}

/* --- ABOUT PAGE STYLES --- */

/* Typography Utilities */
.text-outline {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    color: transparent;
    transition: all 0.5s ease;
}
.text-outline:hover {
    color: #d97706;
    -webkit-text-stroke: 0px;
}

/* Horizontal Scroll Section */
.horizontal-container {
    width: 400%;
    height: 100vh;
    display: flex;
    flex-wrap: nowrap;
}
.horizontal-panel {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    border-right: 1px solid rgba(255,255,255,0.1);
}

/* Image Masking */
.mask-container {
    clip-path: inset(0 0 0 0);
    transition: clip-path 0.5s ease;
}

/* Fact Cards */
.fact-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.fact-card:hover {
    background: rgba(217, 119, 6, 0.05);
    border-color: #d97706;
    transform: translateY(-10px);
}

/* Stats Grid */
.stat-grid-bg {
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* 3D Tech Card */
.perspective-1000 {
    perspective: 1000px;
}
.transform-style-3d {
    transform-style: preserve-3d;
}

/* About Page Specific Overrides */
body.bg-noble-black {
    background-color: #0a0a0a !important;
    color: #e5e5e5;
}


.text-outline-dark {
    -webkit-text-stroke: 1px rgba(6, 78, 59, 0.3);
    color: transparent;
    transition: all 0.5s ease;
}
.text-outline-dark:hover {
    color: #d97706;
    -webkit-text-stroke: 0px;
}

/* --- SERVICES PAGE STYLES --- */

/* Page-Specific Styles for "Light Mode" feel */
body.services-page {
    background-color: #fdfbf7; /* Noble Cream */
    color: #0a0a0a;
    overflow-x: hidden;
}

/* Section Layouts */
.service-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Desktop Layout */
@media (min-width: 1024px) {
    .service-section {
        flex-direction: row;
        align-items: center;
    }
    
    /* Alternating Layouts */
    .service-section:nth-child(odd) {
        flex-direction: row;
    }
    .service-section:nth-child(even) {
        flex-direction: row-reverse;
    }

    .service-content {
        width: 50%;
        padding: 6rem;
        z-index: 10;
    }
    
    .service-visual {
        width: 50%;
        height: 100vh;
        position: relative;
        overflow: hidden;
    }
    
    .service-visual img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Mobile Layout */
@media (max-width: 1023px) {
    .service-section {
        min-height: auto; /* Allow content to dictate height */
        margin-bottom: 4rem; /* Add spacing between sections */
    }
    .service-content {
        padding: 4rem 1.5rem; /* Increase vertical padding */
    }
    .service-visual {
        height: 40vh; /* Reduce image height slightly to give more room to text */
        width: 100%;
        margin-bottom: 0;
        position: relative; /* Ensure absolute children are contained */
    }
    .service-visual img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Accordion Styles */
.accordion-item {
    border-bottom: 1px solid rgba(6, 78, 59, 0.2);
}
.accordion-header {
    cursor: pointer;
    transition: all 0.3s ease;
}
.accordion-header:hover {
    color: #d97706;
    padding-left: 10px;
}
.accordion-body {
    height: 0;
    overflow: hidden;
    transition: height 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Typography & Effects */
.editorial-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: #d97706;
    opacity: 0.5;
    line-height: 1;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.reveal-text {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.char {
    display: inline-block;
}

body {
    background-color: #fdfbf7;
    color: #0a0a0a;
    overflow-x: hidden;
}

/* Blueprint Grid Background */
.blueprint-bg {
    background-color: #fdfbf7;
    background-image: linear-gradient(rgba(6, 78, 59, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 78, 59, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Technical Line Connectors */
.tech-line {
    position: absolute;
    background-color: #064e3b;
    opacity: 0.2;
    z-index: 0;
}

/* Step Number Styling */
.step-number {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #d97706;
    margin-bottom: 1rem;
    display: inline-block;
    border: 1px solid #d97706;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Sprinkler Canvas */
#sprinkler-canvas {
    width: 100%;
    height: 400px;
    /* background: rgba(0,0,0,0.02); Debugging */
}

/* Block Farming Nodes */
.node {
    width: 12px;
    height: 12px;
    background-color: #064e3b;
    border-radius: 50%;
    position: absolute;
    transition: all 0.5s ease;
}
.hub {
    width: 40px;
    height: 40px;
    background-color: #d97706;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.4);
}
.connection-line {
    position: absolute;
    height: 1px;
    background-color: #064e3b;
    opacity: 0;
    transform-origin: 0 0;
}

/* Processing Gears */
.gear {
    position: absolute;
    border: 4px solid #064e3b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gear::after {
    content: '';
    width: 80%;
    height: 80%;
    border: 1px dashed #064e3b;
    border-radius: 50%;
}

/* Contact Page Styles */
body.contact-page {
    background-color: #fdfbf7;
    color: #0a0a0a;
}

/* Input Styles */
.noble-input {
    width: 100%;
    background: transparent;
    border-bottom: 1px solid rgba(6, 78, 59, 0.2);
    padding: 1rem 0;
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    outline: none;
    color: #064e3b;
}
.noble-input:focus {
    border-bottom-color: #d97706;
}
.noble-input::placeholder {
    color: rgba(6, 78, 59, 0.4);
}

/* Custom Checkbox */
.noble-checkbox {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid #064e3b;
    border-radius: 4px;
    display: grid;
    place-content: center;
    cursor: pointer;
}
.noble-checkbox::before {
    content: '';
    width: 0.75rem;
    height: 0.75rem;
    background-color: #d97706;
    transform: scale(0);
    transition: 0.2s transform ease-in-out;
    border-radius: 2px;
}
.noble-checkbox:checked::before {
    transform: scale(1);
}

/* Map/Globe Decoration */
.location-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(6, 78, 59, 0.1);
}

/* FAQ Accordion */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}


/* --- MOBILE OPTIMIZATIONS --- */
@media (max-width: 768px) {
    /* Fix Manifesto Card Stacking on Mobile */
    .manifesto-card {
        min-height: auto !important;
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
        position: relative !important; /* Disable sticky on mobile */
        top: auto !important;
    }
    
    /* Adjust Manifesto Image Height */
    .manifesto-img-wrapper {
        height: 300px !important;
    }

    /* Ensure modals are full screen or well-padded */
    #bio-content-panel {
        max-height: 85vh;
        width: 95%;
    }

    /* Adjust Typography for very small screens */
    h1 {
        font-size: 2.5rem !important; /* Fallback */
    }
    
    /* Fix Horizontal Scroll if it exists */
    .horizontal-container {
        width: 100% !important;
        height: auto !important;
        flex-direction: column !important;
        overflow-x: hidden !important;
    }
    .horizontal-panel {
        width: 100% !important;
        height: auto !important;
        min-height: 50vh !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}


/* Improve Mobile Menu Touch Targets */
#mobile-menu a {
    padding: 12px 0;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
#mobile-menu a:last-child {
    border-bottom: none;
}

/* Ensure inputs are easy to tap */
input, select, textarea, button {
    touch-action: manipulation;
}


/* Services Hero Mobile Scroll Fix */
@media (max-width: 768px) {
    .hero-slide > div:first-child {
        overflow-y: auto;
    }
}

/* Global Accessibility & Safety */
h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Better Focus States for Accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #d97706;
    outline-offset: 2px;
}

