/* ============================================================
   山月民宿 — 单页网站样式
   设计：日式侘寂 × 现代极简
   色调：低饱和暖色系（米白、浅驼、鼠尾草灰）
   字体：Noto Serif SC（标题）/ Noto Sans SC（正文）
   ============================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  /* 主色调 */
  --color-bg:        #faf8f5;
  --color-bg-alt:    #f3f0eb;
  --color-surface:   #ffffff;
  --color-text:      #3d3833;
  --color-text-muted:#7a736b;
  --color-text-light:#a0988f;
  --color-accent:    #8b7355;
  --color-accent-2:  #6b8a7a;
  --color-border:    #e5e0da;
  --color-shadow:    rgba(60, 50, 40, 0.08);

  /* 排版 */
  --font-serif:      'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', Georgia, serif;
  --font-sans:       'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-width:       1100px;
  --nav-height:      64px;

  /* 间距 */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  48px;
  --space-xl:  80px;
  --space-2xl: 120px;

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* 过渡 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.6s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---------- 容器 ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---------- 板块通用 ---------- */
.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--space-xl);
  letter-spacing: 0.08em;
}

/* ---------- 淡入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   导航栏
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(250, 248, 245, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 8px var(--color-shadow);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-logo:hover {
  opacity: 0.75;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 1.5px;
  background: var(--color-accent);
  transition: transform 0.3s var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* 汉堡菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

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

/* ============================================================
   Hero 首屏
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #2a2520;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(30, 25, 20, 0.35);
  color: #fff;
  text-align: center;
  padding: var(--space-md);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.hero-slogan {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 300;
  letter-spacing: 0.16em;
  opacity: 0.88;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

/* 轮播箭头 */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s, transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-arrow:active {
  transform: translateY(-50%) scale(0.93);
}

.hero-arrow-left  { left:  24px; }
.hero-arrow-right { right: 24px; }

/* 轮播指示点 */
.hero-dots {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.hero-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* 向下滚动提示 */
.hero-scroll-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  z-index: 10;
  animation: float 2s ease-in-out infinite;
  transition: color 0.3s;
}

.hero-scroll-hint:hover {
  color: #fff;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   卡片通用布局：图片 + 文字并排
   ============================================================ */
.card-row {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.card-row.reverse {
  flex-direction: row;
}

.card-text {
  flex: 1;
  min-width: 0;
}

.card-image {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px var(--color-shadow);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  transition: transform 0.6s var(--ease-out);
}

.card-image:hover img {
  transform: scale(1.04);
}

/* ============================================================
   民宿简介
   ============================================================ */
#intro .card-text p {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--color-text-muted);
  text-align: justify;
}

/* ============================================================
   房型展示
   ============================================================ */
.rooms-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.room-card {
  display: flex;
  align-items: stretch;
  gap: var(--space-xl);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 16px var(--color-shadow);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.room-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--color-shadow);
}

.room-image {
  flex: 0 0 50%;
  min-width: 0;
}

.room-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.room-card:hover .room-image img {
  transform: scale(1.04);
}

.room-info {
  flex: 1;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.room-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.04em;
}

.room-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.9;
  margin-bottom: var(--space-md);
}

.room-price {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.02em;
}

/* ============================================================
   周边环境
   ============================================================ */
.env-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.env-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--color-shadow);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.env-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--color-shadow);
}

.env-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.env-card:hover img {
  transform: scale(1.06);
}

.env-card .env-text {
  padding: var(--space-sm) var(--space-sm) var(--space-md);
  font-size: 0.88rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.6;
}

/* ============================================================
   住客评价
   ============================================================ */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 780px;
  margin: 0 auto;
}

.review-card {
  display: flex;
  gap: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: 0 2px 12px var(--color-shadow);
  transition: transform 0.3s var(--ease-out);
}

.review-card:hover {
  transform: translateY(-2px);
}

.review-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-body {
  flex: 1;
  min-width: 0;
}

.review-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.review-comment {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer .section-title {
  color: var(--color-bg);
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-accent-2);
}

.contact-label {
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-value {
  font-size: 0.95rem;
  color: var(--color-bg);
}

.footer-copy {
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-light);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================
   响应式：平板
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --space-2xl: 96px;
    --space-xl:  64px;
    --space-lg:  36px;
  }

  /* 简介：平板竖排 */
  .card-row, .card-row.reverse {
    flex-direction: column;
  }

  .card-image {
    order: -1;
    width: 100%;
  }

  /* 房型 */
  .room-card {
    flex-direction: column;
  }

  .room-image {
    flex: none;
    height: 240px;
  }

  .room-info {
    padding: var(--space-md);
  }

  /* 环境：平板 2 列 */
  .env-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   响应式：手机
   ============================================================ */
@media (max-width: 767px) {
  :root {
    --space-2xl: 64px;
    --space-xl:  40px;
    --space-lg:  24px;
    --nav-height: 56px;
  }

  .section-title {
    font-size: 1.4rem;
    margin-bottom: var(--space-lg);
  }

  /* 导航 — 汉堡菜单 */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    background: var(--color-bg);
    padding: 96px var(--space-lg) var(--space-lg);
    gap: var(--space-md);
    box-shadow: -4px 0 24px var(--color-shadow);
    transition: right 0.4s var(--ease-out);
    z-index: 1000;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.05rem;
  }

  /* Hero */
  .hero {
    min-height: 480px;
  }

  .hero-arrow {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  .hero-arrow-left  { left:  12px; }
  .hero-arrow-right { right: 12px; }

  .hero-dots {
    bottom: 32px;
  }

  /* 环境：手机 1 列 */
  .env-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  /* 评价 */
  .review-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-md);
  }

  .review-avatar {
    width: 56px;
    height: 56px;
  }

  /* 联系 */
  .contact-info {
    flex-direction: column;
    gap: var(--space-md);
  }

  .contact-item {
    flex-direction: row;
    gap: var(--space-sm);
    justify-content: center;
  }
}

/* ============================================================
   移动端遮罩层
   ============================================================ */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.nav-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
