/* =========================================================
   Page CSS - Prism in the Space
   固定ページ用
========================================================= */


/* =========================================================
   1. 宇宙空間と背景
========================================================= */
.galaxy-universe-root {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: var(--bg-deep);
}

.galaxy-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1600px;
    overflow: hidden;
}

/* 青背景：寝かせない */
.page-background-glow {
    position: absolute;
    inset: 0;
    z-index: 1;

    background:
        radial-gradient(circle at 20% 80%, rgba(0, 45, 30, 0.38) 0%, transparent 52%),
        radial-gradient(circle at 80% 20%, rgba(0, 30, 90, 0.38) 0%, transparent 52%),
        radial-gradient(circle at center, rgba(0, 68, 255, 0.1) 0%, transparent 78%);
}

/* Grid：Page専用。奥行きだけ担当 */
.page-grid-background {
    position: absolute;
    inset: -55% -45%;
    z-index: 2;

    background-image:
        linear-gradient(rgba(120, 210, 255, 0.24) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 210, 255, 0.28) 1px, transparent 1px);

    background-size:
        72px 42px,
        72px 42px;

    transform-origin: center center;

    transform:
        perspective(1800px)
        rotateX(58deg)
        scaleX(1.8)
        scaleY(2.2)
        translateY(10%);

    opacity: 0.56;

    filter: none;
    animation: none;

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.35) 18%,
            black 42%,
            black 100%
        );

    mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.35) 18%,
            black 42%,
            black 100%
        );
}

@keyframes pageGridDepthFloat {
    0%,
    100% {
        transform:
            perspective(1200px)
            rotateX(48deg)
            scaleX(2.2)
            translateY(0);
    }

    50% {
        transform:
            perspective(1200px)
            rotateX(46deg)
            scaleX(2.24)
            translateY(-1%);
    }
}


/* =========================================================
   2. 軌道
========================================================= */
.galaxy-orbit {
    display: none;
}

.orbit-shape {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    transform-style: preserve-3d;
}

.orbit-inner {
    width: 650px;
    height: 650px;
    animation: orbitSpinInner 95s linear infinite;
}

.orbit-inner .orbit-shape {
    animation: orbitBreatheInner 17s ease-in-out infinite;
}

.orbit-outer {
    width: 1050px;
    height: 1050px;
    animation: orbitSpinOuter 110s linear infinite;
}

.orbit-outer .orbit-shape {
    animation: orbitBreatheOuter 26s ease-in-out infinite;
}

@keyframes orbitSpinInner {
    0% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateY(45deg) rotateZ(0deg);
    }

    20% {
        transform: translate(-50%, -50%) rotateX(82deg) rotateY(10deg) rotateZ(70deg);
    }

    40% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateY(-35deg) rotateZ(150deg);
    }

    60% {
        transform: translate(-50%, -50%) rotateX(78deg) rotateY(20deg) rotateZ(230deg);
    }

    80% {
        transform: translate(-50%, -50%) rotateX(72deg) rotateY(50deg) rotateZ(310deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateY(45deg) rotateZ(360deg);
    }
}

@keyframes orbitSpinOuter {
    0% {
        transform: translate(-50%, -50%) rotateX(65deg) rotateY(-45deg) rotateZ(0deg);
    }

    20% {
        transform: translate(-50%, -50%) rotateX(80deg) rotateY(-10deg) rotateZ(-80deg);
    }

    40% {
        transform: translate(-50%, -50%) rotateX(90deg) rotateY(15deg) rotateZ(-160deg);
    }

    60% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateY(-30deg) rotateZ(-240deg);
    }

    80% {
        transform: translate(-50%, -50%) rotateX(75deg) rotateY(-55deg) rotateZ(-320deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(65deg) rotateY(-45deg) rotateZ(-360deg);
    }
}

@keyframes orbitBreatheInner {
    0%,
    100% {
        transform: scaleX(1) scaleY(0.88);
    }

    25% {
        transform: scaleX(1.04) scaleY(0.84);
    }

    55% {
        transform: scaleX(0.94) scaleY(0.92);
    }

    80% {
        transform: scaleX(1.02) scaleY(0.86);
    }
}

@keyframes orbitBreatheOuter {
    0%,
    100% {
        transform: scaleX(1) scaleY(0.86);
    }

    30% {
        transform: scaleX(0.93) scaleY(0.92);
    }

    60% {
        transform: scaleX(1.06) scaleY(0.82);
    }

    85% {
        transform: scaleX(0.97) scaleY(0.89);
    }
}


/* =========================================================
   3. 固定ページコンテンツ
========================================================= */
.page-shell {
    position: relative;
    z-index: 10;

    min-height: 100vh;

    display: flex;
    align-items: flex-start;

    padding-top: 88px;
    padding-bottom: 96px;

    overflow: hidden;
}

.page-accent {
    position: absolute;
    z-index: 8;

    pointer-events: none;

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    opacity: 0.18;

    filter:
        invert(86%)
        sepia(52%)
        saturate(620%)
        hue-rotate(338deg)
        brightness(92%)
        drop-shadow(0 0 24px rgba(255, 210, 120, 0.22));
}

.page-accent--large {
    width: 480px;
    height: 480px;

    right: calc(50% - 760px);
    bottom: 20px;

    background-image: url("../svg/arrival-01.svg");

    animation: pageAccentFloatLarge 12s ease-in-out infinite;
}

.page-accent--small {
    width: 280px;
    height: 280px;

    left: calc(50% - 700px);
    top: 10px;

    background-image: url("../svg/arrival-02.svg");

    animation: pageAccentFloatSmall 10s ease-in-out infinite;
}

@keyframes pageAccentFloatLarge {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(180deg);
    }

    50% {
        transform:
            translateY(-10px)
            rotate(185deg);
    }
}

@keyframes pageAccentFloatSmall {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(180deg);
    }

    50% {
        transform:
            translateY(8px)
            rotate(185deg);
    }
}

.page-container {
    width: min(1080px, calc(100vw - 72px));
    max-width: 1080px;
    box-sizing: border-box;
    border-radius: 28px;

    margin: 0 auto;
    padding: 72px 64px;

    background: rgba(0, 12, 32, 0.8);

    border: 1px solid rgba(255, 245, 220, 0.10);

    backdrop-filter: blur(3px);

    box-shadow:
        0 0 28px rgba(80, 140, 220, 0.10),
        inset 0 0 24px rgba(140, 190, 255, 0.04);
}

.page-content {
    max-width: 920px;
    margin: 0 auto;

    color: var(--text-light);
}

.page-content p {
    margin-top: 0;
    margin-bottom: 1.45em;

    line-height: 1.95;
}

.page-content ul,
.page-content ol {
    margin-top: 0;
    margin-bottom: 1.8em;
    padding-left: 1.4em;

    line-height: 1.9;
}

.page-content li {
    margin-bottom: 0.5em;
}

.page-content img {
    max-width: 100%;
    height: auto;
}

.page-content figure {
    margin: 48px 0;
}

.page-content table {
    width: 100%;
    margin: 32px 0 48px;

    border-collapse: collapse;
    border-top: 1px solid rgba(0, 242, 255, 0.18);

    font-size: 0.95rem;
    line-height: 1.8;
}

.page-content th,
.page-content td {
    padding: 18px 20px;

    border-bottom: 1px solid rgba(0, 242, 255, 0.14);

    vertical-align: top;
}

.page-content th {
    width: 28%;

    color: rgba(224, 242, 255, 0.72);
    font-weight: 400;
    text-align: left;
    letter-spacing: 0.06em;
}

.page-content td {
    color: rgba(224, 242, 255, 0.92);
}

/* =========================================================
   5. Page Title
========================================================= */

.page-title {
    margin-bottom: 72px;
}

.page-title__slug {
    position: relative;

    display: inline-flex;
    align-items: center;
    gap: 16px;

    margin: 0 0 16px;

    font-family: "PrismScript";
    font-size: clamp(16px, 1.25vw, 22px);
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: rgba(76, 215, 255, 0.9);
}

.page-title__slug::after {
    content: "";

    width: 88px;
    height: 1px;

    background:
        linear-gradient(
            to right,
            rgba(76, 215, 255, 0.56),
            transparent
        );
}

.page-title__en {
    margin: 0 0 28px;

    font-family: "PrismSerif";
    font-size: clamp(42px, 4.4vw, 64px);
    line-height: 1.08;
    letter-spacing: 0.045em;

    color: rgba(255, 255, 255, 0.97);

    text-shadow:
        0 0 18px rgba(255, 255, 255, 0.08),
        0 0 42px rgba(120, 190, 255, 0.1);
}

.page-title__ja {
    position: relative;

    display: inline-block;

    margin: 0;
    padding-bottom: 24px;

    font-size: clamp(18px, 1.45vw, 24px);
    line-height: 1.7;
    letter-spacing: 0.16em;

    color: rgba(76, 215, 255, 0.88);
}

.page-title__ja::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 360px;
    max-width: 72vw;
    height: 1px;

    background:
        linear-gradient(
            to right,
            rgba(76, 215, 255, 0.72),
            transparent
        );
}

/* =========================================================
   6. Page Heading
========================================================= */

.page-content h2,
.page-content h3,
.page-content h4 {
    overflow-wrap: anywhere;
    word-break: normal;
    text-wrap: balance;
}

.page-content h2 {
    position: relative;

    margin-top: 80px;
    margin-bottom: 30px;
    padding-bottom: 18px;

    font-family: inherit;
    font-size: clamp(24px, 2.25vw, 34px);
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0.08em;

    color: rgba(255, 255, 255, 0.94);
}

.page-content h2::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    max-width: 280px;
    height: 1px;

    background:
        linear-gradient(
            to right,
            rgba(214, 178, 92, 0.58),
            transparent
        );
}

.page-content h3 {
    position: relative;

    margin-top: 56px;
    margin-bottom: 20px;
    padding-left: 18px;

    font-size: clamp(19px, 1.65vw, 25px);
    font-weight: 500;
    line-height: 1.65;
    letter-spacing: 0.07em;

    color: rgba(244, 220, 158, 0.92);
}

.page-content h3::before {
    content: "";

    position: absolute;
    left: 0;
    top: 0.42em;

    width: 2px;
    height: 1.45em;

    background:
        linear-gradient(
            to bottom,
            rgba(214, 178, 92, 0.78),
            rgba(214, 178, 92, 0.16)
        );
}

.page-content h4 {
    margin-top: 38px;
    margin-bottom: 14px;

    font-size: clamp(16px, 1.25vw, 19px);
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.08em;
    text-transform: none;

    color: rgba(244, 220, 158, 0.82);
}


/* =========================================================
   7. Responsive
========================================================= */
@media (max-width: 768px) {
    .page-grid-background {
        inset: -120% -180%;

        background-image:
            linear-gradient(rgba(120, 210, 255, 0.22) 1px, transparent 1px),
            linear-gradient(90deg, rgba(120, 210, 255, 0.24) 1px, transparent 1px);

        background-size:
            58px 36px,
            58px 36px;

        transform:
            perspective(1400px)
            rotateX(56deg)
            scaleX(2.8)
            scaleY(3.6)
            translateY(22%);

        opacity: 0.48;

        animation: none;
    }

    .orbit-inner {
        width: 420px;
        height: 420px;
    }

    .orbit-outer {
        width: 680px;
        height: 680px;
    }

    .page-shell {
        padding-top: 72px;
        padding-bottom: 72px;
    }

    .page-container {
        width: calc(100vw - 32px);
        margin: 0 16px;
        padding: 56px 22px;
    }

    .page-content {
        max-width: none;
    }

    .page-content table {
        font-size: 0.9rem;
    }

    .page-content th,
    .page-content td {
        display: block;
        width: 100%;
        box-sizing: border-box;

        padding: 14px 0;
    }

    .page-content th {
        padding-bottom: 4px;
        border-bottom: none;
    }

    .page-content td {
        padding-top: 0;
    }

    .pocs-agent-button {
        right: 18px;
        bottom: 18px;

        width: 52px;
        height: 52px;
    }

    .pocs-agent-button img {
        width: 32px;
        height: 32px;
        max-width: 32px;
        max-height: 32px;
        object-fit: contain;
    }

    .page-accent {
        z-index: 9;
        opacity: 0.2;

        filter:
            invert(86%)
            sepia(52%)
            saturate(620%)
            hue-rotate(338deg)
            brightness(92%)
            drop-shadow(0 0 16px rgba(255, 220, 140, 0.32))
            drop-shadow(0 0 38px rgba(255, 200, 100, 0.18));
    }

    .page-accent--large {
        width: 300px;
        height: 300px;

        right: -96px;
        bottom: 44px;

        transform: rotate(180deg);
        animation: none;
    }

    .page-accent--small {
        width: 190px;
        height: 190px;

        left: -64px;
        top: 28px;

        transform: rotate(180deg);
        animation: none;
    }

    .page-title {
        margin-bottom: 56px;
    }

    .page-title__slug {
        gap: 12px;

        margin-bottom: 14px;

        font-size: 15px;
    }

    .page-title__slug::after {
        width: 56px;
    }

    .page-title__en {
        margin-bottom: 18px;

        font-size: clamp(34px, 9vw, 48px);
        line-height: 1.08;
        letter-spacing: 0.05em;
    }

    .page-title__ja {
        padding-bottom: 20px;

        font-size: 0.92rem;
        line-height: 1.9;
        letter-spacing: 0.14em;
    }

    .page-content h2 {
        margin-top: 60px;
        margin-bottom: 24px;
        padding-bottom: 14px;

        font-size: clamp(21px, 6vw, 28px);
        line-height: 1.65;
        letter-spacing: 0.06em;
    }

    .page-content h2::after {
        max-width: 180px;
    }

    .page-content h3 {
        margin-top: 42px;
        margin-bottom: 18px;
        padding-left: 14px;

        font-size: clamp(18px, 5vw, 23px);
        line-height: 1.7;
        letter-spacing: 0.05em;
    }

    .page-content h3::before {
        top: 0.46em;
        height: 1.35em;
    }

    .page-content h4 {
        margin-top: 32px;

        font-size: clamp(15px, 4.2vw, 18px);
        line-height: 1.75;
        letter-spacing: 0.05em;
    }
}
