@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 디자인 토큰 — Figma 1029_EniConnect 로컬 스타일 */
:root {
    --c-primary: #001735;
    --c-sub: #c59a31;
    --c-n1: #ffffff;
    --c-n2: #ebebeb;
    --c-n3: #cccccc;
    --c-n4: #999999;
    --c-n6: #525252;
    --c-n7: #333333;
    --c-n9: #0a0a0a;
    --c-bg2: #f6f6f6;

    --site-topbar-height: 35px;
    --site-header-height: 80px;
}

html.top-bnr-closed {
    --site-topbar-height: 0px;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: calc(var(--site-topbar-height) + var(--site-header-height));
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--c-n9);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* 메인: 비주얼이 헤더 아래로 깔린다 (상단 배너 높이만 비운다) */
body.is-home {
    padding-top: var(--site-topbar-height);
}

/* Page enter fade — hide until images (or timeout) then reveal */
html.page-loading body {
    opacity: 0;
}

html.page-ready body {
    opacity: 1;
    transition: opacity 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
    html.page-loading body,
    html.page-ready body {
        opacity: 1;
        transition: none;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

button {
    font: inherit;
}

img {
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

/* 디자인 기준 컨텐츠 폭 1600 */
.inner {
    width: 100%;
    max-width: 1632px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* —— 로고 (심볼 + 글자, Figma 비율 그대로) —— */
.logo {
    position: relative;
    display: block;
    width: 187px;
    height: 30px;
    flex-shrink: 0;
}

.logo-symbol,
.logo-text {
    position: absolute;
    display: block;
    max-width: none;
}

.logo-symbol {
    top: 0;
    left: 0;
    width: 26.52%;
    height: 100%;
}

.logo-text {
    top: 12.8%;
    left: 31.03%;
    width: 68.97%;
    height: 74.4%;
}

/* —— Header —— */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: top 0.6s ease;
}

.site-header.is-hidden {
    top: -200px;
}

.top-bnr {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--site-topbar-height);
    padding: 0 60px;
    overflow: hidden;
    background-color: var(--c-primary);
}

html.top-bnr-closed .top-bnr {
    display: none;
}

.top-bnr-text {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-bnr-close {
    position: absolute;
    top: 50%;
    right: 46px;
    display: flex;
    padding: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.top-bnr-close img {
    display: block;
    width: 14px;
    height: 14px;
}

.site-nav {
    height: var(--site-header-height);
    border-bottom: 1px solid var(--c-n2);
    background-color: #ffffff;
    color: var(--c-n9);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.site-nav-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-logo {
    display: block;
}

.site-logo .logo--light,
.lang-caret--light {
    display: none;
}

/* 메인 최상단: 투명 헤더 */
body.is-home .site-header:not(.is-scrolled) .site-nav {
    border-bottom-color: transparent;
    background-color: transparent;
    color: #ffffff;
}

body.is-home .site-header:not(.is-scrolled) .logo--light,
body.is-home .site-header:not(.is-scrolled) .lang-caret--light {
    display: block;
}

body.is-home .site-header:not(.is-scrolled) .logo--dark,
body.is-home .site-header:not(.is-scrolled) .lang-caret--dark {
    display: none;
}

.nav-toggle,
.nav-backdrop,
.nav-menu-top,
.nav-close,
.mo-lang,
.nav-menu-cta {
    display: none;
}

.nav-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 38px;
}

.nav-link {
    display: block;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.nav-link:hover {
    color: var(--c-sub);
}

.gnb-util {
    display: flex;
    align-items: center;
    gap: 24px;
}

.lang {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    cursor: default;
}

.lang.has-list .lang-current {
    cursor: pointer;
}

.lang-caret {
    width: 14px;
    height: 14px;
    transform: rotate(90deg);
}

.lang-list {
    position: absolute;
    top: 100%;
    left: 50%;
    display: none;
    min-width: 110px;
    padding: 8px;
    border: 1px solid var(--c-n2);
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateX(-50%);
}

.lang.has-list:hover .lang-list,
.lang.has-list:focus-within .lang-list,
.lang.has-list.is-open .lang-list {
    display: block;
}

.lang-link {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-n9);
    white-space: nowrap;
}

.lang-link:hover,
.lang-link.is-active {
    background-color: var(--c-bg2);
}

.gnb-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 99px;
    background-color: var(--c-sub);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: #ffffff;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.gnb-cta:hover {
    opacity: 0.88;
}

.site-main {
    flex: 1 0 auto;
}

/* —— Footer —— */
.site-footer {
    margin-top: auto;
    background-color: var(--c-primary);
    color: var(--c-n3);
}

.site-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 792px;
    grid-template-areas:
        "brand cols"
        "copy biz";
    row-gap: 38px;
    padding-top: 69px;
    padding-bottom: 60px;
}

.footer-brand {
    grid-area: brand;
}

.footer-logo {
    width: 224px;
    height: 36px;
}

.footer-tagline {
    margin: 20px 0 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--c-n3);
}

.footer-cols {
    grid-area: cols;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding-top: 8px;
}

.footer-col {
    display: flex;
    flex: 0 0 289px;
    flex-direction: column;
    gap: 12px;
}

.footer-col--cs {
    gap: 10px;
}

.footer-col:last-child {
    flex: 0 1 auto;
}

.footer-col-title {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    text-transform: uppercase;
}

.footer-cs-contact {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
}

.footer-col-text {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--c-n3);
}

.footer-col-text a:hover {
    color: #ffffff;
}

.footer-copy {
    grid-area: copy;
    margin: 0;
    font-size: 10px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--c-n3);
}

.footer-biz {
    grid-area: biz;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--c-n3);
}

.footer-biz > div {
    display: flex;
    gap: 4px;
}

.footer-biz dt,
.footer-biz dd {
    margin: 0;
}

/* —— 우측 고정 버튼 —— */
.fixed-menu {
    position: fixed;
    right: 50px;
    bottom: 50px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fixed-menu-btn {
    display: block;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.fixed-menu-btn img {
    display: block;
    width: 46px;
    height: 46px;
}

/* —— 공용 버튼 (다른 페이지) —— */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
    border: 0;
    background-color: var(--c-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0b2a52;
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 4px #d1d5db;
}

.btn-secondary {
    border: 1px solid var(--c-n3);
    background-color: #ffffff;
    color: var(--c-n9);
}

.btn-secondary:hover {
    background-color: var(--c-bg2);
}

.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--c-bg2);
}

/* —— 1279 이하: 푸터 세로 배치 —— */
@media all and (max-width: 1279px) {
    .site-footer-inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "brand"
            "cols"
            "biz"
            "copy";
        row-gap: 32px;
    }

    .footer-cols {
        padding-top: 0;
    }

    .footer-biz {
        max-width: 901px;
    }
}

/* —— 1023 이하: 모바일 헤더 + 드로어 메뉴 —— */
@media all and (max-width: 1023px) {
    :root {
        --site-topbar-height: 30px;
        --site-header-height: 60px;
    }

    .top-bnr {
        padding: 0 40px;
    }

    .top-bnr-close {
        right: 10px;
    }

    .site-logo .logo {
        width: 137px;
        height: 22px;
    }

    .gnb-util {
        display: none;
    }

    /* 모바일 언어 선택 (지구본) — 메뉴 버튼 왼쪽 */
    .mo-lang {
        position: relative;
        display: block;
        margin-left: auto;
        margin-right: 8px;
    }

    .mo-lang-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .mo-lang-btn img {
        display: block;
        width: 24px;
        height: 24px;
        filter: brightness(0);
    }

    body.is-home .site-header:not(.is-scrolled) .mo-lang-btn img {
        filter: none;
    }

    .mo-lang-list {
        position: absolute;
        top: calc(100% + 8px);
        right: -8px;
        display: none;
        min-width: 110px;
        padding: 8px;
        border: 1px solid var(--c-n2);
        border-radius: 10px;
        background-color: #ffffff;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

    .mo-lang.is-open .mo-lang-list {
        display: block;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        margin-right: -7px;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .nav-toggle img {
        display: block;
        width: 24px;
        height: 24px;
        filter: brightness(0);
    }

    body.is-home .site-header:not(.is-scrolled) .nav-toggle img {
        filter: none;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 110;
        background-color: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.28s ease, visibility 0.28s ease;
    }

    .nav-backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: auto;
        right: 0;
        bottom: 0;
        z-index: 120;
        display: flex;
        flex-direction: column;
        width: min(82vw, 320px);
        padding: 0 0 24px;
        background-color: #ffffff;
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
        transform: translateX(105%);
        transition: transform 0.28s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        color: var(--c-n9);
    }

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

    .nav-menu-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        height: var(--site-header-height);
        padding: 0 16px;
        border-bottom: 1px solid var(--c-n2);
    }

    .nav-menu-title {
        font-size: 15px;
        font-weight: 700;
    }

    .nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--c-n6);
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }

    body.nav-open {
        overflow: hidden;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px;
    }

    .nav-link {
        padding: 14px 0;
        border-bottom: 1px solid var(--c-n2);
        font-size: 16px;
        font-weight: 600;
    }

    .nav-menu-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        margin: 24px 16px 0;
        border-radius: 99px;
        background-color: var(--c-sub);
        font-size: 15px;
        font-weight: 700;
        color: #ffffff;
    }

    /* 모바일 푸터 */
    .site-footer-inner {
        grid-template-areas:
            "brand"
            "cols"
            "biz"
            "copy";
        row-gap: 0;
        padding-top: 63px;
        padding-bottom: 60px;
    }

    .footer-logo {
        width: 149px;
        height: 24px;
    }

    .footer-tagline {
        margin-top: 20px;
        font-size: 11px;
    }

    .footer-cols {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 170px));
        gap: 40px 3px;
        margin-top: 60px;
    }

    .footer-col {
        gap: 6px;
    }

    .footer-col--cs {
        grid-column: 1 / -1;
        gap: 6px;
    }

    .footer-col-title {
        font-weight: 500;
    }

    .footer-col-text {
        font-size: 11px;
        font-weight: 300;
    }

    .footer-biz {
        gap: 2px 16px;
        margin-top: 40px;
        font-size: 11px;
        font-weight: 300;
    }

    .footer-copy {
        margin-top: 20px;
        font-size: 11px;
    }

    .fixed-menu {
        right: 16px;
        bottom: 16px;
        gap: 6px;
    }

    .fixed-menu-btn,
    .fixed-menu-btn img {
        width: 40px;
        height: 40px;
    }
}
