/* =========================================================
   위드홈 공통 스타일 — 모든 페이지(index / about / process / spaces / contact)에서 사용
   페이지마다 다른 스타일은 각 HTML 파일의 <style> 안에 있습니다.
   ========================================================= */

/* ===== 기본 토큰 ===== */
:root {
  /* 메인: 화이트 / 포인트: 그린 */
  --bg: #ffffff;
  --bg-soft: #f4f6f5;   /* 카드 등 아주 옅은 뉴트럴 그레이 */
  --ink: #161a18;
  --ink-soft: #66706b;
  --white: #ffffff;
  --accent: #36543a;       /* withhome_logo_color 배경색 */
  --accent-dark: #283f2c;
  --accent-light: #b7cdb9;
  --line: #e6e9e7;
  --header-h: 84px;
  --gutter: 40px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ===== 헤더 / GNB ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* 좌: 로고 / 중앙: GNB / 우: 비움 */
  align-items: center;
  padding: 0 var(--gutter);
  color: var(--white);
  transition: color .4s var(--ease), background-color .4s var(--ease), opacity 2s var(--ease), transform 2s var(--ease);
}
/* 밝은 배경 위: 어두운 글자 */
.header.is-light { color: var(--ink); }
/* 콘텐츠와 겹칠 때: 흰 배경 */
.header.is-solid { background-color: rgba(255,255,255,.96); box-shadow: 0 1px 0 var(--line); }

.logo { display: flex; align-items: center; gap: 10px; justify-self: start; }
/* 로고 PNG의 투명 여백을 잘라 집 모양만 보이게 → 텍스트와 높이 정렬 */
.logo-mark {
  --mark: 26px;
  position: relative;
  width: calc(var(--mark) * 1.032);
  height: var(--mark);
  overflow: hidden;
  flex-shrink: 0;
}
.logo-mark img {
  position: absolute;
  left: calc(var(--mark) * -0.158);
  top: calc(var(--mark) * -0.2204);
  width: calc(var(--mark) * 1.3484);
  height: calc(var(--mark) * 1.3484);
  max-width: none;
  transition: filter .4s var(--ease);
}
.header.is-light .logo img { filter: brightness(0) saturate(100%); }
/* 어두운 이미지 위(키비주얼·About·서브페이지 상단)에서는 투명 배경 + 흰 글자 */
.header.is-dark-bg { color: var(--white); background-color: transparent; box-shadow: none; }
.header.is-dark-bg .logo img { filter: none; }
.header.is-dark-bg.menu-open { color: var(--ink); }
.header.is-dark-bg.menu-open .logo img { filter: brightness(0) saturate(100%); }
.logo-text {
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  padding-top: 2px; /* 대문자 시각 중심 보정 */
}

.gnb { grid-column: 2; }
.gnb ul { display: flex; gap: 76px; list-style: none; }
.gnb a {
  position: relative;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 6px 0;
  white-space: nowrap;   /* "우리의 방식"처럼 띄어쓰기가 있어도 한 줄 유지 */
}
.gnb a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.gnb a:hover::after,
.gnb a.is-current::after { transform: scaleX(1); transform-origin: left; }
.gnb a.is-current { font-weight: 600; }

.menu-btn {
  display: none;
  grid-column: 3;
  justify-self: end;
  width: 32px; height: 32px;
  background: none; border: 0; cursor: pointer;
  color: inherit;
  position: relative;
}
.menu-btn span {
  position: absolute; left: 4px; right: 4px; height: 1.5px;
  background: currentColor;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-btn span:nth-child(1) { top: 11px; }
.menu-btn span:nth-child(2) { top: 20px; }
.menu-open .menu-btn span:nth-child(1) { top: 15.5px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { top: 15.5px; transform: rotate(-45deg); }

/* 헤더는 페이지 로딩 후 등장 */
body:not(.is-loaded) .header { opacity: 0; transform: translateY(-12px); }

/* ===== 섹션 공통 ===== */
.section { padding: 160px var(--gutter); }
.section-soft { background: var(--bg-soft); }
.container { max-width: 1360px; margin: 0 auto; }
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 64px;
}
.sec-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 18px;
}
.sec-title {
  font-size: clamp(30px, 3.6vw, 52px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.035em;
}
.sec-desc {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
/* <button>으로 쓸 때 기본 회색 배경 제거 (호버 색은 아래 규칙이 우선) */
button.btn-line { background: transparent; cursor: pointer; }
.btn-line:hover { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-line .arrow { transition: transform .3s var(--ease); }
.btn-line:hover .arrow { transform: translateX(4px); }

/* ===== 스크롤 등장 모션 ===== */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

/* 섹션 제목: 줄 단위로 마스크 안에서 아래 → 위 */
.sec-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: .08em;
  margin-bottom: -.08em;
}
.sec-title .line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.4s var(--ease);
  transition-delay: calc(var(--i, 0) * .12s + .1s);
}
.sec-title.is-in .line > span { transform: none; }

/* 이미지: 아래에서 위로 걷히면서 살짝 줌아웃 */
.reveal-img {
  overflow: hidden;
  clip-path: inset(100% 0 0 0 round 20px);
  transition: clip-path 1.6s var(--ease);
}
.reveal-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); transition: transform 2.2s var(--ease); }
.reveal-img.is-in { clip-path: inset(0 0 0 0 round 20px); }
.reveal-img.is-in img { transform: none; }

/* 목록: 자식 요소가 한 개씩 순서대로 (JS가 --i 부여) */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(56px);
  transition: opacity 1s var(--ease), transform 1.3s var(--ease);
  transition-delay: calc(var(--i, 0) * .1s + var(--d, 0s));
}
.reveal-stagger.is-in > * { opacity: 1; transform: none; }

/* 배너 카드: 안쪽 작은 카드에서 원래 크기로 커지며 드러남 + 이미지 줌아웃 */
.reveal-card {
  clip-path: inset(10% 6% 10% 6% round 24px);
  transition: clip-path 1.6s var(--ease);
}
.reveal-card .cta-bg img { transform: scale(1.2); transition: transform 2.2s var(--ease); }
.reveal-card.is-in { clip-path: inset(0 0 0 0 round 24px); }
.reveal-card.is-in .cta-bg img { transform: none; }

/* ===== 숙소 카드 (메인 슬라이더 · 공간모음 페이지 공통) ===== */
.space-card { display: block; min-width: 0; }
.space-card .thumb {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-soft);
}
.space-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.space-card:hover .thumb img { transform: scale(1.06); }
/* 사진이 아직 없는 숙소: 사진 자리에 '이미지 준비 중입니다.' */
.space-card .thumb-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: -0.01em;
}
.space-card .thumb-empty svg { opacity: .5; }
.space-card .tag {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  font-size: 12px;
  font-weight: 600;
}
.space-card .info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.space-card .txt { min-width: 0; }
.space-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.space-card h3,
.space-card .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.space-card .meta {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-soft);
}
/* 예약하기 아이콘 버튼 */
.reserve-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.reserve-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.reserve-btn.is-empty { opacity: .35; cursor: default; }
.reserve-btn.is-empty:hover { background: none; border-color: var(--line); color: var(--accent); }

/* ===== 견적문의 배너 ===== */
.cta { padding: 140px var(--gutter); }
.cta-card {
  position: relative;
  max-width: 1360px;
  min-height: 460px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 24px;
  color: var(--white);
  text-align: center;
  background: var(--accent);
}
.cta-bg { position: absolute; inset: 0; }
.cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22,34,25,.55) 0%, rgba(22,34,25,.72) 100%);
}
.cta-inner { position: relative; z-index: 1; padding: 72px 24px; }
.cta .sec-eyebrow { color: var(--accent-light); }
.cta-desc {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255,255,255,.8);
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding: 17px 35px;
  border: 1px solid var(--white);   /* 기본: 흰 선(stroke) */
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.btn-cta:hover { background: var(--white); color: var(--accent); }   /* 호버: 흰색으로 채움 */
.btn-cta .arrow { transition: transform .3s var(--ease); }
.btn-cta:hover .arrow { transform: translateX(4px); }

/* ===== 서브페이지 상단 (풀블리드 이미지 + 페이지 제목) ===== */
.page-hero {
  position: relative;
  height: 72vh;
  min-height: 520px;
  max-height: 780px;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--gutter) 80px;
  overflow: hidden;
  color: var(--white);
  background: #1d211f;
}
.page-hero.is-short { height: 58vh; min-height: 440px; }
.page-hero-bg { position: absolute; inset: 0; }
.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 2.6s var(--ease);
}
body.is-loaded .page-hero-bg img { transform: scale(1); }
.page-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,17,13,.5) 0%, rgba(12,17,13,.28) 40%, rgba(12,17,13,.72) 100%);
}
.page-hero-inner { position: relative; z-index: 1; width: 100%; }
.page-eyebrow {
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent-light);
}
.page-title {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.035em;
}
.page-title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.page-title .line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.8s var(--ease) calc(var(--i, 0) * .18s + .25s);
}
body.is-loaded .page-title .line > span { transform: none; }
.page-lead {
  margin-top: 24px;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255,255,255,.8);
}
.page-hero .hero-fx {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.6s var(--ease), transform 1.8s var(--ease);
  transition-delay: var(--d, .7s);
}
body.is-loaded .page-hero .hero-fx { opacity: 1; transform: none; }

/* ===== 푸터 ===== */
.footer {
  background: #101412;
  color: rgba(255,255,255,.55);
  padding: 80px var(--gutter) 48px;
  font-size: 14px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer .logo { color: var(--white); }
.footer-nav { display: flex; gap: 32px; list-style: none; }
.footer-nav a { color: rgba(255,255,255,.8); font-size: 15px; transition: color .3s; }
.footer-nav a:hover { color: var(--white); }
.footer-info {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  line-height: 1.6;
}
.footer-info span:not(:last-child):not(.br):not(:has(+ .br))::after {
  content: "";
  display: inline-block;
  width: 1px; height: 11px;
  margin: 0 14px;
  background: rgba(255,255,255,.2);
  vertical-align: -1px;
}
.footer-info .br { flex-basis: 100%; height: 0; }
.footer-bottom {
  margin-top: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: rgba(255,255,255,.8); }
.footer-links a.strong { color: var(--white); font-weight: 600; }

/* ===== 반응형 ===== */
@media (max-width: 1200px) {
  .gnb ul { gap: 44px; } /* 메뉴 5개: 노트북·태블릿 폭에서 로고와 겹치지 않게 */
}
@media (max-width: 900px) {
  :root { --header-h: 64px; --gutter: 24px; }
  .logo-mark { --mark: 22px; }
  .logo-text { font-size: 16px; }
  /* 메뉴 버튼: 터치 영역 44px로 넓히고, 아이콘 오른쪽 끝은 좌우 여백(gutter)에 맞춤 */
  .menu-btn { display: block; z-index: 2; width: 44px; height: 44px; margin-right: -11px; }
  .menu-btn span { left: 11px; right: 11px; }
  .menu-btn span:nth-child(1) { top: 17px; }
  .menu-btn span:nth-child(2) { top: 26px; }
  .menu-open .menu-btn span:nth-child(1),
  .menu-open .menu-btn span:nth-child(2) { top: 21.5px; }
  .gnb {
    position: fixed;
    inset: 0;
    background: var(--bg);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
  }
  .gnb ul { flex-direction: column; align-items: center; gap: 36px; }
  .gnb a { font-size: 24px; font-weight: 600; }
  .menu-open .gnb { opacity: 1; visibility: visible; }
  .menu-open { color: var(--ink); }
  .menu-open .logo img { filter: brightness(0) saturate(100%); }
  .logo { position: relative; z-index: 2; }

  .section { padding: 100px var(--gutter); }
  .sec-head { margin-bottom: 36px; align-items: flex-end; }
  .sec-desc { font-size: 16px; }
  .reserve-btn { width: 36px; height: 36px; }
  .reserve-btn svg { width: 16px; height: 16px; }
  .space-card h3 { font-size: 16px; }
  .space-card .info { margin-top: 12px; gap: 8px; }
  .space-card .meta { font-size: 13px; }
  .space-card .tag { top: 8px; left: 8px; font-size: 11px; }
  .cta { padding: 80px var(--gutter); }
  .cta-card { min-height: 400px; border-radius: 18px; }
  .cta-inner { padding: 56px 20px; }
  .cta-desc { font-size: 15px; }
  .btn-cta { margin-top: 28px; padding: 16px 30px; font-size: 15px; }
  .page-hero { min-height: 460px; padding-bottom: 48px; }
  .page-hero.is-short { min-height: 380px; }
  .page-lead { font-size: 15px; margin-top: 16px; }
  .page-lead br { display: none; }
  .footer { padding: 60px var(--gutter) 40px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-nav { gap: 20px; flex-wrap: wrap; }
  .footer-links { flex-wrap: wrap; gap: 10px 20px; } /* 좁은 폰에서는 다음 줄로 */
}
@media (max-width: 560px) {
  .sec-head .sec-desc br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .sec-title .line > span,
  .reveal-img img,
  .reveal-stagger > *,
  .page-title .line > span,
  .page-hero .hero-fx,
  .page-hero-bg img { opacity: 1; transform: none; transition: none; }
  .reveal-img,
  .reveal-card { clip-path: none; transition: none; }
  .reveal-card .cta-bg img { transform: none; transition: none; }
}
