@charset "UTF-8";

/* reset.css */
*:where(:not(html, iframe, canvas, img, svg, video, audio):not(svg *, symbol *)) {
    all: unset;
    display: revert;
}

/* Preferred box-sizing value */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Fix mobile Safari increase font-size on landscape mode */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Remove list styles (bullets/numbers) */
ol, ul, menu, summary {
    list-style: none;
}

::selection{
    background: #21a5bc;
    color: #ffffff;
}

:root {
    --color-brown: #9e8080;
    --color-gray: #666;
    --color-turquoise: #21a5bc;
    --color-pink: #ff868e;
    --color-main: #F5F5F5;
    --color-p: #333;
    --b-radius: 0.2rem;
    --shadow: 0rem 0.3rem 0.1rem rgba(0, 0, 0, 0.2);
    --fontf-ttl: 'Montserrat', 'Helvetica Neue', 'Arial', sans-serif;
    --fontf-txt: "Segoe UI", "Helvetica Neue", Helvetica, Arial, "Noto Sans JP", "メイリオ", Meiryo, sans-serif;
}

html{
    font-size: clamp(14px, 1.25vw, 24px);
}
html, body {
    height: auto;
    min-height: 100%;
}
body{
    font-family: var(--fontf-txt);
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    color: #333;
    background-color: var(--color-main);
}
hgroup{
    margin: 0 auto;
}
a,
button{
    cursor: pointer;
}
p{
    color: var(--color-p);
    font-size: 1rem;
    font-weight: normal;
}
img{
    width: 100%;
}
main {
    width: 100%;
}
strong {
    font-weight: bold;
}
.note{
    font-size: 0.8em;
}
.spBreak {
    display: inline-block;
}

/* いいねボタン */
.react-area {
    position: absolute;
    right: -6rem;
    top: -2rem;
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    z-index: 0;
}
#likeBtn{
    width: 1.8rem;
    display: flex;
    justify-content: right;
}
#likeBtn.liked{
    transform: scale(1.5);
    animation-name: pulse;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
}
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    10% {
        transform: scale(0.2);
    }
    15% {
        transform: scale(0.2);
    }
    40% {
        transform: scale(1.5);
    }
    80% {
        transform: scale(0.6);
    }
    100% {
        transform: scale(1);
    }
}
#likeBtn .heart {
    fill: #ee8585;
}
#likeBtn.liked .heart{
    animation-name: heart-bg;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
}
@keyframes heart-bg {
    0% {
        fill: #ee8585;
    }
    10% {
        fill: #b14e9a;
    }s
    15% {
        fill: #ff00c3;
    }
    50% {
        fill: #A259FF;
    }
    90% {
        fill: #ff00c3;
    }
    100% {
        fill: #ee8585;
    }
}
@media (prefers-color-scheme: dark) {
    .heart {
        fill: #ee8585;
    }
}
#likeCount {
    font-size: 1.5rem;
    width: 4rem;
}

/* nav
----------------------------------------*/
.hamburger {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 2.5rem;
    height: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 1000;
}
.hamburger span {
    display: block;
    height: 2px;
    background-color: var(--color-brown);
    border-radius: 2px;
    transition: all .2s ease-out;
}
.hamburger span:nth-child(1) {
    transform-origin: top right;
}
.hamburger span:nth-child(3) {
    transform-origin: bottom right;
}
.hamburger.active span{
    width: 2.75rem;
    transition: all .2s ease-out;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-0.3rem, -0.3rem);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-0.3rem, 0.3rem);
}



.menu {
    position: fixed;
    top: 0;
    right: -11rem; /* 初期は画面外 */
    width: 10rem;
    height: 100vh;
    background-color: #fafafa;
    box-shadow: -2px 0 6px rgba(0,0,0,0.1);
    transition: right 0.3s ease-out;
    z-index: 100;
    display: flex;
    align-items: center;
}
.menu.open {
    right: 0;
}
.menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 5svh;
    width: 100%;
}
.menu a {
    font-family: var(--fontf-ttl);
    font-weight: 400;
    display: inline-block;
    text-decoration: none;
    color: var(--color-brown);
    font-size: 1.4rem;
    padding: 1rem;
}

footer{
    background-color: var(--color-brown);
    text-align: center;
    width: 100%;
    color: #fff;
}
footer p{
    color: #fff;
}

/* レスポンシブ対応 */

@media (orientation: landscape) {
    footer {
        font-size: 1rem;
        padding: 1rem;
        margin-top: 20rem;
    }
}

@media (orientation: portrait) {
    .spBreak {
        display: block;
    }
    html{
        font-size: clamp(16px, 1.3vw, 26px);
    }
    .hamburger {
        top: 1.5rem;
        right: 1.2rem;
    }
    .menu {
        right: -100vw;
        width: 100vw;
    }
    .menu li{
        display: flex;
        justify-content: center;
    }
    .menu a {
        font-size: 2rem;
    }
    .menu li + li {
        margin-top: 0;
    }
    footer{
        font-size: 1rem;
        padding: 2rem 2rem 4rem;
        margin-top: 20svh;
    }
}

@media (orientation: portrait) and (min-width: 1000px) {
    .menu {
        width: 300px;
    }
    section .worksList{
        grid-template-columns: 1fr 1fr;
        gap: 15rem 4rem;
        margin: 0 4rem;
    }
    section .worksList li{
        padding: 0;
    }
    section .worksList .prototype_link {
        width: 15rem;
    }
    section .li_anime .lottieStartBtn {
        width: 100%;
    }
}

@media (orientation: portrait) and (min-width: 801px) {
    html{
        font-size: clamp(14px, 1.5625vw, 20px);/* 1024pxで16px*/
    }
    hgroup h1{
        font-size: 6rem;
    }
    hgroup p{
        font-size: 2rem;
        font-weight: normal;
        line-height: 1.8;
        margin-top: 2rem;
    }
    .top-catch .content p {
        line-height: 2;
        font-size: 1.4rem;
    }
    section h2{
        font-size: 4.5rem;
    }
    .worksList .prototype_link {
        width: 25rem;
    }
    .prototype_link p {
        font-size: 2rem;
    }
    .prototype_link .external-link-icon, .demo_link .external-link-icon {
        width: 2rem;
    }
    .li_anime .lottieStartBtn {
        padding: 2rem;
        height: fit-content;
        width: 50%;
    }
}

@media (orientation: portrait) and (max-width: 800px) {
    html{
        font-size: calc(100vw / 26.7857);
    }
}