@import url("../header/header.css");
@import url("../header/allmenu.css");
@import url("../footer/footer.css");
@import url("../footer/tabbar.css");
@import url("../modal/consult-modal.css");

/* 공통 — 전 페이지
   색/간격 토큰, 리셋, 로고, 여행 카드, 버튼, 하위 페이지 레이아웃 */

:root {
  --ivory: #faf7f1;
  --ivory-deep: #f2ece0;
  --surface: #ffffff;
  --ink: #1c211d;
  --muted: #6d7168;
  --subtle: #8b8e85;
  --line: #e7e0d2;
  --forest: #24352b;
  --forest-deep: #182119;
  --clay: #bd6a45;
  --clay-deep: #a2532f;
  --clay-tint: #f4e2d3;
  --on-dark: #f6f2e9;
  --on-dark-muted: #cfd3c6;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 6px rgba(28, 33, 29, 0.04), 0 10px 24px rgba(28, 33, 29, 0.05);
  --shadow-md: 0 4px 10px rgba(28, 33, 29, 0.05), 0 20px 44px rgba(28, 33, 29, 0.09);
  --shadow-lg: 0 20px 56px rgba(24, 33, 25, 0.18);

  --sp-section: 132px;
  --sp-section-half: 50px;
  --sp-grid: 26px;

  --gutter: 6vw;
  --content-max: 1280px;
  --header-height: 80px;
  --tabbar-height: 0px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Pretendard Variable", "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 450;
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-height) + var(--safe-bottom));
}
body.locked {
  overflow: hidden;
}
h1, h2, h3, h4, h5, h6, p, figure, dl, dd {
  margin: 0;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  word-break: keep-all;
}
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
img, svg, video {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}

/* 접근성 · 타이포 */
.sr_only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

.visual_title,
.intro_title,
.section_head_title,
.curated_title,
.curated_card_title,
.group_title,
.quote_panel p,
.editorial_title,
.explore_title,
.modal_title,
.trip_card_title {
  font-family: "Noto Serif KR", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.kicker {
  margin: 0 0 14px;
  color: var(--clay-deep);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

br.desktop_only {
  display: inline;
}
br.mobile_only {
  display: none;
}

/* 섹션 간격 */
main > section,
.merch > section {
  padding-block: var(--sp-section-half);
  padding-inline: var(--gutter);
}

main > .main_visual,
main > .sub_visual {
  padding: 0;
}

main > section.section_bleed,
.merch > section.section_bleed {
  padding-inline: 0;
}
.section_bleed > .section_head {
  padding-inline: var(--gutter);
}

/* 로고 — 헤더·전체 메뉴·푸터 공통 */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.logo_img {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.logo_text {
  font-size: 21px;
}

/* 여행/이야기 카드 — 홈, 여행 찾기, 이야기 목록 */
.trip_card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.trip_card_media {
  position: relative;
  display: block;
  height: 300px;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--ivory-deep);
}
.trip_card_media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.trip_card_chip {
  position: absolute;
  left: 16px;
  top: 16px;
  min-width: 34px;
  height: 34px;
  padding-inline: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(250, 247, 241, 0.92);
  color: var(--forest-deep);
  font-size: 13px;
  font-weight: 700;
}
.trip_card_body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.trip_card_region {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--clay-deep);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.trip_card_nights {
  color: var(--subtle);
  font-weight: 600;
  letter-spacing: 0;
}
.trip_card_nights::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--line);
}
.trip_card_title {
  font-size: 21px;
  line-height: 1.4;
}
.trip_card_desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}
.trip_card_meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.trip_card_meta li {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--ivory-deep);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.trip_card_foot {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.trip_card_price {
  font-size: 15px;
  font-weight: 700;
}
.trip_card_link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--clay-deep);
}

/* 버튼 */
.btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding-inline: 26px;
  margin-top: 28px;
  border-radius: var(--radius-pill);
  background: var(--forest-deep);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn_light {
  background: #fff;
  color: var(--forest-deep);
}
.btn_dark {
  background: var(--clay);
  color: #fff;
}

/* 하위 페이지 머리말 · 카드 그리드 · 하단 CTA */
.page_top {
  padding-top: calc(var(--header-height) + var(--safe-top));
}

.page_head {
  text-align: center;
}
.page_head_title {
  font-family: "Noto Serif KR", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.3;
  margin: 10px 0 16px;
}
.page_head_desc {
  max-width: 620px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.trip_grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-grid);
}
.trip_card_static {
  height: auto;
}

.closing_panel {
  padding: 76px 6vw;
  border-radius: var(--radius-lg);
  background: var(--forest);
  color: var(--on-dark);
  text-align: center;
}
.closing_panel .kicker {
  color: var(--clay-tint);
}
.closing_title {
  font-family: "Noto Serif KR", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.45;
}
.closing_panel .btn {
  align-self: center;
}

/* 태블릿 */
@media (max-width: 1023px) {
  :root {
    --sp-section: 104px;
    --sp-section-half: 52px;
    --header-height: 68px;
  }
  .trip_grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 모바일 */
@media (max-width: 767px) {
  :root {
    --gutter: 20px;
    --sp-section: 56px;
    --sp-section-half: 25px;
    --tabbar-height: 78px;
  }
  html {
    scroll-behavior: auto;
  }
  br.desktop_only {
    display: none;
  }
  br.mobile_only {
    display: inline;
  }
  .kicker {
    margin-bottom: 8px;
    font-size: 11.5px;
  }
  .trip_card_media {
    height: 62vw;
    max-height: 340px;
  }
  .trip_card_title {
    font-size: 19px;
    line-height: 1.32;
  }
  .trip_card_desc {
    line-height: 1.6;
  }
  .page_head {
    text-align: left;
  }
  .page_head_title {
    font-size: 30px;
    line-height: 1.28;
    margin: 8px 0 12px;
  }
  .page_head_desc {
    margin-inline: 0;
    font-size: 15px;
    line-height: 1.65;
  }
  .trip_grid {
    grid-template-columns: 1fr;
  }
  .closing_panel {
    padding: 48px 22px;
  }
  .closing_title {
    margin-top: 10px;
    font-size: 20px;
    line-height: 1.45;
  }
  .btn {
    min-height: 48px;
    margin-top: 22px;
  }
}

/* 마우스 호버 전용 — 터치에서는 적용 안 함 */
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: #2f4536;
  }
  .btn_light:hover {
    background: var(--ivory-deep);
  }
  .btn_dark:hover {
    background: var(--clay-deep);
  }
  .trip_card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }
  .trip_card:hover .trip_card_media img {
    transform: scale(1.04);
  }
}

/* 동작 줄이기 — OS에서 모션 감소를 켠 경우 애니메이션을 거의 없앰 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .trip_card {
    transition-duration: 0.01ms;
  }
}
