/* Contact page — scoped to .page-contact only.
   Matches homepage/knowledge (--th-*) tokens; does not alter header/footer. */

.page-contact {
    --th-bg: #ffffff;
    --th-bg-soft: #f4f5f7;
    --th-ink: #101828;
    --th-ink-soft: #1f2937;
    --th-muted: #5c6570;
    --th-line: #e3e8ef;
    --th-line-strong: #cdd6e2;
    --th-navy: #0a1a3d;
    --th-accent: #1868c9;
    --th-focus: rgba(24, 104, 201, 0.18);
    --th-radius: 4px;
    --th-radius-field: 7px;
    --th-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ct-rail: 1100px;
    --ct-gap: 56px;
    background: var(--th-bg);
    color: var(--th-ink);
}

.page-contact .ct-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-contact .ct-rail {
    margin-inline: auto;
    width: min(100% - 3rem, var(--ct-rail));
    max-width: var(--ct-rail);
    box-sizing: border-box;
}

/* —— Hero: white, no checkerboard, no fixed height —— */
.page-contact .ct-hero {
    background: #fff;
    padding-block: 48px 28px;
}

.page-contact .ct-hero__rail {
    width: min(100% - 3rem, 720px);
    max-width: 720px;
}

.page-contact .ct-hero__eyebrow {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--th-muted);
    margin: 0 0 12px;
}

.page-contact .ct-hero__title {
    margin: 0 0 14px;
    font-size: clamp(1.75rem, 0.5rem + 2.5vw, 3rem); /* ~28–48 */
    font-weight: 700;
    line-height: 1.2;
    color: var(--th-navy);
    text-wrap: pretty;
}

.page-contact .ct-hero__lead {
    margin: 0;
    font-size: 1.0625rem; /* ~17px */
    line-height: 1.65;
    color: var(--th-ink-soft);
    max-width: 42rem;
}

/* —— Main two-column layout —— */
.page-contact .ct-main {
    padding-block: 8px 72px;
}

.page-contact .ct-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); /* form ~60% / info ~40% in RTL: first = right */
    gap: var(--ct-gap);
    align-items: start;
}

/* —— Form column —— */
.page-contact .ct-form-col {
    min-width: 0;
}

.page-contact .ct-form-heading {
    margin: 0 0 22px;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--th-navy);
}

.page-contact .ct-form {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.page-contact .ct-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 22px;
}

.page-contact .ct-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.page-contact .ct-field--full {
    grid-column: 1 / -1;
}

.page-contact .ct-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--th-ink);
    line-height: 1.3;
}

.page-contact .ct-req {
    color: var(--th-navy);
    font-weight: 700;
}

.page-contact .ct-opt {
    font-weight: 400;
    color: var(--th-muted);
    font-size: 0.875rem;
}

.page-contact .ct-hint {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--th-muted);
}

.page-contact .ct-input,
.page-contact .ct-select,
.page-contact .ct-textarea {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--th-ink);
    background: #fff;
    border: 1px solid var(--th-line-strong);
    border-radius: var(--th-radius-field);
    padding: 0 14px;
    min-height: 48px;
    transition: border-color 160ms var(--th-ease), box-shadow 160ms var(--th-ease);
    appearance: none;
    -webkit-appearance: none;
}

.page-contact .ct-textarea {
    min-height: 150px;
    height: 150px;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.55;
}

.page-contact .ct-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5 L10 12.5 L15 7.5' stroke='%235c6570' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center; /* chevron on physical left = inline-end in RTL */
    padding-inline-start: 14px;
    padding-inline-end: 40px;
    cursor: pointer;
}

.page-contact .ct-input:focus,
.page-contact .ct-select:focus,
.page-contact .ct-textarea:focus {
    outline: none;
    border-color: var(--th-accent);
    box-shadow: 0 0 0 3px var(--th-focus);
}

.page-contact .ct-input[aria-invalid="true"],
.page-contact .ct-select[aria-invalid="true"],
.page-contact .ct-textarea[aria-invalid="true"] {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.page-contact .ct-field-error {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #c0392b;
    min-height: 0;
}

.page-contact .ct-field-error:empty {
    display: none;
}

.page-contact .ct-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.page-contact .ct-status {
    display: none;
    padding: 12px 14px;
    border-radius: var(--th-radius-field);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.page-contact .ct-status--ok {
    display: block;
    background: #e8f6f0;
    color: #1a7a52;
}

.page-contact .ct-status--err {
    display: block;
    background: #fdecec;
    color: #c0392b;
}

.page-contact .ct-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    width: 100%;
    max-width: 280px;
    padding: 12px 22px;
    margin: 4px 0 0;
    border: 1px solid var(--th-navy);
    border-radius: var(--th-radius);
    background: var(--th-navy);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: none;
    transition: background 180ms var(--th-ease), border-color 180ms var(--th-ease), opacity 180ms var(--th-ease);
}

.page-contact .ct-submit:hover:not(:disabled) {
    background: #10254f;
    border-color: #10254f;
    color: #fff;
}

.page-contact .ct-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--th-focus);
}

.page-contact .ct-submit:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.page-contact .ct-privacy {
    margin: 4px 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--th-muted);
}

.page-contact .ct-privacy a {
    color: var(--th-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-contact .ct-privacy a:hover {
    color: var(--th-navy);
}

/* —— Info column —— */
.page-contact .ct-info {
    min-width: 0;
    padding-inline-start: 28px;
    border-inline-start: 1px solid var(--th-line);
}

.page-contact .ct-info__block {
    padding-block: 4px 22px;
    margin: 0;
}

.page-contact .ct-info__block + .ct-info__block {
    border-top: 1px solid var(--th-line);
    padding-top: 22px;
}

.page-contact .ct-info__title {
    margin: 0 0 8px;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--th-navy);
}

.page-contact .ct-info__text {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--th-ink-soft);
}

.page-contact .ct-info__text:last-child {
    margin-bottom: 0;
}

.page-contact .ct-info__note {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--th-muted);
}

.page-contact .ct-info__link {
    display: inline-block;
    max-width: 100%;
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--th-accent);
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.page-contact .ct-info__link:hover {
    color: var(--th-navy);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-contact .ct-info__link[dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
}

/* —— Responsive —— */
@media (max-width: 900px) {
    .page-contact {
        --ct-gap: 40px;
    }

    .page-contact .ct-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .page-contact .ct-info {
        padding-inline-start: 0;
        border-inline-start: 0;
        border-top: 1px solid var(--th-line);
        padding-top: 28px;
    }

    .page-contact .ct-submit {
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .page-contact .ct-rail,
    .page-contact .ct-hero__rail {
        width: min(100% - 2.5rem, var(--ct-rail)); /* ~20px each side */
    }

    .page-contact .ct-hero {
        padding-block: 36px 20px;
    }

    .page-contact .ct-hero__title {
        font-size: clamp(1.75rem, 6vw, 2.125rem); /* 28–34 */
    }

    .page-contact .ct-hero__lead {
        font-size: 1.0625rem;
    }

    .page-contact .ct-main {
        padding-block: 4px 56px;
    }

    .page-contact .ct-form__row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-contact .ct-form {
        gap: 20px;
    }

    .page-contact .ct-layout {
        gap: 32px;
    }

    .page-contact .ct-info {
        padding-top: 24px;
    }

    .page-contact .ct-info__block {
        padding-block: 4px 18px;
    }

    .page-contact .ct-info__block + .ct-info__block {
        padding-top: 18px;
    }
}

@media (max-width: 400px) {
    .page-contact .ct-rail,
    .page-contact .ct-hero__rail {
        width: min(100% - 2.5rem, var(--ct-rail));
    }
}
