@charset "utf-8";

/* ---------- general.cssのリセット ---------- */
body {
    grid-template-areas:
        'header header header '
        'main main main'
        'footer footer footer';
}

main {
    grid-area: main;
    padding-block: 0;
    padding-inline: 0;
}

/* ---------- レイアウト ---------- */
.top main {
    display: grid;
    grid-template-areas:
        'hero hero hero'
        '. about .'
        '. link .'
        '. news .';
    grid-template-columns: 1fr calc(var(--logPx) * 960) 1fr;
    text-align: center;
    background-image: url('../images/bg-cafeforest.jpg');
    background-attachment: local;
    background-position: center;
}

.top h1 {
    display: none;
}

.top main > section {
    padding-block-start: 2.5em;
    background-color: var(--color-orange2);
}

/* ---------- メインビジュアル ---------- */
.top main > section:nth-of-type(1) {
    display: flex;
    grid-area: hero;
    align-items: center;
    justify-content: center;
    margin-block-start: 0;
    color: rgb(255 255 255);
    background-image: url('../images/cafeforest.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    block-size: 75vh;
}

.top main > section:nth-of-type(1) > div > h2 {
    font-weight: bolder;
    color: rgb(255 255 255);
    text-shadow: 3px 3px 5px rgb(0 0 0 / 30%);
}

.top .btn a {
    inline-size: max(200px, var(--logPx) * 250);
    font-weight: bold;
    color: rgb(255 255 255);
    text-shadow: 2px 2px 4px rgb(0 0 0 / 70%);
    background-color: rgb(255 255 255 / 30%);
    border: 4px solid rgb(255 255 255);
    block-size: max(30px, var(--logPx) * 50);
}

.top .btn a::after {
    border-top: 4px solid rgb(255 255 255);
    border-right: 4px solid rgb(255 255 255);
}

.top .btn a:is(:hover, :active) {
    color: var(--color-brown1);
    background-color: rgb(255 255 255);
}

.top .btn a:is(:hover, :active)::after {
    border-top: 2px solid var(--color-brown1);
    border-right: 2px solid var(--color-brown1);
}

/* ---------- Cafe Forestについて ---------- */
.top main > section:nth-of-type(2) {
    grid-area: about;
}

.top main > section:nth-of-type(2) > p:last-of-type > a {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    inline-size: 14em;
    padding-block: 0.5em;
    padding-inline-start: 1.5em;
    margin-block: 2em;
    margin-inline: auto;
    border-bottom: 1px solid var(--color-brown2);
}

.top main > section:nth-of-type(2) > p:last-of-type > a::after {
    inset-inline-start: 3px;
    inline-size: 4px;
    content: '';
    border-top: 1px solid var(--color-brown2);
    border-right: 1px solid var(--color-brown2);
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    block-size: 4px;
}

/* ---------- ナビゲーション ---------- */
.top main > section:nth-of-type(3) {
    grid-area: link;
}

.top main > section:nth-of-type(3) > h2 {
    display: none;
}

.top main > section:nth-of-type(3) ul {
    display: flex;
    gap: 50px;
    justify-content: center;
}

.top main section:nth-of-type(3) ul > li > a {
    display: flex;
    align-items: end;
    justify-content: center;
    inline-size: calc(var(--logPx) * 220);
    padding: 2em;
    text-align: center;
    background-color: var(--color-green1);
    background-repeat: no-repeat;
    background-position: 50% 40%;
    border: 1px solid var(--color-brown2);
    border-radius: 10%;
    block-size: calc(var(--logPx) * 220);
}

.top main section:nth-of-type(3) ul > li:nth-of-type(1) > a {
    background-image: url('../images/icon-calendar.png');
}

.top main section:nth-of-type(3) ul > li:nth-of-type(2) > a {
    background-image: url('../images/icon-menu.png');
}

.top main section:nth-of-type(3) ul > li:nth-of-type(3) > a {
    background-image: url('../images/icon-online.png');
}

.top main > section:nth-of-type(3) ul > li > a:is(:hover, :active) {
    color: white;
    background-color: var(--color-brown2);
    transition: 0.5s;
}

/* ---------- お知らせ ---------- */
.top main > section:nth-of-type(4) {
    grid-area: news;
    padding-block-end: 4em;
}

.top main > section:nth-of-type(4) > h2 {
    text-align: center;
}

.top main > section:nth-of-type(4) > dl {
    inline-size: 80%;
    margin: auto;
    text-align: start;
}

.top main > section:nth-of-type(4) > dl > a {
    display: flex;
    justify-content: center;
    padding-block: 1em;
    border-block-start: 1px solid black;
}

.top main > section:nth-of-type(4) > dl > a:last-of-type {
    border-block-end: 1px solid black;
}

.top main > section:nth-of-type(4) > dl > a::after {
    inline-size: 4px;
    content: '';
    border-top: 1px solid var(--color-brown2);
    border-right: 1px solid var(--color-brown2);
    -webkit-transform: rotate(45deg) translate(0.6em);
    transform: rotate(45deg) translate(0.6em);
    block-size: 4px;
}

.top main > section:nth-of-type(4) > dl > a > dt {
    inset-inline-start: 30%;
    inline-size: 30%;
}

.top main > section:nth-of-type(4) > dl > a > dd {
    inset-inline-start: 50%;
    inline-size: 50%;
}

/* =======================================================
メディアクエリ
======================================================= */
@media screen and (width <= 767px) {
    .top main {
        display: grid;
        grid-template-areas:
            'hero hero hero'
            'about about about'
            'link link link'
            'news news news';
    }

    .top main > section:nth-of-type(1) {
        block-size: 82vh;
    }

    .top main > section:not(:nth-of-type(1)) {
        padding-inline: 2em;
    }

    /* ---------- about ---------- */
    .top main > section:nth-of-type(2) > p:not(last-of-type) {
        text-align: start;
    }

    .top main > section:nth-of-type(2) > p:last-of-type {
        text-align: center;
    }

    /* ---------- link ---------- */
    .top main > section:nth-of-type(3) ul {
        flex-direction: column;
    }

    .top main > section:nth-of-type(3) ul > li {
        margin-inline: auto;
    }

    .top main > section:nth-of-type(3) ul > li > a {
        inline-size: 200px; /* 固定 */
        block-size: 200px; /* 固定 */
    }

    /* ---------- news ---------- */
    .top main > section:nth-of-type(4) > dl > a {
        display: block;
        margin: auto;
    }

    .top main > section:nth-of-type(4) > dl > a::after {
        display: none;
    }

    .top main > section:nth-of-type(4) > dl > a > dt {
        inline-size: 75%;
        margin: auto;
        font-size: 0.8em;
    }

    .top main > section:nth-of-type(4) > dl > a > dd {
        inline-size: 75%;
        margin: auto;
    }
}
