/* =========================================================
   CIBERRA CONTACT PAGE
   ========================================================= */


/* =========================================================
   1. Page structure
   ========================================================= */

.contact-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 112px;
}

.contact-hero::before {
    content: "";
    position: absolute;
    top: -220px;
    right: -180px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background:
        radial-gradient(circle,
            rgba(143, 169, 155, 0.22) 0%,
            rgba(143, 169, 155, 0) 70%);
    pointer-events: none;
}

.contact-hero-grid {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
    gap: 72px;
    align-items: start;
}


/* =========================================================
   2. Introduction
   ========================================================= */

.contact-introduction {
    position: sticky;
    top: 120px;
}

.contact-introduction h1 {
    max-width: 700px;
    margin: 22px 0 24px;

    font-size: clamp(3rem, 6vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.055em;
    color: var(--ink);
}

.contact-lead {
    max-width: 620px;
    margin: 0;

    font-size: 1.14rem;
    line-height: 1.75;
    color: var(--ink-soft);
}

.contact-notes {
    display: grid;
    gap: 18px;
    margin-top: 44px;
}

.contact-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;

    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.contact-note-number {
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;

    border: 1px solid rgba(47, 93, 80, 0.22);
    border-radius: 50%;

    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.55);
}

.contact-note h2 {
    margin: 2px 0 7px;

    font-size: 1rem;
    line-height: 1.3;
    color: var(--ink);
}

.contact-note p {
    max-width: 470px;
    margin: 0;

    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--ink-soft);
}


/* =========================================================
   3. Form panel
   ========================================================= */

.contact-form-panel {
    padding: clamp(28px, 5vw, 52px);

    border: 1px solid var(--line);
    border-radius: var(--radius-lg);

    background:
        linear-gradient(145deg,
            rgba(255, 255, 255, 0.94),
            rgba(239, 232, 220, 0.72));

    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.contact-form-heading {
    margin-bottom: 34px;
}

.contact-form-heading h2 {
    margin: 10px 0 12px;

    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.contact-form-heading p {
    max-width: 580px;
    margin: 0;

    line-height: 1.65;
    color: var(--ink-soft);
}


/* =========================================================
   4. Form fields
   ========================================================= */

.contact-form {
    display: grid;
    gap: 24px;
}

.form-row--two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-field {
    min-width: 0;
}

.form-field label {
    display: inline-block;
    margin-bottom: 9px;

    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--ink);
}

.form-field label span {
    color: var(--clay);
}

.form-field input,
.form-field textarea {
    display: block;
    width: 100%;

    border: 1px solid rgba(23, 33, 30, 0.18);
    border-radius: 14px;

    font: inherit;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);

    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.form-field input {
    min-height: 54px;
    padding: 0 16px;
}

.form-field textarea {
    min-height: 220px;
    padding: 16px;
    line-height: 1.65;
    resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(77, 92, 86, 0.68);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--primary);
    background: var(--surface);

    box-shadow:
        0 0 0 4px rgba(47, 93, 80, 0.1);
}

.message-label-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.character-counter {
    flex-shrink: 0;

    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
}

.character-counter--near-limit {
    color: var(--ochre);
}

.character-counter--at-limit {
    font-weight: 700;
    color: var(--clay);
}

.field-help {
    margin: 8px 0 0;

    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

.field-error {
    margin: 8px 0 0;

    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--clay);
}


/* =========================================================
   5. Messages
   ========================================================= */

.form-messages {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.form-message {
    padding: 14px 16px;

    border: 1px solid var(--line);
    border-radius: 12px;

    font-size: 0.9rem;
    line-height: 1.55;
}

.form-message--success {
    border-color: rgba(47, 93, 80, 0.28);
    color: var(--primary-dark);
    background: rgba(143, 169, 155, 0.18);
}

.form-message--warning {
    border-color: rgba(201, 162, 74, 0.36);
    color: #654f18;
    background: rgba(201, 162, 74, 0.14);
}

.form-message--error {
    border-color: rgba(167, 93, 58, 0.35);
    color: #753b24;
    background: rgba(167, 93, 58, 0.12);
}


/* =========================================================
   6. Submit area
   ========================================================= */

.contact-form-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;

    padding-top: 8px;
}

.privacy-note {
    max-width: 360px;
    margin: 0;

    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

.contact-submit {
    flex-shrink: 0;
    gap: 10px;
    border: 0;
    cursor: pointer;
}

.contact-submit span {
    transition: transform 0.18s ease;
}

.contact-submit:hover span {
    transform: translateX(4px);
}


/* =========================================================
   7. Honeypot
   ========================================================= */

.honeypot-field {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;

    white-space: nowrap !important;
}


/* =========================================================
   8. Responsive
   ========================================================= */

@media (max-width: 1040px) {
    .contact-hero-grid {
        grid-template-columns: 1fr;
        gap: 54px;
    }

    .contact-introduction {
        position: static;
    }

    .contact-lead {
        max-width: 760px;
    }

    .contact-notes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .contact-note {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .contact-hero {
        padding: 68px 0 82px;
    }

    .contact-introduction h1 {
        font-size: clamp(2.8rem, 15vw, 4.5rem);
    }

    .contact-notes,
    .form-row--two {
        grid-template-columns: 1fr;
    }

    .contact-form-panel {
        padding: 26px 20px;
    }

    .contact-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .contact-submit {
        justify-content: center;
        width: 100%;
    }
}