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

html {
    scroll-behavior: smooth;
}

body.sora {
    background: #f5f2ed;
    color: #3d3a36;
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.85;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    overflow-x: hidden;
}

/* === Grid Substrate === */
.layer {
    position: relative;
    min-height: 100vh;
    padding: 10vh 8vw;
    overflow: hidden;
}

/* === Typography === */
.headline {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    letter-spacing: 0.03em;
    line-height: 1.15;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #3d3a36;
    margin-bottom: 2rem;
}

.accent-caption {
    font-family: 'Nunito', sans-serif;
    font-weight: 200;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #7b9bab;
}

p {
    max-width: 38em;
    margin-bottom: 1.5em;
}

p:last-child {
    margin-bottom: 0;
}

/* === Kanji Watermarks === */
.kanji-watermark {
    position: absolute;
    font-family: 'Nunito', sans-serif;
    font-size: 20vw;
    font-weight: 200;
    color: #7b9bab;
    opacity: 0.035;
    transform: rotate(-2deg);
    right: -5vw;
    top: 10%;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

/* === Bokeh Field === */
.bokeh-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.bokeh {
    position: absolute;
    border-radius: 50%;
    background: #d6e3ec;
    opacity: 0.06;
    filter: blur(40px);
    animation: drift 60s infinite alternate ease-in-out;
}

@keyframes drift {
    from { transform: translate(0, 0); }
    to { transform: translate(20px, -15px); }
}

/* === Kumo Layer === */
.layer--kumo {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.headline--kumo {
    position: relative;
    z-index: 1;
    max-width: 60%;
}

/* === Horizon Lines === */
.horizon {
    border: none;
    height: 1px;
    background: #7b9bab;
    opacity: 0.08;
    margin-top: 6vh;
}

.horizon--kumo { width: 100%; }
.horizon--kaze { width: 70%; margin-right: auto; }
.horizon--yama { width: 50%; margin-left: auto; }
.horizon--mizu { width: 100%; }
.horizon--tsuchi { width: 30%; margin-right: auto; background: #c4a882; }

/* === Breath Marks === */
.breath-mark {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #7b9bab;
    opacity: 0.3;
    margin: 0 auto;
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* === Mountain Silhouettes === */
.mountain-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    opacity: 0.12;
    pointer-events: none;
}

.mountain--alps {
    clip-path: polygon(0% 100%, 5% 65%, 12% 45%, 20% 70%, 28% 68%, 35% 38%, 41% 22%, 48% 50%, 55% 55%, 63% 30%, 72% 15%, 80% 42%, 88% 48%, 95% 60%, 100% 100%);
    background: #7b9bab;
}

.mountain--hakone {
    clip-path: polygon(0% 100%, 8% 72%, 18% 58%, 30% 65%, 42% 50%, 52% 55%, 62% 42%, 72% 48%, 82% 38%, 92% 52%, 100% 100%);
    background: #7b9bab;
}

.mountain--fuji {
    clip-path: polygon(0% 100%, 20% 85%, 35% 70%, 45% 30%, 50% 15%, 55% 30%, 65% 70%, 80% 85%, 100% 100%);
    background: #7b9bab;
    opacity: 0.08;
}

/* === Kaze Layer — F-pattern === */
.f-scan--primary {
    display: flex;
    gap: 8vw;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.content-block--left {
    flex: 0 0 55%;
}

.content-block--right {
    flex: 1;
}

/* === Yama Layer — Switchback === */
.switchback {
    position: relative;
    z-index: 1;
}

.switchback .content-block--left {
    width: 70%;
}

.switchback-spacer {
    height: 20vh;
}

.switchback .content-block--right {
    width: 50%;
    margin-left: auto;
}

/* === Mizu Layer — Centered Reflection === */
.layer--mizu {
    background: #e8e4dd;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.reflection-text {
    max-width: 42em;
    position: relative;
    z-index: 1;
}

.headline--mizu {
    font-size: clamp(2.5rem, 6vw, 5rem);
}

.reflection-text p {
    margin-left: auto;
    margin-right: auto;
}

/* === Tsuchi Layer — Ground === */
.layer--tsuchi {
    padding-bottom: 40vh;
}

.ground {
    position: relative;
    z-index: 1;
    max-width: 50%;
}

.ground-info {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
}

/* === Fade-in Animation === */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Navigation Dot === */
.nav-dot {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.nav-dot-point {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7b9bab;
    opacity: 0.4;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 85%, 100% { opacity: 0.4; transform: scale(1); }
    90% { opacity: 0.8; transform: scale(1.5); }
    95% { opacity: 0.4; transform: scale(1); }
}

/* === Navigation Overlay === */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(90, 111, 126, 0.95); /* #5a6f7e */
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding-right: 10vw;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-link {
    font-family: 'Nunito', sans-serif;
    font-weight: 200;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: #f5f2ed;
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: color 0.3s ease;
}

.nav-link span {
    font-size: 0.5em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-left: 0.8em;
    opacity: 0.6;
}

.nav-link:hover {
    color: #c4a882;
}

/* === Shake Animation === */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.shake {
    animation: shake 0.15s ease-out;
}

/* === Responsive === */
@media (max-width: 768px) {
    .f-scan--primary {
        flex-direction: column;
        gap: 4vh;
    }
    .content-block--left,
    .content-block--right {
        flex: none;
        width: 100% !important;
    }
    .switchback .content-block--right {
        width: 85% !important;
    }
    .ground {
        max-width: 100%;
    }
    .headline--kumo {
        max-width: 90%;
    }
}
