/* ================================================
   TERRA SPACE
   style.css
   ================================================ */

/* --- Custom Properties --- */
:root {
    --space-900: #05070F;
    --space-850: #080B16;
    --space-800: #0B1020;
    --gold: #C8A84B;
    --gold-bright: #E2C87A;
    --gold-light: #E2C87A;
    --gold-deep: #C9920A;
    --ink: #F3EFE4;
    --muted: #9AA0B5;
    --bg: #030202;
    --bg-footer: #050404;
    --text: #ffffff;
    --line: rgba(231, 196, 92, 0.16);
    --hair: rgba(243, 239, 228, 0.10);
    --text-muted: rgba(255, 255, 255, .55);
    --text-dim: rgba(255, 255, 255, .40);
    --border: rgba(255, 255, 255, .06);
    --gold-border: rgba(200, 168, 75, .14);
    --ok: #5be29a;
    --danger: #E0796B;
    --field-bg: rgba(255, 255, 255, .02);

    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
    --font-mono: 'DM Mono', monospace;
    --jp-serif: "Shippori Mincho B1", serif;
    --jp-sans: "Noto Sans JP", sans-serif;
    --en: "Space Grotesk", sans-serif;
    --mono: "JetBrains Mono", monospace;

    --container-max: 1280px;
    --container: 1000px;
    --container-wide: 1080px;
    --container-narrow: 920px;
    --pad-h: clamp(20px, 4vw, 48px);
    --section-v: clamp(90px, 13vh, 150px);
    --gutter: clamp(22px, 5vw, 64px);
}

/* --- Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(200, 168, 75, .3);
    color: #fff;
}

img {
    display: block;
}

.wrap {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter)
}

.narrow {
    max-width: 960px
}

/* --- Keyframes --- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-16px);
    }
}

@keyframes floatB {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .35;
        transform: scale(.65);
    }
}

@keyframes orbit-arm {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* ------------------------------------------------
   HEADER
   ------------------------------------------------ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad-h);
    background: rgba(3, 2, 2, .74);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: .5px solid var(--gold-border);
}

.site-header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.site-logo img {
    height: 48px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.2vw, 32px);
    list-style: none;
}

.site-nav a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .13em;
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    text-transform: uppercase;
    transition: color .2s;
}

.site-nav a:hover {
    color: var(--gold-light);
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 3px;
    border: .5px solid rgba(255, 255, 255, .16);
    border-radius: 4px;
    padding: 3px;
}

.lang-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .06em;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    background: transparent;
    color: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: background .2s, color .2s;
}

.lang-btn.is-active {
    background: var(--gold);
    color: #0a0907;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: .5px solid rgba(255, 255, 255, .16);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--gold-light);
    transition: transform .25s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 190;
}

@media (max-width:960px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: fixed;
        top: 64px;
        right: 0;
        bottom: 0;
        z-index: 200;
        width: min(78vw, 320px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 12px clamp(20px, 6vw, 32px) 32px;
        background: rgba(3, 2, 2, .97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-left: .5px solid var(--gold-border);
        transform: translateX(100%);
        transition: transform .3s ease;
        overflow-y: auto;
    }

    .site-nav.is-open {
        transform: translateX(0);
    }

    .site-nav li {
        border-bottom: .5px solid rgba(255, 255, 255, .08);
    }

    .site-nav a {
        display: block;
        padding: 16px 4px;
        font-size: 12px;
    }

    .nav-overlay:not([hidden]) {
        display: block;
    }
}

body.nav-open {
    overflow: hidden;
}


/* ------------------------------------------------
   SECTION COMMON — marker (line + label)
   ------------------------------------------------ */
.section-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    text-align: center;
}

.section-marker__line {
    width: 1px;
    height: 30px;
    background: linear-gradient(rgba(200, 168, 75, .65), transparent);
}

.section-marker__label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .3em;
    color: var(--gold);
    text-transform: uppercase;
}

.main-placeholder {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ------------------------------------------------
   FOOTER
   ------------------------------------------------ */
.site-footer {
    border-top: .5px solid var(--gold-border);
    background: var(--bg-footer);
    padding: clamp(40px, 6vh, 64px) var(--pad-h) 40px;
}

.site-footer__inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.site-footer__logo img {
    height: 26px;
    margin-bottom: 18px;
}

.site-footer__tagline {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .22em;
    color: rgba(200, 168, 75, .7);
    text-transform: uppercase;
    margin: 0;
}

.site-footer__info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .5);
    line-height: 1.6;
}

.site-footer__info-name {
    color: rgba(255, 255, 255, .75);
    font-weight: 500;
    letter-spacing: .04em;
}

.site-footer__nav {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.site-footer__nav-head {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(200, 168, 75, .7);
    margin: 0 0 4px
}

.site-footer__nav a {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    line-height: 1.5;
    transition: color .2s;
    width: fit-content
}

.site-footer__nav a:hover,
.site-footer__nav a:focus-visible {
    color: rgba(200, 168, 75, .95)
}

.site-footer__bottom {
    max-width: 1180px;
    margin: 30px auto 0;
    border-top: .5px solid rgba(255, 255, 255, .07);
    padding-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap
}

.site-footer__copy {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .28)
}

.site-footer__legal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap
}

.site-footer__legal a {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .4);
    text-decoration: none;
    transition: color .2s
}

.site-footer__legal a:hover,
.site-footer__legal a:focus-visible {
    color: rgba(200, 168, 75, .9)
}

@media (max-width:640px) {
    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px
    }
}