:root {
    --bg-main: #FFF4E8;
    --accent: #D4805E;
    --accent-dark: #292522;
    --text-primary: #292522;
    --input-bg: #F2E8DC;
    --contact-paper: #FFF4E8;
    --contact-ink: #292522;
    --contact-accent: #D4805E;
    --contact-input: #F2E8DC;
    --contact-rule: #DFD5CA;
}

html {
    min-width: 320px;
    background: var(--contact-paper);
}

body.contact-page {
    min-width: 320px;
    min-height: 100vh;
    overflow-x: clip;
    background: var(--contact-paper);
    color: var(--contact-ink);
}

.contact-page ::selection {
    background: var(--contact-accent);
    color: var(--contact-paper);
}

.contact-page .static-site-header {
    --static-header-ink: var(--contact-ink);
    --static-header-paper: var(--contact-paper);
}

.contact-main {
    width: 100%;
}

.contact-page .contact-section {
    display: grid;
    width: min(1200px, calc(100% - 48px));
    max-width: none;
    min-height: auto;
    grid-template-columns: minmax(0, 0.82fr) minmax(430px, 1.18fr);
    gap: clamp(48px, 7vw, 104px);
    align-items: start;
    justify-content: initial;
    padding: clamp(88px, 9vw, 128px) 0 clamp(96px, 10vw, 144px);
    margin: 0 auto;
}

.contact-intro {
    position: sticky;
    top: 112px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 8px;
    animation: contact-rise 680ms cubic-bezier(0.22, 1, 0.36, 1) 40ms both;
}

.contact-page .contact-title {
    max-width: 100%;
    margin: 0;
    color: var(--contact-ink);
    font-family: 'Libre Caslon Condensed', Georgia, serif;
    font-size: clamp(76px, 8vw, 108px);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.92;
}

.contact-page .contact-subtitle {
    max-width: 410px;
    margin: 0;
    color: var(--contact-ink);
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 26px;
    opacity: 0.68;
}

.contact-page .contact-form-animator {
    padding: clamp(24px, 3vw, 40px);
    border: 1px solid var(--contact-rule);
    border-radius: 32px;
    background: var(--contact-input);
    box-shadow: 0 24px 72px rgba(41, 37, 34, 0.08);
    animation: contact-rise 720ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
}

.contact-page .contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.contact-page .contact-label {
    color: var(--contact-ink);
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 21px;
    opacity: 1;
}

.contact-page .contact-input,
.contact-page .contact-textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--contact-rule);
    border-radius: 16px;
    outline: none;
    background: var(--contact-paper);
    color: var(--contact-ink);
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 24px;
    -webkit-font-smoothing: antialiased;
    transition: border-color 180ms ease, background-color 180ms ease;
}

.contact-page .contact-input {
    height: 56px;
}

.contact-page .contact-textarea {
    min-height: 196px;
    resize: vertical;
}

.contact-page .contact-input::placeholder,
.contact-page .contact-textarea::placeholder {
    color: var(--contact-ink);
    opacity: 0.7;
}

.contact-page .contact-input:focus,
.contact-page .contact-textarea:focus,
.contact-page .contact-input:focus-visible,
.contact-page .contact-textarea:focus-visible {
    border-color: var(--contact-accent);
    outline: none;
    background: var(--contact-paper);
    box-shadow: none;
}

.contact-page .contact-submit {
    display: flex;
    align-self: flex-start;
    margin-top: 4px;
}

.contact-page .contact-submit .btn-primary {
    display: inline-flex;
    min-width: 221px;
    height: 52px;
    align-items: center;
    justify-content: center;
    padding: 16px 38px;
    border: 0;
    border-radius: 999px;
    background: var(--contact-accent);
    color: var(--contact-ink);
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 19px;
    cursor: pointer;
    transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 180ms ease;
}

.contact-page .contact-submit .btn-primary:active {
    transform: translateY(0) scale(0.985);
}

.contact-page .contact-mailto-note {
    max-width: 430px;
    margin: 0;
    color: var(--contact-ink);
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    opacity: 0.62;
}

.contact-page .contact-mailto-note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-page .contact-footer {
    --contact-footer-gutter: clamp(32px, 4.25vw, 80px);
    position: relative;
    display: flex;
    width: calc(100% - 32px);
    max-width: none;
    min-height: 680px;
    flex-direction: column;
    padding: 64px var(--contact-footer-gutter) 0;
    margin: 0 16px 16px;
    overflow: hidden;
    border-radius: 32px;
    background: var(--contact-accent);
    color: var(--contact-ink);
}

.contact-footer-content {
    position: relative;
    z-index: 1;
    width: min(1200px, 100%);
    margin: 0 auto;
}

.contact-page .contact-footer .footer-divider {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--contact-ink);
    margin: 0 0 48px;
    opacity: 0.46;
}

.contact-page .contact-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    text-align: left;
}

.contact-page .contact-footer .footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.contact-page .contact-footer .footer-heading {
    margin: 0 0 4px;
    color: var(--contact-ink);
    font-family: 'Libre Caslon Condensed', Georgia, serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 31px;
}

.contact-page .contact-footer .footer-col a {
    position: relative;
    color: var(--contact-ink);
    font-size: 20px;
    font-weight: 400;
    line-height: 26px;
    opacity: 1;
}

.contact-page .contact-footer .footer-col a::after {
    position: absolute;
    right: 0;
    bottom: -2px;
    left: 0;
    height: 1px;
    content: '';
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 220ms ease;
}

.contact-page .contact-footer .footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--contact-ink);
    margin-top: 56px;
    text-align: left;
    opacity: 1;
}

.contact-page .contact-footer .copyright {
    margin: 0;
    color: var(--contact-ink);
    font-size: 14px;
    line-height: 20px;
}

.contact-footer-wordmark {
    display: block;
    width: calc(100% + var(--contact-footer-gutter) + var(--contact-footer-gutter));
    height: auto;
    max-width: none;
    margin-top: auto;
    margin-right: calc(0px - var(--contact-footer-gutter));
    margin-left: calc(0px - var(--contact-footer-gutter));
    transform: translateY(1px);
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .contact-page .contact-submit .btn-primary:hover,
    .contact-page .contact-submit .btn-primary:focus-visible {
        background: var(--contact-ink);
        color: var(--contact-paper);
        opacity: 1;
        transform: translateY(-2px);
    }

    .contact-page .contact-footer .footer-col a:hover::after,
    .contact-page .contact-footer .footer-col a:focus-visible::after {
        opacity: 1;
        transform: scaleX(1);
        transform-origin: left;
    }
}

@keyframes contact-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .contact-page .contact-section {
        width: min(720px, calc(100% - 48px));
        grid-template-columns: 1fr;
        gap: 48px;
        padding-top: 72px;
        padding-bottom: 96px;
    }

    .contact-intro {
        position: static;
        gap: 20px;
        padding-top: 0;
    }

    .contact-page .contact-subtitle {
        max-width: 560px;
    }
}

@media (max-width: 700px) {
    .contact-page .contact-footer .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 40px;
    }
}

@media (max-width: 640px) {
    .contact-page .contact-section {
        width: calc(100% - 24px);
        gap: 36px;
        padding: 56px 0 72px;
    }

    .contact-page .contact-title {
        font-size: clamp(58px, 20vw, 82px);
        letter-spacing: -0.04em;
        line-height: 0.94;
    }

    .contact-page .contact-subtitle {
        font-size: 17px;
        line-height: 23px;
    }

    .contact-page .contact-form-animator {
        padding: 24px;
        border-radius: 24px;
        box-shadow: 0 18px 48px rgba(41, 37, 34, 0.07);
    }

    .contact-page .contact-form {
        gap: 18px;
    }

    .contact-page .contact-textarea {
        min-height: 172px;
    }

    .contact-page .contact-submit,
    .contact-page .contact-submit .btn-primary {
        width: 100%;
    }

    .contact-page .contact-footer {
        --contact-footer-gutter: 24px;
        width: calc(100% - 24px);
        min-height: 620px;
        padding: 48px 24px 0;
        border-radius: 24px;
        margin: 0 12px 12px;
    }

    .contact-page .contact-footer .footer-divider {
        margin-bottom: 40px;
    }

    .contact-page .contact-footer .footer-col a {
        font-size: 17px;
        line-height: 23px;
    }

    .contact-page .contact-footer .footer-bottom {
        margin-top: 44px;
    }

}

@media (forced-colors: active) {
    .contact-page .contact-input:focus-visible,
    .contact-page .contact-textarea:focus-visible {
        outline: 2px solid CanvasText;
        outline-offset: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-intro,
    .contact-page .contact-form-animator {
        animation: none;
    }

    .contact-page *,
    .contact-page *::before,
    .contact-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
