/* ===========================================================
   新一家装饰 · 设计系统
   色彩与字号直接对齐 Figma 设计稿 home_a.js / home_b.js 的 C 常量
   =========================================================== */

:root {
  /* 主色 —— 取自设计稿 */
  --ink: #18231c;
  --paper: #f7f4ee;
  --sand: #efe9de;
  --green-dark: #14372b;
  --green: #2e6b4f;
  --green-soft: #e3ebe3;
  --terra: #c96f4a;
  --line: #dcd5c7;
  --white: #ffffff;

  /* 派生色 */
  --ink-70: rgba(24, 35, 28, 0.7);
  --ink-45: rgba(24, 35, 28, 0.45);
  --paper-60: rgba(247, 244, 238, 0.6);

  /* 字体 */
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;

  /* 间距 */
  --pad-x: 80px;
  --gap: 24px;
  --radius: 8px;

  --max: 1440px;
}

@media (max-width: 1024px) {
  :root {
    --pad-x: 40px;
    --gap: 20px;
  }
}

@media (max-width: 640px) {
  :root {
    --pad-x: 20px;
    --gap: 16px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

/* 跳转到主内容 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-dark);
  color: var(--white);
  padding: 12px 20px;
  z-index: 999;
}

.skip-link:focus {
  left: 0;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* 区块通用节奏 */
.section {
  padding: 96px 0;
}

@media (max-width: 640px) {
  .section {
    padding: 56px 0;
  }
}

.section--sand {
  background: var(--sand);
}

.section--dark {
  background: var(--green-dark);
}

/* 标题组 */
.head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 56px;
}

@media (max-width: 640px) {
  .head {
    margin-bottom: 32px;
  }
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--terra);
  margin: 0;
}

.head__title {
  font-size: 42px;
  letter-spacing: 0.01em;
}

@media (max-width: 1024px) {
  .head__title {
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .head__title {
    font-size: 27px;
  }
}

.head__desc {
  font-size: 16px;
  line-height: 1.625;
  color: var(--ink-70);
  max-width: 780px;
  margin: 0;
}

.section--dark .head__title {
  color: var(--white);
}

.section--dark .head__desc {
  color: rgba(217, 224, 218, 0.85);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn--primary {
  background: var(--terra);
  color: var(--white);
}

.btn--primary:hover {
  background: #b35f3c;
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(10, 12, 11, 0.55);
  color: var(--white);
  border-color: var(--white);
  backdrop-filter: blur(4px);
}

.btn--ghost:hover {
  background: var(--white);
  color: var(--ink);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--outline:hover {
  border-color: var(--green);
  color: var(--green);
}

/* 卡片通用 */
.card {
  background: var(--white);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
}

/* 网格 */
.grid {
  display: grid;
  gap: var(--gap);
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid--4,
  .grid--3,
  .grid--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 进场动画 */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}