:root {
    --primary-bg-colour: rgb(0, 0, 0);
    --secondary-bg-colour: rgb(15, 15, 20);
    --primary-site-accent: rgb(18, 128, 218);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --sub-text-accent: rgb(121, 121, 121);
}

html {
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body {
    background-color: var(--primary-bg-colour);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ------ FONTS & ACCENTS ------ */
.birthstone-regular {
  font-family: "Birthstone", cursive;
  font-weight: 400;
  font-style: normal;
}

.accent {
    color: var(--primary-site-accent);
}

.sub-text-accent {
    color: var(--sub-text-accent);
}

.glow-text {
    animation: glow-pulse 2s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    from { text-shadow: 0 0 5px var(--primary-site-accent), 0 0 10px var(--primary-site-accent); }
    to { text-shadow: 0 0 10px var(--primary-site-accent), 0 0 30px var(--primary-site-accent); }
}

/* ------ NAVIGATION ------ */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(18, 128, 218, 0.2);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-site-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-site-accent);
}

/* ------ LAYOUT UTILS ------ */

.content-section {
    padding: 100px 20px 50px;
    max-width: 1100px;
    margin: 0 auto;
    min-height: 80vh;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ------ HERO SECTION ------ */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, rgb(10, 20, 30) 0%, var(--primary-bg-colour) 70%);
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(3rem, 6vw, 5rem); /* Responsive typography */
}

.hero-content .accent {
    animation: glow-pulse 2s ease-in-out infinite alternate;
}

.hero-subtitle {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-top: 10px;
    color: var(--primary-site-accent);
}

/* ------ FULL WIDTH SECTION & CANVAS ------ */

/* This matches the Hero Section's border and background exactly */
.full-width-section {
    width: 100%;
    position: relative;
    background: radial-gradient(circle at center, rgb(10, 20, 30) 0%, var(--primary-bg-colour) 70%);
    overflow: hidden; /* Ensures clouds don't spill out */
}

#cloud-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; 
    
    /* These two lines create the smooth fade effect at the top */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
}

/* Elevates the text and cards ABOVE the canvas */
.relative-content {
    position: relative;
    z-index: 1;
}

/* ------ CURVED SECTION DIVIDER ------ */
.section-divider {
    position: absolute;
    bottom: -1px; /* The -1px prevents a microscopic gap from rendering on certain monitors */
    left: 0;
    width: 100%;
    height: 70px; /* This controls how "deep" the curve is. Increase it for a deeper swoop! */
    line-height: 0; 
    z-index: 2; /* Keeps the curve floating above your cloud canvas */
    pointer-events: none;
}

.section-divider svg {
    width: calc(100% + 1.3px);
    height: 100%;
    display: block;
}

/* --- STUDIO SECTION --- */

.studio-info-grid {
    position: relative; /* Crucial so the SVG line stays contained */
    display: flex;
    flex-direction: column;
    gap: 150px; /* Big gap to let the animated line shine through */
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 20px;
}

.studio-card {
    position: relative;
    z-index: 1; /* Keeps the cards above the line */
    background: rgba(15, 15, 20, 0.85); /* Slight transparency looks great over the glowing line */
    padding: 40px;
    border-radius: 8px;
    width: 45%; /* Makes them take up slightly less than half the screen */
    border: 1px solid rgba(18, 128, 218, 0.2); /* Subtle blue border */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    /* We removed the CSS transition here because JS is now controlling the movement frame-by-frame! */
}

/* Align the cards to opposite sides */
.left-card {
    align-self: flex-start;
    opacity: 0; /* Start invisible */
    transform: translateX(-100px);
}

.right-card {
    align-self: flex-end;
    opacity: 0; /* Start invisible */
    transform: translateX(100px);
}

/* --- ABOUT & STUDIO COMBINED SECTION --- */
#about-wrapper {
    position: relative; /* Contains the absolute SVG */
    width: 100%;
}

.scroll-line-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* CRITICAL: Allows you to hover over team cards through the SVG */
    filter: drop-shadow(0 0 8px var(--primary-site-accent));
}

#scroll-path {
    stroke-linecap: round;
    stroke-dasharray: 1000; 
    stroke-dashoffset: 1000;
}

#the-studio, #team {
    position: relative;
    z-index: 1; /* Keeps the text and cards above the glowing line */
}

.studio-info-grid {
    display: flex;
    flex-direction: column;
    gap: 150px; 
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 20px;
}

/* ------ TEAM SECTION ------ */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    justify-content: center;
}

.team-card {
    flex: 1 1 250px;
    background: var(--secondary-bg-colour);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s;
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-site-accent);
}

.avatar {
    width: 100px;
    height: 100px;
    background: #222;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--text-muted);
    border: 2px solid var(--primary-site-accent);
}

/* ------ PROJECTS SECTION & FILTERS ------ */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-site-accent);
    color: #fff;
    border-color: var(--primary-site-accent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--secondary-bg-colour);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.project-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: var(--primary-site-accent);
}

.project-image {
    height: 180px;
    background: #222;
    position: relative;
    display: flex;
    padding: 15px;
}

/* Placeholders for images */
.game-bg { background: linear-gradient(45deg, #1a0b1c, #4a154b); }
.web-bg { background: linear-gradient(45deg, #0b1a1c, #154a4b); }

.studio-logo {
    background-image: url('../assets/images/xucystudioslogo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

    width: 100%;
    height: 300px;
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.unreleased { background: #ff4757; color: white; }
.released { background: #2ed573; color: black; }

.project-info {
    padding: 20px;
}

.project-info h3 { margin: 0 0 10px; }
.project-info p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

.tags {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.tags span {
    background: rgba(18, 128, 218, 0.1);
    color: var(--primary-site-accent);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ------ FOOTER ------ */
#page-footer {
    background: var(--secondary-bg-colour);
    border-top: 1px solid rgba(18, 128, 218, 0.2);
    padding: 50px 20px 20px;
    font-family: inherit;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-brand p {
    color: var(--text-muted);
    margin: 0;
    max-width: 300px;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links h4 {
    margin: 0 0 5px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-site-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ------ MOBILE ------ */
@media screen and (max-width: 768px) {
    #navbar {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    
    .hero-content h1 { font-size: 2.5rem; }
    .hero-subtitle { font-size: 2rem; }
    
    .filter-container { gap: 10px; }
    .filter-btn { font-size: 0.8rem; padding: 6px 15px; }

    .studio-logo {
        height: 185px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-brand p {
        margin: 0 auto; /* Centers the text block on mobile */
    }

    .studio-info-grid {
        gap: 60px; /* Slightly tighter gap so it flows better on phones */
    }
    
    .studio-card {
        width: 80%; /* Shrinks the card to make room for the line */
        margin-left: auto !important; /* Forces the card completely to the right edge */
        margin-right: 0 !important;
        padding: 25px 20px; /* Slightly thinner padding to give the text more breathing room */
    }
    
    .left-card, .right-card {
        align-self: flex-end; 
    }
}