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

:root {
  --red: #F94144;
  --blue: #277DA1;
  --sun: #F9C74F;
  --text: #12303f;
  --paper: #FFFCF3;
  --rail: 250px;
  --edge: 3px solid #12303f;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(39, 125, 161, 0.22) 1.4px, transparent 1.5px);
  background-size: 16px 16px;
  color: var(--text);
  font-family: 'Baloo 2', 'Comic Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
}

::selection {
  background: var(--sun);
  color: var(--text);
}

a { color: var(--blue); }

img { max-width: 100%; }

/* ---------- 左侧竖排导航 ---------- */

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 18px 22px;
  background: var(--red);
  border-right: var(--edge);
  z-index: 40;
  overflow-y: auto;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  counter-reset: nav;
}

.rail-brand { margin-bottom: 8px; }

.brand {
  display: block;
  padding: 4px 2px 10px;
  color: #fff;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  line-height: 1.3;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.55);
}

.rail-list li:not(.rail-brand) a {
  counter-increment: nav;
}

.rail-list li:not(.rail-brand) a::before {
  content: counter(nav, decimal-leading-zero);
  margin-right: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.rail-list li:not(.rail-brand) a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 11px;
  color: #fff;
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.rail-list li:not(.rail-brand) a:hover,
.rail-list li:not(.rail-brand) a:focus-visible {
  background: #fff;
  color: var(--red);
  border-color: var(--text);
}

.rail-contact {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--sun);
  color: var(--text);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid var(--text);
  border-radius: 10px;
  transition: background-color 160ms ease;
}

.rail-contact:hover,
.rail-contact:focus-visible { background: #fff; }

/* ---------- 主区域外壳 ---------- */

.shell { margin-left: var(--rail); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 45vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--blue);
  border-bottom: var(--edge);
  overflow: hidden;
  isolation: isolate;
}

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

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: rgba(18, 48, 63, 0.64);
  background-image: radial-gradient(rgba(255, 255, 255, 0.3) 1.6px, transparent 1.7px);
  background-size: 14px 14px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
}

.hero-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.24;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.hero-lead {
  margin: 16px auto 0;
  max-width: 44ch;
  color: #fff;
  opacity: 0.94;
  font-size: 1rem;
}

/* ---------- 正文 + 侧栏 ---------- */

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 302px;
  gap: 34px;
  padding: 44px 34px 64px;
  max-width: 1220px;
}

div { min-width: 0; }

div > article {
  padding: 26px 0;
  border-top: 3px dotted rgba(18, 48, 63, 0.32);
  scroll-margin-top: 22px;
}

div > article:first-child {
  border-top: 0;
  padding-top: 0;
}

div h2 {
  margin: 22px 0 12px;
  font-size: 1.55rem;
  line-height: 1.35;
  color: var(--blue);
  border-left: 7px solid var(--sun);
  padding-left: 12px;
}

div h3 {
  margin: 20px 0 10px;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--text);
}

div p { margin: 0.75em 0; }

div ul,
div ol { padding-left: 1.3em; }

div li { margin: 0.35em 0; }

div img {
  height: auto;
  border: 2px solid var(--text);
  border-radius: 10px;
}

div a {
  color: var(--blue);
  text-underline-offset: 3px;
}

div a:hover { color: var(--red); }

div blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  background: #fff;
  border-left: 7px solid var(--red);
  border-radius: 0 10px 10px 0;
}

div code {
  font-family: 'Comic Neue', ui-monospace, monospace;
  background: var(--sun);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- 右侧 aside ---------- */

.side {
  position: sticky;
  top: 22px;
  align-self: start;
  padding: 16px 16px 20px;
  background: #fff;
  border: 2px solid var(--text);
  border-top: 9px solid var(--red);
  border-radius: 10px;
}

.side-kicker {
  display: block;
  margin-bottom: 2px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--red);
}

.side-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--text);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  counter-reset: side;
}

.side-list li a {
  counter-increment: side;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 11px;
  background: var(--paper);
  border: 2px solid rgba(18, 48, 63, 0.32);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.side-list li a::before {
  content: counter(side, decimal-leading-zero);
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.6;
}

.side-list li a:hover,
.side-list li a:focus-visible {
  background: var(--sun);
  border-color: var(--text);
}

/* ---------- 页脚 ---------- */

.foot {
  padding: 40px 34px 22px;
  background: var(--text);
  color: #fff;
  border-top: 4px solid var(--red);
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 26px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.35);
}

.foot-word {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.foot-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 24px;
  background: var(--sun);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--sun);
  border-radius: 10px;
  transition: background-color 160ms ease, color 160ms ease;
}

.foot-btn:hover,
.foot-btn:focus-visible {
  background: transparent;
  color: var(--sun);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  padding: 28px 0;
}

.foot-cols dl { margin: 0; }

.foot-cols dt {
  margin-bottom: 8px;
  padding-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--sun);
  border-bottom: 2px solid rgba(249, 199, 79, 0.45);
}

.foot-cols dd {
  margin: 0;
  font-size: 0.95rem;
}

.foot-cols dd a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}

.foot-cols dd a:hover,
.foot-cols dd a:focus-visible {
  color: var(--sun);
  border-color: var(--sun);
}

.foot-base {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  text-align: center;
}

.foot-base p {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

/* ---------- 滚动显现 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 900px) {
  .rail {
    position: static;
    width: auto;
    padding: 12px 16px 14px;
    border-right: 0;
    border-bottom: var(--edge);
    overflow: visible;
  }

  .rail-list {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .rail-brand {
    margin: 0;
    flex: 0 0 auto;
  }

  .brand {
    padding: 8px 2px;
    font-size: 1.18rem;
    border-bottom: 0;
  }

  .rail-list li:not(.rail-brand) { flex: 0 0 auto; }

  .rail-list li:not(.rail-brand) a {
    white-space: nowrap;
    min-height: 44px;
    padding: 8px 12px;
    border-color: rgba(255, 255, 255, 0.55);
  }

  .rail-contact {
    margin-top: 10px;
    min-height: 46px;
  }

  .shell { margin-left: 0; }

  .hero {
    min-height: 38vh;
    padding: 32px 18px;
  }

  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 30px 18px 44px;
    max-width: none;
  }

  .side {
    position: static;
    order: 2;
  }

  .foot { padding: 32px 18px 20px; }

  .foot-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 460px) {
  body { font-size: 16.5px; }

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

  div h2 { font-size: 1.34rem; }
}

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