:root {
    --band-overlap: 35vh;
    --section-gap: 48px;
    --band-bottom-gap: 18px;
    --content-max: 860px;
    --content-width: 85%;
}

@media (max-width: 768px) {
    :root {
        --content-width: 100%;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    letter-spacing: 0.1em;
}

html,
body {
    height: 100%;
}

body {
    font-family: "Yu Gothic Medium", "Hiragino Sans", "Meiryo", sans-serif;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.78);
    overflow-x: hidden;
}

.works-back {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 26px);
    left: calc(env(safe-area-inset-left) + 30px);
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    letter-spacing: 0.18em;
    font-weight: 300;
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 600ms ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    will-change: transform;
}

.works-back.is-dark {
    color: rgba(0, 0, 0, 0.78);
    font-weight: 400;
}

.works-back::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.9;
    transition: transform 300ms ease, opacity 300ms ease;
}

.works-back:hover {
    opacity: 0.78;
}

.works-back:hover::before {
    transform: translateX(-2px) rotate(45deg);
}

.works-back:active {
    opacity: 0.65;
}

.works-back:focus-visible {
    outline: 1px solid rgba(0, 0, 0, 0.35);
    outline-offset: 6px;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .works-back {
        top: calc(env(safe-area-inset-top) + 24px);
        left: calc(env(safe-area-inset-left) + 24px);
        font-size: 13px;
    }
}

.work-bg {
    position: fixed;
    inset: 0;
    z-index: 0;

    background-image: url("images/shogetsu-works.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.work-main {
    position: relative;
    z-index: 1;
}

.work-spacer {
    height: 100vh;
    height: 100dvh;
}

.work-band,
.work-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.work-band {
    margin-top: calc(-1 * var(--band-overlap));
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 24px 8vw 22px;
    background: rgba(255, 255, 255, 0.86);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background-color 200ms ease, backdrop-filter 200ms ease;
}

.work-band.is-opaque {
    background: #fafafa;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.work-band__inner {
    max-width: var(--content-max);
    width: var(--content-width);
    margin: 0 auto;
}

.work-band__title {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 0.22em;
    margin-bottom: 10px;
    color: rgba(0, 0, 0, 0.8);
}

.work-band__title .space {
    display: inline-block;
    width: 0.06em;
}

.work-band__meta {
    font-size: 14px;
    letter-spacing: 0.16em;
    line-height: 1.9;
    opacity: 0.8;
    color: rgba(0, 0, 0, 0.9);
}

.work-band__meta .space {
    display: inline-block;
    width: 0.18em;
}

.work-section {
    position: relative;
    z-index: 1;
    padding: 0 8vw 80px;
    background: rgba(255, 255, 255, 0.86);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    min-height: 100vh;
    min-height: 100dvh;
}

.work-band+.work-section {
    margin-top: calc(var(--band-overlap) - var(--band-bottom-gap));
    padding-top: calc(var(--section-gap) + 30px);
}

.work-section>* {
    max-width: var(--content-max);
    width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.work-section h2 {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.14em;
    margin-bottom: 16px;
    position: relative;
    padding-left: 1.4em;
}

.work-section h2::before {
    content: "/";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 300;
    opacity: 0.6;
    transform: translateY(-1px);
}

.work-section p {
    font-size: 13px;
    letter-spacing: 0.12em;
    line-height: 2.1;
    padding-bottom: 60px;
    text-align: justify;
    text-justify: inter-ideograph;
}

.work-section img,
.work-section video {
    height: auto;
    display: block;
    margin: 40px auto;
}

.work-section .work-link {
    font-size: 14px;
    text-align: center;
}

.work-link {
    margin-top: 100px;
    letter-spacing: 0.12em;
    opacity: 0.7;
    --fade2-x: 9px;
    --fade2-y: 4px;
}

.work-link a {
    color: inherit;
    text-decoration: none;
}

.work-link a:hover {
    opacity: 0.75;
}

.work-link .ext {
    margin-left: 0.4em;
    font-size: 0.85em;
    opacity: 0;
    transition: opacity 200ms ease;
}

.work-link a:hover .ext {
    opacity: 0.75;
}

@media (max-width: 768px) {
    .work-band {
        padding-left: 8vw;
        padding-right: 8vw;
        --band-pad-top-extra: 0px;
        padding-top: calc(env(safe-area-inset-top) + 20px + var(--band-pad-top-extra, 0px));
        padding-bottom: 20px;
    }

    .work-band__inner {
        will-change: auto;
    }

    .work-band.avoid-back {
        padding-left: calc(6.5vw + var(--band-pad-left-extra));
    }

    .work-band__title {
        font-size: 16px;
    }

    .work-band+.work-section {
        margin-top: calc(var(--band-overlap) - 14px);
        padding-top: calc(var(--section-gap) + 16px);
    }

    .work-band__meta {
        font-size: 13px;
    }

    .work-section {
        padding: 0 8vw 60px;
    }

    .work-section p {
        padding-bottom: 50px;
    }

    .work-section img,
    .work-section video {
        margin: 28px auto;
    }

    .work-section .work-link {
        font-size: 13px;
    }

    .work-link {
        color: rgba(0, 0, 0, 0.65);
        margin-bottom: 20px;
        --fade2-x: 2px;
    }

    .work-link .ext {
        opacity: 0.75;
        visibility: visible;
    }
}

.work-detail {
    opacity: 0;
    transform: translateY(6px);
    filter: blur(6px);
    transition: opacity 800ms cubic-bezier(.22, 1, .36, 1),
        transform 800ms cubic-bezier(.22, 1, .36, 1),
        filter 800ms cubic-bezier(.22, 1, .36, 1);
}

.work-detail.is-entered {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.work-bg {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .work-detail {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}

.profile-card {
    position: fixed;
    inset: 0;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: 100svh;
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    transform: translateX(100%);
    transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 999;
    overflow: hidden;
}

.profile-card.is-open {
    transform: translateX(0);
}

.profile-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.profile-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right bottom;
    display: block;
}

.profile-card__text {
    position: relative;
    z-index: 1;
    color: rgba(0, 0, 0, 0.85);
    padding: 70px 72px;
}

.profile-card__name {
    font-size: 18px;
    letter-spacing: 0.14em;
    font-weight: 300;
    margin-bottom: 50px;
}

.profile-card__text p {
    font-size: 13.5px;
    line-height: 2.1;
    margin-bottom: 20px;
}

.profile-card__history {
    list-style: none;
    padding: 0;
    margin-top: 60px;
    font-size: 13.5px;
}

.profile-card__history li {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.profile-card__history span {
    width: 120px;
}

.profile-close {
    position: fixed;
    top: 28px;
    right: 28px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    opacity: 0.8;
    -webkit-tap-highlight-color: transparent;
}

.profile-close::before,
.profile-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1.5px;
    background: rgba(0, 0, 0, 0.8);
    transform-origin: center;
}

.profile-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.profile-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.profile-close:hover {
    opacity: 0.55;
}

.profile-close:active {
    opacity: 0.4;
}

body.is-profile-open .works-back {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

@media (max-width: 768px) {
    .profile-card__image {
        content: url("images/profile-iPhone.jpg");
        object-position: center bottom;
    }

    .profile-card__text {
        padding: 44px 28px;
        max-width: 100%;
    }

    .profile-card__name {
        font-size: 16px;
        margin-bottom: 40px;
    }

    .profile-card__text p {
        font-size: 12px;
        margin-bottom: 20px;
        text-align: justify;
        text-justify: inter-ideograph;
    }

    .profile-card__history {
        font-size: 12px;
        margin-top: 40px;
    }

    .profile-card__history li {
        display: grid;
        grid-template-columns: 5.5em 1fr;
        column-gap: 36px;
        margin-bottom: 10px;
    }

    .profile-card__history span {
        font-size: 12px;
    }

    .profile-card__history li> :not(span) {
        text-align: justify;
        text-justify: inter-ideograph;
    }
}

.contact-panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: 100svh;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(250, 250, 250, 0.98);
    transform: translateX(100%);
    transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1000;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.contact-panel.is-open {
    transform: translateX(0);
}

.contact-panel__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top) + 70px) 72px 64px;
}

.contact-panel__title {
    font-size: 18px;
    letter-spacing: 0.14em;
    font-weight: 300;
    margin-bottom: 22px;
    color: rgba(0, 0, 0, 0.82);
}

.contact-panel__lead {
    font-size: 13px;
    line-height: 2.1;
    letter-spacing: 0.10em;
    color: rgba(0, 0, 0, 0.70);
    margin-bottom: 34px;
}

.contact-panel__note {
    margin-top: 18px;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.55);
    line-height: 1.9;
}

.contact-close {
    position: fixed;
    top: 28px;
    right: 28px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    opacity: 0.8;
    -webkit-tap-highlight-color: transparent;
}

.contact-close::before,
.contact-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1.5px;
    background: rgba(0, 0, 0, 0.8);
    transform-origin: center;
}

.contact-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.contact-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.contact-close:hover {
    opacity: 0.55;
}

.contact-close:active {
    opacity: 0.4;
}

.contact-form {
    display: grid;
    gap: 18px;
}

.field label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.10em;
    color: rgba(0, 0, 0, 0.70);
    margin-bottom: 10px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.22);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.92);
    padding: 12px 12px;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.78);
    outline: none;
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(0, 0, 0, 0.38);
}

.contact-submit {
    margin-top: 10px;
    padding: 12px 36px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 2px;
    background: #fff;
    color: rgba(0, 0, 0, 0.75);
    font-size: 13px;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: opacity 200ms ease, transform 200ms ease;
}

.contact-submit span {
    display: inline-block;
}

.contact-submit:hover {
    opacity: 0.9;
}

.contact-submit:active {
    transform: translateY(0);
    opacity: 0.82;
}

.hp {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    .contact-panel__inner {
        padding: calc(env(safe-area-inset-top) + 54px) 6.5vw 54px;
    }

    .contact-panel .field input,
    .contact-panel .field select,
    .contact-panel .field textarea {
        font-size: 16px;
        line-height: 1.6;
    }

    .contact-close {
        top: 24px;
        right: 24px;
    }
}

footer {
    position: relative;
    background: #CCC8AB;
    color: #fff;
    padding: 30px 40px;
    font-family: "Yu Gothic Medium", "Hiragino Sans", sans-serif;
    text-align: center;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0 auto 25px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 42px;
}

.footer-menu li {
    list-style: none;
    margin: 0;
}

.footer-menu li:nth-child(1) {
    justify-self: end;
}

.footer-menu li:nth-child(2) {
    justify-self: center;
}

.footer-menu li:nth-child(3) {
    justify-self: start;
}

.footer-menu li:nth-child(1),
.footer-menu li:nth-child(3) {
    position: relative;
}

.footer-menu li:nth-child(1)::after,
.footer-menu li:nth-child(3)::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-50% + 2px);
}

.footer-menu li:nth-child(1)::after {
    right: -22px;
}

.footer-menu li:nth-child(3)::before {
    left: -22px;
}

.footer-menu a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1;
    padding: 0;
    text-decoration: none;
    color: #fff;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-menu a:hover {
    opacity: 0.6;
}

footer small {
    display: block;
    text-align: center;
    position: relative;
    left: 4px;
    margin-top: 24px;
    font-size: 10px;
    letter-spacing: 0.1em;
    line-height: 1.8;
    opacity: 0.8;
}

@media (max-width: 768px) {
    footer {
        padding: 26px 20px;
    }

    .footer-menu {
        column-gap: 36px;
    }

    .footer-menu li:nth-child(1)::after {
        right: -19px;
    }

    .footer-menu li:nth-child(3)::before {
        left: -19px;
    }

    .footer-menu li:nth-child(1)::after,
    .footer-menu li:nth-child(3)::before {
        transform: translateY(-50% + 5px);
    }

    footer small {
        margin-top: 20px;
    }

    footer::after {
        content: "";
        display: block;
        height: 40px;
    }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.3s, opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    z-index: 999;
}

.back-to-top svg {
    transform: translateY(1.5px);
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: rgba(0, 0, 0, 0.8);
}