:root {
    font-family: system-ui, sans-serif;
    color: #222d35;
    background: #f4f0e8;
    overscroll-behavior-y: none;
}

body {
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: 16px 24px;
    overflow-x: clip;
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at 50% 32%, #fffdf8, #f4f0e8 75%);
}

.landing-page {
    --title-spacing-adjustment: 10px;
    grid-template-rows: 1fr auto;
}

.landing-page main {
    --copy-offset: clamp(44px, 13vh, 92px);
    isolation: isolate;
    display: grid;
    justify-items: center;
    width: 100%;
    max-width: 420px;
    /* Balance the base gap above the title when centering the artwork. */
    margin-block-start: var(--copy-offset);
    text-align: center;
}

.app-artwork {
    position: relative;
}

.app-artwork::before,
.app-artwork::after {
    content: "";
    position: absolute;
    pointer-events: none;
    filter: blur(clamp(18px, 4.5vw, 26px));
    opacity: 0.65;
}

.app-artwork::before {
    inset: -12% -33% 39% -14%;
    border-radius: 63% 37% 58% 42% / 58% 44% 56% 42%;
    background: linear-gradient(112deg, #ffd4a6, #ffc1d6 44%, #a5d9ff 82%);
    transform: rotate(-12deg);
}

.app-artwork::after {
    inset: 46% -26% -32% -32%;
    border-radius: 42% 58% 67% 33% / 55% 55% 45% 45%;
    background: linear-gradient(104deg, #b8efce, #cec0ff 53%, #ffe4a8 89%);
    transform: rotate(10deg);
}

.board-backdrop {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: min(100vw, 900px);
    height: clamp(315px, 67vw, 540px);
    overflow: hidden;
    transform: translate(-50%, -52%);
    pointer-events: none;
    opacity: 0.9;
    mask-image:
        /* Upper left */
        radial-gradient(ellipse 19% 22% at 29% 33%, #000 57%, transparent 100%),
        radial-gradient(ellipse 12% 15% at 21% 39%, #000e 28%, transparent 100%),
        radial-gradient(ellipse 13% 16% at 35% 21%, #000c 14%, transparent 100%),
        /* Lower right */
        radial-gradient(ellipse 20% 22% at 69% 66%, #000 57%, transparent 100%),
        radial-gradient(ellipse 13% 16% at 78% 59%, #000e 28%, transparent 100%),
        radial-gradient(ellipse 13% 16% at 64% 79%, #000c 14%, transparent 100%);
    mask-size: 100% 100%;
    mask-position: center;
    mask-repeat: no-repeat;
}

.board-backdrop img {
    position: absolute;
    inset: -4.5%;
    display: block;
    width: 109%;
    height: 109%;
    object-fit: cover;
    object-position: center 44%;
    filter: contrast(1.1);
}

@media (prefers-reduced-motion: no-preference) {
    .board-backdrop {
        animation: reveal-board 2.6s cubic-bezier(0.16, 0.7, 0.28, 1) both;
    }

    .board-backdrop img {
        animation: drift-board 18s ease-in-out infinite alternate;
    }
}

@keyframes reveal-board {
    from {
        opacity: 0;
        mask-size: 55% 55%;
    }
}

@keyframes drift-board {
    from { transform: translate(-7px, 3px); }
    to { transform: translate(9px, -5px); }
}

.app-icon {
    position: relative;
    z-index: 1;
    display: block;
    width: clamp(128px, 34vw, 176px);
    height: auto;
    border-radius: 22%;
    box-shadow: 0 0 0 1px #222d351a, 0 7px 14px #24263827, 0 30px 72px 12px #4e3d6b27;
}

.landing-page h1 {
    width: 100%;
    margin: calc(24px + var(--copy-offset) + clamp(12px, (100vh - 640px) / 5, 32px) + var(--title-spacing-adjustment)) 0 0;
    font-size: clamp(2.5rem, 9vw, 4rem);
    line-height: 1.05;
}

.wordmark {
    display: block;
    width: 4.5em;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

.landing-page p {
    margin: 28px 0 0;
    color: #4c5964;
    font-size: clamp(1rem, 3vw, 1.125rem);
    line-height: 1.6;
    text-wrap: pretty;
}

.app-store {
    display: inline-block;
    margin-top: 24px;
    border-radius: 6px;
    cursor: pointer;
}

.app-store img {
    display: block;
    pointer-events: none;
}

@media (any-hover: hover) and (any-pointer: fine) {
    .app-store,
    .site-footer a,
    .legal-page a {
        cursor: url("/assets/hand-cursor.png?v=1") 12 8, pointer;
    }
}

.app-store:focus-visible {
    outline: 2px solid #285e9b;
    outline-offset: 4px;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px clamp(6px, 2vw, 12px);
    padding-top: 20px;
}

.landing-page .site-footer {
    padding-top: calc(20px - var(--title-spacing-adjustment));
}

@media (max-width: 767px) {
    .landing-page {
        --title-spacing-adjustment: -14px;
    }

    .landing-page main {
        --copy-offset: clamp(36px, 11vh, 80px);
    }

    .landing-page .site-footer {
        padding-top: calc(32px - var(--title-spacing-adjustment));
    }
}

.site-footer .footer-copyright {
    margin: 0;
    color: #64686c;
    font-size: 0.8125rem;
    line-height: 1.4;
    text-align: center;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.site-footer a {
    padding: 8px clamp(4px, 1.4vw, 8px);
    color: #64686c;
    font-size: 0.8125rem;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.site-footer .footer-social-link {
    display: inline-flex;
    align-items: center;
}

.footer-social-link svg {
    display: block;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.site-footer .footer-social-link:hover {
    color: #222d35;
}

.legal-page {
    grid-template-rows: auto 1fr auto;
    align-items: start;
    padding-block-start: 32px;
}

.legal-page header,
.legal-page main {
    width: min(100%, 640px);
}

.legal-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    font-weight: 650;
    text-decoration: none;
}

.legal-home img {
    border-radius: 22%;
}

.legal-page main {
    padding-block: 28px 36px;
    line-height: 1.6;
}

.legal-page h1 {
    margin: 0 0 20px;
    font-size: clamp(2rem, 6vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.legal-page p {
    margin: 0 0 16px;
}

.legal-page main a {
    color: #285e9b;
    text-underline-offset: 0.2em;
}
