/* =========================================================
   桃语 PEACH TALK - 主样式
   主题：成熟多汁的果园杂志感（桃色系 / 奶油底 / 绒感阴影）
   ========================================================= */

/* 字体：标题 Noto Serif SC / 正文 Noto Sans SC / 英文点缀 Playfair Display */
@import url('https://fonts.googleapis.cn/css2?family=Noto+Serif+SC:wght@600;700;900&family=Noto+Sans+SC:wght@400;500;700&family=Playfair+Display:ital,wght@1,600&display=swap');

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

/* ---------- Design Tokens ---------- */
:root {
  --cream: #fff7f1;
  --peach: #e5677f;
  --peach-deep: #c94f68;
  --apricot: #f2a65a;
  --plum: #3d1f26;
  --leaf: #6f8f5e;
  --card: #ffffff;

  --shadow-soft: 0 20px 45px rgba(61, 31, 38, 0.12);
  --shadow-lift: 0 26px 55px rgba(61, 31, 38, 0.18);
  --radius-card: 20px;
  --radius-input: 12px;

  --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Playfair Display', 'Noto Serif SC', serif;

  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--plum);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

button {
  font-family: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--peach);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.btn-primary {
  background: var(--peach);
  color: #fff;
  box-shadow: 0 8px 20px rgba(229, 103, 127, 0.32);
}

.btn-primary:hover {
  background: var(--peach-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(201, 79, 104, 0.36);
}

.btn-primary:disabled {
  background: var(--leaf);
  cursor: default;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--plum);
  border: 1px solid rgba(61, 31, 38, 0.22);
}

.btn-ghost:hover {
  color: var(--peach);
  border-color: var(--peach);
  transform: translateY(-2px);
}

.btn-light {
  background: #fff;
  color: var(--peach-deep);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(61, 31, 38, 0.2);
}

.btn-light:hover {
  background: var(--cream);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
  padding: 13px 24px;
  font-size: 15px;
}

/* ---------- 顶部导航栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(255, 247, 241, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(61, 31, 38, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(229, 103, 127, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 21px;
  letter-spacing: 2px;
}

.brand-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 2.5px;
  color: var(--peach);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- 首屏轮播大屏 ---------- */
.carousel {
  position: relative;
  overflow: hidden;
  height: clamp(420px, 74vh, 760px);
  background: var(--plum);
}

.carousel-track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 底部压暗，保证白色文案可读 */
.carousel-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61, 31, 38, 0.58) 0%, rgba(61, 31, 38, 0.12) 45%, transparent 70%);
  pointer-events: none;
}

.slide-caption {
  position: absolute;
  left: clamp(20px, 6vw, 80px);
  bottom: clamp(56px, 12vh, 110px);
  z-index: 2;
  max-width: 560px;
  color: #fff;
}

.slide-kicker {
  font-size: 12px;
  letter-spacing: 0.35em;
  font-weight: 700;
  color: var(--apricot);
  margin-bottom: 14px;
}

.slide-caption h1 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.18;
  letter-spacing: 1px;
  text-shadow: 0 4px 24px rgba(61, 31, 38, 0.35);
}

.slide-caption h1 em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--apricot);
  padding: 0 2px;
}

.slide-desc {
  margin-top: 14px;
  font-size: clamp(14px, 1.6vw, 17px);
  color: rgba(255, 255, 255, 0.92);
  max-width: 460px;
}

.slide-caption .btn {
  margin-top: 26px;
}

/* 首屏文案入场（fade-up，错峰渐现） */
.slide-caption > * {
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.slide-caption > *:nth-child(1) { animation-delay: 0.1s; }
.slide-caption > *:nth-child(2) { animation-delay: 0.22s; }
.slide-caption > *:nth-child(3) { animation-delay: 0.34s; }
.slide-caption > *:nth-child(4) { animation-delay: 0.46s; }

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

/* 轮播箭头 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}

.carousel-arrow:hover {
  background: #fff;
  color: var(--peach-deep);
}

.carousel-arrow.prev { left: clamp(14px, 2.5vw, 32px); }
.carousel-arrow.next { right: clamp(14px, 2.5vw, 32px); }

/* 轮播圆点 */
.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 4vh, 36px);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
  transition: width 0.35s, background 0.35s;
}

.carousel-dot.is-active {
  width: 26px;
  background: var(--apricot);
}

/* ---------- 视频展示区 ---------- */
.videos {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 24px;
}

.section-head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-kicker {
  font-size: 12px;
  letter-spacing: 0.35em;
  font-weight: 700;
  color: var(--peach);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(26px, 3.6vw, 40px);
  letter-spacing: 2px;
}

.section-desc {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(61, 31, 38, 0.6);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.video-card {
  background: var(--card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  /* 桃色渐晕占位底 */
  background: linear-gradient(155deg, #f9e8dc 0%, #f5cfc9 55%, #f0b8b8 100%);
}

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #241016;
}

/* 无视频源时：隐藏 video，显示占位层 */
.video-frame.is-empty video {
  opacity: 0;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}

.video-frame:not(.is-empty) .video-placeholder {
  display: none;
}

.video-play {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--peach);
  box-shadow: 0 8px 20px rgba(61, 31, 38, 0.16);
}

.video-play svg {
  margin-left: 3px;
}

.video-tips {
  font-size: 12px;
  color: rgba(61, 31, 38, 0.55);
  letter-spacing: 1px;
}

.video-card figcaption {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
}

.video-index {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--apricot);
  margin-right: 8px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid rgba(61, 31, 38, 0.08);
  background: var(--card);
  padding: 30px 24px;
  text-align: center;
  font-size: 13px;
  color: rgba(61, 31, 38, 0.55);
}

/* ---------- 登录 / 注册弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(61, 31, 38, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s;
}

.modal-dialog {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--card);
  border-radius: 22px;
  padding: 34px 30px 30px;
  box-shadow: 0 30px 70px rgba(61, 31, 38, 0.3);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
}

.modal.is-open .modal-overlay {
  opacity: 1;
}

.modal.is-open .modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(61, 31, 38, 0.06);
  color: rgba(61, 31, 38, 0.6);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.modal-close:hover {
  background: rgba(229, 103, 127, 0.14);
  color: var(--peach-deep);
}

.modal-head {
  text-align: center;
  margin-bottom: 24px;
}

.modal-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 2px solid rgba(242, 166, 90, 0.5);
}

.modal-head h3 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 1px;
}

.modal-head p {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(61, 31, 38, 0.55);
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--plum);
  background: #fffbf8;
  border: 1px solid rgba(61, 31, 38, 0.16);
  border-radius: var(--radius-input);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.field input::placeholder {
  color: rgba(61, 31, 38, 0.35);
}

.field input:focus {
  outline: none;
  border-color: var(--peach);
  box-shadow: 0 0 0 3px rgba(229, 103, 127, 0.15);
}

.form-error {
  min-height: 20px;
  margin: -4px 0 8px;
  font-size: 13px;
  color: var(--peach-deep);
}

/* ---------- 响应式：平板 ---------- */
@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .carousel {
    height: clamp(380px, 60vh, 560px);
  }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 640px) {
  .site-header {
    height: 62px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .brand-sub {
    font-size: 9px;
    letter-spacing: 2px;
  }

  .header-actions {
    gap: 8px;
  }

  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .carousel {
    height: 58vh;
    min-height: 340px;
  }

  .slide-caption {
    bottom: 52px;
  }

  .carousel-arrow {
    width: 38px;
    height: 38px;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .modal-dialog {
    padding: 28px 22px 24px;
  }
}

/* ---------- 动效偏好：减弱动画 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* 自动隐藏待上传占位提示，直接显示视频 */
.video-placeholder {
    display: none !important;
}