:root {
    --primary: #123f8c;
    --primary-dark: #09265b;
    --primary-soft: #eef5ff;
    --secondary: #2d69d7;

    --gold: #c9a45f;
    --gold-soft: #f7f0e3;

    --green: #27a073;
    --purple: #7958c8;
    --red: #e15562;

    --text: #17243a;
    --text-sub: #65738a;
    --text-light: #8a96a9;

    --background: #f7f9fd;
    --surface: #ffffff;
    --border: #e5eaf2;

    --shadow-small:
        0 8px 24px rgba(21, 54, 105, 0.07);

    --shadow-medium:
        0 18px 50px rgba(21, 54, 105, 0.11);

    --shadow-large:
        0 30px 80px rgba(17, 50, 105, 0.16);

    --radius-small: 12px;
    --radius-medium: 20px;
    --radius-large: 30px;

    --main-width: 1440px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);

    font-family:
        Pretendard,
        "Noto Sans KR",
        "Apple SD Gothic Neo",
        "Malgun Gothic",
        Arial,
        sans-serif;

    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
}

body,
button,
input,
select,
textarea {
    font-family: inherit;
}

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

button,
input,
select,
textarea {
    box-sizing: border-box;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

.main-container {
    width: min(calc(100% - 48px), var(--main-width));
    margin: 0 auto;
}

/* =========================
   공통 헤더
========================= */

.public-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    height: 82px;

    background:
        rgba(255, 255, 255, 0.94);

    border-bottom:
        1px solid rgba(222, 228, 239, 0.9);

    backdrop-filter: blur(18px);
}

.public-header__inner {
    width: min(calc(100% - 48px), var(--main-width));
    height: 100%;
    margin: 0 auto;

    display: flex;
    align-items: center;
}

.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;

    min-width: 275px;
}

.public-brand__mark {
    position: relative;

    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;

    width: 45px;
    height: 45px;
    padding: 9px;

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #3478df,
            #143e8b
        );

    box-shadow:
        0 11px 25px rgba(25, 73, 160, 0.25);
}

.brand-building {
    display: block;

    width: 7px;

    border-radius:
        2px 2px 1px 1px;

    background: #ffffff;
}

.brand-building--one {
    height: 12px;
    opacity: 0.8;
}

.brand-building--two {
    height: 23px;
}

.brand-building--three {
    height: 17px;
    opacity: 0.9;
}

.public-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.public-brand__text strong {
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.public-brand__text small {
    margin-top: 5px;

    color: #71809a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 46px;

    flex: 1;
}

.public-nav a {
    position: relative;

    padding: 30px 0;

    color: #45536a;
    font-size: 15px;
    font-weight: 700;
}

.public-nav a::after {
    content: "";

    position: absolute;
    right: 50%;
    bottom: 19px;
    left: 50%;

    height: 2px;

    background: var(--primary);

    transition:
        right 0.2s ease,
        left 0.2s ease;
}

.public-nav a:hover {
    color: var(--primary);
}

.public-nav a:hover::after {
    right: 0;
    left: 0;
}

.public-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    min-width: 275px;
}

.header-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 46px;
    padding: 0 22px;

    border-radius: 14px;

    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #174b9e,
            #0d3273
        );

    box-shadow:
        0 10px 24px rgba(23, 75, 158, 0.23);

    font-size: 14px;
    font-weight: 800;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.header-login-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 30px rgba(23, 75, 158, 0.3);
}

.header-login-button__icon {
    font-size: 15px;
}

.header-text-button {
    padding: 10px;

    color: var(--text-sub);
    font-size: 13px;
    font-weight: 700;
}

.mobile-menu-button {
    display: none;

    width: 44px;
    height: 44px;

    border: 0;
    border-radius: 12px;

    background: var(--primary-soft);
}

.mobile-menu-button span {
    display: block;

    width: 20px;
    height: 2px;
    margin: 4px auto;

    border-radius: 10px;

    background: var(--primary);
}

/* =========================
   플래시 메시지
========================= */

.global-flash-container {
    position: fixed;
    z-index: 2000;
    top: 98px;
    right: 24px;

    display: grid;
    gap: 10px;

    width: min(420px, calc(100% - 48px));
}

.global-flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    min-height: 54px;
    padding: 14px 17px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: #ffffff;
    box-shadow: var(--shadow-medium);

    font-size: 14px;
    font-weight: 700;
}

.global-flash--success {
    border-color: #bde7ce;
    color: #167b42;
}

.global-flash--danger {
    border-color: #f1c3c8;
    color: #b4323f;
}

.global-flash--warning {
    border-color: #f1d9a8;
    color: #96620d;
}

.global-flash--info {
    border-color: #bdd5f2;
    color: #225d9c;
}

.global-flash__close {
    padding: 0;

    border: 0;

    color: currentColor;
    background: transparent;

    font-size: 23px;
}

/* =========================
   공통 푸터
========================= */

.public-footer {
    border-top: 1px solid #e4e9f1;

    background: #ffffff;
}

.public-footer__inner {
    width: min(calc(100% - 48px), var(--main-width));
    margin: 0 auto;
    padding: 54px 0 38px;

    display: grid;
    grid-template-columns: 1.5fr 1fr auto;
    gap: 80px;
}

.public-brand--footer {
    min-width: 0;
}

.public-footer__brand > p {
    max-width: 510px;
    margin: 22px 0 0;

    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.8;
}

.public-footer__info strong {
    color: var(--text);
    font-size: 15px;
}

.public-footer__info p {
    margin: 10px 0 0;

    color: var(--text-sub);
    font-size: 13px;
}

.public-footer__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.public-footer__links a {
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 700;
}

.public-footer__links a:hover {
    color: var(--primary);
}

.public-footer__bottom {
    min-height: 60px;
    padding: 18px max(
        24px,
        calc((100% - var(--main-width)) / 2)
    );

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border-top: 1px solid #edf0f5;

    color: #8995a7;
    background: #fafbfd;

    font-size: 12px;
}

/* =========================
   반응형
========================= */

@media (max-width: 1100px) {
    .public-nav {
        gap: 24px;
    }

    .public-brand,
    .public-header__actions {
        min-width: auto;
    }
}

@media (max-width: 860px) {
    .public-header {
        height: 72px;
    }

    .public-nav {
        position: fixed;
        top: 72px;
        right: 0;
        left: 0;

        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;

        padding: 16px 24px 24px;

        border-bottom: 1px solid var(--border);

        background: #ffffff;
        box-shadow: var(--shadow-medium);
    }

    .public-nav.is-open {
        display: flex;
    }

    .public-nav a {
        padding: 14px 5px;

        border-bottom: 1px solid #edf0f5;
    }

    .public-nav a::after {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

    .header-login-button {
        min-height: 42px;
        padding: 0 15px;
    }

    .public-brand__text strong {
        font-size: 18px;
    }

    .public-brand__text small {
        font-size: 10px;
    }

    .public-brand__mark {
        width: 40px;
        height: 40px;
    }

    .public-footer__inner {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .public-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 580px) {
    .main-container,
    .public-header__inner,
    .public-footer__inner {
        width: min(calc(100% - 28px), var(--main-width));
    }

    .public-brand__text small {
        display: none;
    }

    .header-login-button__icon {
        display: none;
    }

    .header-text-button {
        display: none;
    }

    .global-flash-container {
        right: 14px;
        width: calc(100% - 28px);
    }
}
