/* ==========================================================================
   [猫舍名称] Cattery — 共享设计系统
   设计定位：高端专业 · 深色金质 · 克制留白
   技术约束：原生 CSS（CSS 变量）、移动端优先、断点 640 / 920
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. 设计变量（一键换肤入口）
   -------------------------------------------------------------------------- */
:root {
  /* 色彩 */
  --bg:            #0d0d0f;   /* 主背景：墨黑 */
  --bg-elevated:   #141418;   /* 卡片 / 浮层 */
  --bg-soft:       #1a1a20;   /* 次级浮层 */
  --gold:          #c9a24b;   /* 暖金强调色 */
  --gold-light:    #e6cc8a;   /* 亮金（高光 / hover） */
  --gold-dim:      rgba(201, 162, 75, .38);
  --line:          rgba(201, 162, 75, .16);  /* 细金线 */
  --line-strong:   rgba(201, 162, 75, .42);
  --text:          #ece9e2;   /* 主文字：暖白 */
  --text-muted:    #9d998f;   /* 次要文字 */
  --text-faint:    #6e6b64;   /* 弱化文字 */
  --danger:        #c96a5a;

  /* 字体：标题衬线 / 正文无衬线，中文系统字体 fallback */
  --font-serif: "Playfair Display", "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-sans:  "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  /* 排版尺度 */
  --fs-hero:   clamp(2.1rem, 6vw, 3.9rem);
  --fs-h2:     clamp(1.6rem, 3.6vw, 2.4rem);
  --fs-h3:     1.2rem;
  --fs-body:   1rem;
  --fs-small:  .875rem;

  /* 间距与形态 */
  --container: 1160px;
  --radius:    4px;            /* 克制的小圆角 */
  --nav-h:     68px;
  --section-y: clamp(4rem, 9vw, 7.5rem);

  /* 动效 */
  --ease:      cubic-bezier(.16, 1, .3, 1);
  --dur:       .45s;
}

/* --------------------------------------------------------------------------
   1. Reset 与基础
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.8;
  letter-spacing: .01em;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* 背景织理：极暗径向微光，避免纯黑死板 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 42% at 50% -6%, rgba(201, 162, 75, .075), transparent 70%),
    radial-gradient(40% 30% at 88% 108%, rgba(201, 162, 75, .045), transparent 70%);
  z-index: 0;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

::selection { background: rgba(201, 162, 75, .28); color: #fff; }

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

/* --------------------------------------------------------------------------
   2. 布局工具
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 22px;
  position: relative;
  z-index: 1;
}

.section { padding-block: var(--section-y); position: relative; }
.section + .section { border-top: 1px solid rgba(201, 162, 75, .07); }

/* 章节标题：细金线 + 衬线 */
.section-head { max-width: 640px; margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  font-size: var(--fs-small);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.section-head.center .eyebrow::after {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: .02em;
  color: var(--text);
}
.section-title { font-size: var(--fs-h2); }
.section-desc { color: var(--text-muted); margin-top: 1rem; max-width: 58ch; }
.section-head.center .section-desc { margin-inline: auto; }

.lead { font-size: 1.06rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   3. 按钮 / 徽章 / 状态标签
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: .95em 2.1em;
  font-size: .95rem;
  letter-spacing: .14em;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(.97); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #b18c3d 100%);
  color: #14110a;
  font-weight: 600;
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 6px 28px rgba(201, 162, 75, .28);
  transform: translateY(-2px);
}

.btn-ghost { color: var(--gold); background: transparent; }
.btn-ghost:hover { background: rgba(201, 162, 75, .1); transform: translateY(-2px); }

/* CFA 徽章 */
.badge-cfa {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .42em 1.05em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .8rem;
  letter-spacing: .22em;
  color: var(--gold-light);
  background: rgba(201, 162, 75, .07);
}
.badge-cfa svg { flex: none; }

/* 幼猫状态标签 */
.status {
  display: inline-block;
  padding: .28em .9em;
  font-size: .76rem;
  letter-spacing: .18em;
  border-radius: 999px;
  border: 1px solid;
}
.status-available { color: #a9d3a4; border-color: rgba(126, 184, 122, .45); background: rgba(126, 184, 122, .08); }
.status-reserved  { color: var(--gold-light); border-color: var(--line-strong); background: rgba(201, 162, 75, .08); }
.status-sold      { color: var(--text-faint); border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); }

/* --------------------------------------------------------------------------
   4. 导航（移动端折叠为汉堡菜单）
   -------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(13, 13, 15, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 162, 75, .12);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  letter-spacing: .06em;
  color: var(--text);
}
.brand .brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  color: var(--gold);
}
.brand small {
  display: block;
  font-family: var(--font-sans);
  font-size: .62rem;
  letter-spacing: .3em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.nav-links { display: none; } /* 移动端默认隐藏，由汉堡菜单展开 */

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--gold);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* 移动端抽屉菜单 */
.nav-links.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(13, 13, 15, .97);
  border-bottom: 1px solid var(--line);
  padding: 1rem 22px 1.6rem;
  gap: .2rem;
  animation: menuIn .38s var(--ease);
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-links a {
  padding: .8em .4em;
  font-size: .95rem;
  letter-spacing: .12em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(201, 162, 75, .07);
  transition: color .3s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--gold-light); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--gold-dim); }

/* 断点 ≥920px：桌面横向导航 */
@media (min-width: 920px) {
  .nav-toggle { display: none; }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 2.1rem;
    position: static;
    background: none;
    border: 0;
    padding: 0;
  }
  .nav-links a { border-bottom: 1px solid transparent; padding: .4em 0; }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--gold); }
}

/* 页面主体避开固定导航 */
.page-main { padding-top: var(--nav-h); }

/* --------------------------------------------------------------------------
   5. Hero（首页）
   -------------------------------------------------------------------------- */
.hero {
  min-height: min(88dvh, 820px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--nav-h) + 3rem) 4rem;
}
.hero::after { /* 底部金线渐隐 */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(720px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.hero-grid {
  display: grid;
  gap: 2.6rem;
  align-items: center;
}
@media (min-width: 920px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 4rem; }
}

.hero-title {
  font-size: var(--fs-hero);
  margin: 1.3rem 0 1.1rem;
}
.hero-title em {
  font-style: normal;
  color: var(--gold-light);
}
.hero-slogan {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--text-muted);
  letter-spacing: .05em;
  max-width: 34ch;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }

/* Hero 侧图：金色描边画像框 */
.hero-figure { position: relative; }
.hero-figure .frame {
  border: 1px solid var(--line-strong);
  padding: 12px;
  background: linear-gradient(160deg, rgba(201, 162, 75, .1), transparent 55%);
}
.hero-figure .frame::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid var(--line);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   6. 图片占位机制（开发期不裂图 · 上线后替换为 OSS）
   用法：<div class="ph" data-oss="https://[bucket].oss-ap-southeast-1.aliyuncs.com/...">
   JS 会尝试加载 data-oss 图片，成功则替换占位；失败保留占位（金边 + 猫剪影）。
   -------------------------------------------------------------------------- */
.ph {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(70% 60% at 50% 42%, rgba(201, 162, 75, .1), transparent 75%),
    var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph.ratio-1x1 { aspect-ratio: 1 / 1; }
.ph.ratio-3x4 { aspect-ratio: 3 / 4; }
.ph.ratio-16x9 { aspect-ratio: 16 / 9; }

.ph svg.ph-cat { width: 34%; max-width: 120px; color: var(--gold-dim); }

.ph .ph-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: .68rem;
  letter-spacing: .16em;
  color: var(--gold);
  background: rgba(13, 13, 15, .78);
  border: 1px solid var(--line);
  padding: .3em .8em;
  border-radius: 2px;
}
.ph img.ph-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ph.is-loaded svg, .ph.is-loaded .ph-tag { display: none; }

/* --------------------------------------------------------------------------
   7. 卡片体系（金色描边 + 悬浮微光）
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 1.4rem; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) {
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5), 0 0 0 1px rgba(201, 162, 75, .08),
              0 8px 30px rgba(201, 162, 75, .07);
}
.card-body { padding: 1.5rem 1.5rem 1.7rem; }
.card-title { font-size: var(--fs-h3); margin-bottom: .35rem; }
.card-sub {
  font-size: var(--fs-small);
  color: var(--gold);
  letter-spacing: .1em;
  margin-bottom: .9rem;
}
.card-text { font-size: .93rem; color: var(--text-muted); }

/* 定义列表式信息行（种猫 / 幼猫卡片用） */
.meta-list { margin-top: 1.1rem; border-top: 1px solid rgba(201, 162, 75, .1); }
.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .62em 0;
  font-size: .88rem;
  border-bottom: 1px solid rgba(201, 162, 75, .07);
}
.meta-list li span:first-child { color: var(--text-faint); letter-spacing: .08em; flex: none; }
.meta-list li span:last-child { color: var(--text); text-align: right; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
}
.price { font-family: var(--font-serif); color: var(--gold-light); font-size: 1.05rem; letter-spacing: .04em; }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-size: .88rem;
  letter-spacing: .12em;
  color: var(--gold);
  transition: gap .3s var(--ease), color .3s;
}
.link-more:hover { gap: .8em; color: var(--gold-light); }

/* --------------------------------------------------------------------------
   8. 首页精选条 / 理念片段 / CTA 横幅
   -------------------------------------------------------------------------- */
.pillars { counter-reset: pillar; }
.pillar { padding: 1.9rem 1.7rem; border: 1px solid var(--line); background: var(--bg-elevated); position: relative; }
.pillar::before {
  counter-increment: pillar;
  content: "0" counter(pillar);
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--gold-dim);
  display: block;
  margin-bottom: .8rem;
}
.pillar h3 { font-size: 1.08rem; margin-bottom: .55rem; }
.pillar p { font-size: .9rem; color: var(--text-muted); }

.cta-band {
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(80% 120% at 50% -20%, rgba(201, 162, 75, .14), transparent 65%),
    var(--bg-elevated);
  padding: clamp(2.6rem, 6vw, 4.2rem) clamp(1.6rem, 5vw, 4rem);
  text-align: center;
  position: relative;
}
.cta-band::before, .cta-band::after { /* 角落金饰 */
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--gold);
  border-style: solid;
}
.cta-band::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.cta-band::after  { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }
.cta-band h2 { font-size: var(--fs-h2); margin-bottom: .9rem; }
.cta-band p { color: var(--text-muted); max-width: 52ch; margin: 0 auto 2rem; }

/* --------------------------------------------------------------------------
   9. 关于页：理念 / 证书 / 时间线
   -------------------------------------------------------------------------- */
.prose { max-width: 68ch; color: var(--text-muted); }
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--text); font-weight: 600; }

.cert-wall { display: grid; gap: 1.4rem; }
@media (min-width: 640px) { .cert-wall { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .cert-wall { grid-template-columns: repeat(3, 1fr); } }

.tline { border-left: 1px solid var(--line-strong); padding-left: 1.8rem; display: grid; gap: 1.8rem; }
.tline li { position: relative; }
.tline li::before {
  content: "";
  position: absolute;
  left: calc(-1.8rem - 5px);
  top: .52em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--gold);
}
.tline h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.tline p { font-size: .9rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   10. 联系页：表单 + 信息卡
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; gap: 2.4rem; }
@media (min-width: 920px) { .contact-grid { grid-template-columns: 1.1fr .9fr; gap: 3.6rem; } }

.form-panel {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.field { margin-bottom: 1.35rem; }
.field label {
  display: block;
  font-size: .85rem;
  letter-spacing: .14em;
  color: var(--text-muted);
  margin-bottom: .55rem;
}
.field label b { color: var(--gold); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(201, 162, 75, .2);
  border-radius: var(--radius);
  padding: .85em 1em;
  color: var(--text);
  transition: border-color .3s, background .3s;
}
.field select option { background: var(--bg-elevated); color: var(--text); }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(201, 162, 75, .05);
}
.field .error-msg {
  display: none;
  font-size: .8rem;
  color: var(--danger);
  margin-top: .45rem;
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error .error-msg { display: block; }

.form-note { font-size: .8rem; color: var(--text-faint); margin-top: 1rem; }
.form-success {
  display: none;
  border: 1px solid rgba(126, 184, 122, .4);
  background: rgba(126, 184, 122, .08);
  color: #a9d3a4;
  padding: .9em 1.2em;
  margin-top: 1.2rem;
  font-size: .9rem;
}
.form-success.is-visible { display: block; }

.info-card {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 1.7rem;
  margin-bottom: 1.4rem;
}
.info-card h3 {
  font-size: 1rem;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .6em;
}
.info-card dl div {
  display: flex;
  gap: 1rem;
  padding: .5em 0;
  font-size: .92rem;
  border-bottom: 1px solid rgba(201, 162, 75, .07);
}
.info-card dl div:last-child { border-bottom: 0; }
.info-card dt { color: var(--text-faint); flex: none; letter-spacing: .08em; }
.info-card dd { color: var(--text); word-break: break-all; }

.map-ph {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(45deg, rgba(201, 162, 75, .05) 0 1px, transparent 1px 14px),
    var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .6rem;
  color: var(--text-faint);
  font-size: .82rem;
  letter-spacing: .14em;
}
.map-ph svg { color: var(--gold-dim); }

/* --------------------------------------------------------------------------
   11. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3.2rem 0 2.2rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 920px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h4 {
  font-size: .85rem;
  letter-spacing: .24em;
  color: var(--gold);
  margin-bottom: 1rem;
  font-family: var(--font-sans);
  font-weight: 500;
}
.site-footer a, .site-footer p { font-size: .88rem; color: var(--text-muted); }
.site-footer li + li { margin-top: .55rem; }
.site-footer a:hover { color: var(--gold-light); }
.footer-brand p { max-width: 40ch; margin-top: .9rem; }
.footer-bottom {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(201, 162, 75, .08);
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--text-faint);
  letter-spacing: .06em;
}

/* --------------------------------------------------------------------------
   12. 滚动显现动画（JS 驱动 · 尊重 prefers-reduced-motion）
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   13. 小屏微调（≤640px）
   -------------------------------------------------------------------------- */
@media (max-width: 639px) {
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 2.2rem); }
  .hero-cta .btn { flex: 1 1 auto; }
  .card-foot { flex-direction: column; align-items: flex-start; gap: .7rem; }
}
