/* GarageX PROFILE — スタッフ紹介ページ
   黒×赤。写真は「透過PNG」「黒背景PNG」どちらでも同じ見え方になるよう、
   写真の背面には何も敷かない（発光は写真の“上”にスクリーン合成で載せる）設計。 */

:root {
  --bg: #000;
  --ink: #fff;
  --muted: #8b8b90;
  --line: rgba(255, 255, 255, .12);
  --red: #e8102a;
  --red-lit: #ff3546;
  --jp: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  --en: "Barlow Condensed", "Noto Sans JP", sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.22, .8, .28, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--jp);
  font-weight: 500;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ── 背景レイヤー ───────────────────────────── */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.bg__glow {
  position: absolute; inset: -20% -10% auto -10%; height: 120vh;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(232, 16, 42, .30), transparent 68%),
    radial-gradient(40% 35% at 82% 12%, rgba(232, 16, 42, .16), transparent 70%);
  opacity: 1;
  transition: opacity .6s linear;
}
body.is-scrolled .bg__glow { opacity: 0; }

.bg__grid {
  position: absolute; inset: 0; height: 130vh;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 92px 92px;
  -webkit-mask-image: radial-gradient(72% 60% at 50% 22%, #000 0%, transparent 78%);
  mask-image: radial-gradient(72% 60% at 50% 22%, #000 0%, transparent 78%);
  opacity: 1;
  transition: opacity .6s linear;
}
body.is-scrolled .bg__grid { opacity: 0; }

.bg__noise {
  position: absolute; inset: 0;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 1; }

/* ── トップバー ───────────────────────────── */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 86px; padding: 0 var(--pad);
  transition: height .4s var(--ease);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0, 0, 0, 0); backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
}
body.is-scrolled .topbar {
  height: 62px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.topbar__back {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .06em; color: #d7d7da;
  transition: color .25s;
}
.topbar__back:hover { color: #fff; }
/* ← の線と矢じり。矢じりの先端を線の左端にぴったり合わせる */
.topbar__arrow {
  position: relative; width: 26px; height: 7px; flex: none;
  transition: width .25s var(--ease);
}
.topbar__arrow::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: currentColor;
}
.topbar__arrow::before {
  content: ""; position: absolute; left: 1px; top: 50%;
  width: 6px; height: 6px;
  border-left: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.topbar__back:hover .topbar__arrow { width: 34px; }
.topbar__logo { display: block; line-height: 0; }
.topbar__logo img {
  height: clamp(34px, 4.6vw, 54px); width: auto; display: block;
  transition: opacity .25s, height .4s var(--ease);
}
body.is-scrolled .topbar__logo img { height: clamp(26px, 3vw, 34px); }
.topbar__logo:hover img { opacity: .72; }

/* ── ヒーロー ───────────────────────────── */
.hero {
  min-height: 100svh; padding: 0 var(--pad);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative;
}
.hero__eyebrow {
  margin: 0 0 clamp(10px, 2vw, 22px);
  font-family: var(--en); font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: .55em; text-indent: .55em; color: var(--red-lit);
}
.hero__eyebrow span { position: relative; padding: 0 22px; }
.hero__eyebrow span::before, .hero__eyebrow span::after {
  content: ""; position: absolute; top: 50%; width: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--red));
}
.hero__eyebrow span::before { right: 100%; }
.hero__eyebrow span::after { left: 100%; transform: scaleX(-1); }

.hero__title {
  margin: 0; font-family: var(--en); font-weight: 700;
  font-size: clamp(76px, 19vw, 260px); line-height: .84;
  letter-spacing: .01em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff 28%, #9a9aa0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 18px 60px rgba(232, 16, 42, .35));
}
.hero__sub {
  margin: clamp(14px, 2.4vw, 30px) 0 0;
  font-size: clamp(13px, 1.4vw, 16px); letter-spacing: .12em; color: #b9b9be;
}
.hero__cue {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0;
  width: 1px; height: 64px; overflow: hidden; background: rgba(255, 255, 255, .12);
}
.hero__cue i {
  position: absolute; inset: 0; display: block;
  background: linear-gradient(180deg, transparent, var(--red-lit));
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ── メンバー ───────────────────────────── */
.members { padding-bottom: clamp(60px, 10vh, 120px); }

.member {
  position: relative;
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(56px, 11vh, 130px) var(--pad);
  max-width: 1480px; margin: 0 auto;
  scroll-margin-top: 60px;
}
.member + .member::before {
  content: ""; position: absolute; inset: 0 var(--pad) auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14) 30%, rgba(232, 16, 42, .5) 50%, rgba(255, 255, 255, .14) 70%, transparent);
  opacity: .55;
}
.member:nth-child(even) .member__visual { order: 2; }

/* 写真スタック — 背面には何も置かない */
.stack {
  position: relative; aspect-ratio: 4 / 5; width: 100%;
  max-width: 540px; margin-inline: auto;
  outline: none; cursor: pointer;
}
.stack__no {
  position: absolute; top: -2%; left: -1%; z-index: 3;
  font-family: var(--en); font-weight: 700; font-size: clamp(64px, 9vw, 150px);
  line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .22);
  pointer-events: none;
}
.member:nth-child(even) .stack__no { left: auto; right: -1%; }

.stack__shots { position: absolute; inset: 0; overflow: hidden; }
.shot {
  position: absolute; inset: 0;
  opacity: 0; transform: scale(1.03);
  transition: opacity .55s var(--ease), transform .8s var(--ease);
}
.shot.is-active { opacity: 1; transform: scale(1); }
/* 写真ごとの微調整（--x/--y は枠に対する%・--s は倍率） */
.shot img {
  width: 100%; height: 100%; display: block;
  object-fit: contain; object-position: center bottom;
  transform: translate(calc(var(--x, 0) * 1%), calc(var(--y, 0) * 1%)) scale(var(--s, 1));
  user-select: none;
}

.stack__dots {
  position: absolute; left: 0; right: 0; bottom: 2%; z-index: 4;
  display: flex; justify-content: center; gap: 7px;
}
.stack__dots i {
  width: 16px; height: 2px; background: rgba(255, 255, 255, .22);
  transition: background .4s var(--ease), width .4s var(--ease);
}
.stack__dots i.is-active { background: var(--red-lit); width: 26px; }

/* テキスト側 */
.member__body { position: relative; min-width: 0; }
.member__body::before {
  content: ""; position: absolute; inset: -12% -8% auto; height: 70%; z-index: -1;
  background: radial-gradient(45% 55% at 50% 45%, rgba(232, 16, 42, .13), transparent 72%);
  pointer-events: none;
}
.member__latin {
  margin: 0 0 6px; font-family: var(--en); font-weight: 600;
  font-size: clamp(12px, 1.2vw, 14px); letter-spacing: .42em; color: var(--red-lit);
}
.member__name {
  margin: 0 0 clamp(18px, 2.6vw, 30px);
  font-size: clamp(34px, 5.2vw, 64px); font-weight: 900; line-height: 1.12;
  letter-spacing: .01em;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
}
.member__role {
  font-family: var(--jp); font-size: clamp(11px, 1.1vw, 13px); font-weight: 700;
  letter-spacing: .16em; line-height: 1;
  padding: 8px 13px 7px; border: 1px solid var(--red);
  color: var(--red-lit); background: rgba(232, 16, 42, .08);
  transform: translateY(2px);
}

.member__quotes { display: grid; gap: clamp(14px, 2vw, 22px); margin-bottom: clamp(26px, 4vw, 44px); }
.quote { padding-left: 18px; border-left: 2px solid rgba(232, 16, 42, .55); }
.quote__label {
  margin: 0 0 2px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .2em; color: var(--muted);
}
.quote__text {
  margin: 0; font-size: clamp(14px, 1.5vw, 17px); line-height: 1.9; color: #ededf0;
}

/* パラメータ */
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(11px, 1.5vw, 16px); }
.stat__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 6px;
}
.stat__label { font-size: clamp(13px, 1.35vw, 15px); font-weight: 700; letter-spacing: .05em; }
.stat__val {
  font-family: var(--en); font-weight: 600; font-size: clamp(15px, 1.7vw, 19px);
  letter-spacing: .06em; color: #cfcfd4; font-variant-numeric: tabular-nums;
}
.stat.is-over .stat__val { color: var(--red-lit); }

.stat__track {
  position: relative; height: 5px; border-radius: 3px;
  background: rgba(255, 255, 255, .10); overflow: hidden;
}
.stat__fill {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, #a60d1f, var(--red) 55%, var(--red-lit));
  transition: width 2.4s cubic-bezier(.18, .78, .24, 1);
  transition-delay: calc(var(--d, 0) * 170ms);
}
.stats.is-in .stat__fill { width: calc(var(--pct) * 1%); }
.stat.is-over .stat__track { overflow: visible; }
.stat.is-over .stat__fill { box-shadow: 0 0 14px rgba(255, 53, 70, .85); }
.stat.is-over .stat__track::after {
  content: ""; position: absolute; right: -9px; top: 50%; translate: 0 -50%;
  width: 0; height: 0;
  border-left: 7px solid var(--red-lit);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  opacity: 0; transition: opacity .6s var(--ease);
  transition-delay: calc(var(--d, 0) * 170ms + 1.9s);
}
.stats.is-in .stat.is-over .stat__track::after { opacity: 1; }

/* ── 出口 ───────────────────────────── */
.outro {
  max-width: 980px; margin: 0 auto;
  padding: clamp(50px, 9vh, 100px) var(--pad) clamp(40px, 6vh, 70px);
  text-align: center; border-top: 1px solid var(--line);
}
.outro__btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 34px;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .12em;
  transition: background .3s var(--ease), border-color .3s var(--ease), color .3s;
}
.outro__btn:hover { background: var(--red); border-color: var(--red); color: #fff; }

.foot {
  padding: 28px var(--pad) 40px; text-align: center;
  font-family: var(--en); font-size: 12px; letter-spacing: .24em; color: #55555b;
}

/* ── スクロール演出 ───────────────────────── */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 1.3s var(--ease), transform 1.3s var(--ease);
  transition-delay: calc(var(--d, 0) * 150ms);
}
.reveal.is-in { opacity: 1; transform: none; }
.member__visual.reveal { transform: translateY(34px) scale(.985); }
.member__visual.reveal.is-in { transform: none; }

/* ── レスポンシブ ───────────────────────── */
@media (max-width: 900px) {
  .member {
    grid-template-columns: 1fr;
    gap: clamp(18px, 4vw, 30px);
    padding-block: clamp(48px, 8vh, 80px);
  }
  .member:nth-child(even) .member__visual { order: 0; }
  .member:nth-child(even) .stack__no { left: -1%; right: auto; }
  .stack { max-width: 460px; margin: 0 auto; }
  .member__name { font-size: clamp(30px, 8vw, 44px); }
  .hero__title { filter: drop-shadow(0 10px 34px rgba(232, 16, 42, .35)); }
}

@media (hover: none) {
  .stack { cursor: default; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .shot { transition: opacity .45s linear; transform: none; }
  .shot.is-active { transform: none; }
  .hero__cue i { animation: none; }
  .stat__fill { transition-duration: .3s; }
}
