/* ==========================================================================
   SRM Consulting — Premium Stylesheet
   Professional civil & transport engineering website
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --color-primary: #FFC107;
    --color-primary-dark: #e0a800;
    --color-primary-light: #ffd54f;
    --color-dark: #111827;
    --color-dark-alt: #1f2937;
    --color-text: #374151;
    --color-text-light: #6b7280;
    --color-text-muted: #9ca3af;
    --color-white: #ffffff;
    --color-bg: #f9fafb;
    --color-border: rgba(0, 0, 0, 0.08);
    --font-primary: 'Montserrat', sans-serif;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* ---------- Base Reset & Typography ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background-color: var(--color-primary);
    color: var(--color-dark);
}

/* ---------- Sticky Header ---------- */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--color-primary);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow 0.3s var(--transition-smooth),
        transform 0.3s var(--transition-smooth);
}

.sticky-header.scrolled {
    box-shadow: var(--shadow-lg);
}

/* ---------- Navigation ---------- */
.desktop-nav a {
    position: relative;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s var(--transition-smooth);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-dark);
    transition: width 0.3s var(--transition-smooth);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-menu-button {
        display: none;
    }
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s var(--transition-smooth),
        transform 0.3s var(--transition-smooth);
}

.mobile-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    text-decoration: none;
    transition: transform 0.2s var(--transition-smooth),
        color 0.2s var(--transition-smooth);
}

.mobile-menu a:hover {
    transform: translateX(8px);
}

/* ---------- Hero Section ---------- */
.hero-section {
    position: relative;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgb(255 255 255 / 0.85);
}

.hero-section .hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 1rem;
}

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
}

.accent-text {
    color: var(--color-primary);
}

/* ---------- About Section ---------- */
.about-section {
    background-color: var(--color-white);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ---------- Accordion ---------- */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--transition-smooth);
}

.accordion-content.active {
    max-height: 1000px;
}

.accordion-trigger {
    cursor: pointer;
    transition: background-color 0.2s var(--transition-smooth);
}

.accordion-trigger:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.accordion-trigger svg {
    transition: transform 0.3s var(--transition-smooth);
}

.accordion-trigger.open svg {
    transform: rotate(180deg);
}

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--transition-smooth),
        transform 0.8s var(--transition-smooth);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s var(--transition-smooth),
        transform 0.8s var(--transition-smooth);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s var(--transition-smooth),
        transform 0.8s var(--transition-smooth);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s var(--transition-smooth),
        transform 0.8s var(--transition-smooth);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children animation */
.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--transition-smooth),
        transform 0.5s var(--transition-smooth);
}

.stagger-children.visible>*:nth-child(1) {
    transition-delay: 0.05s;
}

.stagger-children.visible>*:nth-child(2) {
    transition-delay: 0.1s;
}

.stagger-children.visible>*:nth-child(3) {
    transition-delay: 0.15s;
}

.stagger-children.visible>*:nth-child(4) {
    transition-delay: 0.2s;
}

.stagger-children.visible>*:nth-child(5) {
    transition-delay: 0.25s;
}

.stagger-children.visible>*:nth-child(6) {
    transition-delay: 0.3s;
}

.stagger-children.visible>*:nth-child(7) {
    transition-delay: 0.35s;
}

.stagger-children.visible>*:nth-child(8) {
    transition-delay: 0.4s;
}

.stagger-children.visible>* {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Card Hover Effects ---------- */
.hover-card {
    transition: transform 0.3s var(--transition-smooth),
        box-shadow 0.3s var(--transition-smooth);
}

.hover-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

/* ---------- Gradient Divider ---------- */
.gradient-divider {
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--color-primary) 30%,
            var(--color-primary) 70%,
            transparent 100%);
    border: none;
    margin: 0;
}

/* ---------- Animated Counter ---------- */
.counter-number {
    font-variant-numeric: tabular-nums;
    transition: all 0.5s var(--transition-smooth);
}

/* ---------- Button Styles ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background-color: var(--color-primary);
    color: var(--color-dark);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s var(--transition-smooth);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.35);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary svg {
    transition: transform 0.3s var(--transition-smooth);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
    border-bottom: 2px solid currentColor;
    padding-bottom: 0.25rem;
    transition: all 0.3s var(--transition-smooth);
}

.btn-outline:hover {
    letter-spacing: 0.15em;
}

.btn-outline svg {
    transition: transform 0.3s var(--transition-smooth);
}

.btn-outline:hover svg {
    transform: translateX(6px);
}

/* ---------- Image Effects ---------- */
.img-reveal {
    overflow: hidden;
    position: relative;
}

.img-reveal img {
    transition: transform 0.6s var(--transition-smooth);
}

.img-reveal:hover img {
    transform: scale(1.05);
}

/* ---------- Parallax Background ---------- */
.parallax-bg {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

@media (hover: none) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* ---------- Gold Accent Line ---------- */
.gold-line {
    width: 60px;
    height: 3px;
    background-color: var(--color-primary);
    border: none;
    margin-bottom: 1.5rem;
}

.gold-line-center {
    width: 60px;
    height: 3px;
    background-color: var(--color-primary);
    border: none;
    margin: 0 auto 1.5rem;
}

/* ---------- Section Headings ---------- */
.section-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 300;
    line-height: 1.2;
    color: var(--color-dark);
}

/* ---------- Focus Styles for Accessibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ---------- Form Inputs ---------- */
input,
textarea,
select {
    font-family: var(--font-primary);
    transition: border-color 0.3s var(--transition-smooth),
        box-shadow 0.3s var(--transition-smooth);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.15);
}

/* ---------- Loading Skeleton ---------- */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ---------- Smooth Scroll Progress Indicator ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    z-index: 100;
    transition: width 0.1s linear;
}

/* ---------- Mobile-First Responsive ---------- */

/* Small phones (max 375px) */
@media (max-width: 375px) {
    .hero-section {
        min-height: 55vh;
    }

    .hero-section h1 {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn-primary {
        padding: 0.75rem 1.25rem;
        font-size: 0.7rem;
    }
}

/* Phones (max 640px) */
@media (max-width: 640px) {
    .hero-section {
        min-height: 60vh;
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .mobile-menu {
        padding: 1rem 0;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .mobile-menu a {
        padding: 1rem 0;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    /* Better touch targets */
    .accordion-trigger {
        padding: 1.25rem 1rem;
        min-height: 56px;
    }

    /* Stack footer columns */
    footer .grid {
        gap: 2rem;
    }

    /* Full-width buttons on mobile */
    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }
}

/* Tablets (641px – 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    .hero-section {
        min-height: 65vh;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }
}

/* Large screens (1025px+) */
@media (min-width: 1025px) {
    .hero-section {
        min-height: 75vh;
    }
}

/* Touch-friendly spacing */
@media (hover: none) and (pointer: coarse) {
    .desktop-nav a {
        padding: 0.5rem 0;
    }

    a,
    button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .accordion-trigger {
        padding: 1.25rem;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }

    .stagger-children>* {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ---------- Print Styles ---------- */
@media print {

    .sticky-header,
    .mobile-menu-button,
    .scroll-progress {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }
}