/* 
   ALAM STEEL AND ALUMINIUM FABRICATOR 
   Modern Industrial & Architectural Fabrication Stylesheet
   Complete Light / Dark Theme Architecture
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

/* ==========================================================================
   CSS CUSTOM PROPERTIES: THEME ARCHITECTURE
   ========================================================================== */

:root,
html[data-theme="light"] {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Theme Colors: Light Mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-surface: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-subtle: #f8fafc;
    --bg-input: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.85);
    --bg-nav-scrolled: rgba(255, 255, 255, 0.97);
    --bg-footer: #0f172a;

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-heading: #0f172a;

    --border-color: rgba(15, 23, 42, 0.08);
    --border-card: rgba(15, 23, 42, 0.08);
    --border-input: #cbd5e1;
    --border-hover: rgba(225, 29, 72, 0.35);

    --shadow-color: rgba(0, 0, 0, 0.06);
    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 18px 32px -8px rgba(0, 0, 0, 0.12);

    --accent-color: #e11d48;
    --accent-hover: #be123c;
    --accent-secondary: #f97316;

    color-scheme: light;
}

[data-theme="dark"],
html.dark {
    /* Theme Colors: Dark Mode */
    --bg-primary: #0b0f17;
    --bg-secondary: #0f172a;
    --bg-surface: #1e293b;
    --bg-card: #111827;
    --bg-card-subtle: #161f32;
    --bg-input: #0b0f17;
    --bg-nav: rgba(11, 15, 23, 0.85);
    --bg-nav-scrolled: rgba(11, 15, 23, 0.96);
    --bg-footer: #080c14;

    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-heading: #ffffff;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-input: rgba(255, 255, 255, 0.15);
    --border-hover: rgba(225, 29, 72, 0.45);

    --shadow-color: rgba(0, 0, 0, 0.5);
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
    --shadow-hover: 0 20px 35px -10px rgba(0, 0, 0, 0.65);

    --accent-color: #e11d48;
    --accent-hover: #be123c;
    --accent-secondary: #f97316;

    color-scheme: dark;
}

/* ==========================================================================
   SMOOTH TRANSITION SYSTEM (300ms - 400ms)
   ========================================================================== */

html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition: background-color 380ms cubic-bezier(0.16, 1, 0.3, 1),
                color 380ms cubic-bezier(0.16, 1, 0.3, 1),
                border-color 380ms cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 380ms cubic-bezier(0.16, 1, 0.3, 1),
                fill 380ms cubic-bezier(0.16, 1, 0.3, 1),
                stroke 380ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Base resets & typography */
html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* Glassmorphism Classes */
.glass-nav {
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-nav.scrolled {
    background: var(--bg-nav-scrolled);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -10px var(--shadow-color);
}

/* Architectural Gradient Highlights */
.text-gradient {
    background: linear-gradient(135deg, var(--text-heading) 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-red {
    background: linear-gradient(135deg, #fb7185 0%, #e11d48 50%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Industrial Grid Pattern */
.bg-grid-pattern {
    background-size: 32px 32px;
    background-image: 
        linear-gradient(to right, rgba(128, 128, 128, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(128, 128, 128, 0.05) 1px, transparent 1px);
}

/* ==========================================================================
   THEME TOGGLE BUTTON STYLING & ANIMATIONS
   ========================================================================== */

.theme-toggle-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.25s ease, background-color 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.06);
    border-color: var(--accent-color);
}

.theme-toggle-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.theme-icon-sun,
.theme-icon-moon {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Light Theme Icon States */
html[data-theme="light"] .theme-icon-sun {
    transform: translateY(28px) rotate(90deg) scale(0.4);
    opacity: 0;
    pointer-events: none;
}

html[data-theme="light"] .theme-icon-moon {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
    color: #0f172a;
}

/* Dark Theme Icon States */
html[data-theme="dark"] .theme-icon-sun,
html:not([data-theme="light"]) .theme-icon-sun {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
    color: #fbbf24; /* Amber-400 */
}

html[data-theme="dark"] .theme-icon-moon,
html:not([data-theme="light"]) .theme-icon-moon {
    transform: translateY(-28px) rotate(-90deg) scale(0.4);
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   LIGHT MODE TARGETED COMPONENT STYLES
   ========================================================================== */

html[data-theme="light"] body {
    background-color: #f8fafc !important;
    color: #334155 !important;
}

/* Sections & Card Backgrounds */
html[data-theme="light"] .bg-steel-950 {
    background-color: #f8fafc !important;
}

html[data-theme="light"] .bg-steel-900,
html[data-theme="light"] .bg-steel-900\/95,
html[data-theme="light"] .bg-steel-900\/90,
html[data-theme="light"] .bg-steel-900\/80,
html[data-theme="light"] .bg-steel-900\/70,
html[data-theme="light"] .bg-steel-900\/60,
html[data-theme="light"] .bg-steel-900\/50,
html[data-theme="light"] .bg-steel-900\/40 {
    background-color: #ffffff !important;
}

html[data-theme="light"] .bg-steel-800 {
    background-color: #f1f5f9 !important;
}

/* Card Borders & Dividers in Light Mode */
html[data-theme="light"] .border-white\/10,
html[data-theme="light"] .border-white\/15,
html[data-theme="light"] .border-white\/20,
html[data-theme="light"] .border-white\/5 {
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .divide-white\/5 > :not([hidden]) ~ :not([hidden]),
html[data-theme="light"] .divide-white\/10 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Typography in Light Mode */
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4 {
    color: #0f172a;
}

html[data-theme="light"] .text-white:not([class*="bg-rose-"]):not([class*="bg-emerald-"]):not([class*="bg-gradient-"]):not(.theme-always-white) {
    color: #0f172a !important;
}

html[data-theme="light"] .text-slate-200 {
    color: #1e293b !important;
}

html[data-theme="light"] .text-slate-300 {
    color: #334155 !important;
}

html[data-theme="light"] .text-slate-400 {
    color: #64748b !important;
}

/* Ensure buttons, badges & gradient CTAs ALWAYS keep pristine white text */
.bg-rose-600, .bg-rose-700, .bg-rose-800,
.bg-emerald-600, .bg-emerald-500,
.btn-arrow-move,
.floating-btn,
.theme-always-white,
[class*="bg-rose-600"],
[class*="bg-emerald-600"],
.badge-fixed {
    color: #ffffff !important;
}

html[data-theme="light"] .btn-arrow-move,
html[data-theme="light"] .bg-rose-600,
html[data-theme="light"] .bg-emerald-600 {
    color: #ffffff !important;
}

html[data-theme="light"] .btn-arrow-move *,
html[data-theme="light"] .bg-rose-600 *,
html[data-theme="light"] .bg-emerald-600 * {
    color: #ffffff !important;
}

/* Light Mode Navigation */
html[data-theme="light"] .nav-link {
    color: #475569 !important;
}

html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .nav-link.active {
    color: #0f172a !important;
    font-weight: 600;
}

html[data-theme="light"] .glass-nav {
    background: rgba(255, 255, 255, 0.88) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.07) !important;
}

/* Light Mode Hero Overlays */
html[data-theme="light"] .bg-gradient-to-r.from-steel-950 {
    background-image: linear-gradient(to right, rgba(248, 250, 252, 0.94) 0%, rgba(248, 250, 252, 0.85) 60%, rgba(248, 250, 252, 0.65) 100%) !important;
}

html[data-theme="light"] .bg-gradient-to-t.from-steel-950 {
    background-image: linear-gradient(to top, rgba(248, 250, 252, 1) 0%, transparent 60%) !important;
}

html[data-theme="light"] .hero-architectural-img {
    filter: brightness(0.95) contrast(1.05);
}

/* Light Mode Card Shadows */
html[data-theme="light"] .lift-hover {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02) !important;
}

html[data-theme="light"] .lift-hover:hover {
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-6px);
}

/* Light Mode Inputs and Forms */
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #94a3b8 !important;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus {
    border-color: #e11d48 !important;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1) !important;
}

/* Light Mode Testimonial Marquee Cards */
html[data-theme="light"] .marquee-track > div {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.06) !important;
}

/* Light Mode Footer */
html[data-theme="light"] footer {
    background-color: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
}

html[data-theme="light"] footer h3,
html[data-theme="light"] footer .font-heading,
html[data-theme="light"] footer .text-white {
    color: #ffffff !important;
}

/* Light Mode Floating Action Tooltips */
html[data-theme="light"] .floating-btn .tooltip {
    background: #0f172a !important;
    color: #ffffff !important;
}

/* ==========================================================================
   GENERAL MICRO-INTERACTIONS & ANIMATIONS
   ========================================================================== */

.lift-hover {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.lift-hover:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.group:hover .group-hover-zoom {
    transform: scale(1.06);
}

.group-hover-zoom {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-arrow-move:hover .arrow-icon {
    transform: translateX(4px);
}

.arrow-icon {
    transition: transform 0.25s ease-out;
}

/* Navigation active indicator */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
}

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

/* Infinite Marquee for Testimonials (Right to Left) */
.marquee-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: marquee-scroll 45s linear infinite;
    will-change: transform;
}

/* Pause animation on hover */
.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

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

/* Scroll Reveal Animations */
.reveal-init {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-35px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(35px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.revealed {
    opacity: 1 !important;
    transform: translate(0, 0) scale(1) !important;
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Floating action buttons */
.floating-actions {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    position: relative;
}

.floating-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.45);
}

.floating-btn .tooltip {
    position: absolute;
    right: calc(100% + 12px);
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-btn:hover .tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Lightbox Modal */
#lightboxModal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#lightboxModal.active {
    opacity: 1;
    visibility: visible;
}

#lightboxModal:not(.active) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}
