:root {
  --bg: #f8f8f6;
  --text: #111;
  --muted: #999;
  --border: rgba(0,0,0,0.1);
  --glass: rgba(248,248,246,0.72);
  --glass-border: rgba(0,0,0,0.08);
  --glass-hover: rgba(248,248,246,0.88);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --text: #eee;
    --muted: #555;
    --border: rgba(255,255,255,0.08);
    --glass: rgba(10,10,10,0.68);
    --glass-border: rgba(255,255,255,0.07);
    --glass-hover: rgba(10,10,10,0.85);
  }
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── CANVAS ─── */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 3rem;
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.logo {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text);
  display: flex;       /* 中央寄せにしやすくする */
  align-items: center; /* 中央寄せにしやすくする */
}

/* ロゴ画像のための設定を新しく追加 */
nav .logo img {
  height: 40px;  /* ロゴの高さを指定（お好みで調整してください） */
  width: auto;   /* 横幅は自動で比率を維持 */
  display: block;
}

.nav-right {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── HERO ─── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 3rem 6rem;
  text-align: center;
}

.hero-inner {
  max-width: 640px;
}

.hero-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.hero-title {
  font-size: clamp(3.5rem, 9vw, 8.5rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.88;
  margin-bottom: 1.8rem;
  color: var(--text);
}

.hero-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 2.4rem;
}

.scroll-cue {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.scroll-cue::after {
  content: '';
  width: 1px;
  height: 36px;
  background: currentColor;
  opacity: 0.4;
  animation: scrollLine 1.6s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 0.4; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 0.4; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ── SECTION WRAPPER ─── */
.section-wrap {
  position: relative;
  z-index: 1;
}

/* ── GLASS PANEL ─── */
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

/* ── INNER CONTAINER ─── */
.inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── LIST ─── */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3rem 0 1.5rem;
  border-bottom: 2px solid var(--text);
}
.list-header-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.list-header-count {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.article-scroll-outer { position: relative; }
.article-scroll-outer::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4rem;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(to top, var(--bg) 5%, transparent 100%);
}
.article-scroll-wrap {
  height: calc(4.5 * 5.6rem);
  overflow-y: scroll;
  scrollbar-width: none;
}
.article-scroll-wrap::-webkit-scrollbar { display: none; }
.article-list { list-style: none; }

.article-item a {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 1.5rem;
  height: 5.6rem;
  padding: 0 0.2rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: background-color 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.article-item a::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--text);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.article-item a:hover {
  background: var(--glass-hover);
}
.article-item a:hover::before {
  transform: scaleY(1);
}
.article-num {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.article-center {
  display: flex; flex-direction: column; gap: 0.3rem;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.article-item a:hover .article-num { color: var(--text); transform: translateX(8px); }
.article-item a:hover .article-center { transform: translateX(10px); }
.article-title { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.article-meta { display: flex; gap: 0.75rem; align-items: center; }
.article-tag {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  transition: border-color 0.5s, color 0.5s;
}
.article-date { font-size: 0.68rem; color: var(--muted); transition: color 0.5s; }
.article-arrow {
  font-size: 0.9rem;
  color: var(--muted);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), color 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s;
  opacity: 0.5;
}
.article-item a:hover .article-arrow { transform: translateX(10px); color: var(--text); opacity: 1; }

.article-item.featured a {
  height: auto;
  min-height: 5.6rem;
  padding: 1.4rem 1.5rem;
  margin: 0.6rem 0;
  border: 2px solid var(--text);
  background: transparent;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  transition: background-color 0.6s cubic-bezier(0.22, 1, 0.36, 1), color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.article-item.featured a::before { display: none; }
.article-item.featured a:hover {
  background: var(--text);
  color: var(--bg);
}
.article-item.featured a:hover .article-center { transform: none; }
.article-item.featured a:hover .article-tag,
.article-item.featured a:hover .article-date,
.article-item.featured a:hover .article-arrow {
  color: var(--bg); border-color: var(--bg); opacity: 0.6;
}
.article-item.featured .article-title { font-size: 1.1rem; font-weight: 900; letter-spacing: -0.03em; }
.article-item.featured .featured-label {
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase; margin-bottom: 0.5rem; color: var(--muted);
}

/* ── SPACER ─── */
.spacer { height: 5rem; }

/* ── PROJECT SECTION ─── */
.project-section { padding: 5rem 0 4rem; }

.sec-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.sec-title {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 2rem;
}

/* ── GAME BANNER ─── */
.game-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  border: 1px solid rgba(70,110,170,0.18);
  overflow: hidden;
  background: linear-gradient(160deg, #f1f5fb 0%, #e5edf6 50%, #dde7f2 100%);
}
@media (prefers-color-scheme: dark) {
  .game-banner {
    background: linear-gradient(160deg, #0c1422 0%, #0a121e 100%);
    border-color: rgba(120,160,220,0.15);
  }
}
/* Blueprint grid overlay */
.game-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(70,120,200,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70,120,200,0.10) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0.2) 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0.2) 100%);
}
/* Sub-grid (fine) */
.game-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(70,120,200,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70,120,200,0.04) 1px, transparent 1px);
  background-size: 9.5px 9.5px;
  pointer-events: none;
  z-index: 1;
}
#game-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 2;
}

/* 3D COMING SOON — wireframe-style, semi-transparent */
.coming-soon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  perspective: 1400px;
  gap: 0.05em;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  user-select: none;
}
.cs-word {
  display: inline-flex;
  transform-style: preserve-3d;
}
.cs-word + .cs-word { margin-left: 0.45em; }

.cs-letter {
  display: inline-block;
  font-size: clamp(2.2rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(113, 131, 161, 0.507);
  line-height: 1;
  transform-style: preserve-3d;
  will-change: transform;
  -webkit-text-stroke: 1px rgba(100, 125, 165, 0.28);
  text-shadow:
    0 1px 0 rgba(100, 125, 165, 0.13),
    0 2px 0 rgba(100, 125, 165, 0.10),
    0 3px 0 rgba(100, 125, 165, 0.07),
    0 4px 0 rgba(100, 125, 165, 0.05),
    0 6px 12px rgba(60, 90, 140, 0.05);
}
@media (prefers-color-scheme: dark) {
  .cs-letter {
    color: rgba(180, 210, 255, 0.10);
    -webkit-text-stroke: 1.4px rgba(180, 210, 255, 0.5);
    text-shadow:
      0 1px 0 rgba(180, 210, 255, 0.22),
      0 2px 0 rgba(180, 210, 255, 0.17),
      0 3px 0 rgba(180, 210, 255, 0.12),
      0 4px 0 rgba(180, 210, 255, 0.08),
      0 6px 14px rgba(120, 160, 220, 0.18);
  }
}

/* Blueprint corner brackets on banner */
.banner-brackets {
  position: absolute;
  inset: 12px;
  z-index: 4;
  pointer-events: none;
}
.banner-brackets span {
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid rgba(45, 90, 170, 0.35);
}
@media (prefers-color-scheme: dark) {
  .banner-brackets span { border-color: rgba(180,210,255,0.35); }
}
.banner-brackets .tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.banner-brackets .tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.banner-brackets .bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.banner-brackets .br { bottom: 0; right: 0; border-left: none; border-top: none; }

.banner-stamp,
.banner-stamp-left {
  position: absolute;
  z-index: 4;
  font-family: monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(45, 90, 170, 0.45);
  text-transform: uppercase;
}
.banner-stamp      { bottom: 14px; right: 18px; }
.banner-stamp-left { top: 14px; left: 18px; }
@media (prefers-color-scheme: dark) {
  .banner-stamp, .banner-stamp-left { color: rgba(180,210,255,0.45); }
}

/* ── STATS ─── */
.stats-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  text-align: center;
}
.stat-num { font-size: 170%; font-weight: 900; letter-spacing: -0.04em; line-height: 1; margin-bottom: 0.4rem; }
.stat-label { font-size: 1.0rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  background: var(--glass);
  backdrop-filter: blur(14px);
}
.footer-logo { font-size: 0.85rem; font-weight: 900; letter-spacing: -0.02em; }
.footer-copy { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; }
.footer-contact a { font-size: 0.72rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-contact a:hover { color: var(--text); }

@media (max-width: 600px) {
  nav { padding: 1.2rem 1.5rem; }
  .hero { padding: 0 1.5rem 4rem; }
  .inner { padding: 0 1rem; }
  .stats-inner { grid-template-columns: 1fr; gap: 2rem; }
  footer { flex-direction: column; gap: 0.6rem; text-align: center; padding: 1.5rem; }
}
