/* =========================================================
   KHOJA – Contact page redesign
   Da incollare in FONDO a style.css (dopo tutte le altre regole)
   Tutte le classi hanno prefisso .kc- per non toccare il resto del sito
   ========================================================= */

.kc {
    --kc-brand: #6F3619;
    --kc-brand-dark: #55290f;
    --kc-brand-soft: #f3e9e2;
    --kc-ink: #1b1512;
    --kc-muted: #7b6f68;
    --kc-line: #e9e2dc;
    --kc-card: #ffffff;
    --kc-radius: 18px;
    --kc-shadow: 0 1px 2px rgba(40, 20, 8, .04), 0 12px 32px -12px rgba(40, 20, 8, .12);
    padding-bottom: clamp(40px, 6vw, 90px);
}

/* reset locale: il sito ha font-weight 700 su tutto e margini sui <p> */
.kc *,
.kc *::before,
.kc *::after {
    font-weight: 400;
}
.kc p,
.kc h2,
.kc h3 {
    margin: 0;
}
.kc a {
    text-decoration: none;
    color: inherit;
}
.kc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kc-wrap {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 80px);
}

/* ---------- INTRO + CANALI ---------- */
.kc-intro {
    padding: clamp(40px, 6vw, 80px) 0 clamp(24px, 3vw, 40px);
}
.kc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--kc-brand);
    font-weight: 700;
}
.kc-eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--kc-brand);
    border-radius: 2px;
}
.kc-title {
    margin-top: 14px !important;
    max-width: 18ch;
    font-size: clamp(30px, 4.6vw, 54px);
    line-height: 1.08;
    letter-spacing: -.02em;
    color: var(--kc-ink);
    font-weight: 900;
}

.kc-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: clamp(28px, 4vw, 48px) !important;
    max-width: 760px;
}
.kc-channel {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--kc-card);
    border: 1px solid var(--kc-line);
    border-radius: var(--kc-radius);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.kc-channel:hover {
    transform: translateY(-3px);
    border-color: var(--kc-brand);
    box-shadow: var(--kc-shadow);
}
.kc-channel__icon {
    flex: 0 0 48px;
    height: 48px;
    display: grid !important;
    place-items: center;
    border-radius: 14px;
    background: var(--kc-brand-soft);
    color: var(--kc-brand);
    font-size: 19px;
    transition: background .25s ease, color .25s ease;
}
.kc-channel:hover .kc-channel__icon {
    background: var(--kc-brand);
    color: #fff;
}
.kc-channel__icon i {
    font-weight: 400;
}
.kc-channel__body {
    flex: 1;
    min-width: 0;
}
.kc-channel__label {
    display: block;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--kc-muted);
    margin-bottom: 3px;
}
.kc-channel__value {
    display: block !important;
    font-size: 16px;
    color: var(--kc-ink);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kc-channel__arrow {
    color: var(--kc-muted);
    font-size: 14px;
    transition: transform .25s ease, color .25s ease;
}
.kc-channel:hover .kc-channel__arrow {
    transform: translateX(4px);
    color: var(--kc-brand);
}

/* ---------- FORM + REFERENTI ---------- */
.kc-main {
    padding: clamp(8px, 2vw, 20px) 0 0;
}
.kc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 36px);
    align-items: start;
}

.kc-card {
    background: var(--kc-card);
    border: 1px solid var(--kc-line);
    border-radius: 24px;
    box-shadow: var(--kc-shadow);
    padding: clamp(24px, 4vw, 52px);
}

.kc-card__title {
    margin-top: 12px !important;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: -.015em;
    color: var(--kc-ink);
    font-weight: 900;
}

.kc-form {
    margin-top: clamp(22px, 3vw, 34px);
    display: grid;
    gap: 16px;
}
.kc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* campi con label flottante */
.kc-field {
    position: relative;
}
.kc-form#answerForm .kc-input {
    width: 100%;
    margin: 0;
    padding: 26px 18px 10px;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--kc-ink);
    background: #faf7f4;
    border: 1.5px solid transparent;
    border-radius: 14px;
    outline: none;
    box-shadow: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.kc-form#answerForm textarea.kc-input {
    min-height: 170px;
    resize: vertical;
}
.kc-form#answerForm .kc-input:hover {
    background: #f6f1ed;
}
.kc-form#answerForm .kc-input:focus {
    background: #fff;
    border-color: var(--kc-brand);
    box-shadow: 0 0 0 4px rgba(111, 54, 25, .12);
}
.kc-field label {
    position: absolute;
    left: 19px;
    top: 19px;
    font-size: 15px;
    color: var(--kc-muted);
    pointer-events: none;
    transform-origin: left top;
    transition: transform .2s ease, color .2s ease;
}
.kc-input:focus + label,
.kc-input:not(:placeholder-shown) + label {
    transform: translateY(-11px) scale(.76);
    color: var(--kc-brand);
}

.kc-submit {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}
.kc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 17px 34px;
    font-size: 15px;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
    background: var(--kc-brand);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 22px -8px rgba(111, 54, 25, .6);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.kc-btn i {
    font-size: 13px;
    transition: transform .2s ease;
}
.kc-btn:hover {
    background: var(--kc-brand-dark);
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -8px rgba(111, 54, 25, .65);
}
.kc-btn:hover i {
    transform: translateX(4px);
}
.kc-btn:active {
    transform: translateY(0);
}
.kc-btn:focus-visible {
    outline: 3px solid rgba(111, 54, 25, .35);
    outline-offset: 3px;
}

.kc-error {
    padding: 12px 16px;
    border-radius: 12px;
    background: #fdecea;
    color: #a12a1f;
    font-size: 14px;
    font-weight: 700;
}
.kc-error h3 {
    font-size: 14px;
    font-weight: 700;
}

/* ---------- SIDEBAR REFERENTI ---------- */
.kc-side {
    position: sticky;
    top: 140px; /* spazio per l'header sticky */
    padding: clamp(22px, 3vw, 34px);
}
.kc-side__title {
    font-size: 22px;
    letter-spacing: -.01em;
    color: var(--kc-ink);
    font-weight: 900;
    margin-bottom: 22px !important;
}
.kc-person {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--kc-line);
}
.kc-person:first-of-type {
    border-top: 0;
    padding-top: 0;
}
.kc-person:last-child {
    padding-bottom: 0;
}
.kc-person img {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--kc-brand-soft), 0 6px 14px -4px rgba(40, 20, 8, .25);
}
.kc-person__name {
    display: block;
    font-size: 17px;
    color: var(--kc-ink);
    font-weight: 700;
}
.kc-person__role {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--kc-muted);
    line-height: 1.4;
}
.kc-person__ig {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--kc-brand);
    background: var(--kc-brand-soft);
    border-radius: 999px;
    font-weight: 700;
    transition: background .2s ease, color .2s ease;
}
.kc-person__ig:hover {
    background: var(--kc-brand);
    color: #fff;
}

/* ---------- ANIMAZIONE INGRESSO ---------- */
@media (prefers-reduced-motion: no-preference) {
    .kc-intro .kc-wrap > *,
    .kc-card {
        animation: kcRise .6s cubic-bezier(.2, .7, .2, 1) both;
    }
    .kc-channels { animation-delay: .1s !important; }
    .kc-card:nth-child(2) { animation-delay: .12s; }
}
@keyframes kcRise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
    .kc-grid {
        grid-template-columns: 1fr;
    }
    .kc-side {
        position: static;
    }
}
@media (max-width: 560px) {
    .kc-row {
        grid-template-columns: 1fr;
    }
    .kc-card {
        border-radius: 20px;
    }
    .kc-btn {
        width: 100%;
    }
    .kc-channels {
        grid-template-columns: 1fr;
    }
}
