/**
 * Beast Nation - Main Stylesheet
 * Modern creative agency aesthetic: Black, Orange accents, Cinematic
 */

/* ===== CSS Variables ===== */
:root {
    --color-black: #0a0a0a;
    --color-dark: #141414;
    --color-dark-gray: #1a1a1a;
    --color-gray: #2a2a2a;
    --color-light-gray: #888;
    --color-white: #ffffff;
    --color-orange: #ff6b35;
    --color-orange-hover: #ff8555;
    --font-heading: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --transition: 0.3s ease;
    --section-padding: 100px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-black);
    color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* ===== Typography ===== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.text-muted { color: var(--color-light-gray); }
.text-orange { color: var(--color-orange); }

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 2rem;
    background: transparent;
    transition: background var(--transition);
}

.site-header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 1rem;
}

/* Header logo - circular, fits navbar, keeps aspect ratio */
.logo .logo-img,
a.logo img.logo-img {
    display: block;
    height: 60px;
    width: 60px;
    max-height: 60px;
    max-width: 60px;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    object-position: center;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 28px;
    height: 2px;
    background: var(--color-white);
    transition: var(--transition);
}

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

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-orange);
    transition: width var(--transition);
}

.main-nav a:hover::after { width: 100%; }

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img,
.hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-light-gray);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.hero-cta {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--color-white);
    color: var(--color-black);
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

.hero-cta:hover {
    background: var(--color-orange);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* ===== Sections ===== */
.section {
    padding: var(--section-padding) 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    margin-bottom: 3rem;
    opacity: 0;
}

.section-title.visible { opacity: 1; }

/* ===== Portfolio - Vertical Grid Gallery ===== */
.portfolio-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.portfolio-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.sub-filters {
    display: none;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--color-gray);
}

.sub-filters.visible {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 1px solid var(--color-gray);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-orange);
    border-color: var(--color-orange);
}

/* Vertical grid - multiple rows */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.portfolio-item.hidden {
    display: none !important;
}

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

.portfolio-item:hover img,
.portfolio-item:hover video {
    transform: scale(1.08);
}

.portfolio-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.portfolio-item:hover .portfolio-item-overlay { opacity: 1; }

.play-icon {
    width: 60px;
    height: 60px;
    background: var(--color-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon svg {
    width: 24px;
    height: 24px;
    margin-left: 4px;
}

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

.service-card {
    background: var(--color-dark-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.service-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card-image img {
    transform: scale(1.05);
}

.service-card-content {
    padding: 2rem;
}

.service-icon {
    width: 48px;
    height: 48px;
    background: var(--color-orange);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.service-icon svg {
    width: 24px;
    height: 24px;
}

.service-card h3 {
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--color-light-gray);
    margin-bottom: 1rem;
}

.service-card a {
    color: var(--color-orange);
    font-weight: 500;
}

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

/* ===== About Section with BG ===== */
.about-cinematic {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Clear fixed header when section is at top of page */
.about-cinematic.page-top-section {
    padding-top: 130px;
    min-height: 580px;
    align-items: flex-start;
}

.about-cinematic.page-top-section .about-cinematic-content {
    padding-top: 2rem;
}

.about-cinematic-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.about-cinematic-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-cinematic-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
}

.about-cinematic-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    padding: 4rem 2rem;
}

.about-cinematic h2 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

.about-cinematic h2 span { color: var(--color-orange); }

.about-cinematic p {
    color: var(--color-light-gray);
    margin-bottom: 1.5rem;
}

/* ===== Clients Section ===== */
.clients-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    align-items: center;
}

.clients-grid img {
    max-height: 50px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.clients-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ===== Team ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

.team-card {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
}

.team-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.team-card-image {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-card-image img {
    transform: scale(1.05);
}

.team-card h4 {
    margin-bottom: 0.25rem;
}

.team-card .role {
    color: var(--color-light-gray);
    font-size: 0.9rem;
}

/* ===== CTA Section ===== */
.cta-section {
    text-align: center;
    padding: 6rem 2rem;
    background: var(--color-dark-gray);
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--color-light-gray);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--color-orange);
    color: var(--color-white);
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
}

.cta-btn:hover {
    background: var(--color-orange-hover);
    transform: translateY(-2px);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--color-black);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--color-gray);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
}

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

.footer-brand .logo {
    display: block;
    margin-bottom: 0.5rem;
}

.footer-brand p,
.footer-contact p {
    color: var(--color-light-gray);
    font-size: 0.95rem;
}

.footer-contact h4,
.footer-social h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    opacity: 0.7;
}

.social-links a:hover { opacity: 1; }

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

.footer-bottom p {
    color: var(--color-light-gray);
    font-size: 0.9rem;
}

/* ===== Lightbox/Modal ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--color-gray);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
}

.lightbox-content {
    width: min(960px, 90vw);
    height: min(70vh, 720px);
    max-width: 90vw;
    max-height: 90vh;
    animation: lightboxFadeIn 0.3s ease;
}

.lightbox-content img,
.lightbox-content video,
.lightbox-content iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Lightbox navigation arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,107,53,0.9);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: var(--color-orange);
}

.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Lightbox media counter */
.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.95rem;
    z-index: 10001;
}

/* ===== Contact Form ===== */
.contact-form {
    max-width: 600px;
    margin: 0 auto 4rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--color-dark-gray);
    border: 1px solid var(--color-gray);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 4px;
}

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

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

.btn-primary {
    padding: 1rem 2.5rem;
    background: var(--color-orange);
    color: var(--color-white);
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

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

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.alert-error { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* ===== Map ===== */
.map-container {
    margin-top: 3rem;
    border-radius: 12px;
    overflow: hidden;
    height: 400px;
    background: var(--color-dark-gray);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Page-specific ===== */
.page-hero {
    padding-top: 120px;
    padding-bottom: 60px;
    text-align: center;
}

.page-hero h1 {
    margin-bottom: 0.5rem;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .logo {
        margin-right: 0.75rem;
    }

    .logo .logo-img,
    a.logo img.logo-img {
        height: 44px;
        width: 44px;
        max-height: 44px;
        max-width: 44px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--color-dark);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right var(--transition);
    }

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

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .section {
        padding: 60px 1.5rem;
    }

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