/* 인터랙티브 데모 페이지 (/demo, /demo/*-demo) 전용 스타일.
 *
 * 레이아웃은 목업(Demo Launcher.dc.html)을 따르되 색·폰트는 사이트 토큰을 쓴다.
 * 포인트 컬러는 브랜드 오렌지 #ff9012 지만, 흰 배경 위 작은 글자에는 대비가
 * 모자라므로(2.1:1) eyebrow·링크 같은 텍스트에는 어두운 변형 --demo-accent-ink
 * 를 쓴다. 채움(버튼 배경·불릿·재생 아이콘)에만 원래 오렌지를 쓴다.
 *
 * 공통 navbar/footer 는 jQuery .load() 로 들어오므로 여기선 건드리지 않는다.
 */
:root {
    --demo-accent: #ff9012;
    --demo-accent-hover: #e07c00;
    --demo-accent-ink: #a85d00;
    --demo-bg: #f6f7f9;
    --demo-ink: #141821;
    --demo-ink-2: #4a5160;
    --demo-ink-3: #5b6270;
    --demo-border: #e3e6eb;
}

body.demo-body {
    background: var(--demo-bg);
    color: var(--demo-ink);
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* 데모 팝업이 떠 있는 동안 공통 네비바를 감춘다.
 *
 * styles.css 의 #mainNav 는 z-index 100000000 인데 Supademo 오버레이는
 * 10000000 이라, 네비바가 모달을 뚫고 올라온다. 보기 싫은 것으로 끝나지 않고
 * 모달의 닫기(X) 버튼이 (1361, 24) — 네비바 띠 안 — 에 있어서 **버튼이 가려져
 * 클릭이 안 된다.** 런처 페이지는 진입하자마자 데모가 뜨므로 특히 치명적이다.
 *
 * display 가 아니라 visibility 를 쓰는 이유: 네비바가 자리를 비우면 뒤 페이지가
 * 67px 위로 밀렸다가 닫을 때 되돌아와 깜빡인다. visibility 는 레이아웃을
 * 그대로 두고 보이기만 감춘다. */
body.demo-modal-open #mainNav {
    visibility: hidden;
}

.demo-main {
    max-width: 1120px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 40px 32px 64px;
    display: flex;
    flex-direction: column;
    gap: 56px;
}

/* styles.css 는 @media(min-width:768px) 에서 모든 <section> 에 9rem 세로 패딩을
 * 준다(기존 랜딩 페이지 섹션용). 데모 페이지는 .demo-main 의 gap 으로 간격을
 * 잡으므로 여기서 되돌린다. */
.demo-main section {
    padding: 0;
}

.demo-main a {
    color: var(--demo-accent-ink);
    text-decoration: none;
}
.demo-main a:hover {
    color: var(--demo-accent-hover);
    text-decoration: underline;
}

/* ---------- 히어로 ---------- */
.demo-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 48px;
    align-items: center;
}

.demo-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    min-width: 0;
}

.demo-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--demo-border);
    font-size: 13px;
    font-weight: 500;
    color: var(--demo-ink-2);
}
.demo-pill-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9aa1ad;
    box-sizing: border-box;
}
.demo-pill[data-state='loading'] .demo-pill-dot {
    width: 12px;
    height: 12px;
    background: none;
    border: 2px solid #ffd9a8;
    border-top-color: var(--demo-accent);
    animation: demo-spin 0.8s linear infinite;
}
.demo-pill[data-state='open'] .demo-pill-dot {
    background: #2f9e58;
    animation: demo-pulse 1.4s ease-in-out infinite;
}
.demo-pill[data-state='error'] .demo-pill-dot {
    background: #d04a3b;
}
@keyframes demo-spin {
    to {
        transform: rotate(360deg);
    }
}
@keyframes demo-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

.demo-headings {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.demo-eyebrow {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--demo-accent-ink);
}

.demo-h1 {
    margin: 0;
    font-size: clamp(30px, 4.4vw, 44px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.demo-lead {
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--demo-ink-2);
    max-width: 52ch;
}

.demo-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.demo-points li {
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: 15px;
    line-height: 1.5;
    color: #2b303b;
}
.demo-points li::before {
    content: '';
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--demo-accent);
    transform: translateY(-2px);
}

.demo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 0 26px;
    border: 0;
    border-radius: 10px;
    background: var(--demo-accent);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(20, 24, 33, 0.12), 0 6px 18px rgba(255, 144, 18, 0.28);
}
.demo-btn:hover:not([disabled]) {
    background: var(--demo-accent-hover);
    color: #fff;
}
.demo-btn:active:not([disabled]) {
    transform: translateY(1px);
}
.demo-btn[disabled] {
    opacity: 0.55;
    cursor: default;
}
.demo-btn-tri {
    width: 0;
    height: 0;
    border-left: 11px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

.demo-btn-ghost {
    display: inline-flex;
    align-items: center;
    height: 50px;
    padding: 0 22px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #d9dde3;
    box-sizing: border-box;
    font-size: 15px;
    font-weight: 600;
}
.demo-main a.demo-btn-ghost {
    color: var(--demo-ink);
}
.demo-main a.demo-btn-ghost:hover {
    border-color: #b8bec8;
    color: var(--demo-ink);
    text-decoration: none;
}

.demo-error-hint {
    margin: -8px 0 0;
    font-size: 14px;
    color: #6b7280;
}
.demo-error-hint[hidden] {
    display: none;
}

.demo-noscript {
    margin: 0;
    font-size: 15px;
}

/* ---------- 썸네일 (Supademo Meta Image 정지 이미지) ---------- */
.demo-thumb {
    all: unset;
    box-sizing: border-box;
    position: relative;
    display: block;
    width: 100%;
    /* Meta Image 권장 규격이 16:9 다. 비율이 다른 이미지는 cover 로 맞춘다. */
    aspect-ratio: 16/9;
    border-radius: 14px;
    overflow: hidden;
    /* 이미지가 없거나 깨졌을 때 드러나는 플레이스홀더 */
    background: repeating-linear-gradient(135deg, #eceef2 0 10px, #e4e7ec 10px 20px);
    border: 1px solid var(--demo-border);
    box-shadow: 0 12px 40px rgba(20, 24, 33, 0.1);
    cursor: pointer;
}
.demo-thumb[disabled] {
    cursor: default;
}
.demo-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* 재생 버튼이 묻히지 않을 만큼만 덮는다. 썸네일이 움직이던 시절엔 더 진하게
 * 깔았는데, 정지 스크린샷에는 그대로 두면 화면만 탁해진다. */
.demo-thumb-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 17, 24, 0.06);
    transition: background 0.15s ease;
}
.demo-thumb:hover .demo-thumb-veil {
    background: rgba(14, 17, 24, 0.16);
}
.demo-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.demo-play::before {
    content: '';
    width: 0;
    height: 0;
    margin-left: 5px;
    border-left: 20px solid var(--demo-accent);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}
.demo-play-hub {
    width: 60px;
    height: 60px;
}
.demo-play-hub::before {
    margin-left: 4px;
    border-left-width: 17px;
    border-top-width: 10px;
    border-bottom-width: 10px;
}
.demo-play-card {
    width: 44px;
    height: 44px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}
.demo-play-card::before {
    margin-left: 3px;
    border-left-width: 13px;
    border-top-width: 8px;
    border-bottom-width: 8px;
}

/* ---------- 하단 "More interactive demos" ---------- */
.demo-more {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.demo-more-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.demo-more-head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.demo-more-head a {
    font-size: 14px;
    font-weight: 600;
}

.demo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 16px;
}
.demo-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--demo-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.demo-card:hover {
    border-color: var(--demo-accent);
    box-shadow: 0 8px 24px rgba(20, 24, 33, 0.08);
}
.demo-card .demo-thumb {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.demo-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
    flex: 1;
}
.demo-card-eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--demo-accent-ink);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.demo-card-body h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}
.demo-card-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--demo-ink-3);
    flex: 1;
}
.demo-card-links {
    display: flex;
    gap: 16px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    align-items: center;
}
.demo-card-play {
    all: unset;
    cursor: pointer;
    color: var(--demo-accent-ink);
}
.demo-card-play:hover {
    color: var(--demo-accent-hover);
}
.demo-card-play[disabled] {
    cursor: default;
    opacity: 0.55;
}
.demo-main .demo-card-links a {
    color: var(--demo-ink-2);
}

/* ---------- 허브 ---------- */
.demo-hub-intro {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 720px;
}
.demo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.demo-main .demo-chips a {
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--demo-border);
    font-size: 13px;
    font-weight: 600;
    color: #2b303b;
}
.demo-main .demo-chips a:hover {
    border-color: var(--demo-accent);
    color: var(--demo-accent-ink);
    text-decoration: none;
}

.demo-main .demo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: center;
    padding-top: 48px;
    border-top: 1px solid var(--demo-border);
    scroll-margin-top: 24px;
}
.demo-row-alt {
    flex-direction: row-reverse;
}
.demo-row .demo-thumb {
    flex: 1 1 420px;
    min-width: 0;
}
.demo-row-copy {
    flex: 1 1 380px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
}
.demo-row-copy h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.015em;
}
.demo-row-copy .demo-lead {
    font-size: 16px;
}
.demo-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.demo-row-actions .demo-btn {
    height: 46px;
    padding: 0 22px;
    font-size: 15px;
}
.demo-row-actions a {
    font-size: 15px;
    font-weight: 600;
}

@media (max-width: 575px) {
    .demo-main {
        padding: 28px 20px 48px;
        gap: 44px;
    }
    .demo-hero,
    .demo-main .demo-row {
        gap: 32px;
    }
    .demo-main .demo-row {
        padding-top: 36px;
    }
    .demo-btn,
    .demo-btn-ghost {
        height: 46px;
        padding: 0 18px;
        font-size: 15px;
    }
    .demo-play {
        width: 56px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .demo-pill-dot {
        animation: none !important;
        transition: none !important;
    }
}
