/* =========================================
   1. VARIABLES & CONFIGURATION
   ========================================= */
:root {
    /* --- COLORS --- */
    --color-bg:          #e4e4e4; /* Unified Grey */
    --color-black:       #1a1a1a;
    --color-white:       #ffffff;
    --color-text-muted:  #3c3c3c;
    --color-border:      rgba(26, 26, 26, 0.2);
    
    /* --- FONTS --- */
    --font-main:         'Supreme-Thin', sans-serif;
    --font-light:        'Supreme-Light', sans-serif;

    /* --- LAYOUT --- */
    /* Controls the top padding for all pages to ensure alignment */
    --header-spacing:    18vh; 
    --gutter:            2rem;

    /* --- Z-INDEX MAP (The Layer Cake) --- */
    --z-negative:       -1;    /* Backgrounds, Pixi Canvas */
    --z-content:        1;     /* Standard Page Content */
    --z-ui-layer:       100;   /* Project Nav, Sticky Elements */
    --z-menu-overlay:   800;   /* The full screen menu */
    --z-hamburger:      801;   /* Must sit on top of menu */
    --z-loader:         900;   /* Intro Loader */
    --z-overlay:        950;   /* Intro Text Overlay */
    --z-cursor:         1000;  /* The Logo/Cursor Circle */
}

/* --- FONTS --- */
@font-face {
    font-family: 'Supreme-Thin';
    src: url('../fonts/Supreme-Thin.woff2') format('woff2'); 
    font-weight: 100; font-display: swap;
}
@font-face {
    font-family: 'Supreme-Light';
    src: url('../fonts/Supreme-Light.woff2') format('woff2'); 
    font-weight: 300; font-display: swap;
}

/* =========================================
   2. CORE RESET & BODY
   ========================================= */
html {
    -webkit-text-size-adjust: 100%; 
}

html.lenis, html.lenis body { height: auto; }

body {
    margin: 0;
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-black);
    overflow-x: hidden;
    -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
    min-height: 100dvh;
}

/* Hide Scrollbar (Chrome/Safari/Webkit) */
body::-webkit-scrollbar { display: none; }

/* Focus Accessibility */
:focus-visible {
    outline: 2px solid var(--color-black);
    outline-offset: 4px;
}

/* =========================================
   3. UI ELEMENTS (Logo, Loader, Menu)
   ========================================= */

/* --- LOGO CIRCLE (The Cursor) --- */
.logo-circle {
    display: block;
    width: 3rem; height: 3rem;
    border: 2px solid #3b3b3b; /* Keeping specific border color */
    border-radius: 50%;
    box-sizing: border-box;
    position: fixed; 
    z-index: var(--z-cursor);
    background-color: transparent;
    cursor: pointer;
    text-decoration: none;
    
    /* Animation Props */
    opacity: 0; transform: scale(0.8);
    will-change: transform, top, left;
    transition: border-color 0.5s ease, background-color 0.5s ease;
    pointer-events: none; /* JS enables this later */
}

.logo-placeholder {
    position: fixed; top: 2rem; left: 2rem;
    width: 40px; height: 40px; 
    visibility: hidden; z-index: var(--z-negative);
}

/* --- INTRO & LOADER OVERLAYS --- */
#intro-overlay {
    position: fixed; top: 0; left: 0; 
    width: 100vw; height: 100vh;
    background-color: var(--color-bg);
    z-index: var(--z-overlay);
    display: flex; justify-content: center; align-items: center;
    pointer-events: auto;
}

#loader-overlay {
    position: fixed; top: 0; left: 0; 
    width: 100vw; height: 100vh;
    background-color: var(--color-bg);
    z-index: var(--z-loader);
    display: flex; justify-content: flex-start; align-items: flex-start; 
    padding: 2rem; box-sizing: border-box; 
    opacity: 0; visibility: hidden; pointer-events: none;
}

.loader-content {
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem; color: var(--color-black); 
    line-height: 1; position: relative;
}

@media (max-width: 768px) {
    .loader-content {
        font-size: 3rem;
    }
}

.loader-part { opacity: 0; white-space: pre; display: flex; }
.dot { opacity: 0; }
.loader-spacer { width: 3.2rem; height: 3rem; display: block; flex-shrink: 0; }

/* --- LOGO TEXT (Intro) --- */
.logo-text {
    display: flex; align-items: center; 
    font-size: 3.5rem; color: var(--color-black); 
    position: fixed; top: 50%; left: 50%; 
    transform: translate(-50%, -50%);
    z-index: var(--z-overlay); 
    opacity: 0; pointer-events: none;
}

.logo-text span { display: block; opacity: 0; will-change: opacity; }
.tighten { margin-left: -3px; }
.spacer { width: 0.8rem; display: block; flex-shrink: 0; }
.initial-spacer { width: 3.3rem; display: block; flex-shrink: 0; }

/* --- HAMBURGER MENU --- */
#hamburger-icon {
    position: fixed; top: 2rem; right: 2rem; 
    z-index: var(--z-hamburger);
    cursor: pointer; width: 40px; height: 40px;
    display: flex; flex-direction: column; 
    justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
}

.bar {
    display: block; width: 30px; height: 3px;
    background-color: var(--color-black); 
    margin: 3px 0; 
    transition: transform 0.4s, opacity 0.4s, background-color 0.5s ease;
}

#hamburger-icon.open .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
#hamburger-icon.open .bar:nth-child(2) { opacity: 0; }
#hamburger-icon.open .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

#menu-overlay {
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh; height: 100dvh;
    background: var(--color-bg);
    z-index: var(--z-menu-overlay);
    overflow: hidden; 
    opacity: 0; visibility: hidden;
}

.section_heading{
    color: #1a1a1a;
}

/* =========================================
   4. LAYOUT & PAGE WRAPPERS
   ========================================= */
main[data-barba="wrapper"] { 
    position: relative; z-index: var(--z-content); 
    opacity: 0; visibility: hidden; 
}

.page-container {
    width: 100%; min-height: 100vh; 
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; 
    padding: var(--gutter); box-sizing: border-box;
}

/* --- HOME PAGE VIDEO BG --- */
.video-background {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100vh;
    z-index: var(--z-negative); 
    overflow: hidden;
    background-color: var(--color-bg);
}

/* UPDATE: Target only the Home namespace for the black background 
   and apply the blue blur filter to the video
*/
[data-barba-namespace="home"] .video-background {
    background-color: #000000;
}

.video-background video {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 1s ease;
    background-color: #111; pointer-events: none;
}

/* UPDATE: Added filter here */
.video-background video.loaded { 
    opacity: 1; 
    filter: blur(2px);
    will-change: filter; /* Optimization */
}

.video-overlay {
    position: absolute; top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.3); pointer-events: none;
}

/* --- HOME HERO TEXT (NEW UPDATE) --- */
.home-hero-text {
    position: absolute; 
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2; /* Sits above video */
    display: flex; 
    gap: 3vw;
    pointer-events: none; /* Click through to video/bg */
    width: 100%; justify-content: center;
}

.home-hero-text span {
    font-family: var(--font-main);
    font-size: 5vw; 
    color: var(--color-white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    opacity: 0; 
    transform: translateY(30px);
    display: block;
}

@media (max-width: 768px) {
    .home-hero-text { flex-direction: column; gap: 1rem; align-items: center; }
    .home-hero-text span { font-size: 8vw; line-height: 1; }
}

/* Home specific Overrides */
[data-barba-namespace="home"] h1,
[data-barba-namespace="home"] p {
    color: var(--color-white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
[data-barba-namespace="home"] .btn {
    border-color: var(--color-white); color: var(--color-white);
}
[data-barba-namespace="home"] :focus-visible { outline-color: var(--color-white); }

/* =========================================
   5. PROJECT LIST (INDEX)
   ========================================= */
#bg-layer {
    position: fixed; top: 0; left: 0; 
    width: 100vw; height: 100vh;
    z-index: 0; /* Sits just above negative, below content */
    opacity: 0; pointer-events: none;
    background-size: cover; background-position: center;
    filter: invert(1) grayscale(100%) contrast(1.5); 
}

.list-container {
    width: 100%;
    padding-top: var(--header-spacing); 
    padding-bottom: 20vh;
    position: relative; z-index: 10;
}

/* UPDATED PROJECT ROW STYLES */
.project-row {
    display: flex; justify-content: space-between; align-items: baseline;
    width: 90%; max-width: 1400px; margin: 0 auto;
    padding: 3.5vh 0; /* Vertical breathing room */
    border-bottom: 1px solid var(--color-border);
    text-decoration: none; color: var(--color-black);
    pointer-events: auto; position: relative;
    
    /* Removed border-color from transition list so it doesn't animate if logic changes */
    transition: color 0.3s, opacity 0.3s;
}

.project-row:hover { 
    /* Removed the border-bottom color change */
    /* border-bottom: 1px solid var(--color-black); <--- DELETED */
    
    color: var(--color-black); /* Ensure text goes full black */
}

.list-container:hover .project-row { opacity: 0.4; }
.list-container:hover .project-row:hover { opacity: 1; }

.p-meta, .p-cat {
    font-size: 12px; width: 150px;
    font-family: var(--font-light);
    letter-spacing: 0.05em; opacity: 0.7;
    display: none; 
    opacity: 0;
}
/* Re-enable meta for desktop if desired */
@media (min-width: 769px) { .p-meta, .p-cat { display: block; } }

.p-title {
    font-size: 6vw; line-height: 0.9; letter-spacing: -0.02em;
    transform-origin: left center; will-change: transform; display: block; 
}
.p-cat { text-align: right; }

@media (max-width: 768px) {
    .p-title { font-size: 10vw; }
    .project-row { justify-content: center; text-align: center; }
    
}

/* =========================================
   6. ABOUT PAGE & MIND CANVAS
   ========================================= */
#mind-canvas {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: var(--z-negative);
    pointer-events: none; opacity: 0; 
}

.about-content-wrapper {
    position: relative; width: 100%;
    padding-top: var(--header-spacing);
    padding-bottom: 20vh; box-sizing: border-box;
}

.about-flow-text {
    position: relative; z-index: 1; 
    padding: 0 5%; max-width: 1400px; margin: 0 auto;
    font-family: var(--font-main);
    font-size: 6.5vw; line-height: 1.1; 
    color: rgba(79, 79, 79, 0.4);
    user-select: none; 
    display: flex; flex-wrap: wrap; align-items: baseline;
}

.about-flow-text span {
    display: inline-block; padding: 0 0.1em; margin: 0.1em 0.15em; 
    border-radius: 4px; cursor: default;
    will-change: color, background-color;
}

.trigger {
    cursor: pointer !important; 
    /* border-bottom: 2px solid currentColor; */
    position: relative; z-index: 10; pointer-events: auto;
    color: var(--color-black); transition: color 1s ease;
}

/* Ensure the redacted blocks show a pointer cursor */
.about-flow-text span.tech, 
.about-flow-text span.mind {
    cursor: pointer !important;
    pointer-events: auto !important;
}

.trigger[tabindex="0"]:focus-visible {
    outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px;
}
body.tech-visible .trigger:focus-visible { outline-color: var(--color-white); }

/* Coloring pattern for the 'tech' words */
.tech-visible span.tech:nth-child(4n + 1) { color: rgba(26, 26, 26, 0.85); }
.tech-visible span.tech:nth-child(4n + 2) { color: rgba(26, 26, 26, 0.65); }
.tech-visible span.tech:nth-child(4n + 3) { color: rgba(26, 26, 26, 0.45); }
.tech-visible span.tech:nth-child(4n + 4) { color: rgba(26, 26, 26, 0.25); }
.mind { opacity: 1; }

@media (max-width: 768px) {
    .about-flow-text { font-size: 8vw; padding: 0 1rem; }
}

/* =========================================
   7. SINGLE PROJECT DETAIL PAGES
   ========================================= */
#GScroll {
    padding: 0; width: 100%; position: relative; display: block; opacity: 1;
}
.header { padding: 0 var(--gutter); }

.main-content { 
    width: 100%; 
    padding-top: var(--header-spacing);
}

.text-block {
    padding: 0 var(--gutter);
    font-size: 4vw; line-height: 1.2;
    font-family: var(--font-main); font-weight: 300;
    max-width: 1200px; margin: 0 auto;
    box-sizing: border-box;
}

.text-block h1 {
    font-size: 5rem; margin-bottom: 0; font-weight: 100;
    color: var(--color-black); line-height: 1;
}

.text-block p {
    text-align: left; max-width: 100%;
    font-size: 2rem; line-height: 1.3;
    margin: 2.5rem 0;
    color: var(--color-text-muted);
}
.text-block p.intro { margin-top: 0.5rem; margin-bottom: 1.5rem; }
.text-block p.concept { margin-top: 3rem; }

a.launch_project {
    color: #f7f7f7; text-decoration: none;
    border-bottom: 1px solid #f7f7f7;
    padding-bottom: 2px; display: inline-block;
}

/* --- IMAGE GRIDS --- */
.image-container { display: grid; gap: 0; }
.two-images { grid-template-columns: repeat(2, 1fr); }
.three-images { grid-template-columns: repeat(3, 1fr); }
.image-container.black { background-color: #111; }

.image-container img, 
.image-container video {
    width: 100%; height: 100%; display: block; object-fit: cover;
}

video {
  pointer-events: none;
  background-color: #111;
}

html > div[style] {
  display: none !important;
}

.single-image-centered { text-align: center; }
.single-image-centered img { max-width: 85%; margin: 0 auto; }

/* Medium Screens / Tablet Landscape (769px to 1200px) */
@media (max-width: 1200px) {
    
    .text-block {
        max-width: 800px; 
    }

    /* 2. Font Size Adjustments */
    .text-block h1 { 
        font-size: 4rem; 
    }

    .text-block p { 
        font-size: 1.8rem;
        margin: 2rem 0;
        line-height: 1.4;
    }
}
/* ----------------------------- */

/* Responsive Text */
@media (max-width: 768px) {
    .text-block h1 { font-size: 3.5rem; }
    .text-block p { font-size: 1.5rem; }
}
@media (max-width: 500px) {
    .text-block { padding: 0 1rem; }
    .two-images, .three-images { grid-template-columns: 1fr; }
    .single-image-centered { padding: 2rem 0; }
    .text-block h1 { font-size: 2.8rem; }
}


@media (max-width: 768px) {
    .single-image-centered img{
        max-width: 100%;
    }
}

/* =========================================
   8. PROJECT NAVIGATION FOOTER
   ========================================= */
.project-nav-section {
    width: 100%; box-sizing: border-box;
    display: flex; flex-wrap: wrap;
    border-top: 1px solid var(--color-border);
}
.project-nav-section.border { border-top: 1px solid var(--color-border); }
.nav-project-link {
    flex: 1;
    text-decoration: none;
    color: var(--color-black);
    padding: 4rem 2rem;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative; /* Essential for ripple */
    overflow: hidden;    /* Essential for ripple */
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nav-project-link:hover {
    /* background-color: var(--color-black); color: var(--color-white); */
    cursor: pointer;
}

.nav-project-link.prev {
    border-right: 1px solid var(--color-border);
    align-items: flex-start; text-align: left;
}
.nav-project-link.next {
    align-items: flex-end; text-align: right;
}

.nav-label {
    display: block; font-family: var(--font-light);
    font-size: 14px; letter-spacing: 0.1em;
    text-transform: uppercase; margin-bottom: 1rem;
    opacity: 0.6; transition: opacity 0.3s;
}
.nav-project-link:hover .nav-label { opacity: 1; color: #999; }

.nav-title {
    display: block; font-family: var(--font-main);
    font-size: 5vw; line-height: 0.9;
    letter-spacing: -0.02em; white-space: nowrap; 
}

.nav-arrow {
    display: inline-block; font-size: 3vw;
    transition: transform 0.3s ease;
}
.nav-project-link.next .nav-arrow { margin-left: 15px; }
.nav-project-link.prev .nav-arrow { margin-right: 15px; }
.nav-project-link.next:hover .nav-arrow { transform: translateX(10px); }
.nav-project-link.prev:hover .nav-arrow { transform: translateX(-10px); }

/* Nav Stacking on Mobile */
@media (max-width: 600px) {
    .project-nav-section { flex-direction: column; }
  .nav-project-link {
        width: 100%; border-right: none !important;
        align-items: center !important; 
        text-align: center !important;
        display: flex;
        flex-direction: column;
        justify-content: center; 
        min-height: 200px; 
    }
      .nav-project-link.prev { border-bottom: 1px solid var(--color-border); }
    .nav-title { font-size: 10vw; white-space: normal; }
    .nav-arrow { font-size: 8vw; }
    .nav-project-link.prev .nav-arrow { margin-right: 10px; }
    .nav-project-link.next .nav-arrow { margin-left: 10px; }
}

/* =========================================
   9. LENIS SCROLL UTILITIES
   ========================================= */
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Fallback for devices needing native scroll */
body.native-scroll {
    overflow-y: auto !important; height: auto !important;
}
body.native-scroll #GScroll {
    position: relative !important; transform: none !important;
    height: auto !important; display: block !important;
}

[data-barba-namespace="home"] {
    /* Forces the container to fit the screen exactly, cutting off any overflow */
    height: 100vh;
    height: 100dvh; /* Modern mobile/safari fix */
    overflow: hidden;
}

/* Ensure the page container inside doesn't force expansion */
[data-barba-namespace="home"] .page-container {
    height: 100%;
    min-height: 0; 
    overflow: hidden;
}

/* =========================================
   VIDEO LOADER & OVERLAY SYSTEM
   ========================================= */

/* The wrapper we will inject via JS */
.video-wrapper {
    position: relative;
    width: 100%;
    
    /* 1. We remove height: 100% because it causes the collapse in grids */
    height: auto; 
    
    background-color: #000;
    overflow: hidden;

    /* 2. THIS IS THE FIX: Force the box to be square */
    aspect-ratio: 1 / 1; 
}
/* 2. THE VIDEO ELEMENT */
.video-wrapper video {
    position: absolute; /* Force it to sit inside the wrapper */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures it fills the square without stretching */
    display: block;
}
/* 3. LOADER & PLAY BUTTON UI (Same as before, just ensuring z-index) */
.loader-overlay,
.play-overlay-btn {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.3s ease;
}

.loader-overlay {
    background: rgba(0,0,0,0.1); 
    z-index: 5;
    pointer-events: none;
}

.play-overlay-btn {
    background: rgba(0,0,0,0.2);
    z-index: 10;
    cursor: pointer;
    display: none;
    opacity: 0;
}

/* SPINNER ANIMATION */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spinner-spin 1s linear infinite;
}
@keyframes spinner-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* BUTTON ICON */
.play-icon-shape {
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}
.play-icon-shape::after {
    content: ''; display: block; width: 0; height: 0;
    border-style: solid; border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent #1a1a1a;
    margin-left: 4px;
}
.play-overlay-btn:hover .play-icon-shape { transform: scale(1.1); }

/* STATE CLASSES */
.video-wrapper.is-ready .loader-overlay { opacity: 0; }
.video-wrapper.manual-play .play-overlay-btn { display: flex; opacity: 1; }

/* --- 1. RIPPLE CONFIGURATION (Refine these values) --- */
:root {
    --ripple-color:   rgba(26, 26, 26, 0.15); /* Color of the expanding circle */
    --ripple-speed:   0.6s;                   /* Duration of the animation */
    --ripple-scale:   4;                      /* How large it grows */
}

/* --- 2. UPDATED NAVIGATION (Subtle Slide) --- */
.menu-link {
    flex: 1; display: flex; align-items: center; justify-content: center;
    font-size: 10vw; color: var(--color-black); text-decoration: none;
    border-bottom: 1px solid var(--color-black);
    box-sizing: border-box;
    /* Subtle start position */
    transform: translateX(-130px); 
    opacity: 0;
    position: relative; /* Required for ripple */
    overflow: hidden;   /* Keeps ripple inside link */
}

/* Remove Hover Effects */
@media (hover: hover) { 
    .menu-link:hover, .nav-project-link:hover { background: transparent !important; } 
}

/* --- 3. RIPPLE ELEMENT STYLES --- */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: var(--ripple-color);
    transform: scale(0);
    pointer-events: none;
    width: 100px;
    height: 100px;
    margin-left: -50px;
    margin-top: -50px;
}

.ripple-animate {
    animation: ripple-out var(--ripple-speed) ease-out;
}

@keyframes ripple-out {
    from { transform: scale(0); opacity: 1; }
    to { transform: scale(var(--ripple-scale)); opacity: 0; }
}

.nav-project-link .ripple {
    background-color: var(--ripple-color);
}

.barba-leave-active {
    pointer-events: none;
}

#menu-overlay {
    /* Ensure the menu is definitely opaque so no content peeks through */
    background-color: var(--color-bg); 
    transition: none; /* We handle the fade with GSAP for better control */
}

/* Active State for Menu Links */
.menu-link.current-page {
    opacity: 0.3 !important; /* Greyed out */
    pointer-events: none;    /* Non-clickable */
    border-bottom-color: rgba(26,26,26, 0.3); /* Dim the line too */
}

/* =========================================
   10. CUSTOM UPDATES (Password & Audio)
   ========================================= */

/* --- H2 STYLING --- */
.text-block h2 {
    font-size: 3.5rem; /* Slightly smaller than the 5rem H1 */
    margin-bottom: 1rem;
    margin-top: 1rem;
    font-weight: 100;
    color: var(--color-black);
    line-height: 1;
}

.text-block h2.section_top{
        margin-top: 2.5rem;
}

/* --- PASSWORD OVERLAY --- */
#password-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: var(--color-bg);
    z-index: 2000; /* Above everything */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.password-container {
    text-align: center;
    font-family: var(--font-main);
}

.password-container h3 {
    font-size: 2rem;
    font-weight: 100;
    margin-bottom: 2rem;
}

#password-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-black);
    font-family: var(--font-main);
    font-size: 1.5rem;
    color: var(--color-black);
    text-align: center;
    width: 200px;
    outline: none;
    padding: 10px;
    border-radius: 0; /* Remove iOS defaults */
}

#password-submit {
    display: block;
    margin-top: 2rem;
    background: transparent;
    border: 1px solid var(--color-black);
    padding: 10px 30px;
    font-family: var(--font-light);
    text-transform: uppercase;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

#password-submit:hover {
    background: var(--color-black);
    color: var(--color-white);
}

.password-error {
    color: #ff3b30;
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
    font-family: var(--font-light);
}

/* --- AUDIO CONTROLS --- */
.audio-control {
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s ease, opacity 0.3s;
}

.audio-control:hover {
    border-bottom: 1px solid var(--color-black);
}

.audio-control.active {
    border-bottom: 1px solid var(--color-black);
    font-weight: 600; /* Visual feedback for playing */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .text-block h2 { font-size: 2.5rem; }
}

/* --- UPDATED LINK STYLE --- */
.link_standard,
.link_standard:visited,
.link_standard:hover,
.link_standard:active,
.link_standard:focus {
    text-decoration: none !important;
    border-bottom: 1px solid currentColor; /* Or solid blue if you want the border blue too */
    color: blue !important;
    cursor: pointer;
}
.link_end
{
    display: inline-block;
    margin-bottom: 1rem;
}

p.p_end{
    margin-bottom: 3rem;
}

/* --- NEW AUDIO PLAYER UI --- */
.audio-track-container {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-right: 25px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    user-select: none;
    font-size: 2rem;
}

.audio-track-container:hover {
    opacity: 1;
}

.audio-track-container.active {
    opacity: 1;
}

/* The Circle Button */
.audio-btn-circle {
    width: 32px;
    height: 32px;
    border: 1px solid #1a1a1a; /* Dark border */
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.audio-track-container.active .audio-btn-circle {
    background-color: #1a1a1a;
}

/* The Play Icon (Triangle) */
.audio-icon {
    width: 0; 
    height: 0; 
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid #1a1a1a; /* Dark arrow */
    margin-left: 2px; /* Visual centering */
    transition: all 0.2s ease;
}

/* The Stop Icon (Square) - triggers when active */
.audio-track-container.active .audio-icon {
    width: 8px;
    height: 8px;
    border: none;
    background-color: #ffffff; /* White stop square */
    margin-left: 0;
}

/* =========================================
   11. CHAT OVERLAY & BLUR
   ========================================= */
#chat-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 9999;
    
    /* GSAP will handle visibility/opacity */
    opacity: 0;
    visibility: hidden;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* REMOVED: transition: opacity 0.5s ease... */
}

#chat-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* THE BLUR LAYER */
.chat-backdrop {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    
    /* BLUR SETTINGS */
    backdrop-filter: blur(8px) grayscale(50%);
    -webkit-backdrop-filter: blur(8px) grayscale(50%);
    background-color: rgba(228, 228, 228, 0.4);
    
    /* START INVISIBLE */
    opacity: 0; 
}
.chat-modal-content {
    position: relative;
    z-index: 2001;
    width: 100%;
    max-width: 500px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    
    /* START INVISIBLE & SLIGHTLY LOWER */
    opacity: 0;
    transform: translateY(20px); 
}
.overlay-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent; /* Essential */
}

p.text-center{
    text-align: center;
}

#chat-close-btn {
    align-self: flex-end;
    margin-bottom: 10px;
    font-family: var(--font-light);
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--color-black);
    letter-spacing: 0.1em;
    padding: 5px 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

#chat-close-btn:hover {
    border: 1px solid var(--color-black);
    background-color: var(--color-black);
    color: var(--color-white);
}