/* ============================================
   The Scienceats — BENZ-style (CodePen OPXRxdL clone)
   Tailwind + custom overrides
   ============================================ */

/* Titles and H1: Merriweather Sans */
h1, h2, h3, h4, h5, h6,
.section-title {
    font-family: 'Merriweather Sans', 'Inter', -apple-system, sans-serif;
}

/* Section titles: handwritten-style gold underline */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M0,12 C30,4 60,16 90,10 S150,14 180,8 S240,12 270,6 S300,10 300,10' stroke='%23D4AF37' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center bottom;
    background-size: 100% 100%;
}

/* Header: alignment and sizing */
header nav a,
header nav button {
    display: inline-flex;
    align-items: center;
}

/* Navbar gradient underline (fades at both ends) */
.header-gradient {
    position: relative;
}
.header-gradient::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.2) 15%, rgba(255,255,255,0.1) 50%, rgba(20, 184, 166, 0.15) 85%, transparent 100%);
    pointer-events: none;
}

/* Hero glassmorphism - semi-transparent, blur, light-catcher edge, depth shadow */
.hero-glass {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem 2rem 2rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
/* Overlap: text box shifts right to merge with image */
.hero-glass-overlap {
    position: relative;
    z-index: 2;
}
@media (min-width: 1024px) {
    .hero-glass-overlap {
        margin-right: -50px;
    }
}

/* Hero subheadline gold gradient */
.hero-subheadline {
    background: linear-gradient(135deg, #D4AF37 0%, #E8C547 40%, #B8962E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Our Process button - gradient border with glow */
.hero-btn-outline {
    border: 1px solid rgba(212, 175, 55, 0.4);
    background: rgba(10, 25, 47, 0.6);
    color: #e5e7eb;
}
.hero-btn-outline:hover {
    color: #D4AF37;
    border-color: rgba(212, 175, 55, 0.7);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.25);
}

/* Hero image - left edge fades in softly under text */
.hero-image-mask {
    mask-image: linear-gradient(to right, transparent 0%, black 20%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%);
    border-radius: 1.5rem;
}

/* Background diffusion glows */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
}
.hero-glow-gold {
    width: 400px;
    height: 400px;
    background: #D4AF37;
    top: 60%;
    left: 20%;
    transform: translate(-50%, -50%);
}
.hero-glow-teal {
    width: 300px;
    height: 300px;
    background: #14B8A6;
    top: 20%;
    right: 15%;
    transform: translate(50%, -50%);
}
/* Center glow - fills the gap, "sunlight" effect */
.hero-glow-center {
    width: 500px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.08) 0%, rgba(20, 184, 166, 0.06) 50%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(60px);
    opacity: 1;
}
/* Connector - subtle gradient line bridging text and image */
.hero-connector {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.1) 30%, rgba(212, 175, 55, 0.15) 50%, rgba(212, 175, 55, 0.1) 70%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Header: mobile menu initial transform for animation */
#mobileMenu {
    transform: translateY(-0.5rem);
}

/* Custom scrollbar and smooth behavior */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Custom fade-in-up - visible by default; GSAP animates on scroll */
.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure interactive elements meet 44px touch target */
button,
a,
[role="button"] {
    min-height: 44px;
    min-width: 44px;
}

/* Dashboard tabs active state - Amber Gold accent */
.dashboard-tab.active {
    color: #D4AF37;
    border-bottom-color: #D4AF37;
}

/* ============================================
   Lab to Shelf Projects Section
   ============================================ */

/* Background aura - warm radial gradient (5% opacity) */
.dashboard-aura {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(139, 90, 43, 0.05) 0%, rgba(212, 175, 55, 0.03) 40%, transparent 70%);
    pointer-events: none;
}

/* Projects gradient typography */
.projects-gradient {
    background: linear-gradient(to right, #D4AF37, #FBE7A1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Check icons - gold to teal gradient (via SVG) */
.dashboard-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Active tab glow - bridges tabs to image below */
.dashboard-tabs {
    position: relative;
}
.dashboard-tab.active {
    box-shadow: 0 8px 40px rgba(212, 175, 55, 0.12);
}

/* Image vignette - softer edges, set into page */
.dashboard-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}
.dashboard-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    background: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}
.dashboard-image-wrap img {
    display: block;
}

/* Modal visibility */
#demoModal.flex,
#serviceModal.flex {
    display: flex;
}

#demoModal.hidden,
#serviceModal.hidden {
    display: none;
}

/* Range input styling - Amber Gold accent */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.5rem;
    background: #D4AF37;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.5rem;
    background: #D4AF37;
    cursor: pointer;
    border: none;
}

/* Contact form select - dark theme */
.contact-form select option,
select option {
    background: #0A192F;
    color: #fff;
}

/* ============================================
   Our Expertise Section
   ============================================ */

/* Section glow backdrop - halo effect */
.expertise-section {
    position: relative;
}
.expertise-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    max-width: 1400px;
    height: 120%;
    max-height: 800px;
    background: radial-gradient(ellipse at center, rgba(20, 184, 166, 0.08) 0%, rgba(212, 175, 55, 0.05) 40%, transparent 70%);
    pointer-events: none;
}

/* Expertise cards - high-end consultancy standard */
.expertise-card {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.expertise-card:hover {
    border-color: #D4AF37;
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.15);
}

.expertise-card-inner {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/5;
}

/* Image fills card background, scales on hover */
.expertise-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.expertise-card:hover .expertise-card-img {
    transform: scale(1.05);
}

/* Permanent overlay - ensures text readability */
.expertise-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 50%, transparent 100%);
    pointer-events: none;
}

/* Text content - bottom-left, 24px padding */
.expertise-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 1;
}

.expertise-card-title {
    color: #D4AF37;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.25rem;
}

.expertise-card-sub {
    color: rgba(156, 163, 175, 0.9);
    font-size: 0.875rem;
    font-weight: 400;
}

/* Placeholder for broken images */
.expertise-card-placeholder {
    z-index: 0;
}

/* Leaflet map - ensure proper sizing */
.map-wrapper .leaflet-container {
    height: 100% !important;
    min-height: 550px;
}

/* Leaflet map - dark popup styling */
.leaflet-popup-content-wrapper {
    background: #0A192F;
    color: #fff;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.1);
}
.leaflet-popup-tip { background: #0A192F; }
.leaflet-container a.leaflet-popup-close-button { color: #fff; }
