:root {
  --bg: #f7f9f5;
  --ink: #17211f;
  --muted: #697573;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(74, 97, 91, 0.18);
  --accent: #2f8f83;
  --accent-strong: #187168;
  --gold: #d5a84c;
  --rose: #c07062;
  --shadow: 0 18px 48px rgba(35, 55, 52, 0.14);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(242, 249, 246, 0.96), rgba(255, 249, 235, 0.86) 54%, rgba(239, 247, 250, 0.95)),
    var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.site-hero {
  padding: clamp(34px, 7vw, 76px) 20px clamp(16px, 4vw, 36px);
}

.site-hero__inner,
.showcase-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-hero h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(2.35rem, 7vw, 5.6rem);
  font-weight: 650;
  line-height: 1.02;
}

.showcase-shell {
  padding-bottom: clamp(40px, 8vw, 82px);
}

.showcase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--muted);
}

.showcase-head p {
  margin: 0;
  font-size: 0.98rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(16px, 3vw, 28px);
}

.product-card {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  padding: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
  isolation: isolate;
  opacity: 0;
  transform: translateY(18px);
  animation: card-in 520ms cubic-bezier(0.2, 0.9, 0.24, 1) forwards;
  animation-delay: calc(var(--i) * 55ms);
}

.product-card::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.product-visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(238, 244, 237, 0.92), rgba(202, 218, 211, 0.94) 46%, rgba(251, 231, 186, 0.9)),
    #dfe7e3;
  background-position: center;
  background-size: cover;
  transition:
    transform 520ms cubic-bezier(0.2, 0.9, 0.24, 1),
    filter 520ms ease;
}

.product-initial {
  display: grid;
  width: 38%;
  max-width: 112px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  color: rgba(23, 33, 31, 0.68);
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.has-image .product-initial {
  opacity: 0;
}

.product-glint {
  position: absolute;
  inset: -30% -55%;
  z-index: 1;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.42), transparent 58%);
  transform: translateX(-42%) rotate(6deg);
  transition: transform 700ms cubic-bezier(0.2, 0.9, 0.24, 1);
  pointer-events: none;
}

.product-title {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: clamp(1rem, 2.3vw, 1.2rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  backdrop-filter: blur(14px) saturate(1.2);
  transition:
    opacity 220ms ease,
    transform 260ms ease;
}

.product-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: clamp(18px, 4vw, 26px);
  background:
    linear-gradient(180deg, rgba(12, 22, 21, 0.08), rgba(13, 28, 26, 0.76)),
    rgba(255, 255, 255, 0.12);
  color: #fff;
  opacity: 0;
  transform: translateY(14px);
  backdrop-filter: blur(16px) saturate(1.2);
  transition:
    opacity 260ms ease,
    transform 360ms cubic-bezier(0.2, 0.9, 0.24, 1);
}

.product-overlay__name {
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 800;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.product-overlay__desc {
  max-height: 42%;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.9rem, 2vw, 1rem);
  line-height: 1.65;
  overflow: auto;
  overflow-wrap: anywhere;
}

.product-card:hover,
.product-card:focus-visible,
.product-card.is-open {
  transform: translateY(-6px) scale(1.01);
}

.product-card:hover .product-visual,
.product-card:focus-visible .product-visual,
.product-card.is-open .product-visual {
  filter: saturate(1.08) contrast(1.02);
  transform: scale(1.045);
}

.product-card:hover .product-glint,
.product-card:focus-visible .product-glint,
.product-card.is-open .product-glint {
  transform: translateX(44%) rotate(6deg);
}

.product-card:hover .product-title,
.product-card:focus-visible .product-title,
.product-card.is-open .product-title {
  opacity: 0;
  transform: translateY(8px);
}

.product-card:hover .product-overlay,
.product-card:focus-visible .product-overlay,
.product-card.is-open .product-overlay {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  text-align: center;
  backdrop-filter: blur(18px);
}

.empty-state p {
  margin: 0 0 12px;
}

.site-footer {
  scroll-margin-top: 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.site-footer__inner {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto;
  padding: 34px 0 42px;
}

.site-footer p {
  margin: 0 0 7px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0;
  font-size: 1.45rem;
}

.site-footer__description {
  display: block;
  max-width: 52ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.site-footer__contact {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.site-footer__contact strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.9rem;
}

.site-footer__contact a {
  color: inherit;
  text-decoration: none;
}

.site-footer__contact a:hover {
  color: var(--accent-strong);
}

.customer-service {
  position: fixed;
  top: 50%;
  right: 12px;
  z-index: 50;
  width: 68px;
  transform: translateY(-50%);
}

.customer-service ul {
  display: grid;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  margin: 0;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(35, 55, 52, 0.14);
  list-style: none;
  backdrop-filter: blur(18px) saturate(1.15);
}

.service-item {
  position: relative;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.service-item:last-child {
  border-bottom: 0;
}

.service-action {
  display: flex;
  width: 100%;
  height: 66px;
  min-height: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 0;
  padding: 6px 3px;
  background: transparent;
  color: #4f5c59;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 170ms ease,
    color 170ms ease,
    transform 170ms ease;
}

.service-item:first-child .service-action {
  border-radius: 7px 7px 0 0;
}

.service-item:last-child .service-action {
  border-radius: 0 0 7px 7px;
}

.service-action:hover,
.service-action:focus-visible,
.service-item.is-open > .service-action {
  background: var(--accent-strong);
  color: #fff;
  outline: none;
}

.service-action:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.78);
}

.service-icon {
  display: block;
  width: 24px;
  height: 24px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  transition: filter 170ms ease;
}

.service-icon--wechat {
  background-image: url("https://ar66.top/zxkf/kfbl/static/images/right_pic2.png");
}

.service-icon--qq {
  background-image: url("https://ar66.top/zxkf/kfbl/static/images/right_pic5.png");
}

.service-icon--chat {
  background-image: url("https://ar66.top/zxkf/kfbl/static/images/right_pic7.png");
}

.service-icon--phone {
  background-image: url("https://ar66.top/zxkf/kfbl/static/images/right_pic1.png");
}

.service-icon--about {
  background-image: url("https://ar66.top/zxkf/kfbl/static/images/right_pic3.png");
}

.service-icon--top {
  background-image: url("https://ar66.top/zxkf/kfbl/static/images/right_pic6_on.png");
}

.service-action:hover .service-icon,
.service-action:focus-visible .service-icon,
.service-item.is-open .service-icon {
  filter: brightness(0) invert(1);
}

.service-item--top .service-action {
  background: var(--accent);
  color: #fff;
}

.service-item--top .service-icon {
  filter: brightness(0) invert(1);
}

.service-popover {
  position: absolute;
  right: calc(100% + 9px);
  display: none;
  width: 236px;
  overflow: hidden;
  border: 1px solid rgba(47, 143, 131, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 54px rgba(35, 55, 52, 0.18);
  color: var(--ink);
  animation: service-popover-in 180ms ease both;
  backdrop-filter: blur(18px);
}

.service-item.is-open .service-popover {
  display: block;
}

.service-popover--qr {
  top: 0;
  padding: 12px;
  text-align: center;
}

.service-popover--qr strong {
  display: block;
  margin-bottom: 9px;
  font-size: 0.78rem;
}

.service-popover--qr img {
  display: block;
  width: 210px;
  height: 210px;
  object-fit: cover;
}

.service-popover--phone {
  top: -34px;
}

.service-popover--phone a {
  display: grid;
  gap: 4px;
  padding: 17px;
  color: var(--ink);
  text-decoration: none;
  transition: background 160ms ease;
}

.service-popover--phone a + a {
  border-top: 1px solid var(--line);
}

.service-popover--phone a:hover {
  background: rgba(47, 143, 131, 0.08);
}

.service-popover--phone span {
  color: var(--muted);
  font-size: 0.7rem;
}

.service-popover--phone strong {
  font-size: 1rem;
}

@media (hover: hover) and (min-width: 901px) {
  .service-item--popover:hover .service-popover {
    display: block;
  }
}

@keyframes service-popover-in {
  from {
    opacity: 0;
    transform: translateX(7px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .site-hero {
    padding-top: 30px;
  }

  .showcase-head {
    align-items: stretch;
  }

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

  .product-card {
    aspect-ratio: 3 / 4;
  }

  .product-title {
    right: 8px;
    bottom: 8px;
    left: 8px;
    min-height: 42px;
    padding: 7px 9px;
  }

  .product-overlay {
    padding: 14px;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 34px;
  }

  .site-footer__contact {
    text-align: left;
  }
}

@media (max-width: 900px) {
  .front-page {
    padding-bottom: 70px;
  }

  .customer-service {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    transform: none;
  }

  .customer-service ul {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border-width: 1px 0 0;
    border-radius: 0;
  }

  .service-item {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .service-item:last-child {
    border-right: 0;
  }

  .service-action {
    height: 64px;
    font-size: 0.62rem;
  }

  .service-item:first-child .service-action,
  .service-item:last-child .service-action {
    border-radius: 0;
  }

  .service-popover {
    position: fixed;
    right: 10px;
    bottom: 74px;
    left: 10px;
    width: auto;
  }

  .service-popover--qr {
    top: auto;
  }

  .service-popover--qr img {
    width: min(210px, 100%);
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
  }

  .service-popover--phone {
    top: auto;
  }
}

@media (max-width: 420px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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