/* ==========================================================
   tesoNOTE WORKS — 夜明け前の藍と、ホログラムの金
   ========================================================== */

:root {
  --ink:        #0B1226;  /* 夜明け前の空 */
  --ink-2:      #121B33;  /* 一段浮いた面 */
  --ink-3:      #1B2542;  /* 罫・境界 */
  --paper:      #E8ECF5;  /* 本文 */
  --mute:       #7C88A4;  /* 補助 */
  --halo:       #F2C879;  /* クロのホログラム＝金 */
  --signal:     #4E8DF5;  /* シグナルブルー */

  --serif: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans:  "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --pad: clamp(20px, 5vw, 64px);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

img, video { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--halo);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- ヘッダー ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-3);
}
.masthead__in {
  max-width: var(--maxw); margin-inline: auto; padding: 14px var(--pad);
  display: flex; align-items: baseline; gap: 24px;
}
.logo {
  font-family: var(--mono);
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; color: var(--paper); white-space: nowrap;
}
.logo b { color: var(--halo); font-weight: 500; }
.nav { margin-left: auto; display: flex; gap: 22px; }
.nav a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  color: var(--mute); text-decoration: none; padding: 4px 0;
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--paper); border-bottom-color: var(--halo); }
@media (max-width: 640px) { .nav { display: none; } }

/* ---------- ヒーロー ---------- */

.hero { padding-block: clamp(56px, 11vw, 130px) clamp(6px, 1.6vw, 18px); }

.hero__lede {
  font-family: var(--mono); font-size: 12px; letter-spacing: .2em;
  color: var(--halo); margin: 0 0 26px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(31px, 6.4vw, 74px);
  line-height: 1.34;
  letter-spacing: .01em;
  margin: 0 0 34px;
  max-width: 19em;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: var(--halo);
}

.hero__sub {
  max-width: 42em; color: var(--mute); margin: 0 0 46px;
  font-size: clamp(14px, 1.5vw, 16px);
}
.hero__sub strong { color: var(--paper); font-weight: 500; }

/* 実数の帯 — このサイトの署名。作品ではなく「制作の量」を数える */
.tally {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 1px;
  background: var(--ink-3);
  border: 1px solid var(--ink-3);
}
.tally div { background: var(--ink); padding: 20px 18px; }
.tally dt {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .13em;
  color: var(--mute); margin: 0 0 8px; text-transform: uppercase;
}
.tally dd {
  font-family: var(--mono); font-size: clamp(22px, 3.1vw, 31px);
  margin: 0; line-height: 1; color: var(--paper); font-weight: 500;
}
.tally dd span { font-size: 12px; color: var(--mute); margin-left: 4px; letter-spacing: .05em; }
.tally div:last-child dd { color: var(--halo); }

/* ---------- セクション ---------- */

.sec { padding-block: clamp(58px, 9vw, 108px) 0; }

.sec__head {
  display: flex; align-items: baseline; gap: 18px;
  padding-bottom: 18px; margin-bottom: 40px;
  border-bottom: 1px solid var(--ink-3);
}
.sec__head h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(21px, 2.9vw, 31px); margin: 0; letter-spacing: .02em;
}
.sec__head .count {
  font-family: var(--mono); font-size: 11.5px; color: var(--mute);
  letter-spacing: .1em; margin-left: auto; white-space: nowrap;
}

/* ---------- 作品（映像） ---------- */

.film { margin-bottom: clamp(48px, 7vw, 84px); }

.film__frame {
  position: relative;
  border: 1px solid var(--ink-3);
  background: var(--ink-2);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.film__frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.film__still { width: 100%; height: 100%; object-fit: cover; }

/* クリックするまで YouTube を読み込まない再生ボタン */
.player {
  position: relative; display: block; width: 100%; height: 100%;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.player img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.player:hover img { transform: scale(1.02); }
.player::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,18,38,.6), transparent 42%);
}
.player__btn {
  position: absolute; inset: 0; margin: auto;
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center; z-index: 2;
  background: color-mix(in srgb, var(--halo) 92%, transparent);
  color: var(--ink);
  transition: transform .22s cubic-bezier(.2,.7,.3,1), background .22s;
}
.player:hover .player__btn { transform: scale(1.09); background: #ffd98d; }
.player__meta {
  position: absolute; left: 18px; bottom: 16px; z-index: 2;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em;
  color: var(--paper);
}

.film__body { padding-top: 26px; display: grid; grid-template-columns: 1fr 260px; gap: 34px; }
@media (max-width: 780px) { .film__body { grid-template-columns: 1fr; gap: 22px; } }

.film__title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(20px, 2.6vw, 28px); margin: 0 0 6px; letter-spacing: .02em;
}
.film__title .en {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em;
  color: var(--mute); display: block; margin-top: 8px; font-weight: 400;
}
.film__desc { color: var(--mute); margin: 14px 0 0; max-width: 40em; font-size: 15px; }
.film__desc strong { color: var(--paper); font-weight: 500; }

.spec { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 2.15; }
.spec div { display: flex; gap: 12px; border-bottom: 1px dotted var(--ink-3); padding: 3px 0; }
.spec dt { color: var(--mute); min-width: 5.2em; }
.spec dd { margin: 0; color: var(--paper); text-align: right; margin-left: auto; }

.watch {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  color: var(--ink); background: var(--halo);
  padding: 11px 18px; text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
.watch:hover { transform: translateY(-2px); background: #ffd98d; }

.pending {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  color: var(--mute); border: 1px dashed var(--ink-3); padding: 11px 18px;
}

/* 捨てた版の帯 — 完成したものの隣に、捨てた数を置く */
.discarded { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--ink-3); }
.discarded__label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  color: var(--mute); text-transform: uppercase; margin: 0 0 12px;
}
.discarded__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.discarded__list li {
  font-family: var(--mono); font-size: 11.5px; color: var(--mute);
  border: 1px solid var(--ink-3); padding: 5px 11px;
  display: flex; align-items: baseline; gap: 8px;
}
.discarded__list s {
  color: color-mix(in srgb, var(--paper) 70%, transparent);
  text-decoration-color: color-mix(in srgb, var(--halo) 70%, transparent);
  text-decoration-thickness: 1px;
}
.discarded__list em { font-style: normal; opacity: .8; }

/* ---------- ギャラリー ---------- */

.gal { margin-bottom: clamp(44px, 6vw, 72px); }

.gal__head {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px;
}
.gal__head h3 {
  font-family: var(--serif); font-size: 17px; font-weight: 700; margin: 0; letter-spacing: .03em;
}
.gal__head .n {
  font-family: var(--mono); font-size: 11px; color: var(--mute); letter-spacing: .1em;
}
.gal__note { font-size: 13.5px; color: var(--mute); margin: 0 0 18px; max-width: 44em; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 12px;
}
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.tile {
  position: relative; display: block; padding: 0; border: 0;
  background: var(--ink-2); cursor: zoom-in; overflow: hidden;
  aspect-ratio: 16 / 10;
  transition: outline-color .2s ease;
  outline: 1px solid var(--ink-3); outline-offset: -1px;
}
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.3,1), opacity .3s;
  opacity: .93;
}
.tile:hover img { transform: scale(1.045); opacity: 1; }
.tile:hover { outline-color: var(--halo); }
.tile figcaption {
  position: absolute; inset: auto 0 0 0;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  padding: 22px 10px 8px;
  background: linear-gradient(to top, rgba(11,18,38,.94), transparent);
  color: var(--paper);
  opacity: 0; transition: opacity .25s ease;
  text-align: left;
}
.tile:hover figcaption, .tile:focus-visible figcaption { opacity: 1; }

/* ---------- ライトボックス ---------- */

.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6,10,22,.96);
  display: none; align-items: center; justify-content: center;
  padding: clamp(14px, 3vw, 40px);
}
.lb[open], .lb.is-on { display: flex; }
.lb img { max-width: 100%; max-height: 84vh; object-fit: contain; }
.lb__cap {
  position: absolute; left: 0; right: 0; bottom: clamp(12px, 2.6vw, 26px);
  text-align: center; font-family: var(--mono); font-size: 12px; color: var(--mute);
  padding-inline: 20px;
}
.lb__x {
  position: absolute; top: clamp(12px, 2.6vw, 26px); right: clamp(12px, 2.6vw, 26px);
  background: none; border: 1px solid var(--ink-3); color: var(--paper);
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  padding: 8px 14px; cursor: pointer;
}
.lb__x:hover { border-color: var(--halo); color: var(--halo); }

/* ---------- フッター ---------- */

.foot {
  margin-top: clamp(70px, 10vw, 130px);
  border-top: 1px solid var(--ink-3);
  padding: 46px 0 60px;
}
.foot__in { display: flex; flex-wrap: wrap; gap: 34px 60px; align-items: flex-start; }
.foot h4 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  color: var(--mute); text-transform: uppercase; margin: 0 0 12px; font-weight: 400;
}
.foot p, .foot li { font-size: 13.5px; color: var(--mute); margin: 0; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { line-height: 2; }
.foot li b { color: var(--paper); font-weight: 500; font-family: var(--mono); font-size: 12px; }
.foot__end {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--ink-3);
  font-family: var(--mono); font-size: 11px; color: var(--mute); letter-spacing: .06em;
}
.foot__end a { color: var(--mute); }
.foot__end a:hover { color: var(--halo); }
