/**
 * Contact Page - Signal Transmission Terminal
 *
 * Design: Secure communication terminal aesthetic
 * Feel: You're transmitting through an encrypted Lightning channel
 */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ============================================
   PAGE CONTAINER
   ============================================ */

.contact-page {
    min-height: 100vh;
    padding: 80px 24px 120px;
    background: #050508;
    position: relative;
    overflow: hidden;
}

/* Animated grid background */
.contact-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(247, 147, 26, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(247, 147, 26, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 30%, transparent 80%);
    animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Floating orb accent */
.contact-page::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(247, 147, 26, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
    animation: orbFloat 15s ease-in-out infinite;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 30px); }
}

.contact-container {
    max-width: 580px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER - TRANSMISSION STATION
   ============================================ */

.contact-header {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status indicator */
.contact-header::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 0 12px #22c55e, 0 0 24px rgba(34, 197, 94, 0.4);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        box-shadow: 0 0 12px #22c55e, 0 0 24px rgba(34, 197, 94, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px #22c55e, 0 0 40px rgba(34, 197, 94, 0.6);
        transform: scale(1.1);
    }
}

.contact-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

/* Accent bar under title */
.contact-header h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #f7931a, transparent);
    margin: 16px auto 0;
    border-radius: 2px;
}

.contact-header p {
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 20px auto 0;
    max-width: 400px;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* ============================================
   FORM CONTAINER - TERMINAL WINDOW
   ============================================ */

.contact-form {
    background: linear-gradient(180deg, rgba(15, 15, 20, 0.9) 0%, rgba(10, 10, 15, 0.95) 100%);
    border: 1px solid rgba(247, 147, 26, 0.15);
    border-radius: 16px;
    padding: 0;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out 0.15s both;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

/* Terminal header bar */
.contact-form::before {
    content: '';
    display: block;
    height: 40px;
    background: linear-gradient(180deg, rgba(247, 147, 26, 0.08) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

/* Window controls decoration */
.contact-form::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: rgba(247, 147, 26, 0.6);
    border-radius: 50%;
    box-shadow:
        20px 0 0 rgba(255, 255, 255, 0.15),
        40px 0 0 rgba(255, 255, 255, 0.1);
}

.form-inner {
    padding: 32px;
}

/* ============================================
   FORM GROUPS
   ============================================ */

.form-group {
    margin-bottom: 28px;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

/* Label prefix indicator */
.form-group label::before {
    content: '>';
    color: #f7931a;
    font-weight: 400;
}

/* ============================================
   INPUT FIELDS - TERMINAL STYLE
   ============================================ */

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #fff;
    font-family: 'Space Mono', monospace;
    font-size: 0.9375rem;
    line-height: 1.5;
    transition: all 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(247, 147, 26, 0.5);
    background: rgba(0, 0, 0, 0.7);
    box-shadow:
        0 0 0 3px rgba(247, 147, 26, 0.1),
        0 0 30px rgba(247, 147, 26, 0.05) inset;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-style: italic;
}

/* Select dropdown styling */
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23f7931a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 48px;
}

.form-group select option {
    background: #0f0f14;
    color: #fff;
    padding: 12px;
}

/* Textarea specific */
.form-group textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

/* ============================================
   SUBMIT BUTTON - TRANSMIT
   ============================================ */

.submit-btn {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #f7931a 0%, #e8850f 100%);
    border: none;
    border-radius: 10px;
    color: #000;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 32px rgba(247, 147, 26, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Sending state */
.submit-btn.sending {
    background: linear-gradient(135deg, #444 0%, #333 100%);
    color: #aaa;
}

/* ============================================
   FORM MESSAGES
   ============================================ */

.form-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 10px;
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
    display: none;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message.success {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

.form-message.success::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 50%;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.form-message.error {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.form-message.error::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================
   CONTACT INFO FOOTER
   ============================================ */

.contact-info {
    margin-top: 40px;
    text-align: center;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.contact-info p {
    font-family: 'Space Mono', monospace;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.02em;
}

.contact-info a {
    color: #f7931a;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.contact-info a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #f7931a;
    transition: width 0.25s ease;
}

.contact-info a:hover {
    color: #ffaa33;
}

.contact-info a:hover::after {
    width: 100%;
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */

/* Signal lines */
.signal-line {
    position: absolute;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(247, 147, 26, 0.3), transparent);
    pointer-events: none;
}

.signal-line-left {
    left: -60px;
    top: 100px;
    height: 200px;
    animation: signalPulse 3s ease-in-out infinite;
}

.signal-line-right {
    right: -60px;
    top: 150px;
    height: 150px;
    animation: signalPulse 3s ease-in-out infinite 1s;
}

@keyframes signalPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Corner accents */
.corner-accent {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(247, 147, 26, 0.2);
    pointer-events: none;
}

.corner-accent-tl {
    top: -20px;
    left: -20px;
    border-right: none;
    border-bottom: none;
}

.corner-accent-br {
    bottom: -20px;
    right: -20px;
    border-left: none;
    border-top: none;
}

/* ============================================
   HONEYPOT (SPAM PROTECTION)
   ============================================ */

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .contact-page {
        padding: 60px 16px 80px;
    }

    .contact-header h1 {
        font-size: 1.75rem;
    }

    .contact-header p {
        font-size: 0.8125rem;
    }

    .form-inner {
        padding: 24px 20px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 0.875rem;
    }

    .submit-btn {
        padding: 16px 24px;
        font-size: 0.9375rem;
    }

    .signal-line-left,
    .signal-line-right {
        display: none;
    }

    .corner-accent {
        display: none;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .contact-header::before,
    .contact-page::before,
    .contact-page::after,
    .signal-line {
        animation: none;
    }

    .contact-header,
    .contact-form,
    .contact-info {
        animation: none;
    }

    .submit-btn::before {
        display: none;
    }
}
