@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Patrick+Hand&display=swap');

:root {
  --cream: #f5e6c8;
  --caramel: #d4a574;
  --ink: #262117;
  --paper: #fbf4e3;
  --paper-2: #fdf9ee;
  --brown: #5a4632;
  --line: rgba(38, 33, 23, 0.24);
  --shadow: 0 14px 30px rgba(38, 33, 23, 0.18);
  --hand: "Patrick Hand", "Kalam", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --hand-bold: "Kalam", "Patrick Hand", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", 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(--hand);
  font-size: 17px;
  line-height: 1.72;
  overflow-x: clip;
  background-image:
    radial-gradient(60% 40% at 12% 0%, #f9eed7 0%, rgba(249, 238, 215, 0) 70%),
    radial-gradient(50% 40% at 88% 4%, #f0dcb6 0%, rgba(240, 220, 182, 0) 72%);
  background-repeat: no-repeat;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

p {
  margin: 0 0 1rem;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23g)' opacity='0.34'/%3E%3C/svg%3E");
}

body::after {
  content: "";
  position: fixed;
  inset: -8%;
  z-index: 65;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(42% 34% at 6% 6%, rgba(232, 168, 98, 0.6), transparent 70%),
    radial-gradient(38% 30% at 97% 14%, rgba(244, 205, 152, 0.55), transparent 72%);
  animation: leak 19s ease-in-out infinite alternate;
}

@keyframes leak {
  from {
    opacity: 0.5;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0.88;
    transform: translate3d(-1.4%, 1.6%, 0);
  }
}

/* 顶部 */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.15rem 0.6rem;
}

.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 46px;
  padding: 0.3rem 0.2rem;
  text-decoration: none;
  color: var(--ink);
}

.markmark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  object-fit: cover;
  background: var(--paper);
  filter: sepia(0.3) saturate(0.85);
}

.brand-name {
  font-family: var(--hand-bold);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.menu-toggle {
  min-height: 44px;
  padding: 0.4rem 1.15rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--hand);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}

.menu-toggle[aria-expanded="true"] {
  background: var(--caramel);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.top-nav {
  display: none;
  width: 100%;
}

.top-nav.is-open {
  display: block;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.35rem 0 0.5rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.7rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.3rem 0.95rem;
  border: 1.5px solid var(--brown);
  border-radius: 999px;
  background: rgba(253, 249, 238, 0.92);
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pill:hover {
  background: var(--caramel);
  transform: translateY(-2px) rotate(-1deg);
}

/* 粘性锚点条 */
.reelbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(245, 230, 200, 0.97), rgba(245, 230, 200, 0.85));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  box-shadow: 0 8px 16px rgba(38, 33, 23, 0.08);
}

.reel-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.55rem 1.15rem;
  scrollbar-width: thin;
}

.reel-scroll::-webkit-scrollbar {
  height: 5px;
}

.reel-scroll::-webkit-scrollbar-thumb {
  background: var(--caramel);
  border-radius: 99px;
}

.reel-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.3rem 1rem;
  border: 1.5px solid var(--brown);
  border-radius: 999px;
  background: rgba(253, 249, 238, 0.75);
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.reel-pill:hover,
.reel-pill:focus-visible {
  background: var(--ink);
  color: var(--cream);
}

/* 主体 */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.6rem 1.15rem 2rem;
}

article {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.6rem;
}

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

/* 头图 */
.hero {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: min(70vh, 560px);
  padding: 3rem 1.3rem 3.4rem;
  overflow: hidden;
  border: 12px solid var(--paper-2);
  border-bottom-width: 34px;
  border-radius: 8px 8px 45% 45% / 8px 8px 14% 14%;
  background: linear-gradient(165deg, #e9d5ae, #cfa276 70%, #b98d61);
  box-shadow: var(--shadow);
  transform: rotate(-0.4deg);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.36) saturate(0.82) contrast(0.95) brightness(0.96);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(38, 33, 23, 0.16), rgba(38, 33, 23, 0.55));
}

.hero h1,
.hero-sub {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--hand-bold);
  font-weight: 700;
  font-size: clamp(1.9rem, 6.4vw, 3.2rem);
  line-height: 1.25;
  color: var(--paper-2);
  text-shadow: 0 3px 14px rgba(38, 33, 23, 0.55);
  letter-spacing: 0.01em;
  animation: track 9s steps(2, end) infinite;
}

@keyframes track {
  0%, 96%, 100% { transform: skewX(0deg); }
  97% { transform: skewX(1.2deg); }
  98% { transform: skewX(-0.8deg); }
}

.hero-sub {
  max-width: 34rem;
  margin: 0;
  color: #fdf6e6;
  font-size: 1.02rem;
  text-shadow: 0 2px 10px rgba(38, 33, 23, 0.6);
}

.hero-tag {
  position: absolute;
  z-index: 3;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.85rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--hand-bold);
  font-size: 0.95rem;
  transform: rotate(4deg);
  box-shadow: 2px 2px 0 rgba(38, 33, 23, 0.55);
}

/* 正文与侧栏：玻璃片 */
.story,
.side {
  background: rgba(253, 249, 238, 0.58);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(38, 33, 23, 0.1);
  padding: 1.4rem 1.2rem;
}

.story {
  min-width: 0;
  overflow-wrap: break-word;
}

.story h2,
.side-title {
  font-family: var(--hand-bold);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.35;
  margin: 1.8rem 0 0.5rem;
  color: var(--ink);
}

.story h2:first-child,
.side-title {
  margin-top: 0;
}

.story h3 {
  font-family: var(--hand-bold);
  font-size: 1.18rem;
  margin: 1.4rem 0 0.4rem;
}

.story hr,
.side hr {
  border: 0;
  height: 2px;
  margin: 0 0 1.1rem;
  background: repeating-linear-gradient(90deg, var(--caramel) 0 10px, rgba(212, 165, 116, 0) 10px 18px);
}

.story ul,
.story ol {
  padding-left: 1.3rem;
  margin: 0 0 1rem;
}

.story li {
  margin-bottom: 0.4rem;
}

.story a {
  color: #8a5320;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.story img {
  border: 10px solid var(--paper-2);
  border-bottom-width: 26px;
  border-radius: 3px;
  box-shadow: var(--shadow);
  filter: sepia(0.28) saturate(0.9);
  margin: 1.2rem 0;
  transform: rotate(-0.6deg);
}

.story blockquote {
  margin: 1.2rem 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--caramel);
  background: rgba(212, 165, 116, 0.16);
  border-radius: 0 4px 4px 0;
}

.story blockquote p:last-child {
  margin-bottom: 0;
}

/* 侧栏 */
.side {
  align-self: start;
  border-radius: 4px;
  padding: 1.1rem 1rem 1.3rem;
}

.side-title {
  font-size: 1.22rem;
  margin-bottom: 0.35rem;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.15rem 0.15rem 0.15rem 0.9rem;
  border-left: 3px solid transparent;
  text-decoration: none;
  color: var(--brown);
  font-size: 1rem;
  transition: border-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.side-list a:hover,
.side-list a:focus-visible {
  border-left-color: var(--caramel);
  color: var(--ink);
  padding-left: 1.1rem;
}

/* 页脚 */
footer {
  margin-top: 2.2rem;
  padding: 2.6rem 1.15rem 1.4rem;
  display: grid;
  gap: 1.6rem;
  background: #221d15;
  color: var(--cream);
  border-top: 8px solid var(--caramel);
}

.foot-huge {
  margin: 0;
  font-family: var(--hand-bold);
  font-weight: 700;
  font-size: clamp(2.1rem, 9vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #f7ead0;
  text-shadow: 3px 3px 0 rgba(212, 165, 116, 0.4);
}

.foot-links dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.25rem 0.9rem;
  margin: 0;
}

.foot-links dt {
  font-family: var(--hand-bold);
  font-size: 0.92rem;
  color: var(--caramel);
  letter-spacing: 0.08em;
}

.foot-links dd {
  margin: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #f2e3c9;
  text-decoration: none;
  border-bottom: 1px dashed rgba(212, 165, 116, 0.5);
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: #fff;
  border-bottom-style: solid;
  border-bottom-color: var(--caramel);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(245, 230, 200, 0.3);
}

.foot-copy {
  margin: 0;
  font-size: 0.98rem;
  color: #d9c8ab;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 1rem;
  border: 1.5px solid var(--caramel);
  border-radius: 999px;
  color: var(--cream);
  text-decoration: none;
  font-size: 1rem;
}

.to-top:hover,
.to-top:focus-visible {
  background: var(--caramel);
  color: var(--ink);
}

/* 交错入场 */
.stagger {
  opacity: 0;
  transform: translateY(18px);
}

.stagger.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease var(--d, 0ms), transform 0.55s ease var(--d, 0ms);
}

/* 断点 */
@media (min-width: 720px) {
  footer {
    grid-template-columns: 1.5fr 1fr;
    padding-inline: max(1.15rem, calc((100vw - 1120px) / 2));
  }

  .foot-brand {
    grid-column: 1;
  }

  .foot-links {
    grid-column: 2;
  }

  .foot-base {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  div {
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 2.2rem;
  }

  .menu-toggle {
    display: none;
  }

  .top-nav {
    display: block;
    width: auto;
  }

  .pill-row {
    border-top: 0;
    padding-top: 0;
  }

  .side {
    position: sticky;
    top: 84px;
  }

  .story,
  .side {
    padding: 1.9rem 1.6rem;
  }
}

@media (max-width: 899px) {
  .side {
    grid-column: 1 / -1;
  }

  .hero {
    border-radius: 6px 6px 32% 32% / 6px 6px 10% 10%;
    transform: none;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: 64vh;
    padding: 2.4rem 1rem 2.8rem;
  }

  .story,
  .side {
    padding: 1.1rem 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero h1,
  body::after {
    animation: none;
  }

  .stagger {
    opacity: 1;
    transform: none;
  }

  .pill:hover,
  .story img {
    transform: none;
  }
}

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