/* QMS Asset Integrity - Custom Styles */

:root {
    --qms-navy: #1e293b;
    --qms-orange: #f6b74d;
    --qms-line: #e2e8f0;
}

body {
    font-feature-settings: "kern", "liga", "calt";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1180px;
}

@media (min-width: 1536px) {
    .container {
        max-width: 1240px;
    }
}

.qms-section {
    padding-top: clamp(4.5rem, 7vw, 7rem);
    padding-bottom: clamp(4.5rem, 7vw, 7rem);
}

.qms-section-tight {
    padding-top: clamp(3.5rem, 5vw, 5.5rem);
    padding-bottom: clamp(3.5rem, 5vw, 5.5rem);
}

.qms-eyebrow {
    color: var(--qms-orange);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.qms-h2 {
    font-family: Montserrat, sans-serif;
    font-size: clamp(2rem, 3.2vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.qms-h3 {
    font-family: Montserrat, sans-serif;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.qms-lead {
    font-size: clamp(1.05rem, 1.25vw, 1.15rem);
    line-height: 1.7;
    color: #475569;
}

html.dark .qms-lead {
    color: #cbd5e1;
}

.qms-card {
    border: 1px solid var(--qms-line);
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

html.dark .qms-card {
    border-color: #334155;
    background: #1e293b;
}

.qms-soft-shadow {
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

/* Hero gradient from original mockup */
.bg-hero-gradient {
    background: linear-gradient(90deg, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0.6) 50%, rgba(246,183,77,0.8) 100%);
}

.clip-slant {
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-delay {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

/* Scroll-triggered reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Dark mode toggle icon switching */
html.dark .dark-icon { display: none; }
html.dark .light-icon { display: inline; }
html:not(.dark) .dark-icon { display: inline; }
html:not(.dark) .light-icon { display: none; }

/* Mobile nav open state */
#mobile-nav.open {
    transform: translateX(0);
}

/* Mobile accordion */
.mobile-accordion-btn .material-icons-outlined {
    transition: transform 0.3s ease;
}

.mobile-accordion-btn.active .material-icons-outlined {
    transform: rotate(180deg);
}

/* Sticky nav shadow on scroll */
#main-nav.scrolled {
    box-shadow: 0 10px 35px rgba(15,23,42,0.08);
}

@media (max-width: 767px) {
    .container {
        width: 100%;
    }

    .qms-mobile-hide {
        display: none !important;
    }
}

/* Table responsiveness */
@media (max-width: 768px) {
    table {
        font-size: 0.75rem;
    }
    table th,
    table td {
        padding: 0.5rem;
    }
}

/* Counter animation placeholder */
[data-counter] {
    transition: all 0.3s ease;
}

/* Custom scrollbar for mega-menu overflow */
.mega-menu-scroll::-webkit-scrollbar {
    width: 4px;
}
.mega-menu-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.mega-menu-scroll::-webkit-scrollbar-thumb {
    background: rgba(246,183,77,0.3);
    border-radius: 2px;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #f6b74d;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, footer, #back-to-top, .no-print {
        display: none !important;
    }
    body {
        color: #000 !important;
        background: #fff !important;
    }
}
