:root {
    --brand-blue: #1f7cf2;
    --brand-cyan: #16a8e2;
    --brand-navy: #153450;
    --text-main: #153450;
    --text-soft: #67809a;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: #ffffff;
    --border: rgba(31, 124, 242, 0.18);
    --border-strong: rgba(31, 124, 242, 0.34);
    --shadow: 0 26px 70px rgba(15, 62, 116, 0.16);
    --error-bg: #fff1f1;
    --error-text: #b42318;
    --success-bg: #edf9f1;
    --success-text: #166534;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

body {
    font-family: Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(31, 124, 242, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(22, 168, 226, 0.2), transparent 26%),
        linear-gradient(135deg, #f7fbff 0%, #e4f1ff 54%, #f5fbff 100%);
}

.contact-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 36px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-card {
    width: min(100%, 760px);
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.contact-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--brand-blue);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.contact-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
}

.subtitle {
    margin: 12px 0 0;
    max-width: 46ch;
    color: var(--text-soft);
    line-height: 1.6;
}

.brand-logo {
    width: 96px;
    height: auto;
    flex-shrink: 0;
}

.form-status {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(22, 168, 226, 0.08);
    border: 1px solid rgba(22, 168, 226, 0.12);
    color: var(--brand-navy);
    line-height: 1.5;
}

.form-status.success {
    background: var(--success-bg);
    border-color: rgba(22, 101, 52, 0.12);
    color: var(--success-text);
}

.form-status.error {
    background: var(--error-bg);
    border-color: rgba(180, 35, 24, 0.12);
    color: var(--error-text);
}

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

.field-group {
    display: grid;
    gap: 8px;
}

.field-group label {
    font-weight: 700;
}

.field-group input,
.field-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(21, 52, 80, 0.14);
    border-radius: 16px;
    background: var(--surface-strong);
    color: var(--text-main);
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.field-group input:focus,
.field-group textarea:focus {
    border-color: var(--border-strong);
    box-shadow: 0 0 0 4px rgba(31, 124, 242, 0.1);
}

.field-group textarea {
    resize: vertical;
    min-height: 150px;
}

.field-group input.is-invalid,
.field-group textarea.is-invalid {
    border-color: rgba(180, 35, 24, 0.55);
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08);
}

.field-hint,
.field-error,
.message-counter {
    margin: 0;
    font-size: 0.92rem;
}

.field-hint,
.message-counter {
    color: var(--text-soft);
}

.field-error {
    color: var(--error-text);
}

.message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.message-counter.is-invalid {
    color: var(--error-text);
}

.contact-form button {
    margin-top: 8px;
    justify-self: start;
    min-width: 220px;
    padding: 15px 24px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-cyan) 100%);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(31, 124, 242, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.contact-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 40px rgba(31, 124, 242, 0.28);
}

.hidden {
    display: none;
}

@media (max-width: 640px) {
    .contact-shell {
        padding: 18px 12px;
    }

    .contact-card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .contact-hero {
        flex-direction: column-reverse;
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .brand-logo {
        width: 82px;
    }

    .contact-form button {
        width: 100%;
        justify-self: stretch;
    }
}
