/* ==========================================================================
   花植植物科目大全 · 首页样式
   设计基准 1440 × 2160（对应视觉稿 1024×1536 × 1.40625）
   分区高度预算：header 89 / hero 470 / steps 225 / subjects 239 /
                featured 314 / season 297 / topics 330 / footer 195
   ========================================================================== */

/* 设计变量见 css/tokens.css */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }

.container {
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 89px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(31, 92, 34, .04);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
}
.brand-leaf { width: 26px; height: 26px; flex: none; }
.brand-name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand-tag {
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: .04em;
  white-space: nowrap;
}
.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--ink);
}
.main-nav a { white-space: nowrap; transition: color .15s ease; }
.main-nav a:hover { color: var(--brand); }
.nav-cta {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--brand) !important;
  font-size: 13px;
}
.nav-cta:hover { background: var(--brand-soft); }
/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  height: 470px;
  overflow: hidden;
  background: linear-gradient(96deg, #efefde 0%, #f1f0df 46%, #f6f5e7 100%);
}
.hero-inner {
  height: 100%;
  display: flex;
  align-items: center;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: 566px;
}
.eyebrow {
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--brand);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 40px;
  line-height: 1.26;
  color: var(--ink);
  margin-bottom: 18px;
}
.hero-lead {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 486px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  font-size: 15px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--brand); color: #f4f8ee; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { color: var(--brand); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, .6); }
.btn-outline {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  color: var(--brand);
  border: 1px solid var(--line-strong);
  margin-top: 16px;
}
.feature-cta { margin-top: 14px; }
.btn-outline:hover { background: var(--brand-soft); }
.btn-arrow { display: inline-flex; }
.btn-arrow svg { width: 16px; height: 16px; }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 30px;
  font-size: 14px;
  color: var(--ink-soft);
}
.hero-stats li { display: inline-flex; align-items: center; gap: 7px; }
.hero-stats svg { width: 19px; height: 19px; color: var(--brand); flex: none; }
.hero-stats strong {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
}
.hero-media {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  left: 48.83%;
  max-width: 1100px;
  margin: 0;
  z-index: 1;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f0efdf 0%, rgba(240, 239, 223, .72) 3%, rgba(240, 239, 223, 0) 12%);
}
.figcaption {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------- shared split sections */
.split {
  display: grid;
  grid-template-columns: 366px 1fr;
  grid-template-areas: "head list" "cta list";
  grid-template-rows: auto auto;
  column-gap: 25px;
  align-content: center;
  height: 100%;
}
.split > .split-head { grid-area: head; }
.split > :not(.split-head):not(.feature-cta) { grid-area: list; align-self: center; }
.feature-cta { grid-area: cta; align-self: start; justify-self: start; }
.split-steps, .split-subjects, .split-season { grid-template-areas: "head list"; grid-template-rows: 1fr; }
.split-steps { grid-template-columns: 412px 1fr; gap: 56px; }
.split-head h2 { font-size: 27px; line-height: 1.3; }
.split-lead {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ----------------------------------------------------------------- steps */
.steps {
  height: 225px;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
}
.steps .container { width: min(var(--container), calc(100% - var(--gutter) * 2)); }
.step-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 42px;
}
.step-card {
  background: #f8f8f2;
  border: 1px solid rgba(31, 92, 34, .08);
  border-radius: var(--r-card);
  padding: 16px 18px 18px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--brand);
  border-radius: 50%;
  font-size: 12.5px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  color: var(--brand);
  margin-bottom: 9px;
}
.step-card h3 { font-size: 16px; line-height: 1.4; margin-bottom: 7px; }
.step-card p { font-size: 12.8px; line-height: 1.75; color: var(--ink-soft); }

/* -------------------------------------------------------------- subjects */
.subjects {
  padding: 34px 0 38px;
  background: var(--bg-warm);
}
.subjects .container { width: min(var(--container), calc(100% - var(--gutter) * 2)); }
.split-subjects .split-head { padding-right: 4px; }
.subject-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.subject-card {
  background: #f8f7ef;
  border-radius: 12px;
  padding: 9px 9px 12px;
}
.subject-card a { display: block; text-align: center; }
.subject-media { display: block; overflow: hidden; border-radius: 9px; }
.subject-media img {
  width: 100%;
  aspect-ratio: 1.06 / 1;
  object-fit: cover;
  transition: transform .35s ease;
}
.subject-card a:hover .subject-media img { transform: scale(1.04); }
.subject-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}
.subject-name { font-size: 16px; font-weight: 700; font-family: var(--serif); }
.subject-count {
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #335c33;
  font-size: 12.5px;
  line-height: 1.6;
}

/* -------------------------------------------------------------- featured */
.featured {
  height: 314px;
  padding: 24px 0 0;
  background: var(--bg-cool);
  display: flex;
  align-items: flex-start;
}
.featured .container { width: min(var(--container), calc(100% - var(--gutter) * 2)); }
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card a { display: block; }
.feature-media { display: block; overflow: hidden; border-radius: var(--r-media); }
.feature-media img {
  width: 100%;
  aspect-ratio: 2.02 / 1;
  object-fit: cover;
  transition: transform .35s ease;
}
.feature-card a:hover .feature-media img { transform: scale(1.03); }
.feature-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--brand);
  letter-spacing: .02em;
}
.feature-more {
  font-size: 12.5px;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line-strong);
}
.feature-title {
  display: block;
  margin-top: 4px;
  font-size: 14.6px;
  font-weight: 700;
  font-family: var(--serif);
  line-height: 1.32;
}
.feature-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- season */
.season {
  height: 297px;
  background: #f7f6ec;
  display: flex;
  align-items: center;
}
.season .container { width: min(var(--container), calc(100% - var(--gutter) * 2)); }
.season-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.season-table thead th {
  background: var(--sage);
  color: #f6faf2;
  font-weight: 500;
  font-size: 13px;
  text-align: left;
  padding: 11px 16px;
}
.season-table thead th:first-child { border-radius: 999px 0 0 999px; padding-left: 22px; }
.season-table thead th:last-child { border-radius: 0 999px 999px 0; padding-right: 22px; }
.season-table tbody th,
.season-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}
.season-table tbody th:first-child { padding-left: 22px; }
.season-table tbody tr:last-child th,
.season-table tbody tr:last-child td { border-bottom: 0; }
.season-table tbody th {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- topics */
.topics {
  height: 330px;
  padding: 18px 0;
  background: var(--bg-cool);
  display: flex;
  align-items: flex-start;
}
.topics-title { margin: 0; }
.topic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 46px;
  row-gap: 8px;
}
.topic-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border-radius: var(--r-card);
  transition: background .15s ease;
}
.topic-card:hover { background: rgba(31, 92, 34, .05); }
.topic-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--brand);
  background: #fbfbf5;
}
.topic-icon svg { width: 22px; height: 22px; }
.topic-body { flex: 1; min-width: 0; }
.topic-name {
  display: block;
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 700;
}
.topic-desc {
  display: block;
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.topic-arrow {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #f4f8ee;
  transition: transform .2s ease;
}
.topic-arrow svg { width: 16px; height: 16px; }
.topic-card:hover .topic-arrow { transform: translateX(3px); }

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--brand-deep);
  color: #e9f1e4;
  padding: 40px 0 32px;
}
.footer-inner { width: min(var(--container), calc(100% - var(--gutter) * 2)); }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px 34px;
}
.footer-brand-col {
  flex: 1.4 1 240px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links,
.footer-topics,
.footer-about {
  flex: 1 1 170px;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
}
.footer-col-label {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(233, 241, 228, .55);
  margin-bottom: 2px;
}
.footer-links a,
.footer-topics a,
.footer-about a {
  color: rgba(233, 241, 228, .86);
  transition: color .15s ease;
}
.footer-links a:hover,
.footer-topics a:hover,
.footer-about a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-icp,
.footer-copy { font-size: 12.5px; color: rgba(233, 241, 228, .62); }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: #eaf2e5;
}
.footer-brand .brand-leaf { width: 28px; height: 28px; }
.footer-brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: #f2f7ee;
}
.footer-tagline {
  font-size: 12.5px;
  color: rgba(233, 241, 228, .72);
}
.footer-note {
  margin-top: 26px;
  font-size: 12.8px;
  color: rgba(233, 241, 228, .72);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-note-label { color: rgba(233, 241, 228, .92); }
.footer-back {
  margin-left: auto;
  font-size: 12px;
  color: rgba(233, 241, 228, .55);
  border-bottom: 1px solid rgba(233, 241, 228, .3);
}
.footer-back:hover { color: #fff; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .main-nav { gap: 14px; font-size: 12.5px; }
  .brand-name { font-size: 19px; }
  .brand-tag { display: none; }
  .hero-copy { width: 500px; }
  .hero h1 { font-size: 34px; }
  .split, .split-steps { grid-template-columns: 320px 1fr; gap: 30px; }
  .subject-name { font-size: 14px; }
  .feature-title { font-size: 14.5px; }
}

@media (max-width: 1024px) {
  .site-header { height: auto; }
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0 0;
  }
  .main-nav {
    order: 3;
    flex: 1 1 100%;
    margin: 8px 0 0;
    padding: 8px 0 12px;
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid var(--line);
  }
  .main-nav::-webkit-scrollbar { display: none; }
}

@media (max-width: 980px) {
  .main-nav { gap: 14px; font-size: 13px; }
  .brand-name { font-size: 18px; }
  .hero { height: auto; }
  .hero-inner { display: block; padding: 36px 0 0; }
  .hero-copy { width: 100%; }
  .hero-media { position: relative; left: 0; margin: 30px 0 0; height: 300px; }
  .hero-media::after { background: linear-gradient(180deg, rgba(240,239,223,.9), rgba(240,239,223,0) 34%); }
  .steps, .subjects, .featured, .season, .topics, .site-footer { height: auto; }
  .steps { padding: 44px 0; }
  .subjects, .featured, .season, .topics { padding: 44px 0; }
  .split, .split-steps {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    grid-template-rows: auto;
    gap: 24px;
  }
  .split > .split-head,
  .split > :not(.split-head):not(.feature-cta),
  .feature-cta { grid-area: auto; align-self: auto; justify-self: auto; }
  .step-list { grid-template-columns: 1fr; gap: 14px; }
  .subject-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-list { grid-template-columns: 1fr; gap: 26px; }
  .feature-media img { aspect-ratio: 2.4 / 1; }
  .season-table { font-size: 12.5px; }
  .season-table-wrap { overflow-x: auto; }
  .topic-grid { grid-template-columns: 1fr; column-gap: 0; }
  .footer-top { gap: 22px 26px; }
  .footer-brand-col { flex: 1 1 100%; }
  .footer-note { margin-top: 18px; }
  .site-footer { padding: 34px 0 28px; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .brand-name { font-size: 18px; }
  .main-nav { gap: 12px; font-size: 12.5px; }
  .nav-cta { padding: 6px 11px; font-size: 12px; }
  .hero h1 { font-size: 27px; }
  .hero-lead { font-size: 14.5px; }
  .hero-actions { flex-wrap: wrap; }
  .hero-stats { flex-wrap: wrap; gap: 14px 20px; font-size: 13px; }
  .split-head h2 { font-size: 22px; }
  .subject-grid { grid-template-columns: repeat(2, 1fr); }
  .subject-name { font-size: 15px; }
  .topics-title { font-size: 21px; }
  .topic-card { padding: 12px 4px; gap: 12px; }
  .topic-icon { width: 40px; height: 40px; }
  .season-table thead th, .season-table tbody th, .season-table tbody td { padding: 9px 10px; }
  .footer-brand-name { font-size: 18px; }
  .footer-links, .footer-topics, .footer-about { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
