/* style.css — 公益活动团跑首页（视觉基线：03-ui/home-ui-desktop.png，设计宽 1440） */

[id] { scroll-margin-top: 82px; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  height: 432px;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(96deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .86) 30%, rgba(255, 255, 255, .62) 42%, rgba(255, 255, 255, .12) 55%, rgba(255, 255, 255, 0) 64%),
    linear-gradient(180deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, 0) 24%, rgba(255, 255, 255, 0) 74%, rgba(255, 255, 255, .62) 100%);
}

.hero-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8px;
  padding-bottom: 18px;
}

.hero-copy { max-width: 540px; }

.hero-kicker {
  display: block;
  font-size: var(--fs-3);
  font-weight: var(--fw-bold);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero-title {
  font-size: 44px;
  line-height: 1.12;
  font-weight: var(--fw-black);
  letter-spacing: -.01em;
  color: var(--accent-deep);
  margin-bottom: 14px;
}

.hero-sub {
  font-size: var(--fs-10);
  line-height: 1.72;
  color: var(--ink-soft);
  max-width: 33em;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.hero-facts {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}

.hero-facts div {
  display: grid;
  gap: 1px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}

.hero-facts dt {
  font-size: var(--fs-10);
  font-weight: var(--fw-bold);
  color: var(--accent-deep);
  letter-spacing: .01em;
}

.hero-facts dd {
  font-size: var(--fs-3);
  color: var(--muted);
}

/* ------------------------------------------------------- category index */

.section-cats { padding: 8px 0 0; }

.cats-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cats-head h2 { white-space: nowrap; }
.cats-head p { max-width: none; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px 16px;
  counter-reset: cat;
}

.cat-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  height: 120px;
  padding: 11px 15px 12px;
  border: 1px solid #e7efe6;
  border-radius: var(--r-card);
  background: #f6faf4;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.cat-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.cat-card { counter-increment: cat; }

.cat-num {
  font-size: var(--fs-2);
  font-weight: var(--fw-bold);
  letter-spacing: .1em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cat-num::before { content: counter(cat, decimal-leading-zero); }

.cat-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex: 0 0 auto;
}

.cat-card h3 {
  font-size: var(--fs-8);
  font-weight: var(--fw-bold);
  color: var(--accent-deep);
  letter-spacing: -.005em;
}

.cat-card p {
  font-size: 11px;
  line-height: 1.58;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-cta {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: var(--accent);
  opacity: .75;
}
.cat-cta svg { width: 13px; height: 13px; }
.cat-card:hover .cat-cta { opacity: 1; }

/* ----------------------------------------------------------- featured */

.section-featured { padding: 26px 0 19px; }

.featured-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 15px;
}

.featured-head h2 {
  font-size: var(--fs-14);
  font-weight: var(--fw-black);
  color: var(--accent-deep);
  letter-spacing: -.01em;
}

.featured-head .featured-tag {
  font-size: var(--fs-3);
  font-weight: var(--fw-bold);
  letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
}

.featured-head p {
  font-size: var(--fs-4);
  color: var(--muted);
  margin-left: auto;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.feat-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.feat-thumb {
  aspect-ratio: 15 / 13;
  border-radius: var(--r-img);
  overflow: hidden;
  background: var(--panel);
}
.feat-thumb img { width: 100%; height: 100%; object-fit: cover; }

.feat-body { display: grid; gap: 6px; }

.feat-body .tag { justify-self: start; }

.feat-body h3 {
  font-size: var(--fs-9);
  font-weight: var(--fw-bold);
  line-height: 1.4;
  color: var(--accent-deep);
}

.feat-body p {
  font-size: var(--fs-4);
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feat-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-3);
  font-weight: var(--fw-semibold);
  color: var(--accent);
  margin-top: 2px;
}
.feat-more svg { width: 11px; height: 11px; }
.feat-card:hover .feat-more { color: var(--accent-deep); }

/* ----------------------------------------------------------- timeline */

.section-timeline { padding: 0 0 13px; }

.timeline-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.timeline-head h2 {
  font-size: var(--fs-12);
  font-weight: var(--fw-black);
  color: var(--accent-deep);
  letter-spacing: -.01em;
}

.timeline-head p {
  font-size: var(--fs-4);
  color: var(--muted);
  max-width: 54ch;
}

.timeline-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.timeline-grid::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 37px;
  height: 1px;
  background: var(--line);
}

.timeline-step { position: relative; display: grid; gap: 9px; padding-right: 10px; }

.step-icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--accent-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.step-icon svg { width: 18px; height: 18px; }

.timeline-step h3 {
  font-size: 14px;
  font-weight: var(--fw-bold);
  color: var(--accent-deep);
}

.timeline-step p {
  font-size: 11.5px;
  line-height: 1.62;
  color: var(--muted);
}

/* -------------------------------------------------------------- week */

.section-week { padding: 0 0 20px; }

.week-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.week-head h2 {
  font-size: var(--fs-12);
  font-weight: var(--fw-black);
  color: var(--accent-deep);
  letter-spacing: -.01em;
}
.week-head p { font-size: var(--fs-4); color: var(--muted); max-width: 56ch; }

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line);
}

.week-cell { background: #f2f6ec; border-right: 1px solid #e4ecdf; }
.week-cell:last-child { border-right: 0; }

.week-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  background: var(--accent);
  color: #fff;
  font-size: var(--fs-4);
  font-weight: var(--fw-bold);
  letter-spacing: .02em;
}

.week-day span {
  font-size: var(--fs-1);
  font-weight: var(--fw-semibold);
  color: rgba(255, 255, 255, .8);
  letter-spacing: .04em;
}

.week-body { padding: 13px 12px 19px; display: grid; gap: 9px; }

.week-load {
  justify-self: start;
  font-size: var(--fs-1);
  font-weight: var(--fw-bold);
  letter-spacing: .04em;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.week-load.is-rest { background: rgba(91, 109, 100, .1); color: var(--muted); }
.week-load.is-quality { background: var(--accent); color: #fff; }

.week-body p {
  font-size: 11px;
  line-height: 1.62;
  color: var(--muted);
}

/* ------------------------------------------------------- formats + flow */

.section-duo { padding: 12px 0 38px; }

.duo-grid {
  display: grid;
  grid-template-columns: minmax(0, 709px) minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

.duo-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.duo-head h2 {
  font-size: var(--fs-12);
  font-weight: var(--fw-black);
  color: var(--accent-deep);
  letter-spacing: -.01em;
}

.duo-head p { font-size: var(--fs-4); color: var(--muted); width: 100%; margin-top: 2px; }

.format-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.format-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.format-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-soft); }

.format-thumb { aspect-ratio: 2.5 / 1; overflow: hidden; background: var(--panel); }
.format-thumb img { width: 100%; height: 100%; object-fit: cover; }

.format-body { padding: 0 11px 11px; display: grid; gap: 4px; }

.format-body h3 {
  font-size: var(--fs-8);
  font-weight: var(--fw-bold);
  color: var(--accent-deep);
}

.format-body .format-for {
  font-size: var(--fs-2);
  color: var(--accent);
  font-weight: var(--fw-semibold);
}

.format-body p {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flow-lead {
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 4px;
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 2px solid var(--accent-line);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  counter-reset: flow;
}

.flow-step { display: grid; gap: 4px; align-content: start; counter-increment: flow; }

.flow-num::before { content: counter(flow, decimal-leading-zero); }

.flow-num {
  font-size: 20px;
  font-weight: var(--fw-black);
  color: var(--accent);
  line-height: 1;
  letter-spacing: -.02em;
}

.flow-step h3 {
  font-size: var(--fs-6);
  font-weight: var(--fw-bold);
  color: var(--accent-deep);
  line-height: 1.35;
}

.flow-step p {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* --------------------------------------------------------- safety band */

.section-safety {
  background: var(--band);
  padding: 16px 0;
}

.safety-grid {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.safety-head h2 {
  font-size: var(--fs-11);
  font-weight: var(--fw-black);
  color: var(--accent-deep);
  letter-spacing: -.01em;
  margin-bottom: 4px;
}

.safety-head p { font-size: var(--fs-4); color: var(--muted); max-width: 24ch; }

.safety-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.safety-item { display: grid; gap: 4px; }

.safety-item h3 {
  font-size: var(--fs-6);
  font-weight: var(--fw-bold);
  color: var(--accent-deep);
  display: flex;
  align-items: center;
  gap: 6px;
}
.safety-item h3 svg { width: 14px; height: 14px; color: var(--accent); flex: 0 0 auto; }

.safety-item p { font-size: var(--fs-4); line-height: 1.6; color: var(--muted); }

/* ---------------------------------------------------------------- faq */

.section-faq { padding: 12px 0 2px; }

.faq-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
}

.faq-head h2 {
  font-size: var(--fs-12);
  font-weight: var(--fw-black);
  color: var(--accent-deep);
}

.faq-head p { font-size: var(--fs-4); color: var(--muted); }

.faq-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.faq-item {
  padding: 10px 22px 0 0;
  border-right: 1px solid var(--line);
}
.faq-item:last-child { border-right: 0; padding-right: 0; }
.faq-item + .faq-item { padding-left: 22px; }

.faq-item h3 {
  font-size: 12.5px;
  font-weight: var(--fw-bold);
  color: var(--accent-deep);
  margin-bottom: 5px;
  line-height: 1.45;
}

.faq-item p { font-size: 11px; line-height: 1.58; color: var(--muted); }

/* --------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .main-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 16px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-grid { grid-template-columns: 1fr; gap: 20px; }
  .timeline-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  .timeline-grid::before { display: none; }
  .duo-grid { grid-template-columns: 1fr; gap: 24px; }
  .week-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .safety-grid { grid-template-columns: 1fr; gap: 16px; }
  .faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-item { padding: 12px 18px 14px 0; }
  .faq-item + .faq-item { padding-left: 18px; }
  .hero { height: 460px; }
  .hero-title { font-size: 38px; }
}

@media (max-width: 900px) {
  .hero { height: 520px; }
  .hero-inner { justify-content: flex-end; padding-bottom: 26px; }
  .hero-copy { max-width: 100%; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .92) 42%, rgba(255, 255, 255, .72) 62%, rgba(255, 255, 255, .96) 100%);
  }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .format-grid { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .safety-items { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 640px) {
  .hero { height: 560px; }
  .hero-title { font-size: 32px; }
  .hero-sub { font-size: var(--fs-9); }
  .hero-facts { gap: 16px; }
  .hero-facts div { padding-left: 9px; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { min-height: 0; }
  .cat-card p { -webkit-line-clamp: 4; }
  .feat-card { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
  .featured-head { flex-wrap: wrap; gap: 6px; }
  .featured-head p { margin-left: 0; width: 100%; }
  .timeline-grid { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-item, .faq-item + .faq-item { padding: 12px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .faq-item:last-child { border-bottom: 0; }
  .section-featured { padding: 22px 0; }
  .section-cats { padding-top: 28px; }
}
