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

:root {
  --paper: #f5e6c8;
  --paper-2: #eedcba;
  --paper-3: #e3cda3;
  --honey: #d4a574;
  --honey-d: #b98a55;
  --ink: #262117;
  --ink-2: #4b402e;
  --line: #c9ab7d;
  --cream: #fffaf0;
  --font-head: 'Fredoka', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Nunito', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--paper);
  background-image:
    radial-gradient(56vw 46vw at 12% 4%, rgba(212, 165, 116, 0.5), transparent 62%),
    radial-gradient(48vw 40vw at 92% 10%, rgba(255, 246, 224, 0.9), transparent 58%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.78;
  color: var(--ink);
  background: transparent;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -14%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(32vw 32vw at 80% 14%, rgba(255, 240, 202, 0.95), transparent 64%),
    radial-gradient(26vw 26vw at 6% 70%, rgba(212, 165, 116, 0.6), transparent 70%);
  mix-blend-mode: screen;
  animation: leak 21s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: -120px;
  z-index: 60;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(4) infinite;
}

@keyframes leak {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2.5%, 2%, 0) scale(1.07); }
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-7px, 5px); }
  50% { transform: translate(6px, -6px); }
  75% { transform: translate(-5px, -4px); }
  100% { transform: translate(4px, 6px); }
}

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

/* ---------- 顶部：品牌行 + 菜单行 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 5px 0 rgba(38, 33, 23, 0.13);
}

.brandbar {
  max-width: 1140px;
  margin: 0 auto;
  padding: 9px clamp(16px, 4vw, 30px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px dashed var(--line);
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.65rem;
  letter-spacing: 0.07em;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  line-height: 1.1;
}

.brand:hover {
  color: var(--honey-d);
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}

.contact:hover {
  background: var(--honey-d);
  color: var(--ink);
}

.menubar {
  max-width: 1140px;
  margin: 0 auto;
}

.menulist {
  list-style: none;
  margin: 0;
  padding: 2px clamp(8px, 3vw, 24px) 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.menulist a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 11px;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.menulist a:hover,
.menulist a:focus-visible {
  border-bottom-color: var(--honey-d);
  background: var(--paper-2);
  color: var(--ink);
}

/* ---------- 主体栅格 ---------- */

.sheet {
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 30px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  grid-template-areas:
    "hero hero"
    "body rail";
  gap: 26px clamp(20px, 3vw, 34px);
  align-items: start;
}

/* ---------- 首屏 ---------- */

.hero {
  grid-area: hero;
  position: relative;
  min-height: 45vh;
  display: grid;
  place-items: center;
  padding: 44px 18px 34px;
  background: var(--paper-2);
  border: 3px double var(--ink);
  filter: none;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 9px, transparent 9px 23px);
  opacity: 0.5;
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 5px 13px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--ink);
  background: var(--honey);
  border: 2px solid var(--ink);
  transform: rotate(-4deg);
  animation: wobble 6s ease-in-out infinite alternate;
}

@keyframes wobble {
  from { transform: rotate(-4deg) translateY(0); }
  to { transform: rotate(-1.5deg) translateY(-6px); }
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(10px, 3vw, 24px);
  text-align: center;
}

.hero-mark {
  width: clamp(56px, 11vw, 84px);
  height: auto;
  border: 6px solid var(--cream);
  box-shadow: 0 5px 0 rgba(38, 33, 23, 0.2);
  filter: sepia(0.28) contrast(1.06) saturate(0.85);
  flex: 0 0 auto;
}

.hero-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.95rem, 6.6vw, 3.5rem);
  line-height: 1.16;
  letter-spacing: 0.01em;
  text-shadow: 2px 2px 0 rgba(212, 165, 116, 0.72);
  animation: vhs 8s ease-in-out infinite;
}

@keyframes vhs {
  0%, 86%, 100% {
    transform: none;
    text-shadow: 2px 2px 0 rgba(212, 165, 116, 0.72);
  }
  88% {
    transform: skewX(-1.4deg);
    text-shadow: -3px 0 rgba(212, 165, 116, 0.9), 3px 0 rgba(120, 150, 140, 0.6);
  }
  91% {
    transform: skewX(0.9deg);
  }
  94% {
    transform: none;
  }
}

/* ---------- 正文 ---------- */

.prose {
  grid-area: body;
  min-width: 0;
  overflow-wrap: break-word;
  filter: sepia(0.12) contrast(1.02) saturate(0.92);
}

.prose > section {
  padding: 30px 0;
  scroll-margin-top: 210px;
  animation: rise 0.75s cubic-bezier(0.2, 0.72, 0.3, 1) both;
}

.prose > section:nth-of-type(1) { animation-delay: 0.02s; }
.prose > section:nth-of-type(2) { animation-delay: 0.09s; }
.prose > section:nth-of-type(3) { animation-delay: 0.16s; }
.prose > section:nth-of-type(4) { animation-delay: 0.23s; }
.prose > section:nth-of-type(5) { animation-delay: 0.3s; }
.prose > section:nth-of-type(6) { animation-delay: 0.37s; }
.prose > section:nth-of-type(7) { animation-delay: 0.44s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.prose > section + section {
  border-top: 2px solid var(--line);
}

.prose h2,
.prose h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.34;
  color: var(--ink);
  margin: 0 0 14px;
}

.prose h2 {
  font-size: clamp(1.4rem, 3.8vw, 2rem);
}

.prose h2 > span,
.prose h3 > span {
  background-image: linear-gradient(transparent 64%, var(--honey) 64%);
  padding: 0 2px 3px;
}

.prose h3 {
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
  margin-top: 26px;
}

.prose p {
  margin: 0 0 1em;
}

.prose a {
  color: var(--ink);
  text-decoration-color: var(--honey-d);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:hover {
  background: var(--honey);
}

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

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

.prose li::marker {
  color: var(--honey-d);
  font-weight: 700;
}

.prose blockquote {
  margin: 1.3em 0;
  padding: 14px 18px;
  background: var(--paper-2);
  border-left: 6px solid var(--honey);
  font-size: 1rem;
}

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

.prose img {
  display: block;
  margin: 1.3em 0;
  border: 10px solid var(--cream);
  box-shadow: 0 7px 0 rgba(38, 33, 23, 0.18);
  filter: sepia(0.22) contrast(1.05) saturate(0.86);
}

.prose figure {
  margin: 1.3em 0;
}

.prose figcaption {
  font-size: 0.9rem;
  color: var(--ink-2);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.98rem;
}

.prose th,
.prose td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.prose th {
  background: var(--paper-3);
  font-family: var(--font-head);
  font-weight: 600;
}

.prose code {
  font-size: 0.95em;
  padding: 1px 5px;
  background: var(--paper-3);
}

.prose hr {
  border: 0;
  border-top: 2px dashed var(--line);
  margin: 1.6em 0;
}

/* ---------- 侧栏 ---------- */

.rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: sticky;
  top: 168px;
}

.rail-h {
  margin: 6px 0 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--ink-2);
}

.rail-h > span {
  border-bottom: 3px solid var(--honey-d);
  padding-bottom: 2px;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 14px;
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--paper-2);
  text-decoration: none;
  border-left: 5px solid var(--honey);
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: var(--honey);
  border-left-color: var(--ink);
}

.rail-top {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 14px;
  margin-top: 6px;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--paper);
  background: var(--ink);
  text-decoration: none;
}

.rail-top:hover {
  background: var(--honey-d);
  color: var(--ink);
}

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

.colophon {
  margin-top: 68px;
  background: var(--ink);
  color: var(--paper);
  border-top: 6px solid var(--honey);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px 26px;
  align-items: center;
  padding: 36px clamp(18px, 5vw, 46px) 24px;
}

.fo-brand a {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.9rem, 6.4vw, 3.3rem);
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--honey);
  text-decoration: none;
}

.fo-brand a:hover {
  color: var(--paper);
}

.fo-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 3px;
}

.fo-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 9px;
  font-size: 0.94rem;
  color: var(--paper);
  text-decoration: none;
}

.fo-nav a:hover,
.fo-nav a:focus-visible {
  background: var(--honey);
  color: var(--ink);
}

.fo-legal p {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: #c6b393;
  text-align: center;
}

/* ---------- 断点 ---------- */

@media (min-width: 861px) {
  .prose > section {
    scroll-margin-top: 148px;
  }
  .rail {
    top: 156px;
  }
}

@media (max-width: 860px) {
  .sheet {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "hero"
      "body"
      "rail";
    gap: 20px;
  }
  .rail {
    position: static;
    border-top: 2px solid var(--line);
    padding-top: 14px;
  }
  .rail-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .rail-list li {
    flex: 1 1 46%;
  }
  .colophon {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding-top: 30px;
  }
  .hero {
    min-height: 40vh;
  }
  .brand {
    font-size: 1.45rem;
  }
}

@media (max-width: 420px) {
  .menulist a {
    padding: 6px 8px;
    font-size: 0.98rem;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .contact {
    padding: 0 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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