@import url("/shared/xiaoke-ui.css");

/* Landing typography, device mark, and grouped links. */

main.hero {
  position: relative;
  min-height: 0;
  padding: 0 1.5rem;
  overflow-x: hidden;
  isolation: isolate;
  background-color: var(--bg-body);
}

.hero-stack {
  --landing-pad-y: clamp(2rem, 7.5vh, 3.75rem);
  position: relative;
  z-index: 1;
  width: min(56rem, calc(100vw - 3rem));
  max-width: 100%;
  margin: 0 auto;
  /* Keep previous top padding; make bottom match it (was tighter). */
  padding: var(--landing-pad-y) 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2.65rem;
  box-sizing: border-box;
}
.hero-cluster {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.4rem;
}
.mark {
  display: grid;
  place-items: center;
  padding: 4px;
  line-height: 0;
  border: 1px solid var(--surface-line);
  border-radius: var(--card-radius);
  background: var(--card-fill);
  box-shadow: var(--card-shadow);
}
.mark img { display: block; width: 96px; height: 96px; }
.slogan {
  margin: 0;
  width: 100%; /* same row width as .hero-cards */
  max-width: none;
  box-sizing: border-box;
  font-size: var(--font-page-title);
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  letter-spacing: -0.025em;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
/* Three equal entry cards. */
.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.9rem;
  width: 100%;
  margin: 0.1rem 0 0;
  padding: 0;
  box-sizing: border-box;
}
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.55rem;
  min-width: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 1.15rem 1.2rem;
  box-sizing: border-box;
  text-align: left;
  text-decoration: none;
  color: var(--text-main);
  background: var(--card-fill);
  border: 1px solid var(--surface-line);
  border-radius: var(--card-radius);
  outline: none;
  box-shadow: var(--card-shadow);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.hero-card:hover, .hero-card:focus-visible {
  border-color: var(--accent-primary);
}
.hero-card:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.hero-card strong {
  display: block;
  width: 100%;
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
  color: inherit;
}
.hero-card span {
  display: block;
  width: 100%;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Foolproof guide list under the three entry cards */
.guide {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.4rem;
  text-align: center;
}
.guide-head { margin: 0; padding: 0 0.25rem; }
.guide-head h2 {
  margin: 0;
  font-size: var(--font-page-title);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.025em;
}
.guide-lead {
  margin: 0.7rem 0 0;
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.guide-list {
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--surface-line);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}
.guide-list > li { margin: 0; padding: 0; }
.guide-list > li + li { border-top: 1px solid var(--surface-line); }
.guide-list > li:first-child .guide-item { border-radius: var(--card-radius) var(--card-radius) 0 0; }
.guide-list > li:last-child .guide-item { border-radius: 0 0 var(--card-radius) var(--card-radius); }
.guide-item {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  margin: 0;
  padding: 1.05rem 1.15rem;
  box-sizing: border-box;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: transparent;
  outline: none;
}
.guide-item:hover { background: var(--surface-selected); }
.guide-item:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -3px;
}
.guide-num {
  font-size: 0.92rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  line-height: 1;
}
.guide-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.guide-copy strong {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
}
.guide-copy span {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-muted);
}
.guide-go {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--text-muted);
  border: 0;
  background: transparent;
}
.guide-item:hover .guide-go,
.guide-item:focus-visible .guide-go {
  color: var(--ix-fg);
}

@media (max-width: 720px) {
  .hero-cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero-stack {
    --landing-pad-y: 1.6rem;
    width: 100%;
    gap: 2.15rem;
  }
  .hero-cluster { gap: 1.15rem; width: 100%; max-width: 100%; }
  .guide { gap: 1.15rem; }
  .guide-item {
    grid-template-columns: 2rem minmax(0, 1fr) 1.25rem;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
  }
}

@media (max-height: 640px) {
  .hero-stack { --landing-pad-y: 1.4rem; gap: 2rem; }
  .hero-cluster { gap: 1.05rem; }
  .guide { gap: 1.15rem; }
  .mark img { width: 80px; height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-card { transition: none; }
}
