/* --- CORE RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #000000; color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    overflow: hidden; 
    height: 100vh; 
    width: 100%; 
    max-width: 100%;
}
/* --- LOADER SYSTEM --- */
#site-loader {
    position: fixed; inset: 0; z-index: 11000;
    display: flex; justify-content: center; align-items: center;
    background: transparent; pointer-events: none;
}
.curtain-panel {
    position: absolute; top: 0; width: 51%; height: 100%;
    background: #000; z-index: 11001;
    transition: transform 2s cubic-bezier(0.7, 0, 0.3, 1);
    pointer-events: auto;
}
.curtain-panel.left { left: 0; transform-origin: top left; }
.curtain-panel.right { right: 0; transform-origin: top right; }
.loader-finished .curtain-panel.left { transform: translateX(-100%) skewX(-5deg); }
.loader-finished .curtain-panel.right { transform: translateX(100%) skewX(5deg); }

.loader-center-content { 
    position: relative; z-index: 11002; 
    display: flex; flex-direction: column; align-items: center; 
    opacity: 1; transition: opacity 0.8s ease;
}
.loader-finished .loader-center-content { opacity: 0; }
#loader-logo-evolving { width: 80px; margin-bottom: 20px; }
.loading-ui { width: 250px; text-align: center; }
.symmetrical-bar-container { 
    position: relative; width: 100%; height: 1px; 
    background: rgba(255, 255, 255, 0.1); margin: 15px 0; overflow: hidden; 
}
#loader-progress-center {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 0%; height: 100%; background: #4A90E2;
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* --- GLOBAL HEADER --- */
#global-header {
    position: fixed; top: 20px; left: 30px; z-index: 9999;
    display: flex; gap: 40px; align-items: center;
    opacity: 0; transition: opacity 1s ease; pointer-events: none;
}
.header-logo { display: flex; flex-direction: column; align-items: center; cursor: pointer; pointer-events: auto; }
.global-menu { display: flex; gap: 25px; pointer-events: auto; }
.global-menu a {
    color: #888; text-decoration: none; font-size: 0.75rem; letter-spacing: 2px;
    font-weight: 400; text-transform: uppercase; transition: all 0.3s ease;
}
.global-menu a:hover { color: #fff; text-shadow: 0 0 10px rgba(74, 144, 226, 0.8); }
.nav-logo-icon { width: 40px; margin-bottom: 5px; }

/* --- STAGE CONTAINERS --- */
.stage-ui {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: transform 1.5s ease-in-out, opacity 1.5s ease-in-out; pointer-events: none; opacity: 0;
}
.interactive { pointer-events: auto !important; }
.active-stage { opacity: 1 !important; pointer-events: auto !important; z-index: 1000 !important; }

/* --- HOME --- */
#stage-home { z-index: 70; background-color: #000; text-align: center; }
.home-logo { max-width: 250px; margin-bottom: 25px; }
.home-title { font-size: 1.4rem; font-weight: 300; letter-spacing: 6px; margin-bottom: 10px; color: #fff; }

/* TYPING EFFECT */
.dynamic-headline {
    font-family: 'Montserrat', sans-serif; font-size: 1rem; letter-spacing: 4px;
    text-transform: uppercase; color: #888; margin-bottom: 40px;
    height: 30px; width: 100%; display: grid; grid-template-columns: 55% 45%; 
    gap: 12px; align-items: center;
}
.static-prefix { text-align: right; }
.typing-wrapper { text-align: left; display: flex; align-items: center; }
.cursor { display: inline-block; width: 2px; height: 1.2em; background-color: #4A90E2; animation: blink 1s step-end infinite; margin-left: 5px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* --- SPLASH (UPDATED FOR TWO BUTTONS) --- */
#stage-splash { 
    z-index: 100; background-color: #000; opacity: 1; pointer-events: auto; 
    transform: scale(1.1); transition: transform 3s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.5s ease;
}
.loader-finished ~ #stage-splash { transform: scale(1); }

#splash-text-container {
    display: flex; flex-direction: column; align-items: center;
    transition: opacity 0.8s ease;
}

.splash-btn-row {
    display: flex; gap: 40px; margin-top: 30px;
}

.enter-main-btn {
    background: transparent; color: #fff; border: 1px solid #444; 
    padding: 15px 40px; letter-spacing: 3px; text-transform: uppercase; cursor: pointer;
    transition: all 0.4s ease;
}
.enter-main-btn:hover { border-color: #4A90E2; transform: translateY(-3px); box-shadow: 0 0 15px rgba(74, 144, 226, 0.3); }

.enter-main-btn.exp-btn:hover { border-color: #ff4444; box-shadow: 0 0 15px rgba(255, 68, 68, 0.3); }

/* --- PORTFOLIO --- */
#stage-portfolio {
    z-index: 55; 
    background-color: #000;
    overflow-y: auto; 
    scroll-snap-type: y mandatory; /* The snap magic */
    scroll-behavior: smooth;
    padding: 0; /* Removed the old padding */
    display: block;
}

/* Hide scrollbar for a clean, cinematic look */
#stage-portfolio::-webkit-scrollbar { width: 0; display: none; }
#stage-portfolio { -ms-overflow-style: none; scrollbar-width: none; }

.portfolio-section {
    width: 100%;
    height: 100vh; /* Lock to full screen height */
    scroll-snap-align: center; /* Snap exactly to the middle */
    scroll-snap-stop: always;
    display: flex;
    align-items: center; /* Vertically center the content */
    justify-content: center;
    margin: 0; 
    padding: 0 5%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05); /* Subtle divider */
}

.portfolio-grid {
    width: 100%;
    max-width: 1400px; /* Keep your cinematic width */
    margin: 0 auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 30px;
}

@media (min-width: 900px) {
    .portfolio-grid {
        display: grid;
        grid-template-columns: 350px 1fr;
        gap: 60px;
        align-items: center; /* Center the grid items vertically */
    }
}

/* Make the video/media feel like a monitor */
.project-media {
    position: relative;
    box-shadow: 0 20px 80px rgba(0,0,0,0.8); /* Deep shadow */
    transition: transform 0.5s ease;
}

.project-media:hover {
    transform: scale(1.01); /* Subtle breathing effect */
}
.audio-widget-container { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(74, 144, 226, 0.2); padding: 20px; border-radius: 8px; text-align: center; }
.mini-visualizer-box { width: 100%; height: 120px; background: #000; margin-bottom: 15px; border-radius: 4px; overflow: hidden; position: relative; }
.mini-viz { width: 100%; height: 100%; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 15px; }
.play-btn { background: none; border: 2px solid #4A90E2; color: #4A90E2; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: all 0.3s; }
.play-btn:hover { background: #4A90E2; color: #fff; }

.track-label { font-size: 0.7rem; letter-spacing: 2px; color: #888; margin-left: 10px; }
.review-quote { margin-top: 25px; padding-left: 20px; border-left: 2px solid #4A90E2; font-style: italic; color: #ccc; font-size: 0.95rem; line-height: 1.6; }
.review-quote cite { display: block; margin-top: 10px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #4A90E2; }

/* --- ABOUT --- */
#stage-about {
    z-index: 55; background-color: #000;
    overflow-y: auto; scroll-snap-type: y mandatory;
    display: block;
}
#stage-music {
    z-index: 55; background-color: #000;
    overflow-y: auto; scroll-snap-type: y mandatory;
    display: block;
}
#stage-music::-webkit-scrollbar { width: 4px; }
#stage-music::-webkit-scrollbar-thumb { background: #4A90E2; }
.about-section {
    width: 100%; height: 100vh;
    scroll-snap-align: start; scroll-snap-stop: always;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.about-section.reversed { flex-direction: row-reverse; }
.about-text { max-width: 600px; text-align: left; padding: 40px; margin-right: 5%; flex: 1; z-index: 2; }
.about-stencil { position: absolute; bottom: 0; left: 0; max-width: 35vw; mask-image: linear-gradient(to right, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%); z-index: 1;}

/* CLIENT WALL */
.client-wall-wrapper { margin-top: 40px; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, 0.1); width: 100%; }
.client-wall-title { font-size: 0.7rem; letter-spacing: 4px; text-transform: uppercase; color: #4A90E2; margin-bottom: 25px; opacity: 0.8; }
.client-logo-strip { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: flex-start; }
.client-logo { height: 70px; width: auto; filter: grayscale(100%) brightness(0) invert(1); opacity: 0.5; transition: all 0.3s ease; }
.client-logo:hover { opacity: 1; filter: grayscale(100%) brightness(0) invert(1) drop-shadow(0 0 5px rgba(255,255,255,0.5)); }

/* NOIRE VIDEO */
.noire-visual-wrapper { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; }
.noire-animation { max-width: 80%; height: auto; border-radius: 4px; box-shadow: 0 0 30px rgba(0,0,0,0.5); }

/* --- MEET THE QUARTET --- */
.quartet-section {
    flex-direction: column;
    gap: 36px;
    padding: 90px 40px 48px;
}
.quartet-header { text-align: center; z-index: 2; }
.quartet-title-row {
    display: flex; align-items: center; justify-content: center;
    gap: 22px;
}
.quartet-stencil {
    height: 3.4rem; width: auto; object-fit: contain;
    opacity: 0.92;
}
.quartet-header h2 {
    font-size: 2.5rem; letter-spacing: 6px; color: #fff; font-weight: 300;
}
.quartet-header p {
    font-size: 0.8rem; color: #888; letter-spacing: 2px; font-weight: 700;
    text-transform: uppercase; margin-top: 8px;
}

.quartet-columns {
    width: 100%; max-width: 1500px; flex: 1;
    display: flex; flex-direction: row; align-items: stretch;
    gap: 24px; min-height: 0;
}

/* ── Quartet tilt card ── */
.quartet-card {
    flex: 1;
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    background-color: #0a0a0a;
}

/* Image layer — always visible, darkened by default, lightens on hover */
.quartet-card .quartet-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 22px;
    filter: brightness(0.5);
    transition: filter 0.55s ease;
    z-index: 0;
}
.quartet-card:hover .quartet-bg { filter: brightness(1.05); }

/* gradient overlay for text legibility */
.quartet-card::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.05) 0%,
        rgba(0,0,0,0.45) 60%,
        rgba(0,0,0,0.8) 100%
    );
    border-radius: 22px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.55s ease;
}
.quartet-card:hover::after { opacity: 1; }

/* corner bracket */
.quartet-card .quartet-corner {
    position: absolute; top: 24px; left: 24px;
    width: 18px; height: 18px;
    border-top: 1px solid rgba(255,255,255,0.3);
    border-left: 1px solid rgba(255,255,255,0.3);
    transition: border-color 0.25s ease, width 0.3s ease, height 0.3s ease;
    z-index: 3;
}
.quartet-card:hover .quartet-corner {
    border-color: #4A90E2;
    width: 28px; height: 28px;
}

/* index number */
.quartet-card .quartet-index {
    position: absolute; top: 24px; right: 24px;
    font-size: 0.6rem; letter-spacing: 0.2em;
    color: rgba(255,255,255,0.4);
    transition: color 0.25s ease, opacity 0.4s ease;
    opacity: 0;
    z-index: 3;
}
.quartet-card:hover .quartet-index { color: #4A90E2; opacity: 1; }

/* main title (name) */
.quartet-card .quartet-title {
    position: absolute; bottom: 44px; left: 24px; right: 24px;
    font-size: clamp(1.6rem, 2.4vw, 2.6rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 0.95;
    font-family: 'Montserrat', sans-serif;
    color: rgba(255,255,255,0.0);
    transition: color 0.3s ease, bottom 0.4s ease;
    z-index: 3;
}
.quartet-card:hover .quartet-title { color: #fff; bottom: 48px; }

/* subtitle (instrument) */
.quartet-card .quartet-sub {
    position: absolute; bottom: 24px; left: 24px;
    font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(255,255,255,0.0);
    transition: color 0.3s ease, opacity 0.4s ease;
    opacity: 0;
    z-index: 3;
}
.quartet-card:hover .quartet-sub { color: rgba(74,144,226,0.85); opacity: 1; }

/* VanillaTilt glare layer */
.quartet-card .js-tilt-glare { z-index: 2 !important; border-radius: 22px; }

/* --- MUSIC FOR STRINGS (loader-tunnel reactive visualizer) --- */
.strings-section {
    flex-direction: column;
    gap: 40px;
    padding: 90px 40px 60px;
    background-color: #000;
}
.strings-viz-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}
.strings-header { text-align: center; z-index: 2; }
.strings-header h2 {
    font-size: 2.5rem; letter-spacing: 6px; color: #fff; font-weight: 300;
}
.strings-header p {
    font-size: 0.8rem; color: #888; letter-spacing: 2px; font-weight: 700;
    text-transform: uppercase; margin-top: 8px;
}

.strings-player-box {
    position: relative; z-index: 2;
    width: 100%; max-width: 680px;
    display: flex; flex-direction: row; align-items: center; gap: 28px;
    padding: 22px 26px;
    background: rgba(8, 10, 14, 0.55);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.55);
}
.strings-album-art {
    width: 92px; height: 92px; flex-shrink: 0;
    border-radius: 10px; object-fit: cover;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
}
.strings-controls-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.strings-track-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; }
.strings-track-header h3 {
    font-size: 1.05rem; color: #fff; font-weight: 600;
    letter-spacing: 3px; text-transform: uppercase;
}
.strings-track-header p { font-size: 0.7rem; color: #888; letter-spacing: 1px; margin-top: 3px; }
#strings-time-display { font-size: 0.75rem; color: #4A90E2; font-family: 'Courier New', monospace; }

.strings-progress-container {
    width: 100%; height: 4px; background: rgba(255,255,255,0.12);
    border-radius: 4px; overflow: hidden; cursor: pointer; margin-bottom: 18px;
}
#strings-progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #4A90E2, #00d2ff);
    transition: width 0.1s linear;
}

.strings-playback-controls { display: flex; align-items: center; gap: 22px; }
.strings-playback-controls button {
    background: none; border: none; color: #aaa; cursor: pointer;
    font-size: 1rem; transition: color 0.25s ease;
}
.strings-playback-controls button:hover { color: #fff; }
.strings-playback-controls .strings-play-btn {
    width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid #4A90E2; color: #4A90E2;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.strings-playback-controls .strings-play-btn:hover {
    background: #4A90E2; color: #000; box-shadow: 0 0 18px rgba(74,144,226,0.45);
}

#stage-about::-webkit-scrollbar { width: 4px; }
#stage-about::-webkit-scrollbar-thumb { background: #4A90E2; }/* --- VISION MANIFESTO --- */
#stage-vision {
    background-color: #000;
    overflow: hidden; /* Hide outer scrollbars */
}

.vision-scroller {
    height: 100vh;
    width: 100%;
    overflow-y: scroll; /* Allow internal scrolling */
    scroll-snap-type: y mandatory; /* The snap magic */
    scroll-behavior: smooth;
}

/* Hide scrollbar for the vision scroller */
.vision-scroller::-webkit-scrollbar { width: 0; display: none; }
.vision-scroller { -ms-overflow-style: none; scrollbar-width: none; }

.vision-panel {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 10%;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Alternate styling for visual rhythm */
.vision-panel.inverted {
    background: #0a0a0a;
}

.vision-content {
    z-index: 2;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: riseUp 1.5s forwards;
    max-width: 900px;
}

@keyframes riseUp {
    to { opacity: 1; transform: translateY(0); }
}

.vision-statement {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 8px;
    line-height: 1.4;
    color: #ccc;
    margin-bottom: 20px;
}

.vision-statement .highlight {
    color: #fff;
    font-weight: 600;
    text-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
}

.vision-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: #4A90E2;
    text-transform: uppercase;
    margin-top: 30px;
    position: relative;
    display: inline-block;
}

/* Decorative line under sub-text */
.vision-sub::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: #4A90E2;
    margin: 15px auto 0 auto;
}

/* Background Image Placeholder Styles */
.vision-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.15;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) contrast(120%);
    pointer-events: none;
}

/* You can map specific images here if you upload them later */
.vision-panel:nth-child(1) .vision-bg-overlay {
    /* background-image: url('images/vision_abstract_1.jpg'); */
    background: radial-gradient(circle at center, #222, #000); 
}
.vision-panel:nth-child(2) .vision-bg-overlay {
    /* background-image: url('images/vision_abstract_2.jpg'); */
    background: linear-gradient(45deg, #000 25%, #111 50%, #000 75%);
}

/* --- CONTACT STAGE (THE MONOLITH CARD) --- */
/* --- HOME WebGL drag hint (mobile only) --- */
.home-hint {
    position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%);
    z-index: 30; pointer-events: none; display: none;
    flex-direction: column; align-items: center; gap: 12px;
    color: rgba(255,255,255,0.92); font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem; letter-spacing: 3px; text-transform: uppercase; text-align: center;
    text-shadow: 0 0 12px rgba(0,0,0,0.85);
}
.home-hint i { font-size: 1.7rem; color: #4A90E2; animation: hintSwipe 2s infinite ease-in-out; }
@keyframes hintSwipe {
    0%, 100% { transform: translateX(-14px) rotate(-8deg); }
    50%      { transform: translateX(14px) rotate(8deg); }
}
@keyframes homeHintInOut {
    0%   { opacity: 0; transform: translateX(-50%) translateY(12px); }
    14%  { opacity: 1; transform: translateX(-50%) translateY(0); }
    80%  { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(0); }
}
@media (max-width: 768px), (pointer: coarse) {
    .home-hint.show { display: flex; animation: homeHintInOut 5s ease forwards; }
}

#stage-contact {
    background-color: #000;
    z-index: 60;
}

.contact-container {
    width: 90%; max-width: 550px; /* Slightly narrower for elegance */
    padding: 60px 50px; /* More breathing room */

    /* The "Glass Monolith" Look */
    background: rgba(5, 5, 5, 0.85); 
    backdrop-filter: blur(20px); /* Heavy blur to feel physical */
    border: 1px solid rgba(255, 255, 255, 0.08); /* Ultra-subtle edge */
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

/* Optional: Top Highlight for depth */
.contact-container::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.5), transparent);
    opacity: 0.5;
}

.contact-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem; letter-spacing: 8px; font-weight: 300;
    margin-bottom: 15px; color: #fff; text-transform: uppercase; text-align: center;
}

.contact-sub {
    text-align: center; color: #555; font-size: 0.7rem; letter-spacing: 3px;
    margin-bottom: 50px; text-transform: uppercase;
}

/* --- THE "STEALTH" CURRENCY SWITCHER --- */
.currency-switcher {
    display: flex;
    justify-content: center; /* Center them like a navigation rail */
    gap: 30px; /* More space between items */
    margin: 20px 0 40px 0;
    position: relative;
}

/* Hide the radio circles */
.currency-switcher input[type="radio"] { display: none; }

/* The Labels: No Boxes, Just Data */
.currency-switcher label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem !important;
    font-weight: 600;
    color: #444 !important; /* Start dark/inactive */
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 5px 0;
    position: relative;
    border: none !important; /* KILL THE BOX */
    background: transparent !important; /* KILL THE BACKGROUND */
    box-shadow: none !important;
}

/* Hover State: Subtle brightness */
.currency-switcher label:hover {
    color: #888 !important;
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

/* The "Ignited" Active State */
.currency-switcher input[type="radio"]:checked + label {
    color: #4A90E2 !important;
    text-shadow: 0 0 15px rgba(74, 144, 226, 0.8);
    transform: scale(1.1); /* Slight zoom */
}

/* The Futuristic Underline Dot */
.currency-switcher input[type="radio"]:checked + label::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px;
    background-color: #4A90E2;
    border-radius: 50%;
    box-shadow: 0 0 10px #4A90E2;
}

/* --- INPUT FIELDS & DROPDOWNS --- */
.input-group { position: relative; margin-bottom: 40px; }

/* The Label (Top small text) */
.input-group label {
    position: absolute; top: 0; left: 0;
    font-size: 0.6rem; color: #4A90E2; letter-spacing: 2px;
    text-transform: uppercase; opacity: 0.7;
    transition: 0.3s ease;
    pointer-events: none; /* Let clicks pass through to the input */
}

/* Base Style for ALL Inputs */
input, select, textarea {
    width: 100%; 
    background: transparent;
    border: none; 
    border-bottom: 1px solid #333; /* Darker, subtler passive border */

    /* THE COLOR FIX: Start with a sophisticated metallic grey, not pure white */
    color: #999; 

    font-family: 'Montserrat', sans-serif; 
    font-size: 0.95rem;
    padding: 10px 0; margin-top: 15px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth physics */
    border-radius: 0;
}

/* Placeholder text color (for text inputs) */
::placeholder { color: #444; opacity: 1; }

/* --- THE INTERACTION (Focus/Hover) --- */
input:focus, select:focus, textarea:focus,
input:hover, select:hover, textarea:hover {
    outline: none;
    border-bottom: 1px solid #4A90E2; /* Blue ignites on interaction */
    color: #fff; /* Text brightens to white only when active */
    box-shadow: 0 10px 20px -10px rgba(74, 144, 226, 0.1);
}

/* --- DROPDOWN SPECIFICS (The Bug Fix) --- */
select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    cursor: pointer;
    border-radius: 0; /* Fix for some mobile browsers */
}

/* The actual list of options when clicked */
select option {
    background-color: #050505; /* Deep black background */
    color: #ccc; /* Silver text */
    padding: 15px;
    font-family: 'Inter', sans-serif; /* Tech font for data */
}

/* Custom Arrow Styling */
.input-group.select-group::after {
    content: '▼'; 
    font-size: 0.5rem; 
    color: #4A90E2;
    position: absolute; 
    right: 0; 
    bottom: 15px; 
    pointer-events: none; 
    transition: transform 0.3s ease;
    opacity: 0.7;
}

/* Rotate arrow when focused (Nice touch) */
.input-group.select-group:focus-within::after {
    transform: rotate(180deg);
    color: #fff;
}

/* --- THE TRANSMIT BUTTON (Redesigned) --- */
#submit-btn {
    border: 1px solid rgba(74, 144, 226, 0.3);
    background: linear-gradient(180deg, rgba(74,144,226,0), rgba(74,144,226,0.05));
    letter-spacing: 4px; font-size: 0.8rem;
    transition: all 0.5s ease;
}

#submit-btn:hover {
    background: rgba(74, 144, 226, 0.1);
    border-color: #4A90E2;
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.15);
    letter-spacing: 6px; /* Text expands on hover */
}

/* Fade in animation (used by header / title / headline) */
@keyframes fadeInHeader { to { opacity: 1; } }

/* --- DEV PANEL (shared row styles, reused by the mobile panel) --- */
.dp-group { margin-bottom: 16px; }
.dp-title { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: #444; border-bottom: 1px solid #141414; padding-bottom: 4px; margin-bottom: 8px; font-family: 'Courier New', monospace; }
.dp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.dp-row label { font-size: 10px; color: #666; min-width: 100px; white-space: nowrap; font-family: 'Courier New', monospace; }
.dp-row input[type=range] { flex: 1; accent-color: #4A90E2; height: 2px; cursor: pointer; }
.dp-val { font-size: 10px; color: #4A90E2; min-width: 42px; text-align: right; font-family: 'Courier New', monospace; }


/* --- NAV: active page highlight --- */
.global-menu a { display: inline-block; }   /* needed so the magnetic transform applies */
.global-menu a.active { color: #fff; text-shadow: 0 0 12px rgba(74,144,226,0.9); }
.global-menu a.active::after {
    content: ''; display: block; height: 1px; margin-top: 4px;
    background: #4A90E2; box-shadow: 0 0 8px rgba(74,144,226,0.8);
}

/* --- TEMP MOBILE DEV PANEL (collapsible) --- */
#mobile-dev {
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 9000;
    max-width: 440px; margin: 0 auto;
    background: rgba(8,8,8,0.96); border: 1px solid #1a1a1a; border-radius: 8px;
    font-family: 'Courier New', monospace; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
#mobile-dev .mdev-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 14px; cursor: pointer; user-select: none;
    border-bottom: 1px solid #1a1a1a;
}
#mobile-dev .mdev-head .mdev-title { font-size: 10px; letter-spacing: 3px; color: #4A90E2; text-transform: uppercase; }
#mobile-dev .mdev-chevron { color: #555; font-size: 11px; transition: transform 0.3s ease; }
#mobile-dev .mdev-body { padding: 12px 14px 14px; max-height: 52vh; overflow-y: auto; }
#mobile-dev.collapsed .mdev-body { display: none; }
#mobile-dev.collapsed .mdev-head { border-bottom: none; }
#mobile-dev.collapsed .mdev-chevron { transform: rotate(180deg); }
#mobile-dev .dp-row label { min-width: 80px; font-size: 9px; }
#mobile-dev .mdev-body::-webkit-scrollbar { width: 3px; }
#mobile-dev .mdev-body::-webkit-scrollbar-thumb { background: #222; }
/* --- HAMBURGER (desktop: hidden) --- */
.nav-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 34px; height: 28px; padding: 4px; position: relative; z-index: 10000;
    pointer-events: auto;
}
.nav-toggle span {
    display: block; width: 100%; height: 2px; margin: 5px 0; background: #cfcfcf;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* --- PIANO MUSIC WIDGET --- */
.piano-section {
    flex-direction: column !important; 
    justify-content: center;
}
.piano-wrapper {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    z-index: 10;
}
.piano-header {
    margin-bottom: 25px;
}
.piano-header h2 {
    font-size: 2.5rem; letter-spacing: 6px; color: #fff; font-weight: 300;
}
.piano-header p {
    font-size: 0.8rem; color: #888; letter-spacing: 2px; font-weight: 700; text-transform: uppercase; margin-top: 5px;
}
.piano-widget-container {
    position: relative;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 25px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
}
.piano-viz-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0.8; pointer-events: none;
    filter: blur(0.5px);
}
.piano-content {
    position: relative; z-index: 10;
    display: flex; gap: 30px; width: 100%; align-items: center;
}
.piano-album-art {
    width: 120px; height: 120px; border-radius: 4px; object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.piano-controls-wrapper {
    flex-grow: 1; display: flex; flex-direction: column; justify-content: center;
}
.piano-track-header {
    display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 15px;
}
.piano-track-header h3 {
    font-size: 1.2rem; letter-spacing: 4px; margin-bottom: 5px; color: #fff; text-transform: uppercase;
}
.piano-track-header p {
    font-size: 0.7rem; color: #666; letter-spacing: 1.5px;
}
#piano-time-display {
    font-size: 0.75rem; color: #666; font-family: 'Courier New', monospace; letter-spacing: 1px;
}
.piano-progress-container {
    width: 100%; height: 3px; background: #222; border-radius: 2px; cursor: pointer; margin-bottom: 20px; overflow: hidden;
}
#piano-progress-bar {
    height: 100%; width: 0%; background: #4A90E2; transition: width 0.1s linear;
}
.piano-playback-controls {
    display: flex; align-items: center; gap: 25px;
}
.piano-playback-controls button {
    background: none; border: none; color: #666; cursor: pointer; transition: 0.3s; font-size: 1rem;
}
.piano-playback-controls button:hover { color: #fff; }
.piano-play-btn {
    width: 45px; height: 45px; border-radius: 50%; border: 1px solid #4A90E2 !important;
    display: flex; align-items: center; justify-content: center; color: #4A90E2 !important;
}
.piano-play-btn:hover {
    background: #4A90E2 !important; color: #000 !important; box-shadow: 0 0 15px rgba(74,144,226,0.4);
}

/* sin-wave play/pause icon (matches the experience player) */
.strings-play-btn .wave-svg,
.piano-play-btn .wave-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.strings-play-btn .wave-path,
.piano-play-btn .wave-path { stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; fill: none; }

@media (max-width: 768px) {
    .piano-content { flex-direction: column; text-align: center; gap: 20px; }
    .piano-track-header { flex-direction: column; align-items: center; gap: 10px; }
    .piano-playback-controls { justify-content: center; }
}

/* ====================== MOBILE ====================== */
@media (max-width: 768px) {
    /* Header: full-width bar, logo left + hamburger right */
    #global-header {
        top: 0; left: 0; right: 0; width: 100%;
        padding: 12px 18px; gap: 0; justify-content: space-between;
        background: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0));
    }
    .nav-logo-icon { width: 30px; margin-bottom: 2px; }
    .nav-text { font-size: 0.55rem; letter-spacing: 2px; }
    .nav-toggle { display: block; }

    /* Menu -> full-screen slide-in overlay */
    .global-menu {
        position: fixed; inset: 0;
        flex-direction: column; justify-content: center; align-items: center; gap: 30px;
        background: rgba(0,0,0,0.97); backdrop-filter: blur(8px);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.23,1,0.32,1);
        z-index: 9990; pointer-events: auto;
    }
    .global-menu.open { transform: translateX(0); }
    .global-menu a { font-size: 1.05rem; letter-spacing: 4px; color: #ddd; }
    .global-menu a.active::after { margin: 6px auto 0; width: 30px; }

    /* HOME: lift the title; the "COMPOSING FOR" line is hidden on mobile */
    #home-title { top: 60px !important; }
    #home-title span { font-size: 1.5rem !important; letter-spacing: 0.3em !important; margin-right: -0.3em !important; }
    #home-headline { display: none !important; }

    /* ABOUT: stack vertically */
    .about-section { height: auto; min-height: 100vh; flex-direction: column !important; padding: 90px 22px 60px; text-align: center; }
    .about-section.reversed { flex-direction: column !important; }
    .about-text { padding: 18px 0; margin-left: 0 !important; margin-right: 0 !important; max-width: 100%; text-align: center; }
    .about-stencil { position: relative; max-width: 78vw; margin: 18px auto 0; mask-image: none; -webkit-mask-image: none; }

    /* TRUSTED BY: tidy 2-over-3 logo grid */
    .client-wall-wrapper { margin-top: 30px; padding-top: 22px; }
    .client-logo-strip {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 22px 14px;
        justify-items: center; align-items: center;
        max-width: 340px; margin: 0 auto;
    }
    .client-logo-strip > a {
        width: 100%; height: 46px;
        display: flex; align-items: center; justify-content: center;
    }
    .client-logo-strip > a:nth-child(1),
    .client-logo-strip > a:nth-child(2) { grid-column: span 3; }   /* top row: 2 logos */
    .client-logo-strip > a:nth-child(3),
    .client-logo-strip > a:nth-child(4),
    .client-logo-strip > a:nth-child(5) { grid-column: span 2; }   /* bottom row: 3 logos */
    .client-logo { height: 100%; width: 100%; max-height: 46px; object-fit: contain; }

    /* QUARTET MOBILE — 2x2 grid, names always readable */
    .quartet-section { padding: 90px 18px 50px; gap: 24px; }
    .quartet-header h2 { font-size: 1.8rem; letter-spacing: 4px; }
    .quartet-title-row { gap: 14px; }
    .quartet-stencil { height: 2.4rem; }
    .quartet-columns {
        flex-direction: row; flex-wrap: wrap; gap: 14px;
        max-width: 100%;
    }
    .quartet-card { flex: 1 1 calc(50% - 14px); min-height: 220px; }
    .quartet-card .quartet-bg { filter: brightness(0.6); }
    .quartet-card .quartet-title { color: #fff; font-size: 1.2rem; bottom: 40px; }
    .quartet-card .quartet-sub { color: rgba(74,144,226,0.85); opacity: 1; }
    .quartet-card .quartet-index { opacity: 1; }

    /* STRINGS MOBILE */
    .strings-section { padding: 90px 18px 50px; gap: 28px; }
    .strings-header h2 { font-size: 1.8rem; letter-spacing: 4px; }
    .strings-player-box {
        flex-direction: column; text-align: center; gap: 18px;
        max-width: 100%; padding: 22px 18px;
    }
    .strings-track-header { width: 100%; }
    .strings-playback-controls { justify-content: center; }

    /* PORTFOLIO MOBILE REFINE */
    #stage-portfolio { 
        padding: 0; 
    }
    .portfolio-section { 
        height: auto; 
        min-height: 100vh; 
        margin-bottom: 0; 
        padding: 100px 14px 60px; /* Give breathing room under the header */
        scroll-snap-align: start; /* Snap to the top so they can scroll down to read */
    }
    
    /* Unleash the inner sub-elements to be ordered together */
    .portfolio-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .project-details, .project-media {
        display: contents !important;
    }

    /* ── 1. GLOBAL ELEMENT ORDERING ── */
    .portfolio-grid h2 { order: 1; text-align: left; margin-bottom: 0; }
    .portfolio-grid p { order: 2; text-align: left; margin-bottom: 10px !important; }
    
    /* Videos */
    .project-media > div:first-child { order: 3; width: 100%; }
    .project-media > div:nth-child(2) { order: 4; margin-top: -5px; margin-bottom: 10px; }
    
    /* Quotes */
    .portfolio-grid blockquote:nth-of-type(1) { order: 5; margin-top: 10px; margin-bottom: 15px; }
    
    /* Audio widget player */
    .portfolio-grid .audio-widget-container { order: 6; margin-bottom: 15px; width: 100%; }
    
    /* Second quotes (only applies to items with two quotes like LOT) */
    .portfolio-grid blockquote:nth-of-type(2) { order: 7; margin-top: 10px; margin-bottom: 25px; }
    
    /* Client/Partner Logo Boxes */
    .project-details > div { 
        order: 8; 
        margin-top: 15px !important; 
        padding-left: 0 !important;
        display: flex;
        justify-content: space-between; /* Space elements evenly on the left and right */
        align-items: center;
        width: 100%;
    }

    /* 2. BIGGER & EVENLY SPACED CLIENT ICONS */
    .project-details > div a {
        display: inline-block;
        flex: 1;
        text-align: center;
    }
    /* Snap the first one left, second one right */
    .project-details > div a:first-child { text-align: left; }
    .project-details > div a:last-child { text-align: right; }

    .project-details > div .client-logo {
        height: 48px !important; /* Significantly increased scale from original size on mobile */
        width: auto;
        opacity: 0.8;
    }

    /* 3. CORRECTIONS (ŁÓŻKO ROZWODOWE) */
    .project-media > img {
        order: 3;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin-bottom: 15px;
    }
    /* VISION */
    .vision-statement { font-size: 1.45rem !important; }
    .vision-content { padding: 24px !important; }

    /* CONTACT — let the whole panel scroll so the form (incl. Transmit) is fully reachable */
    #stage-contact {
        justify-content: flex-start;
        align-items: center;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding: 88px 16px 48px;   /* clear the fixed header; room at the bottom */
    }
    /* flex-shrink:0 stops the column layout from squashing the box and clipping the lower fields */
    .contact-container { width: 92%; padding: 38px 20px; flex-shrink: 0; }
    .contact-title { font-size: 1rem; letter-spacing: 5px; }
    .contact-sub { margin-bottom: 28px; }

    /* Dev panel */
    #mobile-dev { left: 8px; right: 8px; bottom: 8px; }

    /* MOBILE BUG FIXES */

    /* 1. Splash Screen Buttons: Stack vertically */
    .splash-btn-row {
        flex-direction: column !important;
        gap: 15px !important;
        width: 100%;
        padding: 0 20px;
    }
    .enter-main-btn {
        width: 100%; /* Makes the buttons equal width on mobile */
    }

    /* 2. Homepage "COMPOSING FOR" line — hidden on mobile */
    #home-headline { display: none !important; }

    /* 3. Visualizer Warp Fix: Stop grid from stretching the box vertically */
    .portfolio-grid .audio-widget-container {
        align-self: start !important; 
    }

    /* 4. Client Logos: Dead center and evenly spaced */
    .project-details > div {
        justify-content: center !important;
        gap: 35px !important; /* Space between the two icons */
    }
    .project-details > div a {
        flex: 0 1 auto !important; /* Stops them from expanding to the edges */
    }
    .project-details > div a:first-child,
    .project-details > div a:last-child {
        text-align: center !important; /* Overrides the left/right split */
    }
    /* 5. Fix Łóżko Rozwodowe Quote Ordering (It's a div, not a blockquote) */
    .portfolio-grid .review-quote {
        order: 5;
        margin-top: 10px;
        margin-bottom: 15px !important;
        width: 100%;
    }

    /* 6. Hard-lock the Audio Visualizer dimensions to prevent Canvas warping */
    .portfolio-grid .audio-widget-container {
        order: 6; 
        width: 100% !important;
        height: auto !important;
        align-self: center !important; /* Prevents vertical stretching */
        display: block !important;
    }
    
    .portfolio-grid .mini-visualizer-box {
        width: 100% !important;
        height: 120px !important; /* Locks the box so the canvas draws perfectly */
        display: block !important;
    }

}