/* Site footer: an engraved two-ink plate — cream on grainy green — with the
   moonscape illustration (assets/images/footer-moonscape.svg) along the bottom.
   The illustration's sky is transparent, so --pc-ink must match its ink. */

.pc-footer {
    --pc-ink: #0a4a31;
    --pc-paper: #efe8cf;
    --pc-paper-dim: rgba(239, 232, 207, 0.72);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 20% 0%, rgba(0, 255, 157, 0.10), transparent 60%),
        var(--pc-ink);
    color: var(--pc-paper);
    font-family: 'Newsreader', Georgia, serif;
}

/* Paper grain over everything, illustration included */
.pc-footer::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.38;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.pc-footer__inner {
    position: relative;
    z-index: 2;
    max-width: 1440px;
    margin: 0 auto;
    padding: 88px 32px 0;
}

.pc-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.35fr;
    gap: 48px 40px;
}

.pc-footer__logo {
    display: block;
    width: 188px;
    aspect-ratio: 1448.7 / 220;
    background: currentColor;
    -webkit-mask: url("../images/logo/plancode-lockup-white.svg") no-repeat center / contain;
    mask: url("../images/logo/plancode-lockup-white.svg") no-repeat center / contain;
}

.pc-footer__tagline,
.pc-footer__lede {
    font-style: italic;
    font-size: 19px;
    line-height: 1.5;
    color: var(--pc-paper);
    max-width: 30ch;
}

.pc-footer__tagline { margin-top: 28px; }

.pc-footer__contact {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    font-size: 18px;
    color: var(--pc-paper);
    transition: color .2s;
}

.pc-footer__social {
    display: flex;
    gap: 26px;
    margin-top: 32px;
    font-size: 20px;
}

.pc-footer__social a { color: var(--pc-paper); transition: color .2s, transform .2s; }
.pc-footer__social svg { width: 18px; height: 18px; }

.pc-footer h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin: 6px 0 0;
}

.pc-footer h4::after {
    content: "";
    display: block;
    width: 40px;
    height: 1px;
    margin: 18px 0 22px;
    background: var(--pc-paper);
}

.pc-footer ul { list-style: none; margin: 0; padding: 0; }
.pc-footer li + li { margin-top: 12px; }

.pc-footer__links a {
    font-size: 19px;
    color: var(--pc-paper);
    transition: color .2s;
}

.pc-footer__links a:hover,
.pc-footer__contact:hover,
.pc-footer__social a:hover,
.pc-footer__legal a:hover { color: #00ff9d; }

.pc-footer__social a:hover { transform: translateY(-2px); }

.pc-footer__cta {
    display: flex;
    margin-top: 24px;
    border: 1px solid var(--pc-paper);
    color: var(--pc-paper);
    font-style: italic;
    font-size: 17px;
    transition: border-color .2s;
}

.pc-footer__cta span:first-child { flex: 1; padding: 14px 20px; color: var(--pc-paper-dim); }

.pc-footer__cta span:last-child {
    display: grid;
    place-items: center;
    width: 52px;
    background: var(--pc-paper);
    color: var(--pc-ink);
    transition: background .2s;
}

.pc-footer__cta:hover { border-color: #00ff9d; }
.pc-footer__cta:hover span:last-child { background: #00ff9d; }

.pc-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    margin-top: 64px;
    font-style: italic;
    font-size: 16px;
    color: var(--pc-paper-dim);
}

.pc-footer__legal a { color: inherit; transition: color .2s; }
.pc-footer__legal nav { display: flex; gap: 22px; }
.pc-footer__legal nav a + a::before { content: "|"; margin-right: 22px; opacity: .6; }

/* The illustration: full bleed, pulled up under the last row of text */
.pc-footer__scene {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: clamp(220px, 28vw, 440px);
    margin-top: clamp(-90px, -4vw, -20px);
    object-fit: cover;
    object-position: 50% 100%;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 1023px) {
    .pc-footer__grid { grid-template-columns: 1fr 1fr; }
    .pc-footer__brand, .pc-footer__start { grid-column: 1 / -1; }
}

@media (max-width: 639px) {
    .pc-footer__inner { padding: 64px 16px 0; }
    .pc-footer__grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
    .pc-footer__tagline, .pc-footer__lede { font-size: 17px; }
    .pc-footer__links a { font-size: 17px; }
    .pc-footer__legal { flex-direction: column; margin-top: 48px; }
    /* Keep the rider in frame on narrow screens */
    .pc-footer__scene { height: 240px; margin-top: 0; object-position: 52% 100%; }
}
