/* 余白屋 ─ 余白から、創造はうまれる。
   色：霧の白（地）／藍に近い墨（文字）／水の光の青緑（差し色、ほんの少しだけ） */

:root {
  --bg: #eef1f1;
  --ink: #1d2a35;
  --ink-soft: rgba(29, 42, 53, 0.62);
  --ink-faint: rgba(29, 42, 53, 0.14);
  --accent: #79b4ae;
  --glass: rgba(246, 249, 249, 0.38);

  --mincho: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: 'Jost', 'Hiragino Sans', 'Noto Sans JP', sans-serif;

  --gutter: clamp(24px, 7vw, 120px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--mincho);
  font-size: 15px;
  line-height: 2.15;
  letter-spacing: 0.06em;
  font-feature-settings: 'palt' 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
i { font-style: normal; }
::selection { background: var(--accent); color: #fff; }

.sp { display: none; }
@media (max-width: 700px) {
  .pc { display: none; }
  .sp { display: inline; }
}

/* ── 水面 ───────────────────────────── */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* WebGL が使えないときは、いきものをそのまま見せる */
.stage .creatures { opacity: 0.5; }

main, .foot { position: relative; z-index: 1; }

/* ── 指のかわりの輪 ───────────────────── */
.cursor { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.cursor.is-on { opacity: 1; }
.cursor__ring,
.cursor__dot {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor__ring {
  width: 34px; height: 34px;
  border: 1px solid var(--ink-soft);
  transition: width 0.5s var(--ease), height 0.5s var(--ease), border-color 0.4s, background-color 0.4s;
}
.cursor__dot { width: 3px; height: 3px; background: var(--ink); }
.cursor.is-link .cursor__ring { width: 64px; height: 64px; border-color: var(--accent); background: rgba(121, 180, 174, 0.08); }
@media (hover: hover) and (pointer: fine) {
  html, a { cursor: none; }
}
@media not ((hover: hover) and (pointer: fine)) {
  .cursor { display: none; }
}

/* ── 左上の印と、右上の連絡 ───────────── */
.mark {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter);
  pointer-events: none;
}
.mark::before {
  /* 本文が下をくぐるとき、文字が重ならないように霧をかける */
  content: '';
  position: absolute;
  inset: 0 0 -30px;
  z-index: -1;
  background: linear-gradient(var(--bg) 35%, rgba(238, 241, 241, 0));
  opacity: 0.92;
}
.mark a { pointer-events: auto; }
.mark__logo { display: flex; align-items: center; gap: 12px; font-size: 15px; letter-spacing: 0.3em; }
.mark__logo svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1; }
.mark__logo svg circle:first-child { fill: var(--ink); stroke: none; }
.mark__logo:hover svg circle:nth-child(2) { animation: ring 1.4s var(--ease); }
.mark__contact {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  padding: 6px 0;
  background: linear-gradient(var(--ink), var(--ink)) left bottom / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease);
}
.mark__contact:hover { background-size: 100% 1px; }

@keyframes ring {
  from { transform: scale(0.6); transform-origin: center; opacity: 0.2; }
  to { transform: scale(1); opacity: 1; }
}

/* ── 右の目次（潮） ───────────────────── */
.tide {
  position: fixed;
  right: calc(var(--gutter) * 0.45);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}
.tide ol { display: flex; flex-direction: column; gap: 14px; }
.tide a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1;
  color: var(--ink-faint);
  transition: color 0.5s;
}
.tide a span {
  font-family: var(--mincho);
  letter-spacing: 0.2em;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.5s, transform 0.5s var(--ease);
  color: var(--ink-soft);
}
.tide a:hover span { opacity: 1; transform: none; }
.tide a:hover,
.tide a.is-active { color: var(--ink); }
.tide.is-hidden { opacity: 0; pointer-events: none; }
.tide { transition: opacity 0.6s; }
@media (max-width: 900px) { .tide { display: none; } }

/* ── 最初の画面 ───────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  display: grid;
  place-items: center;
}
.hero__title {
  display: flex;
  flex-direction: column; /* 縦書きなので、右から左へ並ぶ */
  align-items: flex-start;
  gap: clamp(28px, 4vw, 56px);
  writing-mode: vertical-rl;
  margin-top: -4vh;
  text-orientation: upright;
  font-weight: 400;
}
.hero__name {
  font-size: clamp(44px, 6.4vw, 92px);
  letter-spacing: 0.42em;
  line-height: 1;
}
.hero__copy {
  font-size: clamp(14px, 1.25vw, 18px);
  letter-spacing: 0.5em;
  line-height: 1;
  padding-top: clamp(60px, 9vh, 120px);
  color: var(--ink-soft);
}
.hero__en {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(28px, 6vh, 64px);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero__hint {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(28px, 6vh, 64px);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero__hint::before {
  content: '';
  width: 10px; height: 10px;
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
  animation: hint 2.8s var(--ease) infinite;
}
@keyframes hint {
  0% { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: clamp(48px, 9vh, 90px);
  background: var(--ink-faint);
  overflow: hidden;
}
.hero__scroll span {
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: fall 2.6s var(--ease) infinite;
}
@keyframes fall {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}
@media (max-width: 700px) {
  .hero__hint { left: var(--gutter); right: auto; bottom: calc(clamp(28px, 6vh, 64px) + 52px); }
}

/* ── 節（セクション） ─────────────────── */
.sec {
  position: relative;
  padding: clamp(120px, 22vh, 240px) var(--gutter);
  max-width: 1440px;
  margin: 0 auto;
}
.sec__head { max-width: 46rem; }
.sec__body,
.values { max-width: 34em; }
.sec--right .sec__head,
.sec--right .sec__body { margin-left: auto; }

.sec__no {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 36px;
}
.sec__no i { font-size: 12px; color: var(--ink); }
.sec__no span {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.34em;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sec__no span::before { content: ''; width: 40px; height: 1px; background: var(--ink-faint); }

.sec__title {
  font-size: clamp(24px, 3.1vw, 40px);
  line-height: 1.75;
  letter-spacing: 0.12em;
  margin-bottom: clamp(40px, 6vh, 64px);
}
.sec__body p + p { margin-top: 1.4em; }
.sec__note { color: var(--ink-soft); font-size: 13.5px; }
.sec__body.sec__note,
.sec__body .sec__note { margin-top: 2.6em; }
.sec__lead { margin-top: 56px; }

/* 03 流れる言葉（水の流れ） */
.current {
  margin: 0 calc(var(--gutter) * -1) 64px;
  overflow: hidden;
  border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.current__track {
  display: flex;
  align-items: center;
  gap: 32px;
  width: max-content;
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: 0.16em;
  white-space: nowrap;
  will-change: transform;
}
.current__track i { font-family: var(--sans); font-size: 0.6em; color: var(--ink-soft); }

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 0 48px;
  max-width: 980px;
}
.people li {
  padding: 18px 0 18px 30px;
  border-bottom: 1px solid var(--ink-faint);
  position: relative;
  transition: padding-left 0.6s var(--ease);
}
.people li::before {
  content: '';
  position: absolute;
  left: 4px; top: 50%;
  width: 7px; height: 7px;
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background-color 0.4s, transform 0.6s var(--ease);
}
.people li:hover { padding-left: 40px; }
.people__all { grid-column: 1 / -1; } /* 最後の「すべての人」は、幅いっぱいに */
.people li:hover::before { background: var(--accent); border-color: var(--accent); transform: translateY(-50%) scale(1.4); }

/* 04 すりガラスの升目 */
.cells {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 1px;
  background: var(--ink-faint);
  border: 1px solid var(--ink-faint);
}
.cell {
  position: relative;
  min-height: 230px;
  padding: 30px 28px 32px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
          backdrop-filter: blur(14px) saturate(1.15);
  display: flex;
  flex-direction: column;
  transition: background-color 0.6s;
  overflow: hidden;
}
.cell i {
  font-family: var(--sans);
  font-size: 26px;
  line-height: 1;
  font-weight: 300;
  margin-bottom: auto;
  align-self: flex-start; /* 回すとき、記号の中心で回るように */
  transition: transform 0.9s var(--ease);
}
.cell h3 { font-size: 17px; letter-spacing: 0.14em; margin: 40px 0 8px; }
.cell p { font-size: 13px; line-height: 1.95; color: var(--ink-soft); }
.cell::after {
  /* ふれたところから広がる輪 */
  content: '';
  position: absolute;
  left: var(--mx, 50%); top: var(--my, 50%);
  width: 10px; height: 10px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}
.cell:hover { background: rgba(250, 252, 252, 0.6); }
.cell:hover i { transform: rotate(90deg); }
.cell.is-ring::after { animation: cellring 1.2s var(--ease); }
@keyframes cellring {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(40); opacity: 0; }
}
.cell--open { background: rgba(121, 180, 174, 0.12); }

/* 05 大事にしていること：線と節 */
.values {
  position: relative;
  margin: 56px 0 0;
  padding-left: 4px;
}
.values::before {
  content: '';
  position: absolute;
  left: 22px; top: 18px; bottom: 18px;
  width: 1px;
  background: var(--ink-faint);
  transform-origin: top;
  transform: scaleY(var(--grow, 1));
}
.values li {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 22px;
  align-items: center;
  padding: 14px 0;
}
.values__no {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  position: relative;
  z-index: 1;
}

/* 06 連絡先：しずく */
.contact { text-align: center; }
.contact .sec__head,
.contact .sec__body { margin-left: auto; margin-right: auto; }
.contact .sec__no { justify-content: center; }
.drop {
  position: relative;
  display: inline-grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: clamp(240px, 30vw, 320px);
  aspect-ratio: 1;
  margin-top: 72px;
  border-radius: 50%;
  border: 1px solid var(--ink-soft);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  transition: background-color 0.6s, border-color 0.6s, transform 0.9s var(--ease);
}
.drop__label {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.drop__addr { font-family: var(--sans); font-size: clamp(14px, 1.3vw, 16px); letter-spacing: 0.08em; }
.drop__rings i {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--ink-faint);
  animation: dropring 4.2s var(--ease) infinite;
}
.drop__rings i:nth-child(2) { animation-delay: 1.4s; }
.drop__rings i:nth-child(3) { animation-delay: 2.8s; }
@keyframes dropring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}
.drop:hover { background: rgba(250, 252, 252, 0.7); border-color: var(--accent); transform: scale(1.03); }

/* ── 足もと ───────────────────────────── */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 48px var(--gutter) 40px;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
}
.foot small { font-family: var(--sans); font-size: 11px; letter-spacing: 0.16em; }

/* ── 文字が余白から現れる（JS が動くときだけ隠しておく） ── */
.js [data-split] { visibility: hidden; animation: show 0s 4s forwards; }
.js [data-split].is-split { visibility: visible; animation: none; }
@keyframes show { to { visibility: visible; } }
.ch { display: inline-block; will-change: transform, opacity, filter; }

/* ── スマホ ───────────────────────────── */
@media (max-width: 700px) {
  .hero__scroll { display: none; }
  .sec { padding-top: 104px; padding-bottom: 104px; }
  .cell { min-height: 0; padding: 26px 24px 28px; }
  .cell h3 { margin-top: 26px; }
}

/* ── スマホ・タブレット：すりガラスのぼかしは重いので、少し濃い地で代える ── */
@media (pointer: coarse) {
  .cell,
  .drop {
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
    background: rgba(246, 249, 249, 0.66);
  }
}
