/* ============================================
   KELIBATMU V2 - CONTACT PAGE
   Cinematic Archive Experience - Final Polish
   Typography Refined · Rendering Consistent
   ============================================ */

/* -------------------- SECTION -------------------- */
.contact-cinematic {
    padding: var(--space-xl) 0;
    position: relative;
    overflow: hidden;
}

/* -------------------- HEADER - Emotional Pacing -------------------- */
.contact-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto var(--space-xl);
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.contact-title {
    font-size: var(--kv2-font-page-title);
    font-weight: var(--kv2-weight-page-title);
    letter-spacing: var(--kv2-track-page-title);
    line-height: var(--kv2-line-page-title);
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, rgba(255,255,245,0.95), rgba(200,170,160,0.85));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.contact-subtitle {
    font-size: var(--kv2-font-small);
    color: rgba(220, 210, 200, 0.65);
    font-style: italic;
    letter-spacing: 0.3px;
    max-width: 480px;
    margin: 0 auto;
    line-height: var(--kv2-line-small);
}

/* -------------------- GRID - Refined Proportions -------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-xl);
    max-width: 1040px;
    margin: 0 auto;
    align-items: start;
}

/* -------------------- LEFT COLUMN - Artist Presence -------------------- */
.contact-presence {
    padding: var(--space-md) 0;
    position: relative;
}

.presence-title {
    font-size: var(--kv2-font-meta);
    font-weight: 450;
    letter-spacing: 0.3px;
    margin-bottom: var(--space-md);
    color: rgba(220, 200, 190, 0.85);
    text-transform: uppercase;
    font-feature-settings: "ss02";
}

.presence-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Email - Softened Contrast */
.presence-email {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.email-label {
    font-size: var(--kv2-font-meta);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(200, 170, 160, 0.7);
}

.email-address {
    font-size: var(--kv2-font-body);
    color: rgba(220, 200, 190, 0.85);
    text-decoration: none;
    transition: all 0.25s ease;
    letter-spacing: -0.2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    display: inline-block;
    max-width: 100%;
}

.email-address:hover {
    color: rgba(220, 180, 160, 0.95);
    transform: translateX(2px);
}

/* Social Media - Cinematic Circular Icons */
.presence-social {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.social-label {
    font-size: var(--kv2-font-meta);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(200, 170, 160, 0.7);
}

.social-icons {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 25, 32, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(220, 210, 200, 0.75);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-decoration: none;
}

.social-icon:hover {
    background: rgba(139, 44, 44, 0.15);
    border-color: rgba(139, 44, 44, 0.4);
    color: rgba(220, 180, 160, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 44, 44, 0.15);
}

.social-svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
}

/* -------------------- RIGHT COLUMN - Cinematic Form -------------------- */
.contact-form-cinematic {
    background: rgba(12, 12, 18, 0.35);
    backdrop-filter: blur(12px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 2rem;
    transition: all 0.4s ease;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.3);
}

.contact-form-cinematic:hover {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 48px -14px rgba(0, 0, 0, 0.4);
}

/* Form Notifications */
.form-notification {
    margin-bottom: var(--space-md);
    padding: 0.8rem 1.2rem;
    border-radius: 18px;
    font-size: var(--kv2-font-small);
    backdrop-filter: blur(8px);
    animation: fadeInUp 0.3s ease;
}

.form-notification-success {
    background: rgba(46, 125, 90, 0.12);
    border: 1px solid rgba(80, 180, 120, 0.25);
    color: rgba(160, 220, 180, 0.95);
}

.form-notification-error {
    background: rgba(139, 44, 44, 0.12);
    border: 1px solid rgba(200, 80, 80, 0.25);
    color: rgba(220, 150, 150, 0.95);
}

/* Form Fields - Unified Typography System */
.cinematic-form {
    width: 100%;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field-label {
    font-size: var(--kv2-font-meta);
    font-weight: 450;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(200, 180, 170, 0.7);
}

/* Unified Input Styling - Cinematic Glass System */
.form-field input,
.form-field textarea,
.cinematic-select {
    width: 100%;
    background: rgba(8, 8, 12, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 0.85rem 1rem;
    color: rgba(235, 225, 215, 0.92);
    font-size: var(--kv2-font-small);
    font-family: inherit;
    font-weight: 400;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    line-height: 1.5;
    letter-spacing: normal;
}

/* Select Specific Reset - Complete override */
.cinematic-select {
    cursor: pointer;
    color: rgba(185, 172, 162, 0.72);

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-color: rgba(8, 8, 12, 0.7);

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(200,170,160,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 14px;

    padding-right: 2.5rem;
}

/* Remove default select styling completely */
.cinematic-select::-ms-expand {
    display: none;
}

/* Select placeholder/disabled option styling */
.cinematic-select option:disabled,
.cinematic-select option[value=""] {
    color: rgba(180, 170, 160, 0.55);
    font-weight: 400;
    background-color: rgba(8, 8, 12, 0.98);
}

/* Select options styling */
.cinematic-select option {
    background-color: rgba(8, 8, 12, 0.98);
    color: rgba(235, 225, 215, 0.92);
    padding: 0.8rem;
    font-size: var(--kv2-font-small);
    font-family: inherit;
    font-weight: 400;
}

/* Select value when valid option selected */
.cinematic-select {
    color: rgba(185, 172, 162, 0.72);
}

.cinematic-select.has-value {
    color: rgba(235, 225, 215, 0.92);
}

/* Input placeholders - Soft muted typography */
.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(180, 170, 160, 0.4);
    font-size: var(--kv2-font-small);
    font-weight: 400;
    font-family: inherit;
    opacity: 1;
}

/* Focus states - Consistent across all inputs */
.form-field input:focus,
.form-field textarea:focus,
.cinematic-select:focus {
    outline: none;
    border-color: rgba(139, 44, 44, 0.45);
    background: rgba(12, 12, 18, 0.85);
    box-shadow: 0 0 0 3px rgba(139, 44, 44, 0.08);
    color: rgba(245, 235, 225, 0.96);
}

/* Hover states */
.form-field input:hover,
.form-field textarea:hover,
.cinematic-select:hover {
    border-color: rgba(139, 44, 44, 0.25);
    background: rgba(10, 10, 15, 0.75);
}

/* Textarea specific - Calmer composition */
.form-field-message textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
    font-family: inherit;
}

/* Field Errors */
.field-error {
    font-size: var(--kv2-font-caption);
    color: rgba(220, 120, 120, 0.9);
    padding-left: 0.5rem;
    margin-top: 0.2rem;
}

.form-error-summary {
    padding: 0.8rem 1rem;
    border: 1px solid rgba(220, 120, 120, 0.24);
    border-radius: 18px;
    background: rgba(139, 44, 44, 0.12);
    color: rgba(240, 175, 175, 0.95);
    font-size: var(--kv2-font-small);
    line-height: var(--kv2-line-small);
}

.form-error-summary p {
    margin: 0;
}

.contact-turnstile-group {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    background: rgba(8, 8, 12, 0.45);
}

.contact-turnstile-copy {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.contact-turnstile-label {
    color: rgba(235, 225, 215, 0.9);
    font-size: var(--kv2-font-meta);
    font-weight: 620;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.contact-turnstile-subtext,
.contact-turnstile-help {
    color: rgba(200, 180, 170, 0.64);
    font-size: var(--kv2-font-caption);
    line-height: var(--kv2-line-caption);
}

.contact-turnstile-frame {
    width: min(100%, 320px);
    min-height: 65px;
    margin-top: 0.75rem;
    overflow: hidden;
    border-radius: 12px;
}

.contact-turnstile-frame .cf-turnstile,
.contact-turnstile-frame iframe {
    max-width: 100%;
}

.contact-turnstile-help {
    margin: 0.55rem 0 0;
}

.contact-turnstile-help-strong {
    color: rgba(240, 175, 175, 0.95);
}

/* Submit Button - Cinematic Action */
.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(139, 44, 44, 0.82);
    border: none;
    border-radius: 60px;
    padding: 0.85rem 1.8rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    width: auto;
    min-width: 180px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.submit-text {
    color: rgba(255, 255, 245, 0.95);
    font-size: var(--kv2-font-button);
    font-weight: 500;
}

.submit-arrow {
    color: rgba(255, 255, 245, 0.85);
    font-size: var(--kv2-font-card-title);
    transition: transform 0.25s ease;
}

.submit-button:hover {
    background: rgba(139, 44, 44, 1);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -8px rgba(139, 44, 44, 0.5);
}

.submit-button:hover .submit-arrow {
    transform: translateX(4px);
}

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

/* -------------------- RESPONSIVE - Mobile First Refinement -------------------- */

/* Tablet */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        max-width: 600px;
    }
    
    .contact-presence {
        padding: 0;
        text-align: center;
    }
    
    .presence-items {
        align-items: center;
    }
    
    .presence-email {
        align-items: center;
        text-align: center;
    }
    
    .presence-social {
        align-items: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .contact-form-cinematic {
        padding: 1.6rem;
    }
    
    .contact-title {
        font-size: var(--kv2-font-page-title);
    }
    
    .contact-subtitle {
        font-size: var(--kv2-font-small);
    }
    
    /* Maintain email wrapping without break-all */
    .email-address {
        word-break: normal;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .contact-cinematic {
        padding: var(--space-lg) 0;
    }
    
    .contact-header {
        margin-bottom: var(--space-lg);
    }
    
    .contact-title {
        font-size: var(--kv2-font-page-title);
        margin-bottom: var(--space-xs);
    }
    
    .contact-subtitle {
        font-size: var(--kv2-font-caption);
        line-height: var(--kv2-line-caption);
    }
    
    .contact-form-cinematic {
        padding: 1.2rem;
        border-radius: 24px;
    }
    
    .form-fields {
        gap: 1rem;
    }
    
    .form-field input,
    .form-field textarea,
    .cinematic-select {
        padding: 0.7rem 0.9rem;
        font-size: var(--kv2-font-small);
    }
    
    .cinematic-select {
        padding-right: 2.2rem;
        background-position: right 0.9rem center;
        background-size: 12px;
    }
    
    .field-label {
        font-size: var(--kv2-font-meta);
    }
    
    .form-field-message textarea {
        min-height: 100px;
    }

    .contact-turnstile-group {
        padding: 0.85rem;
    }

    .contact-turnstile-frame {
        width: 100%;
    }
    
    .submit-button {
        width: 100%;
        padding: 0.75rem 1.5rem;
        min-width: auto;
    }
    
    .submit-text {
        font-size: var(--kv2-font-button);
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
    }
    
    .social-svg {
        width: 18px;
        height: 18px;
    }
    
    .email-address {
        font-size: var(--kv2-font-small);
        word-break: normal;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .presence-title {
        font-size: var(--kv2-font-meta);
        margin-bottom: var(--space-sm);
    }
    
    .presence-items {
        gap: var(--space-md);
    }
}

/* Desktop Refinement */
@media (min-width: 1024px) {
    .contact-form-cinematic {
        padding: 2.2rem;
    }
    
    .contact-title {
        font-size: var(--kv2-font-hero);
    }
    
    .form-field input,
    .form-field textarea,
    .cinematic-select {
        padding: 0.9rem 1.1rem;
    }
    
    .cinematic-select {
        padding-right: 2.5rem;
    }
}

/* Small desktop / landscape */
@media (min-width: 769px) and (max-width: 1023px) {
    .contact-grid {
        gap: var(--space-lg);
    }
    
    .email-address {
        word-break: normal;
        overflow-wrap: break-word;
    }
}

/* -------------------- ANIMATIONS -------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus visible outline for accessibility */
.form-field input:focus-visible,
.form-field textarea:focus-visible,
.cinematic-select:focus-visible,
.submit-button:focus-visible {
    outline: 2px solid rgba(200, 160, 140, 0.5);
    outline-offset: 2px;
}

/* WebKit autofill override */
.form-field input:-webkit-autofill,
.form-field input:-webkit-autofill:hover,
.form-field input:-webkit-autofill:focus,
.form-field textarea:-webkit-autofill,
.form-field textarea:-webkit-autofill:hover,
.form-field textarea:-webkit-autofill:focus,
.cinematic-select:-webkit-autofill {
    -webkit-text-fill-color: rgba(235, 225, 215, 0.92);
    -webkit-box-shadow: 0 0 0px 1000px rgba(8, 8, 12, 0.7) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Firefox invalid pseudo-class handling */
.cinematic-select:invalid {
    color: rgba(180, 170, 160, 0.55);
}

.cinematic-select:invalid option {
    color: rgba(180, 170, 160, 0.55);
}

.cinematic-select:focus,
.cinematic-select.has-value {
    color: rgba(235, 225, 215, 0.92);
}

/* Compact Contact layout; form and challenge contracts remain unchanged. */
.contact-cinematic { padding: 1.4rem 0 2rem; overflow: visible; }
.contact-cinematic > .container { max-width: 760px; }
.contact-header { margin-bottom: .75rem; animation: none; }
.contact-title { font-size: var(--kv2-font-page-title); margin-bottom: .25rem; }
.contact-grid { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
.contact-presence { padding: 0; }
.contact-cinematic .presence-items { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: .25rem .9rem; }
.contact-cinematic .presence-email, .contact-cinematic .presence-social { display: flex; }
.contact-cinematic .email-address { min-height: 44px; display: inline-flex; align-items: center; font-size: .9rem; }
.contact-cinematic .social-icons { gap: .35rem; }
.contact-cinematic .social-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(78,107,79,.08); }
.contact-cinematic .social-icon:hover { transform: none; box-shadow: none; background: rgba(78,107,79,.2); border-color: #4e6b4f; }
.contact-form-cinematic, .contact-form-cinematic:hover { padding: 1rem; border-radius: 16px; box-shadow: none; backdrop-filter: none; background: rgba(8,16,12,.35); }
.contact-cinematic .form-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.contact-cinematic .form-field { min-width: 0; gap: .25rem; }
.contact-cinematic .form-field input, .contact-cinematic .form-field textarea, .contact-cinematic .cinematic-select { min-width: 0; min-height: 44px; padding: .6rem .75rem; border-radius: 10px; font-size: 16px; }
.contact-cinematic .cinematic-select { padding-right: 2.2rem; }
.contact-cinematic .form-field-message textarea { height: 120px; min-height: 110px; resize: vertical; }
.contact-cinematic .contact-turnstile-group { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; gap: .35rem; }
.contact-cinematic .contact-turnstile-frame { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; max-width: 100%; overflow: visible; }
.contact-cinematic .contact-turnstile-copy { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: baseline; }
.contact-cinematic .contact-turnstile-help { margin: 0; font-size: .72rem; line-height: 1.4; }
.contact-cinematic .submit-button, .contact-cinematic .submit-button:hover { min-height: 44px; width: 100%; margin-top: .1rem; padding: .65rem 1rem; border-radius: 12px; background: #4e6b4f; transform: none; box-shadow: none; }
.contact-cinematic :is(a, input, textarea, select, button):focus-visible { outline: 2px solid #a7cfa2; outline-offset: 2px; }
@media (min-width: 600px) {
  .contact-cinematic .form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-cinematic .form-fields > * { grid-column: 1 / -1; }
  .contact-cinematic .form-field:has([name="name"]), .contact-cinematic .form-field:has([name="email"]) { grid-column: auto; }
}
@media (max-width: 480px) {
  .contact-cinematic { padding-top: 1rem; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .contact-cinematic > .container { width: calc(100% - 16px); padding-inline: 0; }
  .contact-cinematic .contact-form-cinematic { padding: 0; border: 0; background: none; }
  .contact-cinematic .contact-subtitle { font-size: .8rem; }
}

/* Clear the existing fixed header without changing global navigation. */
.contact-cinematic { padding-top: 5rem; }
@media (max-width: 480px) { .contact-cinematic { padding-top: 4.5rem; } }

.contact-cinematic .form-field-message textarea {
    height: 86px;
    min-height: 86px;
    max-height: 206px;
    transition-property: border-color, background-color, color;
    line-height: 24px;
    overflow-y: auto;
    resize: vertical;
}

/* Match only the unselected Subject text to existing input placeholders. */
.contact-cinematic select[name="subject"]:has(option[value=""]:checked) {
    color: rgba(180, 170, 160, 0.4) !important;
}
