/* CSS Variables & Reset */
:root {
    --primary: #FF5A00; /* Spark Orange */
    --primary-hover: #FF7222;
    --secondary: #A8B0B8; /* Brushed Steel */
    --bg-dark: #1A1C20; /* Deep Charcoal */
    --bg-card: #24272C;
    --text-light: #F3F4F6;
    --text-muted: #9CA3AF;
    --white: #FFFFFF;
    --black: #000000;
    --glass: rgba(26, 28, 32, 0.85);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 80px; /* Account for persistent CTA */
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.highlight {
    color: var(--primary);
}

.text-center { text-align: center; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 90, 0, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 90, 0, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 48px;
    width: auto;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:hover:not(.cta-btn) {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1100;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
}

/* Hamburger Animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Sticky Footer */
.mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(26, 28, 32, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 900;
    display: none; /* Shown only on mobile in media query */
}

.sticky-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--bg-dark);
}

.btn-secondary:hover {
    background-color: var(--white);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(26,28,32,0.8), rgba(26,28,32,0.8)), url('../assets/hero.png') center/cover no-repeat;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.01) 0px,
        rgba(255,255,255,0.01) 1px,
        transparent 1px,
        transparent 10px
    );
    top: -50%;
    left: -50%;
    animation: grain 8s linear infinite;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-5%, -5%); }
}

.container { position: relative; z-index: 10; }

.hero-content h1 {
    font-size: 5rem;
    line-height: 0.95;
    margin-bottom: 2rem;
    color: var(--white);
    text-shadow: 0 0 30px rgba(255, 90, 0, 0.2);
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1s ease 0.4s both;
}

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

/* Sections General */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Railway Standard */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(145deg, #1e2024, #2c2f33);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

.industrial-placeholder {
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../assets/railway.png') center/cover no-repeat;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        rgba(255,255,255,0.02) 0,
        rgba(255,255,255,0.02) 2px,
        transparent 2px,
        transparent 4px
    );
}

.marine-placeholder {
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../assets/marine.png') center/cover no-repeat;
}

.marine-placeholder::after {
    content: '';
}

.architectural-placeholder {
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../assets/pergola.png') center/cover no-repeat;
}

.architectural-placeholder::after {
    content: '';
}

.fabrication-placeholder {
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../assets/fabrication.png') center/cover no-repeat;
}

.fabrication-placeholder::after {
    content: '';
}

.about-content {
    background: rgba(255, 255, 255, 0.02);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.trust-signals {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.trust-signals li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-dark);
    padding: 1rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.service-info {
    padding: 2rem;
}

.service-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.service-info p {
    color: var(--text-muted);
}

.highlight-card {
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(255, 90, 0, 0.2);
}

.railway-placeholder {
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../assets/railway.png') center/cover no-repeat;
}

/* Portfolio Section */
.portfolio-section {
    background-color: var(--bg-dark);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid rgba(255,255,255,0.05);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.portfolio-overlay p {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Region Section */
.region-section {
    background-color: var(--bg-card);
}

.region-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.region-item {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem 2rem;
    border-radius: 4px;
    border-bottom: 3px solid var(--secondary);
    transition: var(--transition);
}

.region-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
    border-color: var(--primary);
}

/* Authority Hooks */
.authority-hooks {
    margin-top: 4rem;
}

.hook-card {
    transition: var(--transition);
}

.hook-card:hover {
    background: rgba(255,255,255,0.05) !important;
    transform: scale(1.02);
}

/* Contact Section */
.contact-section {
    background: linear-gradient(to bottom, var(--bg-dark), #0D0E10);
}

.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: var(--white);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 90, 0, 0.2);
}

/* Formspree States */
[data-fs-success], [data-fs-error] {
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-family: 'Inter', sans-serif;
    display: none; /* Hidden by default, SDK shows them */
}

[data-fs-success] {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #2ECC71;
}

[data-fs-error] {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: var(--secondary);
}

.error-msg {
    color: var(--secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

input[aria-invalid="true"], 
select[aria-invalid="true"], 
textarea[aria-invalid="true"] {
    border-color: var(--secondary) !important;
}

[data-fs-submit-btn]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-status {
    margin-bottom: 1rem;
}

/* Footer */
.main-footer {
    padding: 80px 0 0;
    background-color: var(--black);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
}

.main-footer h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--white);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
        padding-bottom: 80px; /* Space for the persistent CTA */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 700;
        text-transform: uppercase;
        font-family: 'Montserrat', sans-serif;
    }

    .nav-links li:last-child {
        display: none; /* Hide 'Get a Quote' button in mobile menu because of sticky footer */
    }

    .grid-2 { 
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content h1 { font-size: 4rem; }
    
    section { padding: 80px 0; }
}

@media (max-width: 768px) {
    .hero-content h1 { 
        font-size: 2.8rem;
        margin-top: 40px; /* Offset for header overlap */
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }

    .section-title { font-size: 2rem; }

    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 3rem;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-sticky-cta {
        display: block;
    }

    body {
        padding-bottom: 100px; /* Account for double-button sticky footer */
    }

    .form-grid { grid-template-columns: 1fr; }

    .about-content {
        padding: 2rem 1.5rem;
    }

    .trust-signals {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.2rem; }
    
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .logo-text { font-size: 1.25rem; }
    
    .region-list { gap: 1rem; }
    .region-item { width: 100%; text-align: center; }
}

/* Utility to lock scroll when menu is open */
body.no-scroll {
    overflow: hidden;
}
