/* ===== PAYCO 디자인 토큰 및 도입 사례 전용 스타일 ===== */
:root {
    --primary: #FF2233;
    --primary-darker: #E01E2C;
    --primary-light: #FFF0F1;
    --accent: #0077CC;
    --accent-light: #EBF6FF;

    --ink: #111111;
    --ink-body: #3A3A3F;
    --ink-soft: #66666E;

    --surface: #FFFFFF;
    --surface-subtle: #FAFAFC;
    --surface-muted: #F2F2F6;
    --line: #DCDCE2;

    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #FF4451;
        --primary-darker: #FF2233;
        --primary-light: #2E1A1C;
        --accent: #58BFFF;
        --accent-light: #172836;

        --ink: #F5F5F7;
        --ink-body: #D0D0D6;
        --ink-soft: #A0A0AA;

        --surface: #161618;
        --surface-subtle: #1E1E22;
        --surface-muted: #26262C;
        --line: #383842;

        --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: var(--surface);
    color: var(--ink-body);
    font-family: Pretendard, -apple-system, "Noto Sans KR", "Malgun Gothic", sans-serif;
    font-size: 20px;
    line-height: 1.8;
    letter-spacing: -0.02em;
    word-break: keep-all;
    overflow-wrap: break-word;
    -webkit-text-size-adjust: 100%;
}

img, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

.wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 22px;
}

h1, h2, h3, h4 {
    color: var(--ink);
    letter-spacing: -0.035em;
    line-height: 1.34;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

/* ===== 상단 내비게이션 & 브레드크럼 ===== */
.site-top {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    padding: 12px 0;
}

.site-top .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.brand-home {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
}

.brand-home span {
    color: var(--primary);
}

.top-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 16px;
    font-weight: 700;
}

.top-links a {
    color: var(--ink-body);
    text-decoration: none;
}

.top-links a:hover,
.top-links a[aria-current="page"] {
    color: var(--primary);
}

.breadcrumb {
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--ink-soft);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

/* ===== 히어로 & 핵심 요약 (데스크톱 2열 유지, 모바일은 사진 우선 배치) ===== */
header.hero {
    padding: 44px 0 44px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 15px;
    font-weight: 800;
    padding: 5px 13px;
    border-radius: 100px;
    margin-bottom: 14px;
}

header.hero h1 {
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 14px;
}

header.hero h1 em {
    font-style: normal;
    color: var(--primary);
}

header.hero .sub {
    font-size: 21px;
    color: var(--ink-body);
    margin-bottom: 22px;
}

.meta-note {
    font-size: 15px;
    color: var(--ink-soft);
    margin-top: 18px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    grid-template-areas:
        "summary photo"
        "facts photo";
    gap: 20px 32px;
    align-items: start;
}

.hero-summary {
    grid-area: summary;
    min-width: 0;
}

.hero-photo {
    grid-area: photo;
    min-width: 0;
}

.hero-facts {
    grid-area: facts;
    min-width: 0;
}

.answer-box {
    border-left: 5px solid var(--primary);
    background: var(--primary-light);
    padding: 22px 24px;
    border-radius: 0 16px 16px 0;
}

.answer-box h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.answer-box p {
    font-size: 19px;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.7;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.fact-item {
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    min-width: 0;
}

.fact-item .label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-soft);
    margin-bottom: 4px;
}

.fact-item .value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.35;
}

.fact-item .basis {
    display: block;
    font-size: 14px;
    color: var(--ink-soft);
    margin-top: 4px;
}

/* ===== 사진 Figure & 캡션 ===== */
.figure-card {
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    min-width: 0;
}

.figure-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.figure-card figcaption {
    padding: 14px 18px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-soft);
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.report-figure {
    margin: 26px 0;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.report-figure img {
    width: 100%;
    height: auto;
    background: #fff;
}

.report-figure figcaption {
    padding: 16px 20px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-body);
    background: var(--surface-subtle);
    border-top: 1px solid var(--line);
}

/* ===== 본문 섹션 & 카드 ===== */
main p, main article .wrap > ul, main article .wrap > ol {
    max-width: 800px;
}

section {
    padding: 56px 0;
}

section.alt {
    background: var(--surface-subtle);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

section h2 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 14px;
}

section .lede {
    font-size: 20px;
    color: var(--ink-soft);
    margin-bottom: 24px;
}

article p {
    margin-bottom: 16px;
}

article ul, article ol {
    padding-left: 1.3em;
    margin-bottom: 18px;
}

article li {
    margin-bottom: 8px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    padding: 28px 30px;
    margin-bottom: 18px;
    min-width: 0;
}

section.alt .card {
    box-shadow: none;
}

.card h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

/* ===== 도입 전 / 도입 후 비교 그리드 ===== */
.compare-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 22px 0;
}

.compare-box {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px 26px;
    background: var(--surface);
    min-width: 0;
}

.compare-box.after {
    border: 2px solid var(--primary);
    background: var(--primary-light);
}

.compare-box .badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 99px;
    background: var(--surface-muted);
    color: var(--ink-soft);
    margin-bottom: 12px;
}

.compare-box.after .badge {
    background: var(--primary);
    color: #fff;
}

.compare-box h3 {
    font-size: 23px;
    margin-bottom: 12px;
}

/* ===== 현장별 운영 흐름 레이아웃 ===== */
.track-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin: 24px 0;
}

.track-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 5px solid var(--primary);
    border-radius: 16px;
    padding: 26px 26px;
    min-width: 0;
}

.track-card.secondary {
    border-top-color: var(--accent);
}

.track-card h3 {
    font-size: 23px;
    margin-bottom: 12px;
}

.step-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.step-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--line);
}

.step-list li:last-child {
    border-bottom: none;
}

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 3px;
}

.track-card.secondary .step-num {
    background: var(--accent);
}

/* ===== 표 스타일 & 모바일 가로 스크롤 안내 ===== */
.table-hint {
    font-size: 15px;
    color: var(--ink-soft);
    margin-bottom: 8px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 12px 0 20px;
}

table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 18px;
    background: var(--surface);
}

th, td {
    border: 1px solid var(--line);
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
}

thead th {
    background: var(--surface-muted);
    color: var(--ink);
    font-weight: 800;
}

tbody th {
    background: var(--surface-subtle);
    color: var(--ink);
    font-weight: 700;
    width: 24%;
}

/* ===== 동영상 플레이어 카드 (Click-to-load YouTube) ===== */
.video-section-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 28px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 26px;
    box-shadow: var(--shadow-card);
}

.video-section-grid.wide-poster {
    grid-template-columns: 1.1fr 0.9fr;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    min-width: 0;
}

.video-frame.landscape {
    aspect-ratio: 16 / 9;
}

.video-trigger {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.video-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.video-trigger:hover img {
    transform: scale(1.03);
}

.video-play-badge {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.35);
    transition: background-color 0.2s ease;
}

.video-trigger:hover .video-play-badge {
    background: rgba(0, 0, 0, 0.2);
}

.video-play-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.video-play-label {
    font-size: 15px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    padding: 5px 12px;
    border-radius: 99px;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-info {
    min-width: 0;
}

.video-info h3 {
    font-size: 25px;
    margin-bottom: 12px;
}

.video-direct-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    border: 2px solid var(--primary);
    padding: 10px 18px;
    border-radius: 10px;
}

.video-direct-link:hover {
    background: var(--primary-light);
}

/* ===== 사례 목록 페이지 (/cases) 카드 그리드 ===== */
.case-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

.case-item-card {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    padding: 24px;
    align-items: center;
}

.case-item-thumb {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
    background: var(--surface-muted);
    min-width: 0;
}

.case-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-item-body {
    min-width: 0;
}

.case-item-body .tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.case-tag {
    font-size: 14px;
    font-weight: 800;
    padding: 4px 11px;
    border-radius: 99px;
    background: var(--primary-light);
    color: var(--primary);
}

.case-tag.neutral {
    background: var(--surface-muted);
    color: var(--ink-body);
}

.case-item-body h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.case-item-body h2 a {
    color: var(--ink);
    text-decoration: none;
}

.case-item-body h2 a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.case-item-meta {
    list-style: none;
    padding: 0;
    margin: 14px 0 18px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
    font-size: 16px;
}

.case-item-meta strong {
    color: var(--ink);
}

.case-cta-link {
    display: inline-block;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    background: var(--primary);
    padding: 11px 22px;
    border-radius: 10px;
    text-decoration: none;
}

.case-cta-link:hover {
    background: var(--primary-darker);
}

/* ===== FAQ ===== */
details {
    border-bottom: 1px solid var(--line);
    padding: 18px 2px;
}

details summary {
    font-size: 23px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    letter-spacing: -0.025em;
    line-height: 1.4;
}

details p {
    margin-top: 12px;
    font-size: 19px;
    color: var(--ink-body);
}

/* ===== 관련 링크 그리드 ===== */
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.related-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px 26px;
    min-width: 0;
}

.related-box h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.related-list {
    list-style: none;
    padding: 0;
}

.related-list li {
    margin-bottom: 10px;
}

.related-list a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 18px;
}

.related-list a:hover {
    text-decoration: underline;
}

/* ===== 마감 CTA & 푸터 ===== */
.closer {
    background: var(--primary);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.closer h2 {
    color: #fff;
    font-size: 40px;
    margin-bottom: 12px;
}

.closer p {
    font-size: 21px;
    opacity: 0.95;
    margin-bottom: 26px;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    padding: 18px 36px;
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.15s;
}

.closer .btn {
    background: #fff;
    color: var(--primary-darker);
}

.closer .btn:hover {
    background: var(--primary-light);
}

footer {
    padding: 46px 0 64px;
    font-size: 17px;
    color: var(--ink-soft);
    line-height: 1.7;
    border-top: 1px solid var(--line);
}

footer a {
    color: var(--ink-soft);
}

.links {
    margin-bottom: 16px;
}

.links a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    margin-right: 16px;
}

/* ===== 반응형 (900px, 640px — 모바일 대표 사진 최우선 노출) ===== */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "photo"
            "summary"
            "facts";
        gap: 18px;
    }

    .compare-grid,
    .track-grid,
    .photo-grid,
    .video-section-grid,
    .video-section-grid.wide-poster,
    .case-item-card,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .video-frame {
        max-width: 340px;
        margin: 0 auto;
    }

    .video-frame.landscape {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    html, body {
        font-size: 18px;
    }

    .wrap {
        padding: 0 16px;
    }

    .site-top {
        padding: 10px 0;
    }

    .top-links {
        font-size: 15px;
        gap: 6px 12px;
    }

    header.hero {
        padding: 24px 0 30px;
    }

    header.hero h1 {
        font-size: 28px;
        margin-bottom: 10px;
    }

    header.hero .sub {
        font-size: 17px;
        margin-bottom: 16px;
    }

    .hero-photo img {
        max-height: 320px;
        object-position: center 28%;
    }

    section {
        padding: 40px 0;
    }

    section h2 {
        font-size: 26px;
    }

    .fact-grid,
    .case-item-meta {
        grid-template-columns: 1fr;
    }

    .card,
    .compare-box,
    .track-card,
    .video-section-grid,
    .case-item-card,
    .related-box {
        padding: 20px 18px;
    }

    details summary {
        font-size: 20px;
    }

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

    .btn {
        width: 100%;
        text-align: center;
        padding: 16px 20px;
    }
}
