/* 配色はアイコンイラスト由来: 瞳の赤 / 髪の青黒 / 肌の藤白 */
:root {
  --bg: #000;
  --bg-alt: #0f0e17;
  --panel: #181724;
  --border: #2d2b40;
  --text: #f4f0fa;
  --text-dim: #b3b0c9;
  --neon-red: #e8101f;
  --neon-red-soft: #ff5560;
  --neon-crimson: #8c0914;
  --wine-red: #5c1420;
  --font-display: 'Dela Gothic One', sans-serif;
  --font-body: 'Zen Kaku Gothic New', sans-serif;
  --radius: 4px;
  --slant: -12deg;
  --content: 1060px;
  --header: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
  scrollbar-width: thin;
  scrollbar-color: var(--wine-red) var(--bg-alt);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--wine-red), var(--neon-crimson));
  border-radius: 6px;
  border: 2px solid var(--bg-alt);
}
::-webkit-scrollbar-thumb:hover { background: var(--neon-crimson); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 900; line-height: 1.25; font-feature-settings: 'palt'; }

a { color: inherit; text-decoration: none; }

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ページ内リンクの移動先に移したフォーカスは、枠を表示しない */
section[tabindex="-1"]:focus { outline: none; }

.placeholder-text { color: var(--text-dim); }

/* Loading screen */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

.loading-screen.hidden { opacity: 0; pointer-events: none; }

.loading-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.loading-text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.3em;
  color: var(--neon-red);
  animation: loading-blink 1s steps(2, start) infinite;
}

@keyframes loading-blink { 50% { opacity: 0.35; } }

/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 100; background: #000; }

.navbar {
  max-width: calc(var(--content) + 40px);
  height: var(--header);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-name { font-family: var(--font-display); font-size: 1.55rem; }
.brand-i { color: var(--neon-red); }
.brand-sub { font-size: 0.78rem; font-weight: 700; color: var(--text-dim); }

.nav-links { list-style: none; display: flex; gap: 32px; margin: 0; padding: 0; }

.nav-links a {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="true"] { border-bottom-color: var(--neon-red); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  min-width: 44px;
  height: 44px;
  border-radius: var(--radius);
  cursor: pointer;
}

/* Hero: 動画全体の上に、左下寄せで名前を大きく重ね、下に向かって黒くする */
/* 動画と文字を同じマスに重ねる。画面が狭く文字のほうが高いときは、下の黒地まで伸びる */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: #000;
}

.hero > * { grid-area: 1 / 1; }

.hero-stage {
  position: relative;
  align-self: start;
  width: 100%;
  height: min(56.25vw, calc(100vh - var(--header)));
}

.hero-stage::after {
  content: '';
  position: absolute;
  inset: 0 0 -1px;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 35%, rgba(0, 0, 0, 0.65) 70%, #000 100%);
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  /* 画面の両端まで広げる。画面が16:9より横長の場合は、上下が少し切れる */
  object-fit: cover;
}

.hero-content {
  position: relative;
  align-self: end;
  justify-self: center;
  width: 100%;
  max-width: calc(var(--content) + 40px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #fff;
  padding: 32px 20px 48px;
}

.hero-id { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }

.hero-avatar {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
}

.hero-team { margin: 0; font-size: 1rem; font-weight: 900; }

.hero-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4rem, 11vw, 8rem);
  line-height: 1.1;
  margin: 0 0 20px;
}

.hero-alt { display: block; font-size: max(1.4rem, 0.24em); line-height: 1.4; }

.hero-record { margin: 0 0 28px; font-size: 1.15rem; font-weight: 900; font-variant-numeric: tabular-nums; }

.hero-name, .hero-team, .hero-record { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8); }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--radius);
  font-weight: 900;
  transition: box-shadow 0.15s;
}

.btn-primary { background: var(--neon-red); color: #fff; }
.btn-secondary { background: #fff; color: #000; }
.btn-primary:hover { box-shadow: 5px 5px 0 #fff; }
.btn-secondary:hover { box-shadow: 5px 5px 0 var(--neon-red); }

/* Scroll reveal: fill-mode は backwards にして、表示後の hover 等に影響させない */
.reveal-on [data-reveal="up"]:not(.is-visible),
.reveal-on [data-reveal="title"]:not(.is-visible),
.reveal-on [data-reveal="stagger"]:not(.is-visible) > * { opacity: 0; }

[data-reveal="up"].is-visible { animation: reveal-up 0.7s var(--ease) backwards; }

/* 見出しは左から入り、赤線が後から伸びる */
[data-reveal="title"].is-visible { animation: reveal-left 0.6s var(--ease) backwards; }
[data-reveal="title"].is-visible span::after { animation: reveal-line 0.5s 0.3s var(--ease) backwards; }

[data-reveal="stagger"].is-visible > * { animation: reveal-up 0.6s var(--ease) backwards; }
[data-reveal="stagger"].is-visible > :nth-child(2) { animation-delay: 0.08s; }
[data-reveal="stagger"].is-visible > :nth-child(3) { animation-delay: 0.16s; }
[data-reveal="stagger"].is-visible > :nth-child(4) { animation-delay: 0.24s; }
[data-reveal="stagger"].is-visible > :nth-child(5) { animation-delay: 0.32s; }
[data-reveal="stagger"].is-visible > :nth-child(n + 6) { animation-delay: 0.4s; }

@keyframes reveal-up { from { opacity: 0; translate: 0 32px; } }
@keyframes reveal-left { from { opacity: 0; translate: -40px 0; } }
@keyframes reveal-line { from { scale: 0 1; } }

/* Sections */
.section { max-width: calc(var(--content) + 40px); margin: 0 auto; padding: 104px 20px; }
.section-wide { max-width: none; }
.section-wide > * { max-width: var(--content); margin-left: auto; margin-right: auto; }

.section-title {
  display: block;
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  margin-top: 0;
  margin-bottom: 40px;
}

.section-title span { position: relative; display: inline-block; }

/* 英字の見出しは、日本語の見出しと太さと大きさが揃って見える書体にする */
.section-title-latin { font-family: 'Montserrat', var(--font-body); font-weight: 800; }

/* 実績はページの主役として、背景・見出し・余白を大きくする */
.section-feature { background: var(--bg-alt); padding-top: 128px; padding-bottom: 128px; }
.section-feature .section-title { font-size: clamp(3rem, 8vw, 5.4rem); margin-bottom: 52px; }
.section-feature .section-title span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 100%;
  height: 10px;
  background: var(--neon-red);
}

/* ニュースとSNSは小さな見出しで控えめにする */
.section-minor { padding-top: 56px; padding-bottom: 56px; }
.section-minor .section-title { font-size: 1.15rem; margin-bottom: 20px; color: var(--text-dim); }

.section-note { color: var(--text-dim); font-size: 0.9rem; margin-top: -16px; margin-bottom: 16px; }

/* 所属の移り変わりを1列に並べ、現在のチームだけ少し大きくして赤線を引く */
.career-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 0;
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
}

.career-flow li { display: flex; align-items: baseline; }
.career-flow li + li::before { content: '→'; margin: 0 12px; color: var(--text-dim); font-size: 0.9rem; }

.career-team { color: var(--text-dim); font-size: 1.05rem; font-weight: 700; white-space: nowrap; }

.career-flow .is-current .career-team {
  border-bottom: 3px solid var(--neon-red);
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.5;
}

.career-now { margin-left: 8px; font-size: 0.8rem; color: var(--text-dim); }

.profile-bio {
  max-width: 28em;
  margin: 0 0 56px;
  word-break: auto-phrase;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.75;
  text-wrap: pretty;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 32px 24px;
  margin: 0;
}

.profile-facts div { border-top: 1px solid var(--border); padding-top: 12px; }
.profile-facts dt { font-size: 0.75rem; color: var(--text-dim); }
.profile-facts dd { margin: 2px 0 0; font-size: 1.1rem; font-weight: 700; line-height: 1.5; }

/* Achievements: 見出し + 4行を表示し、残りはスクロール */
.table-wrap {
  background: #000;
  border-radius: var(--radius);
  max-height: 396px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-color: var(--wine-red) #000;
}

.table-wrap::-webkit-scrollbar-track { background: #000; }
.table-wrap::-webkit-scrollbar-thumb { border-color: #000; }

.achievements-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.achievements-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 44px;
  padding: 0 24px;
  background: #000;
  border-bottom: 2px solid var(--text);
  color: var(--text-dim);
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
}

.achievements-table td {
  height: 88px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
}

.achievements-table tbody tr:hover { background: var(--panel); }

.achievements-table td:first-child { width: 160px; color: var(--text-dim); font-size: 0.9rem; }

.achievements-table td:last-child,
.achievements-table th:last-child { width: 160px; text-align: right; }

.event-series, .event-name { display: block; line-height: 1.45; }
.event-series { font-size: 0.75rem; color: var(--text-dim); }
.event-name { font-size: 1.3rem; font-weight: 700; }

.result {
  display: inline-block;
  min-width: 108px;
  padding: 4px 10px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* 順位が分かるように 1位は赤、2位は白で塗る */
.result[data-place="1"], .result[data-place="2"] { transform: skewX(var(--slant)); }
.result[data-place="1"] { background: var(--neon-red); color: #fff; }
.result[data-place="2"] { background: var(--text); color: #000; }

.empty-row td { color: var(--text-dim); text-align: center; padding: 30px; }

/* News */
.news-list { list-style: none; margin: 0; padding: 0; }

.news-item {
  display: flex;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  font-size: 0.95rem;
}

.news-date { flex: 0 0 120px; color: var(--neon-red-soft); font-weight: 900; font-size: 0.85rem; }

/* Clips: 1本を大きく見せ、残りは画面幅いっぱいに流す */
.section-wide > .clip-feature { margin-bottom: 16px; }
.clip-feature .clip-card { width: 100%; margin: 0; }
.clip-feature .clip-info { padding: 18px 24px 20px; }
.clip-feature .clip-title { font-size: 1.5rem; }
.clip-feature .clip-thumb::after { left: 20px; bottom: 20px; width: 64px; height: 46px; font-size: 1.1rem; }

.section-wide > .clip-marquee {
  max-width: none;
  margin: 0 -20px;
  overflow: hidden;
}

.clip-track {
  display: flex;
  width: max-content;
  animation: clip-scroll 34s linear infinite;
  padding: 8px 0;
}

@keyframes clip-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--marquee-shift, 50%))); }
}

/* hover で位置を動かすと動画プレビューが再生と停止を繰り返すため、位置は変えない */
.clip-card {
  display: block;
  flex: 0 0 360px;
  width: 360px;
  margin-right: 16px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  border-bottom: 5px solid var(--bg-alt);
  transition: border-color 0.15s;
}

.clip-card:hover { border-bottom-color: var(--neon-red); }

.clip-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  overflow: hidden;
}

.clip-thumb-img, .clip-thumb-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 映像を隠さないよう、再生マークは左下に小さく置く */
.clip-thumb::after {
  content: '▶';
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 28px;
  background: var(--neon-red);
  color: #fff;
  font-size: 0.75rem;
  border-radius: var(--radius);
  transition: opacity 0.2s ease;
}

.clip-card:hover .clip-thumb::after,
.clip-card.is-playing .clip-thumb::after { opacity: 0; }

.clip-info { padding: 14px 18px 16px; }

.clip-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.5;
  margin: 0;
}

.clip-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.clip-sub { margin: 2px 0 0; font-size: 0.8rem; color: var(--text-dim); }

/* Links: ロゴとアカウント名を横に並べる */
.link-grid { display: flex; flex-wrap: wrap; gap: 8px 48px; }

.link-card { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }

.link-icon { display: grid; place-items: center; width: 24px; color: #fff; font-size: 1.2rem; }
.link-icon svg { width: 22px; height: 22px; fill: currentColor; }

.link-handle { font-size: 0.95rem; font-weight: 700; overflow-wrap: anywhere; text-underline-offset: 5px; }

.link-card:hover .link-handle { text-decoration: underline; text-decoration-color: var(--neon-red); text-decoration-thickness: 2px; }

/* Back to top */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 84px;
  height: 84px;
  border-radius: var(--radius);
  border: none;
  padding: 0;
  overflow: hidden;
  background: var(--neon-red);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top.has-image { background: none; }
.back-to-top.has-image .back-to-top-icon { display: none; }
.back-to-top img { width: 100%; height: 100%; object-fit: cover; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px max(20px, calc((100% - var(--content)) / 2)) 120px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.site-footer p { margin: 0 0 6px; }
.site-footer .footer-copy { padding-top: 16px; }
.footer-policy a { text-decoration: underline; overflow-wrap: anywhere; }
.footer-policy a:hover { color: var(--neon-red-soft); }

/* Responsive */
@media (max-width: 520px) {
  .hero-cta { flex-direction: column; align-self: stretch; gap: 14px; }
}

@media (max-width: 640px) {
  /* 動画の上半分が見えるように、文字は下寄りから始める */
  .hero-content { padding-top: 34vw; }
  .section { padding: 72px 20px; }
  .section-minor { padding: 44px 20px; }
  .link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
  .clip-feature .clip-info { padding: 14px 18px 16px; }
  .clip-feature .clip-title { font-size: 1.25rem; }
  .clip-feature .clip-thumb::after { left: 12px; bottom: 12px; width: 46px; height: 34px; font-size: 0.85rem; }
  .event-name { font-size: 1.1rem; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #000;
    flex-direction: column;
    gap: 0;
    border-bottom: 3px solid var(--neon-red);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 14px 20px; border-bottom: 0; border-left: 4px solid transparent; }
  .nav-links a[aria-current="true"] { border-left-color: var(--neon-red); }

  .career-flow { margin-bottom: 40px; }
  .news-item { flex-direction: column; gap: 4px; }
  .news-date { flex-basis: auto; }
  .clip-card { flex-basis: 280px; width: 280px; margin-right: 12px; }


  .table-wrap { max-height: 470px; }
  .achievements-table thead { display: none; }
  .achievements-table, .achievements-table tbody { display: block; }
  .achievements-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "date result" "name name";
    align-content: center;
    gap: 8px 12px;
    min-height: 114px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  .achievements-table td { height: auto; padding: 0; border: 0; }
  .achievements-table td:first-child { grid-area: date; width: auto; align-self: center; }
  .achievements-table td:nth-child(2) { grid-area: name; }
  .achievements-table td:last-child { grid-area: result; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loading-text { animation: none; }
  .reveal-on [data-reveal],
  .reveal-on [data-reveal] > * { opacity: 1 !important; animation: none !important; }
  [data-reveal="title"] span::after { animation: none !important; }
}
