/* ================================================================
   셀러테이블 Pro 사용자 가이드 - Luxury Premium Design v2.0
   Color: Deep Black + Warm Gold + Platinum
   ================================================================ */

/* ── 폰트 ──────────────────────────────────────────────────────── */
@font-face {
    font-family: 'Pretendard';
    src: url('../ttf/Pretendard-Regular.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('../ttf/Pretendard-Medium.ttf') format('truetype');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('../ttf/Pretendard-SemiBold.ttf') format('truetype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('../ttf/Pretendard-Bold.otf') format('opentype');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('../ttf/Pretendard-Bold.otf') format('opentype');
    font-weight: 800; font-style: normal; font-display: swap;
}

/* ── 변수 ──────────────────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --bg-void:      #020208;
    --bg-deep:      #04060f;
    --bg-card:      rgba(22, 30, 58, 0.90);
    --bg-sub:       rgba(4, 6, 14, 0.96);
    --bg-glass:     rgba(255, 255, 255, 0.03);

    /* Gold */
    --gold-bright:  #f0cc68;
    --gold-warm:    #e8b84a;
    --gold-main:    #c99038;
    --gold-dim:     #7a5c22;
    --gold-glow:    rgba(180, 140, 50, 0.16);
    --gold-glow-s:  rgba(200, 160, 60, 0.38);

    /* Text */
    --text-1:       #eef2fc;
    --text-plat:    #ccd6f0;
    --text-2:       #7888a8;
    --text-3:       #42506a;

    /* Borders */
    --border-gold:  rgba(175, 135, 48, 0.24);
    --border-ghov:  rgba(220, 172, 60, 0.48);
    --border-sub:   rgba(255, 255, 255, 0.055);

    /* Accent */
    --green:  #3dd68c;
    --red:    #f05050;
    --blue:   #4888f4;
}

/* ── 리셋 ──────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ── 바디 ──────────────────────────────────────────────────────── */
body {
    font-family: 'Pretendard', 'Apple Color Emoji', 'Segoe UI Emoji',
                 -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
    background: var(--bg-void);
    color: var(--text-1);
    line-height: 1.78;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── 섹션 카운터 ────────────────────────────────────────────────── */
main { counter-reset: section-num; }

/* ================================================================
   LAYER 0 — 3D 캔버스 배경
   ================================================================ */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.65;
}

/* ── 오로라 ─────────────────────────────────────────────────────── */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.aurora::before {
    content: '';
    position: absolute;
    width: 80vw; height: 70vh;
    top: -20vh; left: -15vw;
    border-radius: 50%;
    background: radial-gradient(ellipse,
        rgba(18, 14, 62, 0.55) 0%,
        rgba(10, 8, 40, 0.2) 50%,
        transparent 70%);
    filter: blur(60px);
    animation: auroraA 28s ease-in-out infinite alternate;
}
.aurora::after {
    content: '';
    position: absolute;
    width: 60vw; height: 80vh;
    bottom: -25vh; right: -10vw;
    border-radius: 50%;
    background: radial-gradient(ellipse,
        rgba(12, 28, 80, 0.45) 0%,
        rgba(8, 15, 50, 0.15) 50%,
        transparent 70%);
    filter: blur(70px);
    animation: auroraB 35s ease-in-out infinite alternate;
}
@keyframes auroraA {
    from { transform: translate(0,0) scale(1) rotate(0deg); }
    to   { transform: translate(4%,8%) scale(1.12) rotate(2deg); }
}
@keyframes auroraB {
    from { transform: translate(0,0) scale(1) rotate(0deg); }
    to   { transform: translate(-5%,-6%) scale(1.18) rotate(-2deg); }
}

/* ── 금빛 안개 ──────────────────────────────────────────────────── */
.gold-mist {
    position: fixed;
    width: 50vw; height: 50vw;
    top: 40%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(ellipse,
        rgba(140, 95, 18, 0.05) 0%,
        transparent 70%);
    pointer-events: none;
    z-index: 1;
    animation: goldPulse 18s ease-in-out infinite alternate;
}
@keyframes goldPulse {
    from { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    to   { opacity: 0.7; transform: translate(-50%, -50%) scale(1.25); }
}

/* ── 스크롤 진행 바 ─────────────────────────────────────────────── */
#progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg,
        var(--gold-dim) 0%,
        var(--gold-bright) 50%,
        var(--gold-dim) 100%);
    z-index: 10000;
    transition: width 0.12s linear;
    box-shadow: 0 0 10px rgba(200, 165, 60, 0.7),
                0 0 20px rgba(180, 140, 50, 0.3);
}

/* ================================================================
   HEADER — 로고 + 네비 한 줄
   ================================================================ */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0 2.5rem;
    height: 64px;
    background: rgba(3, 4, 12, 0.93);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-bottom: 1px solid var(--border-gold);
}
/* 하단 금 글로우 라인 */
.header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent, var(--gold-warm) 40%, var(--gold-bright) 50%,
        var(--gold-warm) 60%, transparent);
    pointer-events: none;
}

/* ── 로고 영역 ──────────────────────────────────────────────── */
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.logo-icon {
    font-size: 1.25rem;
    color: var(--gold-warm);
    filter: drop-shadow(0 0 8px rgba(230, 185, 70, 0.55));
    line-height: 1;
}
.header-text { display: flex; flex-direction: column; gap: 0; }
.header h1 {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    background: linear-gradient(135deg,
        var(--gold-warm) 0%, var(--gold-bright) 50%, var(--gold-main) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header p {
    font-size: 0.72rem;
    color: var(--text-2);
    letter-spacing: 0.01em;
    line-height: 1.3;
    white-space: nowrap;
}

/* ================================================================
   NAVIGATION — 헤더 안 우측
   ================================================================ */
.nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}
.nav-item {
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-2);
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-item:hover {
    color: var(--gold-bright);
    border-color: var(--border-gold);
    background: rgba(175, 135, 48, 0.08);
}
.nav-item.active {
    color: var(--bg-void);
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-main), var(--gold-bright));
    border-color: transparent;
    box-shadow: 0 4px 18px var(--gold-glow-s);
}

/* ================================================================
   MAIN WRAPPER
   ================================================================ */
.main {
    position: relative;
    z-index: 2;
    max-width: 1080px;
    margin: 64px auto 0;
    padding: 3rem 2rem 7rem;
}

/* ================================================================
   SECTION
   ================================================================ */
.section {
    position: relative;
    margin: 5rem 0;
    border-radius: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    overflow: hidden;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 0 0 0.5px rgba(255, 255, 255, 0.04) inset,
        0 40px 100px rgba(0, 0, 0, 0.75),
        0 0 50px var(--gold-glow);
    scroll-margin-top: 80px;
    counter-increment: section-num;
}
.section:first-of-type { margin-top: 0; }

/* 상단 금 테두리 */
.section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%, var(--gold-dim) 20%,
        var(--gold-bright) 50%,
        var(--gold-dim) 80%, transparent 100%);
    z-index: 5;
}
/* 섹션 번호 워터마크 */
.section::after {
    content: counter(section-num, decimal-leading-zero);
    position: absolute;
    top: 1.2rem; right: 2.2rem;
    font-size: 7.5rem;
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
    color: rgba(175, 135, 45, 0.05);
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

/* ── 섹션 헤더 ──────────────────────────────────────────────────── */
.section-header {
    position: relative;
    padding: 3rem 3rem 2rem;
    text-align: center;
    z-index: 1;
}
.section-header::after {
    content: '';
    display: block;
    width: 56px; height: 1px;
    margin: 1.5rem auto 0;
    background: linear-gradient(90deg,
        transparent, var(--gold-warm), transparent);
}
.section-header h2 {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.18;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg,
        var(--gold-warm) 0%, var(--gold-bright) 40%, var(--gold-main) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-header h2 .emoji {
    -webkit-text-fill-color: initial !important;
    background: none !important;
    background-clip: initial !important;
}
.section-header p {
    font-size: 1rem;
    color: var(--text-2);
    letter-spacing: 0.01em;
    max-width: 560px;
    margin: 0 auto;
}

/* ── 섹션 컨텐츠 ────────────────────────────────────────────────── */
.section-content {
    position: relative;
    z-index: 1;
    padding: 0.5rem 3rem 3rem;
}

/* ================================================================
   SUBSECTION (카드)
   ================================================================ */
.subsection {
    position: relative;
    margin: 2.5rem 0;
    padding: 2.2rem 2.4rem;
    background: var(--bg-sub);
    border-radius: 18px;
    border: none;
}
.subsection:first-child { margin-top: 1rem; }

.subsection h3 {
    font-size: 1.38rem;
    font-weight: 700;
    color: var(--gold-warm);
    letter-spacing: -0.015em;
    margin-bottom: 1rem;
}
.subsection h4 {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-plat);
    letter-spacing: 0.01em;
    margin: 1.8rem 0 0.65rem;
}
.subsection h4::before {
    content: '▸ ';
    color: var(--gold-dim);
    font-size: 0.88em;
}
.subsection p {
    font-size: 0.97rem;
    color: var(--text-2);
    line-height: 1.82;
}

/* ================================================================
   LISTS
   ================================================================ */
ul { margin: 1.1rem 0; padding-left: 0; list-style: none; }

li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.75rem;
    font-size: 0.97rem;
    color: var(--text-2);
    line-height: 1.78;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
li:last-child { border-bottom: none; }
li::before {
    content: '◆';
    position: absolute;
    left: 0;
    top: 0.65rem;
    font-size: 0.48rem;
    color: var(--gold-dim);
    line-height: 1;
}
li strong { color: var(--text-plat); font-weight: 600; }
li em     { color: var(--text-3); font-style: italic; }

/* ================================================================
   IMAGES
   ================================================================ */
.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2.5rem 0;
}
.guide-image {
    max-width: 100%; height: auto;
    display: block;
    border-radius: 14px;
    border: 1px solid var(--border-gold);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.85),
        0 0 0 0.5px rgba(255, 255, 255, 0.05) inset;
    cursor: zoom-in;
}
.image-caption {
    margin-top: 0.85rem;
    font-size: 0.8rem;
    color: var(--text-3);
    letter-spacing: 0.03em;
    font-style: italic;
    padding: 0.4rem 1.2rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-sub);
    border-radius: 50px;
}

/* ================================================================
   CALLOUT BOXES
   ================================================================ */
.highlight {
    position: relative;
    margin: 2rem 0;
    padding: 1.4rem 1.8rem 1.4rem 4rem;
    background: linear-gradient(135deg,
        rgba(135, 98, 18, 0.14),
        rgba(175, 138, 38, 0.08));
    border: 1px solid rgba(175, 138, 42, 0.3);
    border-radius: 14px;
    font-size: 0.97rem;
    color: var(--text-1);
    line-height: 1.75;
}
.highlight::before {
    content: '✦';
    position: absolute;
    left: 1.35rem; top: 1.45rem;
    font-size: 1.05rem;
    color: var(--gold-warm);
    filter: drop-shadow(0 0 6px var(--gold-glow-s));
}

.warning {
    position: relative;
    margin: 2rem 0;
    padding: 1.4rem 1.8rem 1.4rem 4rem;
    background: linear-gradient(135deg,
        rgba(115, 18, 18, 0.16),
        rgba(155, 40, 40, 0.08));
    border: 1px solid rgba(180, 60, 60, 0.3);
    border-radius: 14px;
    font-size: 0.97rem;
    color: var(--text-1);
    line-height: 1.75;
}
.warning::before {
    content: '⚠';
    position: absolute;
    left: 1.3rem; top: 1.45rem;
    font-size: 1rem;
    color: var(--red);
    opacity: 0.85;
}

/* ================================================================
   SCROLL-TO-TOP BUTTON — 우측 하단 플로트
   ================================================================ */
.scroll-top {
    position: fixed;
    bottom: 2.2rem; right: 2.2rem;
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 1.5px solid var(--gold-warm);
    background: linear-gradient(145deg, rgba(10, 14, 30, 0.96), rgba(4, 6, 16, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--gold-bright);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.6),
        0 0 20px var(--gold-glow),
        0 0 0 4px rgba(175, 135, 48, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.scroll-top:hover {
    transform: translateY(-6px) scale(1.08);
    border-color: var(--gold-bright);
    box-shadow:
        0 16px 44px rgba(0, 0, 0, 0.7),
        0 0 36px var(--gold-glow-s),
        0 0 0 6px rgba(200, 160, 60, 0.15);
    color: var(--gold-bright);
}
/* 맥동 링 */
.scroll-top::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid var(--gold-dim);
    opacity: 0;
    animation: pulseRing 3s ease-in-out infinite;
}
/* 화살표 */
.scroll-top::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(175, 135, 48, 0.15);
    opacity: 0;
    animation: pulseRing 3s ease-in-out infinite 1.5s;
}
@keyframes pulseRing {
    0%, 100% { transform: scale(1);    opacity: 0;    }
    50%       { transform: scale(1.28); opacity: 0.55; }
}

/* ================================================================
   FADE-IN ANIMATION
   ================================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ================================================================
   LIGHTBOX ANIMATION
   ================================================================ */
@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ================================================================
   EMOJI 클립 방지
   ================================================================ */
.emoji {
    -webkit-text-fill-color: initial !important;
    background: none !important;
    background-clip: initial !important;
}

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-dim), var(--gold-main));
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-main), var(--gold-bright));
}

/* ================================================================
   SELECTION
   ================================================================ */
::selection         { background: rgba(175,135,48,0.28); color: var(--gold-bright); }
::-moz-selection    { background: rgba(175,135,48,0.28); color: var(--gold-bright); }

/* ================================================================
   RESPONSIVE — 900px : 네비 축소
   ================================================================ */
@media (max-width: 900px) {
    .header { padding: 0 1.5rem; }
    .nav-item { padding: 0.4rem 0.85rem; font-size: 0.82rem; }
}

/* ================================================================
   RESPONSIVE — 768px : 헤더 2줄 (로고 위 / 메뉴 아래)
   ================================================================ */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        height: auto;
        padding: 0.75rem 1.2rem 0.65rem;
        gap: 0.5rem;
        align-items: flex-start;
    }
    .header-logo { gap: 0.55rem; }
    .logo-icon { font-size: 1rem; }
    .header h1 { font-size: 1rem; }
    .header p  { font-size: 0.68rem; }

    .nav {
        flex-wrap: wrap;
        gap: 0.3rem;
        width: 100%;
    }
    .nav-item { padding: 0.38rem 0.8rem; font-size: 0.8rem; }

    .main { margin-top: 112px; padding: 1.5rem 1rem 5rem; }

    .section { margin: 3.5rem 0; border-radius: 18px; scroll-margin-top: 120px; }
    .section::after { font-size: 4rem; top: 0.8rem; right: 1.2rem; }
    .section-header { padding: 2rem 1.5rem 1.5rem; }
    .section-header h2 { font-size: 1.7rem; }
    .section-content { padding: 0.5rem 1.5rem 2rem; }

    .subsection { padding: 1.5rem 1.5rem 1.5rem 2rem; margin: 2rem 0; }
    .subsection h3 { font-size: 1.15rem; }

    .scroll-top { width: 48px; height: 48px; bottom: 1.5rem; right: 1.5rem; font-size: 1.1rem; }
    .highlight, .warning { padding: 1.2rem 1.2rem 1.2rem 3rem; }
}

@media (max-width: 480px) {
    .header h1 { font-size: 0.92rem; }
    .nav-item { padding: 0.34rem 0.65rem; font-size: 0.76rem; }
    .section-header h2 { font-size: 1.45rem; }
}

/* ================================================================
   iOS 텍스트 렌더링
   ================================================================ */
@supports (-webkit-touch-callout: none) {
    body { -webkit-text-size-adjust: 100%; text-rendering: geometricPrecision; }
    p, li {
        word-break: keep-all; word-spacing: 0;
        letter-spacing: -0.01em; hyphens: none; -webkit-hyphens: none;
    }
}
