/* Corevigil LLC Website Styles
 * Brand Guidelines: Gold #d4af37, Black #1a1a1a, Orange #ffa500
 * Professional, technical aesthetic for oil & gas engineering
 */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --gold: #d4af37;
    --black: #1a1a1a;
    --white: #ffffff;
    --dark-gray: #2c2c2c;
    --light-gray: #f5f5f5;
    --orange: #ffa500;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --line-height: 1.7;
}

body {
    font-family: var(--font-primary);
    font-size: 17px;
    line-height: var(--line-height);
    color: var(--black);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--black);
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 28px; }
h4 { font-size: 22px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p {
    margin-bottom: 1.2rem;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--orange);
}

strong { font-weight: 600; }

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--light-gray);
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.03em;
}

.logo span {
    color: var(--gold);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--black);
    font-weight: 500;
    font-size: 16px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--black);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
    color: var(--white);
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 0;
}

.hero h1 {
    color: var(--white);
    font-size: 56px;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero h1 .highlight {
    color: var(--gold);
}

.hero .subheadline {
    font-size: 22px;
    color: var(--light-gray);
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

.hero-buttons,
.cta-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--orange);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #ff8c00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 165, 0, 0.3);
}

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

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

/* ===== CARDS ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 42px;
    color: var(--gold);
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--black);
    margin-bottom: 1rem;
}

.card p {
    color: var(--dark-gray);
    line-height: 1.7;
}

/* ===== STATS/METRICS ===== */
.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 3rem;
    margin: 3rem 0;
}

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

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--gold);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 16px;
    color: var(--dark-gray);
    font-weight: 500;
}

/* ===== LIST STYLING ===== */
.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    padding: 1rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid var(--light-gray);
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
    font-size: 20px;
}

.feature-list li:last-child {
    border-bottom: none;
}

/* ===== PORTFOLIO/CASE STUDIES ===== */
.portfolio-item {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.portfolio-item h3 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.portfolio-meta {
    color: var(--dark-gray);
    font-size: 15px;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.portfolio-results {
    background-color: var(--light-gray);
    border-left: 4px solid var(--gold);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.portfolio-results ul {
    list-style: none;
}

.portfolio-results li:before {
    content: "✓";
    color: var(--gold);
    font-weight: 700;
    margin-right: 10px;
}

/* ===== CONTACT FORM ===== */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--black);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--black);
    color: var(--white);
    padding: 4rem 0 2rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--light-gray);
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--gold);
}

.footer-links {
    list-style: none;
}

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

.footer-bottom {
    border-top: 1px solid var(--dark-gray);
    padding-top: 2rem;
    text-align: center;
    color: var(--light-gray);
    font-size: 14px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    h3 { font-size: 22px; }

    .hero {
        padding: 5rem 0;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero .subheadline {
        font-size: 18px;
    }

    .container {
        padding: 0 1.5rem;
    }

    .section {
        padding: 3rem 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 2rem;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

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

    .stats {
        flex-direction: column;
        gap: 2rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-orange { color: var(--orange); }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ===== VIDEO BACKGROUND & PARALLAX ===== */
.hero-video-bg {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Video element */
.hero-video-bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -2;
    object-fit: cover;
    pointer-events: none;
    will-change: transform;
}

/* Fallback background image */
.hero-video-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../images/hero.png');
    background-size: cover;
    background-position: center center;
    z-index: -3;
    will-change: transform;
}

/* Vignette overlay for text readability */
.hero-video-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(120% 100% at 50% 0%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 68%, rgba(0,0,0,0.8) 100%),
        linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
    z-index: -1;
}

/* Static hero background for other pages */
.hero-static-bg {
    position: relative;
    overflow: hidden;
    background-image: url('../images/hero.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Parallax effect */
}

.hero-static-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 68%, rgba(0,0,0,0.8) 100%),
        linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
    z-index: 0;
}

.hero-static-bg .container {
    position: relative;
    z-index: 1;
}

/* Gradient background for contact page */
.hero-gradient-bg {
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
}

/* ===== GLASSMORPHISM HEADER ===== */
header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* Logo in header */
.logo-image {
    height: 42px;
    width: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Accessibility: Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-video-bg video {
        display: none !important;
    }
    .hero-video-bg::before,
    .hero-static-bg {
        background-attachment: scroll !important;
    }
    .logo-image,
    header {
        transition: none !important;
    }
}

/* ===== RESPONSIVE VIDEO ===== */
@media (max-width: 768px) {
    .hero-video-bg video {
        min-width: 150%;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* ===== ENHANCED HEADER BRANDING ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: 0.05em;
    color: var(--gold);
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    transition: color 0.3s ease;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo a:hover .logo-text {
    color: var(--orange);
}

/* Enhanced header visibility */
header {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header.scrolled {
    background: rgba(26, 26, 26, 0.98);
}

/* Dark gradient at top of hero sections for header visibility */
/* Only apply to hero sections WITHOUT video/static backgrounds (they have their own overlays) */
.hero:not(.hero-video-bg):not(.hero-static-bg)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

/* Adjust video framing to show both rig and waves */
.hero-video-bg video {
    object-position: center 45%; /* Move video up slightly to show more waves */
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 18px;
    }
    
    .logo-image {
        height: 32px;
    }
}

/* ===== NAVIGATION LINK CONTRAST FIX ===== */
.nav-links a {
    color: var(--white) !important;
}

.nav-links a:hover {
    color: var(--gold) !important;
}

.nav-links a.active {
    color: var(--gold) !important;
}

/* ===== VIDEO FRAMING ADJUSTMENT ===== */
/* Tight crop: less sky, less rocks, focus on rig and ocean */
.hero-video-bg video {
    object-position: center 40% !important; /* Balanced: rig visible, minimal sky/rocks */
}

/* Also adjust static background positioning */
.hero-static-bg {
    background-position: center 40% !important;
}

/* ===== CLIENT LOGIN BUTTON ===== */
/* Ensure button is ALWAYS visible: solid gold background, black text */
.nav-links .btn-client-login,
.nav-links a.btn-client-login,
a.btn-client-login,
.btn-client-login,
.btn-client-login:link,
.btn-client-login:visited,
.btn-client-login:active,
.btn-client-login:focus,
.btn-client-login.active {
    background-color: #d4af37 !important;
    border: 2px solid #d4af37 !important;
    border-radius: 6px !important;
    padding: 0.5rem 1rem !important;
    color: #000 !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.nav-links .btn-client-login:hover,
.nav-links a.btn-client-login:hover,
.btn-client-login:hover {
    background-color: #b8962e !important;
    border-color: #b8962e !important;
    color: #000 !important;
}

/* Remove underline for button */
.nav-links .btn-client-login::after,
.btn-client-login::after {
    display: none !important;
    width: 0 !important;
}

@media (max-width: 768px) {
    .btn-client-login,
    .btn-client-login:visited,
    .btn-client-login:active,
    .btn-client-login:focus {
        background-color: transparent !important;
        border: none !important;
        padding: 0 !important;
        color: var(--gold) !important;
    }

    .btn-client-login:hover {
        background-color: transparent !important;
        color: var(--gold) !important;
    }
}

/* ===== PHASE 1 VISUAL IMPROVEMENTS ===== */

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
    cursor: default;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2), 0 0 0 2px rgba(212, 175, 55, 0.1);
}

/* Enhanced Button Hover Effects */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

/* Button Active States */
.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.98);
}
