/* ==========================================================================
   HRIWETA GROUP & ENTERPRISES - DESIGN SYSTEM
   Inspired by Next-Gen FinCorp / Modern Corporate Multi-Theme UI
   Light / Dark Mode, Glassmorphism, Responsive Navigation & Calculators
   Founder & Leadership: Mr. Chetan Sonvane (MBA, 15+ Yrs Experience)
   ========================================================================== */

/* ============================================
   BASE STYLES & LIGHT / DARK THEME SYSTEM
   ============================================ */

/* LIGHT MODE IS DEFAULT */
:root {
    --color-bg: #F8FAFC;
    --color-bg-secondary: #F1F5F9;
    --color-bg-alt: #FFFFFF;
    --color-surface: rgba(255, 255, 255, 0.92);
    --color-border: rgba(226, 232, 240, 0.85);
    --color-border-hover: rgba(197, 160, 89, 0.5);
    --color-text: #0F172A;
    --color-text-muted: #64748B;
    --color-card-bg: #FFFFFF;
    --color-nav-bg: rgba(255, 255, 255, 0.88);
    --color-footer-bg: #0A0F1D;
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --card-shadow-hover: 0 16px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(197, 160, 89, 0.15);

    /* Corporate Brand Accents */
    --gradient-gold: #C5A059;
    --gradient-gold-light: #E5C158;
    --gradient-blue: #1E3A8A;
    --gradient-emerald: #10B981;
    --gradient-navy: #0B0F19;

    /* Transitions */
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* DARK MODE (WHEN class="dark" on html) */
html.dark {
    --color-bg: #070B14;
    --color-bg-secondary: #04070D;
    --color-bg-alt: #0D1322;
    --color-surface: rgba(13, 19, 34, 0.75);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(197, 160, 89, 0.45);
    --color-text: #F3F4F6;
    --color-text-muted: #9CA3AF;
    --color-card-bg: rgba(13, 19, 34, 0.7);
    --color-nav-bg: rgba(7, 11, 20, 0.9);
    --color-footer-bg: #03050A;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --card-shadow-hover: 0 20px 40px -5px rgba(0, 0, 0, 0.7), 0 0 25px rgba(197, 160, 89, 0.15);
}

html {
    scroll-behavior: smooth;
}

section[id], div[id] {
    scroll-margin-top: 96px;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    letter-spacing: -0.01em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
    font-weight: 700;
    line-height: 1.2;
}

p {
    line-height: 1.7;
}

/* Modern Typography override for widgets and counters (replaces typewriter/dotted-zero monospace) */
.font-mono,
[class*="font-mono"] {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-feature-settings: "tnum" 1, "zero" 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.015em;
}

/* Navigation Scrolled State */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(226, 232, 240, 0.9) !important;
}

html.dark .nav-scrolled {
    background-color: rgba(7, 11, 20, 0.96) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   GLASSMORPHISM & CARDS
   ============================================ */
.glass-card {
    background: var(--color-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    box-shadow: var(--card-shadow);
    transition: all 0.35s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-border-hover);
    box-shadow: var(--card-shadow-hover);
}

/* Corporate Brand Emblem & Logo */
.fincorp-logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s var(--transition-smooth), filter 0.25s ease;
}

@media (min-width: 640px) {
    .fincorp-logo-img {
        height: 48px;
    }
}

.fincorp-logo-img:hover {
    transform: scale(1.02);
}

html.dark .fincorp-logo-img {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.15));
}

.brand-emblem-badge {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #16244F 0%, #0A1128 100%);
    border: 1.5px solid #C5A059;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E5C158;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.25);
    flex-shrink: 0;
}

/* ============================================
   TEXT & GRADIENTS
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, #C5A059 0%, #2563EB 50%, #10B981 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
}

.text-gradient-gold {
    background: linear-gradient(135deg, #E5C158 0%, #C5A059 50%, #9E7A33 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================
   DECORATIVE PATTERNS & BLOBS
   ============================================ */
.pattern-grid {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

html.dark .pattern-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.pattern-dots {
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
}

html.dark .pattern-dots {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #FFFFFF;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1rem;
    box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.12);
    z-index: 60;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Invisible bridge to prevent dropdown closing when moving mouse across margin */
.nav-dropdown-content::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

html.dark .nav-dropdown-content {
    background-color: #0D1322;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.6);
}

.nav-dropdown.dropdown-right .nav-dropdown-content {
    left: auto;
    right: 0;
}

.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown:focus-within .nav-dropdown-content {
    display: block;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Accessible Focus Indicators */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
select:focus-visible, 
textarea:focus-visible {
    outline: 2px solid #C5A059 !important;
    outline-offset: 2px !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Sticky Catalog Header */
#masterCatalogTable thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
}

#masterCatalogTable tbody tr {
    transition: background-color 0.15s ease, transform 0.15s ease;
}

#masterCatalogTable tbody tr td img {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

#masterCatalogTable tbody tr:hover td img {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Empty State */
.catalog-empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
}

/* ============================================
   TICKER BAR & STATUS DOTS
   ============================================ */
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10B981;
    position: relative;
    display: inline-block;
}

.live-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background-color: #10B981;
    opacity: 0.5;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

/* ============================================
   NEO CARDS & EXECUTIVE BADGES
   ============================================ */
.corporate-neo-card {
    background: linear-gradient(135deg, rgba(14, 23, 46, 0.95) 0%, rgba(7, 11, 20, 0.98) 100%);
    border: 1px solid rgba(197, 160, 89, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(197, 160, 89, 0.1);
}

/* Toast */
.corporate-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0B0F19;
    color: #FFFFFF;
    border: 1px solid #C5A059;
    border-radius: 16px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    z-index: 9999;
    transform: translateY(140%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.corporate-toast.show {
    transform: translateY(0);
}

/* Accordion FAQ */
.faq-accordion-item {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-accordion-item .faq-answer {
    display: none;
    overflow: hidden;
}

.faq-accordion-item.active {
    border-color: rgba(197, 160, 89, 0.45) !important;
    box-shadow: 0 10px 25px -5px rgba(197, 160, 89, 0.12);
}

.faq-accordion-item.active .faq-answer {
    display: block;
    animation: faqSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.faq-accordion-item.active .faq-icon {
    transform: rotate(180deg);
}

@keyframes faqSlideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   SCROLLBAR UTILITIES (CLEAN, NO HORIZONTAL SCROLLBARS)
   ============================================ */
.no-scrollbar,
.fincorp-ticker-bar,
.catalog-table-wrapper {
    -ms-overflow-style: none !important; /* IE and Edge */
    scrollbar-width: none !important; /* Firefox */
}

.no-scrollbar::-webkit-scrollbar,
.fincorp-ticker-bar::-webkit-scrollbar,
.catalog-table-wrapper::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Sleek subtle scrollbars for root window */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 9999px;
}
html.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(197, 160, 89, 0.7);
}

/* Print Friendly Styles for Leadership Dossier */
@media print {
    .fincorp-ticker-bar, nav, footer, .theme-toggle-btn, .mobile-toggle, .no-print {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}


/* ============================================
   FLOATING CONTACT (WhatsApp + Email)
   ============================================ */
.contact-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.contact-fab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    min-width: 48px;
    padding: 0 14px;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    box-shadow: 0 10px 25px -6px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-fab-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.45);
}

.contact-fab-btn:focus-visible {
    outline: 3px solid #E5C158;
    outline-offset: 2px;
}

.contact-fab-wa {
    background: #25D366;
    height: 54px;
    padding: 0 18px 0 16px;
}

.contact-fab-mail {
    background: #16244F;
    border: 1.5px solid #C5A059;
    color: #E5C158;
    width: 48px;
    padding: 0;
}

/* Label is hidden on small screens so the button stays compact */
.contact-fab-label { display: none; }
@media (min-width: 640px) {
    .contact-fab { right: 24px; bottom: 24px; }
    .contact-fab-label { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
    .contact-fab-btn, .contact-fab-btn:hover { transition: none; transform: none; }
}
