/* Keep the two platform downloads aligned while the account action stays beside them. */
.home-hero .hero-actions {
    display: grid;
    width: max-content;
    max-width: 100%;
    grid-template-columns: repeat(2, max-content);
}

.home-hero .hero-download-macos {
    grid-column: 1;
    grid-row: 2;
}

@media (max-width: 480px) {
    .home-hero .hero-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-hero #hero-auth-button {
        grid-row: 3;
    }
}

/* The first two homepage sections use a larger desktop layout. */
@media (min-width: 1024px) {
    main > section.home-hero,
    main > section#features {
        box-sizing: border-box;
        display: flex;
        align-items: center;
        min-height: calc(100svh - 72px);
        padding-block: clamp(56px, 7vh, 96px);
    }

    main > section.home-hero > .max-w-7xl,
    main > section#features {
        padding-block: clamp(36px, 5vh, 60px);
    }

    main > section#features > .max-w-7xl {
        width: 100%;
        max-width: 1500px;
    }

    main > section#features > .max-w-7xl {
        width: calc(100% - clamp(160px, 22vw, 400px));
        max-width: 1240px;
        padding-inline: 0;
    }

    main > section.home-hero > .max-w-7xl {
        width: calc(100% - clamp(112px, 18vw, 320px));
        max-width: 1320px;
        padding-inline: 0;
        align-self: stretch;
    }

    .home-hero h1 .text-primary {
        display: inline-block;
        max-width: 19ch;
    }

    .home-hero h1 {
        font-size: clamp(38px, 3.2vw, 50px);
        line-height: 1.14;
    }

    .home-hero > div {
        gap: clamp(16px, 2vw, 32px);
    }

    .home-hero > div > div:first-child {
        align-self: start;
        transform: translate(clamp(20px, 2.4vw, 38px), calc(0px - clamp(32px, 4vh, 40px)));
    }

    .home-hero .hero-collaboration {
        position: relative;
        top: clamp(0px, calc(38vh - 230px), 160px);
    }

    .home-hero .hero-paper-visual {
        max-width: min(700px, calc(100svh - 180px));
        margin-left: auto;
        margin-right: 0;
        transform: translateX(clamp(12px, 1.6vw, 24px));
    }

    .home-hero .hero-paper-visual img {
        transform: scale(1.08);
        transform-origin: center;
    }

    #features h2 {
        font-size: clamp(30px, 2.5vw, 38px);
        line-height: 1.25;
    }

    .home-hero .text-body-lg {
        font-size: 18px;
        line-height: 1.65;
    }

    #features .text-body-lg {
        font-size: 16px;
        line-height: 1.6;
    }

    #features > .max-w-7xl > .text-center {
        margin-bottom: 24px;
    }

    #features .bento-grid {
        gap: 20px;
    }

    #features .feature-card {
        padding: 20px;
    }

    #features .feature-card .mb-md {
        margin-bottom: 16px;
    }

    #features .feature-card .mt-md {
        margin-top: 16px;
    }

    #features .feature-card h3 {
        font-size: clamp(20px, 1.6vw, 23px);
        line-height: 1.35;
    }

    #features .feature-card p {
        font-size: 15px;
        line-height: 1.55;
    }
}

/* This heading sits on a blue card and needs to remain light. */
#features .bg-primary-container h3 {
    color: inherit;
    background: none;
    -webkit-text-fill-color: currentColor;
}
