:root {
  --ink: #1f1e1c;
  --ink-2: #5f5d58;
  --bg: #f6f5f2;
  --line: rgba(0, 0, 0, 0.08);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
/* 画面より横にはみ出す要素があっても、ページ全体が横にずれないようにする */
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.8;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 40px);
  pointer-events: none;
}
.site-header a { pointer-events: auto; }
.logo {
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
}
.nav { display: flex; gap: 20px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 13px; }
@media (max-width: 560px) { .nav { display: none; } }

/* ---------- Hero: studio backdrop ---------- */
.hero { position: relative; height: 260vh; }
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  /* 白いスタジオのバックスクリーン：中央が明るく、床に向かってわずかに落ちる */
  background:
    radial-gradient(120% 70% at 50% 38%, #ffffff 0%, #fbfaf8 45%, #efeeea 100%);
}
.hero-sticky::after {
  /* 壁と床がゆるやかにつながるカーブ（ホリゾント）の陰影 */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.035) 60%, rgba(0,0,0,0.06) 100%);
  pointer-events: none;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  touch-action: pan-y;
}
.hero-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2vw;
  font-size: clamp(56px, 14vw, 160px);
  font-weight: 800;
  z-index: 1;
}
.hero-fallback span { color: var(--c); text-shadow: 0 18px 24px rgba(0,0,0,0.12); }
.no-webgl .hero-fallback { display: flex; }
.no-webgl #hero-canvas { display: none; }

.hero-copy {
  position: absolute;
  left: 0; right: 0;
  bottom: 12vh;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.hero-copy.is-visible { opacity: 1; transform: none; }
.hero-copy::before {
  /* 背景の線画が文字に重なっても読めるよう、見出しの後ろをやわらかく白くする */
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: min(720px, 110%);
  height: 170%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(250,249,246,0.95) 55%, rgba(250,249,246,0));
  z-index: -1;
}
.hero-title {
  margin: 0;
  font-size: clamp(22px, 4.2vw, 40px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.hero-sub { margin: 10px 0 0; color: var(--ink-2); font-size: clamp(13px, 1.6vw, 16px); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: opacity 0.4s ease;
}
.scroll-hint span {
  width: 1px; height: 28px; background: var(--ink-2);
  animation: hint 1.8s ease-in-out infinite;
  transform-origin: top;
}
.scroll-hint.is-hidden { opacity: 0; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Sections ---------- */
.about {
  max-width: 880px;
  margin: 0 auto;
  padding: 96px 20px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ヘッダー：ヒーローを過ぎたら背景を付けて、下の見出しと重ならないようにする */
.site-header { transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease; }
.site-header.is-solid {
  background: rgba(246,245,242,0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  pointer-events: auto;
}
.section-title { font-size: clamp(20px, 3vw, 28px); margin: 0 0 32px; letter-spacing: 0.04em; }
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 20px 48px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-2);
}
.site-footer p { margin: 4px 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint span { animation: none; }
}

/* 高さの低い画面では、SCROLL表示と見出しが重ならないようにする */
@media (max-height: 640px) {
  .scroll-hint { display: none; }
  .hero-copy { bottom: 7vh; }
}

/* ---------- 背景：細いペン画のノートパソコン（スクロールで開く） ---------- */
.hero-laptop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-laptop path {
  fill: none;
  stroke: #2b2a2a;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.hero-laptop .lt-ink { opacity: 0.38; }
.hero-laptop .lt-keys, .hero-laptop .lt-ui { stroke-width: 0.8; }

/* ---------- 5つのステップ：半円ダイヤル ---------- */
.stages { position: relative; height: 340vh; }
.dial-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.dial-title {
  position: absolute;
  top: calc(72px + 2vh);
  right: clamp(20px, 6vw, 80px);
  margin: 0;
  z-index: 3;
  text-align: right;
}
.dial { position: absolute; inset: 0; }
.dial-arc { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.dial-ring { fill: none; stroke: #2b2a2a; stroke-opacity: .22; stroke-width: 1.1; }
.dial-ticks line { stroke: #2b2a2a; stroke-opacity: .25; stroke-width: 1; stroke-linecap: round; }
.dial-ticks line.major { stroke-opacity: .45; }
.dial-list { list-style: none; margin: 0; padding: 0; }
.dial-item {
  position: absolute;
  left: 0; top: 0;
  width: var(--size, 64px);
  height: var(--size, 64px);
  margin: calc(var(--size, 64px) / -2) 0 0 calc(var(--size, 64px) / -2);
  will-change: transform, opacity;
  z-index: 1;
}
.dial-item a {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 28%;
  background: var(--c);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: calc(var(--size, 64px) * 0.5);
  box-shadow: 0 2px 0 rgba(0,0,0,0.04);
  transition: box-shadow .35s ease, transform .35s ease, filter .35s ease;
  filter: saturate(.75) brightness(1.02);
  -webkit-tap-highlight-color: transparent;
}
.dial-item.is-active { z-index: 2; }
.dial-item.is-active a {
  filter: none;
  box-shadow:
    0 0 0 6px #fff,
    0 0 0 8px var(--c),
    0 22px 40px -12px color-mix(in srgb, var(--c) 80%, #000 20%),
    0 10px 18px rgba(0,0,0,0.10);
}
.dial-item.is-active a::after {
  /* 中央だけ、ふんわり光る輪 */
  content: "";
  position: absolute;
  inset: -22%;
  border-radius: 40%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 55%, transparent), transparent);
  z-index: -1;
  animation: dialGlow 2.4s ease-in-out infinite;
}
@keyframes dialGlow { 0%,100% { opacity: .55; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }

.dial-panel {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
  z-index: 3;
  max-width: 420px;
}
.dial-step { font-size: 11px; letter-spacing: .2em; color: var(--ink-2); }
.dial-en { font-size: clamp(13px, 1.4vw, 15px); letter-spacing: .14em; color: var(--accent, var(--ink-2)); font-weight: 700; }
.dial-ja { font-size: clamp(30px, 5vw, 52px); font-weight: 800; line-height: 1.2; letter-spacing: .04em; }
.dial-desc { font-size: clamp(13px, 1.6vw, 16px); color: var(--ink-2); line-height: 1.7; }
.dial-go {
  margin-top: 10px;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  transition: transform .2s ease;
}
.dial-panel:hover .dial-go { transform: translateX(3px); }
.dial-panel .swap { animation: dialSwap .45s ease both; }
@keyframes dialSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dial-hint {
  position: absolute;
  bottom: 22px; right: clamp(20px, 6vw, 80px);
  margin: 0;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-2);
}
@media (max-width: 560px) {
  .dial-title { font-size: 18px; }
  .dial-ja { font-size: 30px; }
  .dial-desc { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .dial-item.is-active a::after { animation: none; }
}

/* ---------- ステップ別ページ（準備中） ---------- */
.page-main { max-width: 760px; margin: 0 auto; padding: 120px 20px 80px; }
.page-letter {
  width: 88px; height: 88px; margin: 0 0 20px;
  display: grid; place-items: center;
  border-radius: 26px; background: var(--c);
  font-size: 44px; font-weight: 800; color: rgba(0,0,0,0.55);
}
.page-en { margin: 0; font-size: 13px; letter-spacing: .14em; color: var(--ink-2); }
.page-title { margin: 4px 0 12px; font-size: clamp(30px, 6vw, 46px); }
.page-lead { margin: 0 0 24px; color: var(--ink-2); }
.page-soon { padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.page-back { display: inline-block; margin-top: 28px; color: var(--ink); font-weight: 700; text-decoration: none; }
