/* =========================================================================
   Castora Foam Tech - Ultra Minimal Premium UI (AI-Inspired)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@500;700&display=swap');

:root {
    --bg-main: #0B192C; /* Deep Navy Blue */
    --bg-surface: #12233A; /* Slightly lighter navy for cards */
    --bg-alt: #0D1E33;
    --bg-glass: rgba(255, 255, 255, 0.05); /* Low opacity white */
    --bg-glass-hover: rgba(255, 255, 255, 0.1);
    
    --text-primary: #FFFFFF;
    --text-secondary: #D6DCE4; /* Silver/Light Gray */
    --text-muted: #8E9BAE;
    --text-inverse: #FFFFFF;
    
    --bg-dark: #07101C;
    --primary-light: #2E5F8A;
    --accent-amber: #C55A11;
    --silver: #D6DCE4;

    --border-light: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(255, 255, 255, 0.2);

    /* Navbar / hero seam (reference blend) */
    --hero-navy: #0a1f44;
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-primary: 'Inter', sans-serif;
    
    /* Easing - Premium Premium Feel */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Timings */
    --duration-fast: 0.3s;
    --duration-normal: 0.6s;
    --duration-slow: 1.2s;
    
    /* Spacing */
    --space-sm: 1rem;
    --space-md: 2.5rem;
    --space-lg: 5rem;
    --space-xl: 10rem;

    /* Fixed bar height = gradient band (must match .navbar .nav-container min-height) */
    --navbar-height: 5.875rem;
}

@media (min-width: 640px) {
    :root {
        --navbar-height: 6.5rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --navbar-height: 7.125rem;
    }
}

/* =========================================================================
   Reset & Base
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: initial; /* Handled by JS or smooth natively on some OS, but we might add Lenis later if needed */
    scroll-padding-top: var(--navbar-height);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: auto; /* Reverting to default cursor for premium simplicity */
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img, svg {
    max-width: 100%;
    display: block;
}

/* Custom Cursor (Disabled for cleaner UX) */
.cursor-dot { display: none; }
.cursor-outline { display: none; }
.cursor-outline.hover { display: none; }

/* =========================================================================
   Layout
   ========================================================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0; /* Mandatory section padding rule */
}

/* Inner pages: space below fixed navbar + vertical balance for breadcrumb + title */
.section.page-header {
    padding-top: clamp(7.5rem, 16vh, 12rem);
    padding-bottom: clamp(4rem, 12vh, 8rem);
    min-height: clamp(300px, 42vh, 480px);
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.section.page-header .container {
    width: 100%;
}

.section.page-header .breadcrumb {
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

/* Keep inner-page headings large but less dominant */
.section.page-header .hero-title {
    font-size: clamp(2.3rem, 5.4vw, 4.4rem);
    line-height: 1.08;
}

.section-light {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.section-light .section-title, .section-light p {
    color: var(--text-primary);
}

.section-light .card {
    background-color: var(--bg-surface);
    border-color: rgba(255,255,255,0.05);
}

.section-light .card:hover {
    background-color: var(--bg-alt);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.section-header {
    margin-bottom: var(--space-lg);
}

.grid {
    display: grid;
    gap: 40px;
    align-items: stretch; /* Cards are equal height */
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.align-center { align-items: center; }
.text-center { text-align: center; }
.flex-end { justify-content: flex-end; display: flex; }

/* =========================================================================
   Typography
   ========================================================================= */
h1, h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: var(--text-primary);
}

h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: var(--text-secondary);
}

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

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.text-light { color: #ffffff !important; }
.text-light-muted { color: var(--text-secondary) !important; }

/* =========================================================================
   Navbar
   ========================================================================= */
/* Fixed-height bar: white → #0A1F44 inside the bar only (blends with hero) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: none;
    overflow: visible;
    isolation: isolate;
    padding: 0;
    box-sizing: border-box;
    min-height: var(--navbar-height);
    /* Background gradient: Tailwind utilities on <header class="navbar ..."> */
    background: transparent;
    background-color: transparent;
}

.navbar .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    min-height: var(--navbar-height);
}

/* PNG wordmark — natural dark on white upper band */
.navbar .navbar-logo-img,
.footer-logo-img {
    display: block;
    width: auto;
    height: 2.85rem;
    max-height: 2.95rem;
    object-fit: contain;
    object-position: left center;
}

/* Slightly larger footer logo for better visual balance */
.footer-logo-img {
    height: 3.1rem;
    max-height: 3.2rem;
}

@media (min-width: 640px) {
    .navbar .navbar-logo-img,
    .footer-logo-img {
        height: 3.2rem;
        max-height: 3.35rem;
    }

    .footer-logo-img {
        height: 3.35rem;
        max-height: 3.5rem;
    }
}

@media (min-width: 768px) {
    .navbar .navbar-logo-img,
    .footer-logo-img {
        height: 3.55rem;
        max-height: 3.7rem;
    }

    .footer-logo-img {
        height: 3.7rem;
        max-height: 3.85rem;
    }
}

@media (min-width: 1024px) {
    .navbar .navbar-logo-img,
    .footer-logo-img {
        height: 3.95rem;
        max-height: 4.1rem;
    }

    .footer-logo-img {
        height: 4.1rem;
        max-height: 4.25rem;
    }
}

.logo {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1001;
    display: inline-flex;
    align-items: center;
    line-height: 1.05;
}

/* Text wordmark — no PNG checkerboard; always crisp on dark navbar */
.logo-text-brand {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35em;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.15rem, 2.2vw, 1.55rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-text-brand .logo-mark {
    color: var(--text-primary);
}

.logo-text-brand .logo-mark-accent {
    color: var(--text-secondary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .logo-text-brand {
        font-size: 1.05rem;
        letter-spacing: 0.04em;
    }

    .navbar .navbar-logo-img {
        max-width: min(65vw, 260px);
    }
}

.footer-logo-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35em;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer-logo-text .logo-mark {
    color: var(--text-primary);
}

.footer-logo-text .logo-mark-accent {
    color: var(--text-secondary);
}

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

.nav-links a {
    font-size: 0.95rem;
    text-transform: capitalize; /* Cleaner than uppercase */
    letter-spacing: 0.02em;
    font-weight: 500;
    font-family: var(--font-heading);
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease-in-out;
}

.nav-links a.active::after, .nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--text-secondary); /* Link hover states Secondary Blue */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--text-secondary);
    transition: width 0.3s ease-in-out;
}

/* White / gradient bar: dark navy links */
@media (min-width: 769px) {
    .navbar .nav-links a:not(.btn) {
        color: #0a1f44 !important;
    }

    .navbar .nav-links a:not(.btn):hover {
        color: #05152d !important;
    }

    .navbar .nav-links a:not(.btn).active {
        color: #041226 !important;
        font-weight: 600;
    }

    .navbar .nav-links a:not(.btn)::after {
        background-color: rgba(10, 31, 68, 0.35) !important;
        transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
    }

    .navbar .nav-links a:not(.btn):hover::after,
    .navbar .nav-links a:not(.btn).active::after {
        background-color: #0a1f44 !important;
    }

    .navbar .nav-links a.btn-nav {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-weight: 600;
        font-size: 0.8125rem;
        color: #0a1f44 !important;
        background: rgba(255, 255, 255, 0.5) !important;
        border: 2px solid #0a1f44 !important;
        border-radius: 0.375rem;
        padding: 0.65rem 1.4rem !important;
        backdrop-filter: blur(4px);
        box-shadow: none;
        transition: all var(--duration-fast) var(--ease-out-expo) !important;
        line-height: 1;
    }

    .navbar .nav-links a.btn-nav::after {
        display: none !important;
    }

    .navbar .nav-links a.btn-nav:hover {
        background: #0a1f44 !important;
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(10, 31, 68, 0.2);
        color: #ffffff !important;
    }
}

@media (max-width: 768px) {
    .navbar .nav-links a:not(.btn):not(.btn-nav) {
        color: rgba(255, 255, 255, 0.95) !important;
    }

    .navbar .nav-links a:not(.btn):not(.btn-nav):hover,
    .navbar .nav-links a:not(.btn):not(.btn-nav).active {
        color: #ffffff !important;
    }

    .navbar .nav-links a:not(.btn):not(.btn-nav)::after {
        background-color: rgba(255, 255, 255, 0.5) !important;
        transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
    }

    .navbar .nav-links a:not(.btn):not(.btn-nav):hover::after,
    .navbar .nav-links a:not(.btn):not(.btn-nav).active::after {
        background-color: #ffffff !important;
    }

    .navbar .nav-links a.btn-nav {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-weight: 600;
        font-size: 0.8125rem;
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: 2px solid #ffffff !important;
        border-radius: 0.375rem;
        padding: 0.65rem 1.4rem !important;
        backdrop-filter: blur(4px);
        box-shadow: none;
        transition: all var(--duration-fast) var(--ease-out-expo) !important;
        line-height: 1;
        margin-top: 10px;
    }

    .navbar .nav-links a.btn-nav::after {
        display: none !important;
    }

    .navbar .nav-links a.btn-nav:hover {
        background: #ffffff !important;
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
        color: #0a1f44 !important;
    }
}

.menu-toggle { display: none; }
.mobile-menu-label { display: none; }


/* =========================================================================
   Buttons & Interactions
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    border-radius: 0.375rem;
    position: relative;
    overflow: hidden;
    transition: all var(--duration-fast) var(--ease-out-expo);
    z-index: 1;
}

.btn-primary {
    background: #ffffff; /* High contrast CTA */
    color: #0B192C;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn-primary::before {
    display: none;
}

.btn-primary:hover {
    background: #8490a0; 
    box-shadow: 0 10px 25px -5px rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    color: #0B192C;
    
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light); 
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05); 
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* Hero: keep label readable on hover (solid contrast, no “same as bg”) */
.hero .btn-primary {
    background: #ffffff !important;
    color: #0b192c !important;
}

.hero .btn-primary:hover {
    background: #e2e8f0 !important;
    color: #0b192c !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.hero .btn-outline {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    background-color: transparent !important;
}

.hero .btn-outline:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: #ffffff !important;
}



.btn-magnetic {
    /* Transforms handled by js */
    display: inline-block;
}

.arrow {
    margin-left: 0.5rem;
    transition: transform var(--duration-fast) var(--ease-out-expo);
}
.btn:hover .arrow {
    transform: translateX(5px);
}

/* =========================================================================
   Hero Section
   ========================================================================= */
.hero {
    min-height: max(700px, 100svh);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Start hero below fixed navbar so title is not under the gradient */
    padding-top: var(--navbar-height);
    box-sizing: border-box;
    background-color: var(--hero-navy);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 2;
    min-height: 80vh;
}

.hero-content {
    order: 1;
    width: 100%;
    min-width: 0;
}

.hero-visual {
    order: 2;
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

#three-canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 4rem;
        text-align: left;
    }

    .hero-content {
        order: 1;
        padding-right: 2rem;
    }

    .hero-visual {
        order: 2;
        height: 600px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 6vw, 4.2rem);
    }
}

.hero-bg-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background:
        radial-gradient(ellipse 85% 70% at 72% 42%, rgba(100, 180, 255, 0.15) 0%, transparent 55%),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 60%); */
    z-index: 0;
}

/* Shown when Three.js / GLB fails (tunnel, 404, or blocked CDN) */
.hero-three-error {
    position: fixed;
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    max-width: min(92vw, 520px);
    padding: 0.75rem 1rem;
    background: rgba(140, 30, 30, 0.95);
    color: #fff;
    font-size: 0.8125rem;
    line-height: 1.4;
    border-radius: 8px;
    font-family: system-ui, sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* 3D Container Variables & Styles */
.hero-3d-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 1650px;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Right side, vertically centered — clears headline on the left */
@media (min-width: 900px) {
    .hero-3d-scene {
        justify-content: flex-end;
        padding-right: clamp(16px, 11vw, 170px);
        padding-left: 0;
    }
}

.container-assembly {
    position: relative;
    width: min(400px, 92vw);
    height: min(400px, 92vw);
    transform-style: preserve-3d;
    transform-origin: center center;
}

.corner-fitting {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2E5F8A 0%, #1B3A5C 100%);
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 4px;
    transform-style: preserve-3d;
    opacity: 0.9;
    will-change: transform;
}

/* Add inner details to corner fitting to make it look realistic */
.corner-fitting::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 15px;
    background: #0B192C;
    border-radius: 10px;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.8);
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    width: 100%;
}

.hero-logo {
    margin-bottom: 2rem;
}

.logo-3d {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 500;
    background: linear-gradient(180deg, #000000 0%, #3f3f4600 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
}

.logo-3d span {
    font-weight: 300;
    background: linear-gradient(180deg, #3f3f46 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.8rem, 8vw, 6rem);
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 0.95;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    max-width: 900px;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 1rem;
    max-width: 700px;
}

.hero-meta {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    margin-bottom: 3rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

/* Reference: industrial CTA — caps + tracking (matches split hero mock) */
.hero .hero-actions .btn {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(0.75rem, 1.1vw, 0.8125rem);
    font-weight: 600;
    padding: 0.65rem 1.15rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.5;
    z-index: 10;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 1px solid var(--text-primary);
    border-radius: 20px;
    position: relative;
}

.wheel {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--text-primary);
    border-radius: 50%;
    animation: scroll 2s infinite var(--ease-in-out);
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}


/* =========================================================================
   Stats Bar
   ========================================================================= */
.stats-bar {
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background-color: var(--bg-surface);
    position: relative;
}

/* .stats-bar::before removed per user request */

.stats-grid {
    position: relative;
    padding: 4rem 0;
}

.stat-item {
    position: relative;
}

.stat-number {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 300;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
}

.stat-number.prefix {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 400;
    align-self: center;
    margin-top: 1rem;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
}


/* =========================================================================
   Intro Section
   ========================================================================= */
.intro-grid {
    gap: 6rem;
}

.intro-highlight {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1.4;
    max-width: 90%;
    margin-top: 2rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--border-light);
}

.image-parallax-container {
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    height: 600px;
    background-color: var(--bg-surface);
}

.image-placeholder.premium {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f4f4f5 0%, #e4e4e7 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--border-light);
    transform: scale(1.1); /* for parallax */
}

.placeholder-text {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.placeholder-sub {
    font-size: 0.85rem;
    opacity: 0.3;
}

.image-caption {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1.5rem;
    text-align: right;
    opacity: 0.5;
}


/* =========================================================================
   Cards (Why Choose Us & Industries)
   ========================================================================= */
.card {
    padding: 3rem 2rem;
    border-radius: 0.75rem;
    background-color: var(--bg-surface);
    border: 1px solid transparent;
    transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease, filter 0.35s ease, border-color 0.35s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform, box-shadow, filter;
}

.glass-card {
    background: rgba(255, 255, 255, 0.05); /* Dark translucent background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out-expo);
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(140deg, rgba(96, 165, 250, 0.1), rgba(255, 255, 255, 0.03) 45%, rgba(96, 165, 250, 0.06));
    transition: opacity 0.35s ease;
}

.card:hover {
    border-color: var(--border-glow);
    background-color: var(--bg-alt);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(147, 197, 253, 0.16), 0 0 28px rgba(96, 165, 250, 0.2);
    transform: translateY(-5px) scale(1.04);
    filter: brightness(1.04) contrast(1.03);
}

.card:hover::before {
    opacity: 1;
}

.card:hover::after {
    opacity: 1;
}

/* Hover polish only on devices that support true hover */
@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(-5px) scale(1.04);
    }
}

/* Touch devices: keep feedback subtle and stable */
@media (hover: none) {
    .card {
        transition: transform 0.32s ease, box-shadow 0.32s ease, background-color 0.32s ease, filter 0.32s ease, border-color 0.32s ease;
    }
}

/* Accessibility + performance */
@media (prefers-reduced-motion: reduce) {
    .card,
    .card::before,
    .card::after {
        transition: none !important;
    }

    .card:hover {
        transform: none !important;
        filter: none !important;
    }
}

/* Enhanced Team/Directer Cards */
.card[style*="border-left"] {
    transition: all 0.5s var(--ease-out-expo);
}

.card[style*="border-left"]:hover {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.45);
    background-color: var(--bg-surface);
}

.card[style*="border-left: 4px solid var(--accent-amber)"]:hover {
    border-left-width: 8px !important;
    box-shadow: -15px 20px 40px -10px rgba(197, 90, 17, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.card[style*="border-left: 4px solid var(--primary-light)"]:hover {
    border-left-width: 8px !important;
    box-shadow: -15px 20px 40px -10px rgba(46, 95, 138, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.card-icon-minimal {
    margin-bottom: 2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.card:hover .card-icon-minimal {
    color: var(--bg-dark);
    transform: scale(1.1);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* Unified monochrome icon system (home-like) */
.icon-chip {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: rgba(2, 12, 28, 0.68);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--text-primary);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, color 0.25s ease, background-color 0.25s ease;
}

.icon-chip svg {
    width: 26px;
    height: 26px;
    display: block;
}

.icon-chip-lg {
    width: 90px;
    height: 90px;
    border-radius: 18px;
}

.icon-chip-lg svg {
    width: 38px;
    height: 38px;
}

.card:hover .icon-chip,
.image-wrapper:hover .icon-chip,
.process-step:hover .icon-chip {
    transform: translateY(-2px);
    border-color: rgba(226, 232, 240, 0.55);
    color: #ffffff;
    background: rgba(2, 12, 28, 0.9);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08), 0 14px 28px rgba(2, 6, 23, 0.45);
}

/* =========================================================================
   Gallery specific
   ========================================================================= */
.gallery-grid {
    gap: 20px;
}
.gallery-item {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    background: #1b1b1b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.gallery-item:hover {
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}
.gallery-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    opacity: 0.85;
}
.gallery-item:hover .gallery-img {
    transform: scale(1.08);
    opacity: 1;
}
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s var(--ease-out-expo);
    display: flex;
    align-items: flex-end;
}
.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}
.gallery-caption {
    color: #ffffff;
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* =========================================================================
   CTA Strip
   ========================================================================= */
.section-cta-strip {
    background: #000000;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    padding: var(--space-xl) 0;
}

.section-cta-strip .section-title,
.section-cta-strip .cta-subtitle {
    color: #ffffff;
}

.section-cta-strip .btn-primary {
    background-color: #ffffff;
    color: #000000;
}

.section-cta-strip .btn-primary::before {
    background-color: #e4e4e7;
}

.cta-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.margin-bottom-lg {
    margin-bottom: 3rem;
}


/* =========================================================================
   Forms & Inputs
   ========================================================================= */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    background-color: #ffffff;
    border: 1px solid rgba(10, 31, 68, 0.18);
    border-radius: 6px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: #0a1f44;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

.form-control:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.form-control::placeholder {
    color: #64748b;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    color: #0a1f44;
    background-color: #ffffff;
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A1F44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select.form-control option,
select.form-control optgroup {
    color: #0a1f44;
    background-color: #ffffff;
}

/* =========================================================================
   Enquiry / Bottom Section
   ========================================================================= */
.section-bottom-cta {
    position: relative;
    background-color: var(--bg-surface);
}

.phone-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.enquiry-sub {
    font-size: 1.25rem;
    max-width: 500px;
    color: var(--text-secondary);
}

.enquiry-actions {
    gap: 1.5rem;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: clamp(1.5rem, 3.5vw, 2.5rem) 0 clamp(1.25rem, 3.5vw, 2.25rem);
    background-color: #ffffff;
    color: #3f3f46;
}

/* Navy → black blend from section above */
.footer-wedge {
    display: none;
}

.footer .container.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
    padding-top: clamp(3rem, 6.5vw, 5.75rem);
}

.footer a {
    transition: color 0.25s ease, opacity 0.25s ease;
}

.footer a:hover {
    color: #000000;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 1.15fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
    margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
}

.footer-brand {
    padding-right: clamp(0rem, 3vw, 2rem);
}

.footer-logo-link {
    display: inline-block;
    margin-bottom: 1rem;
    text-decoration: none;
    line-height: 0;
}

.footer-logo-link:hover {
    opacity: 0.9;
}

.footer-logo-img {
    display: block;
    width: auto;
    height: 2.85rem;
    max-height: 2.95rem;
    max-width: min(100%, 300px);
    object-fit: contain;
    object-position: left center;
}

@media (min-width: 640px) {
    .footer-logo-img {
        height: 3.2rem;
        max-height: 3.35rem;
    }
}

@media (min-width: 768px) {
    .footer-logo-img {
        height: 3.55rem;
        max-height: 3.7rem;
    }
}

@media (min-width: 1024px) {
    .footer-logo-img {
        height: 3.95rem;
        max-height: 4.1rem;
    }
}

.footer-desc {
    max-width: 22rem;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #52525B;
}

.footer-heading {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin: 0 0 0.85rem;
    color: #000000;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links li:last-child {
    margin-bottom: 0;
}

.footer-links a {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #161617;
    text-decoration: none;
}

.footer-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-contact-list > li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #52525B;
}

.footer-contact-list > li:last-child {
    margin-bottom: 0;
}

.footer-contact-list a {
    color: #3f3f46;
    text-decoration: none;
}

.footer-icon {
    flex-shrink: 0;
    margin-top: 0.2em;
    opacity: 0.65;
    color: #52525B;
}

.footer-factory {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.footer-factory-label {
    display: block;
    font-weight: 600;
    color: #000000;
    font-size: 0.875rem;
}

.footer-factory-text {
    color: #52525B;
}

.footer-bottom {
    text-align: center;
    padding-top: clamp(1rem, 2.5vw, 1.5rem);
    margin-top: clamp(0.5rem, 2vw, 1rem);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.8125rem;
    color: #52525B;
    line-height: 1.6;
}

.footer-bottom p {
    margin: 0;
}

.magnetic-link-small {
    display: inline-block;
    transition: transform var(--duration-fast);
}

.footer-slogan {
    margin-top: 2rem;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    opacity: 0.5;
}

.footer-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}


/* =========================================================================
   Animations & Reveals
   ========================================================================= */
/* Initial States */
.reveal-up, .reveal-fade, .reveal-scale, .reveal-up-card, .reveal-text {
    visibility: hidden;
}

/* Classes added by observer */
.is-revealed.reveal-up {
    visibility: visible;
    animation: revealUp 1s var(--ease-out-expo) forwards;
    animation-delay: calc(var(--delay, 0) * 0.1s);
}

.is-revealed.reveal-up-card {
    visibility: visible;
    animation: revealUp 1s var(--ease-out-expo) forwards;
    animation-delay: calc(var(--delay, 0) * 0.15s);
}

.is-revealed.reveal-fade {
    visibility: visible;
    animation: fade 1.5s var(--ease-out-expo) forwards;
    animation-delay: calc(var(--delay, 0) * 0.2s);
}

.is-revealed.reveal-scale,
.is-revealed.reveal-scale .image-placeholder {
    visibility: visible;
    animation: scaleDown 1.5s var(--ease-out-expo) forwards;
}

/* Split text line animation handled in JS, but fallback here */
.is-revealed.reveal-text {
    visibility: visible;
}
.line-wrapper {
    overflow: hidden;
    display: block;
}
.line-inner {
    display: block;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 1.2s var(--ease-out-expo), opacity 1.2s var(--ease-out-expo);
}
.is-revealed .line-inner {
    transform: translateY(0);
    opacity: 1;
}

@keyframes revealUp {
    0% { transform: translateY(60px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes fade {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes scaleDown {
    0% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* =========================================================================
   Process Flowchart
   ========================================================================= */
.process-flowchart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    max-width: 1000px;
    margin: 3rem auto 0;
    padding: 2rem 0;
}

.process-flowchart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50px;
    right: 50px;
    height: 2px;
    background: var(--border-light);
    transform: translateY(-50%);
    z-index: 0;
}

.process-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-main);
    padding: 1.5rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    width: 140px;
    text-align: center;
    transition: all var(--duration-fast);
}

.process-step:hover {
    border-color: var(--text-secondary);
    transform: translateY(-5px);
    background: var(--bg-surface);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.process-icon {
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
}

.process-step:hover .process-icon {
    color: #FFFFFF;
}

.process-label {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================================================
   Industry Target Custom Icons
   ========================================================================= */
.industry-icon {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.card:hover .industry-icon {
    color: #FFFFFF;
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

/* =========================================================================
   Interactive Process Tabs
   ========================================================================= */
.process-tabs-container {
    max-width: 900px;
    margin: 0 auto;
}

.process-tabs-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.process-tabs-nav::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    height: 1px;
    background: var(--border-light);
    z-index: 0;
}

.process-tab-btn {
    position: relative;
    z-index: 1;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    outline: none;
}

.process-tab-btn span {
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s var(--ease-out-expo);
}

.process-tab-btn .tab-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s var(--ease-out-expo);
}

.process-tab-btn.active span {
    background: #FFFFFF;
    color: #0B192C;
    border-color: #FFFFFF;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.process-tab-btn.active .tab-label,
.process-tab-btn:hover .tab-label {
    opacity: 1;
    transform: translateY(0);
}

.process-tab-btn:hover span {
    border-color: #FFFFFF;
    background: #FFFFFF;
    color: #0B192C;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.process-tab-content-wrapper {
    min-height: 200px;
    padding: 4rem;
    display: flex;
    align-items: center;
}

.process-tab-pane {
    display: none;
    animation: fade var(--duration-normal) var(--ease-out-expo);
}

.process-tab-pane.active {
    display: block;
}

/* =========================================================================
   Why Choose Castora - Center Bottom Cards
   ========================================================================= */
@media (min-width: 1025px) {
    #why-choose-castora .grid-3 {
        grid-template-columns: repeat(6, 1fr);
    }
    #why-choose-castora .card {
        grid-column: span 2;
    }
    #why-choose-castora .card:nth-child(4) {
        grid-column: 2 / span 2;
    }
    #why-choose-castora .card:nth-child(5) {
        grid-column: 4 / span 2;
    }
}
@media (max-width: 1024px) and (min-width: 769px) {
    #why-choose-castora .card:nth-child(5) {
        grid-column: 1 / -1;
        width: calc(50% - 20px);
        margin: 0 auto;
    }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1024px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .card-centered-span { grid-column: auto; }
    
    .intro-grid { gap: 3rem; grid-template-columns: 1fr; }
    .image-parallax-container { height: 400px; }
    
    .stats-bar::before { display: none; }
    
    .process-flowchart {
        flex-direction: column;
        gap: 3rem;
    }
    
    .process-flowchart::before {
        top: 0;
        bottom: 0;
        left: 50%;
        right: auto;
        height: 100%;
        width: 2px;
        transform: translateX(-50%);
    }
    
    .process-step {
        width: 200px;
    }
    
    .process-tabs-nav {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
    .process-tabs-nav::before {
        display: none;
    }
    .process-tab-btn .tab-label {
        opacity: 1;
        transform: translateY(0);
    }
    .process-tab-content-wrapper {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; gap: 2.5rem; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-bottom: 2rem;
    }

    .footer {
        padding-bottom: 1.75rem;
    }

    .footer .container.footer-container {
        padding-top: 2.5rem;
    }

    .footer-brand {
        padding-right: 0;
    }

    .footer-heading {
        margin-bottom: 1.1rem;
    }

    .footer-logo-img {
        max-width: min(100%, 320px);
    }
    
    /* Dropdown anchors to fixed navbar (full width), not inner container */
    .navbar .nav-container {
        position: static;
    }
    
    .navbar .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0 !important;
        box-sizing: border-box;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.75rem 0 1.25rem;
        padding-left: max(1.25rem, env(safe-area-inset-left));
        padding-right: max(1.25rem, env(safe-area-inset-right));
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
        background: linear-gradient(180deg, #0d1f3d 0%, #0a1a33 100%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0 0 1rem 1rem;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.32s ease, visibility 0.32s ease, transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1005;
        max-height: min(72vh, 520px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    
    .navbar .nav-links li:last-child {
        border-bottom: none;
    }
    
    .navbar .nav-links a {
        display: block;
        padding: 0.95rem 0.35rem;
        font-size: 1.05rem;
        font-weight: 500;
    }
    
    .navbar .nav-links a::after {
        display: none;
    }
    
    .menu-toggle:checked ~ .nav-links {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    .mobile-menu-label {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 7px;
        cursor: pointer;
        width: 44px;
        height: 44px;
        margin-left: auto;
        flex-shrink: 0;
        z-index: 1006;
        position: relative;
        border-radius: 0.5rem;
        transition: background-color 0.2s ease;
    }
    
    .mobile-menu-label:active {
        background-color: rgba(10, 31, 68, 0.06);
    }
    
    .hamburger-line {
        width: 22px;
        height: 2px;
        background-color: #0a1f44;
        border-radius: 1px;
        transition: transform 0.32s ease, opacity 0.2s ease;
        transform-origin: center;
    }
    
    .menu-toggle:checked ~ .mobile-menu-label .hamburger-line:first-of-type {
        transform: translateY(4.5px) rotate(45deg);
    }
    
    .menu-toggle:checked ~ .mobile-menu-label .hamburger-line:last-of-type {
        transform: translateY(-4.5px) rotate(-45deg);
    }
    
    .enquiry-actions {
        justify-content: flex-start;
        flex-direction: column;
        width: 100%;
    }
    
    .enquiry-actions .btn {
        width: 100%;
    }

    /* --- Mobile layout: balanced spacing, less empty vertical space --- */
    .container {
        padding-left: max(1.125rem, env(safe-area-inset-left));
        padding-right: max(1.125rem, env(safe-area-inset-right));
    }

    .section {
        padding-top: 3.25rem;
        padding-bottom: 3.25rem;
    }

    .section.page-header {
        padding-top: max(
            clamp(6rem, 20vw, 7.75rem),
            calc(5.25rem + env(safe-area-inset-top, 0px))
        );
        padding-bottom: 1.75rem;
        min-height: 0;
        align-items: flex-start;
    }

    .section.page-header .breadcrumb {
        margin-bottom: 0.65rem;
    }

    .section.page-header .hero-title {
        font-size: clamp(1.75rem, 7.5vw, 2.35rem);
        line-height: 1.12;
        margin-bottom: 0.5rem;
    }

    .grid {
        gap: 1.5rem;
    }

    .grid-2,
    .grid-3 {
        gap: 1.75rem !important;
    }

    .grid-4 {
        gap: 1.15rem;
    }

    .section-title {
        margin-bottom: 1.1rem;
        font-size: clamp(1.6rem, 5.5vw, 2.15rem);
    }

    .section-header {
        margin-bottom: 1.75rem;
    }

    .section-cta-strip {
        padding-top: 2.75rem;
        padding-bottom: 2.75rem;
    }

    .cta-subtitle {
        margin-bottom: 1.5rem;
        font-size: 1.05rem;
    }

    .margin-bottom-lg {
        margin-bottom: 1.75rem;
    }

    .stats-grid {
        padding: 2.25rem 0;
    }

    .intro-highlight {
        margin-top: 1.25rem;
        padding-left: 1rem;
        font-size: 1.2rem;
        max-width: 100%;
    }

    .card {
        padding: 1.65rem 1.25rem;
    }

    .card-title {
        font-size: 1.25rem;
        margin-bottom: 0.65rem;
    }

    .icon-chip {
        width: 56px;
        height: 56px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .icon-chip svg {
        width: 22px;
        height: 22px;
    }

    .icon-chip-lg {
        width: 76px;
        height: 76px;
    }

    .icon-chip-lg svg {
        width: 32px;
        height: 32px;
    }

    .footer-slogan {
        margin-top: 1.25rem;
    }

    .phone-number {
        font-size: clamp(1.85rem, 8vw, 2.5rem);
    }

    .enquiry-sub {
        font-size: 1.05rem;
    }

    .hero {
        height: auto;
        min-height: auto;
        /* Uses runtime-measured navbar height from JS for accurate mobile spacing */
        padding-top: calc(var(--navbar-height) + env(safe-area-inset-top, 0px) + 1.5rem);
        padding-bottom: 2.5rem;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        background-color: var(--hero-navy);
    }

    .hero-grid {
        min-height: auto;
        gap: 1.25rem;
    }

    .hero-content {
        padding-top: 50px;
        order: 1;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    /* Fail-safe: keep hero content visible even if reveal observer lags/fails on mobile */
    .hero .reveal-up,
    .hero .reveal-fade,
    .hero .reveal-scale,
    .hero .reveal-text {
        visibility: visible;
        animation: none;
        opacity: 1;
        transform: none;
    }

    .hero-visual {
        order: 2;
        width: 100%;
        height: min(45vh, 320px);
        margin-top: 1rem;
    }

    #three-canvas {
        position: relative;
        inset: auto;
        height: 100%;
        width: 100%;
    }

    .hero-3d-scene {
        align-items: flex-end;
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    }

    .hero .container-assembly {
        width: min(340px, 86vw);
        height: min(340px, 86vw);
    }

    .hero-label {
        margin-bottom: 0.85rem;
        font-size: 0.7rem;
        letter-spacing: 0.22em;
    }

    .hero .hero-title {
        margin-bottom: 0.85rem;
        font-size: clamp(1.95rem, 9vw, 2.65rem);
        line-height: 1.16;
        letter-spacing: 0.01em;
        max-width: 100%;
    }

    .hero-subtitle {
        margin-bottom: 0.65rem;
        font-size: 1rem;
        line-height: 1.45;
    }

    .hero-meta {
        margin-bottom: 1.35rem;
        font-size: 0.75rem;
        line-height: 1.5;
        letter-spacing: 0.05em;
        overflow-wrap: anywhere;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        width: 100%;
        max-width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 100%;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }

    .scroll-indicator {
        bottom: 1rem;
    }

    .gallery-img {
        height: 240px;
    }

    .process-tab-content-wrapper {
        padding: 1.35rem;
    }

    .section p {
        margin-bottom: 1.1rem;
    }

    .gallery-grid {
        gap: 14px;
    }
    
    /* Hide custom cursor on mobile touching devices */
    .cursor-dot, .cursor-outline { display: none; }
    body { cursor: auto; }
}


/* --- Perfect Responsive Gallery Updates --- */
.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 20px !important;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 10px !important;
    }
}

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.gallery-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item .gallery-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1) !important;
}


/* --- NEW GALLERY STYLES --- */
.new-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px !important;
}

@media (max-width: 1200px) {
    .new-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 992px) {
    .new-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 768px) {
    .new-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; }
}
@media (max-width: 480px) {
    .new-grid { grid-template-columns: 1fr !important; }
}

.new-grid .gallery-item {
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 220px; /* Small card size */
}

.new-grid .gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.new-grid .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.new-grid .gallery-item:hover .gallery-img {
    transform: scale(1.05) !important;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}
.lightbox-modal.show {
    opacity: 1;
}
.lightbox-content-wrapper {
    position: relative;
    max-width: 80%;
    max-height: 80vh;
}
.lightbox-content {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    object-fit: contain;
    background: #000;
}
.lightbox-modal.show .lightbox-content {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.lightbox-close:hover {
    color: #ccc;
}
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: 0.2s;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    line-height: 1;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-btn:hover {
    background: rgba(0,0,0,0.6);
}
.lightbox-prev {
    left: 30px;
}
.lightbox-next {
    right: 30px;
}
@media (max-width: 768px) {
    .lightbox-content-wrapper { max-width: 95%; max-height: 70vh; }
    .lightbox-btn { width: 40px; height: 40px; font-size: 30px; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { right: 0; top: -45px; }
}

/* --- Home Page Intro Image --- */
.home-intro-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.is-revealed.reveal-scale.home-intro-wrapper {
    visibility: visible;
}

.home-intro-wrapper:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.home-intro-wrapper .home-intro-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.is-revealed.reveal-scale.home-intro-wrapper .home-intro-img {
    animation: revealDownScale 1.5s var(--ease-out-expo) forwards;
}

@keyframes revealDownScale {
    0% {
        transform: scale(1.1);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.home-intro-wrapper:hover .home-intro-img {
    transform: scale(1.05) !important;
}

/* --- About Page Intro Image --- */
.about-intro-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.is-revealed.reveal-scale.about-intro-wrapper {
    visibility: visible;
}
.is-revealed.reveal-scale.about-intro-wrapper .about-intro-img {
    animation: revealDownScale 1.5s var(--ease-out-expo) forwards;
}
.about-intro-wrapper .about-intro-img {
    width: 100%;
    height: auto;
    max-height: 80vh; /* Prevents it from being too huge on desktop screens */
    object-fit: contain; /* Ensures the whole image is visible without cutting */
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.about-intro-wrapper:hover {
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.about-intro-wrapper:hover .about-intro-img {
    transform: scale(1.03) !important;
}

/* --- Product Page Image --- */
.reveal-slide-left {
    visibility: hidden;
}
.is-revealed.reveal-slide-left {
    visibility: visible;
    animation: revealSlideLeft 1.2s var(--ease-out-expo) forwards;
}
@keyframes revealSlideLeft {
    0% {
        transform: translateX(-60px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}
.product-intro-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(46, 95, 138, 0.15), 0 15px 35px rgba(0,0,0,0.3);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.product-intro-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-intro-wrapper:hover {
    box-shadow: 0 0 50px rgba(46, 95, 138, 0.25), 0 25px 50px rgba(0,0,0,0.4);
}
.product-intro-wrapper:hover .product-intro-img {
    transform: scale(1.03) !important;
}

/* =========================================================================
   Product Image Grid (12 Items)
   ========================================================================= */
.section-product-grid {
    background-color: #0f1c2e;
    color: #ffffff;
    padding: clamp(4rem, 8vw, 6rem) 0;
}

.product-image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 1024px) {
    .product-image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .product-image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.product-img-card {
    /* background-color: rgba(255, 255, 255, 0.03); */
    /* border: 1px solid rgba(255, 255, 255, 0.08); */
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    height: 100%;
    /* aspect-ratio removed for dynamic height with text */
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
}

.product-img-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(46, 95, 138, 0.2), 0 0 20px rgba(46, 95, 138, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--bg-glass-hover);
}

.product-img-wrapper {
    width: 100%;
    aspect-ratio: 1; /* Keep the image container square */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3)); */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: auto; /* Push to bottom */
    padding-top: 0.5rem;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.product-img-card:hover .product-name {
    color: var(--text-primary);
}

.product-img-card:hover .product-img-wrapper img {
    transform: scale(1.08);
}

/* About Page Specific Enhancements */
.about-intro-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.icon-list li {
    font-size: 1.05rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease, color 0.3s ease;
}

.icon-list li:hover {
    transform: translateX(8px);
    color: var(--text-primary);
}

.icon-list li svg {
    transition: transform 0.3s var(--ease-spring);
}

.icon-list li:hover svg {
    transform: scale(1.2) rotate(10deg);
    color: #ffffff;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr !important;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .page-header {
        padding-top: 120px;
        min-height: auto;
    }
}

/* =========================================================================
   Story Section (From Vision to Foundry)
   ========================================================================= */
.story-section {
    background-color: #0d1b2e;
    color: #ffffff;
    padding: 100px 0;
}

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

.story-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8fa3bf; /* Muted blue-gray */
    margin-bottom: 1rem;
    display: block;
    font-weight: 600;
}

.story-heading {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.1;
    color: #ffffff !important;
}

.story-text {
    color: #ffffff; /* Muted blue-gray */
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.story-image-container {
    background-color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    position: relative;
    width: 100%;
}

.story-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-image-container:hover .story-image {
    transform: scale(1.02);
}

.product-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.product-mini-card {
    background-color: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: transform 0.35s ease, filter 0.35s ease;
    position: relative;
    border-radius: 14px;
    will-change: transform, filter;
}

.product-mini-card:hover {
    transform: translateY(-5px) scale(1.04);
    filter: brightness(1.04) contrast(1.03);
}

.product-mini-img-area {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #f8fafc; /* Very light neutral for better photo display */
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease, background 0.35s ease;
}

.product-mini-img-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
    transition: transform 0.4s var(--ease-out-expo);
}

.product-mini-card:hover .product-mini-img-area {
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(147, 197, 253, 0.16), 0 0 20px rgba(96, 165, 250, 0.2);
    background: linear-gradient(145deg, #f8fafc 0%, #eef4ff 100%);
}

.product-mini-card:hover .product-mini-img-area img {
    transform: scale(1.08);
}

.product-mini-card:hover .product-mini-name {
    color: var(--text-primary);
}

.product-mini-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    margin-top: auto;
    padding-top: 0.5rem;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

@media (max-width: 992px) {
    .story-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    
    .story-heading {
        font-size: clamp(2.3rem, 7vw, 3.2rem);
        margin-bottom: 1.5rem;
    }

    .story-image-container {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* =========================================================================
   Mobile Safety: prevent cut/overflow across pages
   ========================================================================= */
@media (max-width: 768px) {
    /* Inline min-width on products page can cause horizontal cut */
    .product-images.product-intro-wrapper {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* Keep form and map inside viewport on contact page */
    .contact-form-wrapper {
        padding: 1.5rem !important;
    }

    .map-container {
        height: 180px !important;
        width: 100% !important;
    }

    /* Improve table readability without clipping */
    table {
        width: 100% !important;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Avoid long content overflow in cards/sections */
    .card,
    .section p,
    .hero-title,
    .hero-subtitle,
    .hero-meta {
        overflow-wrap: anywhere;
    }
}
