/* 130 つちのわ 土地活用研究所 ― K07 目次が横に固定された読み物。色と書体は共通の13変数だけ */
:root {
  --c-bg: #f3eee6;
  --c-bg-alt: #e6dccd;
  --c-text: #374151;
  --c-sub: #4b5563;
  --c-line: #c9b28c;
  --c-accent: #7a5530;
  --c-accent-text: #7a5530;
  --c-on-accent: #ffffff;
  --c-2: #b08a5a;
  --c-3: #4a3a2c;
  --font-ja: "Zen Kaku Gothic New", sans-serif;
  --font-head: "Noto Serif JP", "Zen Kaku Gothic New", serif;
  --font-en: "Bellefair", "Noto Serif JP", serif;
  --header-h: 64px;
}
/* 夜の面：同じ名前の変数を全部上書き */
.t-night { --c-bg: #2a211a; --c-bg-alt: #3a2f25; --c-text: #e9dfcf; --c-sub: #d8ccb8; --c-line: #5b4b3c; --c-accent: #c9b28c; --c-accent-text: #c9b28c; --c-on-accent: #2a211a; --c-2: #8c7a64; --c-3: #f3eee6; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font-family: var(--font-ja); font-size: 16px; line-height: 2; overflow-x: hidden; }
figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dd, li { word-break: auto-phrase; overflow-wrap: anywhere; }
h1, h2, h3, p, dl, dd, ol, ul, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; background: var(--c-accent); color: var(--c-on-accent); border: 1px solid var(--c-accent); font-family: var(--font-ja); font-weight: 500; font-size: 16px; letter-spacing: .08em; text-decoration: none; white-space: nowrap; flex: none; cursor: pointer; transition: background-color .4s, color .4s; }
.btn:hover { background: transparent; color: var(--c-accent-text); }
.btn--lg { min-height: 56px; padding: 0 34px; }
.btn--ghost { background: transparent; color: var(--c-accent-text); }
.btn--ghost:hover { background: var(--c-accent); color: var(--c-on-accent); }

/* ヘッダー */
.header { position: sticky; top: 0; z-index: 40; background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
.header__inner { height: var(--header-h); padding: 0 20px; display: flex; align-items: center; gap: 12px; position: relative; }
.logo { text-decoration: none; color: var(--c-3); white-space: nowrap; flex: none; min-height: 44px; display: flex; align-items: center; font-family: var(--font-head); font-weight: 500; font-size: 17px; }
.header__btn { margin-left: auto; min-height: 44px; padding: 0 16px; }
@media (max-width: 420px) { .logo { font-size: 15px; letter-spacing: -.02em; } .header__inner { padding: 0 12px 0 16px; gap: 8px; } }
.spmenu { flex: none; }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--c-3); }
.spmenu summary::-webkit-details-marker { display: none; }
.spmenu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spmenu__bar, .spmenu__bar::before, .spmenu__bar::after { display: block; width: 22px; height: 1px; background: currentColor; position: relative; }
.spmenu__bar::before, .spmenu__bar::after { content: ""; position: absolute; left: 0; }
.spmenu__bar::before { top: -7px; } .spmenu__bar::after { top: 7px; }
.spmenu[open] .spmenu__bar { background: transparent; }
.spmenu[open] .spmenu__bar::before { top: 0; transform: rotate(45deg); }
.spmenu[open] .spmenu__bar::after { top: 0; transform: rotate(-45deg); }
.spmenu__nav { position: absolute; right: 0; top: 100%; width: min(100%, 360px); background: var(--c-bg); border: 1px solid var(--c-line); padding: 8px 24px 16px; display: flex; flex-direction: column; }
.spmenu__nav a { display: flex; align-items: center; min-height: 52px; color: var(--c-3); text-decoration: none; border-bottom: 1px solid var(--c-line); }

/* メインビジュアル（画像1枚のLP風・静止。下の縁は霧） */
.hero { position: relative; background: var(--c-bg); padding-bottom: clamp(44px, 9vw, 120px); }
.hero__photo { height: min(86svh, 780px); min-height: 520px; position: relative; -webkit-mask-image: linear-gradient(to bottom, black 62%, transparent 100%); mask-image: linear-gradient(to bottom, black 62%, transparent 100%); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.hero__text { position: absolute; left: 20px; right: 20px; top: 28px; max-width: 540px; padding: 24px 22px 26px; background: color-mix(in srgb, var(--c-bg) 78%, transparent); color: var(--c-text); }
.hero__kicker { font-family: var(--font-en); letter-spacing: .3em; font-size: 16px; color: var(--c-accent-text); }
.hero__title { font-family: var(--font-head); font-weight: 300; font-size: clamp(34px, 9.4vw, 60px); line-height: 1.4; color: var(--c-3); margin: 6px 0 12px; letter-spacing: .04em; }
.hero__lead { margin-bottom: 20px; line-height: 1.9; }
.hero__name { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-family: var(--font-en); font-size: clamp(26px, 8.2vw, 112px); letter-spacing: .24em; line-height: 1.1; margin: 0; padding-left: .24em; background: linear-gradient(90deg, var(--c-2), var(--c-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* K07：目次＋読み物 */
.read { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.toc details { border: 1px solid var(--c-line); background: var(--c-bg); margin: 8px 0 0; }
.toc summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 18px; font-family: var(--font-head); color: var(--c-3); }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "＋"; }
.toc details[open] summary::after { content: "－"; }
.toc ol { padding: 4px 18px 12px; }
.toc a { display: flex; gap: 14px; align-items: center; min-height: 48px; color: var(--c-text); text-decoration: none; border-top: 1px solid var(--c-line); }
.toc a span { font-family: var(--font-en); color: var(--c-accent-text); letter-spacing: .1em; }
.toc a[aria-current="true"] { color: var(--c-accent-text); font-weight: 500; }

.article { padding-bottom: 40px; }
.ch { padding: 64px 0 24px; }
.ch > * + * { margin-top: 22px; }
.ch__no { display: flex; align-items: baseline; gap: 14px; font-family: var(--font-en); font-size: 44px; line-height: 1; color: var(--c-accent-text); }
.ch__no span { font-size: 16px; letter-spacing: .3em; color: var(--c-accent-text); }
.h2 { font-family: var(--font-head); font-weight: 300; font-size: clamp(28px, 7vw, 38px); line-height: 1.6; color: var(--c-3); letter-spacing: .04em; }
.quote { font-family: var(--font-head); font-weight: 300; font-size: clamp(22px, 5.4vw, 28px); line-height: 1.8; color: var(--c-accent-text); padding: 6px 0 6px 22px; border-left: 1px solid var(--c-2); }
.four { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.four li { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 14px; border: 1px solid var(--c-line); font-family: var(--font-head); font-size: 18px; color: var(--c-3); }
.four span { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--c-2); font-size: 20px; color: var(--c-accent-text); flex: none; }
.note { font-size: 15px; color: var(--c-sub); }

/* 夜の土地（C06） */
.walk, .contact { background: var(--c-bg); color: var(--c-text); padding: 48px 20px 40px; margin: 40px -20px 0; }
.map { position: relative; width: 100%; height: 520px; overflow: hidden; touch-action: none; user-select: none; background: var(--c-bg-alt); }
.map__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-ground { fill: var(--c-bg-alt); }
.m-road { stroke: var(--c-line); fill: none; }
.m-dash { stroke: var(--c-2); fill: none; }
.m-house rect { fill: var(--c-bg); stroke: var(--c-line); stroke-width: 2; }
.m-land { fill: var(--c-bg-alt); stroke: var(--c-accent); }
.m-grid { stroke: var(--c-line); fill: none; }
.m-tree circle { fill: var(--c-line); }
.m-label { fill: var(--c-accent-text); font-family: var(--font-head); }
.m-label2 { fill: var(--c-sub); font-family: var(--font-head); }
.spots { position: absolute; inset: 0; }
.spot { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); min-height: 44px; padding: 0 10px; border: 1px solid var(--c-accent); background: var(--c-bg); color: var(--c-text); font-family: var(--font-ja); font-size: 15px; letter-spacing: .08em; white-space: nowrap; cursor: pointer; transition: opacity .6s, background-color .4s; }
.spot:hover, .spot:focus-visible, .spot.is-on { background: var(--c-accent); color: var(--c-on-accent); }
.map__dark, .map__intro { display: none; }
.walk__now { padding: 16px 20px; border: 1px solid var(--c-line); min-height: 64px; }
.plans { display: grid; }
.plans li { padding: 16px 0; border-top: 1px solid var(--c-line); transition: background-color .6s; }
.plans li.is-on { background: color-mix(in srgb, var(--c-accent) 14%, transparent); }
.plans h3 { font-family: var(--font-head); font-weight: 500; font-size: 18px; color: var(--c-accent-text); }
.is-motion .map { cursor: grab; }
.is-motion .map.is-drag { cursor: grabbing; }
.is-motion .map__dark { display: block; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--lx, 30%) var(--ly, 50%), transparent 0, transparent var(--r, 120px), color-mix(in srgb, var(--c-bg) 94%, transparent) calc(var(--r, 120px) * 1.9)); }
.is-motion .spot { opacity: 0; pointer-events: none; z-index: 2; }
.is-motion .spot.is-lit { opacity: 1; pointer-events: auto; }
.is-motion .map__intro { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; position: absolute; inset: 0; z-index: 5; padding: 24px; background: color-mix(in srgb, var(--c-bg) 84%, transparent); color: var(--c-text); }
.is-motion .map__intro[hidden] { display: none; }
.map__intro-title { font-family: var(--font-head); font-size: clamp(20px, 2.4vw, 26px); color: var(--c-3); }
@media (max-width: 599px) {
  .spot { padding: 0 8px; }
  .spots li:nth-child(1) .spot { --x: 28% !important; --y: 30% !important; }
  .spots li:nth-child(2) .spot { --x: 66% !important; --y: 42% !important; }
  .spots li:nth-child(3) .spot { --x: 34% !important; --y: 56% !important; }
  .spots li:nth-child(4) .spot { --x: 36% !important; --y: 72% !important; }
  .spots li:nth-child(5) .spot { --x: 74% !important; --y: 86% !important; }
  .spots li:nth-child(6) .spot { --x: 62% !important; --y: 14% !important; }
}

/* スライド（Swiper） */
.slider__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 0; padding-bottom: 12px; }
.slider__track { display: flex; gap: 16px; width: max-content; }
.slider__item { width: min(84vw, 420px); flex: none; scroll-snap-align: start; }
.slider.is-swiper .slider__viewport { overflow: hidden; scroll-snap-type: none; padding-bottom: 0; }
.slider.is-swiper .slider__track { gap: 0; width: auto; }
.slider.is-swiper .slider__item { width: auto; height: auto; }
.case { border: 1px solid var(--c-line); background: var(--c-bg); display: flex; flex-direction: column; }
.case img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.case__num { aspect-ratio: 3 / 2; display: flex; align-items: baseline; justify-content: center; gap: 6px; padding-top: 18%; background: var(--c-bg-alt); font-family: var(--font-head); font-size: 20px; color: var(--c-accent-text); }
.case__num span { font-family: var(--font-en); font-size: 64px; line-height: 1; color: var(--c-3); }
.case__body { padding: 18px 20px 22px; }
.case__tag { font-size: 15px; color: var(--c-accent-text); }
.case h3 { font-family: var(--font-head); font-weight: 500; font-size: 20px; line-height: 1.6; color: var(--c-3); margin: 4px 0 6px; }
.slider__ctrl { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; }
.slider__ctrl[hidden] { display: none; }
.slider__arrow { width: 52px; height: 52px; border: 1px solid var(--c-accent); border-radius: 50%; background: transparent; color: var(--c-accent-text); cursor: pointer; position: relative; }
.slider__arrow::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: translate(-65%, -50%) rotate(45deg); }
.slider__prev::before { transform: translate(-35%, -50%) rotate(-135deg); }
.slider__arrow:hover { background: var(--c-accent); color: var(--c-on-accent); }
.slider__dots, .slider__dots.swiper-pagination-horizontal { position: static; width: auto; transform: none; display: flex; }
.slider__dots .swiper-pagination-bullet { width: 36px; height: 44px; margin: 0 !important; background: transparent; opacity: 1; border-radius: 0; position: relative; }
.slider__dots .swiper-pagination-bullet::before { content: ""; position: absolute; left: 6px; right: 6px; top: 21px; height: 2px; background: var(--c-line); }
.slider__dots .swiper-pagination-bullet-active::before { background: var(--c-accent); }

.steps { border-top: 1px solid var(--c-line); }
.steps li { display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--c-line); }
.steps li span { grid-row: span 2; font-family: var(--font-en); font-size: 34px; line-height: 1.2; color: var(--c-accent-text); }
.steps h3 { font-family: var(--font-head); font-weight: 500; font-size: 19px; color: var(--c-3); }
.about__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.contact { margin-bottom: 0; }
.contact__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.info { display: grid; gap: 12px; border-top: 1px solid var(--c-line); padding-top: 18px; }
.info dt { font-size: 15px; color: var(--c-sub); }

.footer { padding: 36px 20px 48px; text-align: center; background: var(--c-bg-alt); font-size: 15px; line-height: 1.9; }
.footer__logo { font-family: var(--font-head); font-size: 18px; color: var(--c-3); }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 8px 0; }
.footer__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--c-text); }
.footer__fiction { color: var(--c-sub); }

@media (min-width: 768px) {
  .header__inner { padding: 0 40px; }
  .hero__text { left: 40px; top: 48px; padding: 32px 36px 34px; }
  .read { padding: 0 40px; }
  .walk, .contact { margin-left: -40px; margin-right: -40px; padding: 56px 40px 48px; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
  .four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* PC：目次を左に固定し、読み物は右 */
@media (min-width: 1080px) {
  .spmenu { display: none; }
  .read { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 80px; justify-content: center; align-items: start; padding-top: 24px; }
  .toc { position: sticky; top: calc(var(--header-h) + 32px); margin-top: 88px; }
  .toc details { border: 0; background: transparent; margin: 0; }
  .toc summary { display: none; }
  .toc ol { padding: 0; border-left: 1px solid var(--c-line); }
  .toc a { border-top: 0; padding-left: 18px; margin-left: -1px; border-left: 1px solid transparent; }
  .toc a[aria-current="true"] { border-left-color: var(--c-accent); }
  .walk, .contact { margin-left: 0; margin-right: 0; padding: 48px 40px; }
  .ch { padding-top: 88px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
