/* The home page (resources/views/home.php) - steve-shead.com's front page in Xavier's theme */
.site-main-wide {
    padding: 0;
}

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

.home-section + .home-section {
    border-top: 1px solid var(--x-line);
}

.home-heading {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--x-charcoal);
    margin-bottom: 24px;
}

.home-kicker {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--x-grey);
    margin-bottom: 10px;
}

.home-dot,
.home-hello-word span {
    color: var(--x-yellow-strong);
}

.home-underline-link {
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--x-charcoal);
    text-decoration: none;
    border-bottom: 2px solid var(--x-charcoal);
    padding-bottom: 2px;
}

.home-underline-link:hover {
    color: var(--x-charcoal);
    border-bottom-color: var(--x-yellow-strong);
}

/* Hero: the yellow with rings, the words and the phones */
/* Fills the window; the header sits over its top while the page is at the top (see app.css,
   .site-header-over). Sizes follow steveshead.io's - a 100px headline, 25px tagline and 555px
   phones on a wide screen - and shrink with the window, by its width or height, whichever is
   tighter */
.home-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    margin-top: -66px; /* under the header */
    background: var(--x-yellow);
    color: #232323;
    padding: 114px 0 120px; /* room at the bottom for the scroll link */
    overflow: hidden;
}

.home-hero .container {
    max-width: 1200px;
}

/* The words, set like steveshead.io's: tight lines, each with its own weight and spacing */
.home-hero .hero-words {
    font-size: clamp(2.6rem, min(5vw, 8.6vh), 6.25rem);
    font-weight: 700;
    line-height: .95;
    letter-spacing: -.005em;
    margin: 0;
}

.home-hero .hero-words > span:first-child {
    font-weight: 600;
    letter-spacing: -.03em;
}

.home-hero .hero-words .boxed {
    font-weight: 500;
    letter-spacing: -.01em;
    padding: .035em;
    background: #212529;
    color: var(--x-yellow);
}

.home-hero .hero-words .light {
    font-weight: 300;
    letter-spacing: -.05em;
}

.home-hero .hero-tagline {
    font-size: clamp(.85rem, min(1.25vw, 2.15vh), 1.575rem);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -.02em;
    margin: 0 0 clamp(32px, 9.5vh, 112px);
}

/* "Get started now" with a white circle behind its start, which stretches into a pill on hover */
.home-hero-cta {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    height: 55px;
    padding: 0 28px;
    border-radius: 50px;
    font-size: .875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #232323;
    text-decoration: none;
}

.home-hero-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    z-index: -1;
    width: 51px;
    height: 51px;
    margin-top: -25.5px;
    border-radius: 50px;
    background: #fff;
    transition: width .35s ease-in-out;
}

.home-hero-cta:hover,
.home-hero-cta:focus-visible {
    color: #232323;
}

.home-hero-cta:hover::before,
.home-hero-cta:focus-visible::before {
    width: 100%;
}

/* "scroll" at the bottom of the hero, like steveshead.io's: a short white line down to the edge
   with the word running up above it. The line grows on hover */
.home-scroll {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 35px;
    margin-left: -1px;
    background: #fff;
    transition: height .3s ease;
}

.home-scroll span {
    position: absolute;
    bottom: calc(100% + 6px);
    left: -14px;
    width: 30px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: .9375rem;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: -.03em;
    color: #232323;
}

/* A bigger target than the thin line and the word */
.home-scroll::before {
    content: '';
    position: absolute;
    inset: -90px -20px 0;
}

.home-scroll:hover,
.home-scroll:focus-visible {
    height: 50px;
}

/* Short, wide windows (a phone on its side) have no room for it */
@media (max-height: 520px) {
    .home-scroll {
        display: none;
    }
}

/* The rings, on their own layer so they can scroll slower than the page (parallax - public/js/home.js
   sets --parallax; it's 0 without JavaScript or with reduced motion) */
.home-hero::before {
    content: '';
    position: absolute;
    inset: -15% 0;
    z-index: -1;
    background: var(--hero-bg) center / cover no-repeat;
    transform: translate3d(0, var(--parallax, 0px), 0);
    will-change: transform;
}

.home-hero-phones {
    transform: translate3d(0, var(--parallax-front, 0px), 0);
    will-change: transform;
}

.home-hero-phones {
    width: min(100%, 555px);
    max-height: min(622px, 62vh);
    height: auto;
    object-fit: contain;
}

/* "Detailed Graphics, Inspiring Ideas..." */
.home-skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 32px 16px;
    list-style: none;
    padding: 0;
    margin: 0 0 80px;
    text-align: center;
}

.home-skills li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    color: var(--x-charcoal);
}

.home-skill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--x-yellow-soft);
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background-color .3s ease, box-shadow .3s ease;
}

.home-skill-icon i {
    font-size: 1.9rem;
    color: var(--x-yellow-strong);
    transition: color .3s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1);
}

.home-skills li:hover .home-skill-icon {
    background: var(--x-yellow);
    box-shadow: 0 10px 24px rgba(245, 184, 0, .35);
    transform: translateY(-6px);
}

.home-skills li:hover .home-skill-icon i {
    color: #232323;
    transform: rotate(-10deg) scale(1.12);
}

/* 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);
}

[data-animate].is-in .home-skill-icon,
[data-animate].is-in .home-feature-icon {
    animation: home-pop .6s cubic-bezier(.34, 1.56, .64, 1) both;
    animation-delay: calc(var(--i, 0) * 120ms + 250ms);
}

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

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes home-pop {
    0% {
        transform: scale(.6);
    }

    60% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}

.home-skills-small {
    margin: 72px 0 0;
}

.home-skills-small li {
    flex-direction: row;
    justify-content: center;
}

.home-skills-small li {
    gap: 12px;
    cursor: default;
}

.home-small-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--x-line);
    transition: background-color .3s ease, border-color .3s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.home-small-icon i {
    font-size: 1.05rem;
    color: var(--x-charcoal);
    transition: color .3s ease;
}

.home-small-label {
    background: linear-gradient(var(--x-yellow), var(--x-yellow)) left bottom / 0 3px no-repeat;
    transition: background-size .35s ease;
}

.home-skills-small li:hover .home-small-icon {
    background: #232323;
    border-color: #232323;
    transform: rotate(-10deg) scale(1.1);
}

.home-skills-small li:hover .home-small-icon i {
    color: var(--x-yellow);
}

.home-skills-small li:hover .home-small-label {
    background-size: 100% 3px;
}

.home-hello-word {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1;
    color: var(--x-yellow);
    margin: 0;
}

.home-hello-heading {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--x-charcoal);
    margin: 0;
}

/* Work: filter buttons and the gallery */
.home-work {
    padding-bottom: 0;
}

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

.home-filter button {
    border: 0;
    background: none;
    padding: 4px 0;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--x-grey);
    border-bottom: 2px solid transparent;
}

.home-filter button.active,
.home-filter button:hover {
    color: var(--x-charcoal);
    border-bottom-color: var(--x-yellow-strong);
}

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

.home-gallery-item {
    position: relative;
    margin: 0;
    aspect-ratio: 1;
    overflow: hidden;
}

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

.home-gallery-item > button {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.home-gallery-item figcaption i {
    margin-top: 10px;
    color: var(--x-yellow-strong);
}

.home-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.home-gallery-item figcaption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .92);
    opacity: 0;
    transition: opacity .3s ease;
    text-align: center;
}

.home-gallery-item figcaption strong {
    font-size: 1.15rem;
    text-transform: uppercase;
    color: #232323;
}

.home-gallery-item figcaption span {
    font-size: .75rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #777;
}

.home-gallery-item:hover figcaption,
.home-gallery-item:focus-within figcaption,
.home-gallery-item > button:focus-visible figcaption {
    opacity: 1;
}

.home-gallery-item:hover img {
    transform: scale(1.05);
}

/* A gallery picture, larger */
.home-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 72px;
    background: rgba(18, 18, 18, .95);
}

.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;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

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

.home-lightbox-figure figcaption strong {
    text-transform: uppercase;
}

.home-lightbox-figure figcaption span {
    margin-left: 8px;
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #bdbdbd;
}

.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(--x-yellow);
    color: #232323;
}

.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 work */
.home-video {
    background: linear-gradient(to bottom, #fff, var(--x-grey-light));
}

.home-play {
    position: absolute;
    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: #fff;
    color: #232323;
    font-size: 1.4rem;
    box-shadow: 0 0 0 14px rgba(255, 255, 255, .45), var(--x-shadow);
    text-decoration: none;
    transition: transform .2s ease;
}

.home-play:hover {
    color: #232323;
    transform: scale(1.08);
}

.home-feature {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.home-feature-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--x-shadow);
    font-size: 1.4rem;
    color: var(--x-charcoal);
}

.home-feature-icon {
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background-color .3s ease, color .3s ease, box-shadow .3s ease;
}

.home-feature-icon i {
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}

/* On hover the white circle turns charcoal, like the original design */
.home-feature:hover .home-feature-icon {
    background: #232323;
    color: var(--x-yellow);
    box-shadow: 0 10px 24px rgba(35, 35, 35, .25);
    transform: translateY(-4px);
}

.home-feature:hover .home-feature-icon i {
    transform: scale(1.15) rotate(-8deg);
}

.home-feature strong {
    display: block;
    color: var(--x-charcoal);
}

.home-feature p {
    margin: 4px 0 0;
    color: var(--x-grey);
}

/* "PHP Development / Graphic Design / ..." changing under the heading */
.home-role {
    display: block;
    margin-top: 8px;
    color: var(--x-yellow-strong);
    text-decoration: underline 4px var(--x-yellow);
    text-underline-offset: 8px;
}

/* The motto, cut out of the sunset photo */
.home-motto {
    padding: 72px 16px;
    text-align: center;
    border-top: 1px solid var(--x-line);
}

.home-motto p {
    margin: 0;
    /* Two lines, each sized to fill the width - "inspired by genius" is the longer one */
    font-size: clamp(1.5rem, 9.4vw, 10rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.03em;
    text-transform: uppercase;
    /* The sunset shows through the letters. public/js/home.js pans it from top to bottom as
       the motto scrolls up the screen (--motto-pos); without it the photo sits centred */
    background-position: center var(--motto-pos, 50%);
    background-size: cover;
    background-color: #232323;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-motto p span {
    display: block;
    white-space: nowrap;
}

/* Latest articles */
.home-posts {
    background: var(--x-grey-light);
}

/* Contact */
.home-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}

.home-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--x-line);
    color: var(--x-charcoal);
    text-decoration: none;
}

.home-social a:hover {
    background: var(--x-yellow);
    border-color: var(--x-yellow);
    color: #232323;
}

.home-contact-form {
    background: var(--bs-body-bg);
    padding: 32px;
    border-radius: var(--x-radius);
    box-shadow: var(--x-shadow);
    border-top: 5px solid var(--x-yellow);
}

/* Closing: the yellow rings */
/* Closing: steveshead.io's - "steve shead" in big yellow letters running off to the left, the
   sentence, a square dark button, and the yellow rings on the right */
.home-closing {
    padding: 160px 0;
    border-top: 1px solid var(--x-line);
    background: var(--bs-body-bg) right center no-repeat;
    overflow-x: clip;
}

.home-closing-name {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* wider than its column: it spills out to the left */
    margin: 0;
    font-size: clamp(5rem, 12vw, 12.5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.05em;
    color: var(--x-yellow);
    white-space: nowrap;
    padding-right: .2em;
}

.home-closing-words {
    margin: 0;
    font-size: clamp(1.6rem, 2.3vw, 2.5rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: #232323;
}

.home-closing-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 2px solid #232323;
    background: #232323;
    color: #fff;
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(35, 35, 35, .18);
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.home-closing-button:hover,
.home-closing-button:focus-visible {
    background: transparent;
    color: #232323;
    transform: translateY(-2px);
}

@media (max-width: 991.98px) {
    .home-closing {
        padding: 96px 0;
        text-align: center;
        background-size: 60% auto;
    }

    .home-closing-name {
        align-items: center;
        padding-right: 0;
    }
}

.home-newsletter {
    padding: 64px 0;
    background: var(--x-grey-light);
}

.home-newsletter .newsletter-box {
    margin: 0;
}

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

@media (max-width: 575.98px) {
    .home-lightbox {
        padding: 72px 12px;
    }

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

    .home-section {
        padding: 64px 0;
    }

    .home-gallery {
        grid-template-columns: 1fr;
    }

    .home-gallery-item.tall {
        grid-row: auto;
        aspect-ratio: 1;
    }

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

@media (prefers-reduced-motion: reduce) {
    .home-gallery-item img,
    .home-play,
    .home-skill-icon,
    .home-skill-icon i,
    .home-feature-icon,
    .home-feature-icon i {
        transition: none;
    }

    [data-animate].is-waiting li,
    [data-animate].is-in li,
    [data-animate].is-in .home-skill-icon,
[data-animate].is-in .home-feature-icon {
        opacity: 1;
        animation: none;
    }
}
