/* Candy home: a friendly discovery surface for the Chengshi Planet mascot. */
.xhs-home {
  --candy-rose: #c9425d;
  --candy-rose-deep: #b53651;
  --candy-yellow: #f4d36c;
  --candy-mint: #88d5bb;
  --candy-blue: #8bc9ec;
  --candy-lilac: #b39ee2;
  --candy-ink: #2b2730;
  --candy-muted: #716a73;
  --candy-line: #f0e4e7;
  background: #fff8fa;
  color: var(--candy-ink);
}

.xhs-home .site-header {
  width: min(1180px, calc(100% - 40px));
  padding: 12px 0;
  border-bottom-color: rgba(95, 72, 80, .09);
  background: rgba(255, 248, 250, .9);
}

.xhs-home .brand {
  gap: 9px;
  color: var(--candy-ink);
  font-size: 17px;
  font-weight: 800;
}

.xhs-home .brand-logo {
  width: 42px;
  height: 42px;
  border: 1px solid #f3dce2;
  background: #fff;
  object-fit: cover;
}

.xhs-home .nav a {
  color: #6f6670;
  font-weight: 650;
}

.xhs-home .nav a:hover {
  color: var(--candy-rose-deep);
  background: #fff0f3;
}

.discovery-home {
  overflow: hidden;
}

.xhs-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(380px, .94fr);
  gap: 54px;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: 570px;
  margin: 0 auto;
  padding: 40px 0 50px;
}

.xhs-hero .hero-copy {
  position: relative;
  z-index: 2;
}

.xhs-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 17px;
  color: #776e76;
  font-size: 13px;
  font-weight: 750;
}

.xhs-kicker span {
  width: 8px;
  height: 8px;
  margin-right: 24px;
  border-radius: 2px;
  background: var(--candy-rose);
  box-shadow: 12px 0 0 var(--candy-mint), 24px 0 0 var(--candy-yellow);
  transform: rotate(10deg);
}

.xhs-hero h1 {
  max-width: 650px;
  margin: 0;
  color: var(--candy-ink);
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
}

.xhs-hero .hero-text {
  max-width: 560px;
  margin: 21px 0 0;
  color: var(--candy-muted);
  font-size: 17px;
  line-height: 1.75;
}

.xhs-hero .hero-actions {
  gap: 10px;
  margin-top: 29px;
}

.xhs-hero .button {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 750;
}

.xhs-hero .button.xhs-primary {
  gap: 10px;
  color: #fff;
  background: var(--candy-rose);
  box-shadow: 0 6px 0 #f7c7d0;
}

.xhs-hero .button.xhs-primary:hover {
  background: var(--candy-rose-deep);
  box-shadow: 0 8px 0 #f7c7d0;
  transform: translateY(-2px);
}

.xhs-hero .button.xhs-ghost {
  border-color: #eadde1;
  color: var(--candy-ink);
  background: #fff;
}

.xhs-hero .button.xhs-ghost:hover {
  border-color: #dbc9cf;
  background: #fffdfd;
}

.home-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 19px;
  margin-top: 25px;
  color: #6c646b;
  font-size: 12px;
}

.home-promises span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.home-promises span::before {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0;
  border-radius: 2px;
  background: var(--candy-mint);
  transform: rotate(12deg);
}

.home-promises span:nth-child(2)::before { background: var(--candy-yellow); }
.home-promises span:nth-child(3)::before { background: var(--candy-blue); }

.hero-mascot {
  position: relative;
  width: min(490px, 100%);
  aspect-ratio: 1;
  justify-self: end;
}

.hero-mascot img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.mascot-shape {
  position: absolute;
  z-index: 1;
  display: block;
}

.shape-pink {
  inset: 8% 5% 3% 8%;
  background: #ffe3e9;
  clip-path: polygon(11% 5%, 92% 0, 100% 78%, 82% 100%, 4% 91%, 0 22%);
}

.shape-yellow {
  right: 1%;
  top: 13%;
  width: 100px;
  height: 145px;
  border-radius: 6px;
  background: #fff0a9;
  transform: rotate(9deg);
}

.shape-mint {
  left: 2%;
  bottom: 8%;
  width: 125px;
  height: 82px;
  border-radius: 6px;
  background: #ccefe3;
  transform: rotate(-7deg);
}

.mascot-spark {
  position: absolute;
  z-index: 3;
  color: var(--candy-lilac);
  font-size: 31px;
  line-height: 1;
}

.spark-one { right: 4%; top: 5%; transform: rotate(11deg); }
.spark-two { left: 5%; top: 25%; color: #efb932; font-size: 19px; transform: rotate(-10deg); }

.xhs-home .section {
  width: min(1180px, calc(100% - 40px));
  padding: 63px 0 94px;
  border-top: 1px solid var(--candy-line);
}

.xhs-home .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 27px;
}

.xhs-home .section-heading .xhs-kicker {
  margin-bottom: 12px;
}

.xhs-home .section-heading h2 {
  margin: 0;
  color: var(--candy-ink);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
}

.section-note {
  max-width: 290px;
  margin: 0 0 4px;
  color: #70686f;
  font-size: 13px;
  line-height: 1.65;
  text-align: right;
}

.xhs-test-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.xhs-test-card {
  --card-accent: #a9344b;
  --card-tint: #fff0f3;
  --card-button: #bd3d57;
  --card-button-text: #fff;
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: 8px 8px 18px;
  flex-direction: column;
  border: 1px solid var(--candy-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(83, 61, 70, .07);
}

.xhs-test-card.card-yellow {
  --card-accent: #8b680f;
  --card-tint: #fff7d8;
  --card-button: #f0cb61;
  --card-button-text: #4e3c10;
}

.xhs-test-card.card-coral {
  --card-accent: #a63b43;
  --card-tint: #fff0ec;
  --card-button: #d95459;
  --card-button-text: #fff;
}

.psych-age-test-cover {
  isolation: isolate;
  color: #2f2930;
  background: #fff4e8;
}

.psych-age-test-cover::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(255, 250, 242, .2);
}

.psych-age-test-cover img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.psych-age-test-cover strong,
.psych-age-test-cover small {
  text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 0 14px rgba(255,250,242,.88);
}

.xhs-test-card.card-mint {
  --card-accent: #2f6f5e;
  --card-tint: #e9f8f2;
  --card-button: #327d68;
  --card-button-text: #fff;
}

.xhs-test-card.card-lilac {
  --card-accent: #705da8;
  --card-tint: #f1edfb;
  --card-button: #6e59aa;
  --card-button-text: #fff;
}

.xhs-test-card:hover {
  box-shadow: 0 18px 36px rgba(83, 61, 70, .11);
  transform: translateY(-3px);
}

.xhs-test-card .test-cover {
  flex: 0 0 auto;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
}

.xhs-test-card .test-card-top {
  padding: 14px 8px 0;
}

.xhs-test-card .pill {
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  color: var(--card-accent);
  background: var(--card-tint);
  font-size: 11px;
  font-weight: 750;
}

.test-duration {
  color: #6f676d;
  font-size: 11px;
  white-space: nowrap;
}

.xhs-test-card h3 {
  min-height: 49px;
  margin: 16px 8px 7px;
  color: var(--candy-ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.xhs-test-card p {
  min-height: 67px;
  margin: 0 8px;
  color: #756e75;
  font-size: 13px;
  line-height: 1.7;
}

.xhs-test-card .card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 16px);
  min-height: 42px;
  margin: auto 8px 0;
  padding: 0 13px;
  border-radius: 6px;
  color: var(--card-button-text);
  background: var(--card-button);
  font-size: 13px;
  font-weight: 750;
}

.xhs-test-card .card-link span {
  font-size: 17px;
}

.xhs-test-card:hover .card-link span {
  transform: translateX(3px);
}

.xhs-home .cover-badge {
  border-radius: 5px;
}

.more-tests-note {
  margin: 31px 0 0;
  color: #70686f;
  font-size: 13px;
  text-align: center;
}

.more-tests-note span {
  margin-right: 6px;
  color: var(--candy-lilac);
}

.xhs-home .site-footer {
  width: min(1180px, calc(100% - 40px));
  border-top-color: var(--candy-line);
  color: #70686f;
}

.xhs-home .lesbti-home-cover .cover-badge,
.xhs-home .city-test-cover .cover-badge {
  color: #fff;
  background: #bd3d57;
}

@media (max-width: 980px) {
  .xhs-hero {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 44px;
  }

  .hero-mascot {
    width: min(420px, 75vw);
    margin: -12px auto 0;
    justify-self: center;
  }

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

@media (max-width: 620px) {
  .xhs-home .site-header {
    width: calc(100% - 28px);
    padding: 9px 0;
  }

  .xhs-home .brand-logo {
    width: 38px;
    height: 38px;
  }

  .xhs-home .brand {
    font-size: 16px;
  }

  .xhs-hero {
    width: calc(100% - 28px);
    gap: 0;
    min-height: 0;
    padding: 27px 0 25px;
  }

  .xhs-kicker {
    margin-bottom: 13px;
    font-size: 11px;
  }

  .xhs-hero h1 {
    font-size: 41px;
    line-height: 1.12;
  }

  .xhs-hero .hero-text {
    max-width: 520px;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.7;
  }

  .xhs-hero .hero-actions {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 8px;
    margin-top: 21px;
  }

  .xhs-hero .button {
    width: 100%;
    min-height: 47px;
    padding: 0 9px;
    font-size: 13px;
  }

  .home-promises {
    gap: 8px 13px;
    margin-top: 20px;
    font-size: 11px;
  }

  .hero-mascot {
    width: 242px;
    margin: -16px auto -4px;
  }

  .shape-yellow {
    width: 58px;
    height: 84px;
  }

  .shape-mint {
    width: 72px;
    height: 48px;
  }

  .mascot-spark { font-size: 21px; }
  .spark-two { font-size: 14px; }

  .xhs-home .section {
    width: calc(100% - 20px);
    padding: 36px 0 62px;
  }

  .xhs-home .section-heading {
    display: block;
    margin: 0 4px 19px;
  }

  .xhs-home .section-heading h2 {
    font-size: 30px;
  }

  .section-note {
    max-width: none;
    margin-top: 8px;
    font-size: 12px;
    text-align: left;
  }

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

  .xhs-test-card {
    padding: 5px 5px 11px;
    border-radius: 7px;
    box-shadow: 0 7px 20px rgba(83, 61, 70, .06);
  }

  .xhs-test-card:hover {
    box-shadow: 0 7px 20px rgba(83, 61, 70, .06);
    transform: none;
  }

  .xhs-test-card .test-cover {
    aspect-ratio: 4 / 5;
    padding: 13px;
    border-radius: 5px;
  }

  .xhs-test-card .test-cover strong {
    left: 13px;
    bottom: 39px;
    font-size: 18px;
    line-height: 1.18;
  }

  .xhs-test-card .test-cover small {
    left: 13px;
    bottom: 15px;
    max-width: calc(100% - 26px);
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .xhs-home .cover-badge {
    left: 11px;
    top: 11px;
    padding: 5px 7px;
    font-size: 9px;
  }

  .xhs-test-card .test-card-top {
    padding: 10px 5px 0;
  }

  .xhs-test-card .pill {
    padding: 4px 5px;
    font-size: 9px;
  }

  .test-duration {
    font-size: 9px;
  }

  .xhs-test-card h3 {
    min-height: 42px;
    margin: 11px 5px 6px;
    font-size: 15px;
    line-height: 1.4;
  }

  .xhs-test-card p {
    display: none;
  }

  .xhs-test-card .card-link {
    width: calc(100% - 10px);
    min-height: 40px;
    margin: auto 5px 0;
    padding: 0 9px;
    font-size: 12px;
  }

  .xhs-home .site-footer {
    width: calc(100% - 28px);
  }
}

@media (max-width: 350px) {
  .xhs-hero h1 { font-size: 37px; }
  .xhs-hero { padding-top: 21px; padding-bottom: 18px; }
  .xhs-hero .button { font-size: 12px; }
  .hero-mascot { width: 184px; margin-top: -20px; }
  .test-duration { display: none; }
  .xhs-test-card .test-cover strong { font-size: 16px; }
  .xhs-test-card h3 { font-size: 14px; }
  .xhs-test-card .card-link { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .xhs-home .button,
  .xhs-test-card,
  .xhs-test-card .card-link span {
    transition: none;
  }
}
