@charset "UTF-8";
/* ==========================================================================
   bg
   ========================================================================== */

body {
    background-color: var(--color-bg-main);
}

/* 2. 動くノイズの層（オーバーレイ）を作る */
body::before {
    content: "";
    position: fixed;
    /* 画面に固定 */
    top: -100px;
    /* 動かした時に端が見えないよう、画面より大きく作る */
    left: -100px;
    width: calc(100% + 200px);
    height: calc(100% + 200px);
    z-index: 0;
    /* 常に一番手前に配置 */
    pointer-events: none;
    /* 重要：下のボタンやリンクをクリックできるようにする */

    /* 用意した1枚のノイズ画像を敷き詰める */
    background-image: url('../../images/common/noise.webp');
    background-repeat: repeat;

    /* 濃さの調整（0.03〜0.08くらいが最もプロっぽく見えます） */
    opacity: 0.16;

    /* アニメーションの指定 */
    animation: noise-jump 2s steps(2) infinite;
}

/* 3. ノイズをガクガク動かすアニメーション */
@keyframes noise-jump {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, -10px);
    }
}

/* ==========================================================================
   Layout
   ========================================================================== */

.l-header {
    position: fixed;
    top: 20px;
    right: 20px;
    margin: 0 0 0 auto;
    text-align: right;
    font-size: var(--font-size-Text-R);
    font-weight: 600;
    color: var(--color-Primary);
    letter-spacing: .15em;
    line-height: 2.2;
    z-index: 9999;

    /* --- 初期状態（GSAPで制御される前の非表示状態） --- */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-20px);
    transition: all .5s ease-in-out;
}

.l-header.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.l-main {
    overflow: hidden;
}


/* ==========================================================================
   Components / c-section-container
   ========================================================================== */


.c-section-container__image {
    position: absolute;
    width: 40svw;
    margin: auto 0;
}

.p-contact .c-section-container__image {
    rotate: 12.4deg;
    z-index: -1;
}

.c-section-container:nth-of-type(odd) .c-section-container__image {
    top: 50%;
    right: -60%;
    translate: -50% -50%;
}

.c-section-container:nth-of-type(even) .c-section-container__image {
    top: 50%;
    left: 0;
    translate: -50% -50%;
}

.c-section-container:nth-child(2) .c-section-container__image {
    width: 112svw;
    top: 84%;
    left: 76%;
    z-index: -1;
}

/* レスポンシブ対応：スマホ・タブレットで枠が切れないようにする */
@media screen and (max-width: 1080px) {

    .c-section-container__image {
        width: 40svw;
        margin: auto 0;
    }

    .c-section-container:nth-of-type(odd) .c-section-container__image {
        top: 50%;
        right: -42%;
        translate: -50% -50%;
    }

    .c-section-container:nth-of-type(even) .c-section-container__image {
        top: 50%;
        left: 0;
        translate: -50% -50%;
    }

    .c-section-container:nth-child(2) .c-section-container__image {
        width: 120svw;
        top: 90%;
        left: 68%;
    }

    .p-hero-image-window {
        width: 100svw;
        height: 100svh;
    }

}

@media screen and (max-width:767px) {

    .c-section-container__image {
        width: 44svw;
        margin: 0 auto;
    }

    .c-section-container:nth-of-type(odd) .c-section-container__image {
        top: 90%;
        right: -42%;
        translate: -50% -50%;
    }

    .c-section-container:nth-child(2) .c-section-container__image {
        width: 138svw;
        top: 120%;
        left: 75%;

    }
}


/* ==========================================================================
   Projects / hero-area
   ========================================================================== */

/* レイアウトの土台 */
.p-hero-area {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #fff;
    /* 3D干渉を防ぐためPerspectiveを完全に切る */
    perspective: none;
}

.p-hero-pin-spacer {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.p-hero-frame-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    /* レイヤーを独立させて描画の混線を防ぐ */
    isolation: isolate;
}

/* --- top.css の修正箇所 --- */

.p-hero-frame-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;

    /* 初期状態：透明にして非表示 */
    opacity: 0;
    visibility: hidden;

    /* 出現時の速度：0.3sくらいにすると「すぐに出た」感覚と滑らかさが両立します */
    /* 瞬時に出したい場合は transition を消してください */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* スクロール開始時にJSで付与されるクラス */
.p-hero-frame-border.is-visible {
    opacity: 1;
    visibility: visible;
}

.p-hero-frame-border img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 画面全体を覆う */
    transform: translateZ(0) rotate(0.001deg);
}

/* 2. 中身（背面：画像） */
.p-hero-image-window {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    overflow: hidden;
}

.p-hero-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 中身も安定化 */
    transform: translate3d(0, 0, 0);
}

@media (min-aspect-ratio: 5/4) {
    /* 横に長い */

    .u-hero-horizontal {
        display: block;
    }


    .u-hero-vertical {
        display: none;
    }

    .p-hero-frame-border img {
        /* スマホ時は拡大率(scale:2)と合わせて調整 */
        object-fit: cover;
        width: 100%;
        height: 100%;
        object-position: 74.7374% 50%;
    }
}

/* 中央ゾーン（ほぼ正方形〜やや縦／横） */
@media (min-aspect-ratio: 4/5) and (max-aspect-ratio: 5/4) {

    /* バランス型 */
    .u-hero-horizontal {
        display: none;
    }

    .u-hero-vertical {
        display: block;
    }

    .p-hero-frame-border img {
        /* スマホ時は拡大率(scale:2)と合わせて調整 */
        object-fit: cover;
        width: 100%;
        height: 100%;
        object-position: 69.8867% 50%;
    }
}

@media (max-aspect-ratio: 4/5) {
    .u-hero-horizontal {
        display: none;
    }

    .u-hero-vertical {
        display: block;
    }

    .p-hero-frame-border img {
        /* スマホ時は拡大率(scale:2)と合わせて調整 */
        object-fit: cover;
        width: 100%;
        height: 100%;
        object-position: 69.8867% 50%;
    }
}

@media (max-aspect-ratio: 3.01/5) {}


/* ==========================================================================
   Projects / section
   ========================================================================== */
.p-portal {
    width: 100%;
    padding: 0 21svw;
    margin: var(--section-margin) auto;
    overflow: hidden;
}

.p-portal .c-section-container:nth-of-type(odd) {
    flex-direction: row;
}

.p-portal .c-section-container:nth-of-type(even) {
    flex-direction: row-reverse;
}

.l-section,
.p-news,
.p-contact {
    width: 58svw;
    margin: var(--section-margin) auto;
}



@media screen and (max-width: 1080px) {
    .p-portal {
        width: 100%;
        padding: 0 8svw;
        margin: var(--section-margin) auto;
        overflow: hidden;
    }

    .l-section,
    .p-news,
    .p-contact {
        width: 80%;
        margin: var(--section-margin) auto;
    }
}

@media screen and (max-width:767px) {

    .p-portal .c-section-container:first-child {
        margin-top: 10svh;
    }

    .p-portal .c-section-container:nth-of-type(odd),
    .p-portal .c-section-container:nth-of-type(even) {
        flex-direction: column;
        gap: 4svh;
        margin: 0 auto var(--section-margin);
    }

    .l-section,
    .p-news,
    .p-contact {
        width: 100%;
        padding: 0 44px;
        margin: var(--section-margin) auto;
    }

}


/* ==========================================================================
   Projects / news
   ========================================================================== */
.p-news__list {
    flex-basis: 60%;
}

.p-news__item {
    position: relative;
    border-top: 2px solid var(--color-border);
}

.p-news__item:hover .p-news__title,
.p-news__item:active .p-news__title,
.p-news__item:hover .p-news__date,
.p-news__item:hover .p-news__date {
    opacity: .5;
}

.p-news__list .p-news__item:last-of-type {
    border-bottom: 2px solid var(--color-border);
}

.p-news__link {
    display: flex;
    padding: 4em 1.5em;
}

.p-news__new {
    position: absolute;
    font-size: var(--font-size-Text-S);
    top: -2.2em;
    left: -3.7em;
    width: 6.5em;
    aspect-ratio: 1/1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--En-font);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    border-radius: 50%;
    background-color: var(--color-bg-tertiary);
    color: var(--color-Primary);
}

.p-news__date {
    display: block;
    font-family: var(--En-font);
    font-size: var(--font-size-Text-R);
    font-weight: 500;
    letter-spacing: .15em;
    line-height: 1.75;
    white-space: nowrap;
    color: var(--color-Primary);
    margin-right: 2em;
    transition: all .4s ease;
}

.p-news__title {
    display: block;
    font-size: var(--font-size-Text-R);
    font-weight: 500;
    letter-spacing: .15em;
    line-height: 1.65;
    white-space: nowrap;
    color: var(--color-Primary);
    text-wrap: wrap;
    transition: all .4s ease;
}

@media screen and (max-width:767px) {
    .p-news__link {
        display: flex;
        padding: 2em .5em;
    }

    .p-news__new {
        width: 5em;
    }
}

/* ==========================================================================
   Projects / pseudo-footer
   ========================================================================== */

.p-pseudo-footer {
    overflow: hidden;
    margin: 10svh auto;
}

.p-pseudo-footer__list {
    display: flex;
    align-items: flex-end;
    width: calc(100% * 10 / 8);
    /* ← 10個分を8個分の幅で表示 */
    margin-left: calc(-100% / 16);
    /* 左を0.5個分はみ出す */
}

.p-pseudo-footer__item {
    position: relative;
    flex: 0 0 calc(100% / 10);
    transition: all .3s ease;
}

.p-pseudo-footer__item:hover {
    transform: translateY(-5em);
}

.p-pseudo-footer__label {
    font-size: var(--font-size-Text-M);
    font-weight: 800;
    letter-spacing: 0.15em;
    line-height: 1.5;
    color: var(--color-White);
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    text-align: start;
    height: max-content;
    writing-mode: vertical-rl;
    /* 縦書き（右から左） */
    text-orientation: mixed;
    /* 和文は縦、英数字は横（デフォルト） */
    -webkit-text-orientation: mixed;
    /* Safari用 */
    white-space: nowrap;
}

.p-pseudo-footer__top-marquee {
    margin-bottom: 8svh;
}

.p-pseudo-footer .c-marquee__items {
    gap: 1em;
}

.p-pseudo-footer .c-marquee__items img {
    height: 1.4em;
}

/* ==========================================================================
   Components / marquee
   ========================================================================== */
.c-marquee {
    overflow: hidden;
    width: 100%;
    font-size: var(--font-size-Heading-L);
    padding: 20px 0;
    border-top: 2px solid var(--color-Primary);
    border-bottom: 2px solid var(--color-Primary);
}

.c-marquee__track {
    width: 100%;
    overflow: hidden;
}

.c-marquee__items {
    display: flex;
    width: max-content;
    will-change: transform;
}

.c-marquee__items span {
    flex-shrink: 0;
}

.c-marquee__items img {
    display: block;
}

/* ==========================================================================
   Projects / others
   ========================================================================== */

.p-news .c-section-container__heading,
.p-contact .c-section-container__heading {
    font-family: var(--En-font);
    font-weight: 800;
    letter-spacing: 0;
}

.p-topic__inner {
    display: flex;
    justify-content: center;
    background-image: url(../../images/top/bg-toy-patern.webp);
    background-repeat: repeat;
    background-size: 50%;
    padding-top: clamp(50px, 4svh, 100px);
    padding-bottom: clamp(50px, 4svh, 100px);
}