/* PQ PDF Contact Form Styles */
/* CSP-compliant: no inline styles */

/* ===== Theme Variables ===== */
:root {
    --contact-primary:       #ff8c00;
    --contact-primary-dark:  #cc7000;
    --contact-primary-light: #ffaa44;
    --contact-bg:            #040810;
    --contact-surface:       #0c1525;
    --contact-surface-light: #121e35;
    --contact-text:          #f0e6d3;
    --contact-text-dim:      #a89070;
    --contact-text-muted:    #5a4a38;
    --contact-border:        #1a2840;
    --contact-border-hover:  #2a3c58;
    --contact-error:         #ff1744;
    --contact-warning:       #ff8c00;
    --contact-success:       #00e676;
    --contact-glow:          rgba(255, 140, 0, 0.2);
    --contact-shadow:        rgba(0, 0, 0, 0.5);
}

/* ===== Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--contact-bg);
    color: var(--contact-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Container ===== */
.contact-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    position: relative;
    z-index: 10;
    flex: 1;
}

/* ===== Site Nav Bar ===== */
.contact-nav {
    position: relative;
    z-index: 100;
    background: linear-gradient(135deg, #060c16 0%, #0c1628 50%, #080e1c 100%);
    border-bottom: 1px solid rgba(255, 140, 0, 0.2);
    box-shadow: 0 2px 20px rgba(255, 140, 0, 0.08);
    padding: 0.85rem 1.5rem;
}

.contact-nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.contact-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

.contact-nav-logo-img {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    border: 1px solid rgba(255, 140, 0, 0.35);
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.2);
    object-fit: cover;
    cursor: pointer;
    position: relative;
    z-index: 10;
    transform-origin: top left;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease,
                border-radius 0.3s ease;
}

.contact-nav-logo-img:hover {
    transform: scale(4);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 8px 40px rgba(255, 140, 0, 0.6);
    border-radius: 6px;
    z-index: 999;
}

.contact-nav:has(.contact-nav-logo-img:hover) {
    overflow: visible;
    z-index: 200;
}

.contact-nav-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-left: 0.1rem;
}

.contact-nav-logo-name {
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #ff8c00, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.contact-nav-logo-sub {
    font-size: 0.65rem;
    color: var(--contact-text-muted);
    line-height: 1.2;
    white-space: nowrap;
}

.contact-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.contact-nav-link {
    color: var(--contact-text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.contact-nav-link:hover {
    color: var(--contact-primary);
    background: rgba(255, 140, 0, 0.08);
}


.contact-nav-link[aria-current="page"] {
    color: var(--contact-primary);
    background: rgba(255, 140, 0, 0.12);
    border: 1px solid rgba(255, 140, 0, 0.35);
    font-weight: 600;
    cursor: default;
    pointer-events: none;
}

/* ===== Header ===== */
.contact-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--contact-border);
}

.contact-main-heading {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--contact-primary), #ffd700, var(--contact-primary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: headingGradientShift 6s ease-in-out infinite;
    margin-bottom: 0.75rem;
}

@keyframes headingGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

.contact-description {
    font-size: 1rem;
    color: var(--contact-text-dim);
    max-width: 580px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

/* ===== Form Card ===== */
.contact-form-card {
    background: var(--contact-surface);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px var(--contact-shadow);
    border: 1px solid var(--contact-border);
    position: relative;
    overflow: hidden;
}

.contact-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--contact-primary), #ffd700, var(--contact-primary));
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

/* ===== Form Groups ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--contact-text);
    font-size: 0.95rem;
}

.required {
    color: var(--contact-error);
    margin-left: 2px;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.9rem 1rem;
    background: var(--contact-surface-light);
    border: 2px solid var(--contact-border);
    border-radius: 10px;
    color: var(--contact-text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    appearance: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--contact-text-muted);
}

select option {
    background: var(--contact-surface);
    color: var(--contact-text);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--contact-primary);
    box-shadow: 0 0 0 3px var(--contact-glow);
    transform: translateY(-2px);
}

textarea {
    min-height: 130px;
    resize: vertical;
}

/* Validation states */
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
    border-color: var(--contact-error);
}

.form-group.has-success input,
.form-group.has-success textarea,
.form-group.has-success select {
    border-color: var(--contact-success);
}

.validation-message {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.validation-message.show {
    opacity: 1;
    transform: translateY(0);
}

.validation-message.error {
    color: var(--contact-error);
}

.validation-message.success {
    color: var(--contact-success);
}

/* ===== Human Verification ===== */
.human-verification {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--contact-surface-light);
    border-radius: 14px;
    border: 1px solid var(--contact-border);
    text-align: center;
}

.verification-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--contact-text);
}

.verification-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--contact-border);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.verification-indicator.validating {
    background: var(--contact-warning);
    animation: pulse 2s ease-in-out infinite;
}

.verification-indicator.success {
    background: var(--contact-success);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
}

.verification-indicator.error {
    background: var(--contact-error);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.25); opacity: 0.7; }
}

.verification-subtitle {
    font-size: 0.85rem;
    color: var(--contact-text-muted);
    margin: 0;
}

/* ===== Submit Button ===== */
.submit-btn {
    width: 100%;
    padding: 1.1rem 2rem;
    background: linear-gradient(135deg, var(--contact-primary), var(--contact-primary-dark));
    color: #040810;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0.55;
    pointer-events: none;
    letter-spacing: 0.02em;
}

.submit-btn.enabled {
    opacity: 1;
    pointer-events: auto;
}

.submit-btn.enabled:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 140, 0, 0.4);
}

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

.submit-btn.loading {
    color: transparent;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid transparent;
    border-top-color: #040810;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== Response Messages ===== */
.success-message,
.error-message {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.success-message {
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid var(--contact-success);
    color: var(--contact-success);
}

.error-message {
    background: rgba(255, 23, 68, 0.08);
    border: 1px solid var(--contact-error);
    color: var(--contact-error);
}

.success-message.show,
.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Loading skeleton ===== */
.form-group.loading input,
.form-group.loading textarea,
.form-group.loading select {
    background: linear-gradient(90deg, var(--contact-surface-light) 25%, var(--contact-border) 50%, var(--contact-surface-light) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Footer ===== */
.contact-footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0 1rem;
    border-top: 1px solid rgba(255, 140, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 10;
}

.contact-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 0.1rem;
}

.contact-footer-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(255, 140, 0, 0.25);
    object-fit: cover;
}

.contact-footer-logo-name {
    font-weight: 700;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #ff8c00, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-footer-copy {
    font-size: 0.825rem;
    color: #7a6a58;
}

.contact-footer-copy strong { color: #c0a880; }

.contact-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.contact-footer-link {
    color: #9a8068;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
}

.contact-footer-link:hover {
    color: var(--contact-primary);
    background: rgba(255, 140, 0, 0.07);
}

.contact-footer-sep {
    color: #2a3c58;
    font-size: 0.75rem;
}

.contact-footer-tagline {
    font-size: 0.78rem;
    color: #4a3c2c;
}

/* ===== Floating panel styles ===== */
.floating-response-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 16, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.floating-response-overlay.visible {
    opacity: 1;
}

.floating-response-panel {
    background: var(--contact-surface);
    border: 1px solid var(--contact-border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.floating-response-overlay.visible .floating-response-panel {
    transform: translateY(0) scale(1);
}

.panel-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.close-button {
    background: none;
    border: none;
    color: var(--contact-text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
}

.close-button:hover {
    color: var(--contact-text);
    background: var(--contact-surface-light);
}

.panel-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.panel-message {
    text-align: center;
    color: var(--contact-text);
    font-size: 1rem;
    line-height: 1.6;
}

/* ===== JS Animation Helper Elements ===== */
/* Created dynamically by contact-init.js — styled here to avoid dynamic <style> injection */

.contact-ripple-fx {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.3), transparent);
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: rippleExpand 0.8s ease-out forwards;
    z-index: -1;
}

.contact-particle-fx {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #ff8c00, #ffd700);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: particleBurst 1.2s ease-out forwards;
}

.contact-sparkle-fx {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ff8c00;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkleAnim 1s ease-out forwards;
    z-index: 10;
}

/* ===== Verification status text helpers ===== */
.vstat-primary-glow {
    color: var(--contact-primary);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.vstat-primary {
    color: var(--contact-primary);
}

.vstat-warning-bold {
    color: var(--contact-warning);
    font-weight: bold;
}

/* ===== Floating response panel ===== */
.floating-response-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-response-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.floating-response-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.floating-response-overlay.visible .floating-response-panel {
    transform: scale(1) translateY(0);
}

.panel-header {
    display: flex;
    justify-content: flex-end;
    padding: 16px 20px 0 20px;
}

.close-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #64748b;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

.close-button:active {
    transform: scale(0.95);
}

.panel-content {
    padding: 0 32px 32px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.panel-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
    animation: panelIconPulse 2s ease-in-out infinite;
}

.panel-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.panel-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.panel-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.panel-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.panel-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 24px;
}

.panel-icon.success::before { content: '✓'; }
.panel-icon.error::before   { content: '✕'; }
.panel-icon.info::before    { content: 'ℹ'; }
.panel-icon.warning::before { content: '⚠'; }

.panel-message {
    font-size: 18px;
    line-height: 1.6;
    color: #1f2937;
    font-weight: 500;
    max-width: 100%;
    word-wrap: break-word;
}

@keyframes panelIconPulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

@media (prefers-color-scheme: dark) {
    .floating-response-panel {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }
    .panel-message { color: #f9fafb; }
    .close-button  { color: #9ca3af; }
    .close-button:hover { color: #ef4444; }
}

@media (prefers-reduced-motion: reduce) {
    .floating-response-overlay,
    .floating-response-panel,
    .close-button,
    .panel-icon {
        transition: none;
        animation: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .floating-response-panel {
        width: 95%;
        margin: 0 2.5%;
    }
    .panel-content {
        padding: 0 24px 24px 24px;
        gap: 16px;
    }
    .panel-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }
    .panel-message { font-size: 16px; }
}

@media (max-width: 768px) {
    .contact-nav { padding: 0.7rem 1rem; }
    .contact-nav-logo-name { font-size: 0.875rem; }
    .contact-nav-link { font-size: 0.8rem; padding: 0.3rem 0.5rem; }
    .contact-wrapper { padding: 2rem 1rem 3rem; }
    .contact-main-heading { font-size: 1.8rem; }
    .form-row { grid-template-columns: 1fr; }
    .contact-form-card { padding: 1.5rem; }
}

@media (max-width: 480px) {
    .contact-nav-links { gap: 0; }
    .contact-nav-logo-sub { display: none; }
    .contact-main-heading { font-size: 1.5rem; }
}
