/* Homepage final call to action, after design-refs/last-section.png: a rounded photo panel (a subway train blurring
   past, toned darker and slightly muted in the file itself) with the heading, one line and the inverted Get Started
   button at the bottom left. The panel uses the hero's side margins and corners (--hero-side, --hero-radius in
   static/hero.css), and its text lines up with the hero's text. White space above and below keeps it off the footer. */

.final-cta {
    padding-block: clamp(3rem, 2rem + 3vw, 5rem) calc(var(--hero-inset) * 1.5); /* below the panel, a small gap: 12px on phones, 18px on tablets, 24px from 1024px */
    background: #fff;
}

.final-cta__panel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    width: calc(100% - 2 * var(--hero-side));
    margin: 0 var(--hero-side);
    min-height: clamp(28rem, 18rem + 22vw, 40rem); /* 448px on phones, about 605px at 1440px, 640px at most */
    border-radius: var(--hero-radius);
    background: #1a1612; /* shows while the photo loads */
    color: var(--hero-ink);
}

.final-cta__img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 60% 50%; /* on narrow screens, keep the lit train in view rather than the dark left edge */
}

/* Shade: darkest at the bottom where the text sits, plus a little on the left, so the text stays readable */
.final-cta__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.2) 100%),
        linear-gradient(to right, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 60%);
}

/* A little further in than the hero's text (the founder found it too far left): 24px from the screen edge on
   phones, 28px on tablets, 64px from 1024px */
.final-cta__content {
    padding: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) calc(var(--gutter) + 0.5rem - var(--hero-side));
}

@media (min-width: 1024px) {
    .final-cta__content {
        padding-inline: calc(var(--gutter) + 2.5rem - var(--hero-side));
    }
}

.final-cta__title {
    margin: 0;
    font-family: "Geist", sans-serif;
    font-size: var(--section-title);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--hero-ink);
    overflow-wrap: anywhere;
    text-wrap: balance;
}

/* Two lines from 1024px, breaking after "work" */
@media (min-width: 1024px) {
    .final-cta__line {
        display: block;
        white-space: nowrap;
    }
}

.final-cta__text {
    max-width: 36em;
    margin: 1.25rem 0 0;
    font-family: "Geist", sans-serif;
    font-size: 1rem; /* 16px at every size */
    line-height: 1.45;
    color: var(--hero-ink-soft);
    text-wrap: balance;
}

.final-cta .hero-cta {
    margin-top: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
}

/* The hero's button, a size down: 14px text and 36px tall at every size (the hero's is 40px from 1024px), with a
   26px arrow square. ::after still gives it a 44px tap area. */
.final-cta .hero-cta__btn {
    gap: 0.75rem;
    min-width: 0;
    height: 2.25rem;
    padding: 0.25rem 0.3125rem 0.25rem 0.875rem;
    font-size: 0.875rem;
}

.final-cta .hero-cta__icon {
    width: 1.625rem;
    height: 1.625rem;
}
