/* 
====================================================================
   Murray Engineering Software & Analysis - Core Styles
   Version: 2.0
==================================================================== 
*/

:root {
    /* Color Palette */
    --primary-color: #D7365F;
    /* Ruby Red */
    --primary-dark: #A32643;
    /* Deep Ruby */
    --primary-light: #FF6F94;
    /* Soft Rose Red */

    --secondary-color: #FF7A3D;
    /* Molten Orange */
    --accent-color: #C084FC;
    /* Soft Lavender-Plum */

    /* Neutrals */
    --bg-body: #131016;
    /* Dark Plum-Black */
    --bg-card: #1D1921;
    /* Deep Graphite-Plum */
    --bg-card-hover: #2A2430;
    /* Slightly Lighter Plum Shadow */
    --text-main: #F5F3F7;
    /* Warm Off-White */
    --text-muted: #A8A0B0;
    /* Muted Lavender-Grey */
    --border-color: #2F2934;
    /* Soft shadow plum */

    /* Gradients */
    --gradient-main: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-text: linear-gradient(to right, #FF6F94, #FF9C62);
    --gradient-glow: radial-gradient(circle at center, rgba(215, 54, 95, 0.18) 0%, transparent 70%);

    /* Dimensions & Spacing */
    --header-height: 80px;
    --container-width: 1280px;
    --border-radius: 12px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= RESET & TYPOGRAPHY ================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ================= UTILITY CLASSES ================= */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 1rem;
    border: none;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-light);
    color: var(--primary-light);
}

.btn-outline:hover {
    background: var(--primary-light);
    color: white;
}

/* ================= HEADER STYLES ================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: var(--transition-normal);
}

.site-header.scrolled {
    height: 70px;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-container img {
    height: 55px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    color: white;
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--secondary-color);
    transition: width 0.3s;
}

.nav-item:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

/* ================= HERO SECTION ================= */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 1s 0.2s forwards;
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 1s 0.4s forwards;
}

.hero-btns {
    opacity: 0;
    animation: fadeUp 1s 0.6s forwards;
}

.hero-visual {
    position: relative;
    opacity: 0;
    animation: fadeIn 1.5s 0.5s forwards;
}

.floating-card {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--border-radius);
    position: absolute;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    right: 10%;
    width: 200px;
}

.card-2 {
    bottom: 15%;
    left: 5%;
    width: 220px;
    animation-delay: 2s;
}

.card-3 {
    top: 40%;
    right: -20px;
    width: 180px;
    animation-delay: 4s;
}

/* ================= SERVICES SECTION ================= */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    group: hover;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-main);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 0;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card:hover::before {
    opacity: 0.05;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    color: var(--primary-light);
    font-size: 1.5rem;
    transition: var(--transition-normal);
    position: relative;
    z-index: 1;
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    color: white;
}

.service-card h3,
.service-card p,
.service-card a {
    position: relative;
    z-index: 1;
}

/* ================= INTERACTIVE CALCULATOR ================= */

.calculator-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.calc-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: rgba(15, 23, 42, 0.5);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-main);
}

.range-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    background: var(--bg-card-hover);
    border-radius: 5px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: .2s;
}

.calc-result-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--gradient-main);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
}

.calc-result-box h4 {
    font-size: 1.5rem;
    opacity: 0.9;
}

.calc-result-box .result-number {
    font-size: 3rem;
    font-weight: 800;
    margin: 10px 0;
}

/* ================= TESTIMONIALS ================= */

.testimonial-container {
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.testimonial-track {
    display: flex;
    gap: 30px;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.testimonial-card {
    width: 400px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.client-info {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    background: #ccc;
    border-radius: 50%;
    margin-right: 15px;
    /* Using CSS gradient as avatar placeholder */
    background: linear-gradient(45deg, #4F46E5, #06B6D4);
}

/* ================= LEGAL PAGES LAYOUT ================= */

.legal-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 50px;
    margin-top: 50px;
}

.legal-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--border-radius);
}

.legal-sidebar ul li {
    margin-bottom: 15px;
}

.legal-sidebar a {
    color: var(--text-muted);
    font-weight: 500;
}

.legal-sidebar a:hover,
.legal-sidebar a.active-link {
    color: var(--primary-light);
}

.legal-content {
    background: var(--bg-card);
    padding: 50px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.legal-content h2 {
    color: var(--secondary-color);
    margin-top: 30px;
    font-size: 1.8rem;
}

.legal-content p,
.legal-content li {
    margin-bottom: 15px;
    color: #cbd5e1;
}

.legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

/* ================= CONTACT PAGE ================= */

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    margin-top: 50px;
}

.contact-info-box {
    background: var(--gradient-main);
    padding: 40px;
    border-radius: var(--border-radius);
    color: white;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 1.5rem;
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.contact-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* ================= FOOTER ================= */

.site-footer {
    background: #020617;
    padding: 80px 0 30px;
    margin-top: 100px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* ================= ANIMATIONS ================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ================= MEDIA QUERIES ================= */

@media (max-width: 1024px) {
    :root {
        --container-width: 90%;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        display: none;
    }

    /* Simplified for tablet */
    .calc-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .navbar .nav-links {
        display: none;
    }

    /* Need JS toggle */
    .mobile-toggle {
        display: block;
    }

    .navbar.active .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-card);
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}