/* === css/main.css === */

/* --- ROOT VARIABLES: CORPORATE & INDUSTRIAL PALETTE --- */
:root {
    /* Fonts */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* Color Palette */
    --color-primary: #2E7D32;    /* Deep Green for sustainability */
    --color-accent: #FFC107;     /* Industrial Yellow for CTAs */
    --color-secondary: #0D47A1;  /* Corporate Blue for trust */
    --color-background-main: #FFFFFF;
    --color-background-alt: #F4F6F9; /* Light grey for section contrast */
    --color-text-primary: #212529;   /* Near-black for readability */
    --color-text-secondary: #6c757d; /* Grey for less important text */
    --color-text-on-dark: #FFFFFF;
    --color-footer-bg: #212529;
    --color-border-subtle: #dee2e6;
}

/* --- GLOBAL RESETS & DEFAULTS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-background-main);
}

/* --- REUSABLE COMPONENTS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--color-text-secondary);
}

.btn {
    text-decoration: none;
    padding: 0.8rem 2rem;
    margin: 0 0.5rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-text-primary);
}

.btn-primary:hover {
    background: #ffca2c;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-on-dark);
    border: 2px solid var(--color-text-on-dark);
}

.btn-secondary:hover {
    background: var(--color-text-on-dark);
    color: var(--color-text-primary);
    transform: translateY(-3px);
}


/* --- HEADER & NAVIGATION --- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
}

.logo span {
    color: var(--color-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active-link {
    color: var(--color-primary);
}

.nav-menu a:hover::after,
.nav-menu a.active-link::after {
    width: 100%;
}

.cta-btn {
    background: var(--color-primary);
    color: var(--color-text-on-dark);
    padding: 0.6rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background: #256a29;
    transform: translateY(-2px);
    color: var(--color-text-on-dark);
}

.cta-btn:hover::after {
    width: 0;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-text-primary);
    transition: all 0.3s ease-in-out;
}

/* --- FOOTER --- */
.footer {
    background: var(--color-footer-bg);
    color: #ccc;
    padding: 4rem 0 2rem 0;
}

.footer .container {
    text-align: center;
}

.footer .logo {
    color: var(--color-text-on-dark);
}

.footer .logo span {
    color: var(--color-accent);
}

.footer p {
    margin: 1rem 0 2rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.footer-nav {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: #999;
}

/* --- Developer Footer Credit --- */
#dev-credit {
  font-size: 0.85rem;
  color: #504d6d;
}

#dev-credit a {
  text-decoration: none;
  background: linear-gradient(90deg, #6a5acd, #00c6ff, #6a5acd);
  background-size: 200% auto;        /* wider gradient for motion */
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;     /* Safari fix */
  animation: gradient-swipe 3s linear infinite;
}

#dev-credit a:hover {
  text-decoration: underline;
}

/* animation keyframes */
@keyframes gradient-swipe {
  to {
    background-position: -200% center;
  }
}


/* --- GLOBAL ANIMATIONS --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE STYLES (for shared components) --- */
@media (max-width: 992px) {
    .section-title h2 {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
    
    .nav-container {
        height: 70px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--color-background-main);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: 0.3s;
        gap: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        padding: 1.5rem 0;
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--color-border-subtle);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}