/* RCO Engineering - Main Stylesheet */
/* Palette: RCO Blue (from logo) + deep navy + gold accent */

:root {
    --primary: #2C49FC;       /* RCO Royal Blue (exact from logo) */
    --primary-dark: #1A2BB8;  /* Darker shade */
    --primary-light: #5B72FF; /* Lighter highlight */
    --accent: #F5B544;        /* Warm gold accent for CTAs */
    --dark: #0A1028;          /* Near-black navy */
    --dark-2: #141E3C;
    --light: #F4F6FC;         /* Cool off-white */
    --gray: #6B7280;
    --gray-light: #E5E7EB;
    --white: #FFFFFF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --radius: 4px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }

p { margin-bottom: 1rem; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === TOP BAR === */
.topbar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.topbar a { color: var(--white); }
.topbar a:hover { color: var(--accent); }
.topbar .tb-item { display: flex; align-items: center; gap: 6px; }
.topbar svg { width: 14px; height: 14px; }

/* === HEADER / NAVIGATION === */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow var(--transition);
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
}
.logo img { height: 52px; width: auto; }

.nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}
.nav ul li { position: relative; }
.nav ul li a {
    display: block;
    padding: 10px 16px;
    color: var(--dark);
    font-weight: 500;
    font-size: 15px;
    transition: color var(--transition);
    position: relative;
}
.nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition), left var(--transition);
}
.nav ul li a:hover::after,
.nav ul li.active > a::after {
    width: calc(100% - 32px);
    left: 16px;
}
.nav ul li a:hover { color: var(--primary); }

/* Dropdown */
.nav .has-dropdown { position: relative; }
.nav .has-dropdown::after {
    content: '▾';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--gray);
    pointer-events: none;
}
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--accent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    list-style: none;
    padding: 8px 0;
}
.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown li a {
    padding: 10px 20px !important;
    font-size: 14px !important;
}
.dropdown li a::after { display: none !important; }
.dropdown li a:hover { background: var(--light); color: var(--primary) !important; }

.btn-quote {
    background: var(--accent);
    color: var(--dark) !important;
    padding: 11px 22px !important;
    border-radius: var(--radius);
    font-weight: 600 !important;
    transition: all var(--transition);
}
.btn-quote:hover {
    background: var(--primary);
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 74, 46, 0.3);
}
.btn-quote::after { display: none !important; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    margin: 5px 0;
    transition: transform var(--transition), opacity var(--transition);
}

/* === HERO SLIDER === */
.hero {
    position: relative;
    height: 85vh;
    min-height: 560px;
    max-height: 780px;
    overflow: hidden;
    background: var(--dark);
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(13, 42, 24, 0.85) 0%, rgba(13, 42, 24, 0.4) 55%, rgba(13, 42, 24, 0.2) 100%);
}
.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    z-index: 2;
}
.hero-text {
    max-width: 720px;
    color: var(--white);
    animation: heroFade 1s ease-out;
}
.hero-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 18px;
    display: inline-block;
}
.hero h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 5.5vw, 4.5rem);
    margin-bottom: 20px;
    line-height: 1.05;
}
.hero p {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 600px;
    margin-bottom: 32px;
}
.hero-cta {
    display: inline-flex;
    gap: 14px;
    flex-wrap: wrap;
}
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    letter-spacing: 0.3px;
}
.btn-primary {
    background: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}
.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-3px);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: background var(--transition), width var(--transition);
}
.hero-dot.active { background: var(--accent); width: 32px; border-radius: 10px; }

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

/* === PAGE HERO (inner pages) === */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 80px 0 70px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 168, 75, 0.15) 0%, transparent 70%);
    pointer-events: none;
}
.page-hero h1 {
    color: var(--white);
    margin-bottom: 12px;
    position: relative;
}
.breadcrumb {
    font-size: 14px;
    opacity: 0.85;
    position: relative;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb span { margin: 0 8px; opacity: 0.6; }

/* === SECTIONS === */
section { padding: 90px 0; }
section.alt { background: var(--white); }

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 60px;
}
.section-eyebrow {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 14px;
    display: inline-block;
}
.section-header h2 {
    margin-bottom: 16px;
}
.section-header p {
    color: var(--gray);
    font-size: 17px;
}

/* === ABOUT PREVIEW === */
.about-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.about-preview-text h2 { margin-bottom: 20px; }
.about-preview-text .lead {
    font-size: 18px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 20px;
}
.about-preview-image {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.about-preview-image::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent);
    border-radius: var(--radius);
    z-index: -1;
}
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-light);
}
.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}
.stat-label {
    font-size: 13px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
}

/* === PRODUCT CARDS === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    color: inherit;
}
.product-card-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}
.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.08); }
.product-card-content {
    padding: 24px;
    position: relative;
}
.product-card-cat {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}
.product-card h3 {
    font-size: 20px;
    margin-bottom: 6px;
}
.product-card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
}

/* === CLIENTS GRID === */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.client-logo {
    aspect-ratio: 4/3;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    transition: all var(--transition);
    overflow: hidden;
}
.client-logo:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}
.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter var(--transition);
}
.client-logo:hover img { filter: grayscale(0%); }

/* === WHY US / FEATURES === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.feature-card {
    background: var(--white);
    padding: 36px 28px;
    border-radius: var(--radius);
    border-top: 3px solid var(--accent);
    transition: all var(--transition);
    box-shadow: var(--shadow);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feature-icon {
    width: 54px;
    height: 54px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 20px; margin-bottom: 12px; }
.feature-card p { color: var(--gray); font-size: 15px; }

/* === CTA SECTION === */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    text-align: center;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(212, 168, 75, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 168, 75, 0.1) 0%, transparent 50%);
}
.cta-section h2 { color: var(--white); margin-bottom: 18px; position: relative; }
.cta-section p { opacity: 0.95; font-size: 18px; max-width: 620px; margin: 0 auto 30px; position: relative; }

/* === CONTENT PAGE === */
.content {
    padding: 80px 0;
}
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}
.content-main h2 { margin-bottom: 18px; margin-top: 36px; }
.content-main h2:first-child { margin-top: 0; }
.content-main p { font-size: 16px; color: #3f3f46; margin-bottom: 18px; }
.content-main ul, .content-main ol {
    margin: 16px 0 20px 20px;
    color: #3f3f46;
}
.content-main li { margin-bottom: 8px; }
.content-main strong { color: var(--primary); }

.content-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 30px 0;
}
.content-image-grid img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    aspect-ratio: 4/3;
    object-fit: cover;
}

.sidebar-card {
    background: var(--white);
    padding: 32px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}
.sidebar-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
}
.sidebar-card p { font-size: 14px; color: var(--gray); margin-bottom: 20px; }

/* === CONTACT PAGE === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: start;
}
.contact-info-card {
    background: var(--primary-dark);
    color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}
.contact-info-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 168, 75, 0.2), transparent 70%);
}
.contact-info-card h3 { color: var(--white); margin-bottom: 8px; position: relative; }
.contact-info-card > p { opacity: 0.85; font-size: 14px; margin-bottom: 30px; position: relative; }
.contact-info-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
}
.contact-info-item:first-of-type { border-top: none; }
.contact-info-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-info-icon svg { width: 18px; height: 18px; }
.contact-info-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 4px;
}
.contact-info-value { color: var(--white); font-size: 15px; line-height: 1.6; }
.contact-info-value a { color: var(--white); }
.contact-info-value a:hover { color: var(--accent); }

/* === FORMS === */
.form-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.form-card h3 { margin-bottom: 8px; }
.form-card > p { color: var(--gray); margin-bottom: 24px; font-size: 14px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31, 74, 46, 0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 36px;
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.form-btn:hover { background: var(--accent); color: var(--dark); transform: translateY(-2px); }
.form-message {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}
.form-message.success { background: #D1FAE5; color: #065F46; border: 1px solid #10B981; display: block; }
.form-message.error { background: #FEE2E2; color: #991B1B; border: 1px solid #EF4444; display: block; }

/* === PROFILE DOWNLOAD === */
.profile-download {
    background: var(--dark-2);
    color: var(--white);
    padding: 50px 40px;
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 30px;
    position: relative;
    overflow: hidden;
}
.profile-download::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 168, 75, 0.2), transparent 70%);
}
.profile-download-text h3 { color: var(--white); margin-bottom: 6px; }
.profile-download-text p { opacity: 0.8; font-size: 14px; }
.profile-download .btn-primary { position: relative; }

/* === FOOTER === */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.75);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    padding-bottom: 50px;
}
.footer h4 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}
.footer p { font-size: 14px; line-height: 1.7; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    transition: color var(--transition), padding-left var(--transition);
}
.footer ul li a:hover { color: var(--accent); padding-left: 6px; }
.footer-logo img { height: 48px; margin-bottom: 18px; }
.footer-contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: flex-start;
    font-size: 14px;
}
.footer-contact-item svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 4px; color: var(--accent); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 22px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.55);
}

/* === REVEAL ANIMATION === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .about-preview, .contact-grid, .content-grid { grid-template-columns: 1fr; gap: 40px; }
    .sidebar-card { position: relative; top: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    section { padding: 60px 0; }
    .menu-toggle { display: block; }
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 340px;
        height: 100vh;
        background: var(--white);
        padding: 80px 30px 30px;
        transition: right var(--transition);
        box-shadow: var(--shadow-lg);
        z-index: 99;
    }
    .nav.open { right: 0; }
    .nav ul { flex-direction: column; gap: 0; align-items: stretch; }
    .nav ul li { width: 100%; border-bottom: 1px solid var(--gray-light); }
    .nav ul li a { padding: 14px 0; }
    .nav ul li a::after { display: none; }
    .has-dropdown::after { display: none; }
    .dropdown { position: static; box-shadow: none; border: none; opacity: 1; visibility: visible; transform: none; padding-left: 16px; background: var(--light); }
    .has-dropdown:not(:hover) .dropdown { display: none; }
    .has-dropdown.mobile-open .dropdown { display: block; }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 7px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -7px); }
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
        z-index: 98;
    }
    .nav-overlay.open { opacity: 1; visibility: visible; }
    .footer-grid { grid-template-columns: 1fr; gap: 35px; padding-bottom: 35px; }
    .form-row { grid-template-columns: 1fr; }
    .profile-download { grid-template-columns: 1fr; text-align: center; }
    .topbar .container { justify-content: center; font-size: 12px; }
    .topbar .tb-item:not(:first-child) { display: none; }
    .hero { height: 70vh; min-height: 480px; }
    .about-stats { grid-template-columns: 1fr 1fr; }
}
