@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&display=swap");

:root {
    --bg: #f0e9df;
    --ink: #17140f;
    --muted: #6b6459;
    --line: #17140f;
    --badge-bg: #17140f;
}

* {
    box-sizing: border-box;
}

body.home-page {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}

/* ===== Custom cursor (ported from https://codepen.io/PaulineWahle/pen/QWQKENN) ===== */
* {
    cursor: none;
}

.cursor-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 10000;
}

.cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    background-color: #758bfd;
    border-radius: 50%;
    transition: all 1s ease;
    transition-property: width, height;
    pointer-events: none;
    transform-origin: center;
    z-index: 10000;
}

.cursor-dashed {
    position: fixed;
    animation: rotating 20s linear infinite;
    width: 0px;
    height: 0px;
    opacity: 0;
    background: none;
    border: none;
    border-radius: 50%;
    pointer-events: none;
    transition-property: width, height;
    transition: all .1s ease-out;
    transform-origin: center;
    z-index: 10000;
}

.cursor-hover {
    width: 20px;
    height: 20px;
    background-color: #758bfd;
}

.cursor-dashed-hover {
    opacity: 1;
    width: 40px;
    height: 40px;
    border: 2.5px dotted #758bfd;
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .cursor-wrapper {
        display: none;
    }
}

.home__row {
    display: grid;
    border-top: 1px solid var(--line);
    padding-left: max(0px, calc((100% - 1440px) / 2));
    padding-right: max(0px, calc((100% - 1440px) / 2));
}

.home__row > * {
    padding: 28px 32px;
}

/* ===== Header ===== */
.home__header {
    border-top: none;
    border-bottom: 1px solid var(--line);
    grid-template-columns: 1fr 200px 160px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
}

.home__logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--ink);
    text-decoration: none;
}

.home__nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--line);
    font-size: 15px;
    color: var(--ink);
    text-decoration: none;
}

.home__nav-link:hover {
    text-decoration: underline;
}

.home__header + .home__intro {
    border-top: none;
}

/* ===== Intro ===== */
.home__intro {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
}

.home__intro p {
    margin: 0;
    font-size: 19px;
    line-height: 1.5;
    max-width: none;
}

.home__intro > p {
    margin-top: 62px;
}

.home__intro-icons {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.home__icon--lg {
    width: 34px;
    height: 34px;
}

/* ===== Section title ===== */
.home__section-title {
    grid-template-columns: 1fr;
    row-gap: 6px;
    padding-top: 28px;
    padding-bottom: 28px;
    padding-left: calc(max(0px, calc((100% - 1440px) / 2)) + 32px);
    padding-right: calc(max(0px, calc((100% - 1440px) / 2)) + 32px);
}

.home__section-title > * {
    padding: 0;
}

.home__section-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home__section-title p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

/* ===== Case studies grid ===== */
.home__cases {
    grid-template-columns: repeat(4, 1fr);
}

.home__case {
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 340px;
    color: var(--ink);
    text-decoration: none;
}

.home__cases > .home__case:first-child {
    border-left: none;
}

.home__cases > .home__case:first-child,
.home__cases > .home__case:last-child {
    position: relative;
}

.home__cases > .home__case:first-child::before,
.home__cases > .home__case:last-child::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50vw;
    background-color: transparent;
    transition: background-color 0.15s ease;
    pointer-events: none;
}

.home__cases > .home__case:first-child::before {
    right: 100%;
}

.home__cases > .home__case:last-child::before {
    left: 100%;
}

a.home__case {
    transition: background-color 0.15s ease;
}

a.home__case:hover {
    background-color: rgba(23, 20, 15, 0.05);
}

a.home__case:first-child:hover::before,
a.home__case:last-child:hover::before {
    background-color: rgba(23, 20, 15, 0.05);
}

.home__case-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.home__case h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
}

.home__case-footer p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink);
}

.home__icon {
    flex: none;
    width: 30px;
    height: 30px;
    display: block;
}

.home__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ===== Footer ===== */
.home__footer {
    grid-template-columns: 1fr;
    row-gap: 2px;
    padding-top: 28px;
    padding-bottom: 64px;
    padding-left: calc(max(0px, calc((100% - 1440px) / 2)) + 32px);
    padding-right: calc(max(0px, calc((100% - 1440px) / 2)) + 32px);
}

.home__footer > * {
    padding: 0;
}

.home__footer h2 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home__footer a,
.home__footer p {
    color: var(--ink);
    text-decoration: none;
    font-size: 19px;
    margin: 0;
}

.home__footer a:hover {
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .home__header {
        grid-template-columns: 1fr auto auto;
    }

    .home__intro {
        grid-template-columns: 1fr;
        row-gap: 20px;
    }

    .home__intro > p {
        margin-top: 0;
    }

    .home__cases {
        grid-template-columns: repeat(2, 1fr);
    }

    .home__cases > .home__case:nth-child(2n+1) {
        border-left: none;
    }

    .home__cases > .home__case:nth-child(-n+2) {
        border-top: none;
    }

    .home__cases > .home__case:nth-child(n+3) {
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 560px) {
    .home__row > * {
        padding: 20px;
    }

    .home__header {
        grid-template-columns: 1fr auto auto;
    }

    .home__logo {
        font-size: 18px;
    }

    .home__cases {
        grid-template-columns: 1fr;
    }

    .home__cases > .home__case {
        border-left: none;
        min-height: unset;
        gap: 24px;
    }

    .home__cases > .home__case:not(:first-child) {
        border-top: 1px solid var(--line);
    }
}
