/* ============================================
   common.css - 디자인 시스템 (Design Tokens)
   부산의 밤바다와 등대, 단청의 색을 모티프로 함
   ============================================ */

:root {
  /* ---- Color: 색상 (k-again.jp 레퍼런스 기준) ---- */
  --color-navy: #06114e;         /* 메인 - 로고/헤드라인/기본 버튼 */
  --color-navy-deep: #050b33;    /* 헤더/푸터 등 짙은 배경 */
  --color-cream: #fafafb;        /* 페이지 배경 - 밝고 깔끔한 톤 */
  --color-paper: #ffffff;        /* 카드/콘텐츠 배경 */
  --color-section-warm: #fef3d3; /* 섹션 배경 - 따뜻한 크림 (리뷰/CTA 등) */
  --color-section-cool: #f5f8fc; /* 섹션 배경 - 차분한 라이트블루 (FAQ 등) */
  --color-clay: #06114e;         /* 포인트 - 기본 버튼과 동일한 네이비 */
  --color-clay-dark: #030a33;
  --color-teal: #3f7169;         /* 서브 포인트 - 포함사항 체크 등 */
  --color-gold: #c8a961;         /* 별점, 배지, 가격 강조 - 로고 골드 */
  --color-line: #06c755;         /* LINE 브랜드 컬러 (버튼 전용) */
  --color-coral: #ff6b4a;        /* 인기 랭킹 배지 - k-again.jp 레퍼런스 기준 */
  --color-sky: #299aca;          /* 투어 카드 메타 정보 필(pill) 텍스트 */
  --color-accent-blue: #008afc;  /* 선택받는 이유 배지/타이틀 - k-again.jp 레퍼런스 기준 */

  --text-primary: #16203f;
  --text-secondary: #5b6272;
  --text-inverse: #ffffff;
  --text-muted: #9298a6;

  --border-subtle: #e7e9f0;
  --border-strong: #06114e;

  /* ---- Type: 타이포그래피 (Noto Sans JP - k-again.jp와 동일 계열) ---- */
  --font-display: "Noto Sans JP", "Hiragino Sans", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", sans-serif;

  --fs-hero: clamp(2rem, 5vw, 3.6rem);
  --fs-h1: clamp(1.7rem, 3.6vw, 2.6rem);
  --fs-h2: clamp(1.4rem, 2.8vw, 2rem);
  --fs-h3: 1.15rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;

  /* ---- Layout ---- */
  --container-width: 1200px;
  --container-padding: 20px;
  --header-height: 72px;

  /* ---- Radius: 카드/버튼마다 다른 크기를 사용해 위계를 표현 ---- */
  --radius-small: 8px;     /* 배지, 인풋 */
  --radius-pill: 999px;    /* 버튼 - k-again.jp와 동일한 필(pill) 형태 */
  --radius-medium: 16px;   /* 카드 */
  --radius-large: 24px;    /* Hero 이미지, 큰 패널 */

  /* ---- Shadow ---- */
  --shadow-card: 0 6px 24px rgba(6, 17, 78, 0.08);
  --shadow-float: 0 8px 20px rgba(6, 17, 78, 0.2);

  /* ---- Spacing scale ---- */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 28px;
  --space-lg: 48px;
  --space-xl: 80px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-body);
  background-color: var(--color-cream);
  color: var(--text-primary);
  font-size: var(--fs-body);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-navy);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ---- Section spacing ---- */
.section {
  padding: var(--space-xl) 0;
}

.section-head {
  margin-bottom: var(--space-md);
}

.section-head__title {
  font-size: var(--fs-h2);
}

.section-head__desc {
  margin-top: var(--space-xs);
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background-color: var(--color-clay);
  color: var(--text-inverse);
  box-shadow: var(--shadow-float);
}

.btn--primary:hover {
  background-color: var(--color-clay-dark);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-navy);
  border: 1.5px solid var(--color-navy);
}

.btn--outline:hover {
  background-color: var(--color-navy);
  color: var(--text-inverse);
}

.btn--line {
  background-color: var(--color-line);
  color: #fff;
}

.btn--small {
  padding: 10px 18px;
  font-size: 0.8rem;
}

.btn--block {
  width: 100%;
}

.btn:disabled,
.btn.btn--disabled {
  background-color: var(--color-section-cool);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:disabled:hover,
.btn.btn--disabled:hover {
  background-color: var(--color-section-cool);
}

/* ---- Card base (투어 카드, 후기 카드 등에서 확장) ---- */
.card {
  background-color: var(--color-paper);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge--rank {
  background-color: var(--color-coral);
  color: #fff;
}

.badge--soft {
  background-color: rgba(6, 17, 78, 0.08);
  color: var(--color-navy);
}

.badge--success {
  background-color: rgba(6, 199, 85, 0.12);
  color: #06a047;
}

.badge--soon {
  background-color: var(--text-muted);
  color: #fff;
}

/* ---- Placeholder (실제 이미지 교체 전까지 사용) ---- */
.ph-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    #e7e9f0,
    #e7e9f0 10px,
    #dde1ec 10px,
    #dde1ec 20px
  );
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-align: center;
  padding: var(--space-sm);
  width: 100%;
  height: 100%;
  min-height: 160px;
}

.ph-image img,
[class*="__image"] img,
.tour-card__image img,
.gallery-grid__item img,
.detail-hero img,
.about-split__image img,
.message-block__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Visually hidden (접근성) ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Focus state (키보드 접근성) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-clay);
  outline-offset: 2px;
}

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
}

.logo__img {
  height: 34px;
  width: auto;
  display: block;
}

.main-nav {
  display: none;
}

.main-nav__list {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.main-nav__link {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding: 6px 2px;
}

.main-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-color: var(--color-clay);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.main-nav__link:hover::after {
  transform: scaleX(1);
}

.header-cta {
  display: none;
  align-items: center;
  gap: var(--space-xs);
}

/* 모바일 햄버거 버튼 */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-navy);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 모바일 전체 메뉴 */
.mobile-menu {
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background-color: var(--color-cream);
  z-index: 90;
  padding: var(--space-md) var(--container-padding);
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
  overflow-y: auto;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.mobile-menu__link {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
}

.mobile-menu__ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================
   Floating Action Button (LINE / TOP)
   ============================================ */
.fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fab__menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.fab.is-open .fab__menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fab__item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-float);
  border: none;
  cursor: pointer;
}

.fab__item svg {
  width: 22px;
  height: 22px;
}

.fab__item--line {
  background-color: var(--color-line);
  font-size: 0.65rem;
  font-weight: 700;
}

.fab__item--top {
  background-color: var(--color-navy);
}

.fab__toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: var(--shadow-float);
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}

.fab__toggle span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #fff;
  display: block;
}

.fab.is-open .fab__toggle {
  transform: rotate(90deg);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background-color: var(--color-navy-deep);
  color: var(--text-inverse);
  padding: var(--space-lg) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
}

.footer-brand__logo {
  height: 30px;
  width: auto;
  display: block;
  margin-bottom: var(--space-sm);
}

.footer-brand__desc {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.7);
  max-width: 320px;
}

.footer-brand__info p {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.9;
}

.footer-brand__contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: var(--space-sm);
}

.footer-brand__contact a {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
  width: fit-content;
}

.footer-line__id {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 6px;
}

.footer-line__link {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-nav__title {
  font-size: var(--fs-small);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: rgba(255, 255, 255, 0.9);
}

.footer-nav__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav__list a {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.7);
}

.footer-nav__list a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: var(--space-sm);
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #fff;
  color: var(--color-navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social a svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  background-color: rgba(0, 0, 0, 0.18);
  padding: var(--space-sm) 0;
}

.footer-copyright {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}
