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

:root {
  --red: #FF3B30;
  --ink: #12141C;
  --cream: #F6F1E7;
  --mute: #565b69;
  --radius: 28px;
  --pad: clamp(1rem, 4.2vw, 2.75rem);
  --maxw: 1120px;
  --font-display: Righteous, Poppins, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: Poppins, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
a { color: inherit; }
p { margin: 0 0 1rem; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--cream);
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 14px 0;
  text-decoration: none;
  font-size: 1rem;
}
.skip:focus { left: 0; }

/* ---------- 头部：品牌行 + 菜单行 ---------- */
.masthead {
  border-bottom: 3px solid var(--ink);
  background: var(--cream);
}

.brandrow {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.1rem var(--pad) 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5vw, 2.15rem);
  letter-spacing: 0.02em;
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--red);
  color: var(--cream);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 5px 0 var(--ink);
  flex: 0 0 auto;
}
.mark-glyph { font-family: var(--font-display); font-size: 1.35rem; line-height: 1; }
.mark-img { width: 44px; height: 44px; object-fit: cover; }

.brand-word { position: relative; }
.brand:hover .brand-word::after,
.brand:focus-visible .brand-word::after {
  transform: scaleX(1);
}
.brand-word::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.1em;
  height: 5px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.navrow {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.15rem var(--pad) 0.55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.6rem;
  border-top: 1px dashed rgba(18, 20, 28, 0.28);
  padding-top: 0.55rem;
}

.navrow-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.1rem;
}

.navlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0.7rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  position: relative;
  transition: background 0.24s ease, color 0.24s ease;
}
.navlink::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.5rem;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.navlink:hover, .navlink:focus-visible { background: rgba(255, 59, 48, 0.1); }
.navlink:hover::after, .navlink:focus-visible::after { transform: scaleX(1); }
.navrow .navlink.is-off { display: none; }

.finder {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.finder-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.finder-input {
  width: 9rem;
  min-height: 42px;
  font: inherit;
  font-size: 1rem;
  padding: 0.35rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
}
.finder-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.24);
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.2rem var(--pad) 2rem;
  min-height: 45vh;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.6rem);
}

.hero-art {
  flex: 0 0 auto;
  width: clamp(62px, 13vw, 130px);
  color: var(--red);
  animation: spin-slow 22s linear infinite;
}

.hero-copy {
  margin-left: auto;
  text-align: right;
  max-width: 42rem;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.1rem, 7.4vw, 4.4rem);
  letter-spacing: 0.005em;
}
.hero-title::after {
  content: "";
  display: inline-block;
  width: 0.09em;
  height: 0.82em;
  margin-left: 0.06em;
  background: var(--red);
  vertical-align: -0.06em;
  animation: blink 1.05s steps(1) infinite;
}
.hero-title .ltr {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotate(5deg);
  animation: lift 0.66s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--d, 0ms);
}

.hero-sub {
  margin: 0.85rem 0 0 auto;
  max-width: 33rem;
  color: var(--mute);
  font-size: 1rem;
  line-height: 1.65;
}

/* ---------- 主区：正文 + 右侧栏 ---------- */
.stage {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15.5rem;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: start;
}

.sheet { min-width: 0; }
.sheet-inner { display: block; }

.sheet-inner > section {
  background: #fff;
  border-radius: var(--radius);
  padding: clamp(1.15rem, 3.2vw, 2.4rem);
  margin: 0 0 clamp(1.1rem, 3vw, 1.9rem);
  box-shadow: 0 20px 44px -28px rgba(18, 20, 28, 0.55), 0 2px 0 rgba(18, 20, 28, 0.05);
  scroll-margin-top: 1.5rem;
}

.sheet-inner h2 {
  font-size: clamp(1.35rem, 3.5vw, 1.9rem);
  margin: 0 0 0.85rem;
}
.sheet-inner h2 span {
  display: inline-block;
  background: linear-gradient(transparent 64%, rgba(255, 59, 48, 0.34) 64%);
}
.sheet-inner h3 {
  font-size: 1.16rem;
  margin: 1.5rem 0 0.5rem;
}
.sheet-inner h3 span { display: inline-block; }

.sheet-inner p { margin: 0 0 1rem; }
.sheet-inner ul, .sheet-inner ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.sheet-inner li { margin: 0.35rem 0; }
.sheet-inner a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.sheet-inner strong { font-weight: 600; }
.sheet-inner blockquote {
  margin: 1.2rem 0;
  padding: 0.85rem 1.1rem;
  border-left: 5px solid var(--red);
  background: rgba(255, 59, 48, 0.07);
  border-radius: 0 16px 16px 0;
}
.sheet-inner blockquote p:last-child { margin-bottom: 0; }
.sheet-inner figure { margin: 1.2rem 0; }
.sheet-inner figcaption { font-size: 1rem; color: var(--mute); margin-top: 0.4rem; }
.sheet-inner table { width: 100%; border-collapse: collapse; font-size: 1rem; margin: 0 0 1rem; }
.sheet-inner th, .sheet-inner td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(18, 20, 28, 0.16);
}
.sheet-inner code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  background: rgba(18, 20, 28, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

/* ---------- 右侧栏 ---------- */
.rail {
  position: sticky;
  top: 1.1rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 0.75rem;
  box-shadow: 8px 8px 0 var(--red);
}
.rail-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  letter-spacing: 0.16em;
  color: var(--red);
}
.rail-title span {
  display: inline-block;
  border-bottom: 2px solid currentColor;
  padding-bottom: 0.15rem;
}
.rail-list {
  list-style: none;
  counter-reset: rail;
  margin: 0;
  padding: 0;
}
.rail-list li { counter-increment: rail; }
.rail-list a {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 42px;
  padding: 0.2rem 0;
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px dashed rgba(18, 20, 28, 0.2);
  transition: color 0.2s ease, padding-left 0.24s ease;
}
.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--red);
  margin-right: 0.5rem;
}
.rail-list a:hover, .rail-list a:focus-visible {
  color: var(--red);
  padding-left: 0.3rem;
}
.rail-list li:last-child a { border-bottom: 0; }

/* ---------- 页脚 ---------- */
.tail {
  margin-top: 1rem;
  border-top: 4px solid var(--red);
  background: var(--ink);
  color: var(--cream);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.4rem 2.5rem;
  padding: 2.4rem max(var(--pad), calc((100% - var(--maxw)) / 2)) 1.1rem;
}

.tail-h {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--red);
  font-family: var(--font-body);
  font-weight: 600;
}
.tail-h span {
  display: inline-block;
  border-bottom: 2px solid currentColor;
  padding-bottom: 0.18rem;
}

.giant {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 11vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  background: linear-gradient(94deg, var(--red) 8%, #ffffff 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  overflow-wrap: anywhere;
}

.tail-nav-in dl { margin: 0; display: block; }
.tail-nav-in dt {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: rgba(246, 241, 231, 0.62);
  margin: 0.35rem 0 0.1rem;
}
.tail-nav-in dd { margin: 0; }
.tail-nav-in a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tail-nav-in a:hover, .tail-nav-in a:focus-visible {
  color: var(--red);
  border-bottom-color: var(--red);
}

.tail-base {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-top: 1px solid rgba(246, 241, 231, 0.24);
  padding-top: 1rem;
  margin-top: 0.6rem;
}
.copy { margin: 0; font-size: 1rem; color: rgba(246, 241, 231, 0.72); }
.top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 1rem;
  border: 2px solid rgba(246, 241, 231, 0.6);
  border-radius: 999px;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}
.top:hover, .top:focus-visible {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

@keyframes lift {
  to { opacity: 1; transform: none; }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: static;
    order: 2;
    box-shadow: 6px 6px 0 var(--red);
  }
  .rail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.9rem; }
  .rail-list a { min-height: 44px; }
}

@media (max-width: 760px) {
  .tail { grid-template-columns: 1fr; }
  .finder { margin-left: 0; width: 100%; }
  .finder-input { width: 100%; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero {
    min-height: 45vh;
    padding-top: 1rem;
    gap: 0.8rem;
    align-items: flex-start;
  }
  .hero-art { width: 56px; margin-top: 0.4rem; }
  .hero-title { font-size: clamp(1.9rem, 9.6vw, 3rem); }
  .hero-sub { font-size: 1rem; }
  .navrow { gap: 0.1rem; padding-left: 0.4rem; padding-right: 0.4rem; }
  .navlink { padding: 0.3rem 0.55rem; }
  .rail-list { grid-template-columns: 1fr; }
  .tail-base { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art, .hero-title::after { animation: none; }
  .hero-title .ltr { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

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