/* Mediadept-like: warm white, big serif, tiny labels, hover image preview.
   Edit content in data.json only. */

:root {
  --bg: #f4f2ed;
  --fg: #111111;
  --muted: rgba(17, 17, 17, .58);
  --line: rgba(17, 17, 17, .14);
  --soft: rgba(17, 17, 17, .05);

  --max: 1180px;
  --pad: 26px;

  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Type scale (bigger like reference) */
  --mini: 12px;
  --body: 16px;
  --lead: 16px;
  --serif: ui-serif, "Times New Roman", Times, Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Segoe UI", Roboto, Arial, sans-serif;

}

:root {
  --fill-dur: .65s;
  /* 1文字が塗り切る時間（長め） */
  --fill-stagger: .018s;
  /* 次の文字までの間隔（短め） */
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
}

a {
  color: inherit
}

.skip {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  left: 14px;
  top: 14px;
  width: auto;
  height: auto;
  overflow: visible;
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 12px;
  z-index: 50;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 70px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.top__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.brand {
  font-size: var(--mini);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 750;
}

.role {
  margin-top: 6px;
  font-size: var(--mini);
  color: var(--muted);
}

.top__right {
  display: flex;
  gap: 16px;
  align-items: center
}

.mini {
  font-size: var(--mini);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  position: relative;
  padding-bottom: 6px;
}

.mini::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s var(--ease);
  opacity: .55;
}

.mini:hover {
  color: var(--fg)
}

.mini:hover::after {
  transform: scaleX(1)
}

.hero {
  padding: 56px 0 34px;
  border-bottom: 1px solid var(--line);
}

.hero__kicker {
  font-size: var(--mini);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(46px, 6.4vw, 96px);
  line-height: 1.0;
  letter-spacing: -.02em;
}

.hero__meta {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 820px) {
  .hero__meta {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.metaCol {
  border-top: 1px solid var(--line);
  padding-top: 12px
}

.metaLabel {
  font-size: var(--mini);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.metaValue {
  margin-top: 10px;
  font-size: var(--body);
  font-weight: 650;
  letter-spacing: .01em;
  text-decoration: none;
}

.linkline {
  position: relative
}

.linkline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--fg);
  opacity: .35;
}

.linkline:hover {
  opacity: .75
}

.hero__lead {
  margin: 18px 0 0;
  max-width: 78ch;
  font-size: var(--lead);
  line-height: 1.95;
  color: var(--muted);
}

.works {
  padding-top: 26px;
}

.works__rail {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.works__label {
  font-size: var(--mini);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.works__hint {
  font-size: var(--mini);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.works__list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.work {
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.4fr .7fr 1fr auto;
  gap: 18px;
  align-items: baseline;
}

@media (max-width: 980px) {
  .work {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.work__title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.12;
  font-weight: 520;
  margin: 0;
}

.work__desc {
  margin-top: 10px;
  font-size: var(--body);
  line-height: 1.9;
  color: var(--muted);
  max-width: 78ch;
}

.work__cat {
  font-size: var(--mini);
  color: var(--muted);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.work__meta {
  font-size: var(--mini);
  color: var(--muted);
  letter-spacing: .06em;
}

.work__act {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

@media (max-width: 980px) {
  .work__act {
    justify-content: flex-start;
  }
}

.work__btn {
  font-size: var(--mini);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.work__btn:hover {
  color: var(--fg)
}

.work__btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s var(--ease);
  opacity: .55;
}

.work__btn:hover::after {
  transform: scaleX(1)
}

.linksSec {
  padding-top: 34px
}

.linksSec__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.linksSec__label {
  font-size: var(--mini);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.linksSec__hint {
  font-size: var(--mini);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.linksGrid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 980px) {
  .linksGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.linkCard {
  border: 1px solid var(--line);
  padding: 14px;
  text-decoration: none;
  background: transparent;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.linkCard:hover {
  background: var(--soft)
}

.linkCard__label {
  font-size: var(--body);
  font-weight: 650;
}

.linkCard__url {
  margin-top: 8px;
  font-size: var(--mini);
  color: var(--muted);
  letter-spacing: .06em;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linkCard__arrow {
  color: var(--muted)
}

.footer {
  margin-top: 54px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__tag {
  font-size: var(--mini);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 750;
}

.footer__copy {
  margin-top: 8px;
  font-size: var(--mini);
  color: var(--muted);
}

/* cursor-follow preview */
.preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 360px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(.98);
  transition: opacity .16s var(--ease), transform .16s var(--ease);
  z-index: 40;
}

.preview.is-on {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.preview__inner {
  border: 1px solid var(--line);
  background: #fff;
}

.preview__img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.preview__cap {
  padding: 12px 12px 12px;
}

.preview__capTitle {
  font-size: var(--body);
  font-family: var(--serif);
  font-weight: 520;
  line-height: 1.2;
}

.preview__capMeta {
  margin-top: 6px;
  font-size: var(--mini);
  color: var(--muted);
  letter-spacing: .06em;
}

/* center overlay title (very subtle) */
.hoverOverlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .18s var(--ease);
  z-index: 30;
}

.hoverOverlay.is-on {
  opacity: 1
}

.hoverOverlay__title {
  font-family: var(--serif);
  font-size: clamp(56px, 8vw, 120px);
  line-height: 1.0;
  color: rgba(17, 17, 17, .12);
  text-align: center;
  padding: 0 20px;
}

/* bottom-left dock like the reference */
.dock {
  position: fixed;
  left: 18px;
  bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 25;
}

.dock__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 8px;
  background: #e24b2e;
  color: #fff;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}

.dock__mini {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.dock__mini:hover {
  color: var(--fg)
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important
  }
}


/* Per-character fill effect (clip-path so descenders/overhangs don't get cut) */
.js-charfill ._char {
  position: relative;
  display: inline-block;
  white-space: pre;
  color: rgba(17, 17, 17, .10);
  /* optional micro jitter (values are set inline: --kd / --km) */
  transform: translateY(calc(var(--km, 0) * 10px));
}

.js-charfill ._char::before {
  content: attr(data-c);
  position: absolute;
  inset: 0;
  color: var(--fg);
  white-space: pre;

  /* reveal left -> right */
  clip-path: inset(0 100% 0 0);
  transition: clip-path 520ms var(--ease);
  transition-delay: var(--d, 0ms);
}

.work:hover .js-charfill ._char::before,
.work:focus-within .js-charfill ._char::before {
  clip-path: inset(0 0 0 0);
}

.hero__title:hover .js-charfill ._char::before {
  clip-path: inset(0 0 0 0);
}

/* 文字単位 */
._char {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  /* クリップ逃がし用の余白（※残す） */
  padding: 0 .06em;
  /* 見た目のズレを相殺（これが肝） */
  margin: 0 -.06em;
}

/* 塗りレイヤー */
._char::before {
  content: attr(data-c);
  position: absolute;
  inset: 0;
  color: var(--ink, #111);
  clip-path: inset(0 100% 0 0);
  will-change: clip-path;
  pointer-events: none;
  padding: 0 .15em;
  margin: 0 -.1em;
}

/* ベース文字色（薄い方） */
._char {
  color: rgba(17, 17, 17, .18);
}

._char::before {
  animation: charFill var(--fill-dur) linear both;
  animation-delay: calc(var(--i) * var(--fill-stagger));
}

@keyframes charFill {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0% 0 0);
  }
}

.js-charfill {
  position: relative;
  display: inline-block;
}

/* ベース（薄い文字） */
.js-charfill .charfill__base {
  color: rgba(17, 17, 17, .18);
}

/* オーバーレイ（濃い文字） */
.js-charfill .charfill__overlay {
  position: absolute;
  inset: 0;
  color: #111;
  pointer-events: none;

  /* ここが肝：1枚の帯で左→右に reveal */
  clip-path: inset(0 100% 0 0);
  animation: fillSweep .85s cubic-bezier(.2, .7, .2, 1) both;
}

/* 文字自体の微調整をするならここ（任意） */
.js-charfill ._char {
  display: inline-block;
  transform: translateY(calc(var(--kd, 0) * 1px));
  /* 既にあなたが直した padding/margin があるならそれは残してOK */
}

@keyframes fillSweep {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0% 0 0);
  }
}

/* overlayは常に濃い黒で固定（薄い _char 定義を上書き） */
.js-charfill .charfill__overlay ._char {
  color: #111 !important;
}

/* hover時：塗り文字を白に */
.js-charfill:hover .charfill__overlay {
  color: #fff;
}

/* 念のため char 単位も上書き */
.js-charfill:hover .charfill__overlay ._char {
  color: #fff !important;
}