@font-face {
    font-family: "Anek Telugu";
    src: url('../fonts/anek-telugu-latin-300.woff2') format('woff2');
    font-style: normal;
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: "Anek Telugu";
    src: url('../fonts/anek-telugu-latin-500.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Farnham Headline";
    src: url('../fonts/FarnhamHeadline-Light.otf') format('opentype');
    font-style: normal;
    font-weight: 300;
    font-display: swap;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    background: url('../img/fathom-bg.webp') no-repeat;
    background-size: cover;
    background-position: center;
}

header {
    padding-top: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .logo svg {
    display: block;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding-inline: 48px;
}

.grid {
    margin-top:100px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-column-gap: 24px;
    grid-row-gap: 80px;
}

.grid > div:first-child {
    grid-column: 1 / span 7;
    grid-row: 1;
}

.grid > div:last-child {
    grid-column: 1 / span 4;
    grid-row: 2;
}

@media (min-width: 1220px) {
    body {
        --hero-top: max(78px, 33.4dvh);
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .grid {
        /* Include the header's 34px top padding and 44px button height. */
        margin-top: calc(var(--hero-top) - 78px);
    }

    .grid h1 {
        margin-top: 0;
    }
}

@media (min-width: 768px) and (max-width: 1219px) {
    .grid > div:first-child {
        grid-column: 1 / span 7;
    }

    .grid > div:last-child {
        grid-column: 1 / span 5;
    }

    .grid {
        margin-top: max(0px, calc(33.4dvh - 78px));
        grid-row-gap: 56px;
    }

    .grid h1 {
        margin: 0;
        font-size: 40px;    
        line-height: 46px;
    }

    .grid p {
        margin: 0;
    }
}

@media (min-width: 768px) and (max-width: 1000px) {
    .grid > div:first-child {
        grid-column: 1 / span 8;
    }

    .grid > div:last-child {
        grid-column: 1 / span 6;
    }
}

@media (max-width: 767px) {
    .container {
        padding-inline: 24px;
    }

    #contact {
        --edge-width: 0px;
        width: 100%;
        background: #132858;
    }

    .contact-form .contact-edge {
        display: none;
    }

    header .btn {
        font-size: 16px;
        line-height: 22px;
    }

    header .logo svg {
        width: 160px;
        height: auto;
    }

    body {
        background-image: url('../img/fathom-hero-mobile.webp');
        background-size: cover;
        background-position: center;
    }

    .grid {
        margin-top: 48px;
        grid-row-gap: 32px;
    }

    .grid h1 {
        margin: 0;
        font-size: 34px;
        line-height: 38px;
    }

    .grid p {
        margin: 0;
        font-size: 18px;
    }

    .grid > div:first-child,
    .grid > div:last-child {
        grid-column: 1 / -1;
        min-width: 0;
    }
}

.contact-form {
    --edge-width: clamp(24px, 5vw, 72px);
    position: fixed;
    inset: 0 0 0 auto;
    box-sizing: border-box;
    width: min(680px, 100%);
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0 0 0 var(--edge-width);
    border: 0;
    overflow: hidden;
    background: transparent;
    color: #EEE2DF;
    font-family: "Anek Telugu", sans-serif;
    font-weight: 300;
    transform: translateX(100%);
    transition: transform 350ms ease, display 350ms allow-discrete, overlay 350ms allow-discrete;
}

.contact-form:popover-open {
    transform: translateX(0);
}

@starting-style {
    .contact-form:popover-open {
        transform: translateX(100%);
    }
}

.contact-form::backdrop {
    background: rgb(0 0 0 / 25%);
}

body:has(.contact-form:popover-open) {
    overflow: hidden;
}

.contact-edge {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--edge-width);
    height: 100%;
    pointer-events: none;
}

.contact-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(24px, 5vw, 64px);
    background: #132858;
}

.contact-intro,
.contact-content form {
    flex-shrink: 0;
}

@media (min-width: 1220px) {
    .contact-content {
        justify-content: flex-start;
    }

    .contact-intro {
        /* Match the H1 offset, allowing for panel padding and the form gap. */
        box-sizing: border-box;
        padding-top: calc(130px - clamp(24px, 5vw, 64px));
        min-height: calc(var(--hero-top) - clamp(24px, 5vw, 64px) - 24px);
    }
}

.contact-intro p {
    margin-bottom: 0;
}

.contact-content .contact-close {
    display: flex;
    margin-left: auto;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.contact-close svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

.contact-content h2 {
    margin: 40px 0 24px;
    color: var(--Fathom-primary-bright-blue, #00CEDD);
}

@media (min-width: 1220px) {
    .contact-content .contact-close {
        position: absolute;
        top: 50px;
        right: 50px;
    }

    .contact-content h2 {
        margin-top: 0;
    }
}

.contact-content form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0;
}

.contact-content label {
    display: block;
    margin-bottom: 6px;
}

.contact-content input,
.contact-content textarea {
    box-sizing: border-box;
    display: flex;
    width: 100%;
    padding: 12px 10px 8px;
    align-items: flex-start;
    gap: 8px;
    flex: 1 0 0;
    align-self: stretch;
    border: 1px solid var(--Fathom-surface-blush, #EEE2DF);
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
}

.contact-content textarea {
    min-height: 160px;
    resize: vertical;
}

@media (min-width: 1220px) {
    .contact-content form {
        flex-shrink: 1;
        min-height: 0;
        gap: clamp(8px, calc(100dvh - 800px), 24px);
    }

    .contact-content form > * {
        flex-shrink: 0;
    }

    .contact-content form > div:has(textarea) {
        display: flex;
        flex-direction: column;
        flex-shrink: 1;
        min-height: 0;
    }

    .contact-content textarea {
        flex: 1 1 160px;
        min-height: 60px;
        height: 160px;
        max-height: 160px;
    }
}

.contact-content button[type="submit"] {
    align-self: flex-start;
    color: #EEE2DF;
}

.contact-content button[type="submit"]:disabled {
    cursor: wait;
    opacity: 0.7;
}

.contact-content .form-status {
    display: none;
    margin: 0;
}

.contact-content .form-status[data-state] {
    display: block;
}

.contact-content .form-status[data-state="success"] {
    color: #00CEDD;
}

.contact-content .form-status[data-state="error"] {
    color: #FFB4AB;
}

.contact-content :focus-visible {
    outline: 2px solid #EEE2DF;
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .contact-form {
        transition: none;
    }
}

.btn {
    transition: background-color 200ms ease, color 200ms ease;
    border-radius: 8px;
    background: none;
    border: 1px solid var(--button-accent, var(--Fathom-surface-blush, #EEE2DF));
    color: var(--button-accent, var(--Fathom-blush, #EEE2DF));
    font-family: "Anek Telugu";
    font-size: 20px;
    font-style: normal;
    font-weight: 300;
    line-height: 28px;
    padding-inline: 16px;
    padding-top: 10px;
    padding-bottom: 4px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.btn:hover {
    background: var(--button-accent, var(--Fathom-surface-blush, #EEE2DF));
    color: #132858;
}

.btn--bright-blue {
    --button-accent: var(--Fathom-primary-bright-blue, #00CEDD);
}

h1,
.heading-h1 {
    color: var(--Fathom-surface-blush, #EEE2DF);
    font-family: "Farnham Headline";
    font-size: 48px;
    font-style: normal;
    font-weight: 300;
    line-height: 54px;
}

p {
    color: var(--fathom-blush-light-50, #F7F1EF);
    font-family: "Anek Telugu";
    font-size: 20px;
    font-style: normal;
    font-weight: 300;
    line-height: 28px;
}

.body-medium,
.contact-content p,
.contact-content label,
.contact-content input,
.contact-content textarea,
.contact-content input::placeholder,
.contact-content textarea::placeholder {
    color: var(--Fathom-surface-blush, #EEE2DF);
    font-family: "Anek Telugu";
    font-size: 16px;
    font-style: normal;
    font-weight: 300;
    line-height: 22px;
}

.contact-content label {
    font-weight: 500;
}

.contact-content input::placeholder,
.contact-content textarea::placeholder {
    opacity: 0.7;
}

.contact-content .form-note {
    margin: 0;
    color: var(--Fathom-surface-blush, #EEE2DF);
    font-family: "Anek Telugu";
    font-size: 14px;
    font-style: normal;
    font-weight: 300;
    line-height: 20px;
}
