/* ============================================
   CRYSTAL FACILITY SOLUTIONS - CONTACT
   Background matching Services section style
   Lightened to match services section tone
   ============================================ */

.contact-cinematic {
    position: relative;
    min-height: 100vh;
    padding: 8rem 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    /* LIGHTENED: was #0a0a0a → #1a1a1a → #0d1f0d */
    /* Now matches services lightened tone with green tint */
    background: linear-gradient(135deg, #2a3144 0%, #2c3448 50%, #2e374d 100%);
    isolation: isolate;
}

/* ============================================
   BACKGROUND LAYERS — Matching Services Style (LIGHTENED)
   ============================================ */
.contact-bg-layers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Grid pattern — LIGHTENED */
.contact-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(124, 179, 66, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 179, 66, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

@keyframes gridFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Gradient orbs — LIGHTENED */
.contact-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    /* Reduced from 0.4 to 0.2 */
    opacity: 0.2;
    animation: orbPulse 8s ease-in-out infinite;
}

.contact-bg-orb.orb-1 {
    width: 500px;
    height: 500px;
    /* Reduced from 0.2 to 0.12 */
    background: rgba(124, 179, 66, 0.12);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.contact-bg-orb.orb-2 {
    width: 400px;
    height: 400px;
    /* Reduced from 0.15 to 0.08 */
    background: rgba(156, 204, 101, 0.08);
    bottom: 10%;
    right: -5%;
    animation-delay: -3s;
}

.contact-bg-orb.orb-3 {
    width: 300px;
    height: 300px;
    /* Reduced from 0.1 to 0.06 */
    background: rgba(40, 167, 69, 0.06);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -6s;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.2); opacity: 0.3; }
}

/* Particles canvas — LIGHTENED */
.contact-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Reduced from 0.6 to 0.4 */
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================
   CONTAINER & HEADER
   ============================================ */
.contact-cinematic-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cinematic-header {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeInUp 1s var(--ease-in-out);
}

.cinematic-header .header-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    /* LIGHTENED background */
    background: rgba(124, 179, 66, 0.08);
    border: 1px solid rgba(124, 179, 66, 0.25);
    border-radius: 50px;
    color: var(--cfs-green);
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    animation: eyebrowGlow 3s ease-in-out infinite;
}

@keyframes eyebrowGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(124, 179, 66, 0.15); }
    50% { box-shadow: 0 0 40px rgba(124, 179, 66, 0.3); }
}

.cinematic-header .header-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.cinematic-header .title-line {
    display: block;
    animation: titleReveal 1s var(--ease-in-out) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.cinematic-header .title-line.highlight {
    background: linear-gradient(135deg, var(--cfs-green), var(--cfs-light-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation-delay: 0.2s;
}

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

.cinematic-header .header-subtitle {
    font-size: 1.125rem;
    /* LIGHTENED for better contrast */
    color: rgba(255, 255, 255, 0.72);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

/* ============================================
   SHOWCASE GRID
   ============================================ */
.contact-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

/* ============================================
   LEFT: CONTACT EXPERIENCE
   ============================================ */
.contact-experience {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* 3D Card Stack — LIGHTENED */
.card-stack {
    position: relative;
    height: 260px;
    perspective: 1200px;
}

.stack-card {
    position: absolute;
    width: 100%;
    max-width: 320px;
    padding: 1.5rem 2rem;
    /* LIGHTENED: was rgba(255,255,255,0.03) */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    font-weight: var(--font-weight-semibold);
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.stack-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(124, 179, 66, 0.1);
    border-color: rgba(124, 179, 66, 0.3);
    box-shadow: 0 15px 40px rgba(124, 179, 66, 0.2);
    z-index: 10 !important;
}

.stack-card i {
    width: 40px;
    height: 40px;
    background: var(--cfs-green);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stack-card-1 {
    top: 0;
    left: 0;
    z-index: 3;
    animation: stack-float-1 4s ease-in-out infinite;
}

.stack-card-2 {
    top: 55px;
    left: 25px;
    z-index: 2;
    opacity: 0.85;
    transform: scale(0.96);
    animation: stack-float-2 4s ease-in-out infinite;
    animation-delay: 0.15s;
}

.stack-card-3 {
    top: 110px;
    left: 50px;
    z-index: 1;
    opacity: 0.7;
    transform: scale(0.92);
    animation: stack-float-3 4s ease-in-out infinite;
    animation-delay: 0.3s;
}

@keyframes stack-float-1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes stack-float-2 {
    0%, 100% { transform: translateY(0) scale(0.96); }
    50% { transform: translateY(-6px) scale(0.96); }
}

@keyframes stack-float-3 {
    0%, 100% { transform: translateY(0) scale(0.92); }
    50% { transform: translateY(-4px) scale(0.92); }
}

/* Contact Methods — LIGHTENED */
.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.method-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    /* LIGHTENED: was rgba(255,255,255,0.03) */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    text-decoration: none;
    color: var(--white);
    overflow: hidden;
    transition: all 0.4s;
}

.method-card:hover {
    background: rgba(124, 179, 66, 0.1);
    border-color: rgba(124, 179, 66, 0.3);
    transform: translateX(10px);
}

.method-icon {
    position: relative;
    width: 50px;
    height: 50px;
    background: rgba(124, 179, 66, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--cfs-green);
}

.icon-ring {
    position: absolute;
    border: 2px solid var(--cfs-green);
    border-radius: 50%;
    opacity: 0;
}


    100% { transform: scale(1.5); opacity: 0; }
}

.method-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.method-label {
    font-size: 0.75rem;
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.method-value {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
}

.method-wave {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
                rgba(124, 179, 66, 0.2) 0%,
                transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.method-card:hover .method-wave {
    opacity: 1;
}

/* Live Status */
.live-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 50px;
    width: fit-content;
}

.status-indicator {
    position: relative;
    width: 12px;
    height: 12px;
}

.status-pulse {
    position: absolute;
    inset: -4px;
    background: #22c55e;
    border-radius: 50%;
    opacity: 0;
    animation: status-ping 2s ease-out infinite;
}

.status-dot {
    position: absolute;
    inset: 0;
    background: #22c55e;
    border-radius: 50%;
}

@keyframes status-ping {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(2); opacity: 0; }
}

.status-text {
    color: var(--white);
    font-weight: var(--font-weight-semibold);
    font-size: 0.95rem;
}

.status-time {
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   RIGHT: FLOATING GLASS FORM — LIGHTENED
   ============================================ */
.form-floating-container {
    perspective: 1000px;
}

.form-glass {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    transform-style: preserve-3d;
    overflow: hidden;
}
    50% { transform: translateY(-10px) rotateX(2deg); }
}


    100% { transform: translateX(100%) rotate(45deg); }
}

.form-header-glass {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header-glass h3 {
    font-size: 1.75rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.form-header-glass p {
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
}

/* Glass Inputs — LIGHTENED */
.form-cinematic {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-glass-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-glass {
    position: relative;
    display: flex;
    flex-direction: column;
}

.input-glass-inner {
    position: relative;
    width: 100%;
}

.input-glass input,
.input-glass select,
.input-glass textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    /* LIGHTENED: was rgba(0,0,0,0.2) */
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--white);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
}

.input-glass textarea {
    padding-top: 1.25rem;
    min-height: 120px;
    resize: vertical;
}

.input-glass input:focus,
.input-glass select:focus,
.input-glass textarea:focus {
    border-color: var(--cfs-green);
    /* LIGHTENED focus bg */
    background: rgba(0, 0, 0, 0.25);
}

.input-glass select ~ label {
    top: -0.5rem;
    left: 1rem;
    transform: none;
    font-size: 0.75rem;
    color: var(--cfs-green);
    /* LIGHTENED: was rgba(10,10,10,0.7) */
    background: rgba(30, 35, 50, 0.8);
    padding: 0 0.5rem;
    border-radius: 4px;
    z-index: 4;
}

.input-glass select {
    padding-top: 1.25rem;
    padding-bottom: 0.75rem;
    padding-right: 3rem;
    appearance: none;
    -webkit-appearance: none;
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}

.input-glass select ~ i {
    color: var(--cfs-green);
}

.input-glass select ~ .input-glow {
    opacity: 0.5;
}

.input-glass-inner label {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 3;
    background: transparent;
}

.input-glass-inner.textarea-glass label {
    top: 1.25rem;
    transform: none;
}

.input-glass-inner input:focus ~ label,
.input-glass-inner input.has-value ~ label,
.input-glass-inner select:focus ~ label,
.input-glass-inner select.has-value ~ label,
.input-glass-inner textarea:focus ~ label,
.input-glass-inner textarea.has-value ~ label {
    top: -0.5rem;
    left: 1rem;
    transform: none;
    font-size: 0.75rem;
    color: var(--cfs-green);
    /* LIGHTENED: was rgba(10,10,10,0.7) */
    background: rgba(30, 35, 50, 0.8);
    padding: 0 0.5rem;
    border-radius: 4px;
}

.input-glass-inner i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.35);
    transition: all 0.3s;
    z-index: 3;
    pointer-events: none;
}

.input-glass-inner.textarea-glass i {
    top: 1.25rem;
    transform: none;
}

.input-glass-inner input:focus ~ i,
.input-glass-inner input.has-value ~ i,
.input-glass-inner select:focus ~ i,
.input-glass-inner select.has-value ~ i,
.input-glass-inner textarea:focus ~ i,
.input-glass-inner textarea.has-value ~ i {
    color: var(--cfs-green);
}

.input-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--cfs-green), transparent, var(--cfs-light-green));
    border-radius: 14px;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.3s;
    filter: blur(8px);
}

.input-glass-inner input:focus ~ .input-glow,
.input-glass-inner input.has-value ~ .input-glow,
.input-glass-inner select:focus ~ .input-glow,
.input-glass-inner select.has-value ~ .input-glow,
.input-glass-inner textarea:focus ~ .input-glow,
.input-glass-inner textarea.has-value ~ .input-glow {
    opacity: 0.5;
}

.char-counter {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 0.75rem;
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.45);
    z-index: 3;
    pointer-events: none;
}

/* Cinematic Button */
.btn-cinematic {
    position: relative;
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--cfs-green), var(--cfs-dark-green));
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-cinematic:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(124, 179, 66, 0.4);
}

.btn-cinematic:active {
    transform: translateY(-1px);
}

.btn-cinematic .btn-icon {
    transition: transform 0.3s;
}

.btn-cinematic:hover .btn-icon {
    transform: translateX(5px) translateY(-2px);
}

.btn-particles {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
                rgba(255,255,255,0.3) 0%,
                transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-cinematic:hover .btn-particles {
    opacity: 1;
}

/* Trust Mini — LIGHTENED */
.trust-mini {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trust-mini .trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}

.trust-mini .trust-item i {
    color: var(--cfs-green);
}

/* ============================================
   FORM VALIDATION (Contact-specific)
   ============================================ */
.input-glass input.valid,
.input-glass select.valid,
.input-glass textarea.valid {
    border-color: var(--cfs-green);
}

.input-glass input.invalid,
.input-glass select.invalid,
.input-glass textarea.invalid {
    border-color: #ef4444;
    animation: shake 0.5s ease-in-out;
}

.validation-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 3;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-glass-inner.textarea-glass .validation-icon {
    top: 1.25rem;
    transform: none;
}

.input-glass-inner[data-valid="true"] .validation-icon {
    opacity: 1;
    color: var(--cfs-green);
}

.input-glass-inner[data-valid="false"] .validation-icon {
    opacity: 1;
    color: #ff6b6b;
}

.error-message-inline {
    display: block;
    font-size: 0.85rem;
    color: #ff6b6b;
    font-weight: var(--font-weight-semibold);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 107, 107, 0.15);
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    width: 100%;
    box-sizing: border-box;
    pointer-events: none;
    user-select: none;
}

.error-message-inline.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Form Success Overlay — LIGHTENED */
.form-success-overlay {
    position: absolute;
    inset: 0;
    /* LIGHTENED: was rgba(10,20,10,0.95) */
    background: rgba(30, 35, 50, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    z-index: 10;
    animation: fadeIn 0.5s ease;
    pointer-events: auto;
}

.success-content {
    text-align: center;
    color: var(--white);
    pointer-events: none;
}

.success-icon {
    font-size: 4rem;
    color: var(--cfs-green);
    margin-bottom: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Form Summary Error */
.form-summary-error {
    display: block;
    font-size: 0.9rem;
    color: #ff6b6b;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 107, 107, 0.15);
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    width: 100%;
    box-sizing: border-box;
}

.form-summary-error.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .contact-showcase {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .card-stack {
        display: none;
    }
}

@media (max-width: 576px) {
    .input-glass-group {
        grid-template-columns: 1fr;
    }

    .trust-mini {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .live-status {
        flex-wrap: wrap;
    }

    .status-time {
        width: 100%;
        border: none;
        padding: 0;
        margin-top: 0.5rem;
    }

    .contact-cinematic {
        padding: 5rem 0;
    }

    .form-glass {
        padding: 1.5rem;
    }

    .cinematic-header .header-title {
        font-size: 2rem;
    }
}

/* ============================================
   REDUCED MOTION & HIGH CONTRAST
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .contact-bg-grid,
    .contact-bg-orb,
    .stack-card,
    .form-glass,
    .form-reflection,
    .method-phone .icon-ring,
    .status-pulse {
        animation: none;
    }

    .form-glass {
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .form-glass,
    .method-card {
        border-width: 2px;
    }

    .input-glass input:focus,
    .input-glass select:focus,
    .input-glass textarea:focus {
        outline: 2px solid var(--cfs-green);
        outline-offset: 2px;
    }
}