/*
Theme Name: studio9X
Author: Tomoyuki Yanagawa
Version: 1.0
*/

@charset "UTF-8";

/* ==========================================================================
   Reset / Base
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-size: 1rem;
    font-family: "Gen Interface JP", sans-serif;
    font-weight: 200;
    letter-spacing: 0.05em;
    text-align: justify;
    text-justify: inter-ideograph;
    color: #000000;
    overflow-wrap: break-word;
}

ul {
    list-style: none;
}

main img {
    background-color: #f0f0f0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

main img.is-loaded {
    opacity: 1;
}

h2 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 20px;
}

a {
    color: inherit;
}

/* ==========================================================================
   Typography utilities
   ========================================================================== */

.main-text {
    line-height: 1.8rem;
}

.main-text p+p {
    margin-top: 0.4rem;
}

.small-text {
    font-size: 0.85rem;
    line-height: 1.5rem;
}

.photo-credit {
    font-size: 0.8rem;
    margin-top: 10px;
}

/* ==========================================================================
   Grid system (shared by content pages)
   ========================================================================== */

.content-columns {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 140px 30px 180px;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
    flex: 1 0 auto;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(.2, .6, .3, 1), transform 0.8s cubic-bezier(.2, .6, .3, 1);
}

.content-columns.is-visible {
    opacity: 1;
    transform: none;
}

.grid-guide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
    padding: 0 30px;
    z-index: 0;
    pointer-events: none;
}

.grid-guide span {
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
}

hr {
    grid-column: 2 / 6;
    width: 100%;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 40px 0;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    font-family: GillSansNovaMedium, sans-serif;
    letter-spacing: 0.1em;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 72px;
    padding: 0 30px;
    color: #fff;
    line-height: 1;
    transition: transform 0.35s cubic-bezier(.5, .1, .2, 1);
}

.header.is-hidden {
    transform: translateY(-100%);
}

body.admin-bar .header {
    top: 32px;
}

body.admin-bar .content-columns {
    padding-top: 172px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
    }

    body.admin-bar .content-columns {
        padding-top: 146px;
    }
}

.header>a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 32px;
}

.header>a>img {
    display: block;
    height: 32px;
    width: auto;
}

.header a {
    text-decoration: none;
    color: #fff;
    transition: opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
}

.header a:hover {
    opacity: 0.5;
}

.header.about a {
    color: #000000;
}

.header.about .sns img {
    filter: invert(1);
}

.menu-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 42px;
    flex-wrap: nowrap;
    margin-left: auto;
    min-height: 32px;
}

.menu,
.sns {
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.menu {
    margin-right: 28px;
}

.menu li,
.sns li {
    display: flex;
    align-items: center;
}

.sns img {
    display: block;
    height: 18px;
    width: auto;
}

.menu-toggle {
    display: none;
}

/* ==========================================================================
   Home hero / slideshow / footer (index.html)
   ========================================================================== */

body.menu-is-open {
    overflow: hidden;
}

body.menu-is-open .hero-menu,
body.menu-is-open .home-footer {
    display: none;
}

.slideshow {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #000000 url("images/top/001-00.jpg") center / cover no-repeat;
}

.slideshow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 1;
}

.slideshow img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 1.2s ease-in-out;
    z-index: 0;
}

.slideshow,
.hero-menu,
footer.home-footer {
    transition: opacity 1.0s ease;
}

body.index-transitioning .slideshow,
body.index-transitioning .hero-menu,
body.index-transitioning footer.home-footer {
    opacity: 0.4;
}

body.index-transitioning.is-ready .slideshow,
body.index-transitioning.is-ready .hero-menu,
body.index-transitioning.is-ready footer.home-footer {
    opacity: 1;
}

.slideshow-dots {
    position: absolute;
    left: 50%;
    bottom: 60px;
    transform: translateX(-50%);
    display: none;
    gap: 6px;
    z-index: 2;
}

.slideshow-dots .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.5;
    cursor: pointer;
}

.slideshow-dots .dot.active {
    opacity: 1;
}

.hero-menu {
    color: #fff;
    position: fixed;
    left: 0;
    bottom: 70px;
    padding: 20px 30px;
    z-index: 20;
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-menu ul li {
    margin-bottom: 23px;
    position: relative;
    display: block;
    width: fit-content;
    white-space: nowrap;
    cursor: pointer;
}

.hero-menu ul li a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.hero-menu ul li::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: #00E0E0;
    transition: width 0.45s ease-out;
}

.hero-menu ul li:hover::after,
.hero-menu ul li.active::after {
    width: 100%;
}

footer {
    width: 100%;
    padding: 20px 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
}

footer.about-footer {
    position: static;
    z-index: 20;
    color: rgba(0, 0, 0, 0.7);
    padding-bottom: 28px;
}

footer.home-footer {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 20;
}

/* ==========================================================================
   Project list (project.html)
   ========================================================================== */

.project-item {
    z-index: 1;
    margin-bottom: 30px;
}

.project-item--left {
    grid-column: 1 / 4;
}

.project-item--right {
    grid-column: 4 / 7;
}

.project-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 2560 / 1707;
    display: block;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.project-item:hover .project-photo {
    opacity: 0.8;
}

.project-caption {
    position: relative;
    display: inline-block;
    width: fit-content;
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-caption::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: #00E0E0;
    transition: width 0.45s ease-out;
}

.project-item:hover .project-caption::after,
.project-item.is-inview .project-caption::after {
    width: 100%;
}

/* ==========================================================================
   About page (about.html)
   ========================================================================== */

.about-content {
    padding-bottom: 200px;
}

.about-content .main-text {
    margin-top: 40px;
}

.about-content .wide-photo {
    display: block;
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

@media (min-width: 801px) {
    .about-content .wide-photo {
        width: 100%;
        max-width: 100%;
        position: static;
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
    }
}

.page-content {
    grid-column: 2 / 6;
    position: relative;
    z-index: 1;
    display: grid;
    gap: 20px;
    justify-items: stretch;
}

.page-content p {
    text-align: justify;
    text-justify: inter-ideograph;
}

.staff-name,
.staff-name-en {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 4px 0 18px;
    line-height: 1.2;
}

.staff-name-en {
    font-family: GillSansNovaMedium, sans-serif;
    font-variant-caps: small-caps;
}

.staff-meta,
.staff-meta-en {
    grid-column: 2 / 3;
    display: flex;
    flex-direction: column;
    justify-self: start;
    align-self: start;
    z-index: 1;
}

.staff-bio,
.staff-bio-en {
    grid-column: 3 / 6;
    display: flex;
    align-items: flex-start;
    justify-self: start;
    align-self: start;
    z-index: 1;
    margin-top: 0;
}

.staff-summary {
    grid-column: 3 / 6;
    justify-self: start;
    align-self: start;
    z-index: 1;
    margin-top: 0;
}

.company-info-list {
    grid-column: 2 / 6;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 6px;
}

.company-info-list dl.company-info {
    display: contents;
}

.company-info-list .company-info dt {
    grid-column: 1 / 2;
    margin: 0;
    padding: 0;
    align-self: start;
    font-weight: 500;
}

.company-info-list .company-info dd {
    grid-column: 2 / 5;
    margin: 0 0 10px;
    padding: 0;
    line-height: 1.8;
}

.access-map {
    grid-column: 2 / 6;
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: 24px;
}

.access-map iframe {
    width: 100%;
    aspect-ratio: 3 / 2;
    display: block;
    border: 0;
    margin-bottom: 20px;
}

.access-map .main-text {
    margin-top: 8px;
}

/* ==========================================================================
   Contact page (contact.html)
   ========================================================================== */

.contact {
    grid-column: 2 / 5;
}

.contact .main-text {
    grid-column: 1 / -1;
    margin-top: 0;
}

.contact-spacer {
    display: block;
    height: 2.0rem;
}

/* ==========================================================================
   News page (news.html)
   ========================================================================== */

article.news {
    display: contents;
}

.news-date {
    grid-column: 2 / 3;
    font-size: 1rem;
    font-weight: 500;
}

.news-content {
    grid-column: 3 / 6;
}

.news-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.news p {
    margin-bottom: 10px;
}

.news a {
    color: #000000;
    transition: color 0.2s ease;
}

.news a:hover {
    color: rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Project detail page (kokokko.html, etc.)
   ========================================================================== */

.project-content {
    grid-auto-rows: min-content;
    /* .content-columns sets overflow-x: hidden, which forces overflow-y to
       compute as auto and turns this element into a scroll container —
       that breaks position: sticky on .project-meta below. */
    overflow: visible;
}

.project-content>.project-meta {
    grid-column: 1 / 3;
    grid-row: 1;
    align-self: start;
    width: calc(100% - 20px);
    min-width: 0;
    text-align: left;
    position: sticky;
    top: 140px;
}

.project-content>.project-photo-group {
    grid-column: 3 / 7;
    grid-row: 1;
    align-self: start;
    min-width: 0;
}

.project-photo-main {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2560 / 1707;
    object-fit: cover;
}

.project-photo-main.is-portrait {
    width: 150%;
    margin-left: -25%;
    object-fit: contain;
    background-color: #ffffff;
}

.project-photo-main+.project-photo-main {
    margin-top: 20px;
}

.project-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.project-photo-main+.project-video,
.photo-credit+.project-video {
    margin-top: 40px;
}

.project-text {
    margin: 40px 0 60px 0;
}

.project-text p+p {
    margin-top: 20px;
}

.project-text a {
    color: #000000;
    transition: color 0.2s ease;
}

.project-text a:hover {
    color: rgba(0, 0, 0, 0.5);
}

.supplementary-info {
    margin-top: 20px;
}

.project-info {
    margin-top: 60px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-info dt {
    margin: 0;
    padding: 0;
    font-weight: 500;
}

.project-info dd {
    margin: 0;
    padding: 0;
    line-height: 1.8;
}

.project-content>.arrow {
    grid-column: 3 / 7;
    margin-top: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
}

.left-arrow,
.right-arrow {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000000;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.right-arrow {
    margin-left: auto;
}

.left-arrow:hover,
.right-arrow:hover {
    opacity: 0.5;
}

.left-arrow img,
.right-arrow img {
    transform: scale(1.0);
    background-color: transparent;
}

/* ==========================================================================
   Responsive (<= 800px)
   ========================================================================== */

@media (max-width: 800px) {

    body {
        letter-spacing: 0;
    }

    h2 {
        font-size: 1.2rem;
    }

    /* -- grid / layout -- */
    .content-columns {
        padding-top: 100px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .grid-guide {
        padding-left: 20px;
        padding-right: 20px;
    }

    .content-columns.about-content,
    .content-columns.project-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .content-columns.project-content {
        gap: 0;
    }

    /* -- project list -- */
    .project-item--left,
    .project-item--right {
        grid-column: 1 / -1;
    }

    /* -- about page -- */
    .about-content hr,
    .about-content .page-content,
    .about-content .staff-meta,
    .about-content .staff-meta-en,
    .about-content .staff-bio,
    .about-content .staff-bio-en,
    .about-content .staff-summary,
    .about-content .company-info-list,
    .about-content .access-map,
    .project-content hr,
    .project-content .news-date,
    .project-content .news-content {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .about-content .staff-bio,
    .about-content .staff-bio-en {
        margin-top: -20px;
    }

    .company-info-list {
        grid-template-columns: 1fr;
        row-gap: 14px;
    }

    .company-info-list dl.company-info {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 2px;
    }

    .company-info-list .company-info dt,
    .company-info-list .company-info dd {
        grid-column: 1 / -1;
    }

    /* -- contact page -- */
    .access-map,
    .contact {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    /* -- project detail page -- */
    .project-content>.project-meta,
    .project-content>.project-photo-group {
        display: contents;
    }

    .project-content .project-meta>h2,
    .project-content .project-info,
    .project-content .project-photo-group>* {
        grid-column: 1 / -1;
        width: 100%;
    }

    .project-content .project-meta>h2 {
        order: 0;
        margin-bottom: 40px;
    }

    .project-content .project-photo-group>.project-photo-main:first-of-type,
    .project-content .project-photo-group>.project-text {
        order: 0;
    }

    .project-content .project-photo-group>.project-photo-main:first-of-type {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
    }

    .project-content .project-photo-group>.project-photo-main.is-portrait,
    .project-content .project-photo-group>.project-photo-main.is-portrait:first-of-type {
        width: 150%;
        max-width: 150%;
        margin-left: -25%;
    }

    .project-content .project-photo-group>.project-text {
        margin-top: 20px;
        margin-bottom: 0;
    }

    .project-content .project-text-main {
        margin-top: 0;
    }

    .project-content .project-info {
        order: 1;
        position: static;
        margin: 20px 0 40px 0;
    }

    .project-content .project-info::before {
        content: '';
        display: block;
        width: 100%;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        margin-bottom: 20px;
    }

    .project-content .project-photo-group>.project-photo-main:not(:first-of-type),
    .project-content .project-photo-group>.photo-credit,
    .project-content .project-photo-group>.project-video {
        order: 2;
    }

    .project-content .project-photo-main+.project-photo-main {
        margin-top: 10px;
    }

    .project-content>.arrow {
        grid-column: 1 / -1;
        order: 3;
        margin-top: 80px;
    }

    /* -- header / nav -- */
    .header {
        padding: 0 20px;
    }

    .header>a,
    .menu-toggle {
        position: relative;
        z-index: 2;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 7px;
        width: 34px;
        height: 34px;
        margin-left: auto;
        padding: 5px 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: #fff;
        transition: transform 0.3s cubic-bezier(.5, .1, .2, 1),
            background-color 0.3s cubic-bezier(.5, .1, .2, 1);
    }

    .header.about .menu-toggle span {
        background: #000000;
    }

    .header.menu-open .menu-toggle span:first-child {
        transform: translateY(4.5px) rotate(45deg);
    }

    .header.menu-open .menu-toggle span:last-child {
        transform: translateY(-4.5px) rotate(-45deg);
    }

    .menu-wrap {
        position: fixed;
        inset: 0;
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        z-index: 1;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 52px;
        padding: clamp(140px, calc(28vh - 40px), 240px) 20px 50px;
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s cubic-bezier(.5, .1, .2, 1),
            visibility 0s linear 0.3s;
    }

    .header.menu-open .menu-wrap {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition-delay: 0s;
    }

    .header.menu-open {
        transform: none;
    }

    .menu,
    .sns {
        align-items: flex-start;
        gap: 28px;
        opacity: 0;
        transform: translateY(2vh);
        transition: opacity 0.8s cubic-bezier(.2, .6, .3, 1),
            transform 0.8s cubic-bezier(.2, .6, .3, 1);
    }

    .header.menu-open .menu,
    .header.menu-open .sns {
        opacity: 1;
        transform: none;
    }

    .header.menu-open .sns {
        transition-delay: 0.08s;
    }

    .menu {
        flex-direction: column;
        margin-right: 0;
        font-size: 1.6rem;
    }

    .header .menu-wrap a {
        color: #fff;
    }

    .header.about .menu-wrap a {
        color: #000000;
    }

    .sns {
        gap: 32px;
    }

    .menu-wrap .sns img {
        height: 21.6px;
    }

    .header.about .menu-wrap .sns img {
        filter: invert(1);
    }

    /* -- home hero -- */
    .slideshow-dots {
        display: flex;
    }

    .hero-menu,
    footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-menu {
        bottom: 130px;
    }

    .hero-menu ul li {
        display: none;
        margin-bottom: 0;
    }

    .hero-menu ul li.menu-visible {
        display: block;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .header {
        transition: none;
    }

    .menu-toggle span,
    .menu-wrap,
    .menu,
    .sns {
        transition: none;
    }
}