/* ============================================================
   威尼斯人CN · 共享样式 /assets/site.css
   潟湖档案室：深青石面、暮金细线、旧纸卡片、切角秩序
   ============================================================ */

/* ---------- 1. reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
  scroll-behavior: smooth;
}

body { margin: 0; }

h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --lagoon: #0E3B36;
  --tide: #176B63;
  --dusk: #C8963E;
  --pale: #E7C87A;
  --brick: #A4452F;
  --cream: #F7F0E1;
  --paper: #E4D8C3;
  --ink: #1B1A17;
  --mist: #8FA89F;

  --ink-soft: rgba(27, 26, 23, 0.78);
  --cream-soft: rgba(247, 240, 225, 0.78);
  --hair-dark: rgba(231, 200, 122, 0.28);
  --hair-light: rgba(27, 26, 23, 0.14);

  /* 字体 */
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* 字阶 1.25 */
  --step--1: 0.75rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.9375rem;
  --step-4: 2.4375rem;
  --step-5: 3.0625rem;

  /* 结构 */
  --shell: 1240px;
  --gutter: 1.25rem;
  --radius-cut: 20px;
}

/* ---------- 3. 中文排版基底 ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(200, 150, 62, 0.12), transparent 44%),
    radial-gradient(circle at 92% 4%, rgba(23, 107, 99, 0.12), transparent 48%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--lagoon);
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--brick);
  outline-offset: 3px;
}

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--pale);
}

/* ---------- 4. 布局容器与通用件 ---------- */
.wrap {
  width: min(calc(100% - 2.5rem), 1200px);
  margin-inline: auto;
}

@media (max-width: 600px) {
  .wrap { width: min(calc(100% - 1.5rem), 1200px); }
}

.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.grid--split {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

@media (max-width: 860px) {
  .grid--split { grid-template-columns: minmax(0, 1fr); }
}

.stack > * + * { margin-top: var(--stack-gap, 1rem); }

.title-serif {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.0625rem);
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: var(--lagoon);
}

.lede {
  font-size: 1.0625rem;
  line-height: 1.85;
  max-width: 36ch;
  color: var(--ink-soft);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--mist);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.22em;
  color: var(--tide);
}

.section-label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--dusk);
  flex: 0 0 auto;
}

.rule-slant {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--pale), rgba(231, 200, 122, 0) 72%);
}

.panel-cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  --btn-bg: var(--tide);
  --btn-fg: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.25rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-gold { --btn-bg: var(--dusk); --btn-fg: #24190A; }
.btn-gold:hover { --btn-bg: var(--pale); }

.btn-brick { --btn-bg: var(--brick); --btn-fg: var(--cream); }
.btn-brick:hover { --btn-bg: #8B3624; }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--pale);
  box-shadow: inset 0 0 0 1px rgba(231, 200, 122, 0.55);
}
.btn-ghost:hover {
  --btn-bg: rgba(231, 200, 122, 0.14);
  --btn-fg: var(--cream);
}

/* ---------- 6. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.62rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  background: var(--paper);
  color: var(--lagoon);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}

.tag-gold { background: var(--pale); color: #24190A; }
.tag-brick { background: var(--brick); color: var(--cream); }
.tag-mist { background: rgba(143, 168, 159, 0.28); color: #22332E; }

/* ---------- 7. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--paper) 0%, #D8C9AE 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(27, 26, 23, 0.16);
  pointer-events: none;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }

.media-caption {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.05em;
  color: var(--mist);
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumb { margin-block: 1.25rem 0; }

.crumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
}

.crumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--mist);
}

.crumb-item + .crumb-item::before {
  content: "/";
  color: var(--dusk);
}

.crumb-link {
  color: var(--tide);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.crumb-link:hover {
  color: var(--lagoon);
  border-bottom-color: currentColor;
}

/* ============================================================
   9. 页头
   ============================================================ */
.skip-link {
  position: absolute;
  top: -120%;
  left: 1rem;
  z-index: 200;
  padding: 0.65rem 1.15rem;
  background: var(--pale);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: top 0.16s ease;
}

.skip-link:focus { top: 0.5rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--lagoon);
  color: var(--cream);
  border-bottom: 1px solid var(--hair-dark);
  transition: box-shadow 0.2s ease;
}

.site-header[data-elevated] {
  box-shadow: 0 12px 28px -20px rgba(0, 0, 0, 0.95);
}

.header-shell {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 2rem);
  width: min(calc(100% - 2rem), var(--shell));
  margin-inline: auto;
  padding-block: 0.7rem;
  min-height: 68px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.brand-link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  color: var(--cream);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: var(--cream);
}

.brand-note {
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.18em;
  color: var(--pale);
}

.brand-link:hover .brand-name { color: var(--pale); }

.site-nav { margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1.1vw, 0.9rem);
}

.nav-item { display: block; }

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.45rem 0.25rem;
  color: var(--cream-soft);
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--mist);
  transition: color 0.18s ease;
}

.nav-text { display: inline-block; }

.nav-link:hover {
  color: var(--cream);
  border-bottom-color: var(--dusk);
}

.nav-link:hover .nav-index { color: var(--dusk); }

.nav-link[aria-current="page"] {
  color: var(--pale);
  border-bottom-color: var(--pale);
}

.nav-link[aria-current="page"] .nav-index { color: var(--dusk); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-left: clamp(0.75rem, 2vw, 1.5rem);
  border-left: 1px solid rgba(231, 200, 122, 0.2);
}

.header-cta {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid rgba(231, 200, 122, 0.5);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--pale);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header[data-open] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header[data-open] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header[data-open] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--dusk), var(--pale));
  pointer-events: none;
  z-index: 2;
}

/* 页头移动端折叠 */
@media (max-width: 940px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    margin-left: 0;
    background: var(--lagoon);
    border-top: 1px solid var(--hair-dark);
    box-shadow: 0 22px 32px -22px rgba(0, 0, 0, 0.85);
    padding: 0.5rem clamp(1rem, 4vw, 2rem) 1.25rem;
    max-height: min(72vh, 470px);
    overflow-y: auto;
  }

  .site-header[data-open] .site-nav { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item + .nav-item {
    border-top: 1px solid rgba(231, 200, 122, 0.16);
  }

  .nav-link {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.85rem 0.6rem;
    font-size: 1rem;
    border-bottom: 0;
    border-left: 2px solid transparent;
  }

  .nav-link:hover {
    border-bottom-color: transparent;
    background: rgba(23, 107, 99, 0.28);
  }

  .nav-link[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--pale);
    background: rgba(23, 107, 99, 0.34);
  }

  .header-actions { border-left: 0; padding-left: 0; }
}

@media (max-width: 760px) {
  .header-cta { display: none; }
}

@media (max-width: 480px) {
  .brand-note { display: none; }
  .brand-name { font-size: 1.1875rem; }
  .header-shell { min-height: 60px; }
}

/* ============================================================
   10. 页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: 5rem;
  background: var(--lagoon);
  color: var(--cream-soft);
  border-top: 1px solid var(--hair-dark);
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--dusk) 0 18%,
    var(--tide) 18% 46%,
    var(--brick) 46% 62%,
    transparent 62% 100%
  );
}

.footer-shell {
  width: min(calc(100% - 2rem), var(--shell));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.3fr 0.9fr;
  gap: clamp(1.75rem, 4vw, 3.25rem);
}

.footer-brand { min-width: 0; }

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--cream);
}

.footer-brand-desc {
  margin-top: 0.75rem;
  max-width: 30ch;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: rgba(247, 240, 225, 0.68);
}

.footer-cta { margin-top: 1.25rem; }

.footer-col { min-width: 0; }

.footer-col-title {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--pale);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(231, 200, 122, 0.22);
}

.footer-list { margin-top: 0.85rem; }

.footer-list > li + li { margin-top: 0.5rem; }

.footer-link {
  display: inline-block;
  color: rgba(247, 240, 225, 0.82);
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-link:hover {
  color: var(--pale);
  border-bottom-color: var(--dusk);
}

.footer-contact-line {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(231, 200, 122, 0.16);
}

.footer-contact-key {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--mist);
}

.footer-contact-value {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(247, 240, 225, 0.9);
  word-break: break-word;
}

.footer-legal {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.1rem;
  border-top: 1px solid rgba(231, 200, 122, 0.22);
}

.footer-legal-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.footer-note {
  font-size: 0.8125rem;
  color: var(--mist);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: rgba(247, 240, 225, 0.66);
}

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-brand-desc { max-width: none; }
  .footer-legal-line { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   11. 减少动效
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover { transform: none; }
}
