/* ============================================================
   康悦之家 — 企业官网样式表
   设计：星合红主色 + 红白渐变，移动端优先，适老大字号
   ============================================================ */

/* ---------- 变量与重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --red: #c62828;
  --red-deep: #9a1b1b;
  --red-dark: #6e1111;
  --ink: #4a1818;
  --muted: #8d5a5a;
  --bg-soft: #fff5f5;
  --green: #c62828;
  --nav-h: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* 锚点跳转不被固定导航遮挡 */
section[id] {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- 无障碍：跳过链接 / 焦点可见 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--red-dark);
  color: #fff;
  border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 顶部导航 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(198, 40, 40, 0.12);
}

.navbar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand__name {
  font-size: 21px;
  font-weight: 800;
  color: var(--red-dark);
  letter-spacing: 1px;
}
.brand__logo img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}
.brand--footer .brand__logo img {
  width: 30px;
  height: 30px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-menu__link {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  padding: 6px 2px;
  position: relative;
  transition: color 0.2s ease;
}
.nav-menu__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-menu__link:hover,
.nav-menu__link.is-active {
  color: var(--red);
}
.nav-menu__link.is-active::after,
.nav-menu__link:hover::after {
  transform: scaleX(1);
}
.nav-menu__link--cta {
  background: var(--red);
  color: #fff;
  padding: 9px 20px;
  border-radius: 999px;
}
.nav-menu__link--cta::after { display: none; }
.nav-menu__link--cta:hover {
  background: var(--red-deep);
  color: #fff;
}

/* 汉堡按钮（默认隐藏） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2.5px;
  width: 100%;
  border-radius: 2px;
  background: var(--red-dark);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 20px 64px;
  background: linear-gradient(155deg, #6e1111 0%, #9a1b1b 55%, #c62828 100%);
  color: #fff;
  overflow: hidden;
}

.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.hero__orb--1 {
  width: 420px; height: 420px;
  top: -140px; right: -100px;
  background: radial-gradient(circle, rgba(255, 138, 138, 0.35), transparent 65%);
}
.hero__orb--2 {
  width: 340px; height: 340px;
  bottom: -120px; left: -90px;
  background: radial-gradient(circle, rgba(239, 83, 80, 0.45), transparent 65%);
}
.hero__orb--3 {
  width: 180px; height: 180px;
  top: 24%; left: 46%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.22), transparent 65%);
}

.hero__inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #ffcccc;
  border: 1px solid rgba(255, 204, 204, 0.4);
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero__title {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 1px;
}

.hero__subtitle {
  margin-top: 18px;
  font-size: clamp(16px, 2.4vw, 19px);
  color: #f5cccc;
  line-height: 1.7;
}

.hero__actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero__art svg {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  filter: drop-shadow(0 24px 40px rgba(60, 10, 10, 0.45));
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn--primary {
  background: #fff;
  color: var(--red-deep);
  box-shadow: 0 10px 26px rgba(60, 10, 10, 0.28);
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  color: #fff;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- 通用板块 ---------- */
.section {
  padding: 84px 20px;
}
.section--alt {
  background: linear-gradient(170deg, #fff0f0 0%, #ffe8e8 100%);
}
.section--soft {
  background: linear-gradient(170deg, #fff5f5 0%, #ffeeee 100%);
}
.section--alt .section__head,
.section--soft .section__head {
  margin-bottom: 56px;
}

.section__head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section__eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--red);
  margin-bottom: 12px;
}
.section__title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.35;
  color: var(--red-dark);
}
.section__desc {
  margin-top: 14px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
}

/* ---------- 核心服务卡片 ---------- */
.cards {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.card {
  background: #ffffff;
  border: 1px solid rgba(198, 40, 40, 0.14);
  border-radius: 22px;
  padding: 34px 28px;
  box-shadow: 0 14px 34px rgba(110, 17, 17, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(110, 17, 17, 0.14);
}

.card__icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  background: linear-gradient(150deg, #ffe8e8, #ffd6d6);
}
.card__icon--chat { background: linear-gradient(150deg, #fff0f0, #ffe8e8); }
.card__icon--shop { background: linear-gradient(150deg, #fff0f0, #ffd6d6); }

.card__title {
  font-size: 21px;
  font-weight: 700;
  color: var(--red-dark);
}
.card__text {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
}
.card__link {
  display: inline-block;
  margin-top: 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--red);
}
.card__link:hover { color: var(--red-deep); }

/* ---------- 双栏内容板块 ---------- */
.split {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split--reverse .split__art { order: 2; }

.split__art svg {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.split__text .section__eyebrow { margin-bottom: 8px; }
.split__text .section__title { font-size: clamp(24px, 3.4vw, 32px); }
.split__text .section__desc { margin-bottom: 26px; }

.feats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  color: var(--ink);
}
.feat__dot {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c62828, #9a1b1b);
  position: relative;
}
.feat__dot::after {
  content: "";
  position: absolute;
  left: 8px; top: 5.5px;
  width: 6px; height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* ---------- 为什么选择我们 ---------- */
.cards--4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.chip {
  background: #ffffff;
  border-radius: 20px;
  padding: 28px 22px;
  text-align: center;
  border: 1px solid rgba(198, 40, 40, 0.12);
  box-shadow: 0 10px 26px rgba(110, 17, 17, 0.06);
  transition: transform 0.25s ease;
}
.chip:hover { transform: translateY(-5px); }
.chip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(150deg, #ffe8e8, #ffd6d6);
  color: var(--red);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}
.chip__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--red-dark);
}
.chip__text {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

/* ---------- 联系我们 ---------- */
.contact {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact__info .section__title { font-size: clamp(24px, 3.4vw, 32px); }
.contact__list {
  list-style: none;
  margin: 26px 0 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact__item {
  font-size: 16px;
  color: var(--ink);
  display: flex;
  gap: 10px;
}

.contact__card {
  background: linear-gradient(160deg, #ffffff, #fff5f5);
  border: 1px solid rgba(198, 40, 40, 0.16);
  border-radius: 22px;
  padding: 32px 30px;
  box-shadow: 0 14px 34px rgba(110, 17, 17, 0.08);
}
.contact__card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--red-dark);
  margin-bottom: 20px;
}
.contact__steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact__step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--ink);
}
.contact__step-num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact__footnote {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed rgba(198, 40, 40, 0.3);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 底部 ---------- */
.footer {
  background: linear-gradient(160deg, #6e1111, #4a0b0b);
  color: #f5cccc;
  padding: 60px 20px 0;
}
.footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 44px;
  padding-bottom: 44px;
}
.brand--footer .brand__name { color: #fff; }
.footer__slogan {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.85;
}
.footer__company {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  opacity: 0.95;
}
.footer__nav,
.footer__legal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__nav-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.footer__nav a {
  font-size: 14px;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.footer__nav a:hover { color: #fff; opacity: 1; }
.footer__legal-text {
  font-size: 13px;
  line-height: 1.9;
  opacity: 0.8;
}
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: 18px 0;
  font-size: 13px;
  opacity: 0.75;
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(198, 40, 40, 0.4);
  transition: transform 0.2s ease, opacity 0.3s ease;
}
.to-top:hover { transform: translateY(-3px); }
.to-top[hidden] { display: none; }

/* ---------- 滚动显现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero__inner,
  .split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .split--reverse .split__art { order: 0; }
  .hero__art { order: -1; }
  .cards { grid-template-columns: 1fr; max-width: 560px; }
  .cards--4 { grid-template-columns: 1fr 1fr; max-width: 640px; }
  .contact { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  /* 移动端：汉堡导航 */
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(198, 40, 40, 0.14);
    box-shadow: 0 18px 30px rgba(110, 17, 17, 0.12);
    padding: 8px 20px 18px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
  }
  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-menu__link {
    padding: 13px 6px;
    font-size: 17px;
    border-bottom: 1px solid rgba(198, 40, 40, 0.08);
  }
  .nav-menu__link:last-child { border-bottom: none; }
  .nav-menu__link--cta {
    text-align: center;
    margin-top: 10px;
    border-radius: 999px;
    border-bottom: none;
  }
  .nav-menu__link::after { display: none; }
  .nav-menu__link.is-active { color: var(--red); }

  .section { padding: 64px 20px; }
  .hero { padding-top: calc(var(--nav-h) + 30px); }
  .hero__actions .btn { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .cards--4 { grid-template-columns: 1fr; max-width: 360px; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { font-size: 12px; line-height: 1.7; }
}

/* ---------- 减弱动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
