/* ─────────────────────────────────────────────────────────────────────────
   Project Inquiry Form — Styles
   Dark, minimal aesthetic matching the original design language.
   ───────────────────────────────────────────────────────────────────────── */

/* Section wrapper */
.pif-section {
    padding: 140px 10%;
    max-width: 900px;
    margin: auto;
    box-sizing: border-box;
}

/* Heading */
.pif-heading {
    font-weight: 300;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: 0.04em;
    margin: 0 0 60px;
    line-height: 1.2;
}

/* Form layout */
.pif-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Field group */
.pif-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

/* Label */
.pif-label {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.55;
    font-weight: 400;
    transition: opacity 0.2s ease;
}

.pif-field:focus-within .pif-label {
    opacity: 0.9;
}

.pif-optional {
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    opacity: 0.6;
}

/* Shared input/select/textarea base */
.pif-input,
.pif-select,
.pif-textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    color: inherit;
    font-family: inherit;
    font-size: 15px;
    font-weight: 300;
    padding: 10px 0 12px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    border-radius: 0;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.pif-input::placeholder,
.pif-textarea::placeholder {
    opacity: 0.3;
    font-style: italic;
}

.pif-input:focus,
.pif-select:focus,
.pif-textarea:focus {
    border-bottom-color: rgba(255, 255, 255, 0.7);
}

/* Textarea */
.pif-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Select wrapper — custom arrow */
.pif-select-wrap {
    position: relative;
    width: 100%;
}

.pif-select-wrap .pif-select {
    cursor: pointer;
    padding-right: 24px;
}

.pif-select-arrow {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 10px;
    height: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    transform: translateY(-65%) rotate(45deg);
}

/* Select option color fix for light-bg themes */
.pif-select option {
    background: #111;
    color: #fff;
}

/* Submit button */
.pif-submit {
    margin-top: 20px;
    padding: 18px 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: none;
    color: inherit;
    font-family: inherit;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    align-self: flex-start;
    min-width: 200px;
    transition: border-color 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pif-submit:hover {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.04);
}

.pif-submit:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.5);
    outline-offset: 3px;
}

.pif-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Spinner */
.pif-submit-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: pif-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.pif-form--loading .pif-submit-spinner {
    display: block;
}

.pif-form--loading .pif-submit-label {
    opacity: 0.5;
}

@keyframes pif-spin {
    to { transform: rotate(360deg); }
}

/* Inline field error */
.pif-error {
    font-size: 12px;
    color: rgba(255, 120, 100, 0.9);
    letter-spacing: 0.04em;
    min-height: 1em;
    display: block;
}

/* Global error message */
.pif-error-global {
    font-size: 13px;
    color: rgba(255, 120, 100, 0.9);
    padding: 14px 0;
    border-top: 1px solid rgba(255, 80, 60, 0.25);
    letter-spacing: 0.03em;
}

/* Success state */
.pif-success {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pif-success svg {
    width: 28px;
    height: 28px;
    opacity: 0.7;
    flex-shrink: 0;
}

.pif-success p {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    opacity: 0.8;
    margin: 0;
}

/* Footer note */
.pif-note {
    margin-top: 60px;
    font-size: 13px;
    opacity: 0.45;
    line-height: 1.8;
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* Input line-highlight animation */
.pif-input,
.pif-textarea {
    background-image: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.6),
        rgba(255, 255, 255, 0.6)
    );
    background-repeat: no-repeat;
    background-size: 0 1px;
    background-position: left bottom;
    transition: background-size 0.4s ease, border-color 0.3s ease;
}

.pif-input:focus,
.pif-textarea:focus {
    background-size: 100% 1px;
    border-bottom-color: transparent;
}

/* reCAPTCHA badge — keep subtle */
.grecaptcha-badge {
    opacity: 0.35 !important;
    transition: opacity 0.3s ease !important;
}
.grecaptcha-badge:hover {
    opacity: 0.7 !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .pif-section {
        padding: 80px 6%;
    }

    .pif-form {
        gap: 32px;
    }

    .pif-submit {
        width: 100%;
        align-self: stretch;
    }
}

@media (max-width: 480px) {
    .pif-section {
        padding: 60px 5%;
    }
}
