/* ==========================================================================
   林林 · nanlinbao.cn
   单文件样式表：无外部字体与 CDN，中文系统字体栈
   ========================================================================== */

:root {
  --cream: #faf7ec;
  --cream-deep: #f2eddd;
  --paper: #fffdf6;
  --ink: #15261b;
  --ink-soft: #55645a;
  --ink-faint: #7d8a80;
  --green-950: #0b2a19;
  --green-900: #10361f;
  --green-700: #1b5a38;
  --green-500: #2e7a4d;
  --leaf: #8cbf4a;
  --leaf-soft: #eef3e2;
  --line: rgba(21, 38, 27, 0.12);
  --line-soft: rgba(21, 38, 27, 0.07);
  --line-strong: rgba(21, 38, 27, 0.22);
  --shadow-sm: 0 2px 8px rgba(16, 54, 31, 0.05);
  --shadow-md: 0 18px 40px -24px rgba(16, 54, 31, 0.45);
  --shadow-lg: 0 40px 80px -40px rgba(16, 54, 31, 0.55);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --wrap: 1120px;
  --section-y: clamp(64px, 7.6vw, 112px);
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

code {
  font-family: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  background: rgba(27, 90, 56, 0.08);
  border-radius: 5px;
  padding: 0.1em 0.38em;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(140, 191, 74, 0.35);
}

:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(var(--wrap), 100% - clamp(40px, 10vw, 96px));
  margin-inline: auto;
}

.wrap--wide {
  width: min(1280px, 100% - clamp(40px, 10vw, 96px));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--green-900);
  color: var(--cream);
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip:focus {
  top: 16px;
}

/* --------------------------------------------------------------------------
   头部
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 236, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-soft);
  background: rgba(250, 247, 236, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(27, 90, 56, 0.18);
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  font-size: 15px;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color 0.2s var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--green-700);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.site-nav a:not(.nav-cta):hover::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--green-900);
  color: var(--cream) !important;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-cta:hover {
  background: var(--green-700);
  transform: translateY(-1px);
}

.nav-cta span {
  transition: transform 0.2s var(--ease);
}

.nav-cta:hover span {
  transform: translateX(3px);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
}

.nav-toggle-box {
  display: grid;
  gap: 5px;
  width: 18px;
}

.nav-toggle-box span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6.4vw, 88px);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -30% 20% auto -20%;
  height: 620px;
  background:
    radial-gradient(closest-side at 55% 40%, rgba(140, 191, 74, 0.22), transparent 75%),
    radial-gradient(closest-side at 80% 60%, rgba(27, 90, 56, 0.1), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 26px;
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.72);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 3px rgba(140, 191, 74, 0.22);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 .line {
  display: block;
}

.mark {
  position: relative;
  color: var(--green-700);
}

.mark::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  bottom: 0.04em;
  height: 0.16em;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(140, 191, 74, 0.5), rgba(140, 191, 74, 0.12));
  z-index: -1;
}

.hero-lead {
  max-width: 34em;
  margin: 26px 0 0;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.9;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn-primary {
  background: var(--green-900);
  color: var(--cream);
  box-shadow: 0 14px 30px -16px rgba(16, 54, 31, 0.8);
}

.btn-primary:hover {
  background: var(--green-700);
  transform: translateY(-2px);
  box-shadow: 0 20px 36px -18px rgba(16, 54, 31, 0.85);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--green-700);
  color: var(--green-700);
  transform: translateY(-2px);
}

.hero-meta {
  margin: 26px 0 0;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

/* Hero 插画 */

.hero-art {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1 / 1;
  justify-self: center;
  isolation: isolate;
}

.art-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(27, 90, 56, 0.25);
}

.art-ring--outer {
  inset: 2%;
  animation: spin 90s linear infinite;
}

.art-ring--inner {
  inset: 11%;
  border-style: solid;
  border-color: rgba(27, 90, 56, 0.12);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.art-disc {
  position: absolute;
  inset: 17%;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid rgba(255, 253, 246, 0.9);
  box-shadow: 0 34px 70px -34px rgba(16, 54, 31, 0.75),
    0 0 0 1px rgba(27, 90, 56, 0.08);
  background: #b8d0a1;
}

.art-disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note {
  position: absolute;
  display: grid;
  gap: 2px;
  width: max-content;
  max-width: 230px;
  padding: 13px 17px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 253, 246, 0.97);
  box-shadow: 0 22px 44px -26px rgba(16, 54, 31, 0.55);
  font-size: 13px;
  line-height: 1.5;
}

.note-label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--green-700);
  text-transform: uppercase;
}

.note strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.note-sub {
  color: var(--ink-faint);
  font-size: 12.5px;
}

.note--course {
  top: 8%;
  left: -2%;
  transform: rotate(-2.5deg);
}

.note--todo {
  top: 43%;
  right: -3%;
  transform: rotate(2deg);
}

.note--digest {
  bottom: 6%;
  left: 2%;
  transform: rotate(-1.5deg);
}

/* --------------------------------------------------------------------------
   通用章节
   -------------------------------------------------------------------------- */

.section {
  padding: var(--section-y) 0;
}

.section--paper {
  background:
    linear-gradient(180deg, rgba(242, 237, 221, 0) 0%, rgba(242, 237, 221, 0.7) 18%, rgba(242, 237, 221, 0.7) 82%, rgba(242, 237, 221, 0) 100%);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-700);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

h2 {
  margin: 0;
  font-size: clamp(27px, 3.4vw, 42px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  margin: 18px 0 0;
  max-width: 40em;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.85;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   功能卡片
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}

.card {
  position: relative;
  padding: clamp(24px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(27, 90, 56, 0.22);
  box-shadow: var(--shadow-md);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--leaf-soft);
  color: var(--green-700);
}

.card-icon svg {
  width: 23px;
  height: 23px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   三步（深绿）
   -------------------------------------------------------------------------- */

.steps {
  position: relative;
  overflow: hidden;
  padding: var(--section-y) 0;
  background: var(--green-900);
  color: #efe9d8;
}

.steps::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px 340px at 84% -10%, rgba(140, 191, 74, 0.2), transparent 70%),
    radial-gradient(520px 300px at 8% 110%, rgba(140, 191, 74, 0.1), transparent 70%);
  pointer-events: none;
}

.steps .wrap {
  position: relative;
}

.section-head--light .eyebrow {
  color: #a9c98a;
}

.section-head--light .lead {
  color: rgba(239, 233, 216, 0.72);
}

.section-head--light h2 {
  color: #f6f1e2;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  padding-top: 26px;
  border-top: 1px solid rgba(239, 233, 216, 0.2);
}

.step-num {
  display: block;
  margin-bottom: 18px;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: #a9c98a;
}

.step h3 {
  margin: 0 0 10px;
  font-size: clamp(19px, 1.7vw, 22px);
  font-weight: 700;
}

.step p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: rgba(239, 233, 216, 0.74);
}

.step code {
  background: rgba(239, 233, 216, 0.12);
  color: #e9e2cd;
}

.steps-foot {
  margin: 44px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(239, 233, 216, 0.14);
  font-size: 13.5px;
  color: rgba(239, 233, 216, 0.55);
}

/* --------------------------------------------------------------------------
   聊天记录画廊
   -------------------------------------------------------------------------- */

.gallery {
  display: flex;
  gap: clamp(14px, 2vw, 24px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 26px;
  scrollbar-width: thin;
  scrollbar-color: rgba(27, 90, 56, 0.3) transparent;
}

.gallery::-webkit-scrollbar {
  height: 6px;
}

.gallery::-webkit-scrollbar-thumb {
  background: rgba(27, 90, 56, 0.25);
  border-radius: 999px;
}

.gallery figure {
  flex: 0 0 clamp(216px, 24vw, 290px);
  margin: 0;
  scroll-snap-align: start;
}

.gallery img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(27, 90, 56, 0.1);
  border-radius: var(--radius-lg);
  background: #fafaf2;
  box-shadow: 0 26px 50px -34px rgba(16, 54, 31, 0.6);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.gallery figure:hover img {
  transform: translateY(-4px);
  box-shadow: 0 34px 60px -34px rgba(16, 54, 31, 0.65);
}

.gallery figcaption {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.gallery figcaption span {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--green-700);
}

.gallery-hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   边界与隐私
   -------------------------------------------------------------------------- */

.boundaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.panel {
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.panel--muted {
  background: rgba(255, 253, 246, 0.55);
  border-style: dashed;
}

.panel h3 {
  margin: 0 0 18px;
  font-size: 19px;
  font-weight: 700;
}

.checks,
.crosses {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px dashed var(--line);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.checks li:first-child {
  border-top: 0;
  padding-top: 0;
}

.checks strong {
  color: var(--ink);
  font-weight: 600;
}

.tick {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--leaf-soft);
  color: var(--green-700);
  font-size: 11px;
  font-weight: 700;
}

.crosses li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  padding: 11px 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.crosses li span {
  color: #b08b6b;
  font-size: 13px;
  line-height: 1.9;
}

.panel-note {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-wrap .section-head {
  margin-bottom: 32px;
}

.faq {
  max-width: 860px;
  border-bottom: 1px solid var(--line);
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s var(--ease);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--green-700);
}

.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s var(--ease);
  opacity: 0.6;
}

.faq details[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.faq details p {
  margin: 0;
  padding: 0 4px 24px;
  max-width: 46em;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.9;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(40px, 5vw, 64px) 0 32px;
  border-top: 1px solid var(--line);
  background: rgba(242, 237, 221, 0.5);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(27, 90, 56, 0.16);
}

.footer-brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.footer-brand p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink-faint);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: 14px;
}

.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer-nav a:hover {
  color: var(--green-700);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-faint);
}

.footer-bottom p {
  margin: 0;
}

.icp a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.icp a:hover {
  color: var(--green-700);
  border-bottom-color: rgba(27, 90, 56, 0.35);
}

.icp-name {
  display: inline-block;
  margin-left: 10px;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .icp-name {
    display: block;
    margin: 4px 0 0;
  }
}

/* 首屏进场：纯 CSS，不依赖 JS，不会闪 */

.hero-copy .intro,
.hero-art {
  animation: rise 0.9s var(--ease) both;
}

.hero-copy .intro:nth-child(1) {
  animation-delay: 0.05s;
}

.hero-copy .intro:nth-child(2) {
  animation-delay: 0.12s;
}

.hero-copy .intro:nth-child(3) {
  animation-delay: 0.19s;
}

.hero-copy .intro:nth-child(4) {
  animation-delay: 0.26s;
}

.hero-copy .intro:nth-child(5) {
  animation-delay: 0.33s;
}

.hero-art {
  animation-name: float-in;
  animation-delay: 0.1s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.err-page {
  padding: clamp(80px, 16vh, 160px) 0 clamp(64px, 12vh, 120px);
}

.err-inner {
  max-width: 640px;
  text-align: center;
}

.err-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 26px;
  border-radius: 50%;
  border: 1px solid rgba(27, 90, 56, 0.16);
  box-shadow: var(--shadow-sm);
}

.err-eyebrow {
  justify-content: center;
}

.err-title {
  font-size: clamp(28px, 4vw, 40px);
}

.err-lead {
  margin-inline: auto;
}

.err-actions {
  margin: 32px 0 0;
}

/* --------------------------------------------------------------------------
   滚动出现（只在 JS 生效时启用）
   -------------------------------------------------------------------------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   断点
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero-art {
    max-width: 420px;
  }

  .note {
    max-width: 200px;
    padding: 11px 14px 12px;
  }

  .note--course {
    left: -6%;
  }

  .note--todo {
    right: -6%;
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .hero-art {
    order: -1;
    max-width: 340px;
  }

  .note {
    display: none;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 4px 12px;
    padding: 26px 0 26px;
  }

  .step-num {
    grid-row: span 2;
    margin: 0;
    padding-top: 6px;
  }

  .boundaries {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px clamp(20px, 5vw, 40px) 22px;
    background: var(--cream);
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 24px 40px -30px rgba(16, 54, 31, 0.5);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--line-soft);
  }

  .site-nav a:not(.nav-cta)::after {
    display: none;
  }

  .nav-cta {
    margin-top: 16px;
    justify-content: center;
    border-bottom: 0 !important;
    padding: 13px 18px;
  }

  .header-inner {
    position: relative;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .hero-art {
    max-width: 280px;
  }

  .gallery {
    padding-left: 4px;
    padding-right: 4px;
  }

  .gallery figure {
    flex-basis: 76%;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
