/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0A0A0A;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --primary: #BBF907;
    --primary-dark: #9AD006;
    --max-width: 1200px;
    --nav-height: 64px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ── Navigation ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    transition: background-color 0.3s, backdrop-filter 0.3s;
}

.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
}

.logo img {
    height: 28px;
    width: auto;
}

.nav-cta {
    padding: 12px 24px;
    background-color: var(--primary);
    color: #000;
    font-size: 14px;
    font-weight: 600;
    border-radius: 24px;
    transition: background-color 0.2s, transform 0.2s;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.nav-cta:hover {
    background-color: var(--primary-dark);
    transform: scale(1.02);
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    background: radial-gradient(ellipse at 30% 50%, rgba(187, 249, 7, 0.06) 0%, transparent 60%);
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 24px;
    display: flex;
    align-items: center;
    gap: 60px;
    width: 100%;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
}

.store-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-block;
    transition: transform 0.2s, opacity 0.2s;
}

.store-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.store-btn img {
    height: 40px;
}

.hero-mockup {
    flex: 0 0 380px;
}

/* ── Phone Mockup (6.5인치 실비율 1:2.163) ── */
.phone-frame {
    width: 320px;
    aspect-ratio: 9 / 19.5;
    background: #111111; /* phone-screen 과 동일 */
    border-radius: 28px;
    padding: 0; /* 베젤 제거 — 단차 발생 위치 자체 없음 */
    /* 폰 윤곽: 외곽 그림자 + 얇은 외곽선(box-shadow spread) — border-radius 따라감, 단차 없음 */
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.22);
    margin: 0 auto;
    animation: float 4s ease-in-out infinite;
    position: relative; /* 인디케이터 absolute 기준점 */
    overflow: hidden; /* 자식 phone-screen 의 모서리 라운드와 정확히 일치 */
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #111111; /* 골망 앱 다크모드 primaryBg — 이미지 미로드 시 fallback */
    border-radius: 28px; /* phone-frame 과 동일 — 이미지가 폰 외곽까지 꽉 차서 단차 없음 */
    overflow: hidden;
    position: relative;
}

/* 페어 갤러리의 picture/img — 폰 디스플레이 가장자리까지 꽉 차게 */
.phone-screen > picture {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0; /* img inline 공간 잔존 차단 */
    margin: 0;
    padding: 0;
}
/* Hero의 .mockup-slide(absolute) 는 별도 정의 — :not 으로 제외 */
.phone-screen > picture > img:not(.mockup-slide) {
    display: block; /* inline 기본 baseline 공간 제거 */
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: top;
}

/* aspect-ratio 구형 브라우저 폴백 */
@supports not (aspect-ratio: 1 / 1) {
    .phone-frame {
        height: 0;
        padding-top: calc(100% * 19.5 / 9);
    }
    .phone-frame > .phone-screen {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
    }
}

/* 페어 갤러리용 작은 폰 프레임 — 가독성을 위해 충분한 크기 확보 */
.phone-frame.small {
    width: 260px;
    flex-shrink: 0;
    scroll-snap-align: center;
}
@media (max-width: 768px) {
    .phone-frame.small { width: 280px; }
}

/* ── Mockup Slideshow ── */
.mockup-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.mockup-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    image-rendering: auto;
}

.mockup-slide.active {
    opacity: 1;
}

/* 슬라이드 인디케이터 */
.mockup-indicators {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: background 0.3s;
    cursor: pointer;
    border: 0;
    padding: 0;
}
.indicator-dot.active { background: #BBF907; }
.indicator-dot:focus-visible { outline: 2px solid #BBF907; outline-offset: 4px; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ── Features ── */
.features {
    padding: 100px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(187, 249, 7, 0.02) 50%, transparent 100%);
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 56px;
    letter-spacing: -0.5px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 32px 24px;
    transition: background-color 0.3s, transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: rgba(187, 249, 7, 0.15);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(187, 249, 7, 0.1);
    border-radius: 12px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── CTA ── */
.cta {
    padding: 100px 0;
    text-align: center;
    background: radial-gradient(ellipse at 50% 50%, rgba(187, 249, 7, 0.06) 0%, transparent 60%);
}

.cta h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.cta p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 36px;
}

.cta .store-buttons {
    justify-content: center;
}

/* ── Footer ── */
.footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.footer-links {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-links .divider {
    color: var(--text-muted);
    margin: 0 12px;
    font-size: 12px;
}

.footer-contact {
    margin-bottom: 12px;
}

.footer-contact a {
    color: var(--text-muted);
    font-size: 13px;
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: var(--primary);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 12px;
}

/* ── Fade-in Animation ── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive: Tablet ── */
@media (max-width: 1199px) {
    .hero-content h1 {
        font-size: 42px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-mockup {
        flex: 0 0 320px;
    }

    /* v1 잔재 정리 — height 제거 (aspect-ratio 9/19.5 가 자동 처리) */
    .phone-frame {
        width: 280px;
    }
}

/* ── Responsive: Mobile ── */
@media (max-width: 767px) {
    .hero {
        min-height: 100svh;
        padding-top: calc(var(--nav-height) + 40px);
        padding-bottom: 40px;
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 40px 20px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-description br {
        display: none;
    }

    .store-buttons {
        justify-content: center;
    }

    .store-btn img {
        height: 36px;
    }

    .hero-mockup {
        flex: none;
    }

    /* v1 잔재 제거 — .phone-frame width/aspect-ratio 는 v2 정의(9/19.5) + 868/894 라인 미디어가 담당 */
    .phone-frame {
        border-radius: 30px;
    }

    .phone-screen {
        border-radius: 20px;
        font-size: 16px;
    }

    .section-title {
        font-size: 26px;
        margin-bottom: 36px;
    }

    .features {
        padding: 60px 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 24px 20px;
    }

    .cta {
        padding: 60px 0;
    }

    .cta h2 {
        font-size: 28px;
    }

    .cta p {
        font-size: 16px;
    }

    .footer-links a {
        font-size: 14px;
    }

    .footer-contact a {
        font-size: 14px;
    }

    .footer-copyright {
        font-size: 13px;
    }
}

/* ────────────────────────────────────────────────
   v2 신규 — 접근성 / 네비게이션 보강
   ──────────────────────────────────────────────── */

/* Skip link — 키보드 사용자가 nav 건너뛰고 본문 바로 진입 */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 16px;
    z-index: 999;
    padding: 8px 16px;
    background: #BBF907;
    color: #000;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus {
    left: 16px;
    outline: 2px solid #fff;
}

/* nav 메뉴 + 햄버거 */
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s;
}
.nav-links a:hover { color: #BBF907; }

/* 모바일에서는 nav 메뉴 숨김 — 다운로드 버튼만 노출 (햄버거 제거) */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

/* (v2 신규 기능 스트립/배지 CSS 제거됨 — 정식 출시 전이라 NEW 인지 의미 없음) */

/* ────────────────────────────────────────────────
   v2 신규 — 페르소나
   ──────────────────────────────────────────────── */
.personas {
    padding: 100px 0;
    background: linear-gradient(180deg, transparent, rgba(187, 249, 7, 0.02), transparent);
}
.persona-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.persona-card {
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: transform 0.3s, border-color 0.3s;
}
.persona-card:hover {
    transform: translateY(-4px);
    border-color: rgba(187, 249, 7, 0.15);
}
.persona-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}
.persona-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}
.persona-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}
.persona-card li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}
.persona-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #BBF907;
    font-weight: 700;
}
.persona-cta {
    color: #BBF907;
    font-weight: 600;
    font-size: 14px;
    margin-top: 16px;
}

/* ────────────────────────────────────────────────
   v2 신규 — 탭별 페어 섹션
   ──────────────────────────────────────────────── */
.tab-pair {
    padding: 100px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.pair-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* 좌우 교차 — order 기반 */
.tab-pair.alt .pair-text { order: 2; }
.tab-pair.alt .pair-gallery,
.tab-pair.alt .pair-image { order: 1; }

.pair-text {
    max-width: 480px;
}
.tab-label {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(187, 249, 7, 0.1);
    color: #BBF907;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}
.pair-text h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}
.pair-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}
.pair-points {
    list-style: none;
    padding: 0;
}
.pair-points li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
}
.pair-points li::before {
    content: "•";
    position: absolute;
    left: 4px;
    top: -2px;
    color: #BBF907;
    font-size: 20px;
    line-height: 1;
}
.pair-points li strong { color: var(--text); font-weight: 700; }

/* 단일 이미지 페어 */
.pair-image {
    display: flex;
    justify-content: center;
    align-items: center;
}
.pair-image .phone-frame {
    margin: 0;
}

/* 페어 갤러리 (2~3장) — 좌우 grid 페어 안에서 가로 스크롤 + snap */
.pair-gallery {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px 16px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

/* 마이팀 페어 (5장) — 데스크톱 3+2 wrap 그리드, 모바일 캐러셀 */
.pair-gallery.wide {
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 870px;
    margin: 0 auto;
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
    padding: 8px 0 16px;
}

.pair-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 마이팀/채널 페어 — 1열 레이아웃 (텍스트 위 + 갤러리 아래 전체 폭) */
.tab-pair.tab-team .pair-inner,
.tab-pair.tab-channel .pair-inner {
    grid-template-columns: 1fr;
    gap: 48px;
}
.tab-pair.tab-team .pair-text,
.tab-pair.tab-channel .pair-text {
    max-width: 600px;
    margin: 0 auto;
}

/* ────────────────────────────────────────────────
   v2 신규 — 시나리오 5단계
   ──────────────────────────────────────────────── */
.scenarios {
    padding: 100px 0;
    background: linear-gradient(180deg, transparent, rgba(187, 249, 7, 0.02), transparent);
}
.scenario-list {
    list-style: none;
    padding: 0;
    max-width: 720px;
    margin: 0 auto;
}
.scenario-step {
    display: flex;
    gap: 24px;
    padding: 20px 0;
    position: relative;
}
.scenario-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 23px;
    top: 68px;
    bottom: -8px;
    width: 2px;
    background: linear-gradient(180deg, #BBF907, transparent);
}
.step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #BBF907;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    z-index: 1;
}
.step-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.step-content p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
}

/* ────────────────────────────────────────────────
   v2 신규 — FAQ 아코디언
   ──────────────────────────────────────────────── */
.faq {
    padding: 100px 0;
}
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.faq-item[open] { border-color: rgba(187, 249, 7, 0.2); }
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-size: 24px;
    color: #BBF907;
    transition: transform 0.2s;
    line-height: 1;
    flex-shrink: 0;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
}
.faq-item p {
    margin-top: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}
.faq-item a { color: #BBF907; text-decoration: underline; }

/* ────────────────────────────────────────────────
   v2 신규 — 반응형 (768px↓)
   ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .phone-frame {
        width: 290px;
    }

    .persona-grid {
        grid-template-columns: 1fr;
    }

    .pair-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    /* 모바일에서는 order reset — 텍스트가 항상 이미지 위 */
    .tab-pair.alt .pair-text { order: 0; }
    .tab-pair.alt .pair-gallery,
    .tab-pair.alt .pair-image { order: 1; }

    /* 마이팀 페어 — 모바일은 다시 가로 스크롤 캐러셀로 복원 (5장 그리드 X) + snap 으로 다음 이미지 1/3만 노출 */
    .pair-gallery.wide {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        max-width: none;
        margin: 0;
        padding: 8px 16px 16px;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 16px;
        mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    }
    .tab-pair.tab-team .pair-text,
    .tab-pair.tab-channel .pair-text {
        max-width: 100%;
    }
    /* 모바일 페어 inner 좌우 패딩 축소 — 이미지가 더 큰 공간 활용 */
    .pair-inner {
        padding: 0 16px;
    }

    .pair-text h2 { font-size: 26px; }

    .scenario-step { padding: 16px 0; }
    .scenario-step:not(:last-child)::after { top: 60px; }
}

@media (max-width: 380px) {
    .phone-frame {
        width: 260px;
    }
    .phone-frame.small { width: 250px; }
}
