@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700&family=Comic+Neue:wght@300;400;700&display=swap');

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Baloo 2', 'Comic Neue', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  background: #fff;
  color: #000;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

/* ===== Announce Bar ===== */
.announce-bar {
  width: 100%;
  background: #000;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0.45rem 1rem;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2rem;
  background: #fff;
  border-bottom: 2px solid #000;
  padding: 0.75rem 2rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo-text {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #000;
  white-space: nowrap;
}

.main-nav {
  overflow: hidden;
}

.main-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.1rem;
  align-items: center;
  justify-content: flex-end;
}

.main-nav p a {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 9999px;
  transition: background 220ms ease, color 220ms ease;
  white-space: nowrap;
  min-height: 40px;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
}

.main-nav p a:hover,
.main-nav p a:focus-visible {
  background: #000;
  color: #fff;
  outline: none;
}

/* ===== Sticky Anchor Bar ===== */
.sticky-anchor-bar {
  position: sticky;
  top: 64px;
  z-index: 100;
  background: #000;
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-anchor-bar::-webkit-scrollbar {
  display: none;
}

.anchor-nav p {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: center;
  padding: 0 1.5rem;
  min-width: max-content;
}

.anchor-nav p a {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  border-right: 1px solid rgba(255,255,255,0.15);
  transition: background 220ms ease;
  min-height: 40px;
  white-space: nowrap;
}

.anchor-nav p a:last-child {
  border-right: none;
}

.anchor-nav p a:hover,
.anchor-nav p a:focus-visible {
  background: rgba(255,255,255,0.18);
  outline: none;
}

/* ===== Main / Wrap ===== */
main {
  width: 100%;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* ===== Hero Section ===== */
.hero-section {
  scroll-margin-top: 104px;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
}

/* Hero Media Side */
.hero-media {
  position: relative;
  overflow: hidden;
  background: #111;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 0;
}

.hero-img-block {
  overflow: hidden;
  position: relative;
}

.hero-img-block img,
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.hero-img-block:hover img {
  transform: scale(1.04);
}

.hero-img-a {
  transform: translateY(0) translateX(1.5rem);
  z-index: 2;
}

.hero-img-b {
  transform: translateY(0) translateX(-1.5rem);
  z-index: 1;
}

.hero-placeholder-a {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111 0%, #333 100%);
  min-height: 250px;
}

.hero-placeholder-b {
  width: 100%;
  height: 100%;
  background: linear-gradient(225deg, #222 0%, #444 100%);
  min-height: 250px;
}

.hero-slash {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) skewX(-8deg);
  width: 6px;
  height: 100%;
  background: #fff;
  z-index: 10;
}

/* Hero Copy Side */
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  padding: 4rem 3rem 4rem 2rem;
  background: #fff;
  position: relative;
}

.hero-copy::before {
  content: '';
  position: absolute;
  top: 0;
  left: -4rem;
  width: 5rem;
  height: 100%;
  background: #fff;
  transform: skewX(-6deg);
  z-index: 5;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: #000;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero-copy h1 {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: #000;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 6;
}

.hero-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  max-width: 38ch;
  margin-bottom: 2rem;
  position: relative;
  z-index: 6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.2rem;
  background: #000;
  color: #fff;
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  transition: background 220ms ease, transform 220ms ease;
  position: relative;
  z-index: 6;
  min-height: 40px;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  background: #333;
  transform: translateY(-2px);
  outline: none;
}

/* ===== Content Section ===== */
.content-section {
  padding: 4rem 2rem;
}

.content-with-aside {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== Aside ===== */
.content-aside {
  position: sticky;
  top: 120px;
}

.aside-inner {
  background: #000;
  color: #fff;
  border-radius: 28px;
  padding: 1.75rem 1.5rem;
}

.aside-heading {
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.75rem;
}

.aside-inner hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.25);
  margin-bottom: 1rem;
}

.aside-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.aside-list li a {
  display: block;
  font-size: 0.87rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  transition: background 200ms ease, color 200ms ease;
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-list li a:hover,
.aside-list li a:focus-visible {
  background: rgba(255,255,255,0.15);
  color: #fff;
  outline: none;
}

/* ===== Content Main (page.content) ===== */
.content-main {
  min-width: 0;
}

/* Section scroll margin for sticky nav */
.content-main article,
article[id] {
  scroll-margin-top: 115px;
}

/* Typography inside content */
.content-main h2 {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #000;
  margin-top: 3rem;
  margin-bottom: 0.5rem;
}

.content-main h2 + hr {
  border: none;
  border-top: 3px solid #000;
  margin-bottom: 1.5rem;
}

.content-main h3 {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #000;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content-main h3 + hr {
  border: none;
  border-top: 2px solid #000;
  margin-bottom: 1.25rem;
}

.content-main hr {
  border: none;
  border-top: 2px solid #000;
  margin: 1.5rem 0;
}

.content-main p {
  font-size: 1rem;
  line-height: 1.8;
  color: #222;
  margin-bottom: 1.1rem;
}

.content-main ul,
.content-main ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

.content-main li {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.4rem;
}

.content-main a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: opacity 200ms ease;
}

.content-main a:hover {
  opacity: 0.65;
}

.content-main strong {
  font-weight: 700;
}

/* Card-like blocks inside content */
.content-main article {
  margin-bottom: 3rem;
  padding: 2rem 2rem;
  border-radius: 28px;
  border: 2px solid #000;
  background: #fff;
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.content-main article:hover {
  box-shadow: 6px 6px 0 #000;
  transform: translate(-2px, -2px);
}

.content-main article:first-child {
  margin-top: 0;
}

/* Q&A / details are shown directly */
.content-main details {
  display: block;
}

.content-main details[open] summary ~ * {
  display: block;
}

/* ===== Footer ===== */
.site-footer {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 3rem 2rem 2.5rem;
  margin-top: 4rem;
  border-top: 4px solid #000;
}

.footer-brand {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer-copy {
  display: block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  max-width: 60ch;
  margin: 0 auto;
}

/* ===== Scroll Margin for all anchor sections ===== */
#home, #about, #lilunpian-fenlei, #changjian-wenti,
#lilunpian-haochu, #ruhe-guankan, #shijian-jieguo {
  scroll-margin-top: 115px;
}

/* ===== Stagger List Animation ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-main article {
  animation: fadeUp 0.5s ease both;
}

.content-main article:nth-child(1) { animation-delay: 0.05s; }
.content-main article:nth-child(2) { animation-delay: 0.1s; }
.content-main article:nth-child(3) { animation-delay: 0.15s; }
.content-main article:nth-child(4) { animation-delay: 0.2s; }
.content-main article:nth-child(5) { animation-delay: 0.25s; }
.content-main article:nth-child(6) { animation-delay: 0.3s; }
.content-main article:nth-child(7) { animation-delay: 0.35s; }

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  .site-header {
    padding: 0.65rem 1.25rem;
    gap: 1rem;
  }

  .main-nav p a {
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-rows: 55vw auto;
    min-height: auto;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-media {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    min-height: 55vw;
  }

  .hero-img-a {
    transform: none;
  }

  .hero-img-b {
    transform: none;
  }

  .hero-copy {
    align-items: flex-start;
    text-align: left;
    padding: 2.5rem 2rem;
  }

  .hero-copy::before {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .content-with-aside {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
  }

  .aside-inner {
    border-radius: 20px;
    padding: 1.25rem 1.25rem;
  }

  .aside-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .aside-list li a {
    border-radius: 9999px;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    min-height: 36px;
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 600px) {
  .site-header {
    grid-template-columns: auto 1fr;
    padding: 0.6rem 1rem;
    gap: 0.75rem;
  }

  .main-nav {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav p {
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: max-content;
    padding-right: 0.5rem;
  }

  .main-nav p a {
    font-size: 0.78rem;
    padding: 0.55rem 0.75rem;
    min-height: 40px;
  }

  .sticky-anchor-bar {
    top: 56px;
  }

  .hero-media {
    min-height: 60vw;
  }

  .hero-copy {
    padding: 2rem 1.25rem;
  }

  .hero-copy h1 {
    font-size: 1.75rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .content-section {
    padding: 2.5rem 1rem;
  }

  .content-main article {
    padding: 1.5rem 1.25rem;
    border-radius: 20px;
  }

  .footer-brand {
    font-size: clamp(2rem, 15vw, 4rem);
  }

  .site-footer {
    padding: 2rem 1.25rem 1.75rem;
  }

  #home, #about, #lilunpian-fenlei, #changjian-wenti,
  #lilunpian-haochu, #ruhe-guankan, #shijian-jieguo {
    scroll-margin-top: 110px;
  }

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

button[aria-expanded]{min-width:44px;min-height:44px}
