@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Righteous&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-white: #ffffff;
  --c-surface: #f5f5f5;
  --c-ink: #1f1f1f;
  --c-ink-soft: #444444;
  --c-ink-muted: #888888;
  --c-border: #e0e0e0;
  --c-accent: #1f1f1f;
  --radius-card: 20px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 6px 20px rgba(0,0,0,0.10);
  --font-head: 'Righteous', 'Impact', sans-serif;
  --font-body: 'Poppins', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --nav-h: 110px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--c-surface);
  color: var(--c-ink);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Section scroll offset ── */
section[id] {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

/* ── Wrapper ── */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--c-surface);
}

.brand-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.brand-text {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--c-ink);
  letter-spacing: 0.02em;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: var(--c-ink);
  color: var(--c-white);
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 0.9rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  min-height: 40px;
  transition: background var(--transition), transform var(--transition);
}
.header-cta:hover {
  background: #333;
  transform: scale(1.03);
}

/* ── Nav row ── */
.site-nav {
  padding: 8px 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav > p {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
  margin: 0;
}

.site-nav > p > a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  color: var(--c-ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 40px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  border: 1px solid var(--c-border);
}
.site-nav > p > a:hover {
  background: var(--c-ink);
  color: var(--c-white);
  border-color: var(--c-ink);
  transform: scale(1.04);
}

/* ══════════════════════════════
   MAIN
══════════════════════════════ */
.site-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ── Hero ── */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  min-height: 45vh;
  padding: 32px 24px;
  background: var(--c-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--c-border);
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}

.hero-figure {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.2;
  color: var(--c-ink);
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--c-ink-soft);
  line-height: 1.7;
  font-weight: 300;
}

/* ── Content section with aside ── */
.content-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

/* ── Aside ── */
.content-aside {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 20px 18px;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

.aside-title {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--c-ink);
  margin-bottom: 10px;
}

.content-aside hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin-bottom: 14px;
}

.aside-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-nav-list li a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--c-ink-soft);
  transition: background var(--transition), color var(--transition);
  min-height: 40px;
  line-height: 1.4;
  display: flex;
  align-items: center;
}
.aside-nav-list li a:hover {
  background: var(--c-surface);
  color: var(--c-ink);
}

/* ── Content Body (Bento Grid) ── */
.content-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ══════════════════════════════
   BENTO GRID — page.content sections
══════════════════════════════ */
.content-body section {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 28px 28px 32px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.content-body section:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px) scale(1.005);
}

.content-body section figure,
.content-body section aside {
  margin-top: 16px;
  background: var(--c-surface);
  border-radius: 12px;
  padding: 16px;
}

/* Headings inside content */
.content-body h2 {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  color: var(--c-ink);
  margin-bottom: 10px;
  line-height: 1.3;
}

.content-body h2 + hr {
  border: none;
  border-top: 2px solid var(--c-ink);
  margin-bottom: 16px;
  width: 48px;
}

.content-body h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--c-ink);
  margin: 18px 0 8px;
}

.content-body h3 + hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin-bottom: 12px;
}

.content-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-ink-soft);
  margin-bottom: 12px;
}

.content-body ul,
.content-body ol {
  padding-left: 1.4em;
  margin-bottom: 14px;
  color: var(--c-ink-soft);
  line-height: 1.75;
}

.content-body li {
  margin-bottom: 6px;
}

.content-body a {
  color: var(--c-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-body a:hover {
  color: var(--c-ink-soft);
}

.content-body img {
  max-width: 100%;
  border-radius: 10px;
  display: block;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  margin-bottom: 14px;
}
.content-body th,
.content-body td {
  border: 1px solid var(--c-border);
  padding: 8px 12px;
  text-align: left;
}
.content-body th {
  background: var(--c-surface);
  font-weight: 600;
}

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
.site-footer {
  background: var(--c-ink);
  color: var(--c-white);
  padding: 40px 24px 20px;
}

.footer-top {
  text-align: center;
  margin-bottom: 32px;
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.footer-tagline {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto 32px;
}

.footer-col dt {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-col dd {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

.footer-col dd a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  transition: color var(--transition);
}
.footer-col dd a:hover {
  color: var(--c-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

/* ══════════════════════════════
   STAGGER ANIMATION
══════════════════════════════ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.content-body section {
  animation: fadeSlideUp 0.45s ease both;
}
.content-body section:nth-child(1) { animation-delay: 0.05s; }
.content-body section:nth-child(2) { animation-delay: 0.10s; }
.content-body section:nth-child(3) { animation-delay: 0.15s; }
.content-body section:nth-child(4) { animation-delay: 0.20s; }
.content-body section:nth-child(5) { animation-delay: 0.25s; }
.content-body section:nth-child(6) { animation-delay: 0.30s; }
.content-body section:nth-child(7) { animation-delay: 0.35s; }

/* ── Parallax hero subtle drift ── */
.hero-section {
  will-change: transform;
}

/* ══════════════════════════════
   REDUCED MOTION
══════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ══════════════════════════════
   RESPONSIVE — tablet
══════════════════════════════ */
@media (max-width: 900px) {
  .content-section {
    grid-template-columns: 1fr;
  }
  .content-aside {
    position: static;
    display: none;
  }
  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══════════════════════════════
   RESPONSIVE — mobile 375px
══════════════════════════════ */
@media (max-width: 600px) {
  :root {
    --nav-h: 120px;
  }

  .header-brand-row {
    padding: 10px 16px;
  }

  .brand-text {
    font-size: 1.15rem;
  }

  .header-cta {
    padding: 10px 16px;
    font-size: 0.82rem;
  }

  .site-nav {
    padding: 6px 12px;
  }

  .site-nav > p > a {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .site-main {
    padding: 16px 12px 40px;
  }

  .hero-section {
    flex-direction: column;
    align-items: flex-end;
    min-height: 45vh;
    padding: 24px 18px;
  }

  .hero-h1 {
    font-size: 1.6rem;
  }

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

  .content-body section {
    padding: 20px 16px 24px;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-brand {
    font-size: 1.2rem;
  }
}
