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

:root {
  --plum: #56228b;
  --plum-soft: rgba(86, 34, 139, .12);
  --clay: #8b4513;
  --ink: #1f1726;
  --paper: #fffdf9;
  --sand: #f4ede3;
  --line: rgba(31, 23, 38, .13);
  --soft-shadow: 0 12px 30px rgba(31, 23, 38, .07);
  --serif: 'Noto Serif TC', 'Songti SC', 'STSong', Georgia, serif;
  --sans: 'Noto Sans TC', system-ui, -apple-system, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}

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

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

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 10% 6%, rgba(86, 34, 139, .13), transparent 72%),
    radial-gradient(closest-side at 92% 22%, rgba(139, 69, 19, .12), transparent 70%),
    radial-gradient(closest-side at 46% 94%, rgba(86, 34, 139, .09), transparent 74%);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: .01em;
}

h1 {
  font-size: clamp(32px, 6vw, 62px);
  margin: 0 0 .5em;
  color: var(--plum);
}

p { margin: 0 0 1em; }

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

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 3px;
  border-radius: 8px;
}

[id] { scroll-margin-top: 152px; }

/* 页头 */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 8px clamp(12px, 4vw, 40px) 12px;
  background: rgba(244, 237, 227, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.strip {
  margin: 0 0 6px;
  text-align: center;
  font-size: 16px;
  letter-spacing: .16em;
  color: var(--clay);
}

.brandline { margin: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 4px 2px;
  text-decoration: none;
  color: var(--plum);
}

.brand-word {
  font-family: var(--serif);
  font-size: clamp(22px, 4.4vw, 30px);
  font-weight: 600;
  letter-spacing: .06em;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 50% 46% 54% 48%;
  object-fit: cover;
  display: block;
}

.mark-dot {
  background: radial-gradient(circle at 34% 30%, #b06ad4, var(--plum) 70%);
  box-shadow: 0 0 0 4px var(--plum-soft);
}

.head-nav { margin-top: 8px; }

.head-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.head-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 17px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 253, 249, .9);
  border: 1px solid rgba(86, 34, 139, .26);
  border-radius: 999px;
  white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s;
}

.head-nav a:hover,
.head-nav a:focus-visible {
  background: var(--plum);
  color: #fff;
  border-color: var(--plum);
}

header, main, footer { position: relative; z-index: 1; }

/* 首屏 */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 86svh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 56px clamp(16px, 5vw, 64px) 64px;
  border-bottom: 1px solid var(--line);
}

.hero-mark {
  position: absolute;
  left: -1.5%;
  bottom: -3%;
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(58px, 15vw, 172px);
  line-height: .86;
  letter-spacing: .02em;
  color: rgba(86, 34, 139, .09);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
}

.shot {
  position: absolute;
  margin: 0;
  z-index: 1;
  aspect-ratio: 3 / 4;
  border-radius: 26px 12px 24px 12px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(86, 34, 139, .22), rgba(139, 69, 19, .22)),
    var(--paper);
  box-shadow: 0 20px 44px rgba(31, 23, 38, .18);
}

.shot-pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-a {
  left: 3%;
  top: 13%;
  width: min(37vw, 330px);
  transform: rotate(-3deg) translateY(var(--py, 0px));
}

.shot-b {
  left: 22%;
  bottom: 6%;
  width: min(28vw, 240px);
  border-radius: 12px 24px 12px 26px;
  transform: rotate(4deg) translateY(var(--py, 0px));
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 34ch;
  text-align: right;
}

.hero-desc {
  margin: 0;
  font-size: 17px;
  color: #3c3145;
}

/* 正文区 */
.reader {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: clamp(20px, 3.4vw, 40px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px clamp(14px, 4vw, 44px) 76px;
}

.rail {
  position: sticky;
  top: 160px;
  padding: 20px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px 12px 20px 12px;
  box-shadow: var(--soft-shadow);
}

.eyebrow {
  display: block;
  font-size: 15px;
  letter-spacing: .22em;
  color: var(--clay);
  margin-bottom: 4px;
}

.rail-title {
  margin: 0 0 12px;
  font-size: 21px;
  color: var(--plum);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--clay);
}

.rail-links {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.rail-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}

.rail-links a:last-child { border-bottom: 0; }

.rail-links a:hover {
  color: var(--plum);
  text-decoration: underline;
}

.prose { min-width: 0; }

.prose > article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--clay);
  border-radius: 10px;
  padding: clamp(18px, 3vw, 34px);
  margin: 0 0 26px;
  box-shadow: var(--soft-shadow);
}

.prose small {
  display: block;
  font-size: 15px;
  letter-spacing: .2em;
  color: var(--clay);
  margin: 0 0 6px;
}

.prose h2 {
  font-size: clamp(22px, 3.2vw, 31px);
  color: var(--plum);
  margin: 0 0 .65em;
}

.prose h3 {
  font-size: 19px;
  color: var(--clay);
  margin: 1.4em 0 .5em;
}

.prose ul,
.prose ol { padding-left: 1.3em; margin: 0 0 1em; }

.prose li { margin-bottom: .4em; }

.prose a { text-decoration: underline; text-underline-offset: 3px; }

.prose img {
  border-radius: 16px 8px 16px 8px;
  display: block;
  margin: 1em 0;
}

.prose blockquote {
  margin: 1em 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--plum);
  color: #42374d;
}

.prose > article > *:last-child { margin-bottom: 0; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s ease, transform .65s ease;
}

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

/* 页脚 */
.site-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 24px;
  align-items: center;
  padding: 42px clamp(16px, 5vw, 56px) 28px;
  background: #241a2e;
  color: #ece2d6;
}

.site-foot p { margin: 0; font-size: 16px; }

.foot-brand {
  font-family: var(--serif);
  font-size: 23px !important;
  color: #f6ecdd;
  letter-spacing: .06em;
}

.foot-key { color: #c6b7ad; letter-spacing: .14em; }

.foot-top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #f0dfcc;
  text-decoration: none;
  border-bottom: 1px solid rgba(240, 223, 204, .45);
}

.foot-top a:hover { color: #fff; }

.site-foot small {
  grid-column: 1 / -1;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid rgba(236, 226, 214, .18);
  font-size: 15px;
  color: #b9aab3;
}

@media (max-width: 880px) {
  [id] { scroll-margin-top: 138px; }

  .head-nav p {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .hero {
    min-height: 74svh;
    padding-top: 44px;
  }

  .hero-copy { max-width: 100%; }

  .shot-a { width: 128px; top: 10%; left: 5%; }
  .shot-b { width: 112px; left: auto; right: 6%; bottom: 8%; }

  .reader {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 28px;
  }

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

  .prose { order: 1; }

  .site-foot { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .hero-mark { font-size: 54px; bottom: auto; top: 6px; }

  .hero {
    align-items: flex-end;
    padding-bottom: 44px;
  }

  .shot-a { width: 116px; top: 24%; }
  .shot-b { width: 96px; bottom: 12%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .shot-a, .shot-b { transform: none; }
}

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