/* ==========================================================================
   Site footer — shared by every page (home, About, the case studies,
   Privacy). Plain CSS, scoped to .sf-*. The newsletter form keeps the hooks
   each page's script listens for ([data-newsletter-form], -status, -submit).
   Set in the site's night palette with the brand's violet and blue light.
   ========================================================================== */

.sf {
    --sf-gutter: clamp(1.25rem, 4.2vw, 3.5rem);
    --sf-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(4.5rem, 9vw, 7.5rem) var(--sf-gutter) clamp(2.25rem, 4vw, 3rem);
    color: #fff;
    background:
        radial-gradient(56rem 26rem at 8% 0%, rgba(124, 58, 237, 0.22), transparent 65%),
        radial-gradient(48rem 26rem at 100% 100%, rgba(14, 165, 233, 0.14), transparent 65%),
        linear-gradient(180deg, #080918 0%, #04050c 100%);
    font-family: "Manrope", sans-serif;
}

/* A line of brand light along the top edge. */
.sf::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0), #7c3aed 20%, #0ea5e9 55%, #f472b6 85%, rgba(244, 114, 182, 0));
    opacity: 0.55;
}

/* A faint scatter of stars. */
.sf::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(1px 1px at 12% 30%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 28% 72%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1.5px 1.5px at 46% 18%, rgba(186, 230, 253, 0.5), transparent),
        radial-gradient(1px 1px at 63% 58%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 78% 26%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1.5px 1.5px at 88% 66%, rgba(221, 214, 254, 0.5), transparent),
        radial-gradient(1px 1px at 94% 12%, rgba(255, 255, 255, 0.3), transparent);
    pointer-events: none;
}

.sf-inner {
    max-width: 82rem;
    margin: 0 auto;
}

/* ---------- The newsletter ---------- */

/* Still the loudest thing in the footer, but it no longer fills the width:
   it shares the top row with the sitemap now. */
.sf-pitch {
    max-width: 24ch;
    margin: 0;
    font-size: clamp(1.45rem, 2.3vw, 2.1rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.025em;
    color: #fff;
}

.sf-lit {
    color: transparent;
    background: linear-gradient(94deg, #a78bfa 0%, #38bdf8 50%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    padding-bottom: 0.14em;
    margin-bottom: -0.14em;
}

.sf-form {
    max-width: 30rem;
    margin-top: clamp(1.6rem, 3vw, 2.2rem);
}

.sf-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

/* The underline lights in the brand colours while typing. */
.sf-field::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, #7c3aed, #0ea5e9 55%, #f472b6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.7s var(--sf-ease);
}

.sf-field:focus-within::after {
    transform: scaleX(1);
}

.sf-input {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    font-family: "Manrope", sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    color: #fff;
}

.sf-input::placeholder {
    color: rgba(214, 216, 232, 0.3);
}

.sf-input:focus,
.sf-input:focus-visible {
    border: 0;
    outline: none;
    box-shadow: none;
}

.sf-submit {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.45s var(--sf-ease), border-color 0.45s var(--sf-ease), scale 0.45s var(--sf-ease);
}

.sf-submit svg {
    width: 1.2rem;
    height: 1.2rem;
}

.sf-submit:hover {
    border-color: transparent;
    background: linear-gradient(120deg, #7c3aed, #0ea5e9);
    scale: 1.05;
}

.sf-submit:focus-visible {
    outline: 2px solid #7dd3fc;
    outline-offset: 3px;
}

.sf-submit:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.sf-status {
    margin: 1rem 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

/* States set by each page's script. */
.sf-status.hidden {
    display: none;
}

.sf-status.text-\[\#ffb2b9\] {
    color: #ffb2b9;
}

.sf-note {
    max-width: 34rem;
    margin: 1.3rem 0 0;
    font-size: 0.86rem;
    line-height: 1.65;
    color: rgba(205, 207, 224, 0.58);
}

.sf-note a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(205, 207, 224, 0.4);
    text-underline-offset: 4px;
    transition: color 0.3s ease;
}

.sf-note a:hover {
    color: #fff;
}

/* ---------- The sitemap ---------- */

.sf-top {
    display: grid;
    gap: clamp(3rem, 6vw, 4.5rem);
}

@media (min-width: 900px) {
    /* Signup top-left, the map of the site filling the rest of the row. */
    .sf-top {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
        align-items: start;
        column-gap: clamp(2.5rem, 6vw, 6rem);
    }
}

.sf-map {
    display: grid;
    gap: clamp(2rem, 4vw, 2.75rem) clamp(1.5rem, 3vw, 2.5rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 560px) {
    .sf-map { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
    /* Home and About carry the most links, so they get the wider tracks. */
    .sf-map { grid-template-columns: 1.1fr 1.15fr 1fr; }
}

.sf-col-h {
    margin: 0 0 1rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
}

/* Inherit size and weight, so the heading link matches the headings that
   are not links. */
.sf-col-h a {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sf-col-h a:hover { color: #a78bfa; }

.sf-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.sf-col ul a {
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(205, 207, 224, 0.72);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sf-col ul a:hover { color: #fff; }

/* ---------- The bottom row ---------- */

.sf-bottom {
    display: grid;
    gap: 2rem;
    margin-top: clamp(3.5rem, 7vw, 5rem);
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sf-brand img {
    display: block;
    width: auto;
    height: 3.5rem;
}

/* Phones and small tablets: the logo a little larger, held still and white. */
@media (max-width: 899px) {
    .sf-brand img {
        height: 4rem;
    }
}

.sf-copy {
    margin: 0.85rem 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(205, 207, 224, 0.5);
}

.sf-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.sf-social a {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(226, 228, 240, 0.82);
    transition: color 0.3s ease, border-color 0.4s var(--sf-ease), background-color 0.4s var(--sf-ease), scale 0.4s var(--sf-ease);
}

.sf-social svg {
    width: 1.35rem;
    height: 1.35rem;
}

.sf-social a:hover {
    color: #fff;
    border-color: rgba(124, 58, 237, 0.6);
    background: rgba(124, 58, 237, 0.18);
    scale: 1.05;
}

.sf a:focus-visible {
    outline: 2px solid #7dd3fc;
    outline-offset: 3px;
    border-radius: 0.25rem;
}

@media (min-width: 900px) {
    /* The link list moved up into the sitemap, so this is brand + social. */
    .sf-bottom {
        grid-template-columns: auto auto;
        justify-content: space-between;
        align-items: center;
        column-gap: clamp(2rem, 4vw, 4rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf-field::after,
    .sf-submit,
    .sf-social a {
        transition: none;
    }
}
