/* JDS Partners 디자인 시스템을 정의하는 핵심 CSS 스타일시트 */

:root {
    /* Brand & Accents */
    --primary: #0066cc; /* Action Blue */
    --primary-focus: #0071e3;
    --primary-on-dark: #2997ff; /* Sky Link Blue */
    
    /* Surfaces */
    --canvas: #ffffff;
    --canvas-parchment: #f5f5f7; /* Parchment */
    --surface-pearl: #fafafc;
    --surface-tile-1: #272729; /* Near-Black Tile 1 */
    --surface-tile-2: #2a2a2c; /* Near-Black Tile 2 */
    --surface-tile-3: #252527; /* Near-Black Tile 3 */
    --surface-black: #000000;
    
    /* Typography Ink */
    --ink: #1d1d1f; /* Near-Black Ink */
    --ink-muted-80: #333333;
    --ink-muted-48: #7a7a7a;
    
    /* Borders & Hairlines */
    --hairline: #e0e0e0;
    --divider-soft: #f0f0f0;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-micro: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Font Settings */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html { 
    font-size: 16px; 
    background-color: var(--canvas);
}

body {
    color: var(--ink);
    background-color: var(--canvas);
    overflow-x: hidden;
    font-size: 1.0625rem; /* 17px, Apple Editorial Reading Pace */
    line-height: 1.47;
    letter-spacing: -0.022em;
}

@media (max-width: 768px) {
    html { font-size: 15px; }
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: var(--transition-micro);
}

ul { list-style: none; }

/* Focus Ring */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--primary-focus);
    outline-offset: 2px;
}

/* Skip Navigation */
#skip_nav { 
    position: absolute; 
    top: -100px; 
    left: 0; 
    z-index: 9999; 
}
#skip_nav a { 
    display: block; 
    height: 1px; 
    width: 1px; 
    overflow: hidden; 
}
#skip_nav a:focus { 
    top: 0; 
    width: auto; 
    height: auto; 
    background: #000; 
    color: #fff; 
    padding: 12px 24px; 
    border-radius: 8px;
}

/* Standard Container */
.container { 
    width: 100%;
    max-width: 1440px; /* Locked maximum width */
    margin: 0 auto; 
    padding: 0 48px;
    position: relative;
}

@media (max-width: 1024px) {
    .container { padding: 0 32px; }
}

@media (max-width: 768px) {
    .container { padding: 0 24px; }
}

/* Header UI (Receding Chrome) */
#boxTop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 64px; /* Slim Apple Header style */
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#boxTop.scrolled {
    background: rgba(0, 0, 0, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.header_inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative; /* 모바일 다국어 absolute 배치 기준 확보 */
}

.boxLogo .logo img {
    height: 38px !important;
    width: auto !important;
    transition: var(--transition-smooth);
    display: block;
}

/* Scrolled Header Logo Swapping */
#boxTop.scrolled .logo_white { display: block !important; }
#boxTop.scrolled .logo_black { display: none !important; }
#boxTop:not(.scrolled) .logo_black { display: none !important; }
#boxTop:not(.scrolled) .logo_white { display: block !important; }

/* Global Navigation Links */
.boxMenu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.boxMenu .mn {
    font-size: 18px; /* 기존 13px에서 5px 크게 업그레이드 */
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-micro);
    letter-spacing: -0.01em;
}

.boxMenu .mn.active {
    color: #FFEA6C !important;
    font-weight: 700;
}

#boxTop.scrolled .boxMenu .mn {
    color: rgba(255, 255, 255, 0.8);
}

#boxTop.scrolled .boxMenu .mn.active {
    color: #FFEA6C !important;
    font-weight: 700;
}

.boxMenu .mn:hover { 
    color: var(--primary-on-dark); 
}

#boxTop.scrolled .boxMenu .mn:hover { 
    color: var(--primary-on-dark); 
}

/* PC Language Switcher (ENGLISH / 中文) */
.boxMenu .lang_switcher {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

#boxTop.scrolled .boxMenu .lang_switcher {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.boxMenu .lang_switcher .lang_lnk {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.05em;
    transition: var(--transition-micro);
}

#boxTop.scrolled .boxMenu .lang_switcher .lang_lnk {
    color: rgba(255, 255, 255, 0.6);
}

.boxMenu .lang_switcher .lang_lnk:hover {
    color: var(--primary-on-dark);
}

#boxTop.scrolled .boxMenu .lang_switcher .lang_lnk:hover {
    color: var(--primary-on-dark);
}

/* Mobile Language Flags basic hidden state for PC */
.mobile_lang,
.mobile_lang_links {
    display: none;
}

/* Mobile Hamburger Menu Trigger */
.btn_hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
}

.btn_hamburger span {
    width: 22px;
    height: 1.5px;
    background: #ffffff;
    transition: var(--transition-smooth);
}

#boxTop.scrolled .btn_hamburger span {
    background: #ffffff;
}

.btn_hamburger.active span { background: #ffffff !important; }
.btn_hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.btn_hamburger.active span:nth-child(2) { opacity: 0; }
.btn_hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Section Typographic System */
section { 
    padding: 80px 0; /* Standard Section Padding */
    position: relative;
}

.section_title_wrap { 
    margin-bottom: 64px; 
    text-align: center; 
}

.section_title_wrap .sub { 
    font-size: 14px; 
    font-weight: 600; 
    color: var(--primary); 
    text-transform: uppercase; 
    letter-spacing: 0.08em; 
    margin-bottom: 12px; 
    display: block; 
}

/* Apple Display Tight Headline */
.section_title_wrap .main { 
    font-size: 40px; 
    font-weight: 600; 
    color: var(--ink); 
    line-height: 1.1; 
    letter-spacing: -0.03em; /* Tight Tracking */
}

.section_title_wrap p { 
    font-size: 20px; 
    color: var(--ink-muted-80); 
    margin-top: 16px; 
    font-weight: 400; 
    line-height: 1.47;
}

/* Light/Dark Section Variations */
.section-dark {
    background-color: var(--surface-tile-1);
    color: var(--canvas);
}

.section-dark .section_title_wrap .main {
    color: var(--canvas);
}

.section-dark .section_title_wrap .sub {
    color: var(--primary-on-dark);
}

.section-dark .section_title_wrap p {
    color: #cccccc;
}

@media (max-width: 1024px) {
    section { padding: 64px 0; }
    .section_title_wrap .main { font-size: 34px; }
    .section_title_wrap p { font-size: 18px; }
}

@media (max-width: 768px) {
    section { padding: 48px 0; }
    .section_title_wrap { margin-bottom: 40px; }
    .section_title_wrap .main { font-size: 28px; }
    .section_title_wrap p { font-size: 16px; }
}

/* Apple Store Utility Grid Cards */
.store-card {
    background-color: var(--canvas);
    border: 1px solid var(--divider-soft);
    border-radius: 18px; /* rounded.lg */
    padding: 24px;
    transition: var(--transition-smooth);
}

.store-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

/* Micro-Interaction Button Scale Transform */
.btn-apple-primary {
    background-color: var(--primary);
    color: var(--canvas);
    padding: 11px 22px;
    border-radius: 9999px; /* rounded.pill */
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-micro);
}

.btn-apple-primary:active {
    transform: scale(0.95);
}

.btn-apple-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 11px 22px;
    border-radius: 9999px; /* rounded.pill */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-micro);
}

.btn-apple-secondary:active {
    transform: scale(0.95);
}

/* Premium Footer */
footer {
    background-color: var(--surface-tile-1); /* Near-Black Tile */
    color: #eeeeee;
    padding: 64px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer .footer_inner {
    max-width: 980px;
    margin: 0 auto;
}

footer .footer_logo {
    margin-bottom: 32px;
}

footer .footer_logo img {
    height: 38px !important; /* 상단 헤더 로고와 동일 크기 */
    width: auto !important;
    transition: var(--transition-micro);
}

footer .footer_info {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 48px;
    padding-bottom: 32px;
}

/* caption-strong: 14px / 600 */
footer h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.29;
    letter-spacing: -0.224px;
    margin-bottom: 8px;
}

/* dense-link base, tightened spacing */
footer p {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.47;
    letter-spacing: 0;
    color: #eeeeee;
}

/* fine-print: 12px / 400 */
footer .copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.12px;
    color: #999999;
}

/* Sub Pages Hero */
.sub_hero {
    height: 320px;
    background-color: var(--surface-black);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--canvas);
    position: relative;
    padding-top: 0;
}

.sub_hero h2 {
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.sub_hero p {
    font-size: 17px;
    color: #ffffff;
    opacity: 0.85;
}

@media (max-width: 1024px) {
    .boxMenu { display: none !important; }
    .mobile_lang {
        position: absolute;
        right: 50px; /* 햄버거 버튼 바로 왼쪽에 붙어서 출력되게 50px 지정 (10px 우측 이동) */
        top: 50%;
        transform: translateY(-50%);
        display: flex !important;
        align-items: center;
        margin-right: 0;
    }
    /* 이중 화살표 방지를 위해 화살표 레이어를 부모의 ::after 의사요소로 격리 */
    .mobile_lang::after {
        content: "";
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: contain !important;
        pointer-events: none; /* 터치 이벤트를 하단 select에 패스 */
        transition: var(--transition-micro);
        /* 흰색 화살표 SVG */
        background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") !important;
        z-index: 2;
    }
    
    #boxTop.scrolled .mobile_lang::after {
        /* 검은색(#1d1d1f) 화살표 SVG */
        background-image: url("data:image/svg+xml;utf8,<svg fill='%231d1d1f' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") !important;
    }

    .mobile_lang .lang_select {
        display: block;
        font-size: 13px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9);
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 6px;
        padding: 4px 24px 4px 10px; /* 우측 화살표 공간 24px 확보 */
        outline: none;
        cursor: pointer;
        transition: var(--transition-micro);
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        background-image: none !important; /* select 자체의 background-image는 완전히 제거하여 이중 출력 버그 원천 박멸 */
        z-index: 1;
        position: relative;
    }
    
    #boxTop.scrolled .mobile_lang .lang_select {
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        color: var(--ink);
        background: rgba(0, 0, 0, 0.05) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        background-image: none !important; /* scrolled 상태에서도 select 화살표 소거 강제화 */
    }

    .mobile_lang .lang_select option {
        color: var(--ink);
        background: #ffffff;
    }

    .mobile_lang_links {
        position: absolute;
        right: 50px;
        top: 50%;
        transform: translateY(-50%);
        display: flex !important;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.7);
        white-space: nowrap;
    }
    
    .mobile_lang_links .m_lang_lnk {
        transition: var(--transition-micro);
        color: rgba(255, 255, 255, 0.7);
    }
    
    #boxTop.scrolled .mobile_lang_links .m_lang_lnk {
        color: rgba(255, 255, 255, 0.7);
    }
    
    .mobile_lang_links .m_lang_lnk:hover {
        color: var(--primary-on-dark);
    }
    
    #boxTop.scrolled .mobile_lang_links .m_lang_lnk:hover {
        color: var(--primary-on-dark);
    }
    
    .mobile_lang_links .m_lang_divider {
        opacity: 0.3;
        font-size: 10px;
        color: rgba(255, 255, 255, 0.7);
    }

    .btn_hamburger { display: flex !important; }
    .boxLogo .logo img { height: 32px !important; }
    .sub_hero h2 { font-size: 32px; }
    .sub_hero { height: 240px; }
    footer .footer_info { grid-template-columns: 1fr; gap: 32px; }
}

/* Non-main page content offset to prevent fixed navbar overlapping */
body:not(.main-page) #wrapper {
    padding-top: 64px;
}

/* 기존 sub_nav 내비게이션 숨김 (새 프리미엄 브래드크럼으로 대체) */
.sub_nav .navigation {
    display: none !important;
}

/* Premium Breadcrumb Styles */
.premium_breadcrumb {
    transition: all 0.5s ease;
}
.premium_breadcrumb a:hover {
    color: #0066cc;
}

/* 서브 탭 메뉴 하단 여백 및 본문 상단 여백 대폭 축소 (배너-컨텐츠 간격 40px 극치 실현) */
.sub_nav {
    margin-bottom: 20px !important;
}

.sub_content {
    margin-top: 20px !important;
}

@media (max-width: 768px) {
    .sub_nav {
        margin-top: 0 !important;
        margin-bottom: 20px !important;
    }
    .sub_content {
        margin-top: 20px !important;
    }
}


