:root {
  --bg: #0c0d10;
  --surface: #14161b;
  --surface-2: #1b1e25;
  --line: #262a33;
  --text: #e8eaee;
  --muted: #9aa1ad;
  --accent: #e0b25a;          /* 金色: GoLD_ray に合わせたアクセント */
  --accent-soft: rgba(224, 178, 90, 0.14);
  --radius: 14px;
  --maxw: 1040px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12, 13, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.brand { white-space: nowrap; font-weight: 700; letter-spacing: .02em; color: var(--text); }
nav a { color: var(--muted); margin-left: 22px; font-size: 14px; }
nav a:hover { color: var(--text); text-decoration: none; }
nav { white-space: nowrap; }
/* 言語切り替え(JP / EN) */
nav a.lang {
  color: var(--text); font-size: 12px; line-height: 1;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
}
nav a.lang:hover { border-color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 88px 0 56px; position: relative; }
/* トップの画像: 右側に置き、端を背景になじませる。文章は画像の手前に出す */
.hero-art {
  position: absolute; top: 0; right: 0; bottom: 0; width: 70%;
  z-index: 0; pointer-events: none;
  /* 左右と下の端を、背景の色へ溶かす */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 42%, #000 82%, transparent 100%),
                      linear-gradient(to bottom, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0, #000 42%, #000 82%, transparent 100%),
                      linear-gradient(to bottom, #000 72%, transparent 100%);
          mask-composite: intersect;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 80% 30%; filter: brightness(1.2) saturate(1.15); }
.hero > :not(.hero-art) { position: relative; z-index: 1; }
/* 文字の下になる左側を暗くして、虹と重なっても読めるようにする */
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(12, 13, 16, .85) 0%, rgba(12, 13, 16, .5) 22%, rgba(12, 13, 16, 0) 46%);
}
/* 文字の縁取り(背景色の影) */
.hero h1, .hero p.en, .hero p.lead {
  text-shadow: 0 0 3px rgba(12, 13, 16, .95), 0 0 10px rgba(12, 13, 16, .9), 0 0 22px rgba(12, 13, 16, .8);
}
.hero p.lead { color: #c3c8d1; }
.eyebrow { color: var(--accent); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.2; margin: 0 0 18px; letter-spacing: -.01em; }
.hero h1 .ph { display: inline-block; white-space: nowrap; }
.hero p.en {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-style: italic; font-size: clamp(20px, 3.4vw, 30px);
  color: var(--accent); letter-spacing: .02em; margin: -4px 0 22px;
}
.hero p.lead { color: var(--muted); max-width: 620px; font-size: 17px; margin: 0 0 28px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); font-size: 14px;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #17130a; font-weight: 700; }

/* ---------- sections ---------- */
section { padding: 56px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 26px; margin: 0 0 8px; }
section .sub { color: var(--muted); margin: 0 0 32px; }

/* ---------- works ---------- */
.work {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 28px;
}
.work.flip .media { order: 2; }
.work .media { background: var(--surface-2); min-height: 260px; }
.work .media img, .work .media svg { width: 100%; height: 100%; object-fit: cover; }
/* 縦に長い画像は切らずに全体を見せる(GoLD_rayt のヒーロー画像など) */
.work .media img.contain { object-fit: contain; height: auto; align-self: center; }
.work .media:has(img.contain) { display: flex; flex-direction: column; justify-content: center; }
/* 縦に並べた小さい動画は引き伸ばさない */
.work .media img.narrow { max-width: 300px; }
.work .media .credit { margin: 0; padding: 10px 14px 12px; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.work .media .credit a { color: var(--muted); text-decoration: underline; }
.work .body { padding: 28px 28px 28px 0; display: flex; flex-direction: column; }
.work.flip .body { padding: 28px 0 28px 28px; }
.work h3 { margin: 0 0 4px; font-size: 22px; }
.work .tagline { color: var(--accent); font-size: 14px; margin: 0 0 14px; }
.work p { margin: 0 0 12px; color: #cfd3da; font-size: 15px; }
.work ul { margin: 0 0 16px; padding-left: 18px; color: #cfd3da; font-size: 14px; }
.work li { margin-bottom: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 16px; }
.tag {
  font-size: 12px; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.links { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 14px; }
.links .pending { color: var(--muted); }
.todo {
  font-size: 12px; color: var(--muted); border: 1px dashed var(--line);
  border-radius: 8px; padding: 6px 10px; margin-bottom: 12px;
}

.work .media .shots {
  display: flex; gap: 12px; justify-content: center; align-items: flex-start;
  padding: 20px; height: 100%;
}
.work .media .shots img {
  width: calc(50% - 6px); height: auto; object-fit: contain;
  border-radius: 10px; border: 1px solid var(--line);
}
.role-label { color: var(--accent) !important; font-weight: 700; margin: 6px 0 6px !important; font-size: 14px !important; }

/* ---------- small cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.grid.five { grid-template-columns: repeat(6, 1fr); }
.grid.five .card { grid-column: span 2; }
.grid.five .card:nth-child(n+4) { grid-column: span 3; }
@media (max-width: 900px) {
  .grid.five { grid-template-columns: repeat(2, 1fr); }
  .grid.five .card, .grid.five .card:nth-child(n+4) { grid-column: auto; }
  .grid.five .card:last-child { grid-column: span 2; }
}
@media (max-width: 600px) {
  .grid.five { grid-template-columns: 1fr; }
  .grid.five .card:last-child { grid-column: auto; }
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0 0 12px; color: #cfd3da; font-size: 14px; }

/* ---------- about / skills ---------- */
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.skills dt { color: var(--muted); font-size: 13px; margin-top: 14px; }
.skills dd { margin: 4px 0 0; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 13px; }

/* ---------- detail pages ---------- */
.detail { padding: 32px 0 64px; }
.detail h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.25; margin: 6px 0 10px; }
.detail h2 { font-size: 24px; margin: 56px 0 6px; }
.detail .sub { color: var(--muted); margin: 0 0 22px; }
.detail .lead { color: var(--muted); font-size: 17px; margin: 0 0 16px; }
.back { display: inline-block; font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact {
  font-size: 13px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); background: var(--surface);
}
.flyers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.flyers figure { margin: 0; }
.flyers img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.flyers figcaption { margin-top: 10px; font-size: 14px; color: #cfd3da; }
.figs { display: grid; gap: 28px; }
.figs figure { margin: 0; }
.fig-light { background: #fff; border-radius: var(--radius); padding: 12px; border: 1px solid var(--line); }
.fig-light img { width: 100%; height: auto; display: block; }
.figs figcaption { margin-top: 10px; font-size: 14px; color: #cfd3da; }
.diagram {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; max-width: 560px; margin: 0 auto;
}
.diagram svg { width: 100%; height: auto; display: block; }
/* スマホで図をタップしたときの、ダブルタップ拡大や強調表示を出さない */
.diagram { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.diagram .bx { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
.diagram .bx.hl { stroke: var(--accent); }
.diagram .bx.dash { fill: none; stroke-dasharray: 5 5; }
.diagram .ln { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.diagram .t1 { fill: var(--text); font-size: 15px; font-weight: 700; font-family: inherit; }
.diagram .t2 { fill: var(--muted); font-size: 12.5px; font-family: inherit; }
.diagram .t3 { fill: var(--accent); font-size: 12px; font-family: inherit; }
.mini { font-size: 15px; margin: 0 0 8px; color: var(--accent); }
.plain { margin: 0; padding-left: 18px; color: #cfd3da; font-size: 14px; }
.plain li { margin-bottom: 6px; }
.note { color: var(--muted); font-size: 13px; margin: 14px 0 0; }

/* ---------- gallery teaser (home) ---------- */
.teaser { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.teaser a {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: var(--text);
}
.teaser a:hover { border-color: var(--accent); text-decoration: none; }
.teaser img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.teaser span { display: block; padding: 10px 14px 12px; font-size: 14px; }
.more { margin: 24px 0 0; }

/* ---------- gallery ---------- */
.gal { columns: 3 260px; column-gap: 18px; }
.tile {
  display: block; break-inside: avoid; margin: 0 0 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: var(--text);
}
.tile:hover { border-color: var(--accent); text-decoration: none; }
.tile img { width: 100%; height: auto; display: block; }
.tile .cap { display: block; padding: 10px 14px 12px; font-size: 14px; }
.lb {
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  width: min(96vw, 960px); max-height: 94vh; overflow: auto;
}
.lb::backdrop { background: rgba(0, 0, 0, .82); }
.lb-img { background: #000; }
.lb-img img { display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto; margin: 0 auto; }
.lb-text { padding: 18px 22px 22px; }
.lb-title { margin: 0 0 8px; font-size: 18px; }
.lb-desc { margin: 0 0 12px; font-size: 14px; color: #cfd3da; }
.lb-credit { margin: 0 0 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.lb-credit a { color: var(--muted); text-decoration: underline; }
.lb-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.lb-btns .btn { background: transparent; cursor: pointer; font: inherit; font-size: 14px; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .work, .two { grid-template-columns: 1fr; }
  .work.flip .media { order: 0; }
  .work .body, .work.flip .body { padding: 22px; }
  .work .media { min-height: 200px; }
  .brand { white-space: nowrap; font-size: 15px; }
  nav a { margin-left: 8px; font-size: 12.5px; }
  nav a.lang { font-size: 11px; padding: 4px 8px; }
  .hero { padding: 0 20px 36px; }
  /* 狭い画面では、画像を文章の上に置いて、下の端を背景になじませる */
  .hero-art {
    position: relative; width: auto; margin: 0 -20px 8px; aspect-ratio: 16 / 9;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  }
  .hero-art::after { display: none; } /* 狭い画面では画像が文字の上にあるので、暗くしない */
}
@media (max-width: 350px) {
  .wrap { padding: 0 14px; }
  .hero { padding: 0 14px 36px; }
  .hero-art { margin: 0 -14px 8px; }
  nav a { margin-left: 8px; font-size: 12px; }
  nav a.lang { padding: 4px 7px; }
}

@media (max-width: 380px) {
  .brand { font-size: 14px; }
  nav a { margin-left: 6px; font-size: 12px; }
  nav a.lang { padding: 3px 7px; }
}
