/* 伽藍堂（garand.jp）
   飾りは置かない。白磁の地に墨の明朝、リンクだけ深い青磁。 */
:root {
  --hakuji: #f4f6f4;      /* 白磁：地 */
  --sumi: #26292b;        /* 墨：文字 */
  --nezumi: #5d6560;      /* 利休鼠：添え書き */
  --seiji-fuka: #2d6a5b;  /* 深い青磁：リンク */
  --kumo: #d5dcd8;        /* 薄い線 */
  --mincho: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho",
            "Noto Serif JP", "Noto Serif CJK JP", "Source Han Serif JP", serif;
  --latin: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, var(--mincho);
  --column: 38rem;   /* 本文の幅。日本語で1行36字ほど */
  --gutter: clamp(1.25rem, 5vw, 3rem);
  color-scheme: light;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  font-family: var(--mincho);
  font-size: 1.0625rem;
  line-height: 2;
  line-break: strict;
  font-kerning: normal;
}
html[lang="en"] body {
  font-family: var(--latin);
  line-height: 1.75;
}

main {
  flex: 1;
  width: 100%;
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a {
  color: var(--seiji-fuka);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}
a:hover { color: var(--sumi); }
a:focus-visible {
  outline: 2px solid var(--seiji-fuka);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── 上の帯 ─────────────────────────── */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  width: 100%;
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  font-size: 0.9375rem;
}
.top nav { margin-left: auto; }
.top a { color: var(--sumi); text-decoration: none; }
.top a:hover { text-decoration: underline; }
.top .brand { letter-spacing: 0.25em; }

/* ── トップ：縦書きの名前（上下の帯は他のページと同じ） ── */
.home main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.home .name { margin: 0; line-height: 1; font-weight: 400; } /* 見出しの既定の太字を、字に移さない */
.home .kaku {
  display: block;
  width: clamp(3rem, 11vw, 6rem);
  height: auto;
  overflow: visible;
}
.home .kaku text {
  font-family: var(--mincho);
  font-size: 64px;
  fill: var(--sumi);
  stroke: var(--sumi);
  stroke-width: 0.8;
  stroke-opacity: 0;
}

/* 書く：字の輪郭を1字ずつ細い線でなぞり、書き終わったら3字いっせいに墨が満ちる（2026-11-30に依頼者が選んだ。墨は0.7秒）
   線の長さ2600は字の輪郭より長いので、なぞりは1.2秒で見た目上終わる（ヒラギノ明朝で測った）。墨はそこから始める */
@media (prefers-reduced-motion: no-preference) {
  .home .kaku text {
    fill-opacity: 0;
    stroke-opacity: 1;
    stroke-dasharray: 2600;
    stroke-dashoffset: 2600;
    animation: trace 2.6s cubic-bezier(0.4, 0, 0.2, 1) forwards, fillin 0.7s ease 1.2s forwards;
  }
  .home .kaku text:nth-of-type(2) { animation-delay: 0.35s, 1.2s; }
  .home .kaku text:nth-of-type(3) { animation-delay: 0.7s, 1.2s; }
  @keyframes trace { to { stroke-dashoffset: 0; } }
  @keyframes fillin { to { fill-opacity: 1; stroke-opacity: 0; } }
}

/* ── アプリ：アイコンと名前だけ ───────── */
.apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 2.5rem 1.5rem;
  margin: 3.5rem 0 5rem;
  padding: 0;
  list-style: none;
}
.apps li { text-align: center; }
.apps a { display: block; color: var(--sumi); text-decoration: none; }
.apps a:hover span { text-decoration: underline; }
.apps img {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 0.75rem;
  border-radius: 22%;
}
.apps span {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ── 文書（プライバシーポリシー・サポート） ── */
.doc { margin: 3.5rem 0 5rem; }
.doc h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.5;
}
html[lang="en"] .doc h1 { letter-spacing: 0.02em; }
.doc h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.15em;
}
html[lang="en"] .doc h2 { letter-spacing: 0.02em; }
.doc p { margin: 0 0 1em; }
.note { color: var(--nezumi); font-size: 0.9375rem; }

/* ── 下の帯 ─────────────────────────── */
.bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  width: 100%;
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  /* 線は本文の幅だけ引く */
  background: linear-gradient(var(--kumo), var(--kumo)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  font-size: 0.875rem;
  color: var(--nezumi);
}
.bottom nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5em; }
.bottom a { color: var(--nezumi); }
.bottom a:hover { color: var(--sumi); }
.bottom p { margin: 0; }
