﻿
/* ── SECTION WRAPPER ── */
.contact-section {
    position: relative;
    padding: var(--space-4xl) 0;
    overflow: hidden;
}

    .contact-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background: var(--gradient-mesh);
        opacity: .8;
        pointer-events: none;
    }

    /* subtle grid texture */
    .contact-section::after {
        content: '';
        position: absolute;
        inset: 0;
        background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px), linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
        background-size: 60px 60px;
        pointer-events: none;
    }

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

/* ── HEADER ── */
.section-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto var(--space-3xl);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 16px;
    background: var(--brand-50);
    color: var(--brand-600);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 1px solid var(--brand-100);
    margin-bottom: var(--space-lg);
}

[data-theme="dark"] .section-badge {
    background: rgba(106,137,181,.1);
    border-color: rgba(106,137,181,.2);
    color: var(--brand-400);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.gradient-text {
    background: linear-gradient(135deg, var(--brand-400) 0%, var(--accent-purple) 50%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ── LAYOUT GRID ── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: var(--space-2xl);
    align-items: start;
}

/* ── LEFT PANEL ── */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.info-card {
    background: var(--surface-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    transition: all .4s var(--ease-out-expo);
    cursor: default;
}

    .info-card:hover {
        border-color: var(--brand-400);
        box-shadow: var(--shadow-lg), 0 0 0 3px rgba(106,137,181,.08);
        transform: translateY(-2px);
    }

.info-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-size: 22px;
}

    .info-icon.brand {
        background: var(--brand-50);
        color: var(--brand-500);
    }

    .info-icon.purple {
        background: rgba(139,92,246,.1);
        color: var(--accent-purple);
    }

    .info-icon.green {
        background: rgba(16,185,129,.1);
        color: var(--accent-success);
    }

[data-theme="dark"] .info-icon.brand {
    background: rgba(106,137,181,.15);
}

.info-body h4 {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.info-body p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.info-body a {
    color: var(--brand-500);
    font-weight: 500;
    transition: color .2s;
}

    .info-body a:hover {
        color: var(--brand-400);
    }

/* social strip */
.social-strip {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface-sunken);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all .3s var(--ease-out-expo);
}

    .social-btn:hover {
        background: var(--brand-50);
        border-color: var(--brand-400);
        color: var(--brand-600);
        transform: translateY(-1px);
    }

[data-theme="dark"] .social-btn:hover {
    background: rgba(106,137,181,.12);
    color: var(--brand-400);
}

/* ── FORM CARD ── */
.form-card {
    background: var(--surface-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

    /* inner glow accent */
    .form-card::before {
        content: '';
        position: absolute;
        top: -60px;
        right: -60px;
        width: 200px;
        height: 200px;
        background: radial-gradient(circle, rgba(106,137,181,.12) 0%, transparent 70%);
        pointer-events: none;
    }

.form-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

/* ── FORM FIELDS ── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: var(--space-md);
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: .01em;
}

.form-control-wrap {
    position: relative;
}

    .form-control-wrap .field-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 18px;
        color: var(--text-muted);
        pointer-events: none;
        transition: color .3s;
    }

    .form-control-wrap.textarea-wrap .field-icon {
        top: 18px;
        transform: none;
    }

.form-control {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: var(--surface-sunken);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
    transition: all .3s var(--ease-out-expo);
    outline: none;
    -webkit-appearance: none;
}

    .form-control::placeholder {
        color: var(--text-disabled);
    }

    .form-control:focus {
        background: var(--surface-base);
        border-color: var(--brand-400);
        box-shadow: 0 0 0 4px rgba(106,137,181,.12);
    }

        .form-control:focus ~ .field-icon,
        .form-control-wrap:focus-within .field-icon {
            color: var(--brand-500);
        }

textarea.form-control {
    padding-top: 14px;
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

/* subject chips */
.subject-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.chip-label {
    display: none;
}

.chip-input {
    display: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--surface-sunken);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .3s var(--ease-out-expo);
    user-select: none;
}

    .chip:hover {
        border-color: var(--brand-400);
        color: var(--brand-600);
        background: var(--brand-50);
    }

[data-theme="dark"] .chip:hover {
    background: rgba(106,137,181,.1);
    color: var(--brand-400);
}

.chip-input:checked + .chip {
    background: var(--gradient-brand);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 14px rgba(106,137,181,.4);
}

/* char counter */
.field-meta {
    display: flex;
    justify-content: flex-end;
    font-size: 12px;
    color: var(--text-disabled);
    margin-top: 4px;
}

/* submit row */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    flex: 1;
    min-width: 200px;
}

#consent {
    display: none;
}

.custom-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all .3s var(--ease-out-expo);
    margin-top: 1px;
}

    .custom-check i {
        font-size: 12px;
        color: white;
        opacity: 0;
        transform: scale(0);
        transition: all .2s var(--ease-spring);
    }

#consent:checked + label .custom-check {
    background: var(--gradient-brand);
    border-color: transparent;
}

    #consent:checked + label .custom-check i {
        opacity: 1;
        transform: scale(1);
    }

.form-consent a {
    color: var(--brand-500);
    font-weight: 500;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 36px;
    background: var(--gradient-brand);
    color: white;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 20px rgba(106,137,181,.4);
    transition: all .4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

    .btn-submit::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,.2) 50%, transparent 60%);
        transform: translateX(-100%) skewX(-15deg);
        transition: transform .6s;
    }

    .btn-submit:hover::before {
        transform: translateX(100%) skewX(-15deg);
    }

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(106,137,181,.5);
    }

    .btn-submit:active {
        transform: translateY(0);
    }

    .btn-submit .spinner {
        width: 18px;
        height: 18px;
        border: 2px solid rgba(255,255,255,.3);
        border-top-color: white;
        border-radius: 50%;
        animation: spin .7s linear infinite;
        display: none;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-submit.loading .spinner {
    display: block;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-icon {
    display: none;
}

/* ── SUCCESS STATE ── */
.success-overlay {
    position: absolute;
    inset: 0;
    background: var(--surface-base);
    border-radius: var(--radius-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    text-align: center;
    padding: var(--space-2xl);
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s var(--ease-out-expo);
    z-index: 10;
}

    .success-overlay.visible {
        opacity: 1;
        pointer-events: all;
    }

.success-icon {
    width: 72px;
    height: 72px;
    background: rgba(16,185,129,.1);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 36px;
    color: var(--accent-success);
    animation: popIn .6s var(--ease-spring) forwards;
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.success-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── REVEAL ANIMATION ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all .8s var(--ease-out-expo);
}

    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }

.reveal-delay-1 {
    transition-delay: .1s;
}

.reveal-delay-2 {
    transition-delay: .2s;
}

.reveal-delay-3 {
    transition-delay: .3s;
}

/* ── FLOATING LABEL EFFECT (optional polish) ── */
.form-control:not(:placeholder-shown) + .field-icon,
.form-control:focus + .field-icon {
    color: var(--brand-500);
}

/* ── DARK MODE FORM ── */
[data-theme="dark"] .form-control {
    background: rgba(255,255,255,.04);
}

    [data-theme="dark"] .form-control:focus {
        background: rgba(255,255,255,.07);
    }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        flex-direction: row;
        flex-wrap: wrap;
    }

   /* .info-card {
        flex: 1 1 260px;
    }*/
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: var(--space-lg);
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-submit {
        width: 100%;
    }

    .contact-info {
        flex-direction: column;
    }
}

/* ── DEMO: theme toggle ── */
.demo-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    background: var(--surface-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-size: 20px;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all .3s;
}

    .demo-toggle:hover {
        background: var(--surface-sunken);
    }

    .demo-toggle i {
        transition: transform .5s var(--ease-spring);
    }

    .demo-toggle:hover i {
        transform: rotate(360deg);
    }



@keyframes shake {
    0%,100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}