/* 
 * KUBIK PRINT - TITAN THEME
 * Premium Industrial Aesthetic
 */

:root {
    /* Palette - Dark Industrial */
    --obsidian: #050505;
    --charcoal: #121212;
    --charcoal-light: #1E1E1E;

    --walnut: #5D4037;
    --walnut-dark: #3E2723;
    --oak: #8D6E63;

    --silver: #E0E0E0;
    --silver-dim: #9E9E9E;

    --gold: #C5A065;
    --gold-light: #E6C68C;
    --gold-dark: #8F7244;

    /* Functional Colors */
    --success: #4CAF50;
    --error: #F44336;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Animation */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    height: 100%;
    scrollbar-color: var(--walnut) var(--obsidian);
    scrollbar-width: thin;
}

.secondary-contact-field {
    display: none;
}

body {
    background-color: var(--obsidian);
    color: var(--silver);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
button,
.oswald {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

p,
label,
input,
textarea {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

/* --- LAYOUT --- */
.main-container {
    display: flex;
    height: 100%;
    width: 100%;
    opacity: 0;
    animation: fadeIn 1.5s var(--ease-out) forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* --- LEFT PANEL: IDENTITY (HERO) --- */
.panel-left {
    flex: 6;
    background: radial-gradient(ellipse at 50% 35%, #1a1815 0%, #0a0a0a 50%, #050505 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: var(--space-lg);
    border-right: 1px solid rgba(93, 64, 55, 0.5);
    overflow: hidden;
    z-index: 5;
}

/* Decorative Lines */
.grid-line {
    position: absolute;
    background-color: var(--walnut);
    opacity: 0.15;
    transition: opacity 1s ease;
}

.gl-v { top: 0; bottom: 0; width: 1px; left: 15%; }
.gl-h { left: 0; right: 0; height: 1px; top: 20%; }

.brand-wrapper {
    text-align: center;
    max-width: 600px;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 1s var(--ease-out) 0.5s forwards;
}

@keyframes slideUp {
    to { transform: translateY(0); opacity: 1; }
}

.logo-container {
    margin-bottom: var(--space-md);
    perspective: 1000px;
}

.logo-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.5s ease;
}

.logo-img:hover {
    transform: rotateX(5deg) rotateY(5deg);
}

h1.main-title {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--silver);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: var(--space-sm);
    background: linear-gradient(to right, var(--silver), #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Scroll Indicator (Hidden on Desktop) */
.scroll-indicator {
    display: none;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.6;
    animation: bounce 2s infinite;
}

.scroll-text {
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--oak);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--oak), transparent);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* --- RIGHT PANEL: INTERFACE --- */
.panel-right {
    flex: 4;
    background-color: var(--charcoal);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Language Switcher */
.lang-switch {
    position: absolute;
    top: 2rem;
    right: var(--space-lg);
    z-index: 10;
    display: flex;
    gap: 1rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--silver-dim);
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.1em;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}

.lang-btn:hover { color: var(--gold); }
.lang-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

/* Form Area */
.form-container {
    flex-grow: 1;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 2;
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    transform: translateX(20px);
    opacity: 0;
    animation: slideLeft 1s var(--ease-out) 0.8s forwards;
    overflow-y: auto;
    max-height: 100vh;
}

/* Custom scrollbar */
.form-container { scrollbar-width: thin; scrollbar-color: var(--walnut) transparent; }
.form-container::-webkit-scrollbar { width: 6px; }
.form-container::-webkit-scrollbar-track { background: transparent; }
.form-container::-webkit-scrollbar-thumb { background: var(--walnut); border-radius: 3px; }
.form-container::-webkit-scrollbar-thumb:hover { background: var(--gold); }

@keyframes slideLeft {
    to { transform: translateX(0); opacity: 1; }
}

h2.form-title {
    color: var(--silver);
    font-size: 1.8rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 960px) {
    .main-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
    }

    /* HERO MODE for Left Panel */
    .panel-left {
        width: 100%;
        height: 100vh; /* Full viewport height */
        padding: 2rem;
        border-right: none;
        border-bottom: 1px solid var(--gold);
        justify-content: center;
        /* Re-enable decorative lines or keep clean? Clean is better. */
    }
    
    .gl-v, .gl-h { display: none; }

    .brand-wrapper {
        margin-top: 0;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .logo-img { max-width: 220px; }
    
    h1.main-title {
        font-size: 3rem;
        margin-top: 1rem;
    }
    
    .logo-container { perspective: none; }
    .logo-img:hover { transform: none; }

    /* Show Scroll Indicator */
    .scroll-indicator { display: flex; }

    /* RIGHT PANEL (Content) */
    .panel-right {
        width: 100%;
        height: auto;
        min-height: auto;
        background: var(--charcoal);
        overflow: visible;
    }

    /* Move Lang Switcher to Hero (Visually) via fixed/absolute positioning hacks 
       OR just absolute position it relative to the first relative parent.
       Actually, since it's in panel-right, it will be in the second section.
       User wants it in Hero.
       Solution: We can't easily move it DOM-wise with CSS only unless we use fixed.
       Let's use Fixed for mobile to keep it always accessible, or absolute in panel-right (standard flow).
       User asked for "premium lood full viewport hero...". 
       Let's try absolute positioning in panel-right but push it UP? No, that's messy.
       Let's just keep it at the top of the Form section (Panel Right).
       It acts as the header for the "Task" phase.
    */
    .lang-switch {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
    }

    .form-container {
        padding: 4rem 1.5rem; /* More top padding for the lang switch */
        margin: 0;
        opacity: 1;
        transform: none;
        animation: none;
        background: transparent;
        backdrop-filter: none;
        border: none;
        max-height: none;
        overflow: visible;
    }
    
    h2.form-title { font-size: 1.6rem; }

    /* Footer adjustments */
    .footer-info {
        display: flex;
        flex-direction: column;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding: 0;
    }
    
    .contact-item {
        width: 100%;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding: 1.5rem 2rem;
        align-items: flex-start;
        text-align: left;
    }

    .contact-item:last-child {
        border-bottom: none !important;
    }
}

/* Floating Inputs */
.input-group {
    margin-bottom: 2rem;
    position: relative;
}

.input-field {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--silver-dim);
    color: var(--silver);
    padding: 10px 0;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-radius: 0;
}

.input-field:focus {
    outline: none;
    border-bottom-color: var(--gold);
}

.input-label {
    position: absolute;
    top: 10px;
    left: 0;
    font-size: 0.9rem;
    color: var(--oak);
    pointer-events: none;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.input-field:focus~.input-label,
.input-field:not(:placeholder-shown)~.input-label {
    top: -15px;
    font-size: 0.75rem;
    color: var(--gold);
}

/* File Upload */
.file-drop-zone {
    border: 1px dashed var(--oak);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}

.file-drop-zone:hover,
.file-drop-zone.dragover,
.file-drop-zone.global-drag-active {
    border-color: var(--gold);
    background: rgba(197, 160, 101, 0.08);
}

/* Selected File Display */
.selected-file-display {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    animation: fadeIn 0.3s ease;
    margin-top: 1.5rem;
}

.selected-file-display:not([hidden]) {
    display: flex;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(197, 160, 101, 0.15);
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.remove-file-btn {
    background: none;
    border: none;
    color: var(--oak);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    border-radius: 4px;
    flex-shrink: 0;
}

.remove-file-btn:hover {
    color: var(--error);
    background: rgba(244, 67, 54, 0.1);
}

.upload-icon {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    display: block;
    transition: transform 0.3s;
}

.file-drop-zone:hover .upload-icon {
    transform: translateY(-5px);
}

/* Keyboard Accessibility */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.file-drop-zone:focus-visible,
.more-details-toggle:focus-visible {
    border-color: var(--gold);
    background: rgba(197, 160, 101, 0.05);
    outline: none;
}

/* More Details Toggle */
.more-details-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    color: var(--oak);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    transition: color 0.3s;
    border: 1px dashed rgba(141, 110, 99, 0.3);
    background: rgba(255, 255, 255, 0.02);
}

.more-details-toggle:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.toggle-icon {
    transition: transform 0.3s var(--ease-out);
}

.more-details-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

/* Collapsible Section */
.more-details-section {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s var(--ease-out), opacity 0.3s ease, margin 0.3s ease;
    margin-bottom: 0;
}

.more-details-section.open {
    max-height: 500px;
    opacity: 1;
    margin-bottom: 1.5rem;
}

/* Select Field */
.select-field {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238D6E63' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 20px;
    cursor: pointer;
}

.select-field option {
    background: var(--charcoal);
    color: var(--silver);
    padding: 10px;
}

.select-label {
    top: -15px;
    font-size: 0.75rem;
    color: var(--gold);
}

/* Textarea Field */
.textarea-group {
    margin-bottom: 1.5rem;
}

.textarea-field {
    resize: vertical;
    min-height: 80px;
    border: 1px solid var(--silver-dim);
    padding: 10px;
    line-height: 1.5;
}

.textarea-field:focus {
    border-color: var(--gold);
}

.textarea-group .input-label {
    left: 10px;
}

.textarea-group .input-field:focus~.input-label,
.textarea-group .input-field:not(:placeholder-shown)~.input-label {
    left: 0;
}

/* Number Input - remove spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Gold Button with Internal Progress */
.btn-submit {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(to bottom, var(--gold), var(--gold-dark));
    border: 1px solid var(--gold-light);
    color: #050505;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-size: 1rem;
    z-index: 1; /* Text stays on top */
}

/* The Progress Fill Overlay */
.btn-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.4); /* Light overlay to show progress */
    z-index: -1; /* Behind text but visible on button */
    transition: width 0.1s linear;
}

.btn-submit::after {
    /* Disable the old shiny hover effect when uploading */
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
    z-index: -2;
}

/* Hide external progress bar */
.progress-container {
    display: none !important;
}

.btn-submit:hover {
    box-shadow: 0 0 20px rgba(197, 160, 101, 0.4);
    transform: scale(1.02);
}

.btn-submit:hover::after {
    left: 100%;
}

.btn-submit:active {
    transform: scale(0.98);
    border-color: var(--gold-dark);
}

/* Footer - "System Status" Grid Design */
.footer-info {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.05); /* Border color via gap */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    
    /* Grid Layout - Gap based borders */
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 1px;
    
    padding: 0;
    font-size: 0.85rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.5rem; /* Tighter padding */
    
    background: #050505; /* Cell background */
    
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden; /* Safety clip */
}

.contact-item:hover {
    background: rgba(197, 160, 101, 0.03); /* Subtle gold wash */
}

/* The Label (ADDRESS, PHONE...) */
.contact-item span {
    color: var(--oak);
    font-size: 0.65rem;
    margin-bottom: 0.35rem;
    letter-spacing: 0.15em;
    font-family: 'Oswald', sans-serif;
    opacity: 0.8;
}

/* The Value (The link/text) */
.contact-item a,
.contact-item a:visited {
    color: var(--silver-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    display: block;
    white-space: nowrap; /* Prevent wrapping */
}

.contact-item a:hover {
    color: var(--gold);
    transform: translateX(3px);
    text-shadow: 0 0 10px rgba(197, 160, 101, 0.3);
}

/* --- MESSAGES --- */
.status-msg {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.5rem;
    font-weight: 500;
}

.status-msg.success {
    color: var(--success);
}

.status-msg.error {
    color: var(--error);
}

/* --- RESPONSIVE --- */
@media (max-width: 960px) {
    .main-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        /* Remove fixed header spacing */
        padding-top: 0; 
    }

    /* Remove the "Baguette" virtual header hack */
    .main-container::before {
        display: none;
    }

    /* --- MINI HERO (Panel Left) --- */
    .panel-left {
        flex: 0 0 auto;
        width: 100%;
        /* Restore the industrial dark look */
        background: radial-gradient(circle at 50% 30%, #1a1815 0%, #0a0a0a 60%, #050505 100%);
        border-right: none;
        border-bottom: 1px solid var(--gold); /* distinct separation */
        padding: 4rem 2rem 3rem; /* Spacious padding */
        
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        position: relative;
        z-index: 5;
    }

    /* Brand Wrapper - Center Everything */
    .brand-wrapper {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        margin-top: 0;
        text-align: center;
        width: 100%;
        max-width: 400px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* --- LOGO --- */
    .logo-container {
        /* Un-fix the logo, bring it back to flow */
        position: relative;
        top: auto;
        left: auto;
        width: auto;
        height: auto;
        margin: 0 0 1.5rem 0;
        transform: none;
    }

    .logo-img {
        max-width: 160px; /* Smaller but visible */
        width: 100%;
        height: auto;
    }

    /* --- TEXT --- */
    h1.main-title {
        font-size: 2.2rem;
        line-height: 1.1;
        margin-bottom: 1rem;
        text-align: center;
        /* Ensure gradient text works */
        background: linear-gradient(to right, var(--silver), #888);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    /* Decorative grid lines in Hero - Optional: Hide or Keep */
    .grid-line {
        display: none; 
    }

    /* Lang Switcher - Mobile (Fixed Top Right) */
    .lang-switch {
        position: fixed; /* Fixed to viewport */
        top: 1.5rem;
        right: 1.5rem;
        z-index: 1000; /* High z-index to sit above everything */
        gap: 1rem;
        background: rgba(5, 5, 5, 0.6); /* Slight backdrop for legibility */
        backdrop-filter: blur(8px);
        padding: 5px 10px;
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* --- PANEL RIGHT (Form) --- */
    .panel-right {
        flex: 1;
        padding: 0;
        background: var(--charcoal); /* Explicit dark grey background */
        overflow: visible;
    }

    .form-container {
        padding: 3rem 2rem; /* Breathing room */
        margin: 0;
        opacity: 1;
        transform: none;
        animation: none;
        background: transparent;
        backdrop-filter: none;
        border: none;
        max-height: none;
        overflow: visible;
    }

    h2.form-title {
        font-size: 1.6rem;
        margin-top: 0;
        text-align: center; /* Center form title too? Optional. Let's keep Left for form logic or Center for vibe. Left is safer for inputs. */
        display: block;
        margin-bottom: 2rem;
    }

    /* --- PROGRESS BAR --- */
.progress-container {
    display: none; /* Hidden by default */
    margin-top: 1.5rem;
    width: 100%;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-family: 'Oswald', sans-serif;
    color: var(--gold);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--gold);
}

/* --- FOOTER --- */
    .footer-info {
        display: flex; /* Back to flex for mobile vertical stack */
        flex-direction: column;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding: 0;
        gap: 0;
    }
    
    .contact-item {
        width: 100%;
        border-right: none !important; /* Force reset right border */
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important; /* Force reset bottom border */
        padding: 1.5rem 2rem;
        align-items: flex-start;
        text-align: left;
    }

    .contact-item:last-child {
        border-bottom: none !important;
    }
}