:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #142948;
    background: #071630;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: clamp(16px, 5vw, 56px);
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at 50% 15%, #23467e, #0f2852 47%, #071630 83%);
}

#contact-snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.contact-stage {
    position: relative;
    width: min(100%, 650px);
    perspective: 900px;
}

.contact-card {
    padding: clamp(27px, 6vw, 52px) clamp(18px, 6vw, 44px);
    background: linear-gradient(160deg, #fff, #f3f8ff);
    text-align: center;
    border: 1px solid #dcecff;
    border-radius: 24px;
    box-shadow: 0 26px 72px #030e28aa, 0 0 48px #81b9ff38;
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform 150ms ease-out;
}

.contact-icon {
    display: block;
    margin: 0 auto 22px;
}

h1, h2 {
    margin: 0;
    letter-spacing: -.035em;
    line-height: 1.15;
}

h1 {
    margin-bottom: 16px;
    font-size: clamp(1.85rem, 6vw, 2.7rem);
}

h2 { font-size: clamp(1.35rem, 5vw, 1.7rem); }

p {
    margin: 0;
    color: #465a76;
    line-height: 1.55;
}

button, .contact-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    max-width: 100%;
    padding: 10px 19px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: #095bad;
    color: #fff;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

button:hover:enabled { background: #084785; }
button:disabled { opacity: .55; cursor: not-allowed; }
:where(button, a, input):focus-visible { outline: 3px solid #276ebe; outline-offset: 3px; }
#contact-email { margin-top: 25px; padding-inline: 28px; }
noscript p { margin-top: 14px; }

dialog {
    width: min(440px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100% - 32px);
    padding: clamp(18px, 5vw, 28px);
    border: 1px solid #dcecff;
    border-radius: 20px;
    box-shadow: 0 22px 80px #020c20b3;
    background: #f8fbff;
    color: #142948;
}

dialog::backdrop { background: #061128c4; }

.dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.close-button {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    background: #e7f0fc;
    color: #17365d;
    font-size: 1.4rem;
}

.close-button:hover:enabled { background: #d6e7fa; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 650;
}

.captcha-frame {
    display: grid;
    place-items: center;
    min-height: 68px;
    margin-bottom: 12px;
    background: #eaf2fb;
    border-radius: 9px;
}

#contact-challenge { max-width: 100%; height: auto; }

input {
    width: 100%;
    min-height: 46px;
    padding: 8px 11px;
    border: 1px solid #9cb4cf;
    border-radius: 9px;
    background: #fff;
    color: #142948;
    font: inherit;
}

#contact-answer { text-transform: uppercase; }
#contact-verify { margin-top: 12px; }

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.contact-actions a {
    background: #e7f0fc;
    color: #174e8a;
    border-color: #bbcfe7;
}

.contact-actions a:hover { background: #d6e7fa; }
#contact-status:not(:empty) { margin-top: 10px; font-size: .92rem; }

@media (prefers-reduced-motion: reduce) {
    #contact-snow { display: none; }
    .contact-card { transform: none; transition: none; }
}
