/* ==========================================================================
   METIVATOR — main stylesheet
   reset + globals + layout + header + footer
   pie3d styled-components → 정적 CSS 변환 (Phase 1)
   ========================================================================== */

/* === Reset (eric meyer) ================================================= */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, figure, figcaption,
footer, header, hgroup, menu, nav, output, ruby, section,
summary, time, mark, audio, video {
    margin: 0; padding: 0; border: 0;
    font-size: 100%; font: inherit; vertical-align: baseline;
}
article, aside, details, figcaption, figure, footer, header,
hgroup, menu, nav, section { display: block; }
body { line-height: 1; }
ol, ul { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
button {
    background: none; border: none; box-shadow: none;
    border-radius: 0; padding: 0; overflow: visible; cursor: pointer;
}
input, textarea { outline: none; }
input, textarea, button {
    appearance: none; -moz-appearance: none; -webkit-appearance: none;
    border-radius: 0;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none; appearance: none;
}

/* === Fonts =============================================================== */
@import url("https://static.pie3d.com/fonts/SUIT/SUIT.css");

/* === Tokens =============================================================
   디자인 토큰은 design-system.css에 정의 (base.html에서 먼저 로드).
   여기서는 main.css 전용 보조 변수만 정의.
   ======================================================================== */

/* === Globals ============================================================= */
* {
    box-sizing: border-box;
    text-size-adjust: none;
}
::selection {
    background-color: rgba(242, 234, 246, 0.7);
}
html, body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family), sans-serif;
}
a {
    color: inherit;
    text-decoration: none;
    outline: none;
}
a:hover, a:active {
    text-decoration: none;
    color: inherit;
    opacity: 0.8;
}
input, textarea, button {
    font-family: var(--font-family), sans-serif;
    color: var(--color-text);
}
hr {
    margin: 0;
    height: 0.5px;
    background-color: #707070;
    opacity: 0.5;
    border-width: 0;
}

/* === Logo (텍스트 임시 — 검정 로고 파일 확보 전) ====================== */
.logo-text {
    font-family: var(--font-family), "Apple SD Gothic Neo", sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #000000;
    text-decoration: none;
    line-height: 1;
    user-select: none;
}
.logo-text--header { font-size: 22px; }
.logo-text--auth   { font-size: 28px; }
.logo-text--footer { font-size: 13px; color: #303030; }

/* === Layout ============================================================== */
.layout-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.layout-main {
    margin-top: 0;
    width: 100%;
    margin-bottom: auto;
}

/* === Header ============================================================== */
.header {
    background-color: var(--color-bg);
    display: flex;
    width: 100%;
    height: 56px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-line);
}
@media screen and (max-width: 390px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 80;
        border-top: 1px solid var(--color-line);
    }
}
.header__logo {
    margin: 12px 33px;
    display: flex;
    align-items: center;
}
.header__logo img {
    height: 44px;
    width: auto;
}
.header__navigator {
    height: 100%;
    border-left: 1px solid var(--color-line);
    display: flex;
    align-items: center;
}
@media screen and (max-width: 890px) {
    .header__navigator { border-left: 0; }
}
.header__menu {
    background-color: var(--color-bg);
    display: flex;
    width: 580px;
    align-items: center;
    gap: 38px;
    padding-left: 26px;
}
@media screen and (max-width: 948px) {
    .header__menu { width: fit-content; margin-right: 30px; padding-left: 16px; gap: 24px; }
}
.header__menu-item {
    padding: 7px 9px;
    cursor: pointer;
}
.header__menu-item:hover { text-decoration: underline; }
.header__menu-item--bordered {
    border: 1px solid var(--color-line);
    border-radius: 2px;
}
.header__personal {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    border-left: 1px solid var(--color-line);
}
.header__personal-item {
    padding: 0 37px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.header__personal-item:hover { text-decoration: underline; }
.header__signup {
    display: flex;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: var(--color-button);
    padding: 0 29px;
    cursor: pointer;
}
.header__signup:hover { text-decoration: underline; }
.header__mobile-sign {
    background-color: var(--color-button);
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 28px;
    border-left: 1px solid var(--color-line);
    cursor: pointer;
}
.header__mobile-sign:hover { text-decoration: underline; }
.header__menu-mobile {
    background-color: var(--color-bg);
    display: flex;
    width: 100%;
    justify-content: space-around;
    padding: 11px 0;
    border-bottom: 1px solid var(--color-line);
}
@media screen and (min-width: 786px) {
    .header__menu-mobile { display: none; }
    .header__mobile-sign { display: none; }
}
@media screen and (max-width: 785px) {
    .header__menu-desktop { display: none; }
    .header__personal-desktop { display: none; }
}

/* === Header Profile dropdown (원본 pie3d ProfileMenu 동일 사양) ========= */
.header__profile {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}
.header__profile-trigger {
    list-style: none;
    cursor: pointer;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    border-left: 1px solid var(--color-line);
    user-select: none;
    font-size: 14px;
    color: var(--color-text);
}
.header__profile-trigger::-webkit-details-marker { display: none; }
.header__profile-trigger::marker { content: ""; }
.header__profile[open] .header__profile-trigger { background: #eeeeee; }

@keyframes header-profile-slide {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.header__profile-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 5px;
    left: auto;
    width: 120px;
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 3px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    animation: header-profile-slide 0.25s ease-out;
}
.header__profile-item {
    display: block;
    width: 100%;
    padding: 12px 0;
    text-align: center;
    font-size: 13px;
    font-weight: 400;
    color: #000000;
    border: 0;
    border-bottom: 1px solid #000000;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
}
.header__profile-item:first-child { border-radius: 3px 3px 0 0; }
.header__profile-item:last-child {
    border-bottom: 0;
    border-radius: 0 0 3px 3px;
}
.header__profile-item:hover {
    background: #eeeeee;
    font-weight: 500;
    color: #000000;
    opacity: 1;
}
.header__profile-form {
    margin: 0;
    padding: 0;
    width: 100%;
}
.header__profile-form .header__profile-item { width: 100%; }

/* === Footer ============================================================== */
.footer {
    background-color: var(--color-footer);
    color: var(--color-text);
    width: 100%;
    text-align: left;
}
.footer__inner {
    background-color: var(--color-footer);
    width: 100%;
}
.footer__content {
    display: flex;
    gap: 196px;
    padding: 20px 103px;
    height: 283px;
    border-bottom: 1px solid var(--color-line);
}
@media screen and (max-width: 820px) {
    .footer__content { gap: 40px; padding: 20px 36px; }
}
.footer__col-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 19px;
    margin-bottom: 35px;
}
.footer__col-item {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 15px;
    margin-bottom: 12px;
    cursor: pointer;
}
.footer__col-item:hover { text-decoration: underline; }
.footer__info {
    display: flex;
    gap: 50px;
    padding: 20px 103px;
    border-bottom: 1px solid var(--color-line);
}
@media screen and (max-width: 820px) {
    .footer__info { gap: 50px; padding: 20px 36px; }
}
.footer__info-item {
    font-size: 12px;
    font-weight: 400;
    line-height: 15px;
    margin: 4px 0;
}
.footer__copyright {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 17px 0;
    border-bottom: 1px solid var(--color-line);
}
.footer__logo img {
    height: 14.6px;
    width: auto;
}

/* === Simple text page (legal: terms · privacy · refund) ================= */
/* 원본 pie3d Wrapper(1200px max·padding 0) + Margin 30 + Text.H7 + Text.Caption2 + Margin 100 */
.simple-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
.simple-page__title {
    /* Text.H7 */
    font-weight: 500;
    font-size: 20px;
    letter-spacing: 0.15px;
    line-height: normal;
    margin: 30px 0 32px;
}
.simple-page__body {
    /* Text.Caption2 */
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0;
    line-height: normal;
    color: var(--color-text);
    padding-bottom: 100px;
}

/* === 404 ================================================================ */
.notfound {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 24px;
    text-align: center;
}
.notfound__title {
    /* Text.H3 color="red90" */
    font-size: 31px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: normal;
    color: #ff6600;
    margin: 0 0 23px;
}
.notfound__face {
    /* Text.H3 color="light" */
    font-size: 31px;
    font-weight: 500;
    line-height: normal;
    color: #ffffff;
    margin: 0 0 84px;
}
.notfound__msg {
    /* Text.H7 color="light" */
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.15px;
    line-height: normal;
    color: #ffffff;
    margin: 0 0 78px;
}
.notfound__buttons {
    display: flex;
    gap: 13px;
    justify-content: center;
    align-items: center;
}
.notfound__btn {
    /* Button thema="light" */
    min-width: 117px;
    height: 32px;
    padding: 7px 25px;
    border-radius: 4px;
    background-color: #fafafa;
    border: 1px solid #d3d3d3;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.15s;
}
.notfound__btn:hover { opacity: 0.7; color: #000000; }
