@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400&family=Playfair+Display:ital@1&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: rgba(0, 0, 0, 0.16);
  --muted: rgba(0, 0, 0, 0.62);
  --maxw: 1240px;
  --gut: clamp(1.15rem, 4.2vw, 4.5rem);
  --head: 118px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
menu { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
::selection { background: var(--ink); color: var(--paper); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.topbar__brand {
  padding: 0.55rem var(--gut) 0.35rem;
  display: flex;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: clamp(1.15rem, 3.4vw, 1.6rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  text-decoration: none;
  line-height: 1;
}
.topbar__menu {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 var(--gut) 0.5rem;
}
.drawer { flex: 1 1 auto; min-width: 0; }
.drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.35rem 0.5rem 0.35rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  border-bottom: 2px solid var(--ink);
  user-select: none;
}
.drawer > summary::-webkit-details-marker { display: none; }
.drawer > summary::after {
  content: '＋';
  font-weight: 700;
  letter-spacing: 0;
}
.drawer[open] > summary::after { content: '－'; }
.drawer__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
  padding: 0.35rem 0 0.15rem;
}
.drawer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  border-bottom: 2px solid transparent;
  transition: border-color 0.18s linear, opacity 0.18s linear;
}
.drawer__list a:hover { border-color: var(--ink); }

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.05rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.8);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.85);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: calc(100vh - var(--head));
  min-height: calc(100svh - var(--head));
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}
.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0.88) 100%);
}
.hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.6rem, 5vw, 3rem) var(--gut) clamp(2.2rem, 7vw, 5.5rem);
}
.hero__title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.9rem, 10.5vw, 7.5rem);
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

/* ---------- shell ---------- */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 5rem) var(--gut) clamp(3rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3.2rem);
}
@media (min-width: 900px) {
  .shell { grid-template-columns: 228px minmax(0, 1fr); }
}

/* ---------- rail ---------- */
.rail {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 1.15rem 1.1rem 1.25rem;
  box-shadow: 0 22px 40px -30px rgba(0, 0, 0, 0.75);
}
@media (min-width: 900px) {
  .rail { position: sticky; top: calc(var(--head) + 14px); align-self: start; }
}
.eb {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.3em;
  color: var(--ink);
}
.rail__title {
  margin: 0.1rem 0 0.75rem;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.rail__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.rail__list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.16s ease;
}
.rail__list a:hover { padding-left: 0.35rem; }

/* ---------- document ---------- */
.doc { min-width: 0; }
.doc section {
  padding: clamp(2rem, 5vw, 4.2rem) 0;
  border-top: 1px solid var(--ink);
  scroll-margin-top: calc(var(--head) + 16px);
}
.doc section:first-child { border-top: 0; padding-top: 0; }
.doc h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.doc h3 {
  margin: 2rem 0 0.7rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.doc p { margin: 0 0 1.15rem; max-width: 44rem; }
.doc ul,
.doc ol { margin: 0 0 1.2rem; padding-left: 1.35rem; max-width: 44rem; }
.doc li { margin: 0.45rem 0; }
.doc strong { font-weight: 800; }
.doc em { font-style: italic; }
.doc a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: background 0.15s linear, color 0.15s linear;
}
.doc a:hover { background: var(--ink); color: var(--paper); }
.doc img { margin: 1.4rem 0; border-radius: 4px; }
.doc blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1.15rem;
  border-left: 4px solid var(--ink);
  font-size: 1.1rem;
  line-height: 1.6;
}
.doc blockquote p:last-child { margin-bottom: 0; }
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 1rem;
}
.doc th,
.doc td {
  padding: 0.65rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.doc th { font-weight: 800; border-bottom: 1px solid var(--ink); }
.doc hr { border: 0; border-top: 1px solid var(--ink); margin: 2rem 0; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--ink);
  padding: clamp(2.4rem, 7vw, 4.8rem) var(--gut) 2.2rem;
  display: grid;
  gap: 1.2rem;
}
@media (min-width: 820px) {
  .footer {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      'fb f1 f2'
      'fc fc fc'
      'fn fn fn';
    gap: 1.8rem 2.4rem;
    align-items: start;
  }
  .f-brand { grid-area: fb; }
  .f-col:nth-of-type(2) { grid-area: f1; }
  .f-col:nth-of-type(3) { grid-area: f2; }
  .f-copy { grid-area: fc; }
  .f-note { grid-area: fn; }
}
.f-brand {
  margin: 0;
  font-size: clamp(2.4rem, 9vw, 5.6rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.055em;
}
.f-col {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 30rem;
}
.f-copy {
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
}
.f-copy a {
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1px;
}
.f-note {
  display: block;
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
}

/* ---------- reveal ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

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

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  :root { --head: 112px; }
  .hero__title { max-width: 100%; }
  .doc p, .doc ul, .doc ol { max-width: 100%; }
  .cta { padding: 0.6rem 0.8rem; }
  .footer { gap: 1.4rem; }
}

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