@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@400;500;600;700&display=swap');

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

:root {
  --ink: #172623;
  --ink-soft: #33473f;
  --teal: #5cc6b0;
  --teal-deep: #27796a;
  --sand: #d4c4a8;
  --sand-lt: #ece0cc;
  --terra: #c67b5c;
  --olive: #6b7b3c;
  --paper: #f5eee3;
  --line: rgba(23, 38, 35, 0.16);
  --serif: "Noto Serif JP", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Noto Sans JP", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  font-weight: 400;
  color: var(--ink);
  overflow-x: hidden;
  background-color: var(--paper);
  background-image:
    radial-gradient(115% 70% at 88% -8%, rgba(92, 198, 176, 0.26), rgba(92, 198, 176, 0) 62%),
    radial-gradient(95% 65% at -6% 102%, rgba(198, 123, 92, 0.2), rgba(198, 123, 92, 0) 58%),
    linear-gradient(178deg, #f7f0e5 0%, #efe4d2 56%, #e9dcc6 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.13;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

a { color: var(--teal-deep); }

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

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.4rem);
}

/* ---------- head ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 238, 227, 0.94);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}

.strip {
  margin: 0;
  padding: 0.45rem clamp(1rem, 4vw, 2.4rem);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid rgba(23, 38, 35, 0.08);
}

.brandrow {
  display: flex;
  align-items: center;
  padding: 0.55rem clamp(1rem, 4vw, 2.4rem) 0.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 4.2vw, 1.95rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
}

.brand .mark {
  width: 13px;
  height: 13px;
  flex: none;
  border-radius: 55% 45% 40% 60%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(92, 198, 176, 0.22);
}

.menubar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.2rem clamp(1rem, 4vw, 2.4rem) 0.6rem;
}

.menu-btn {
  position: relative;
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.14em;
  min-height: 44px;
  min-width: 96px;
  padding: 0.5rem 1.1rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease-out, color 0.25s ease-out;
}

.menu-btn:hover { background: var(--ink); color: var(--paper); }

/* ---------- nav ---------- */
.nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.1rem;
  font-size: 16px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}

.nav li > a:hover {
  color: var(--teal-deep);
  border-bottom-color: var(--teal);
}

.nav.open {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: flex-start;
  overflow-y: auto;
  padding: calc(var(--hdr, 150px) + 1rem) clamp(1.2rem, 6vw, 4rem) 3rem;
  background: rgba(23, 38, 35, 0.97);
  backdrop-filter: blur(6px);
  animation: fade 0.28s ease-out both;
}

.nav.open ol {
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.nav.open li > a {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 0.55rem 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 4.6vw, 1.7rem);
  color: var(--sand-lt);
  border-bottom: 1px solid rgba(212, 196, 168, 0.18);
}

.nav.open li > a:hover { color: var(--teal); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  min-height: calc(100vh - 150px);
  min-height: max(420px, calc(100svh - 150px));
  padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(2.5rem, 7vw, 4.5rem);
}

.hero-band {
  --py: 0px;
  position: absolute;
  left: -8%;
  top: 4%;
  width: 118%;
  height: 72%;
  z-index: 0;
  background: linear-gradient(104deg, rgba(92, 198, 176, 0.62), rgba(107, 123, 60, 0.42) 58%, rgba(212, 196, 168, 0) 92%);
  clip-path: polygon(0 20%, 100% 0, 100% 76%, 0 96%);
  transform: translate3d(0, var(--py), 0);
  will-change: transform;
}

.hero-slash {
  position: absolute;
  left: -10%;
  bottom: 13%;
  z-index: 1;
  width: 130%;
  height: 9px;
  background: var(--terra);
  opacity: 0.72;
  transform: rotate(-4deg);
}

.hero-in {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 11vw, 6.6rem);
  line-height: 1.06;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-wrap: balance;
}

/* ---------- layout ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 2.6rem);
  padding: clamp(2rem, 5vw, 3.6rem) 0 clamp(1rem, 4vw, 2rem);
}

@media (min-width: 900px) {
  .split { grid-template-columns: 244px minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.2rem); }
  .side { position: sticky; top: calc(var(--hdr, 150px) + 1rem); align-self: start; }
}

.side h2 {
  margin: 0 0 0.1rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.subtitle {
  margin: 0 0 1.1rem;
  font-size: 15px;
  letter-spacing: 0.34em;
  color: var(--teal-deep);
}

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

.side-index li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.side-index .idx {
  flex: none;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--terra);
}

.side-index a {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dashed rgba(23, 38, 35, 0.2);
  transition: color 0.2s ease-out, padding-left 0.2s ease-out;
}

.side-index a:hover {
  color: var(--teal-deep);
  padding-left: 0.35rem;
}

/* ---------- content ---------- */
.content {
  display: grid;
  gap: clamp(1.1rem, 2.4vw, 1.8rem);
  overflow-wrap: anywhere;
}

.content article {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(1.2rem, 3.2vw, 2.2rem);
  box-shadow: 0 18px 36px -28px rgba(23, 38, 35, 0.7);
  backdrop-filter: blur(9px);
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.content article:nth-child(1) { animation-delay: 0.04s; }
.content article:nth-child(2) { animation-delay: 0.11s; }
.content article:nth-child(3) { animation-delay: 0.18s; }
.content article:nth-child(4) { animation-delay: 0.25s; }
.content article:nth-child(5) { animation-delay: 0.32s; }
.content article:nth-child(6) { animation-delay: 0.39s; }
.content article:nth-child(7) { animation-delay: 0.46s; }
.content article:nth-child(8) { animation-delay: 0.53s; }

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

.content h2 {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.32rem, 3.4vw, 1.8rem);
  line-height: 1.42;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.content h3 {
  margin: 1.7rem 0 0.55rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink);
}

.content p { margin: 0 0 1rem; }
.content p:last-child { margin-bottom: 0; }

.content ul,
.content ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.content li { margin: 0.3rem 0; }

.content a {
  color: var(--teal-deep);
  text-underline-offset: 0.2em;
}

.content blockquote {
  margin: 1.2rem 0;
  padding: 0.7rem 1.1rem;
  border-left: 3px solid var(--teal);
  background: rgba(92, 198, 176, 0.1);
  color: var(--ink-soft);
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.content th,
.content td {
  padding: 0.5rem 0.4rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.content strong { font-weight: 700; }

article[id] { scroll-margin-top: 156px; }

/* ---------- foot ---------- */
.site-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.3rem 2rem;
  margin-top: clamp(2rem, 6vw, 3.6rem);
  padding: clamp(2.2rem, 7vw, 4rem) clamp(1rem, 4vw, 2.4rem) 1.5rem;
  background: var(--ink);
  color: var(--sand-lt);
}

.site-foot a { color: var(--sand-lt); text-decoration: none; }

.foot-cta {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 8vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: 0.05em;
}

.foot-cta a { color: var(--teal); transition: color 0.25s ease-out; }
.foot-cta a:hover { color: var(--sand); }

.foot-col {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.foot-col a {
  display: block;
  min-height: 44px;
  padding: 0.55rem 0;
  font-size: 16px;
  border-bottom: 1px solid rgba(212, 196, 168, 0.16);
  transition: color 0.2s ease-out;
}

.foot-col a:hover { color: var(--teal); }

.site-foot small {
  display: block;
  padding-top: 1rem;
  font-size: 15px;
  color: rgba(212, 196, 168, 0.75);
  border-top: 1px solid rgba(212, 196, 168, 0.2);
}

.site-foot small a {
  display: inline-block;
  padding: 0.4rem 0;
  color: var(--teal);
}

@media (min-width: 760px) {
  .site-foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-cta,
  .site-foot small { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  .side-index { grid-template-columns: 1fr 1fr; column-gap: 1.1rem; }
  .side h2 { font-size: 1.15rem; }
}

@media (max-width: 420px) {
  .menu-btn { min-width: 88px; }
  .strip { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .hero-band { transform: none; }
}

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