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

:root{
  --ink:#1f1726;
  --ink-soft:#4b3f55;
  --plum:#56228b;
  --plum-lt:#7b46b3;
  --ochre:#8b4513;
  --paper:#f7f2ea;
  --paper-2:#efe4d4;
  --card:#fffdf8;
  --line:#dbcdba;
  --ring:rgba(86,34,139,.16);
  --shadow:0 22px 46px -32px rgba(31,23,38,.6);
  --shadow-soft:0 12px 26px -20px rgba(31,23,38,.5);
}

*{box-sizing:border-box}

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

body{
  margin:0;
  font-family:Exo,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:17px;
  line-height:1.78;
  color:var(--ink);
  background-color:var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(139,69,19,.16) 1px, transparent 1.4px),
    radial-gradient(circle at 88% 6%, rgba(86,34,139,.12), transparent 46%);
  background-size:22px 22px, 100% 100%;
  background-repeat:repeat, no-repeat;
}

a{color:var(--plum)}
a:hover{color:var(--ochre)}

.skip{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:99;
  padding:12px 18px;
  min-height:44px;
  background:var(--ink);
  color:var(--paper);
  text-decoration:none;
  border-radius:0 0 16px 0;
}
.skip:focus{left:0}

/* ---------- 顶部 ---------- */
.top{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  padding:10px clamp(14px,4vw,40px);
  background:rgba(247,242,234,.94);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(10px);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding-right:6px;
  text-decoration:none;
  color:var(--ink);
  font-weight:600;
  letter-spacing:.02em;
}

.brand-mark{
  width:24px;
  height:26px;
  background:linear-gradient(140deg,var(--plum),var(--ochre));
  border-radius:62% 38% 55% 45% / 48% 56% 44% 52%;
  box-shadow:0 0 0 4px var(--ring);
}

.brand-name{white-space:nowrap}

.tabs{
  flex:1 1 320px;
  min-width:0;
  order:3;
}

.tabs ol{
  display:flex;
  align-items:center;
  gap:2px;
  margin:0;
  padding:2px 0 6px;
  list-style:none;
  overflow-x:auto;
  scrollbar-width:thin;
}

.tabs a{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:8px 12px;
  white-space:nowrap;
  text-decoration:none;
  color:var(--ink-soft);
  border-radius:14px 14px 14px 4px;
  font-size:1rem;
  transition:background .2s ease,color .2s ease;
}

.tabs a:hover,
.tabs a:focus-visible{
  background:var(--paper-2);
  color:var(--plum);
}

.ic{
  width:7px;
  height:7px;
  border-radius:50% 50% 50% 2px;
  background:var(--ochre);
  opacity:.75;
  flex:none;
}

.cta{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:10px 20px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--plum),var(--ochre));
  color:#fdfaf5;
  text-decoration:none;
  font-weight:500;
  box-shadow:var(--shadow-soft);
}

.cta:hover{color:#fff;filter:brightness(1.07)}

/* ---------- 主体骨架 ---------- */
main{display:block}

div{
  display:grid;
  grid-template-columns:minmax(0,1fr) 286px;
  gap:0 46px;
  max-width:1200px;
  margin:0 auto;
  padding:0 clamp(14px,4vw,40px);
}

/* ---------- 首屏 ---------- */
.hero{
  grid-column:1 / -1;
  min-height:calc(100vh - 76px);
  display:grid;
  align-items:center;
  padding:clamp(30px,7vw,84px) 0 clamp(36px,6vw,66px);
  border-bottom:1px solid var(--line);
  background-image:radial-gradient(circle at 1px 1px, rgba(86,34,139,.2) 1px, transparent 1.6px);
  background-size:20px 20px;
}

.hero-inner{
  display:flex;
  flex-direction:row-reverse;
  align-items:center;
  justify-content:space-between;
  gap:clamp(18px,4vw,52px);
}

.hero-copy{
  flex:1 1 auto;
  text-align:right;
}

.hero-copy h1{
  margin:0 0 0 auto;
  max-width:20ch;
  font-size:clamp(2rem,5.6vw,4.2rem);
  line-height:1.14;
  font-weight:600;
  letter-spacing:-.015em;
  color:var(--ink);
  text-wrap:balance;
}

.hero-art{
  flex:0 0 auto;
  width:clamp(110px,22vw,220px);
}

.hero-art svg{
  width:100%;
  height:auto;
  display:block;
  filter:drop-shadow(0 24px 36px rgba(86,34,139,.24));
  animation:drift 9s ease-in-out infinite alternate;
}

@keyframes drift{
  from{transform:translateY(0) rotate(0)}
  to{transform:translateY(-10px) rotate(1.6deg)}
}

/* ---------- 正文分区 ---------- */
div > article:not(.hero){
  grid-column:1;
  margin:0 0 26px;
  padding:clamp(20px,3.2vw,36px);
  background:var(--card);
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow);
  scroll-margin-top:104px;
}

div > article:not(.hero):nth-child(3n){
  border-radius:34px 24px 34px 26px;
}

div > article:not(.hero):nth-child(3n+1){
  border-radius:24px 34px 26px 34px;
}

div > article:not(.hero) + article:not(.hero){
  margin-top:0;
}

div > article:not(.hero) h2{
  margin:0 0 .5em;
  font-size:clamp(1.3rem,2.6vw,1.75rem);
  line-height:1.3;
  letter-spacing:-.01em;
  color:var(--plum);
}

div > article:not(.hero) h3{
  margin:1.4em 0 .4em;
  font-size:1.15rem;
  color:var(--ochre);
}

div > article:not(.hero) p{
  margin:0 0 1em;
  max-width:66ch;
}

div > article:not(.hero) ul,
div > article:not(.hero) ol{
  margin:0 0 1em;
  padding-left:1.25em;
  max-width:66ch;
}

div > article:not(.hero) li{margin:0 0 .45em}

div > article:not(.hero) img{
  max-width:100%;
  height:auto;
  border-radius:20px;
  box-shadow:var(--shadow-soft);
}

small{
  display:block;
  font-family:"Roboto Mono",ui-monospace,Menlo,monospace;
  font-size:.95rem;
  letter-spacing:.16em;
  line-height:1.5;
  color:var(--ochre);
}

div > article:not(.hero) small + h2,
div > article:not(.hero) small + h3{
  margin-top:.15em;
}

blockquote{
  margin:0 0 1em;
  padding:14px 18px;
  border-left:3px solid var(--ochre);
  border-radius:0 18px 18px 0;
  background:var(--paper-2);
  color:var(--ink-soft);
}

/* ---------- 侧栏 ---------- */
.rail{
  grid-column:2;
  grid-row:2;
  align-self:start;
  margin-bottom:26px;
  padding:18px 16px 20px;
  background:linear-gradient(170deg,#f2e8db,#faf5ed);
  border:1px solid var(--line);
  border-radius:26px 26px 26px 8px;
  box-shadow:var(--shadow-soft);
}

.rail-kicker{color:var(--ochre)}

.rail-title{
  margin:.15em 0 .8em;
  font-size:1.1rem;
  color:var(--plum);
}

.rail-nav ol{
  display:grid;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
}

.rail-nav a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:8px 12px;
  text-decoration:none;
  color:var(--ink-soft);
  border-radius:14px 14px 14px 4px;
  transition:background .2s ease,color .2s ease;
}

.rail-nav a:hover{background:#fff;color:var(--plum)}

.rail-nav a.on{
  background:var(--plum);
  color:#fdfaf5;
}

/* ---------- 页脚 ---------- */
.foot{
  margin-top:34px;
  padding:clamp(30px,5vw,58px) clamp(16px,5vw,44px) 22px;
  background:var(--ink);
  color:#e7ddcd;
  border-radius:44px 44px 0 0;
  background-image:radial-gradient(circle at 1px 1px, rgba(247,242,234,.11) 1px, transparent 1.5px);
  background-size:26px 26px;
}

.foot-grid{
  display:grid;
  grid-template-columns:1.5fr 1fr;
  gap:26px;
  max-width:1200px;
  margin:0 auto;
}

.foot-addr{font-style:normal}

.foot-mark{
  display:block;
  font-size:clamp(2.1rem,8vw,4.6rem);
  line-height:1.05;
  font-weight:700;
  letter-spacing:-.02em;
  color:#f7f2ea;
  word-break:break-word;
}

.foot-links{
  display:grid;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
  align-content:start;
}

.foot-links a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:8px 0;
  color:#d9cdbb;
  text-decoration:none;
  border-bottom:1px dashed rgba(219,205,186,.24);
}

.foot-links a:hover{color:#fff}

.copy{
  max-width:1200px;
  margin:26px auto 0;
  padding-top:14px;
  border-top:1px solid rgba(219,205,186,.22);
  font-family:"Roboto Mono",ui-monospace,Menlo,monospace;
  font-size:.95rem;
  letter-spacing:.06em;
  color:#a99c8b;
}

/* ---------- 动效 ---------- */
.reveal{
  opacity:0;
  transform:translateY(20px);
  transition:opacity .6s ease,transform .6s cubic-bezier(.22,.7,.3,1);
}

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

/* ---------- 窄屏 ---------- */
@media (max-width:900px){
  .cta{margin-left:auto}
  div{grid-template-columns:minmax(0,1fr)}
  .rail{
    grid-column:1;
    grid-row:auto;
  }
  .hero-inner{flex-direction:column;align-items:flex-start}
  .hero-copy{text-align:left;width:100%}
  .hero-copy h1{margin-left:0;max-width:100%}
  .hero-art{width:104px}
}

@media (max-width:640px){
  body{font-size:17px}
  .top{gap:8px;padding:8px 14px}
  .tabs a{padding:8px 10px;font-size:.98rem}
  .hero{min-height:auto;padding:26px 0 34px}
  .hero-copy h1{font-size:clamp(1.9rem,8.2vw,2.6rem)}
  .foot-grid{grid-template-columns:1fr}
  .foot-links{grid-template-columns:1fr 1fr;gap:0 16px}
}

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

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