/* The home page (resources/views/home.php) in the "Riso Press" look - the palette, .r-duo and
   .r-reg come from theme.css */
.site-main-wide {
    padding: 0;
    overflow-x: clip; /* Bootstrap's wide g-5 gutters reach past the container on phones */
}

.home-section {
    position: relative;
    padding: 96px 0;
}

.home-head {
    margin-bottom: 40px;
}

.home-head-split {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px 32px;
}

.home-head-note {
    margin: 12px 0 0;
    max-width: 52ch;
    color: var(--r-muted);
}

.home-kicker {
    display: inline-block;
    margin: 0 0 12px;
    color: var(--r-pink-text);
}

.home-heading {
    margin: 0;
    font-size: clamp(2rem, 4.4vw, 3.1rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.04em;
}

.home-dot {
    color: var(--r-pink);
}

/* A text link with a thick pink underline that fills with yellow ink on hover */
.home-link {
    font-weight: 700;
    color: var(--r-ink);
    text-decoration: none;
    background: linear-gradient(var(--r-yellow), var(--r-yellow)) no-repeat 0 100% / 100% 0,
                linear-gradient(var(--r-pink), var(--r-pink)) no-repeat 0 100% / 100% 3px;
    padding: 0 2px 2px;
    transition: background-size .2s ease;
}

.home-link:hover,
.home-link:focus-visible {
    color: var(--r-ink);
    background-size: 100% 100%, 100% 3px;
}

/* ---- Hero ---- */
.home-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0 88px;
}

.home-hero .container {
    position: relative;
}

.home-hero-reg-1 {
    top: 24px;
    right: 24px;
}

.home-hero-reg-2 {
    bottom: 28px;
    left: 24px;
}

.home-hero-label {
    margin: 0 0 20px;
    color: var(--r-blue-text);
}

/* The overprint: the blue pass is the real text; the pink pass is a copy on top, nudged off
   register and multiplied, so where the inks overlap they darken like real riso ink */
.home-overprint {
    position: relative;
    isolation: isolate;
    margin: 0;
    font-family: var(--r-display-font);
    font-size: clamp(3.1rem, 8.4vw, 6.6rem);
    font-weight: 800;
    font-variation-settings: "opsz" 96;
    line-height: .9;
    letter-spacing: -.05em;
}

.home-overprint-blue {
    display: block;
    color: var(--r-blue);
}

.home-overprint-pink {
    position: absolute;
    inset: 0;
    color: var(--r-pink);
    mix-blend-mode: multiply;
    transform: translate(var(--r-offset), calc(var(--r-offset) * .8));
    pointer-events: none;
    user-select: none;
}

/* On load the pink pass slides into its slightly-off position, like the second run through the press */
@media (prefers-reduced-motion: no-preference) {
    .home-hero .home-overprint-pink {
        animation: home-press .9s cubic-bezier(.2, .8, .2, 1) .15s both;
    }
}

@keyframes home-press {
    from {
        transform: translate(calc(var(--r-offset) * 6), calc(var(--r-offset) * -3));
    }
}

.home-hero-text {
    margin: 28px 0 0;
    max-width: 46ch;
    font-size: 1.2rem;
    color: var(--r-ink-2);
}

.home-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.home-hero-prints {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.home-hero-print {
    aspect-ratio: 4 / 5;
    max-width: 100%;
    transform: rotate(-2deg);
    box-shadow: 0 10px 30px rgba(29, 35, 64, .14);
}

.home-hero-print + .home-hero-print {
    margin-top: 56px;
    transform: rotate(2.5deg);
}

/* ---- What I make ---- */
.home-strip {
    border-block: 2px solid var(--r-ink);
    background: var(--r-card);
    overflow: hidden;
}

.home-strip-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 12px;
    margin: 0;
    padding: 18px 16px;
    list-style: none;
}

.home-strip-list li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    font-family: var(--r-mono-font);
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #1d2340;
}

.home-strip-list .fas {
    width: 1.1em;
    text-align: center;
}

.home-strip-pink {
    background: var(--r-pink);
}

.home-strip-blue {
    background: var(--r-blue);
    color: #fff !important;
}

.home-strip-yellow {
    background: var(--r-yellow);
}

/* ---- Projects ---- */
.home-projects {
    background-image: radial-gradient(rgba(0, 120, 191, .14) 1px, transparent 1.4px);
    background-size: 14px 14px;
}

.home-project {
    --ink: var(--r-pink);
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    padding: 28px;
    border: 2px solid var(--r-ink);
    border-radius: var(--x-radius);
    background: var(--r-card);
    box-shadow: 6px 6px 0 var(--ink);
    transition: transform .2s ease, box-shadow .2s ease;
}

.home-project:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--ink);
}

.home-project-blue {
    --ink: var(--r-blue);
}

.home-project-yellow {
    --ink: var(--r-yellow);
}

.home-project p {
    margin: 0;
}

.home-project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--r-muted);
}

.home-project-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ink);
    color: #1d2340;
    font-size: 1.15rem;
}

.home-project-blue .home-project-icon {
    color: #fff;
}

.home-project-title {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -.035em;
}

.home-project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-project-stack li {
    padding: 3px 9px;
    border: 1px solid var(--r-line);
    border-radius: 4px;
    background: var(--r-paper);
    font-family: var(--r-mono-font);
    font-size: .75rem;
    color: var(--r-ink-2);
}

.home-project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: auto;
    padding-top: 6px;
}

/* ---- Articles ---- */
.home-posts {
    border-top: 2px solid var(--r-ink);
}

/* ---- Gallery ---- */
.home-work {
    background: var(--r-card);
    border-block: 2px solid var(--r-ink);
}

.home-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-filter button {
    padding: 7px 14px;
    border: 2px solid var(--r-ink);
    border-radius: 999px;
    background: transparent;
    font-family: var(--r-mono-font);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--r-ink);
    transition: background-color .15s ease;
}

.home-filter button:hover {
    background: var(--r-yellow);
}

.home-filter button.active {
    background: var(--r-ink);
    color: var(--r-paper);
}

.home-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: dense;
    gap: 20px;
}

.home-gallery-item {
    margin: 0;
}

.home-gallery-item.tall {
    grid-row: span 2;
}

.home-gallery-item .r-duo {
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    cursor: zoom-in;
}

.home-gallery-item.tall .r-duo {
    aspect-ratio: auto;
    height: calc(100% - 32px);
}

/* Pointing at a print (or tabbing to it) shows its real colours */
.home-gallery-item .r-duo:hover img,
.home-gallery-item .r-duo:focus-visible img {
    filter: none;
    mix-blend-mode: normal;
}

.home-gallery-item .r-duo:hover::after,
.home-gallery-item .r-duo:focus-visible::after {
    opacity: 0;
}

.home-gallery-item .r-duo::after {
    transition: opacity .35s ease;
}

.home-gallery-item figcaption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding-top: 8px;
    font-size: .95rem;
    color: var(--r-ink);
}

.home-gallery-item figcaption .r-label {
    color: var(--r-muted);
}

[x-cloak] {
    display: none !important;
}

/* A gallery picture, larger, in its real colours */
.home-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 72px;
    background: rgba(20, 26, 48, .96);
}

.home-lightbox-open {
    overflow: hidden;
}

.home-lightbox-figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    text-align: center;
}

.home-lightbox-figure img {
    display: block;
    max-width: min(100%, 1000px);
    max-height: calc(100vh - 180px);
    margin: 0 auto;
    box-shadow: 8px 8px 0 var(--r-pink);
}

.home-lightbox-figure figcaption {
    margin-top: 20px;
    color: #fff;
}

.home-lightbox-figure figcaption span {
    margin-left: 8px;
    font-family: var(--r-mono-font);
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #c9cbe0;
}

.home-lightbox button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1.2rem;
    transition: background-color .2s ease, color .2s ease;
}

.home-lightbox button:hover,
.home-lightbox button:focus-visible {
    background: var(--r-pink);
    color: #1d2340;
}

.home-lightbox-close {
    top: 16px;
    right: 16px;
}

.home-lightbox-prev,
.home-lightbox-next {
    top: 50%;
    margin-top: -24px;
}

.home-lightbox-prev {
    left: 16px;
}

.home-lightbox-next {
    right: 16px;
}

/* ---- Video ---- */
.home-video-still {
    aspect-ratio: 4 / 3;
    max-width: 100%;
    box-shadow: 10px 10px 0 var(--r-pink);
}

.home-play {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    border-radius: 50%;
    background: var(--r-blue);
    color: #fff;
    font-size: 1.6rem;
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--r-ink);
    transition: transform .2s ease;
}

.home-play:hover,
.home-play:focus-visible {
    color: #fff;
    transform: scale(1.08);
}

.home-play .fas {
    margin-left: 4px;
}

.home-features {
    display: grid;
    gap: 22px;
    margin: 28px 0 28px;
}

.home-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.home-feature p {
    margin: 2px 0 0;
}

.home-feature strong {
    font-family: var(--r-display-font);
    font-size: 1.15rem;
    color: var(--r-ink);
}

.home-feature-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #1d2340;
}

.home-feature-pink {
    background: var(--r-pink);
}

.home-feature-blue {
    background: var(--r-blue);
    color: #fff;
}

.home-feature-yellow {
    background: var(--r-yellow);
}

/* ---- About ---- */
.home-about {
    border-top: 2px solid var(--r-ink);
}

.home-about-photo {
    position: relative;
    max-width: 360px;
    margin: 0 auto;
}

.home-about-photo .r-duo {
    aspect-ratio: 1;
    border-radius: 50%;
    box-shadow: 10px 8px 0 var(--r-pink);
}

.home-about-photo .r-reg {
    top: -6px;
    right: 6px;
}

.home-hello {
    margin: 0 0 4px;
    font-family: var(--r-display-font);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.05em;
    color: var(--r-blue);
}

.home-hello span {
    color: var(--r-pink);
}

.home-about .home-heading {
    margin-bottom: 22px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.home-role {
    display: block;
    margin-top: 10px;
}

.home-role span {
    display: inline-block;
    padding: 2px 10px;
    background: var(--r-yellow);
    color: #1d2340;
}

.home-about-quote {
    margin: 24px 0 0;
    padding-left: 18px;
    border-left: 4px solid var(--r-pink);
    font-family: var(--r-display-font);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--r-ink);
}

/* ---- Motto: one big overprinted line on yellow ---- */
.home-motto {
    padding: 64px 16px;
    background: var(--r-yellow);
    border-block: 2px solid var(--r-ink);
    text-align: center;
    overflow: hidden;
}

.home-motto-words {
    max-width: 1100px;
    margin: 0 auto;
    font-size: clamp(2rem, 5.2vw, 4.2rem);
    text-transform: lowercase;
}

/* ---- Contact ---- */
.home-contact-form {
    padding: 32px;
    border: 2px solid var(--r-ink);
    border-radius: var(--x-radius);
    background: var(--r-card);
    box-shadow: 6px 6px 0 var(--r-blue);
}

.home-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.home-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 2px solid var(--r-ink);
    border-radius: 50%;
    color: var(--r-ink);
    text-decoration: none;
    transition: background-color .15s ease;
}

.home-social a:hover,
.home-social a:focus-visible {
    background: var(--r-pink);
    color: #1d2340;
}

/* ---- Newsletter ---- */
.home-newsletter {
    padding: 0 0 96px;
}

/* ---- Rising in one after another when the row scrolls into view (public/js/home.js adds the
   classes; without JavaScript they're simply there) ---- */
[data-animate].is-waiting > * {
    opacity: 0;
}

[data-animate].is-in > * {
    animation: home-rise .7s cubic-bezier(.2, .8, .2, 1) both;
    animation-delay: calc(var(--i, 0) * 120ms);
}

@keyframes home-rise {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
}

/* ---- Smaller screens ---- */
@media (max-width: 991.98px) {
    .home-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-hero-prints {
        max-width: 520px;
        margin: 0 auto;
    }
}

@media (max-width: 575.98px) {
    .home-section {
        padding: 64px 0;
    }

    .home-hero {
        padding: 32px 0 64px;
    }

    .home-lightbox {
        padding: 72px 12px;
    }

    .home-lightbox-prev,
    .home-lightbox-next {
        top: auto;
        bottom: 16px;
    }

    .home-gallery {
        gap: 14px;
    }

    .home-gallery-item figcaption {
        flex-wrap: wrap;
        font-size: .85rem;
    }

    .home-contact-form {
        padding: 20px;
    }

    .home-project {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-link,
    .home-project,
    .home-play,
    .home-filter button,
    .home-gallery-item .r-duo::after,
    .r-duo img {
        transition: none;
    }

    [data-animate].is-waiting > *,
    [data-animate].is-in > * {
        opacity: 1;
        animation: none;
    }
}
