/**
 * Linq App Page (A 유형 정적 상세) — 모바일 앱 톤 v0.1
 * 셸: 슬림 헤더 + 본문 + 하단 nav
 * 블록: hero / intro / text / cards / image / cta
 * 톤: 홈 페이지와 동일 (흰 배경, 모노크롬, --linq-brand 액센트)
 */

/* 모든 lap 영역 요소를 border-box로 강제 — width:100% + padding 조합이
   content-box일 때 padding이 width에 추가로 더해져 가로 스크롤 유발 (lap-cta__btn). */
.linq-app-detail,
.linq-app-detail *,
.linq-app-detail *::before,
.linq-app-detail *::after {
    box-sizing: border-box;
}

/* ==== 컨테이너 ==== */
.linq-app-detail {
    width: 100%;
    background: #fff;
    min-height: 100vh;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}
.linq-app-detail__viewport {
    max-width: 460px;
    margin: 0 auto;
    padding: 0 0 40px;
}

/* ==== 슬림 헤더 (sticky) ==== */
.linq-app-detail__header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 8px;
    padding: 12px 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid #F1F3F6;
}
.linq-app-detail__back,
.linq-app-detail__menu {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: #1a1a1a;
    cursor: pointer;
    padding: 0;
}
.linq-app-detail__back { justify-self: start; }
.linq-app-detail__menu { justify-self: end; }
.linq-app-detail__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    color: #1a1a1a;
}

/* ==== 햄버거 드로어 (홈과 동일) ==== */
.linq-app-detail__drawer {
    display: none;
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    background: #fff;
    border: 1px solid #ECEEF5;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(15, 22, 51, 0.12);
    z-index: 99;
    padding: 8px 0;
}
.linq-app-detail__drawer.linq-app__drawer--open {
    display: block;
    animation: lapDrawerSlide 220ms ease-out;
}
@keyframes lapDrawerSlide {
    0%   { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}
.linq-app-detail__drawer .linq-app__drawer-nav ul,
.linq-app-detail__drawer .linq-app__drawer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.linq-app-detail__drawer .linq-app__drawer-list li a,
.linq-app-detail__drawer .linq-app__drawer-nav a {
    display: block;
    padding: 14px 20px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid #F4F5F8;
}
.linq-app-detail__drawer .linq-app__drawer-list li:last-child a,
.linq-app-detail__drawer .linq-app__drawer-nav li:last-child a {
    border-bottom: 0;
}

/* ==== 본문 wrapper ==== */
.linq-app-detail__body {
    padding: 0 14px;
}

/* 블록 공통 spacing */
.lap-block {
    margin-bottom: 28px;
}
.lap-block:last-child {
    margin-bottom: 12px;
}

/* ============================================================
 * 블록 1: 히어로
 * ============================================================ */
.lap-hero {
    margin: 18px 0 28px;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background-color: #1a1a1a;  /* 이미지 없을 때 fallback */
    position: relative;
    display: flex;
    align-items: flex-end;
}
.lap-hero__inner {
    position: relative;
    z-index: 2;
    padding: 24px 22px;
    width: 100%;
    color: #fff;
}
.lap-hero--dark::after,
.lap-hero--light::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}
.lap-hero--dark::after  { background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.55) 100%); }
.lap-hero--light::after { background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(255,255,255,0.7) 100%); }
.lap-hero--light .lap-hero__inner { color: #1a1a1a; }
.lap-hero--none::after  { display: none; }

.lap-hero__eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
}
.lap-hero--light .lap-hero__eyebrow {
    background: rgba(0, 0, 0, 0.06);
    color: #1a1a1a;
}
.lap-hero__copy {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* ============================================================
 * 블록 2: 인트로
 * ============================================================ */
.lap-intro {
    padding: 4px 4px;
}
.lap-intro__lead {
    margin: 0 0 8px;
    color: var(--linq-brand, #1a1a1a);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.lap-intro__copy {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: #1a1a1a;
}

/* ============================================================
 * 블록 3: 텍스트 본문
 * ============================================================ */
.lap-text {
    padding: 0 4px;
}
.lap-text p {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.7;
    color: #2a2f3a;
    letter-spacing: -0.005em;
}
.lap-text p:last-child {
    margin-bottom: 0;
}
.lap-text strong {
    color: #1a1a1a;
    font-weight: 700;
}

/* ============================================================
 * 블록 4: 3카드 그리드
 * ============================================================ */
.lap-cards__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.lap-card {
    position: relative;
    padding: 22px 22px 22px 26px;
    background: #F8F9FB;
    border-radius: 16px;
}
.lap-card__dot {
    position: absolute;
    top: 26px;
    left: 14px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--linq-brand, #1a1a1a);
}
.lap-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: #1a1a1a;
    line-height: 0;
}
.lap-card__icon svg {
    display: block;
}
.lap-card__title {
    display: block;
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}
.lap-card__desc {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    color: #4a505c;
}

/* ============================================================
 * 블록 5: 큰 이미지
 * ============================================================ */
.lap-image {
    padding: 0;
}
.lap-image__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}
.lap-image__caption {
    margin: 10px 4px 0;
    font-size: 14px;
    font-weight: 300;
    color: #8b92a0;
    text-align: center;
}

/* ============================================================
 * 블록 6: CTA 버튼
 * ============================================================ */
.lap-cta {
    padding: 4px;
}
.lap-cta__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 20px 22px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ============================================================
 * 블록 7: Quote (인용구)
 * ============================================================ */
.lap-quote {
    position: relative;
    padding: 28px 24px 24px;
    background: #F8F9FB;
    border-radius: 20px;
}
.lap-quote__mark {
    position: absolute;
    top: 8px; left: 18px;
    font-size: 64px;
    line-height: 1;
    color: var(--linq-brand, #1a1a1a);
    font-family: Georgia, serif;
    opacity: 0.18;
}
.lap-quote__body {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: #1a1a1a;
}
.lap-quote__author {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 16px;
}
.lap-quote__author strong { font-weight: 700; color: #1a1a1a; }
.lap-quote__author span   { color: #6a6a6a; font-weight: 300; }

/* ============================================================
 * 블록 8: Stats (숫자 강조)
 * ============================================================ */
.lap-stats__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.lap-stat {
    padding: 22px 16px;
    background: #F8F9FB;
    border-radius: 16px;
    text-align: center;
}
.lap-stat__value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    color: var(--linq-brand, #1a1a1a);
    letter-spacing: -0.03em;
}
.lap-stat__unit {
    font-size: 18px;
    font-weight: 700;
    font-style: normal;
    margin-left: 2px;
    color: var(--linq-brand, #1a1a1a);
}
.lap-stat__label {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6a6a6a;
    letter-spacing: -0.01em;
}

/* ============================================================
 * 블록 9: 타임라인
 * ============================================================ */
.lap-timeline {
    position: relative;
    padding-left: 26px;
}
.lap-timeline__line {
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--linq-brand, #1a1a1a) 0%, #E4E7EE 100%);
}
.lap-event {
    position: relative;
    margin-bottom: 22px;
}
.lap-event:last-child { margin-bottom: 0; }
.lap-event__dot {
    position: absolute;
    left: -22px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--linq-brand, #1a1a1a);
}
.lap-event__head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}
.lap-event__year {
    font-size: 20px;
    font-weight: 800;
    color: var(--linq-brand, #1a1a1a);
    letter-spacing: -0.02em;
}
.lap-event__date {
    font-size: 14px;
    font-weight: 500;
    color: #8b92a0;
}
.lap-event__title {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}
.lap-event__desc {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    color: #4a505c;
}

/* ============================================================
 * 블록 10: FAQ 아코디언
 * ============================================================ */
.lap-faq__list { display: flex; flex-direction: column; gap: 8px; }
.lap-qa {
    background: #F8F9FB;
    border-radius: 14px;
    overflow: hidden;
}
.lap-qa[open] { background: #FFFFFF; border: 1px solid #E4E7EE; }
.lap-qa__q {
    list-style: none;
    cursor: pointer;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}
.lap-qa__q::-webkit-details-marker { display: none; }
.lap-qa__plus {
    transition: transform 200ms ease;
    color: #8b92a0;
    line-height: 0;
}
.lap-qa__plus svg { display: block; transform: rotate(90deg); }
.lap-qa[open] .lap-qa__plus svg { transform: rotate(-90deg); }
.lap-qa__a {
    padding: 0 20px 18px;
}
.lap-qa__a p {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.65;
    color: #4a505c;
}

/* ============================================================
 * 블록 11: 지도
 * ============================================================ */
.lap-map__placeholder,
.lap-map__embed {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #F4F5F8 0%, #E8EBF1 100%);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #8b92a0;
}
.lap-map__embed iframe { width: 100%; height: 100%; border: 0; }
.lap-map__placeholder span { font-size: 14px; font-weight: 500; }
.lap-map__info {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}
.lap-map__info li {
    display: flex;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid #F1F3F6;
    font-size: 16px;
    font-weight: 300;
    color: #2a2f3a;
}
.lap-map__info li:last-child { border-bottom: 0; }
.lap-map__label {
    flex: 0 0 60px;
    font-weight: 700;
    color: #1a1a1a;
}

/* ============================================================
 * 블록 12: 리스트 (공지사항 등)
 * ============================================================ */
.lap-list__items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lap-item { border-bottom: 1px solid #F1F3F6; }
.lap-item:last-child { border-bottom: 0; }
.lap-item__link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 16px 4px;
    text-decoration: none;
    color: #1a1a1a;
}
.lap-item__tag {
    padding: 3px 10px;
    background: var(--linq-brand, #1a1a1a);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.lap-item__title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}
.lap-item__date {
    font-size: 14px;
    font-weight: 300;
    color: #8b92a0;
}

/* ============================================================
 * 블록 13: 2열 카드
 * ============================================================ */
.lap-2cols__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.lap-col {
    padding: 20px 16px;
    background: #F8F9FB;
    border-radius: 16px;
}
.lap-col__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--linq-brand, #1a1a1a);
    line-height: 0;
}
.lap-col__icon svg { display: block; }
.lap-col__title {
    display: block;
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}
.lap-col__desc {
    margin: 0;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
    color: #4a505c;
}

/* ============================================================
 * 블록 14: 가로 스크롤 카드
 * ============================================================ */
.lap-scroll {
    margin-left: -14px;
    margin-right: -14px;
}
.lap-scroll__track {
    display: flex;
    gap: 10px;
    padding: 4px 14px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.lap-scroll__track::-webkit-scrollbar { display: none; }
.lap-scroll__track { scrollbar-width: none; }
.lap-chip {
    flex: 0 0 78%;
    scroll-snap-align: start;
    padding: 20px 18px 22px;
    background: #F8F9FB;
    border-radius: 18px;
    text-decoration: none;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lap-chip__icon {
    display: inline-flex;
    color: var(--linq-brand, #1a1a1a);
    line-height: 0;
    margin-bottom: 6px;
}
.lap-chip__icon svg { display: block; }
.lap-chip__title { font-size: 18px; font-weight: 700; color: #1a1a1a; letter-spacing: -0.01em; }
.lap-chip__sub   { font-size: 14px; font-weight: 500; color: var(--linq-brand, #1a1a1a); }
.lap-chip__desc  { margin: 4px 0 0; font-size: 14px; font-weight: 300; line-height: 1.5; color: #4a505c; }

/* ============================================================
 * 하단 nav (홈과 동일)
 * ============================================================ */
.linq-app-detail__bottomnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 460px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid #F1F3F6;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    z-index: 50;
}
.linq-app-detail__navitem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 2px;
    text-decoration: none;
    color: #8b92a0;
}
.linq-app-detail__navitem--center {
    color: var(--linq-brand, #1a1a1a);
}
.linq-app-detail__navitem-icon {
    line-height: 0;
}
.linq-app-detail__navitem-icon svg {
    display: block;
}
.linq-app-detail__navitem-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.linq-app-detail__bottom-spacer {
    height: 72px;
}

/* ============================================================
 * preview 모드 (페이지 이동 차단)
 * ============================================================ */
.linq-app-detail--preview a {
    pointer-events: none;
}

/* ============================================================
 * hover (마우스 환경만)
 * ============================================================ */
@media (hover: hover) and (pointer: fine) {
    .lap-cta__btn:hover {
        background: #000;
    }
    .linq-app-detail__back:hover,
    .linq-app-detail__menu:hover {
        background: #F4F5F8;
    }
}

/* ============================================================
 * 사이트 헤더/푸터/제목 숨김 (body.linq-app-page 적용 시)
 * ============================================================ */
body.linq-app-page .wp-site-blocks > header,
body.linq-app-page .wp-block-template-part[data-type="header"],
body.linq-app-page > header,
body.linq-app-page .site-header,
body.linq-app-page .entry-title,
body.linq-app-page .wp-block-post-title,
body.linq-app-page .wp-site-blocks > footer,
body.linq-app-page .wp-block-template-part[data-type="footer"],
body.linq-app-page > footer,
body.linq-app-page .site-footer {
    display: none !important;
}
body.linq-app-page .wp-site-blocks,
body.linq-app-page main,
body.linq-app-page .entry-content,
body.linq-app-page .wp-block-post-content {
    margin: 0 !important;
    padding: 0 !important;
}
body.linq-app-page {
    background: #fff;
    margin: 0 !important;
    padding-top: 0 !important;
}

/* wp admin bar 숨김 (로그인 사용자도 모바일 톤 깨지지 않게) */
body.linq-app-page #wpadminbar { display: none !important; }
html.wp-toolbar { margin-top: 0 !important; padding-top: 0 !important; }
html:has(body.linq-app-page) { margin-top: 0 !important; }

/* ============================================================
 * 접근성: 모션 줄이기
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .linq-app-detail__drawer.linq-app__drawer--open {
        animation: none;
    }
}
