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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --max: 1200px;
  --gut: clamp(1.1rem, 4vw, 2.75rem);
  --serif: "Cormorant Infant", "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.masthead {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--paper);
  border-top: 1px solid var(--ink);
  padding: 0.5rem var(--gut) calc(0.5rem + env(safe-area-inset-bottom));
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.3rem;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pills {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.pills::-webkit-scrollbar {
  display: none;
}

.pills p {
  display: flex;
  gap: 0.4rem;
  margin: 0;
}

.pills a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 16px;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease;
}

.pills a:hover,
.pills a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  transition: opacity 0.22s ease;
}

.cta:hover {
  opacity: 0.78;
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.75rem, 6vw, 4rem) var(--gut) clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: end;
  border-bottom: 1px solid var(--ink);
}

.hero h1 {
  font-size: clamp(2rem, 6.4vw, 4.4rem);
  margin-bottom: 1rem;
}

.hero-desc {
  margin: 0 0 1.5rem;
  max-width: 34ch;
  font-size: 17px;
  color: #141414;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 16px;
  transition: background 0.22s ease, color 0.22s ease;
}

.hero-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.hero-fig {
  position: relative;
  margin: 0;
  min-height: 210px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
}

.hero-idx {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 16vw, 9rem);
  line-height: 1;
  letter-spacing: 0.04em;
  opacity: 0.26;
}

.hero-fig.has-img {
  min-height: 240px;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-fig.has-img .hero-idx {
  position: absolute;
  right: 1rem;
  bottom: 0.35rem;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  opacity: 0.95;
}

.body-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut);
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.prose {
  min-width: 0;
  border-top: 1px solid var(--ink);
}

.prose section {
  padding: clamp(1.8rem, 5vw, 3rem) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  scroll-margin-top: 2rem;
}

.prose section:last-child {
  border-bottom: 0;
}

.prose h2 {
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  margin-bottom: 0.8rem;
}

.prose h3 {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 1.6rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1.05rem;
  max-width: 66ch;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
  max-width: 66ch;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose figure {
  margin: 1.4rem 0;
}

.prose figure img {
  border-radius: 4px;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 2px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.5;
}

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 0 0 1.1rem;
}

.prose th,
.prose td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  padding: 0.55rem 0.4rem;
  text-align: left;
}

.rail {
  margin-top: clamp(1.8rem, 5vw, 3rem);
  align-self: start;
  padding: 1.15rem 1.2rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  box-shadow: 0 14px 36px -28px rgba(0, 0, 0, 0.7);
}

.rail h2 {
  font-size: 1.35rem;
}

.rail .subtitle {
  margin: 0.45rem 0 1rem;
  font-size: 16px;
  line-height: 1.6;
  color: #1c1c1c;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
}

.rail-list li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.rail-list li:last-child {
  border-bottom: 0;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  font-size: 16px;
  transition: padding-left 0.22s ease;
}

.rail-list a:hover {
  padding-left: 0.35rem;
  text-decoration: underline;
}

.foot {
  max-width: var(--max);
  margin: clamp(2.5rem, 7vw, 5rem) auto 0;
  padding: 0 var(--gut);
  border-top: 1px solid var(--ink);
}

.foot-cta {
  padding: clamp(1.5rem, 5vw, 2.8rem) 0;
}

.cta-big {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 6vw, 3.4rem);
  line-height: 1.15;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid var(--ink);
  transition: opacity 0.22s ease;
}

.cta-big:hover {
  opacity: 0.6;
}

.foot-grid {
  display: grid;
  gap: 1.2rem;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
}

.foot-addr {
  font-style: normal;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.6;
}

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

.foot-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
}

.foot-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1rem 0 1.6rem;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
  font-size: 16px;
}

.foot .copy {
  margin: 0;
}

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
}

.foot-legal a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (min-width: 760px) {
  .foot-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
  }
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 45vh;
  }
}

@media (min-width: 960px) {
  .body-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }

  .rail {
    position: sticky;
    top: 2rem;
  }
}

@media (max-width: 959px) {
  .rail {
    order: 2;
  }
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pills a,
  .cta,
  .cta-big,
  .hero-link,
  .rail-list a {
    transition: none;
  }
}

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