/* Homepage */

.home-body {
    --home-font-text: var(--font-text);
    --home-font-display: var(--font-display);
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--home-font-text);
    font-weight: 480;
    background:
        radial-gradient(circle at 9% 4%, rgba(218, 177, 92, 0.16), transparent 25rem),
        radial-gradient(circle at 92% 18%, rgba(38, 115, 91, 0.12), transparent 28rem),
        #f1efe8;
}

.home-body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background-image:
        linear-gradient(rgba(31, 54, 45, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 54, 45, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    content: "";
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 72%);
    mask-image: linear-gradient(to bottom, #000, transparent 72%);
    pointer-events: none;
}

.home-shell {
    width: min(1220px, calc(100% - 56px));
    margin: 0 auto;
    padding: 0 0 110px;
}

.home-topbar {
    display: flex;
    min-height: 90px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid rgba(42, 68, 58, 0.16);
}

.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.home-brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-family: var(--home-font-display);
    font-size: 1.08rem;
    font-weight: 700;
}

.home-topline {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #667069;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.home-topline i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(38, 115, 91, 0.1);
}

.home-hero {
    display: grid;
    min-height: 660px;
    max-width: none;
    grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.88fr);
    align-items: center;
    gap: clamp(52px, 8vw, 112px);
    padding: 76px 0 88px;
    border-bottom: 1px solid rgba(42, 68, 58, 0.2);
}

.home-hero-copy {
    position: relative;
    z-index: 1;
}

.home-hero .eyebrow {
    margin-bottom: 24px;
    color: var(--accent);
}

.home-hero h1 {
    margin: 0;
    font-family: var(--home-font-display);
    font-size: clamp(3.9rem, 6.9vw, 6.85rem);
    font-weight: 760;
    letter-spacing: -0.035em;
    line-height: 0.94;
}

.home-hero h1 em {
    color: var(--accent);
    font-style: normal;
    font-weight: inherit;
}

.home-lead {
    max-width: 610px;
    margin: 36px 0 0;
    color: #626b65;
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    font-weight: 460;
    line-height: 1.65;
}

.home-steps {
    display: grid;
    max-width: 660px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 48px;
    border: 1px solid rgba(42, 68, 58, 0.16);
    border-radius: 16px;
    background: rgba(42, 68, 58, 0.14);
    overflow: hidden;
}

.home-steps > div {
    min-width: 0;
    padding: 15px 16px;
    background: rgba(247, 246, 240, 0.92);
}

.home-steps span {
    color: var(--accent);
    font-family: var(--home-font-display);
    font-size: 0.78rem;
    font-weight: 700;
}

.home-steps p {
    margin: 5px 0 0;
    color: #68716b;
    font-size: 0.73rem;
    line-height: 1.35;
}

.home-steps b {
    color: var(--ink);
}

.hero-visual {
    position: relative;
    min-height: 530px;
    padding: 28px;
    border-radius: 42px;
    background:
        radial-gradient(circle at 82% 10%, rgba(234, 190, 96, 0.28), transparent 34%),
        #183f34;
    box-shadow: 0 36px 90px rgba(25, 51, 42, 0.2);
    color: #fff;
}

.hero-visual-label {
    position: absolute;
    top: 29px;
    left: 31px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.deck-card {
    position: absolute;
    width: min(72%, 310px);
    aspect-ratio: 0.78;
    border-radius: 23px;
}

.deck-card-back {
    top: 72px;
    right: 44px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.09);
    transform: rotate(11deg);
}

.deck-card-middle {
    top: 78px;
    right: 61px;
    background: #d9b769;
    transform: rotate(5deg);
}

.deck-card-main {
    top: 78px;
    right: 84px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 18px;
    background: #fbfaf5;
    box-shadow: 0 24px 60px rgba(7, 24, 18, 0.32);
    color: var(--ink);
    transform: rotate(-3deg);
}

.deck-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 13px;
    color: #707871;
    font-size: 0.68rem;
    font-weight: 700;
}

.deck-card-head strong {
    color: var(--accent);
    font-family: var(--home-font-display);
    font-size: 1.65rem;
    font-weight: 700;
}

.deck-art {
    position: relative;
    display: grid;
    overflow: hidden;
    place-items: center;
    border-radius: 14px;
    background: #e7ece7;
}

.deck-art i {
    position: absolute;
    border-radius: 50%;
}

.deck-art i:nth-child(1) {
    top: -20%;
    left: -12%;
    width: 70%;
    aspect-ratio: 1;
    background: #266d58;
}

.deck-art i:nth-child(2) {
    right: -18%;
    bottom: -16%;
    width: 80%;
    aspect-ratio: 1;
    background: #e0b352;
}

.deck-art i:nth-child(3) {
    top: 35%;
    right: 16%;
    width: 26%;
    aspect-ratio: 1;
    background: #f8f5eb;
}

.deck-art > span {
    position: relative;
    z-index: 1;
    display: grid;
    width: 70px;
    height: 70px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(24, 63, 52, 0.9);
    color: #fff;
    font-family: var(--home-font-display);
    font-size: 2rem;
    font-weight: 700;
}

.deck-score {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding-top: 14px;
}

.deck-score span {
    display: grid;
    min-height: 30px;
    place-items: center;
    border: 1px solid #d9ded8;
    border-radius: 8px;
    color: #8a918b;
    font-size: 0.63rem;
    font-weight: 800;
}

.deck-score .is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.hero-visual-copy {
    position: absolute;
    bottom: 28px;
    left: 31px;
    display: grid;
}

.hero-visual-copy span {
    color: #d9b769;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-visual-copy strong {
    margin-top: 5px;
    font-family: var(--home-font-display);
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.22;
}

.project-section {
    padding-top: 72px;
    border-top: 0;
}

.section-heading {
    align-items: end;
    margin-bottom: 30px;
}

.section-heading > div {
    display: grid;
    gap: 7px;
}

.section-heading h2 {
    font-family: var(--home-font-display);
    font-size: clamp(2.1rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

.section-heading > .project-count {
    display: flex;
    min-width: max-content;
    height: auto;
    align-items: baseline;
    gap: 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
}

.project-count strong {
    color: var(--accent);
    font-family: var(--home-font-display);
    font-size: 2.35rem;
    font-weight: 700;
    line-height: 1;
}

.project-count small {
    color: var(--muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    display: flex;
    min-height: 280px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px;
    border: 1px solid rgba(42, 68, 58, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 34px rgba(35, 54, 46, 0.045);
    text-decoration: none;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.project-card:nth-child(3n + 2) {
    background: rgba(244, 237, 222, 0.84);
}

.project-card:nth-child(3n + 3) {
    background: rgba(229, 238, 232, 0.86);
}

.project-card:hover {
    border-color: rgba(38, 115, 91, 0.42);
    box-shadow: 0 26px 70px rgba(35, 54, 46, 0.12);
    transform: translateY(-7px);
}

.project-card:focus-visible {
    outline: 3px solid rgba(38, 115, 91, 0.24);
    outline-offset: 4px;
}

.project-card.is-preparing {
    opacity: 0.72;
}

.project-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.project-index {
    color: var(--accent);
    font-family: var(--home-font-display);
    font-size: 0.86rem;
    font-weight: 700;
}

.project-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #667069;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-state i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(38, 115, 91, 0.1);
}

.is-preparing .project-state i {
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(226, 168, 59, 0.12);
}

.project-card h3 {
    margin: 47px 0 18px;
    font-family: var(--home-font-display);
    font-size: clamp(1.55rem, 2.6vw, 2.15rem);
    font-weight: 720;
    letter-spacing: -0.018em;
    line-height: 1.1;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 17px;
    color: #6c756e;
    font-size: 0.78rem;
}

.project-meta strong {
    color: var(--ink);
    font-size: 0.92rem;
}

.project-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: auto;
    padding-top: 32px;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 800;
}

.project-arrow {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 1rem;
    transition: background 180ms ease, transform 180ms ease;
}

.project-card:hover .project-arrow {
    background: var(--accent);
    transform: rotate(9deg);
}

.empty-card {
    min-height: 330px;
    align-content: center;
    gap: 10px;
    padding: 54px 24px;
    border: 1px solid rgba(42, 68, 58, 0.16);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 20px 60px rgba(35, 54, 46, 0.06);
}

.empty-card h3 {
    margin-top: 5px;
    font-family: var(--home-font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.empty-visual {
    position: relative;
    width: 110px;
    height: 70px;
    margin-bottom: 18px;
}

.empty-visual i {
    position: absolute;
    width: 54px;
    height: 66px;
    border: 1px solid rgba(38, 115, 91, 0.28);
    border-radius: 12px;
    background: #f9f8f3;
}

.empty-visual i:nth-child(1) {
    left: 10px;
    transform: rotate(-10deg);
}

.empty-visual i:nth-child(2) {
    left: 28px;
}

.empty-visual i:nth-child(3) {
    left: 46px;
    background: var(--accent-soft);
    transform: rotate(10deg);
}

@media (max-width: 1050px) {
    .home-hero {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
        gap: 42px;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .home-shell {
        width: min(100% - 28px, 1220px);
        padding-bottom: 72px;
    }

    .home-topbar {
        min-height: 74px;
    }

    .home-hero {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 50px;
        padding: 54px 0 64px;
    }

    .home-hero h1 {
        font-size: clamp(3.2rem, 13.7vw, 5.6rem);
    }

    .home-lead {
        margin-top: 28px;
    }

    .hero-visual {
        width: min(100%, 500px);
        min-height: 500px;
        margin: 0 auto;
    }

    .project-section {
        padding-top: 54px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: 245px;
    }
}

@media (max-width: 520px) {
    .home-topline {
        display: none;
    }

    .home-steps {
        grid-template-columns: 1fr;
    }

    .home-steps > div {
        display: grid;
        grid-template-columns: 34px 1fr;
        align-items: center;
        padding: 11px 14px;
    }

    .home-steps p {
        margin: 0;
    }

    .hero-visual {
        min-height: 500px;
        padding: 20px;
        border-radius: 30px;
    }

    .hero-visual-label {
        top: 23px;
        left: 23px;
    }

    .deck-card {
        width: min(72%, 250px);
    }

    .deck-card-back {
        top: 65px;
        right: 25px;
    }

    .deck-card-middle {
        top: 69px;
        right: 39px;
    }

    .deck-card-main {
        top: 69px;
        right: 56px;
        padding: 14px;
    }

    .hero-visual-copy {
        bottom: 22px;
        left: 23px;
    }

    .section-heading {
        align-items: end;
    }

    .project-count small {
        display: none;
    }

    .project-card {
        min-height: 225px;
        padding: 20px;
    }

    .project-card h3 {
        margin-top: 34px;
    }
}

@media (prefers-color-scheme: dark) {
    .home-body {
        --paper: #0d1512;
        --surface: #15231d;
        --ink: #edf4ef;
        --muted: #a8b4ad;
        --line: #2d4037;
        --line-strong: #465b50;
        --accent: #73c9a8;
        --accent-dark: #58b894;
        --accent-soft: #19382d;
        --gold: #e5bb63;
        --gold-soft: #3a301d;
        color-scheme: dark;
        background:
            radial-gradient(circle at 9% 4%, rgba(218, 177, 92, 0.11), transparent 25rem),
            radial-gradient(circle at 92% 18%, rgba(69, 177, 137, 0.15), transparent 28rem),
            var(--paper);
    }

    .home-body::before {
        background-image:
            linear-gradient(rgba(191, 216, 203, 0.035) 1px, transparent 1px),
            linear-gradient(90deg, rgba(191, 216, 203, 0.035) 1px, transparent 1px);
    }

    .home-topbar,
    .home-hero {
        border-color: rgba(164, 197, 181, 0.17);
    }

    .home-brand-mark,
    .project-arrow {
        background: var(--accent);
        color: #102019;
    }

    .home-topline,
    .home-lead,
    .home-steps p,
    .project-state,
    .project-meta {
        color: var(--muted);
    }

    .home-steps {
        border-color: rgba(164, 197, 181, 0.18);
        background: rgba(164, 197, 181, 0.12);
    }

    .home-steps > div {
        background: rgba(20, 34, 28, 0.94);
    }

    .hero-visual {
        background:
            radial-gradient(circle at 82% 10%, rgba(229, 187, 99, 0.2), transparent 34%),
            #112d25;
        box-shadow: 0 36px 90px rgba(0, 0, 0, 0.3);
    }

    .deck-card-main {
        background: #17251f;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
        color: var(--ink);
    }

    .deck-card-head {
        color: var(--muted);
    }

    .deck-art {
        background: #21352c;
    }

    .deck-art i:nth-child(3) {
        background: #dbe7df;
    }

    .deck-score span {
        border-color: #3b5045;
        color: #9aa9a1;
    }

    .deck-score .is-active {
        color: #102019;
    }

    .project-card {
        border-color: rgba(164, 197, 181, 0.14);
        background: rgba(20, 34, 28, 0.88);
        box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12);
    }

    .project-card:nth-child(3n + 2) {
        background: rgba(44, 38, 25, 0.9);
    }

    .project-card:nth-child(3n + 3) {
        background: rgba(22, 43, 34, 0.92);
    }

    .project-card:hover {
        border-color: rgba(115, 201, 168, 0.5);
        box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
    }

    .empty-card {
        border-color: rgba(164, 197, 181, 0.16);
        background: rgba(20, 34, 28, 0.7);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    }

    .empty-visual i {
        border-color: rgba(115, 201, 168, 0.3);
        background: #17251f;
    }
}
