/* Pawside 랜딩 페이지 — v1.0 가이드 완전 반영.
   상위: 창호지·밤그늘·노을 · Pretendard · 이모지·느낌표·초록 축하 금지.
   랜딩 고유: 세로 시퀀스 메모리얼 · 뭉치 상주 스프라이트 · 파운더 고백체.
*/

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css');

:root {
    --base: #F7F1E8;
    --surface: #FBF5EC;
    --surface-alt: #EFE6D6;
    --text: #2B2420;
    --text-dim: #8C7F72;
    --line: #E5DACB;
    --accent: #C98A4B;
    --accent-hover: #B37A3F;
    --sand-bright: #E9DFD2;   /* 배경 타이포용 — 창호지 위 1.25:1 대비 (aria-hidden) */
    --r-sm: 6px;
    --r-md: 10px;

    --serif: "Maru Buri", "Nanum Myeongjo", "Noto Serif KR", "Apple SD Gothic Neo", serif;
    --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
            "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body.landing-body {
    background: var(--base);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.75;
    word-break: keep-all;
    overflow-wrap: break-word;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

main { display: flex; flex-direction: column; }

/* ═══════════════════════════════════════════════════════════════
   § 뭉치 상주 스프라이트 레이어 (§3)
   ─ position: fixed; bottom 고정 · z-index 최상위 · pointer-events none
   ─ walk/idle/sit — JS 로 전환 · 메모리얼 섹션 재생 중엔 idle/sit 강제
═══════════════════════════════════════════════════════════════ */
.mungchi-layer {
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    height: 148px;
    pointer-events: none;
    z-index: 100;
}
.mungchi-sprite {
    position: absolute;
    left: 0;
    bottom: 12px;
    width: 128px;
    height: 128px;
    background-repeat: no-repeat;
    background-position: 0 0;
    /* transform: translateX + scaleX 는 JS 가 프레임마다 설정 */
    will-change: transform;
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 2px 8px rgba(43, 36, 32, 0.15));
}
@media (max-width: 640px) {
    .mungchi-layer { height: 112px; }
    .mungchi-sprite { width: 96px; height: 96px; }
}

/* ═══════════════════════════════════════════════════════════════
   § 공통 : 사진 프레임 (창호지 인화지 메타포 · §2.3)
═══════════════════════════════════════════════════════════════ */
.photo-frame {
    padding: 14px;                                 /* 창호지 상하좌우 균일 14px */
    background: var(--base);                       /* 창호지 = 페이지 배경과 동일 → 프레임이 종이처럼 살짝 두께만 나옴 */
    border-radius: 2px;                            /* 인화 사진 라운드 */
    box-shadow: 0 4px 24px rgba(43, 36, 32, 0.10); /* 딱 한 겹, 은은한 그림자 */
    display: inline-block;
}
.photo-frame img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 0;                              /* 인화 자체는 각지게 */
}

/* ═══════════════════════════════════════════════════════════════
   § §1 히어로
═══════════════════════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    padding: 80px 24px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-inner {
    max-width: 640px;
    text-align: center;
}
.hero-media {
    margin-bottom: 48px;
}
.hero-media img.hero-static {
    width: 220px;
    height: auto;
    display: inline-block;
    /* 실물 스프라이트 대체 — 캐논 정면. 영상 준비 전 임시. */
    animation: hero-breath 4s ease-in-out infinite;
}
@keyframes hero-breath {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.hero-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(44px, 8vw, 76px);
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}
.hero-def {
    font-family: var(--sans);
    font-size: clamp(15px, 1.7vw, 18px);
    color: var(--text-dim);
    margin: 0 0 44px;
    line-height: 1.7;
}
.hero-cta {
    display: inline-block;
    padding: 14px 28px;
    background: var(--accent);
    color: var(--base);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--r-sm);
    letter-spacing: 0.01em;
    transition: background 250ms ease-out;
}
.hero-cta:hover { background: var(--accent-hover); color: var(--base); }

/* ═══════════════════════════════════════════════════════════════
   § §2 메모리얼 — 세로 시퀀스
   ─ 사진 간 세로 간격 55~65vh (스크롤 중 2장 동시 노출 금지)
   ─ 좌우 오프셋 ±6% · 마지막은 정중앙
   ─ 배경 타이포는 사진 사이 여백에
═══════════════════════════════════════════════════════════════ */
.memorial {
    position: relative;
    padding: 60vh 24px 40vh;                        /* 위아래 큰 breathing room */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 55vh;                                       /* 사진 간 세로 간격 */
    overflow: visible;
}

/* 배경 타이포 (마루 부리 · aria-hidden · WCAG 의도적 미달) */
.bg-typo {
    font-family: var(--serif);
    font-size: clamp(56px, 9vw, 128px);
    font-weight: 400;
    color: var(--sand-bright);
    letter-spacing: -0.02em;
    text-align: center;
    line-height: 1;
    user-select: none;
    pointer-events: none;
    padding: 0 24px;
    /* 사진 사이에 놓이므로 자연 세로 흐름. gap 대신 별도 margin 관리하고 싶으면 조정. */
}
.bg-typo-years {
    /* 도입부: 히어로 아래, 첫 사진 위에 크게 자리 잡음 */
    margin-top: -40vh;
    margin-bottom: -20vh;
    font-size: clamp(64px, 11vw, 160px);
}

/* 개별 사진 · 오프셋 */
.memo-photo {
    margin: 0;
    max-width: min(560px, 90vw);
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    /* 초기 상태: JS 가 IntersectionObserver 로 reveal 처리 */
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
    will-change: opacity, transform;
}
.memo-photo.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.memo-photo .photo-frame {
    /* 원본 비율 유지: JS 는 개입 안 함. 사진마다 실제 비율대로 표시. */
    max-width: 100%;
}
.memo-photo img {
    max-height: 62vh;                              /* 세로 사진 상한 */
    max-width: 560px;                              /* 가로 사진 상한 */
    object-fit: contain;
}
.memo-photo figcaption {
    font-family: var(--sans);
    font-size: 15px;
    color: var(--text-dim);
    text-align: center;
    letter-spacing: 0.01em;
    max-width: 460px;
    line-height: 1.7;
    /* 사실 서술 · 형용사·감탄 금지 · 과거형 유지 (가이드 §2.5) */
}

/* 좌우 오프셋 ±6% (마지막은 정중앙) */
@media (min-width: 640px) {
    .offset-left  { align-self: center; margin-left:  -6vw; }
    .offset-right { align-self: center; margin-right: -6vw; }
    /* memo-photo-4 는 오프셋 클래스 미부여 → 정중앙 */
}

/* §2.6 변환 순간 — 사진 4장이 캐릭터로 */
.bridge {
    margin-top: 30vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}
.bridge.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.bridge-photos {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.bridge-photos img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 8px solid var(--base);
    border-radius: 2px;
    box-shadow: 0 2px 12px rgba(43, 36, 32, 0.08);
}
.bridge-canonical img {
    width: 160px;
    height: auto;
    animation: hero-breath 4s ease-in-out infinite;
}
.bridge-copy {
    font-family: var(--serif);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 400;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════
   § §3 만드는 법 — 3단계
   ─ 아이콘 금지 · 숫자 + 한 문장
   ─ ①의 예시 이미지 = §2에서 본 사진 4장 축소본 재사용
═══════════════════════════════════════════════════════════════ */
.how {
    padding: 100px 24px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.how-inner { max-width: 960px; margin: 0 auto; }
.how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
@media (max-width: 720px) {
    .how-steps { grid-template-columns: 1fr; gap: 48px; }
}
.how-step { text-align: center; }
.how-num {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.15em;
    margin-bottom: 16px;
}
.how-line {
    font-family: var(--sans);
    font-size: clamp(18px, 2vw, 22px);
    color: var(--text);
    line-height: 1.5;
}
.how-mini {
    margin-top: 20px;
    display: flex;
    gap: 6px;
    justify-content: center;
}
.how-mini img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 4px solid var(--base);
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(43, 36, 32, 0.06);
}

/* ═══════════════════════════════════════════════════════════════
   § §4 정직 블록 — 파운더 고백체
   ─ 표·배지·가격 카드 UI 금지
   ─ 1인칭 · ~다 종결 · 문단 흐름만
═══════════════════════════════════════════════════════════════ */
.honesty {
    padding: 100px 24px;
    background: var(--base);
}
.honesty-inner {
    max-width: 620px;
    margin: 0 auto;
    font-family: var(--sans);
    font-size: clamp(15px, 1.7vw, 17px);
    line-height: 1.9;
    color: var(--text);
}
.honesty-inner p {
    margin: 0 0 20px;
}
.honesty-inner p:first-child {
    color: var(--text-dim);
    font-size: 14px;
    letter-spacing: 0.02em;
    margin-bottom: 32px;
}
.honesty-inner b {
    color: var(--text);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   § §5 대기열 폼 — 이메일 1칸 + 버튼
═══════════════════════════════════════════════════════════════ */
.waitlist {
    padding: 100px 24px 120px;
    background: var(--base);
}
.waitlist-inner {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}
.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: opacity 500ms ease-out;
}
.waitlist-form.is-fading { opacity: 0; pointer-events: none; }
.waitlist-form input[type="email"] {
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: 16px;
    color: var(--text);
    text-align: center;
    letter-spacing: 0.01em;
}
.waitlist-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
}
.waitlist-form input[type="email"]::placeholder {
    color: var(--text-dim);
    text-align: center;
}
.waitlist-form button {
    padding: 16px;
    background: var(--accent);
    color: var(--base);
    border: none;
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 250ms ease-out;
}
.waitlist-form button:hover { background: var(--accent-hover); }

.waitlist-thanks {
    font-family: var(--sans);
    font-size: 17px;
    color: var(--text);
    margin: 0;
    padding: 20px 0;
    animation: fade-in 600ms ease-out;
}
@keyframes fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.waitlist-error {
    color: var(--text-dim);
    font-size: 13px;
    margin: 8px 0 0;
}

/* ═══════════════════════════════════════════════════════════════
   § §6 푸터 — 유영소프트, 최소한
═══════════════════════════════════════════════════════════════ */
.landing-footer {
    padding: 60px 24px 160px;                      /* 하단 여유 = 뭉치 스프라이트 공간 */
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    border-top: 1px solid var(--line);
    background: var(--base);
}
.landing-footer .footer-brand {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}
.landing-footer .footer-line {
    margin-bottom: 12px;
}
.landing-footer .footer-line span {
    margin: 0 6px;
    opacity: 0.4;
}
.landing-footer .footer-line a { color: var(--text-dim); }
.landing-footer .footer-line a:hover { color: var(--accent); }
.landing-footer .footer-copyright {
    font-size: 11px;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════
   § 접근성 — prefers-reduced-motion
═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .memo-photo, .bridge {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .hero-media img.hero-static,
    .bridge-canonical img {
        animation: none;
    }
    /* 뭉치 스프라이트는 JS 가 sit 정지 프레임 유지 (§3.3) */
}
