/* =========================================================
   신선당 홈페이지 스타일 — 진한 색 펜화 포스터
   색은 아래 :root 에서 한 번에 바꿀 수 있어요.
   ========================================================= */

:root {
    --night: #1a1626;        /* 밤 잉크: 바탕 */
    --night-2: #241e35;      /* 조금 밝은 밤 */
    --stock: #f4e6cc;        /* 포스터 종이 */
    --stock-dim: #cbbda4;    /* 흐린 종이색 글자 */
    --coral: #ff7a6b;        /* 분홍 연기: 주요 버튼 */
    --coral-soft: #ffb3a4;
    --blue: #3d8be6;         /* 전기 파랑 */
    --blue-light: #7db8ff;
    --violet: #6a4fb3;
    --violet-light: #b49cff;
    --yellow: #ffd166;       /* 창문 불빛 */
    --teal: #2a9d7f;
    --teal-light: #6fd9b8;

    --line: 3px;
    --wrap: 1280px;

    --font-title: 'Gasoek One', 'Pretendard Variable', Pretendard, sans-serif;
    --font-body: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', sans-serif;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; scrollbar-color: var(--coral) var(--night); }
body {
    margin: 0;
    background: var(--night);
    color: var(--stock);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
}
/* 실크스크린 같은 종이 결 */
body::after {
    content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 1.4 -.95'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .14; mix-blend-mode: soft-light;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 2px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-title); font-weight: 400; line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; }
em { font-style: normal; }
::selection { background: var(--coral); color: var(--night); }
:focus-visible { outline: var(--line) solid var(--yellow); outline-offset: 4px; border-radius: 4px; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: var(--coral); border: 3px solid var(--night); border-radius: 8px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 16px; background: var(--yellow); color: var(--night); font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 28px; }

/* ---------- 버튼 ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 56px; padding: 0 28px;
    font: 800 17px/1 var(--font-body); color: var(--night);
    text-decoration: none; white-space: nowrap;
    border: var(--line) solid transparent; border-radius: 8px;
    cursor: pointer; background: none;
    transition: background-color .15s, color .15s, border-color .15s, transform .25s var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-coral { background: var(--coral); }
.btn-coral:hover { background: var(--yellow); }
.btn-line { border-color: var(--stock); color: var(--stock); }
.btn-line:hover { background: var(--stock); color: var(--night); }
.btn-ink { background: var(--night); color: var(--stock); }
.btn-ink:hover { background: var(--coral); color: var(--night); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn[aria-disabled="true"] { border-color: #8a7d66; color: #5c5240; cursor: default; transform: none; }

/* ---------- 상단 ---------- */
.masthead { position: sticky; top: 0; z-index: 50; background: transparent; border-bottom: 2px solid transparent; transition: background-color .2s, border-color .2s; }
.masthead.is-stuck { background: var(--night); border-bottom-color: var(--coral); }
.masthead-inner { display: flex; align-items: center; gap: 32px; min-height: 78px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.wordmark b { font-family: var(--font-title); font-weight: 400; font-size: 32px; line-height: 1; }
.wordmark small { font-size: 14px; font-weight: 700; color: var(--coral); letter-spacing: .02em; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-weight: 700; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--coral); }

/* ---------- 첫 화면 ---------- */
.hero { position: relative; }
/* 입 속으로 들어가기: 모든 화면에서 켜져요(js 가 html 에 dive-on 을 붙임, 동작 줄이기 설정이면 꺼짐) */
.stage { padding: 36px 0 120px; }
.dive-on .dive { height: 260vh; }
.dive-on .stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 70px 0 0; display: flex; align-items: center; overflow: clip; }
.dive-on .stage .hero-grid { width: 100%; }
.dive-on .hero-copy { opacity: var(--fade, 1); transform: translateX(var(--slide, 0)); }
.dive-on .poster { transform: translate(var(--tx, 0), var(--ty, 0)) scale(var(--s, 1)); transform-origin: var(--ox, 50%) var(--oy, 50%); will-change: transform; }
.dive-on .poster figcaption { opacity: var(--fade, 1); }
.dive-on .print { transform: rotate(var(--r, 2.2deg)); transition: none; }
.dive-on #make { scroll-margin-top: calc(110px - 62vh); }
.dive-on .make { margin-top: -75vh; padding-top: 62vh; position: relative; z-index: 3; background: linear-gradient(to bottom, rgba(26, 22, 38, 0) 0, rgba(26, 22, 38, .8) 30vh, var(--night) 55vh); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 32px; }
.hero h1 {
    font-size: clamp(50px, 7.2vw, 112px); line-height: 1.02;
    margin-right: -14%;
    /* 그림 위에 겹칠 때도 읽히도록 밤색 테두리 */
    text-shadow: 3px 3px 0 var(--night), -3px -3px 0 var(--night), 3px -3px 0 var(--night), -3px 3px 0 var(--night), 0 4px 0 var(--night), 4px 0 0 var(--night), 0 -4px 0 var(--night), -4px 0 0 var(--night);
}
.hero h1 span { display: block; }
.y { color: var(--yellow); }
.b { color: var(--blue-light); }
.c { color: var(--coral); }
.lede { max-width: 30em; font-size: 19px; line-height: 1.6; color: var(--stock); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* 운영자 그림 포스터 + 돋보기 */
.poster { margin: 0; justify-self: end; width: min(500px, 100%, calc((100vh - 230px) / 1.5 + 28px)); min-width: 300px; }
.print {
    position: relative; padding: 14px; background: var(--stock);
    transform: rotate(2.2deg);
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7);
    transition: transform .5s var(--ease);
}
.poster:hover .print { transform: rotate(0); }
.print img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.print.loupe-ready img { cursor: none; }
.loupe {
    position: absolute; left: 0; top: 0; width: 220px; height: 220px; border-radius: 50%;
    border: 4px solid var(--stock); box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
    background-repeat: no-repeat; background-color: var(--night);
    opacity: 0; pointer-events: none; transition: opacity .15s;
}
.print.loupe-on .loupe { opacity: 1; }
.print .missing { display: none; }
.print.no-image img { display: none; }
.print.no-image .missing {
    display: grid; place-items: center; aspect-ratio: 2 / 3;
    background: repeating-linear-gradient(-45deg, var(--violet) 0 14px, var(--night-2) 14px 28px);
    font-family: var(--font-title); font-size: 28px; color: var(--stock);
}
.poster figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-top: 22px; padding-inline: 6px; }
.poster figcaption b { font-family: var(--font-title); font-weight: 400; font-size: 22px; color: var(--coral); }
.hint { font-size: 14px; color: var(--stock-dim); }
@media (hover: none) { .hint { display: none; } }

/* 구역 사이 띠: 운영자 그림의 도시 한 줄(좌우를 이어 붙여 이음매 없음)을 물들여 천천히 흘려요 */
.strip { --tile: 1438px; position: relative; isolation: isolate; height: 150px; background: var(--coral); overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
            mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent); }
.strip::before { content: ""; position: absolute; inset: 0;
    background: url("../images/strip-1.jpg") 0 0 / auto 100% repeat-x;
    filter: grayscale(1) contrast(1.4); mix-blend-mode: multiply;
    animation: drift 90s linear infinite; }
.strip-2 { background: var(--violet-light); }
.strip-2::before { background-image: url("../images/strip-2.jpg"); animation-direction: reverse; }
@keyframes drift { to { background-position-x: calc(-1 * var(--tile)); } }

/* ---------- 하는 일 ---------- */
.make { padding: 120px 0 150px; }
.section-title { font-size: clamp(46px, 6.4vw, 100px); margin-bottom: 60px; }
.formats { list-style: none; margin: 0; padding: 0; border-top: 2px solid rgba(244, 230, 204, .22); }
.formats li { border-bottom: 2px solid rgba(244, 230, 204, .22); }
.format {
    all: unset; box-sizing: border-box;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 380px); align-items: center; gap: 28px;
    width: 100%; padding: 16px 0; cursor: pointer;
}
.format .word {
    font-family: var(--font-title); font-size: clamp(56px, 8.6vw, 136px); line-height: 1.08;
    color: transparent; -webkit-text-stroke: 2px var(--stock);
    transition: color .2s, -webkit-text-stroke-color .2s, transform .45s var(--ease);
}
.format .desc { display: flex; flex-direction: column; gap: 6px; font-size: 19px; font-weight: 600; }
.format .desc small { font-size: 14.5px; font-weight: 500; color: var(--stock-dim); }
.format:hover .word, .format.is-active .word { color: var(--c); -webkit-text-stroke-color: var(--c); transform: translateX(18px); }
.format.is-active .desc span { color: var(--c); }
.format:focus-visible { outline: var(--line) solid var(--yellow); outline-offset: 6px; }
.format.is-touring .word { color: var(--c); -webkit-text-stroke-color: var(--c); transform: translateX(18px); }
.pick-status { min-height: 1.6em; margin-top: 26px; font-size: 18px; font-weight: 700; }
.pick-status a { color: var(--coral); display: inline-flex; align-items: center; gap: 4px; }
.pick-status svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 만든 것들: 운영자 그림을 잘라 물들인 포스터 인쇄물 ---------- */
.works-section { position: relative; padding: 110px 0 170px; }
.works-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; margin-bottom: 64px; }
.works-head .section-title { margin: 0; }
.works-head p { font-size: 19px; font-weight: 600; color: var(--stock-dim); padding-bottom: 10px; }
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 44px; }
.work {
    position: relative; display: flex; flex-direction: column;
    background: var(--stock); color: var(--night);
    padding: 14px;                       /* 포스터 종이 여백 */
    transform: rotate(var(--tilt, -1.2deg));
    box-shadow: 0 30px 50px -26px rgba(0, 0, 0, .8);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .25s, filter .25s;
}
.work:nth-child(even) { --tilt: 1.4deg; margin-top: 70px; }
.work:hover, .work:focus-within { transform: rotate(0) translateY(-8px); box-shadow: 0 44px 70px -28px rgba(0, 0, 0, .9); z-index: 2; }
.works.filtering .work:not(.match) { opacity: .25; filter: grayscale(1); }
.works.filtering .work.match { transform: rotate(0) scale(1.02); box-shadow: 0 0 0 5px var(--coral), 0 44px 70px -28px rgba(0, 0, 0, .9); }
.work-art {
    position: relative; isolation: isolate; height: 430px;
    display: flex; align-items: flex-end; justify-content: center; gap: 18px;
    padding: 56px 24px 0;
    background: var(--g, var(--blue));
    overflow: hidden;
}
/* 운영자 그림의 한 부분을 흑백으로 깔고 작업 색으로 물들여요 */
.work-art::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: url("../images/owner.jpg") var(--bp, 50% 50%) / 280% auto no-repeat;
    filter: grayscale(1) contrast(1.35) brightness(1.05);
    mix-blend-mode: multiply; opacity: .9;
    transition: transform 1.2s var(--ease);
}
.work:hover .work-art::before { transform: scale(1.08); }
.work-title {
    position: absolute; left: 22px; top: 18px; right: 22px; z-index: 3;
    font-size: clamp(40px, 4.4vw, 64px); color: var(--stock);
    text-shadow: 3px 3px 0 var(--night), -3px -3px 0 var(--night), 3px -3px 0 var(--night), -3px 3px 0 var(--night), 0 4px 0 var(--night), 4px 0 0 var(--night), 0 -4px 0 var(--night), -4px 0 0 var(--night);
    pointer-events: none;
}
.work-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 12px 10px; flex: 1; }
.work-body .kind { font-size: 15px; font-weight: 800; color: #a8331f; }
.work-body p { max-width: 38em; }
.work-body .btn { align-self: flex-start; margin-top: auto; }

/* 휴대폰 틀: 마우스를 올리면 화면이 아래로 흘러요 */
.phone {
    width: 210px; height: 310px; flex: none; position: relative; z-index: 2;
    padding: 12px 10px 0; background: #fff;
    border: var(--line) solid var(--night); border-bottom: 0; border-radius: 30px 30px 0 0;
}
.phone .screen { height: 100%; overflow: hidden; border: 2px solid var(--night); border-bottom: 0; border-radius: 20px 20px 0 0; }
.phone img { width: 100%; height: auto; transition: transform 2.4s cubic-bezier(.3, .6, .3, 1); }
.work:hover .phone img, .work:focus-within .phone img { transform: translateY(var(--pan, -38%)); }
.phone.tilt { transform: rotate(6deg) translateY(18px); }

/* 브라우저 틀 */
.browser { position: relative; z-index: 2; width: min(520px, 100%); height: 290px; background: #fff; border: var(--line) solid var(--night); border-bottom: 0; border-radius: 12px 12px 0 0; overflow: hidden; }
.browser .bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-bottom: 2px solid var(--night); font-size: 13px; font-weight: 700; }
.browser .bar i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--night); }
.browser .bar i:nth-child(1) { background: var(--coral); } .browser .bar i:nth-child(2) { background: var(--yellow); } .browser .bar i:nth-child(3) { background: var(--teal); }
.browser .bar span { margin-left: 8px; }
.browser .view { height: calc(100% - 36px); overflow: hidden; }
.browser .view img { width: 100%; transition: transform 2.4s cubic-bezier(.3, .6, .3, 1); }
.work:hover .browser .view img, .work:focus-within .browser .view img { transform: translateY(var(--pan, -30%)); }

/* 가디언즈 검사 화면 모형 */
.check { padding: 22px 26px; }
.check b { display: block; font-family: var(--font-title); font-weight: 400; font-size: 24px; margin-bottom: 10px; }
.check ul { list-style: none; margin: 0; padding: 0; }
.check li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 2px solid var(--night); font-weight: 700; }
.check li svg { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--night); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.check li svg circle { fill: #fff; transition: fill .25s; }
.work:hover .check li svg circle { fill: var(--teal-light); }
.check li em { margin-left: auto; font-size: 13px; padding: 2px 10px; border: 2px solid var(--night); border-radius: 20px; background: var(--yellow); }

/* 신화 쇼츠 세 장 */
.shorts { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 14px; }
.short { width: 150px; aspect-ratio: 9 / 16; flex: none; position: relative; border: var(--line) solid var(--night); border-bottom: 0; border-radius: 14px 14px 0 0; overflow: hidden; background: var(--night); transition: transform .4s var(--ease); }
.short img { width: 100%; height: 100%; object-fit: cover; }
.short:nth-child(1) { transform: translateY(40px) rotate(-5deg); }
.short:nth-child(3) { transform: translateY(40px) rotate(5deg); }
.work:hover .short:nth-child(1), .work:focus-within .short:nth-child(1) { transform: translateY(12px) rotate(-9deg); }
.work:hover .short:nth-child(3), .work:focus-within .short:nth-child(3) { transform: translateY(12px) rotate(9deg); }
.short .play { position: absolute; left: 50%; top: 42%; width: 50px; height: 50px; translate: -50% -50%; }
.short .play circle { fill: var(--coral); stroke: var(--night); stroke-width: 2.5; }
.short .play path { fill: var(--night); }

/* 아톰 원고 세 장 */
.pages { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 14px; }
.page { width: 170px; aspect-ratio: 2 / 3; flex: none; overflow: hidden; background: #000; border: var(--line) solid var(--stock); border-bottom: 0; transition: transform .45s var(--ease); }
.page img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.page:nth-child(1) { transform: translateY(46px) rotate(-6deg); }
.page:nth-child(3) { transform: translateY(46px) rotate(6deg); }
.work:hover .page:nth-child(1), .work:focus-within .page:nth-child(1) { transform: translate(-10px, 14px) rotate(-10deg); }
.work:hover .page:nth-child(3), .work:focus-within .page:nth-child(3) { transform: translate(10px, 14px) rotate(10deg); }
.work:hover .page img { transform: scale(1.08); }
.stamp { position: absolute; right: 18px; bottom: 22px; z-index: 4; padding: 6px 14px; font-family: var(--font-title); font-size: 24px; color: var(--coral); border: var(--line) solid var(--coral); border-radius: 8px; background: var(--night); transform: rotate(-8deg); }

/* ---------- 문의 ---------- */
.contact { position: relative; padding: 150px 0 150px; }
.contact-inner { display: grid; grid-template-columns: 1.25fr .75fr; align-items: end; gap: 48px; }
.contact .section-title { font-size: clamp(50px, 7.4vw, 118px); margin: 0; }
.contact-side { display: flex; flex-direction: column; gap: 22px; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.addr { font-size: 20px; font-weight: 800; }
.copy-done { font-size: 14px; font-weight: 700; color: var(--coral); min-width: 7em; }

/* ---------- 맨 아래 ---------- */
.footer { border-top: 2px solid rgba(244, 230, 204, .2); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px; padding-block: 34px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer .copy { margin-left: auto; font-size: 14px; color: var(--stock-dim); }

/* ---------- 인쇄물이 위에서부터 '찍혀' 나오는 효과 ---------- */
.js-reveal .reveal { clip-path: inset(-100px -100px 100% -100px); }
.js-reveal .reveal.in { clip-path: inset(-100px); transition: clip-path .9s var(--ease); }
.js-reveal .reveal.done { clip-path: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js-reveal .reveal { clip-path: none; }
}

/* ---------- 화면 크기별 ---------- */
@media (max-width: 1080px) {
    .work-art { height: 380px; }
    .phone { width: 180px; height: 290px; }
    .short { width: 120px; }
    .page { width: 140px; }
}
@media (max-width: 900px) {
    /* 휴대폰: 글씨가 먼저 보이고 그림은 아래에 걸쳐 있다가, 스크롤하면 가운데로 올라와 입 속으로 */
    .dive-on .dive { height: 240vh; }
    .dive-on .stage { align-items: flex-start; padding-top: 84px; }
    .dive-on .hero-copy { transform: translateY(var(--lift, 0)); }
    .dive-on .poster figcaption { display: none; }
    .nav { display: none; }
    .masthead .btn { margin-left: auto; }
    .stage { padding-bottom: 110px; }
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero h1 { margin-right: 0; }
    .poster { justify-self: center; width: min(440px, 100%); }
    .format { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
    .works { grid-template-columns: 1fr; gap: 44px; }
    .work:nth-child(even) { margin-top: 0; }
    .contact-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .wrap { padding-inline: 18px; }
    .masthead-inner { gap: 12px; min-height: 66px; }
    .wordmark b { font-size: 27px; }
    .wordmark small { display: none; }
    .masthead .btn { padding: 0 14px; min-height: 42px; font-size: 14px; }
    .stage { padding-top: 20px; }
    .hero h1 { font-size: clamp(42px, 12.5vw, 60px); }
    .lede { font-size: 17px; }
    .make { padding: 90px 0 110px; }
    .section-title { margin-bottom: 40px; }
    .format .word { -webkit-text-stroke-width: 1.5px; }
    .works-section { padding: 90px 0 110px; }
    .work-art { height: 330px; padding: 64px 12px 0; }
    .work { padding: 10px; }
    .phone { width: 160px; height: 250px; }
    .phone.tilt { display: none; }
    .browser { height: 240px; }
    .short { width: 96px; }
    .page { width: 104px; }
    .work-body { padding: 20px; }
    .contact { padding: 110px 0 110px; }
    .strip { height: 110px; --tile: 1055px; }
    .footer .copy { margin-left: 0; }
}

