@charset "utf-8";

/*

◆ まだ学習していない内容 ◆

・カスタムプロパティ
    :root{}
    --任意:;
    :var(--任意);

/////  セレクタ  /////
::selection{}

/////  プロパティ  /////
・scroll-behavior:;
・margin-inline:;
・pointer-events:;
・aspect-ratio:;
・outline:;
・outline-offset:;
・container-type:;
・clip-path:;
・touch-action:;
・text-wrap:; (HTMLに直接記述しています)

/////     値     /////
・:calc();
・:clamp();
・:fit-content;
・:min();

///// メディアクエリ /////
・@media (midth <= 任意px){}
・@media (any-hover:hover){}
・@container(width <= 任意px){}


他にも既知のプロパティなど工夫した使い方があります。

*/

/*******************************************************
********************************************************

    common

********************************************************
*******************************************************/

/*//////// PCのclamp()は全て[768px <= vw <= 1100px]で可変。////////*/

:root {
    /* color */
    --dark_brown: #3e220b;
    --white: #fff;

    /* Google Fonts */
    --logo_font: "Barriecito", system-ui;
    --basic_font: "M PLUS 1", sans-serif;
}

html {
    scroll-behavior: smooth;
}

::selection {
    color: #F7E9CE;
    background-color: #188102;
}

body {
    font-family: var(--basic_font);
    font-weight: 500;
    font-size: calc(18/16 * 1rem);
    color: var(--dark_brown);
    /* 背景のドット柄 */
    background-image: radial-gradient(#ccc 10%, beige 10%);
    background-size: 15px 15px;
    line-height: 1.5rem;
    /* 横スクロール禁止(#aboutの北九州の画像がはみ出すケースがある) */
    overflow: hidden auto;
}

main {
    /* 左の木の幹分 */
    padding-left: 10lvh;
}

p {
    margin-bottom: 1rem;
}

.section {
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 3rem 1rem;
}

h2 {
    font-size: 2rem;
    width: fit-content;
    margin: 0 auto 5rem;
    padding: 1rem 2rem;
    color: var(--white);
    background-color: var(--dark_brown);
    text-align: center;
}

/*******************************************************
********************************************************

     header

********************************************************
*******************************************************/

header h1 {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999;
}

header h1 .h1_img {
    display: block;
    translate: -15% 0;
    height: 100lvh;
    pointer-events: none;
    z-index: -1;
}

header h1 .h1_text {
    display: block;
    position: absolute;
    top: 3lvh;
    right: 28%;
    padding: 1rem;
    font-family: var(--logo_font);
    /* 背景の木の大きさがvhで変動するため、font-sizeもvhで可変 */
    font-size: 6lvh;
    color: #fff;
    rotate: -9deg;
    pointer-events: auto;
}

/* リスのしっぽ */
header h1::before {
    content: "";
    display: block;
    position: absolute;
    top: 0%;
    left: 23%;
    /* 背景の木の大きさがvhで変動するため、しっぽの画像もvhで可変 */
    height: 15lvh;
    /* しっぽ画像のアス比 */
    aspect-ratio: 1/1.8;
    background-image: url(../image/tail.webp);
    background-size: cover;
    transition: top .3s ease;
}

@media (any-hover:hover) {

    /* リスのしっぽ */
    h1:hover::before {
        top: 12%;
    }

    /* h1テキストのアニメーション */
    h1:hover .h1_text {
        animation: h1_hover .8s linear infinite;
    }

    @keyframes h1_hover {
        from {
            rotate: -9deg;
        }

        6% {
            rotate: -4deg;
        }

        12% {
            rotate: -9deg;
        }

        18% {
            rotate: -9deg;
        }

        24% {
            rotate: -4deg;
        }

        30% {
            rotate: -9deg;
        }

        to {
            rotate: -9deg;
        }
    }
}


/*******************************************************
********************************************************

    main

********************************************************
*******************************************************/

/*******************************************************

    #about

*******************************************************/

#about {
    display: grid;
    place-content: center;
    position: relative;
    height: 100lvh;
}

/* スクロール促し */
#about::before {
    content: "";
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 6rem;
    aspect-ratio: 1/1;
    background-image: url(../image/keyboard_double_arrow_down.svg);
    background-size: contain;
    background-repeat: no-repeat;
    translate: -50% 50%;
    opacity: 0;
    scale: 0;
    animation: scroll_icon 2.5s linear infinite forwards;
}

@keyframes scroll_icon {

    from {
        bottom: 50%;
        opacity: 0;
        scale: 0.5;
    }

    4.9% {
        bottom: 50%;
        opacity: 0;
        scale: 0.5;
    }

    5% {
        bottom: 50%;
        opacity: 1;
        scale: 1;
    }

    85% {
        bottom: -1%;
        opacity: 1;
        scale: 1;
    }

    to {
        /* bottomの値は、sectionのmargin-bottom分 */
        bottom: -5rem;
        opacity: 0;
        scale: 0.5;
    }
}

#about .about_content {
    position: relative;
    padding: 5rem;
    background-color: #fbe8b6;
    outline: 2px solid var(--dark_brown);
    outline-offset: -1rem;
}

/* 北九州市のシルエット画像配置 */
#about .about_content::before {
    content: "";
    display: block;
    position: absolute;
    top: -29%;
    right: -6%;
    width: 25rem;
    /* 北九州市画像のアス比 */
    aspect-ratio: 1.2/1;
    background-image: url(../image/kitakyusyu.webp);
    background-size: contain;
    background-repeat: no-repeat;
    animation: shake 5s ease-in-out infinite alternate;
}

@keyframes shake {
    from {
        rotate: 3deg;
    }

    to {
        rotate: -3deg;
    }
}

#about .about_content p {
    position: relative;
    margin-bottom: 1rem;
}


/*******************************************************

    #profile

*******************************************************/

#profile h2 {
    translate: 0 -50%;
}

#profile .persons {
    display: flex;
    justify-content: space-between;
}

#profile .person {
    position: relative;
    padding: clamp(1.5rem, -1.9699rem + 7.2289vw, 3rem);
    flex-basis: min(48%, 526px);
    margin-bottom: 1rem;
    border: 3px solid var(--dark_brown);
    border-radius: 2rem;
    /* 横スクロールアニメーションのため、横に広く指定。( .personが取りうる最大のwidth739px + アニメーション用28px )*/
    background-size: 767px 100%;
    animation: person_bgi 1.5s linear infinite;
    /* 320px <= vw <= 340px にも対応するため(クエリは後述)(操作したいのは.person_img)*/
    container-type: inline-size;
}

#profile .person:first-of-type {
    background-image: repeating-linear-gradient(-45deg, #ebf5fa, #ebf5fa 10px, #dfeff6 10px, #dfeff6 20px);
}

#profile .person:last-of-type {
    background-image: repeating-linear-gradient(-45deg, #faebf5, #faebf5 10px, #f6dfef 10px, #f6dfef 20px);
}

@keyframes person_bgi {
    from {
        background-position: right 0px center;
    }

    to {
        background-position: right -28px center;
    }
}

#profile .person h3 {
    position: relative;
    width: fit-content;
    margin: 2rem clamp(0.5rem, -5.2831rem + 12.0482vw, 3rem) 5rem;
    padding: 0.5rem;
    font-size: 1.5rem;
    border-bottom: 3px solid var(--dark_brown);
}

/* 人物名の読み配置 */
#profile .person h3::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 100%;
    font-size: 0.75rem;
    text-align: center;
    translate: -50% 100%;
}

#profile .person:first-of-type h3::after {
    content: "Kuriyama Geshi";
}

#profile .person:last-of-type h3::after {
    content: "Kuriyama Kurumi";
}

/* 詳細度(1,1,0)以下をキープ(containerQuery使用のため) */
#profile .person_img {
    position: absolute;
    top: -13%;
    right: -1.8%;
    width: clamp(11rem, 4.0602rem + 14.4578vw, 14rem);
    aspect-ratio: 1/1;
    border: 3px solid var(--dark_brown);
    border-radius: 50%;
    overflow: hidden;
}

#profile .person .person_img img {
    position: absolute;
    top: 0;
    left: -3%;
    width: 150%;
    height: 150%;
}


/*******************************************************

#sns

*******************************************************/
#sns h2 {
    margin-bottom: 3rem;
}

#sns p {
    position: relative;
    width: fit-content;
    margin: 0 auto 3rem;
    text-align: center;
}

#sns p::before,
#sns p::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    width: 2px;
    height: 40px;
    background-color: var(--dark_brown);
}

#sns p::before {
    left: -5%;
    rotate: -25deg;
}

#sns p::after {
    right: -5%;
    rotate: 25deg;
}

#sns .sns_icons {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-inline: auto;
}

#sns .sns_icons a {
    display: block;
    position: relative;
    width: 6rem;
    aspect-ratio: 1/1;
    text-align: center;
}

#sns .sns_icons a img {
    width: 60%;
    height: 60%;
    margin-bottom: 1rem;
    object-position: center;
    scale: 0.3;
    transition: scale .2s ease;
}

/* クルミ画像配置 */
#sns .sns_icons a::before,
#sns .sns_icons a::after {
    content: "";
    display: block;
    position: absolute;
    top: 27%;
    left: 50%;
    translate: -50% -50%;
    width: 5rem;
    /* 背景画像のアス比 */
    aspect-ratio: 199/220;
    background-image: url(../image/kurumi.webp);
    background-size: contain;
    transition: translate .1s ease;
    z-index: 1;
}

/* クルミ画像の上半分 */
#sns .sns_icons a::before {
    clip-path: inset(0 0 49% 0);
}

/* クルミ画像の下半分 */
#sns .sns_icons a::after {
    clip-path: inset(49% 0 0 0);
}

#sns .sns_icons a .sns_name {
    position: relative;
    display: block;
    font-size: 0.875rem;
    z-index: 10;
}

@media (any-hover:hover) {
    #sns .sns_icons a:hover img {
        scale: 1;
    }

    #sns .sns_icons a:hover::before {
        translate: -50% -85%;
        /* タブレット想定サイズ以下での:hoverの動きを調整 */
        transform-origin: bottom;
    }

    #sns .sns_icons a:hover::after {
        translate: -50% -10%;
        /* タブレット想定サイズ以下での:hoverの動きを調整 */
        transform-origin: top;
    }
}


/*******************************************************
********************************************************

    footer

********************************************************
*******************************************************/

footer {
    position: relative;
    background-color: var(--dark_brown);
}

footer p {
    margin: 0;
    padding-block: 0.5rem;
    /* 左の木の幹分 */
    padding-left: 10lvh;
    color: var(--white);
    text-align: center;
}

footer a {
    position: absolute;
    top: -6rem;
    right: 2rem;
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--white);
}

/* どんぐりの画像配置 */
footer a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../image/donguri.webp);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .7));
    z-index: -1;
    transition: rotate .2s ease;
}

/* リスの顔配置 */
footer a::after {
    content: "";
    display: block;
    position: absolute;
    top: 15%;
    right: 26%;
    width: 3.5rem;
    aspect-ratio: 1/1;
    background-image: url(../image/face.webp);
    background-size: contain;
    transition: top .2s ease;
    z-index: -2;
}

@media (any-hover:hover) {
    footer a:hover::before {
        rotate: 5deg;
    }

    footer a:hover::after {
        top: -36%;
    }
}


/*******************************************************
********************************************************

    タブレット ( width <= 1024px)

********************************************************
*******************************************************/
@media (width<=1024px) {

    a {
        touch-action: manipulation;
    }

    /* クルミの画像をSNSアイコンより後ろに */
    #sns .sns_icons a::before,
    #sns .sns_icons a::after {
        z-index: -10;
    }

    #sns .sns_icons a img {
        scale: 0.8;
    }

    #sns .sns_icons a::before,
    #sns .sns_icons a::after {
        /* #aboutの北九州画像に使用した「shake」を流用 */
        animation: shake ease-in-out infinite alternate;
    }

    #sns .sns_icons li:nth-last-of-type(1) a::before,
    #sns .sns_icons li:nth-last-of-type(1) a::after {
        animation-duration: 1.1s;
    }

    #sns .sns_icons li:nth-last-of-type(2) a::before,
    #sns .sns_icons li:nth-last-of-type(2) a::after {
        animation-duration: 0.8s;
    }

    #sns .sns_icons li:nth-last-of-type(3) a::before,
    #sns .sns_icons li:nth-last-of-type(3) a::after {
        animation-duration: 1s;
    }
}


/*******************************************************
********************************************************

    sp (320px <= width <= 820px)

********************************************************
*******************************************************/

@media (width<=820px) {

    /************************************
        common
    ************************************/
    main {
        padding: 0;
    }

    p {
        font-size: 1rem;
    }


    /************************************
        header
    ************************************/

    header h1 {
        left: -11lvh;
    }


    /************************************
        main
    ************************************/

    #about .about_content {
        padding: 3rem 2.5rem;
    }

    #about .about_content::before {
        top: 50%;
        right: 50%;
        translate: 50% -50%;
        width: 18rem;
        animation: none;
    }

    #profile h2 {
        translate: 0 0;
    }

    #profile .persons {
        display: block;
    }

    #profile .person:first-of-type {
        margin-bottom: 5rem;
    }

    #profile .person h3 {
        margin-inline: clamp(0.5rem, -7.1531rem + 32.6531vw, 8.5rem);
    }

    #profile .person .person_img {
        right: clamp(-0.5rem, -7.6747rem + 30.6122vw, 7rem);
    }

    /* 320px <= vw <= 340px に対応 */
    /* 詳細度(1,1,0) */
    #profile {
        @container (width < 310px) {
            .person_img {
                width: 9rem;
                top: -7%;
            }
        }
    }

    #sns {
        padding-top: 0;
    }

    #sns p::before,
    #sns p::after {
        display: none;
    }

    #sns .sns_icons {
        gap: 1rem;
    }

    /************************************
        footer
    ************************************/

    footer a {
        top: -4rem;
        right: 0.5rem;
        font-size: 1rem;
        z-index: 1;
    }

    footer p {
        padding-left: 0;
    }
}