/* ============================================================
   하도락 — Design System v2.0
   제주 동쪽 바닷가 돌담집에서 쉬어가는 감성
============================================================ */

:root {
  /* ── 모래·돌 — Warm Stone Neutrals ── */
  --ivory:       #F5F2EC;   /* 기본 배경 — 웜 화이트 */
  --sand-light:  #EAE5DD;   /* 교차 섹션 배경 */
  --sand:        #D9D0C3;   /* 카드 배경 — 샌드 베이지 */
  --linen:       #C8C0B5;   /* 경계선 (연) */
  --stone-light: #9A9895;   /* 보조 경계선 */
  --stone:       #6B6E6A;   /* 돌담 그레이 */

  /* ── 현무암 — Charcoal ── */
  --text-dim:    #7A7268;   /* 보조 텍스트 */
  --basalt:      #3C3830;   /* 본문 */
  --ink:         #2C2E2F;   /* 현무암 차콜 — 헤딩, 강조, 다크 배경 */

  /* ── 바다 — Deep Ocean Blue ── */
  --sea:         #404759;   /* 딥 오션 블루 — 메인 포인트 */
  --sea-dark:    #353849;   /* 깊은 강조 */
  --sea-light:   #4D5169;   /* hover */

  /* ── 노을 — Bronze Accent ── */
  --accent:      #B57245;   /* 노을 브론즈 — 강조 액센트 */
  --accent-dark: #9B6036;   /* hover */

  /* ── 어두운 배경 위 텍스트 ── */
  --on-dark:        rgba(255, 255, 255, 0.90);
  --on-dark-2:      rgba(255, 255, 255, 0.75);
  --on-dark-3:      rgba(255, 255, 255, 0.55);
  --on-dark-4:      rgba(255, 255, 255, 0.38);
  --on-dark-5:      rgba(255, 255, 255, 0.22);
  --on-dark-border: rgba(255, 255, 255, 0.12);

  /* ── 바다 색 오버레이 ── */
  --sea-05:  rgba(64, 71, 89, 0.05);
  --sea-08:  rgba(64, 71, 89, 0.08);
  --sea-10:  rgba(64, 71, 89, 0.10);
  --sea-18:  rgba(64, 71, 89, 0.18);

  /* ── 기능 토큰 ── */
  --discount:    #7DB89A;
  --disabled-bg: #DCE4E7;
  --disabled-fg: #9AADB3;

  /* ── Typography ── */
  --font-serif: 'Noto Serif KR', 'Georgia', serif;
  --font-sans:  'Inter', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;

  /* ── Spacing ── */
  --section-v: clamp(80px, 10vw, 130px);
  --container: 1280px;
  --gutter:    clamp(24px, 5%, 80px);

  /* ── Easing ── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--basalt);
  background-color: var(--ivory);
  overflow-x: hidden;
  word-break: keep-all;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--ink);
}

/* ── Section Utilities ── */
.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 200;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.section-body {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.9;
  max-width: 560px;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 2.25rem;
  background: var(--sea);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 2px;
  border: 1.5px solid var(--sea);
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.btn-primary:hover {
  background: var(--sea-light);
  border-color: var(--sea-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(64, 71, 89, 0.22);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 2.25rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  transition: border-color 0.25s, color 0.25s, transform 0.25s var(--ease-out);
}
.btn-ghost:hover {
  border-color: var(--on-dark-2);
  color: white;
  transform: translateY(-2px);
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 2.25rem;
  background: var(--ink);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  transition: background 0.25s, transform 0.25s var(--ease-out);
}
.btn-dark:hover {
  background: var(--basalt);
  border-color: var(--basalt);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 2.25rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: 1.5px solid var(--stone);
  border-radius: 2px;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.btn-outline:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  transition: gap 0.25s var(--ease-out), color 0.25s;
}
.link-arrow::after { content: '→'; }
.link-arrow:hover  { gap: 0.7rem; color: var(--accent-dark); }

/* ────────────────────────────────────
   NAVIGATION
──────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.75rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.4s var(--ease-in-out),
              padding   0.4s var(--ease-in-out),
              box-shadow 0.4s var(--ease-in-out);
}

nav.scrolled,
nav.nav-opaque {
  background: rgba(250, 248, 243, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--linen);
  padding: 1.1rem var(--gutter);
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: white;
  transition: color 0.3s;
}

nav.scrolled .logo,
nav.nav-opaque .logo {
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 2.75rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--on-dark-2);
  transition: color 0.25s;
  position: relative;
}

nav.scrolled .nav-links a,
nav.nav-opaque .nav-links a {
  color: var(--text-dim);
}

nav.scrolled .nav-links a:hover,
nav.nav-opaque .nav-links a:hover,
.nav-links a:hover {
  color: var(--ink);
}

.nav-links a.active {
  color: white !important;
}
nav.scrolled .nav-links a:not(.nav-cta).active,
nav.nav-opaque .nav-links a:not(.nav-cta).active {
  color: var(--ink) !important;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--sea);
  transition: width 0.3s var(--ease-out);
}
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--ink) !important;
  color: white !important;
  padding: 0.6rem 1.5rem !important;
  border-radius: 2px;
  font-size: 0.83rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.05em;
  transition: background 0.25s !important;
}
.nav-cta::after  { display: none !important; }
.nav-cta:hover   { background: var(--sea) !important; color: white !important; }

nav.scrolled .nav-cta,
nav.nav-opaque .nav-cta {
  background: var(--ink) !important;
}

/* ────────────────────────────────────
   HERO
──────────────────────────────────── */
.hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.hero-content,
.hero-scroll {
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12, 10, 8, 0.82) 0%,
    rgba(22, 26, 38, 0.30) 52%,
    rgba(22, 26, 38, 0.06) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 0 var(--gutter) clamp(56px, 8vh, 108px);
  max-width: calc(var(--container) + var(--gutter) * 2);
  width: 100%;
  margin: 0 auto;
}

.hero-location {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  margin-bottom: 1.1rem;
  opacity: 0;
  animation: heroFadeUp 1s 0.2s var(--ease-out) forwards;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 9.5vw, 8.5rem);
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: white;
  margin-bottom: 1.35rem;
  opacity: 0;
  animation: heroFadeUp 1.2s 0.38s var(--ease-out) forwards;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 200;
  color: var(--on-dark-2);
  margin-bottom: 2.5rem;
  letter-spacing: 0.04em;
  line-height: 1.75;
  opacity: 0;
  animation: heroFadeUp 1.2s 0.56s var(--ease-out) forwards;
}

.hero-actions {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroFadeUp 1.2s 0.74s var(--ease-out) forwards;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  right: var(--gutter);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: heroFadeUp 1.2s 1.2s var(--ease-out) forwards;
}

.hero-scroll span {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-dark-4);
  writing-mode: vertical-rl;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: var(--on-dark-5);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--on-dark-3);
  animation: scrollLine 2.2s 1.5s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ────────────────────────────────────
   PAGE HEADER (inner pages)
──────────────────────────────────── */
.page-header {
  padding: calc(80px + 3.5rem) var(--gutter) 3.5rem;
  background: var(--ink);
  border-bottom: none;
}

.page-header h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 200;
  margin-bottom: 0.6rem;
  color: white;
}

.page-header .section-label {
  color: var(--accent);
}

.page-header p {
  font-size: 0.97rem;
  color: var(--on-dark-2);
  font-weight: 300;
}

/* ────────────────────────────────────
   FOOTER — New Structure
──────────────────────────────────── */
footer {
  background: var(--ink);
  color: var(--on-dark-3);
  padding: 5rem var(--gutter) 2.5rem;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 3rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--on-dark-border);
}

.footer-brand {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: white;
  margin-bottom: 1rem;
}

.footer-brand-desc {
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--on-dark-4);
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-dark-4);
  margin-bottom: 1.25rem;
}

.footer-col p,
.footer-col address {
  font-size: 0.88rem;
  line-height: 2;
  font-style: normal;
  color: var(--on-dark-3);
}

.footer-col a {
  color: var(--on-dark-3);
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--on-dark-5);
}

.footer-nav {
  display: flex;
  gap: 1.75rem;
  position: static;
  z-index: auto;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: none;
  top: auto;
  left: auto;
  right: auto;
}

.footer-nav a {
  color: var(--on-dark-5);
  font-size: 0.78rem;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--on-dark-3); }

/* ── Legacy Footer Classes (for about/rooms/booking pages) ── */
.footer-content {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--on-dark-2);
  margin-bottom: 1.25rem;
}

.footer-section p {
  color: var(--on-dark-4);
  line-height: 1.9;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.footer-section a {
  color: var(--sea-light);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section a:hover { color: white; }

/* ────────────────────────────────────
   HAMBURGER
──────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1px;
  background: white;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

nav.scrolled .hamburger span,
nav.nav-opaque .hamburger span { background: var(--ink); }

.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ────────────────────────────────────
   MOBILE STICKY CTA
──────────────────────────────────── */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  padding: 0.85rem var(--gutter);
  background: var(--ink);
  border-top: 1px solid var(--on-dark-border);
}

.mobile-cta-bar a {
  display: block;
  text-align: center;
  padding: 0.85rem;
  background: var(--sea);
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  border-radius: 2px;
}

/* ────────────────────────────────────
   RESPONSIVE
──────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(18, 14, 10, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    color: var(--on-dark-2) !important;
    font-size: 1.25rem !important;
    font-weight: 300 !important;
    letter-spacing: 0.1em;
  }

  .nav-links a:hover { color: white !important; }
  .nav-links a::after { display: none !important; }

  .nav-links .nav-cta {
    background: var(--sea) !important;
    color: white !important;
    padding: 0.8rem 2.5rem !important;
    border-radius: 2px !important;
    font-size: 1rem !important;
  }

  .hero-title { font-size: clamp(3.5rem, 14vw, 5rem); }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-scroll { display: none; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .mobile-cta-bar { display: block; }
  body { padding-bottom: 72px; }
}