/* ==========================================================================
   EZI LIVING — restyle.css
   纯视觉覆盖层：不改结构、不改文案、不改图片、不换字族。
   基准 = 线上 v1.0 首页（hero-slider / about / cat-bento / feature-grid /
   testi-grid / news-grid）。删掉本文件即回到原样。
   ========================================================================== */

/* ---------- 1. 容器收窄：1560 → 1400 ---------- */
:root {
  --container: 1400px;
}

/* ---------- 2. 首屏字阶抬高 ---------- */
#about h1 {
  font-size: clamp(2rem, 1.35rem + 1.9vw, 2.875rem); /* 32 → 46 */
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 26ch;
}

#about .about-copy p {
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.68;
  color: var(--muted);
  max-width: 54ch;
}

/* ---------- 3. 标题不腰斩（中文词组不拆行） ---------- */
h1,
h2,
h3,
h4 {
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}

/* ---------- 4. 正文与标题限宽 ---------- */
.section-head {
  max-width: 720px;
}

.section-head h2,
.section-head h1 {
  max-width: 30ch;
}

.section-head.center h2,
.section-head.center h1 {
  margin-inline: auto;
}

.section-head p,
.feature-card p,
.testi-card blockquote,
.news-card p {
  max-width: 64ch;
}

.section-head.center p {
  margin-inline: auto;
}

.section-head p {
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--muted);
}

/* ---------- 5. 小节标题的前置短线 ---------- */
.section-head h2::before,
.section-head h1::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin-bottom: 18px;
  background: currentColor;
  opacity: 0.32;
}

.section-head.center h2::before,
.section-head.center h1::before {
  margin-inline: auto;
}

/* ---------- 6. 简介段保持浅色（深色版已按反馈撤掉） ---------- */
#about {
  background: transparent;
}

/* ---------- 7. 图片与卡片统一：16px 圆角、去重阴影 ---------- */
.cat-tile,
.about-media,
.feature-card,
.testi-card,
.news-card {
  border-radius: 16px;
}

.cat-tile img,
.about-media img {
  border-radius: 16px;
}

.cat-tile,
.about-media,
.feature-card,
.testi-card,
.news-card {
  box-shadow: none;
}

.cat-tile:hover,
.feature-card:hover,
.testi-card:hover,
.news-card:hover {
  box-shadow: none;
}

/* ---------- 8. 细节收口 ---------- */
.news-date,
.testi-author span,
.stars {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.btn {
  border-radius: 999px;
  transition: transform 0.18s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease), color 0.2s var(--ease);
}

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

.btn:active {
  transform: translateY(0);
}

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

::selection {
  background: #b7ebc9;
  color: #06291d;
}

a {
  text-underline-offset: 3px;
}

/* ---------- 10. 首屏轮播：占满一屏但底部留一条白 ---------- */
/* 只在桌面生效。手机上的 banner 是把标题字烧在图里的，竖屏铺满会裁掉文字，
   所以 ≤900px 仍沿用原来的横幅条高度。 */
@media (min-width: 901px) {
  .hero-slider {
    height: calc(100vh - var(--header-h) - clamp(72px, 10vh, 132px));
    height: calc(100svh - var(--header-h) - clamp(72px, 10vh, 132px));
    min-height: 460px;
  }
}

/* ---------- 11. 轮播圆角：四角全圆，尺寸与通栏宽度保持原样 ---------- */
.hero-slider {
  border-radius: 24px;
}

/* ---------- 9. 顶部导航抬高一级（原来 78px 高、15px 字，在 1440 容器里显小） ---------- */
:root {
  --header-h: clamp(72px, 4.5vw, 88px);
}

/* 头部比正文略宽一档：避免宽屏下 logo 与按钮缩在中间一大片空白里 */
.site-header .container {
  width: min(100% - clamp(28px, 3vw, 64px), 1640px);
}

.logo-img {
  height: 52px;
  max-width: 250px;
}

.main-nav ul {
  gap: 34px;
}

.main-nav a {
  font-size: 1rem;
  padding-block: 8px;
}

.lang-btn {
  padding: 8px 14px;
  font-size: 0.9375rem;
}

.header-actions {
  gap: 16px;
}

.header-actions .btn {
  padding: 12px 22px;
  font-size: 0.96875rem;
}

/* 移动端不要把头部再撑高，保持紧凑 */
@media (max-width: 900px) {
  :root {
    --header-h: 68px;
  }

  .logo-img {
    height: 40px;
  }

  .lang-btn {
    padding: 6px 12px;
    font-size: 0.875rem;
  }
}

