@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@100..900&family=Syne:wght@400..800&family=Outfit:wght@100..900&display=swap');

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #ffffff;
    /* Keeping it monochromatic Bauhaus for now as per logo */
    --accent-red: #ff0000;
    /* Subtle Bauhaus touch */
    --font-primary: 'Lexend Deca', sans-serif;
    --font-elegant: 'Syne', sans-serif;
    --font-round: 'Outfit', sans-serif;
    --spacing-unit: 1rem;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Star Background */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: black;
}

/* Header & Logo */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem;
    z-index: 1000;
    display: flex;
    justify-content: flex-start;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
    pointer-events: auto;
}

.logo-container {
    display: flex;
    text-decoration: none;
    width: 320px;
    margin: 0 auto;
    position: relative;
    transition: var(--transition-smooth);
    pointer-events: auto !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.logo-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    opacity: 0.85;
    /* Slight transparency so stars show through */
    clip-path: inset(6%);
    /* Crops out the baked-in blue frame around the image edges */
    mix-blend-mode: screen;
    filter: brightness(1.5) drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
    /* Keeps it bright and glowing */
    transition: var(--transition-smooth);
}

.logo-container img:hover {
    opacity: 1;
}

.vignette-mask {
    -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 85%);
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 85%);
}

/* Hero Section with Vimeo Background */
.hero {
    position: relative;
    padding-top: 12rem;
    /* Give space for the header */
    padding-bottom: 4rem;
    height: auto;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    z-index: 0;
    /* Create stacking context so video (z-index: -1) isn't hidden by body/background */
}

.hero-video-wrapper {
    width: 95%;
    /* Remove max-width to allow expansion on larger screens */
    margin: 0 auto;
    /* project-item handles the borders and corners */
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* To ensure background video fills screen */
.video-background iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Ensure sub-page portfolio videos are interactive */
.project-preview iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto; /* Allow fullscreen touches */
    z-index: 1; /* Bring above stacking context */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle darken to ensure logo and CTA pop */
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 1;
}

/* Hero Tagline */
.hero-tagline-container {
    width: 100%;
    text-align: center;
    padding: 3rem 2rem 1rem 2rem;
    background: transparent;
}

.hero-tagline {
    font-family: 'Bauhaus 93', 'ITC Bauhaus', sans-serif;
    /* Requested font change */
    font-size: clamp(1.2rem, 3.5vw, 2.6rem);
    /* Responsive size to prevent cut-offs */
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    mix-blend-mode: screen;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.8), 0 0 20px rgba(0, 242, 255, 0.4);
    /* Integrates text cleanly with video */
    /* Laser text effect */
    display: inline-block;
    white-space: normal;
    overflow: hidden;
    clip-path: inset(0 100% 0 0);
    animation: laser-write 3s cubic-bezier(0.1, 0.7, 0.1, 1) 6s forwards;
}

.hero-tagline:hover {
    /* Retain fully visible clip-path state during hover if hovered after intro */
    clip-path: inset(0 0 0 0);
    opacity: 0.85;
    /* Cap hover opacity to match */
}

.tagline-char {
    display: inline-block;
    transition: transform 0.1s;
}

.tagline-char:hover {
    animation: subtle-vibrate 0.1s linear infinite;
    color: #00f2ff;
    /* Added a subtle neon color to the hovered letter for extra interactivity */
    text-shadow: 0 0 10px #00f2ff;
}

@keyframes subtle-vibrate {
    0% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(-1px, 1px);
    }

    40% {
        transform: translate(-1px, -1px);
    }

    60% {
        transform: translate(1px, 1px);
    }

    80% {
        transform: translate(1px, -1px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes laser-write {
    0% {
        clip-path: inset(0 100% 0 0);
        opacity: 1;
    }

    100% {
        clip-path: inset(0 0 0 0);
        opacity: 0.85;
        /* Max opacity set to 0.85 per user request */
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .hero-tagline {
        font-size: 1rem;
        white-space: normal;
        clip-path: inset(0 0 0 0);
        animation: laser-fade-in 3s ease 6s forwards;
    }

    @keyframes laser-fade-in {
        to {
            opacity: 0.85;
            /* Max opacity set to 0.85 per user request */
        }
    }
}

/* Edward Photo Focus */
.edward-photo img {
    object-position: center 10%;
    /* Adjust focus up to correctly feature facial centering */
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.header-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center everything in the header stack */
    gap: 3rem;
    /* Increased from 0.8rem/0.5rem for more distance */
}

.header-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding-top: 0.5rem;
}

.header-nav .nav-item {
    font-size: 0.9rem;
    /* Increased from 0.65rem for better readability */
    font-family: var(--font-round);
    font-weight: 500;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition-smooth);
}

.header-nav .nav-item:hover {
    color: var(--text-color);
}

.instagram-link {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f2ff !important;
    /* Switched to Neon Blue to match CTA */
    font-weight: 700 !important;
    transition: var(--transition-smooth);
}

.instagram-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: var(--transition-smooth);
}

.instagram-link:hover {
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.6);
}

.instagram-link:hover svg {
    filter: drop-shadow(0 0 5px #00f2ff);
}

.cta-button {
    background: transparent;
    color: var(--text-color);
    border: 1.5px solid #00f2ff;
    /* Neon Blue */
    padding: 0.5rem 1.2rem;
    font-size: 0.7rem;
    font-family: var(--font-round);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-radius: 50px;
    white-space: normal;
    opacity: 0;
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.4), inset 0 0 4px rgba(0, 242, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

header.visible .cta-button {
    opacity: 1;
}

.cta-button:hover {
    background: #00f2ff;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.6);
    transform: scale(1.02);
}

.cta-large {
    font-size: 1.2rem;
    padding: 1rem 3rem;
    border-width: 2px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.5), inset 0 0 8px rgba(0, 242, 255, 0.3);
    opacity: 1;
    /* Always visible at bottom, unlike header CTA */
}

.cta-large:hover {
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.8);
    transform: scale(1.05);
}

.footer-cta-section {
    padding: 6rem 2rem 4rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
}

.footer-cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-cta-text {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Category Navigation under Video removed in favor of header nav */

/* Content Sections */
section {
    padding: 8rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    border-bottom: 4px solid var(--text-color);
    display: inline-block;
    padding-bottom: 1rem;
}

/* Team Section */
.team-essence {
    max-width: 800px;
    margin: 0 auto 6rem auto;
    /* Increased bottom margin for more distance */
    font-family: var(--font-elegant);
    font-size: 1.5rem;
    line-height: 1.4;
    text-align: center;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 6rem;
}

.member-card {
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.essence-photo {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #000;
}

.essence-photo img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.essence-photo:hover img {
    filter: grayscale(0%);
}

.member-photo {
    width: 100%;
    aspect-ratio: 4/5;
    background: #111;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
    filter: grayscale(100%);
}

.member-card:hover .member-photo img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.member-details h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.member-role {
    font-weight: 300;
    color: #888;
    margin-bottom: 1.5rem;
    display: block;
}

.member-details p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Spatial Navigation Boards - Project Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-item {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    transition: var(--transition-smooth);
}

/* HUD Frame Accents */
.project-item::before,
.project-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #00f2ff;
    /* neon blue HUD accent */
    pointer-events: none;
    z-index: 2;
}

.project-item::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.project-item::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.project-item:hover {
    border-color: rgba(0, 242, 255, 0.5);
    background: rgba(0, 242, 255, 0.03);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}

.project-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: transparent;
    /* Changed from #000 to transparent */
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.project-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto;
}

/* HUD Metadata labels */
.project-item .hud-label {
    position: absolute;
    font-family: var(--font-primary);
    font-size: 0.5rem;
    color: rgba(0, 242, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    pointer-events: none;
}

.project-item .hud-label.top {
    top: 15px;
    right: 15px;
}

.project-item .hud-label.bottom {
    bottom: 15px;
    left: 15px;
}

/* Cinematic Intro Overlay */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s ease;
}

.intro-logo {
    max-width: 600px;
    width: 80%;
    opacity: 0;
    transform: scale(0.9);
    filter: blur(10px);
    transition: all 2s cubic-bezier(0.25, 1, 0.5, 1);
}

.intro-logo img {
    width: 100%;
    height: auto;
}

/* Shimmer/Pulse Effect like stars */
@keyframes atmosphericFade {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: scale(0.9);
    }

    30% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }

    70% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }

    100% {
        opacity: 0;
        filter: blur(15px);
        transform: scale(1.05);
    }
}

.intro-logo.animate {
    animation: atmosphericFade 5s forwards;
}

/* Hide header initially */
header {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

header.visible {
    opacity: 1;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Mobile Hamburger Navigation --- */
.hamburger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1005;
    position: relative;
    width: 30px;
    height: 20px;
    margin-left: auto;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition-smooth);
    border-radius: 2px;
}

/* Hamburger Active Animation */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Responsive fixes */
@media (max-width: 768px) {

    /* Header & Navigation Stack */
    .header-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 1rem;
    }

    header .cta-button {
        display: none;
        /* Hide CTA on mobile header */
    }

    .mobile-cta {
        display: block !important;
        margin-top: 2rem;
        border: 2px solid #00f2ff;
        padding: 10px 20px;
        border-radius: 50px;
        color: #00f2ff !important;
    }

    .cta-large {
        display: inline-block !important; /* Force visibility for footer CTA on mobile */
    }

    .hamburger-menu {
        display: block;
    }

    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1001;
        opacity: 0;
    }

    .header-nav.nav-open {
        transform: translateX(0);
        opacity: 1;
    }

    .header-nav .nav-item {
        font-size: 1.5rem;
    }

    .logo-container {
        width: 140px;
        margin: 0;
    }

    header {
        padding: 1.5rem;
    }

    /* Typography Scaling */
    .hero-tagline {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
        padding: 0 0.5rem;
        white-space: normal;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Grid Stacking */
    .projects-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .project-item:nth-child(even) {
        margin-top: 0;
    }

    .member-card {
        flex-direction: column;
        text-align: center;
    }

    .member-image {
        margin: 0 auto 2rem auto;
    }

    .team-essence-container {
        flex-direction: column;
    }
}

/* Footer */
footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Sub-page Navigation */
.back-home {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1001;
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-elegant);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--text-color);
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.back-home:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: scale(1.05);
}

/* Secondary Page Adjustments */
body.sub-page {
    padding-top: 150px;
}
