/* ============================================
   YAMA RIBBON KOREA - 공통 스타일 (v5 리브랜딩)
   컨셉: 크림·골드 아이덴티티 유지, 럭셔리 에디토리얼 정제
   폰트: Paperlogy(국문) + Cormorant Garamond(영문 디스플레이)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ---- Paperlogy 웹폰트 ---- */
@font-face {
    font-family: 'Paperlogy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-1Thin.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-2ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-3Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-5Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-6SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}
@font-face {
    font-family: 'Paperlogy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-9Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

/* ---- 컬러 변수 (정제된 크림·앤티크 골드) ---- */
:root {
    --cream: #F5F0E1;          /* 섹션 배경 (채도를 낮춘 웜 아이보리) */
    --cream-soft: #FBF8F0;     /* 기본 페이지 배경 */
    --cream-deep: #EFE7D2;     /* 진한 포인트 배경 */
    --ivory: #FFFFFF;
    --charcoal: #2A2520;       /* 본문 텍스트 (웜 차콜) */
    --charcoal-soft: #6B6255;  /* 보조 텍스트 */
    --gold: #A9822F;           /* 메인 골드 (오렌지기 제거된 앤티크 골드) */
    --gold-light: #C2A25A;
    --gold-deep: #83682B;
    --ink: #262019;            /* 딥 잉크 (CTA·푸터) */
    --slate: #262019;          /* 하위호환: 기존 slate 참조를 잉크로 매핑 */
    --line: #E7E0CE;           /* 헤어라인 구분선 */
    --serif: 'Cormorant Garamond', 'Nanum Myeongjo', serif;
    --shadow: 0 8px 28px rgba(42, 37, 32, 0.07);
    --shadow-lg: 0 18px 48px rgba(42, 37, 32, 0.10);
    --radius: 12px;
    --maxw: 1180px;
    --header-h: 78px;
}

/* ---- 리셋 ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Paperlogy', 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
    font-weight: 400;
    color: var(--charcoal);
    background: var(--cream-soft);
    line-height: 1.75;
    letter-spacing: -0.008em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
::selection { background: rgba(169, 130, 47, 0.18); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; letter-spacing: -0.022em; word-break: keep-all; }
p { font-weight: 400; }
strong, b { font-weight: 700; }

/* ---- 레이아웃 유틸 ---- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 104px 0; }
.section-sm { padding: 72px 0; }
.text-center { text-align: center; }
.bg-cream { background: var(--cream); }
.bg-cream-soft { background: var(--cream-soft); }
.bg-white { background: var(--ivory); }
.bg-slate { background: var(--ink); color: #EFE8D8; }

/* ---- 에디토리얼 헤딩 시스템 ---- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: 18px;
}
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 34px; height: 1px;
    background: var(--gold-light);
}
.text-center .eyebrow::after {
    content: "";
    display: inline-block;
    width: 34px; height: 1px;
    background: var(--gold-light);
}
.section-title {
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--charcoal);
}
.section-desc {
    font-size: 1rem;
    font-weight: 400;
    color: var(--charcoal-soft);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.85;
}
.text-center .section-desc { margin-left: auto; margin-right: auto; }

/* ---- 버튼 (정제: 슬림 라운드, 자간) ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 30px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.93rem;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .25s ease;
    white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #F4EEDF; }
.btn-primary:hover { background: #3A3128; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-deep); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: rgba(42,37,32,.35); color: var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream-soft); }
.btn-lg { padding: 17px 40px; font-size: 0.98rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================
   헤더 / 네비게이션
   ============================================ */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(251, 248, 240, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    z-index: 1000;
    transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 6px 28px rgba(42,37,32,.08); }
.nav {
    max-width: var(--maxw);
    margin: 0 auto;
    height: 100%;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
    display: block;
    height: 42px;
    width: auto;
}
.footer-logo { height: 38px; }
.footer-brand .brand { margin-bottom: 2px; }
.brand-mark {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: var(--ink);
    color: #EFE4C8;
    border-radius: 4px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: 0;
    padding-bottom: 3px;
}
.brand-text { line-height: 1.2; }
.brand-text .ko { font-weight: 700; font-size: 1.04rem; color: var(--charcoal); letter-spacing: -0.02em; }
.brand-text .en { font-family: var(--serif); font-size: 0.66rem; letter-spacing: 0.24em; color: var(--gold-deep); font-weight: 600; text-transform: uppercase; }

.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-menu a {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1px;
    padding: 8px 13px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--charcoal-soft);
    border-radius: 4px;
    transition: all .2s;
    position: relative;
    text-align: center;
    white-space: nowrap;
}
.nav-menu a .nav-t { display: block; line-height: 1.25; white-space: nowrap; }
.nav-menu a .nav-s {
    display: block; line-height: 1.2;
    font-size: 0.66rem; font-weight: 500; letter-spacing: 0;
    color: var(--charcoal-soft); opacity: .8;
    white-space: nowrap;
}
.nav-menu a:hover .nav-s, .nav-menu a.active .nav-s { color: var(--gold-deep); opacity: 1; }
.nav-menu a:hover { color: var(--charcoal); }
.nav-menu a.active { color: var(--gold-deep); font-weight: 600; }
.nav-menu a.active::after {
    content: ""; position: absolute; left: 13px; right: 13px; bottom: 0;
    height: 1.5px; background: var(--gold);
}
.nav-cta { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
.nav-cta .btn { padding: 11px 20px; font-size: 0.86rem; }

.nav-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    width: 42px; height: 42px;
    flex-direction: column; justify-content: center; gap: 6px;
}
.nav-toggle span {
    display: block; width: 24px; height: 1.5px;
    background: var(--charcoal); border-radius: 2px;
    transition: all .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* 모바일 메뉴 */
.mobile-menu {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--cream-soft);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    z-index: 999;
    padding: 16px 24px 28px;
    box-shadow: var(--shadow);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
    display: block; padding: 14px 10px;
    font-weight: 500; font-size: 1rem;
    border-bottom: 1px solid var(--line);
    color: var(--charcoal);
}
/* 모바일 메뉴에서는 2줄 스팬을 한 줄 문장으로 환원 */
.mobile-menu a .nav-t, .mobile-menu a .nav-s { display: inline; font-size: inherit; color: inherit; opacity: 1; }
.mobile-menu a .nav-s::before { content: " "; }
.mobile-menu a.active { color: var(--gold-deep); }
.mobile-menu .btn { margin-top: 18px; }

/* 본문이 고정헤더에 가리지 않도록 */
main { padding-top: var(--header-h); }

/* ============================================
   페이지 공통 상단 배너
   ============================================ */
.page-hero {
    background: var(--cream);
    padding: 84px 0 72px;
    text-align: center;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.page-hero::after {
    content: "";
    position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
    width: 46px; height: 2px; background: var(--gold);
}
.page-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 700; margin-bottom: 16px; }
.page-hero p { font-size: 1.02rem; font-weight: 400; color: var(--charcoal-soft); max-width: 620px; margin: 0 auto; line-height: 1.8; }
.breadcrumb {
    font-family: var(--serif);
    font-size: 0.86rem; font-weight: 600; color: var(--gold-deep);
    margin-bottom: 18px; letter-spacing: 0.05em; text-transform: uppercase;
    font-feature-settings: 'lnum' 1; font-variant-numeric: lining-nums;
}

/* ============================================
   카드 / 공통 컴포넌트
   ============================================ */
.card {
    background: var(--ivory);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px;
    transition: border-color .3s, box-shadow .3s;
}
.card:hover { border-color: var(--gold-light); box-shadow: var(--shadow); }

.grid { display: grid; gap: 22px; align-items: stretch; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid > * { min-width: 0; }

/* 신뢰지표 (세리프 넘버 + 헤어라인) */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { text-align: center; padding: 34px 12px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat .num { font-family: var(--serif); font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 600; color: var(--gold-deep); line-height: 1; }
.stat .label { margin-top: 12px; font-size: 0.88rem; font-weight: 500; color: var(--charcoal-soft); letter-spacing: -0.01em; }

/* 폼 */
.form-wrap { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); padding: 44px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.form-group label .req { color: #b3543f; margin-left: 3px; }
.form-control {
    width: 100%; padding: 13px 16px;
    border: 1px solid var(--line); border-radius: 6px;
    font-family: inherit; font-size: 0.96rem; font-weight: 400;
    background: var(--cream-soft); color: var(--charcoal);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(169,130,47,.10); background: #fff; }
textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control { cursor: pointer; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.check-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px;
    background: var(--cream-soft); cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: all .2s;
}
.check-item:hover { border-color: var(--gold-light); }
.check-item input { width: 18px; height: 18px; accent-color: var(--gold); }
.check-item.checked { border-color: var(--gold); background: var(--cream); }

.form-note { font-size: 0.85rem; color: var(--charcoal-soft); margin-top: 6px; }

/* 알림 메시지 */
.alert { padding: 16px 20px; border-radius: 6px; margin-bottom: 20px; font-weight: 500; display: none; }
.alert.show { display: block; }
.alert-success { background: #eef4ea; color: #3d6b34; border: 1px solid #cfe0c8; }
.alert-error { background: #fbf0ee; color: #a84a35; border: 1px solid #ecd1c9; }

/* ============================================
   푸터
   ============================================ */
.site-footer {
    background: var(--ink);
    color: #C9C1B0;
    padding: 68px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-brand .brand-text .ko { color: #fff; }
.footer-brand .brand-mark { background: var(--gold); color: #fff; }
.footer-brand p { margin-top: 16px; font-size: 0.9rem; line-height: 1.85; color: #9A9282; max-width: 340px; }
.footer-col h4 { color: #F0EADA; font-size: 0.94rem; font-weight: 700; margin-bottom: 16px; letter-spacing: 0.02em; }
.footer-col a, .footer-col li { display: block; color: #9A9282; font-size: 0.88rem; font-weight: 400; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--gold-light); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact i { color: var(--gold-light); margin-top: 5px; width: 16px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 24px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    font-size: 0.82rem; color: #7E7666;
}
.footer-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--gold-light); font-weight: 500; }

/* ============================================
   애니메이션 (스크롤 등장)
   ============================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   반응형 - 태블릿
   ============================================ */
@media (max-width: 960px) {
    .nav-menu, .nav-cta { display: none; }
    .nav-toggle { display: flex; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat { border-left: none; border-top: 1px solid var(--line); padding: 26px 10px; }
    .stat:nth-child(-n+2) { border-top: none; }
    .stat:nth-child(even) { border-left: 1px solid var(--line); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .section { padding: 76px 0; }
}

/* 반응형 - 모바일 */
@media (max-width: 600px) {
    .container { padding: 0 20px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat { border-left: none !important; }
    .stat:nth-child(even) { border-left: 1px solid var(--line) !important; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .form-wrap { padding: 28px 20px; }
    .section { padding: 60px 0; }
    .card { padding: 24px; }
    .btn { padding: 13px 24px; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ---- 언어 전환 드롭다운 (i18n) ---- */
.lang-dd { position: relative; }
.lang-dd-btn {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--line); background: transparent; color: var(--charcoal);
    font: 600 0.78rem/1 'Paperlogy', sans-serif; padding: 10px 14px; border-radius: 999px;
    cursor: pointer; transition: all .2s; white-space: nowrap;
}
.lang-dd-btn:hover, .lang-dd.open .lang-dd-btn { border-color: var(--gold); color: var(--gold-deep); }
.lang-dd-btn .fa-globe { font-size: 0.8rem; color: var(--gold-deep); }
.lang-dd-btn .fa-chevron-down { font-size: 0.58rem; color: var(--charcoal-soft); transition: transform .25s ease; }
.lang-dd.open .lang-dd-btn .fa-chevron-down { transform: rotate(180deg); }
.lang-dd-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 136px; padding: 6px;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 1300;
}
.lang-dd.open .lang-dd-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dd-menu button {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; text-align: left;
    border: 1px solid transparent; background: transparent; color: var(--charcoal);
    font: 500 0.84rem/1 'Paperlogy', sans-serif; padding: 10px 12px; border-radius: 7px;
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.lang-dd-menu button:hover { background: var(--cream); color: var(--gold-deep); }
.lang-dd-menu button.on { background: var(--cream); border-color: var(--gold-light); color: var(--gold-deep); font-weight: 700; }
.lang-dd-menu button.on::after { content: "✓"; font-size: 0.74rem; }

@media (max-width: 960px) {
    .site-header .nav .lang-dd { display: none; }
    .mobile-menu .lang-dd {
        display: block; padding: 6px 10px 14px;
        border-bottom: 1px solid var(--line); margin-bottom: 8px;
    }
    .mobile-menu .lang-dd-btn { width: 100%; justify-content: space-between; }
    .mobile-menu .lang-dd-menu { left: 10px; right: 10px; }
}
