@font-face {
  font-family: Manrope;
  src: url('../assets/manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
  --paper: #f9f9f8;
  --ink: #212523;
  --muted: #6b716e;
  --line: #d9deda;
  --accent: #c23b4b;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
button[hidden] { display: none; }
::selection { color: #fff; background: #ad3545; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.accent { color: var(--accent); }

.concept { position: relative; min-height: 100svh; }
.concept-page, .gallery-page {
  position: relative;
  width: min(100% - 112px, 1200px);
  min-height: 100svh;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.home .concept-page { grid-template-rows: 112px 1fr auto; }
.home .resonance-main { grid-row: 2; }
.home .concept-footer { grid-row: 3; display: grid; grid-template-columns: 1fr auto 1fr; }
.home .concept-footer > a { justify-self: end; }
.sample-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  font-size: 13px;
}
.back-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.back-link img { transition: transform 180ms ease; }
.back-link:hover img { transform: translate(-2px, -2px); }
.edition, .eyebrow { color: var(--muted); font-size: 12px; font-weight: 500; }
.eyebrow { margin: 0 0 16px; }
.concept h1 { margin: 0; font-size: 104px; line-height: 1.15; font-weight: 600; }
.outbound {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  min-height: 52px;
  border-bottom: 1px solid currentColor;
  font-size: 15px;
  font-weight: 600;
}
.outbound img { transition: transform 180ms ease; }
.outbound:hover img { transform: translate(3px, -3px); }
.avatar { border-radius: 50%; object-fit: cover; }
.concept-footer, .gallery-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 100px;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}
.concept-footer > a { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; }
.concept-footer > a:hover, .gallery-footer > a:hover { color: var(--ink); }
.motion-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 180ms ease;
}
.motion-toggle:hover { background: #82828218; }
.play-icon, .is-paused .pause-icon { display: none; }
.is-paused .play-icon { display: block; }

.trace-main { align-self: center; padding-block: 64px 80px; }
.identity { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; color: var(--muted); font-size: 13px; }
.kinetic-title { display: flex; width: fit-content; padding-bottom: 12px; }
.kinetic-title > span {
  display: inline-block;
  animation: type-arrive 1000ms cubic-bezier(.2,.8,.2,1) both;
  will-change: transform;
}
.kinetic-title > span:nth-child(2) { animation-delay: 50ms; }
.kinetic-title > span:nth-child(3) { animation-delay: 100ms; }
.kinetic-title > span:nth-child(4) { animation-delay: 150ms; }
.kinetic-title > span:nth-child(5) { animation-delay: 200ms; }
.kinetic-title > span:nth-child(6) { animation-delay: 250ms; }
.kinetic-title > span:nth-child(7) { animation-delay: 300ms; }
.kinetic-title > span:nth-child(8) { animation-delay: 350ms; }
.kinetic-title > span:nth-child(9) { animation-delay: 400ms; }
.trace-rule { height: 1px; background: var(--line); margin-top: 28px; position: relative; overflow: hidden; }
.trace-rule > span { position: absolute; inset: 0 auto 0 0; width: 20%; background: var(--accent); animation: trace-sweep 8s ease-in-out infinite; }
.trace-links { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; }
.signature { font-family: 'Yu Mincho', 'Noto Serif CJK JP', serif; font-size: 28px; color: var(--accent); }
.trace-links .outbound { border: none; }
@keyframes type-arrive { from { opacity: 0; transform: translateY(45px) rotate(5deg); } to { opacity: 1; transform: none; } }
@keyframes trace-sweep { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(400%); } }

.resonance { --paper: #121716; --ink: #eff4ef; --muted: #a0b4aa; --line: #3b4a42; --accent: #baf6cf; color-scheme: dark; }
.wave-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.resonance-main { text-align: center; align-self: center; padding-block: 48px 90px; }
.resonance-main .avatar { margin: 0 auto 24px; }
.resonance-main h1 { font-size: 112px; }
.resonance-main .outbound { margin-top: 36px; }
.resonance .back-link img, .resonance .outbound img, .resonance .concept-footer img { filter: invert(1); }
.resonance-main > * { animation: soft-arrive 1200ms ease both; }
.resonance-main h1 { animation-delay: 120ms; }
.resonance-main .outbound { animation-delay: 240ms; }
@keyframes soft-arrive { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.tactile { --paper: #eef1f0; --ink: #28312e; --muted: #63736b; --line: #c9d3cd; --accent: #26624e; }
.tactile-scene { position: absolute; inset: 0; min-height: 100%; overflow: hidden; pointer-events: none; }
.tactile-scene canvas { display: block; width: 100%; height: 100%; }
.scene-fallback { position: absolute; top: 33%; left: 50%; transform: translate(-50%, -50%); border-radius: 8px; box-shadow: 16px 16px 24px #31453516; }
.tactile-scene[data-rendered] .scene-fallback { display: none; }
.tactile-main { align-self: end; text-align: center; padding-block: 380px 64px; }
.tactile-main h1 { font-size: 80px; }
.tactile-main .outbound { margin-top: 28px; }
.tactile-main > * { animation: soft-arrive 1000ms ease both; }
.tactile-main .outbound { animation-delay: 200ms; }

.gallery-page { width: min(100% - 96px, 1320px); }
.gallery-main { align-self: center; padding-block: 64px 96px; }
.gallery-main h1 { margin: 0 0 56px; font-size: 52px; line-height: 1.2; font-weight: 600; }
.gallery-main h1 > span { color: var(--accent); }
.sample-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sample-link { display: block; min-width: 0; }
.sample-preview { width: 100%; height: auto; aspect-ratio: 8/5; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; transition: transform 240ms ease, box-shadow 240ms ease; }
.sample-link:hover .sample-preview { transform: translateY(-6px); box-shadow: 0 12px 24px #1420190e; }
.sample-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; font-size: 20px; font-weight: 600; }
.sample-number { display: inline-block; margin-right: 16px; color: var(--muted); font-size: 12px; font-weight: 500; }
.gallery-footer { border-top: 1px solid var(--line); }
.gallery-footer > a { display: inline-flex; align-items: center; min-height: 44px; }

.is-paused *, .is-paused *::before, .is-paused *::after { animation-play-state: paused !important; }

@media (min-width: 1600px) {
  .concept h1 { font-size: 120px; }
  .tactile-main h1 { font-size: 88px; }
}

@media (max-width: 1000px) {
  .concept-page { width: calc(100% - 80px); }
  .concept h1, .resonance-main h1 { font-size: 80px; }
  .tactile-main h1 { font-size: 60px; }
  .sample-grid { gap: 16px; }
  .sample-caption { font-size: 17px; }
}

@media (max-width: 700px) {
  .concept-page, .gallery-page { width: calc(100% - 48px); }
  .home .concept-page { grid-template-rows: 88px 1fr auto; }
  .sample-header { min-height: 88px; font-size: 12px; }
  .edition { font-size: 11px; }
  .concept h1, .resonance-main h1 { font-size: 52px; }
  .identity { margin-bottom: 36px; }
  .trace-main { padding-block: 64px 96px; }
  .trace-rule { margin-top: 24px; }
  .trace-links { padding-top: 16px; }
  .outbound { font-size: 14px; gap: 36px; }
  .concept-footer { min-height: 92px; gap: 8px; font-size: 10px; }
  .concept-footer > a { gap: 6px; }
  .resonance-main { padding-block: 56px 90px; }
  .tactile-main { align-self: end; text-align: center; padding-block: 300px 56px; }
  .tactile-main h1 { font-size: 48px; }
  .tactile-main .outbound { margin-top: 24px; }
  .tactile .scene-fallback { top: 33%; left: 50%; width: 190px; height: 190px; }
  .gallery-main { padding-block: 40px 64px; }
  .gallery-main h1 { font-size: 34px; margin-bottom: 36px; }
  .sample-grid { grid-template-columns: 1fr; gap: 40px; }
  .sample-caption { font-size: 20px; margin-top: 16px; }
  .gallery-footer { min-height: 88px; }
}

@media (max-width: 360px) {
  .concept h1, .resonance-main h1 { font-size: 44px; }
  .gallery-main h1 { font-size: 30px; }
  .concept-footer > a { gap: 4px; }
  .concept-footer > span { font-size: 9px; }
  .tactile-main { padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.motion-enabled) *, body:not(.motion-enabled) *::before, body:not(.motion-enabled) *::after { animation: none !important; transition: none !important; }
}
