/* ------------------------------------------------------------------
   Reach out: intro + request-demo form
   ------------------------------------------------------------------ */

.contact {
    width: 100%;
    padding-bottom: clamp(4rem, 10vh, 7rem);
}

.contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
    gap: clamp(2rem, 5vw, 5rem);
    width: min(1320px, 92vw);
    margin: 2.5rem auto 0;
}

/* ---------- intro ---------- */
.contact__intro {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-top: 1rem;
}
.contact__title {
    font-family: Orenburg;
    font-weight: 400;
    font-size: clamp(1.7rem, 2.6vw, 2.4rem);
    line-height: 1.25;
    text-wrap: balance;
    background: linear-gradient(180deg, #fff 35%, #9a9ca3 120%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.contact__sub {
    font-family: Arkitech;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.contact__info {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.4rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.contact__info li {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}
.contact__label {
    font-family: Arkitech;
    font-size: 0.56rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}
.contact__info a {
    width: fit-content;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) no-repeat 0 100% /
        0 1px;
    transition: background-size 0.35s var(--ease-out);
}
.contact__info a:hover,
.contact__info a:focus-visible {
    background-size: 100% 1px;
}

/* ---------- form card ---------- */
.contact__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: clamp(1.4rem, 3vw, 2.4rem);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: radial-gradient(
            100% 70% at 100% 0%,
            rgba(185, 195, 235, 0.08),
            transparent 60%
        ),
        linear-gradient(160deg, #141519 0%, #0b0b0d 60%);
    box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

.field {
    position: relative;
    min-width: 0;
}
.field--full {
    grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 1.55rem 1rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    outline: none;
    transition: border-color 0.25s ease, background-color 0.25s ease,
        box-shadow 0.25s ease;
}
.field textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}
.field select {
    appearance: none;
    cursor: pointer;
    padding-right: 2.5rem;
    background-image: linear-gradient(45deg, transparent 50%, #aaa 50%),
        linear-gradient(135deg, #aaa 50%, transparent 50%);
    background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.field select option {
    color: #000;
}

.field label {
    position: absolute;
    left: 1rem;
    top: 1.25rem;
    font-family: Arkitech;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transform-origin: 0 0;
    transition: transform 0.25s var(--ease-out), color 0.25s ease;
}
/* float the label once the field has focus or a value */
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field--select label {
    transform: translateY(-0.72rem) scale(0.82);
    color: rgba(255, 255, 255, 0.65);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: rgba(255, 255, 255, 0.2);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(255, 255, 255, 0.55);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.field [aria-invalid="true"] {
    border-color: #ff6b5b;
    box-shadow: 0 0 0 4px rgba(255, 107, 91, 0.12);
}
.field [aria-invalid="true"] + label {
    color: #ff8a7d;
}

/* autofill on dark background */
.field input:-webkit-autofill {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #15161a inset;
    caret-color: #fff;
}

/* ---------- actions ---------- */
.contact__actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}
.contact__submit {
    min-width: 200px;
}

.check {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
}
.check:hover {
    color: rgba(255, 255, 255, 0.85);
}
.check input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.check__box {
    position: relative;
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.check__box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #0a0a0a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s var(--ease-out);
}
.check input:checked + .check__box {
    background: #f2f2f2;
    border-color: #f2f2f2;
}
.check input:checked + .check__box::after {
    transform: rotate(45deg) scale(1);
}
.check input:focus-visible + .check__box {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

@media (max-width: 980px) {
    .contact__grid {
        grid-template-columns: 1fr;
    }
    .contact__intro {
        text-align: center;
        align-items: center;
        padding-top: 0;
    }
    .contact__info {
        width: 100%;
        align-items: center;
    }
    .contact__info li {
        align-items: center;
    }
}

@media (max-width: 560px) {
    .contact__form {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 1.1rem;
        border-radius: 18px;
    }
    .contact__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .contact__submit {
        width: 100%;
    }
}
