:root {
  --lime: #87ff71;
  --gold: #ffce5c;
  --ink: #192617;
  --paper: #f5fbec;
  --card: #ffffff;
  --r: 28px;
  --wrap: 1120px;
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(25, 38, 23, 0.14) 1.2px, transparent 1.3px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: "Noto Serif JP", "Noto Sans JP", serif;
  line-height: 1.45;
  letter-spacing: 0.01em;
  margin: 0 0 14px;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

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

/* ---------- 顶部 ---------- */

.site-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 20px 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 6px 4px 0;
  text-decoration: none;
  font-family: "Noto Serif JP", serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 2px solid var(--ink);
  background: var(--lime);
  object-fit: cover;
}

.brand-txt {
  border-bottom: 4px solid var(--gold);
  padding-bottom: 2px;
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--gold);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 3px 3px 0 var(--ink);
}

.contact:hover,
.contact:focus-visible {
  background: var(--lime);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.menubar {
  background: var(--ink);
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 6px 12px;
  list-style: none;
}

.menu > li {
  position: relative;
}

.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #eefbe4;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.menu a:hover,
.menu a:focus-visible {
  background: var(--lime);
  color: var(--ink);
  outline: none;
}

.caret {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.sub {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 190px;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) rotate(-1deg);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}

.has-sub:hover .sub,
.has-sub:focus-within .sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) rotate(0);
}

.sub a {
  color: var(--ink);
  border-radius: 12px;
}

.sub a:hover,
.sub a:focus-visible {
  background: var(--gold);
}

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

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: 60px 22px 76px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 16% 26%, var(--gold) 0 92px, transparent 93px),
    radial-gradient(circle at 84% 74%, var(--lime) 0 124px, transparent 125px),
    var(--paper);
}

.dotted {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(25, 38, 23, 0.11) 0 2px, transparent 2px 16px);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  letter-spacing: 0.01em;
  text-shadow: 4px 4px 0 var(--gold);
}

.sh {
  position: absolute;
  display: block;
  z-index: 1;
  pointer-events: none;
}

.sh-a {
  width: 132px;
  height: 132px;
  top: 9%;
  left: 4%;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(-11deg);
}

.sh-b {
  width: 96px;
  height: 96px;
  right: 8%;
  top: 20%;
  background: var(--lime);
  border: 4px solid var(--ink);
  border-radius: 50%;
  transform: rotate(8deg);
}

.sh-c {
  width: 170px;
  height: 46px;
  left: 10%;
  bottom: 14%;
  background: var(--gold);
  border: 4px solid var(--ink);
  border-radius: 999px;
  transform: rotate(-7deg);
}

/* ---------- 主体 ---------- */

main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 34px 20px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.content > article {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  border-bottom: 9px solid var(--lime);
  padding: 26px 24px 32px;
  margin-bottom: 26px;
  scroll-margin-top: 158px;
  box-shadow: 5px 5px 0 rgba(25, 38, 23, 0.9);
}

.content > article:nth-child(even) {
  border-bottom-color: var(--gold);
}

.content > article:nth-child(3n) {
  border-bottom-color: var(--ink);
}

.content > article > h2 {
  font-size: clamp(1.45rem, 3.4vw, 2.05rem);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px dashed rgba(25, 38, 23, 0.35);
}

.content h3 {
  font-size: 1.18rem;
  margin-top: 1.6em;
}

.content p,
.content li {
  font-size: 17px;
}

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

.content li {
  margin: 0.35em 0;
}

.content a {
  color: #0d5227;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.content a:hover {
  background: var(--gold);
}

.content blockquote {
  margin: 1.3em 0;
  padding: 14px 18px;
  border-left: 7px solid var(--gold);
  background: #fbfdf4;
  border-radius: 0 16px 16px 0;
}

.content figure {
  margin: 1.2em 0;
  padding: 10px;
  background: var(--paper);
  border: 2px dashed var(--ink);
  border-radius: 22px;
}

.content figcaption {
  font-size: 16px;
  padding-top: 6px;
}

.content img {
  border-radius: 16px;
}

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

.content th,
.content td {
  border: 1px solid var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.content code {
  background: #eef7e0;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 15px;
}

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

.side {
  display: block;
}

.side aside {
  position: sticky;
  top: 158px;
  background: var(--gold);
  border: 3px dashed var(--ink);
  border-radius: var(--r);
  padding: 22px 20px 26px;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(-1deg);
}

.side h2 {
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 16px;
}

.swatches {
  display: flex;
  gap: 8px;
}

.swatches i {
  display: block;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
}

.swatches i:nth-child(2) {
  background: var(--paper);
  border-radius: 10px;
  transform: rotate(12deg);
}

.swatches i:nth-child(3) {
  background: var(--ink);
}

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

.site-foot {
  margin-top: 46px;
  padding: 34px 20px 22px;
  background: var(--ink);
  color: #f0fae7;
  border-top: 8px solid var(--lime);
}

.cta {
  max-width: var(--wrap);
  margin: 0 auto 26px;
}

.cta-in {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 20px;
  border-radius: 36px;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.25rem, 4vw, 2.1rem);
  font-weight: 700;
  box-shadow: 7px 7px 0 var(--lime);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cta-in:hover,
.cta-in:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 11px 11px 0 var(--lime);
}

.cta-logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  border: 3px solid var(--ink);
  background: var(--paper);
  object-fit: cover;
}

.foot-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
  justify-content: space-between;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px dashed rgba(245, 251, 236, 0.5);
}

.foot-line address {
  font-style: normal;
  font-family: "Noto Serif JP", serif;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--lime);
  text-decoration: none;
  font-size: 16px;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  background: var(--lime);
  color: var(--ink);
}

.copy {
  max-width: var(--wrap);
  margin: 18px auto 0;
  font-size: 16px;
  opacity: 0.82;
}

/* ---------- 动效 ---------- */

.js .content > article,
.js .side {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.js .content > article.in,
.js .side.in {
  opacity: 1;
  transform: none;
}

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

  .js .content > article,
  .js .side {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cta-in,
  .contact,
  .sub {
    transition: none;
  }
}

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

@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
  }

  .side aside {
    position: static;
    transform: none;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .side {
    order: 2;
    margin-bottom: 30px;
  }

  .content {
    order: 1;
  }

  .content > article {
    scroll-margin-top: 176px;
  }
}

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

  .masthead {
    padding: 8px 14px 6px;
  }

  .brand {
    font-size: 19px;
  }

  .menu {
    padding: 6px 10px;
  }

  .menu a {
    padding: 10px 11px;
    font-size: 15px;
    min-height: 44px;
  }

  .sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    width: auto;
    box-shadow: none;
    border-width: 2px;
    margin-top: 4px;
    padding: 6px;
    background: #24351f;
    border-color: var(--lime);
  }

  .sub a {
    color: var(--paper);
  }

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

  .hero {
    min-height: 66vh;
    padding: 44px 18px 58px;
  }

  .sh-a {
    width: 88px;
    height: 88px;
  }

  .sh-b {
    width: 66px;
    height: 66px;
  }

  .sh-c {
    width: 120px;
    height: 34px;
  }

  main {
    padding: 24px 14px 6px;
  }

  .content > article {
    padding: 20px 16px 26px;
    border-radius: 22px;
    box-shadow: 4px 4px 0 rgba(25, 38, 23, 0.9);
  }

  .site-foot {
    padding: 26px 14px 18px;
  }

  .cta-in {
    flex-direction: column;
    gap: 10px;
    padding: 20px 16px;
    text-align: center;
  }
}

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