/*
Theme Name: Espace
Theme URI: https://espace.jp/
Author: 一般財団法人 京都大学名誉教授森下正明研究記念財団
Author URI: https://www.morisita.or.jp
Description: エスパス百万遍・エスパス一乗寺の公式テーマ。個体群生態学者・森下正明の「空間」概念を主題に据えた、学術機関向けの静的トップページを提供します。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: espace
Tags: academic, one-column, custom-logo, custom-menu, translation-ready
*/

/* ─────────────────────────────────────────────
   本ファイルはテーマ情報の宣言と、Tailwind で表現しない
   カスタムスタイルのみを担います。
   レイアウトの大半は Tailwind のユーティリティクラスです。
   ───────────────────────────────────────────── */

:root { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* 見出しの和文字詰め */
.jp-tight { font-feature-settings: "palt" 1; letter-spacing: 0.02em; }

/* 縦組み（デスクトップのみ使用） */
.tategaki {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.28em;
}

/* 罫（コドラート境界を思わせる細線） */
.rule-fine { border-color: rgba(138,151,166,.28); }

/* ── 署名的要素：コドラート（方形区）格子 ────────────── */
.quadrat-cell { stroke: rgba(241,242,238,.14); stroke-width: .5; fill: none; }
.quadrat-dot  { fill: #8FA47F; opacity: 0; transform-box: fill-box; transform-origin: center; }
.quadrat-dot.settle { animation: settle 1.6s cubic-bezier(.22,.8,.24,1) forwards; }
@keyframes settle {
  from { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4); }
  to   { opacity: .95; transform: translate(0,0) scale(1); }
}
.quadrat-dot.aggregated { fill: #C9CFC0; opacity: .35; }

/* 静かな立ち上がり */
.rise { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s cubic-bezier(.22,.8,.24,1); }
.rise.in { opacity: 1; transform: none; }

/* リンク下線 */
.underline-grow { background-image: linear-gradient(#55704A,#55704A); background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .4s ease; }
.underline-grow:hover { background-size: 100% 1px; }

/* フォーカス可視化 */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #8FA47F; outline-offset: 3px; border-radius: 2px;
}

/* WordPress 標準クラス */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: absolute; z-index: 100; top: 1rem; left: 1rem; width: auto; height: auto;
  clip: auto; padding: .5rem 1rem; background: #16202B; color: #F1F2EE; font-size: .875rem;
}

/* Contact Form 7 を本テーマの意匠に馴染ませる */
.espace-form .wpcf7-form-control {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(59,75,88,.3);
  padding: .625rem 0; color: #16202B;
}
.espace-form .wpcf7-form-control:focus { border-color: #55704A; outline: none; }
.espace-form .wpcf7-submit {
  width: auto; background: #16202B; color: #F1F2EE; border: 0; padding: 1rem 2.5rem;
  font-family: "IBM Plex Mono", monospace; font-size: .875rem; letter-spacing: .1em; cursor: pointer;
  transition: background-color .3s ease;
}
.espace-form .wpcf7-submit:hover { background: #55704A; }

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  .quadrat-dot { opacity: .95; }
  .quadrat-dot.settle { animation: none; }
  .quadrat-dot.aggregated { opacity: .35; }
}
