@charset "utf-8";

/* Robot PJ 메인 CSS - Robot.css */

/* 웹폰트 CDN */
@import url('https://fonts.googleapis.com/css2?family=Barlow&family=Black+Ops+One&family=Chakra+Petch&family=Orbitron:wght@500&display=swap');

/* 
    font-family: 'Barlow', sans-serif;
    font-family: 'Black Ops One', cursive;
    font-family: 'Chakra Petch', sans-serif;
    font-family: 'Orbitron', sans-serif;
*/

/* 전체 부드러운 스크롤 */
html{
    scroll-behavior: smooth;
}

/* 전체 가로스크롤 방지 */
html, body{
    overflow-x: hidden;
}

/* 초기화 */
html, body, h1, h2, p, ol, ul{
    margin: 0;
    padding: 0;
}

/* 공통 클래스 */
/* 메탈소재1 배경 */
.mt1{
    background: url(../images/metal01.jpg) no-repeat center/cover;
}
/* 메탈소재2 배경 */
.mt2{
    background: url(../images/metal02.jpg) no-repeat center/cover;
}

body{
    background: url(../images/bg.jpg) no-repeat fixed top/cover;
}
/* 공사중 표시 */
/* body *{
    outline: 2px dashed yellow;
} */


/************************************************* 1.상단영역 *************************************************/
/* 1-1.로고 */
.logo{
    /* 위치 셋팅(픽스드 포지션) */
    position: fixed;
    top: calc(50% - 102px);
    left: calc(50% - 102px);
    z-index: 1;
    /* 
            [ 앱솔루트/픽스드 포지션 정중앙 보내기 ]
        1.calc()로 계산하기
        ->top: calc(50% - 중앙에 갈 박스 높이값의 절반);
        left: calc(50% - 중앙에 갈 박스 가로값의 절반);
        주의사항: 마이너스 기호 앞뒤 반드시 띄어쓰기 하기
        2.위치값 50%이동 후 트랜스폼 사용하기
        ->top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    */

    /* 크기 확대하기 */
    transform: scale(2);

    /* 박스 셋팅(박스 크기 등) */
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid #ccc;
    text-align: center;
    /* 박스 배경 */
    background: pink url(../images/robot_03.png) no-repeat center 10px/160px;
    /* background-position: center 10px; */
    /* background-size: 160px auto; */

    /* 박스 그림자 */
    box-shadow:
    inset 0 0 20px 5px #000,
    0 0 20px 5px aquamarine;

    /* 글자 셋팅 */
    color: aquamarine;
    /* font: 스두크/줄체 ; */
    font: 45px/200px 'Orbitron';
    /* 글자 그림자 */
    text-shadow: 2px 2px 5px #000;
}

/* 1-2.링크타이틀 */
.link{
    position: absolute;
    top: 100px;
    right: 50px;

    z-index: 1;
}
/* 링크 a */
.link a{
    /* a요소 필수셋팅 - 글자색, 밑줄 없앰 (부묘오소에 주면 안되고 a에게 줘야함) */
    color: lawngreen;
    text-decoration: none;
    /* 글자 : 스두크/줄체 */
    font: 50px 'Black Ops One';
    /* 글자 그림자 */
    text-shadow: 2px 2px 2px #000;
}
/* 마우스오버시 */
.link a:hover{
    /* 글자색 */
    color: orangered;
    /* 글자 데코 */
    text-decoration: overline;
    /* 글자 데코 스타일 */
    text-decoration-style: wavy;
}

/* 1-3.탑버튼 */
.btnTop{
    /* 픽스드 포지션(보이는 화면에 고정하기) */
    position: fixed;
    bottom: 50px;
    right: 50px;

    /* 박스 셋팅 */
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 5px outset #fff;
    background-color: #ccc;
}

/* 버튼 a요소 */
.btnTop a{
    display: block;
    /* 디자인 먹으라고 줌 */
    width: 100%;
    height: 100%;

    /* 글자셋팅 */
    color: blue;
    font: 30px/90px 'Black Ops One';
    text-decoration: none;
    /* 
        [ 높이값이 100px이니까, 중앙 정렬을 위해서 100px로 써야하는데 line-height에 90px을 준 이유? ]
        -버튼은 기본적으로 box-sixing: border-box이므로 패딩과 보더가 내부에 포함됨
        =>따라서 컨텐츠 영역이 그만큼 작아짐

        -박스 보더가 5px이므로 양쪽합은 10px임
        =>이것을 빼니까 90px인 것이다
    */
}
/* 버튼 마우스오버시 */
.btnTop:hover{
    background-color: #ff0;
    border-style: inset;
}
/* a요소 글자색 */
.btnTop:hover a{
    /* a에게 주려는 것들은 전부 콕찝어서 a에다가 줘야함! */
    color: red;
}

/************************************************** 2.메인영역 **************************************************/

/* 2-1.로봇 박스 */
.robx{
    /* 상단에 속한 애들이 다 떠있는 애들이라서 위에서 고정?밀어줄?애가 필요해서 패딩으로 밀어냄;;; */
    padding: 200px 0 50px;
}

/* 로봇 머리 */
.head{
    position: relative;
    /* 마영오와 같은 것들이 먹혀야 하니까 스태틱한 설정을 할 수 밖에 없음! 그래서 렐러티브를 많이 주는 것임 */
    z-index: 1;
    /* 목보다 머리가 위에 올라오게 하기 위해 z인덱스 줌 */

    width: 250px;
    height: 150px;
    /* 마영오! */
    margin: 0 auto;
    
    /* 머리 둥글게 */
    /* border-radius: 30% 30% 45% 45%; */
}

/* 로봇 머리 직계 하위 div는 모두 앱솔루트! */
.head>div{
    position: absolute;
}

/* 로봇 머리에 가상요소로 머리털 박스 만들기 (이미지 찾아서 넣기) */
.head::before{
    content: '';
    display: block;
    position: absolute;
    /* 부모는? .head가 부모임 (가상요소도 자식임) */
    /* 머리카락 맨 위로 오게 하기 */
    z-index: 999;
    top: -149px;
    left: -99px;
    width: 431px;
    height: 272px;
    background: url(../images/hair.png) no-repeat center/100% 100%;
}

/* 머리박스에 오버시 가상요소가발 변경하기 */
.head:hover::before{
    top: -100px;
    left: -170px;
    width: 500px;
    height: 500px;
    background: url(../images/hair2.png) no-repeat 0/100% 100%;
}

/* 머리의 가상요소로 턱 만들기 */
.head::after{
    content: '';
    display: block;
    position: absolute;
    width: 250px;
    height: 100px;
    background-color: #000;
    top: 100%;
    /* 100%의 의미 = 부모박스의 높이만큼 밀어준다 */
    z-index: -1;
    background: url(../images/metal01.jpg) no-repeat bottom/100%;
    
    /* 턱깎기 */
    clip-path: polygon(0 0,33.33% 100%,66.66% 100%,100% 0);
}


/* 눈 공통 */
.eye{
    width: 50px;
    height: 50px;
    
    /* 배경 공통(이미지만 다를뿐 다른 셋팅 똑같으니까) */
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;  /* 백퍼 주면 강제로 늘림 */
    
    /* 둥근 모서리 */
    border-radius: 50%;
    /* 보더 이중선 */
    border: 4px double #000;
}
/* 왼눈 */
.e1{
    top: 50px;
    left: 50px;
    
    background-image: url(../images/e1.jpg);
}
/* 오른눈 */
.e2{
    top: 50px;
    right: 50px;
    
    background-image: url(../images/e2.jpg);
}
/* 코 */
.nose{
    top: 100px;
    left: 100px;
    
    width: 50px;
    height: 70px;
    
    background: url(../images/nose.jpg) no-repeat center/110% 100%;
    border-radius: 30px;
}
/* 입 */
.mouth{
    top: 190px;
    left: 89px;
    
    width: 70px;
    height: 30px;
    
    background: url(../images/mouth.png) no-repeat center/100% 100%;
    border-radius: 50px;
}

/* 입 옆에 별모양 점 가상요소로 만들기 */
.mouth::before, .mouth::after{
    content: '';
    display: block;  /* 디자인 잘 먹게끔 db주는 것임. 사실 poa를 주면 db 안줘도 먹히지만, 명시적으로 주는 것임 */
    position: absolute;
    top: -25px;
    right: -25px;
    /* 부모는? .mouth (마우스가 앱솔루트니까!) */
    
    width: 20px;
    height: 20px;
    background-color: gold;
    /* 삼각형 클리핑 속성으로 만들기 */
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
}
/* 
[ CSS 클리핑 속성 ]
- clip-path : polygon(x1 y1, x2 y2, ...)
->각 좌표쌍은 띄어쓰기로, 각 점은 콤마로 구분
->각 점을 연결하여 도형모양만 출력한다
->픽셀은 각 도형 크기 내부의 수치로 쓰고, 퍼센트는 도형을 기준한 위치를 %로 나타낸다
*/
.mouth::after{
    transform: rotate(180deg) translateY(-30%);
}


/* 귀 공통 */
.ear{
    width: 50px;
    height: 60px;
}


/* 왼귀 */
.er1{
    top: 100px;
    left: -50px;
    border-radius: 30% 0 30% 30%;
}
/* 귀걸이 */
.er1::before{
    content: '';
    display: block;
    position: absolute;
    top: 34px;
    left: 1px;
    
    width: 50px;
    height: 50px;
    background: url(../images/earing.png) no-repeat center/100% 100%;
}

/* 오른귀 */
.er2{
    top: 100px;
    right: -50px;
    border-radius: 0 30% 30% 30%;
}
/* 귀걸이 */
.er2::before{
    content: '';
    display: block;
    position: absolute;
    top: 34px;
    left: 1px;
    
    width: 50px;
    height: 50px;
    background: url(../images/earing.png) no-repeat center/100% 100%;
}




/******* 로봇몸통 ******/
.body{
    position: relative;
    /* 부모자격 - 하위 직계 div들 */
    width: 200px;
    height: 450px;
    /* 마영오 */
    margin: 0 auto;
    margin-top: 130px;  /* 중간애들은 다 마진으로밀면 된다 바깥으로 안나감 중간에 있어서 */
}

/* 몸통 하위 직계 div 모두 앱솔루트 */
.body>div{
    position: absolute;
    box-shadow: 0 0 10px 5px cyan;
}

/* 몸통 - 가상요소로 몸통 상단 만들기 */
.body::before{
    content: '';
    display: block;
    position: absolute;
    left: -50px;
    width: 300px;
    height: 200px;
    background-color: #fff;
    /* 그라데이션 */
    background-image: linear-gradient(75deg, rgb(204, 58, 58), rgb(188, 110, 219), lime);
    /* 삼각형 클리핑 속성으로 만들기 */
    clip-path: polygon(0 0,10% 100%,90% 100%,100% 0);
}

/* 몸통 - 가상요소로 몸통 하단 만들기 */
.body::after{
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: -50px;
    width: 300px;
    height: 180px;
    background-color: #fff;
    background-image: linear-gradient(20deg, rgb(69, 99, 182), rgb(224, 120, 164), rgb(221, 219, 94));
    clip-path: polygon(10% 0,0 20%,0 50%,10% 100%,90% 100%,100% 50%,100% 20%,90% 0);
}

/* 목 */
.neck{
    top: -29px;
    left: 65px;
    width: 70px;
    height: 50px;
    border-radius: 0 0 25px 25px;
    border-bottom: 8px dotted cyan;
}

/* 팔 공통 */
.arm{
    top: 4px;
    width: 80px;
    height: 210px;
    z-index: -1;
    border-radius: 50px;

    /* 공통 회전축 변경 : 가로중앙 세로15% 지정 */
    transform-origin: center 15%;
    /* 위의설정 : 가로는 center, 세로는 top임 */
}

/* 팔 공통 가상요소 연결부분(팔꿈치, 팔꿈치내부박스) */
.arm::before, .arm::after{
    content: '';
    display: block;
    position: absolute;
    bottom: -35px;
    z-index: 1;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background-color: rgb(209, 19, 136);
    border: 4px solid #333;
    box-sizing: border-box;
    /* 보더때문에 박스 사이즈가 커지니까, 그러지 않도록 bxb 준 것임 (보더, 패딩포함 크기 유지) */
}

/* 연결부분(팔꿈치) 내부 박스  */
.arm::after{
    transform: scale(.8);
    background-image: linear-gradient(-75deg, rgb(88, 88, 88), rgb(235, 235, 235), rgb(160, 158, 158));
    /* 선형 그라데이션 */
}


/* 팔 하단 */
.arm span{
    position: absolute;
    /* 부모는? .arm */
    top: 100%;
    left: 5px;
    display: block;
    /* 스팬은 인라인요소라서 w,h안먹히니까 블록으로 만들어주기 */
    width: 70px;
    height: 190px;
    border-radius: 50px;

    /* 공통 회전축 변경 */
    transform-origin: top;
    /* 위의설정 : 가로는 center, 세로는 top임 */

    box-shadow: 0 0 10px 5px cyan;
}

/* 팔하단 가상요소로 손목 만들기 */
.arm span::before{
    content: '';
    display: block;
    position: absolute;
    top: 160px;
    left: 8px;
    z-index: 1;
    width: 55px;
    height: 55px;
    background: url(../images/metal01.jpg) no-repeat center/cover;
    border-radius: 40%;
}

/* 팔하단 가상요소로 손박스 만들기 */
.arm span::after{
    content: '';
    display: block;
    position: absolute;
    bottom: -135px;
    width: 90px;
    height: 125px;
    /* outline: 2px dashed lime; */

    /* 회전축 변경 : 세로방향 top*/
    transform-origin: top;
}


/* 왼쪽손 배경이미지 */
.a1 span::after{
    background: url(../images/hand_left.png) no-repeat center/100%;
    left: -5px;
    transform: rotate(-10deg);
}

/* 오른쪽손 배경이미지 */
.a2 span::after{
    background: url(../images/hand_right.png) no-repeat center/100%;
    right: -5px;
    transform: rotate(-10deg);
}

/* 왼팔 */
.a1{
    left: -90px;
    transform: rotate(15deg);
}
/* 왼팔 하단 */
.a1 span{
    transform: rotate(-15deg);
}
/* 오른팔 */
.a2{
    right: -90px;
    transform: rotate(-15deg);
}
/* 오른팔 하단 */
.a2 span{
    transform: rotate(15deg);
}

/* 어꺠 공통 */
.shd{
    width: 90px;
    height: 96px;
    top: -19px;
    border-radius: 50%;
}
/* 왼어깨 */
.s1{
    left: -97px;
    transform: rotate(-347deg);
}
/* 오른어깨 */
.s2{
    right: -97px;
    transform: rotate(347deg);
}

/* 다리 공통 */
.leg{
    top: 90%;
    /* 부모박스 높이만큼 아래로 밀어냄 */
    width: 90px;
    height: 300px;
    z-index: -1;
    border-radius: 50px;

    /* 공통 회전축 변경 : 가로중앙 세로15% 지정 */
    transform-origin: center 15%;
    /* 위의설정 : 가로는 center, 세로는 top임 */
}
/* 다리 공통 가상요소로 연결부분 만들기 */
.leg::before,
.leg::after{
    content: '';
    display: block;
    /* db를 줘야 디자인 요소 줄 수 있음 */
    position: absolute;
    bottom: -40px;
    left: 8px;
    z-index: 1;
    width: 70px;
    height: 70px;
    background-color: rgb(147, 212, 35);
    border: 4px solid #333;
    border-radius: 20px;
    transform: scaleX(.8) rotate(45deg);
    /* 트랜스폼 : 먼저 x축 축소하고 회전
    ->무엇을 먼저 했느냐에 따라 결과 달라짐! */

}
.leg::after{
    transform: scale(.65, .8) rotate(45deg);
    /* 선형 그라데이션 */
    background-image: linear-gradient(-75deg, #222 10%, #ccc 60%, #eee);
}

/* 다리하단 공통 */
.leg span{
    position: absolute;
    /* 부모는? .leg */
    top: 100%;
    left: 5px;
    display: block;
    /* 스팬은 인라인요소라서 w,h안먹히니까 블록으로 만들어주기 */
    width: 80px;
    height: 250px;
    border-radius: 50px;

    box-shadow: 0 0 10px 5px cyan;
}

/* 다리하단 가상요소로 발만들기 */
.leg span::after{
    content: '';
    display: block;
    position: absolute;
    bottom: -50px;
    left: -15px;
    width: 100px;
    height: 50px;
    border-radius: 40px 40px 0 0;
    border: 4px solid #222;
    border-bottom: 20px solid #222;

    /* 선형 그라데이션 */
    background-image: linear-gradient(-45deg, #222 10%, rgb(158, 146, 228) 60%, #eee);

}
/* 다리 하단 가상요소로 부츠 만들기 */
.leg span::before{
    content: '';
    display: block;
    position: absolute;
    top: 140px;
    left: -6px;

    width: 80px;
    height: 100px;
    border: 4px solid #222;
    border-top: 20px solid #222;

    /* 선형 그라데이션 */
    background-image: linear-gradient(-45deg, #222 10%, rgb(158, 146, 228) 60%, #eee);

}

/* 왼다리 */
.l1{
    left: -10px;
}
/* 오른다리 */
.l2{
    right: -10px;
}


/* tv */
.tv{
    top: 50px;
    left: 10px;
    width: 180px;
    height: 138px;
    background: url(../images/tv.jpg) no-repeat center/cover;
    border-radius: 5px;
}
/* 스크린 */
.screen{
    position: absolute;
    top: 14px;
    left: 7px;
    width: 133px;
    height: 100px;
    border-radius: 15px;
    background-color: #000;
    /* 자식요소 아이프레임 넘치는 부분 숨기기 */
    overflow: hidden;
}
/* 동영상 iframe */
.screen iframe{
    position: absolute;
    top: 0px;
    left: -19px;
    width: 174px;
    height: 100px;
    /* 아이프레임 기본 보더 없앰 */
    border: none;
}

/******************************* 2-2.로봇 설명 박스 *******************************/
.dcbx{
    /* 최대 가로크기 */
    max-width: 800px;
    /* 마영오 */
    margin: 0 auto;
    /* 하단 공간 */
    margin-bottom: 200px;
    /* 반투명 배경색 */
    background-color: rgba(0, 0, 0, 0.5);
    /* 글자색 */
    color: #fff;
    /* 글자에 검정그림자를 주면 더 잘보임 */
    text-shadow: 1px 1px 1px #000;
    /* 패딩(안쪽여백) */
    padding: 15px 30px;
    /* 경계선 : 두종색 */
    border: 3px solid #fff;
    /* 둥근모서리 */
    border-radius: 20px;
    /* 박스 그림자를 이용한 글로우효과 */
    box-shadow:
    inset 0 0 20px blue,
    inset 0 0 50px 10px cyan;
    /* inset은 내부그림자 옵션임
        그림자 : x y blur (spread) 색
        -spread는 박스 그림자 크기
    */
}

/* 2-2-1.제목 */
.dcbx h2{
    /* 스티키 포지션! (화면에 걸려주세요~) */
    position: sticky;
    top: 10px;

    /* 글자설정 */
    font-family: 'Chakra Petch', sans-serif;
    font-size: 35px;
    color: lime;

    /* 박스셋팅 */
    text-align: center;
    background-color: rgba(255, 255, 255, 0.5);
    /* 둥근모서리 */
    border-radius: 20px;
}

/* 2-2-2.출처 */
.dcbx small{
    /* 글자 설정 */
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12px;
    line-height: 3;
    color: #ff0;

    /* 박스 설정 */
    display: block;
    text-align: center;
    /* 스몰태그는 인라인요소라서, 그냥 tac를 입력하면 적용 안됨! -> 박스요소로 만들어줘야함! -> db씀 */
}

/* 2-2-3.내용단락 */
.dcbx p{
    /* 글자 설정 */
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    letter-spacing: 1px;
    word-spacing: 2px;

    /********************************************************
        [ 다단 설정하기 ]
    -다중 열 속성
    -> column-count : 다중열 개수
    -> column-rule : 다중열 구분선
    -> column-gap : 다중열 사이간격
    ********************************************************/

    /* 다중열개수 */
    column-count: 3;
    /* 다중열 구분선: 셋팅이 보더와 유사함 */
    column-rule: 5px dotted lightgreen;
    /* column-rule: 두께 종류 색상; */

    /* 다중열 사이간격 */
    column-gap: 55px;

    /* 글자 양쪽정렬 - taj */
    text-align: justify;
    /* 근데 이렇게하면 단어별로 나뉘기때문에, 오른쪽 끝에 긴 단어가 오면 통쨰로 아랫줄로 내려가는 현상 발생 (구멍 커짐) =>단어 깨는 방법을 써야함! */
    /* 단어 깨기 - wbb*/
    word-break: break-all;
    /* 1byte문자인 영문자일 경우, 기본적으로 단어 단위로 줄바꿈을 하는 셋팅이 되어 있음
    이때 양쪽 정렬을 하면 중간에 큰 공백이 생기는 원인이 됨
    그래서 단어를 글자단위로 모두 깨주는 설정이 'word-break: break-all;'이다!
    (한글과 같은 2byte문자는 자동으로 깨져있음!) */
    
    /* 들여쓰기 -ti */
    text-indent: 20px;
}

/* 설명 문단 첫번째 글자만 가상요소로 글자 디자인 변경하기 */
.dcbx p::first-letter{
    /* 글자 셋팅 */
    font-size: 30px;
    font-weight: bold;
    color: orange;
}


/************************** 3.하단영역 *******************************/

#info{
    /* 글자 셋팅 */
    color: #fff;
    font: 30px 'Black Ops One';
    text-shadow: 2px 2px 2px #000;

    /* 박스 셋팅 */
    background-color: rgba(0, 0, 0, 0.5);
    text-align: center;
    padding: 50px;
}

/* 속박스 가상요소로 아이콘 모양 넣기 */
.info::before{
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ccc;

    /* 배경 넣기 */
    background: pink url(../images/robot_03.png) no-repeat;
    background-position: -7px 1px;
    background-size: 50px;
    
    /* 인라인요소간 세로 정렬 - va */
    vertical-align: top;
}