/* ─────────────────────────────────────────────────────────────
   서비스 랜딩 공통 셸 — /landings/chemicode, /landings/mumul
   메인(index.ejs)의 다크+허니 톤을 그대로 물려받되, 서비스별 CSS 가
   --accent 계열만 덮어쓴다. 톤은 ilbeol.com, 색은 그 서비스 것.
   ───────────────────────────────────────────────────────────── */

:root {
    --ink: #0B0B0C;
    --ink-2: #141416;
    --ink-3: #1E1F22;
    --line: #2A2B2F;
    --text: #E5E7EB;
    --muted: #9CA3AF;
    --dim: #6B7280;
    --honey: #F5B301;

    /* 서비스별 CSS 에서 덮어쓴다 */
    --accent: #F5B301;
    --accent-soft: #FFD86B;
    --accent-ink: #0B0B0C;
    --accent-glow: rgba(245, 179, 1, 0.25);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: 'Pretendard', 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    line-height: 1.7;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* 한국어는 마지막 줄에 한두 어절만 남는 일이 잦다. 브라우저에 줄 배분을 맡긴다. */
h1,
h2,
h3 {
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

/* ── 레이아웃 ───────────────────────────────────────────────── */

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

.wrap-narrow {
    max-width: 820px;
}

.section {
    padding: 88px 0;
}

.section-alt {
    background: #0E0E10;
}

.section-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.center {
    text-align: center;
}

/* ── 헤더 ───────────────────────────────────────────────────── */

.site-head {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.head-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.brand-sep {
    color: var(--dim);
    font-weight: 400;
}

.brand-service {
    color: var(--accent);
}

.head-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
    color: var(--muted);
}

.head-nav a {
    text-decoration: none;
    transition: color .2s ease;
}

.head-nav a:hover {
    color: var(--accent);
}

/* ── 히어로 ─────────────────────────────────────────────────── */

.hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 80px;
    background-color: var(--ink);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent 62%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: auto, 48px 48px, 48px 48px;
    background-position: 0 0, -1px -1px, -1px -1px;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero h1 {
    font-size: 44px;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.035em;
    margin: 18px 0 18px;
}

.hero .lead {
    margin: 0 0 28px;
}

.hero-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-visual {
    position: relative;
}

/* ── 지표 줄 ────────────────────────────────────────────────── */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 62px;
}

.stat {
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    padding-left: 18px;
}

.stat:first-child {
    border-left: none;
    padding-left: 0;
}

.stat-num {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--accent);
    line-height: 1.2;
}

.stat-num span {
    font-size: 18px;
}

.stat-label {
    font-size: 13.5px;
    margin-top: 4px;
}

.stat-sub {
    font-size: 12px;
    color: var(--dim);
    margin-top: 2px;
}

/* ── 버튼 ───────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 10px 30px -12px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px -14px var(--accent-glow);
}

.btn-ghost {
    border-color: var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-sm {
    padding: 9px 16px;
    font-size: 13px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.center .cta-row {
    justify-content: center;
}

.cta-note {
    font-size: 13px;
    color: var(--dim);
    margin-top: 14px;
}

/* ── 텍스트 조각 ────────────────────────────────────────────── */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    text-transform: uppercase;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.sec-head {
    max-width: 640px;
    margin-bottom: 44px;
}

.center .sec-head {
    margin-left: auto;
    margin-right: auto;
}

.sec-title {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.3;
    margin: 16px 0 12px;
}

.sec-sub {
    color: var(--muted);
    margin: 0;
}

.lead {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.85;
}

.lead strong,
.body-text strong {
    color: #fff;
    font-weight: 700;
}

.body-text {
    color: var(--muted);
    line-height: 1.85;
}

.note {
    font-size: 13px;
    color: var(--dim);
    line-height: 1.7;
}

.dim {
    color: var(--dim);
}

.small {
    font-size: 13px;
}

.hl {
    color: var(--accent);
}

/* ── 카드 ───────────────────────────────────────────────────── */

.grid {
    display: grid;
    gap: 18px;
}

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

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

.card {
    background: linear-gradient(180deg, rgba(30, 31, 34, 0.72), rgba(20, 20, 22, 0.72));
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.card-link {
    text-decoration: none;
    display: block;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 22px 44px -24px var(--accent-glow);
}

.card-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.card h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
}

/* ── 스크린샷 ───────────────────────────────────────────────── */

.shot-frame {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--ink-2);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}

/* 캡처마다 원본 비율이 다르다(섹션 요소를 잘라 굽기 때문). 그대로 깔면 한 줄
   안에서 카드 높이가 어긋나 캡션 줄이 계단처럼 밀린다 — 16:9 로 맞춰 세운다. */
.shot-btn {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--ink-2);
    cursor: zoom-in;
    transition: border-color .2s ease, transform .2s ease;
}

.shot-btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.shot-btn img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top center;
}

.shot-cap {
    margin-top: auto;
}

.shot-cap {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--muted);
    text-align: left;
}

/* ── 단계 목록 ──────────────────────────────────────────────── */

.steps {
    list-style: none;
    counter-reset: step;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding: 22px 24px 22px 68px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 22px;
    top: 22px;
    font-weight: 900;
    font-size: 14px;
    color: var(--accent-ink);
    background: var(--accent);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.steps p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* ── 코드 블록 ──────────────────────────────────────────────── */

.code {
    margin: 18px 0 0;
    padding: 16px 18px;
    background: #08080A;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #D8DEE9;
}

.code .tok {
    color: var(--accent-soft);
}

/* ── FAQ ────────────────────────────────────────────────────── */

.faq {
    display: grid;
    gap: 10px;
}

.faq details {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 4px 20px;
}

.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 0;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    color: var(--accent);
    font-size: 20px;
    line-height: 1;
    transition: transform .2s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14.5px;
}

/* ── 푸터 ───────────────────────────────────────────────────── */

.site-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #000;
    padding: 42px 0;
    font-size: 14px;
}

.foot-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
}

.foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 26px;
    color: var(--muted);
}

.foot-links a {
    text-decoration: none;
}

.foot-links a:hover {
    color: var(--accent);
}

.foot-legal {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--dim);
    font-size: 12px;
}

/* ── 라이트박스 ─────────────────────────────────────────────── */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 10px;
}

.lightbox figcaption {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin-top: 14px;
}

.lb-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

/* ── 반응형 ─────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px 16px;
    }

    .stat:nth-child(3) {
        border-left: none;
        padding-left: 0;
    }
}

@media (max-width: 720px) {
    .section {
        padding: 62px 0;
    }

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

/* 한국어 히어로 문장은 390px 에서 마지막 한 글자만 다음 줄로 떨어지기 쉽다.
   ("…필요합니 / 다.") 한 단계 더 줄여 문장이 끊기지 않게 한다. */
@media (max-width: 430px) {
    .hero h1 {
        font-size: 27px;
    }

    .sec-title {
        font-size: 23px;
    }

    .sec-title {
        font-size: 25px;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .head-nav {
        display: none;
    }

    .steps li {
        padding: 20px 18px 20px 18px;
    }

    .steps li::before {
        position: static;
        margin-bottom: 12px;
    }
}
