/* ===== BLACKOAK MAIN STYLESHEET ===== */

/* --- CSS VARIABLES --- */
:root {
    --glass: rgba(0, 0, 0, 0.04);
    --glass-border: rgba(0, 0, 0, 0.12);
    --accent: #6bb030; /* Brand Green */
    --text-main: #1f1f1f;
    --text-dim: #4b4b4b;
    --bg-dark: #f6f6f6;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- BACKGROUND ELEMENTS --- */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(107, 176, 48, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    border-radius: 50%;
    filter: blur(80px);
    animation: drift 20s infinite alternate;
}

@keyframes drift {
    from { transform: translate(-10%, -10%); }
    to { transform: translate(20%, 20%); }
}

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

.glass {
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.btn-accent {
    background: var(--accent);
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
    display: inline-block;
}

.btn-accent:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(107, 176, 48, 0.4);
    color: #000 !important;
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: #111;
    text-decoration: none;
}

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

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

.nav-links a {
    text-decoration: none;
    color: #111;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links .btn-accent {
    color: #000;
}

.nav-links .btn-accent:hover {
    color: #000 !important;
}



/* --- HERO SECTION --- */
header {
    padding: 160px 0 100px 0;
    text-align: center;
}

.hero-tagline {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    background: linear-gradient(180deg, #111 30%, #444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: #fff;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.2rem;
}

/* --- HERO SLIDESHOW (index.html) --- */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideAnimation 18s infinite;
}

.slide:nth-child(2) {
    animation-delay: 6s;
}

.slide:nth-child(3) {
    animation-delay: 12s;
}

@keyframes slideAnimation {
    0% { opacity: 0; transform: scale(1); }
    10% { opacity: 0.4; }
    33% { opacity: 0.4; }
    43% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 0; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(5,5,5,0.2) 0%, rgba(5,5,5,0.9) 100%);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding-top: 200px;
    padding-bottom: 150px;
    text-align: center;
}

.hero-pill {
    display: inline-block;
    padding: 1.5rem 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- CONTENT SECTIONS --- */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #111;
}

.section-header p {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

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

.card {
    padding: 2.5rem;
    transition: 0.4s;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-10px);
}

.card i {
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: #111;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-dim);
}

/* --- FLAGSHIP SYSTEMS CARDS --- */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 4rem;
}

.system-card {
    position: relative;
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

.system-card:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) brightness(0.4);
    transition: 0.5s;
}

.system-card:hover .card-bg {
    filter: grayscale(0%) brightness(0.6);
    transform: scale(1.1);
}

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.card-content h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.system-card:hover .card-content {
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.15));
}

.system-card:hover .card-content h3 {
    color: #fff;
}

.system-card:hover .card-content p {
    color: var(--accent);
}

/* --- PORTFOLIO GRID --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.portfolio-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(107, 176, 48, 0.15);
}

.portfolio-card-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, rgba(107, 176, 48, 0.2), rgba(107, 176, 48, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    transition: 0.3s;
}

.portfolio-card:hover .portfolio-card-image {
    background: linear-gradient(135deg, rgba(107, 176, 48, 0.3), rgba(107, 176, 48, 0.1));
    transform: scale(1.05);
}

.portfolio-card-content {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-card-category {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.portfolio-card h3 {
    font-size: 1.5rem;
    color: #111;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.portfolio-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.portfolio-card-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
    font-size: 0.9rem;
}

.portfolio-card-link:hover {
    gap: 1rem;
}

/* --- SERVICES SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    transition: 0.3s;
    text-align: center;
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: rgba(107, 176, 48, 0.05);
}

.service-card h4 {
    color: #111;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* --- POLICY MODALS --- */
#policy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.98); /* White background for modal overlay */
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 2rem 0;
}

body.modal-blur > *:not(#policy-modal):not(script) {
    filter: blur(8px) grayscale(0.1);
    pointer-events: none;
    user-select: none;
    transition: filter 0.3s;
}

body.modal-blur {
    overflow: hidden;
}

.modal-content {
    width: 90%;
    max-width: 700px;
    background: #fff; /* White modal background */
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem 2.5rem 2.5rem 2.5rem;
    position: relative;
    animation: slideIn 0.4s ease-out;
    margin: auto;
    color: #222;
    /* Decorative SVG background graphic */
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 180px;
    height: 180px;
    background: url('asserts/images/branding/BO-logo.png') no-repeat center center/contain;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
}

.modal-content::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    background: url('asserts/images/branding/Blackoak-Logo.png') no-repeat center center/contain;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
}

.modal-content > * {
    position: relative;
    z-index: 1;
}

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #111;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    transition: 0.3s;
}

.modal-close:hover {
    color: var(--accent);
}

.modal-content h2,
.modal-content h3 {
    color: #111;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
}

.modal-content h2:first-child,
.modal-content h3:first-child {
    margin-top: 0;
}

.modal-content p,
.modal-content ul {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.08rem;
    line-height: 1.7;
}

.modal-content ul {
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.modal-content li {
    margin-bottom: 0.7rem;
}

/* --- CONTACT MODAL --- */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    backdrop-filter: blur(8px);
}

.contact-modal.is-open {
    display: flex;
}

.contact-modal-content {
    width: 100%;
    max-width: 1000px;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    color: #222;
}

.contact-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.6rem;
    cursor: pointer;
}

.contact-modal-content h2,
.contact-modal-content h3 {
    color: #111;
    margin-top: 2.2rem;
    margin-bottom: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.contact-modal-content h2:first-child,
.contact-modal-content h3:first-child {
    margin-top: 0;
}

.contact-modal-content p,
.contact-modal-content ul {
    color: #333;
    margin-bottom: 1.2rem;
    font-size: 1.08rem;
    line-height: 1.7;
}

.contact-modal-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.7rem;
}

.contact-modal-content li {
    margin-bottom: 0.6rem;
}

.contact-modal input,
.contact-modal textarea {
    background: #f6f6f6;
    border: 1px solid var(--glass-border);
    color: #222;
}

.contact-modal input::placeholder,
.contact-modal textarea::placeholder {
    color: #888;
}

.contact-modal label {
    color: #111 !important;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 1.08rem;
}

/* --- FOOTER --- */
footer {
    background: rgba(255,255,255,0.02);
    padding: 80px 0 30px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 100px;
}

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

.footer-col h4 {
    color: #111;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col ul li a,
.footer-col a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}

.footer-col ul li a:hover,
.footer-col a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    font-size: 0.8rem;
}

.footer-bottom a {
    color: #555;
    text-decoration: none;
    cursor: pointer;
    margin-left: 1.5rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

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

    header {
        padding: 120px 0 60px 0;
    }

    .hero-tagline {
        font-size: 2.5rem;
    }
}
