@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');

:root {
  --cream: #f5e6c8;
  --tan: #d4a574;
  --ink: #262117;
  --paper: #fbf2df;
  --brown: #7d5836;
  --line: rgba(38, 33, 23, 0.24);
  --soft: rgba(38, 33, 23, 0.62);
  --head: 'Poiret One', 'Didact Gothic', 'Songti SC', serif;
  --body: 'Didact Gothic', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

* {
  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(--body);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 10% 6%, rgba(255, 199, 124, 0.4), transparent 70%),
    radial-gradient(30% 34% at 88% 20%, rgba(206, 122, 92, 0.22), transparent 70%),
    radial-gradient(46% 42% at 68% 92%, rgba(255, 238, 194, 0.4), transparent 72%);
  filter: blur(12px) saturate(0.9);
  animation: leak 26s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.09;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes leak {
  0% {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(1.5%, 1.5%, 0) scale(1.04);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.03em;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
}

article a {
  text-decoration: underline;
  text-decoration-color: var(--tan);
  text-decoration-thickness: 2px;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 3px;
}

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

.top,
.tape,
.shell,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: rgba(245, 230, 200, 0.94);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}

.top.is-scrolled {
  box-shadow: 0 10px 24px rgba(38, 33, 23, 0.16);
}

.top__side {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.top__side--r {
  justify-content: flex-end;
}

.mark {
  font-family: var(--head);
  font-size: 1.12rem;
  letter-spacing: 0.22em;
  white-space: nowrap;
  padding: 0.35rem 0.2rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.95rem;
  line-height: 1.2;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pill:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-1px);
}

.pill--solid {
  background: var(--ink);
  color: var(--cream);
}

.pill--solid:hover {
  background: var(--brown);
  border-color: var(--brown);
  color: #fff8e9;
}

.drawer {
  position: relative;
}

.drawer summary {
  list-style: none;
  padding-right: 1.9rem;
  position: relative;
}

.drawer summary::-webkit-details-marker {
  display: none;
}

.drawer summary::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
}

.drawer[open] summary {
  background: var(--ink);
  color: var(--cream);
}

.drawer menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 228px;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(212, 165, 116, 0.7);
  z-index: 40;
}

.drawer menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(38, 33, 23, 0.14);
  font-size: 0.98rem;
}

.drawer menu li:last-child a {
  border-bottom: 0;
}

.drawer menu a:hover {
  background: var(--cream);
  color: var(--brown);
}

.tape {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  padding: 0 0.6rem;
  background: var(--ink);
  border-bottom: 3px solid var(--tan);
  scrollbar-width: thin;
}

.tape a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0.5rem 0.85rem;
  color: #f2e2c4;
  font-size: 0.92rem;
  white-space: nowrap;
  border-right: 1px solid rgba(245, 230, 200, 0.18);
}

.tape a:hover {
  background: rgba(212, 165, 116, 0.22);
  color: #ffedc9;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 2.2rem;
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.6rem 1.3rem 4rem;
}

.sheet {
  min-width: 0;
  padding: 1.4rem 1.5rem 1.8rem;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 12px 12px 0 rgba(212, 165, 116, 0.55);
}

article > section {
  scroll-margin-top: 72px;
}

.hero {
  display: flex;
  align-items: center;
  min-height: 64vh;
  padding: 1.5rem 0 2.5rem;
  margin-bottom: 1.5rem;
}

.hero__in {
  width: 100%;
  will-change: transform;
}

.kicker {
  display: inline-block;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--tan);
  color: var(--brown);
  font-size: 0.86rem;
  letter-spacing: 0.4em;
}

.hero h1 {
  font-size: clamp(2.35rem, 7.4vw, 5.4rem);
  line-height: 1.03;
  letter-spacing: 0.02em;
  margin: 0 0 1.4rem;
  max-width: 16em;
  text-shadow: 1px 0 rgba(212, 165, 116, 0.65), -1px 0 rgba(38, 33, 23, 0.18);
  animation: fadeUp 0.9s ease both;
}

.hero__act {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

article > section:not(.hero) {
  padding-bottom: 1.9rem;
  margin-bottom: 2.3rem;
  border-bottom: 3px solid var(--tan);
}

article > section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

article h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  color: var(--ink);
}

article h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  color: var(--brown);
}

article p,
article li {
  color: #332c1f;
}

article ul,
article ol {
  padding-left: 1.3rem;
  margin: 0 0 1.2rem;
}

article li {
  margin-bottom: 0.4rem;
}

article strong {
  color: var(--ink);
  background: linear-gradient(transparent 62%, rgba(212, 165, 116, 0.55) 62%);
}

article blockquote {
  margin: 1.4rem 0;
  padding: 0.6rem 0 0.6rem 1.1rem;
  border-left: 4px solid var(--tan);
  color: var(--brown);
  font-style: normal;
}

article hr,
.rail hr,
.foot hr {
  border: 0;
  height: 2px;
  margin: 0.35rem 0 1.2rem;
  background: linear-gradient(90deg, var(--tan), rgba(212, 165, 116, 0));
}

article img {
  border: 9px solid #fffdf4;
  box-shadow: 0 8px 22px rgba(38, 33, 23, 0.2);
  filter: sepia(0.16) saturate(0.92) contrast(1.02);
}

.rail {
  position: sticky;
  top: 66px;
  padding: 1rem 1rem 1.2rem;
  background: rgba(251, 242, 223, 0.86);
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
}

.rail__t {
  font-size: 1.05rem;
  letter-spacing: 0.24em;
  margin: 0 0 0.4rem;
  color: var(--brown);
}

.rail__list {
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.rail__list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0;
  font-size: 0.95rem;
  border-bottom: 1px dashed rgba(38, 33, 23, 0.2);
}

.rail__list a::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 0.55rem;
  background: var(--tan);
  flex: none;
}

.rail__list a:hover {
  color: var(--brown);
}

.rail__c {
  margin: 0;
  font-size: 0.92rem;
  word-break: break-all;
  color: var(--soft);
}

.foot {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 1.5rem 1.5rem;
  background: var(--ink);
  color: #f0e0c2;
  border-top: 6px solid var(--tan);
}

.foot__mark {
  min-width: 0;
  overflow: hidden;
}

.wordmark {
  font-family: var(--head);
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0.06em;
  margin: 0;
  color: var(--tan);
  word-break: break-all;
}

.foot__col h2 {
  font-size: 0.92rem;
  letter-spacing: 0.3em;
  margin: 0 0 0.4rem;
  color: #f7e8cc;
}

.foot__col hr {
  background: linear-gradient(90deg, var(--tan), rgba(212, 165, 116, 0));
}

.foot__col menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot__col menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  font-size: 0.95rem;
  color: #e7d5b6;
  border-bottom: 1px solid rgba(245, 230, 200, 0.16);
}

.foot__col menu a:hover {
  color: #fff6e2;
  padding-left: 4px;
}

.foot__col p {
  font-size: 0.92rem;
  margin: 0;
  word-break: break-all;
  color: #dcc9a8;
}

.foot__base {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(245, 230, 200, 0.22);
  text-align: center;
  color: #cbb894;
}

.foot__base p {
  margin: 0.15rem 0;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

@media (max-width: 1024px) {
  .pill--anchor {
    display: none;
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    padding: 1.2rem 1rem 3rem;
  }

  .sheet {
    box-shadow: 8px 8px 0 rgba(212, 165, 116, 0.55);
    padding: 1.1rem 1rem 1.5rem;
  }

  .rail {
    position: static;
  }

  .foot {
    grid-template-columns: 1fr 1fr;
    gap: 1.6rem;
  }

  .foot__mark {
    grid-column: 1 / -1;
  }

  .hero {
    min-height: 58vh;
  }
}

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

  .top {
    padding: 0.6rem 0.8rem;
    gap: 0.4rem;
  }

  .mark {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
  }

  .pill {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }

  .drawer summary {
    padding-right: 1.55rem;
  }

  .drawer menu {
    min-width: 0;
    width: 240px;
  }

  .tape a {
    font-size: 0.88rem;
  }

  .foot {
    grid-template-columns: 1fr;
    padding: 2.2rem 1rem 1.2rem;
  }

  .foot__mark {
    grid-column: auto;
  }

  .sheet {
    box-shadow: 6px 6px 0 rgba(212, 165, 116, 0.55);
  }
}

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

  body::before,
  .hero h1,
  .pill {
    animation: none;
    transition: none;
  }

  .hero__in {
    transform: none !important;
  }
}

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