:root {
  --bg: #07090d;
  --surface: #0d1118;
  --text: #f4f7fb;
  --muted: #9ca6b5;
  --line: rgba(255, 255, 255, 0.13);
  --accent: #54e6ff;
  --accent-2: #6c74ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Inter", "Noto Sans JP", sans-serif;
}

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

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 28px 5vw;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.logo img {
  width: 58px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(84, 230, 255, 0.3));
}

nav {
  display: flex;
  gap: 34px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

nav a {
  transition: color 180ms ease;
}

nav a:hover {
  color: var(--accent);
}

.language-link {
  color: var(--accent);
}

.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: center;
  overflow: hidden;
  padding: 130px 10vw 90px;
}

.hero-video,
.hero-shade,
.hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  pointer-events: none;
}

.hero-video video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 233.34svh);
  height: max(100svh, 42.86vw);
  border: 0;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(1.08);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 5, 10, 0.95) 0%, rgba(2, 5, 10, 0.64) 48%, rgba(2, 5, 10, 0.15) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}

.hero-grid {
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: linear-gradient(90deg, black, transparent 72%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3em;
}

.eyebrow span {
  width: 38px;
  height: 2px;
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 28px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(58px, 9vw, 130px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.08em;
}

h1 strong,
h2 em {
  color: transparent;
  background: linear-gradient(120deg, var(--accent), #94a4ff);
  background-clip: text;
  font-style: normal;
}

.no-wrap {
  white-space: nowrap;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 38px;
  color: #c4ccd7;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  min-width: 175px;
  align-items: center;
  justify-content: center;
  padding: 16px 22px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
}

.button-primary {
  border-color: var(--accent);
  color: #051014;
  background: var(--accent);
}

.button-twitch {
  border-color: #a970ff;
  color: #fff;
  background: #9146ff;
  box-shadow: 0 0 28px rgba(145, 70, 255, 0.3);
}

.button-twitch:hover {
  background: #a970ff;
}

.button-ghost {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.06);
}

.scroll-hint {
  position: absolute;
  z-index: 2;
  right: 4vw;
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 14px;
  writing-mode: vertical-rl;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.scroll-hint i {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(var(--accent), transparent);
}

.section {
  position: relative;
  padding: 140px 10vw;
}

.section-label {
  margin-bottom: 75px;
  color: #6f7988;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.about {
  background:
    radial-gradient(circle at 80% 20%, rgba(84, 230, 255, 0.09), transparent 30%),
    var(--bg);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10vw;
  align-items: start;
}

h2 {
  margin-bottom: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(44px, 6vw, 86px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.07em;
}

.about h2 {
  font-size: clamp(40px, 5.5vw, 82px);
}

.about-copy {
  padding-top: 42px;
  color: var(--muted);
  font-size: 16px;
  line-height: 2.2;
}

.about-copy p + p {
  margin-top: 25px;
}

.game-archive {
  margin-top: 120px;
}

.game-archive-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.game-archive-heading p {
  margin: 0;
  color: #6f7988;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.game-archive-heading p:last-child {
  color: var(--muted);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.game-archive-heading span {
  color: var(--accent);
}

.game-gallery {
  display: grid;
  gap: 14px;
  width: calc(100% + 20vw);
  margin-left: -10vw;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.game-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: game-scroll 42s linear infinite;
  will-change: transform;
}

.game-track-reverse {
  animation-direction: reverse;
  animation-duration: 52s;
}

.game-shot {
  position: relative;
  width: clamp(230px, 24vw, 390px);
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.game-shot::after {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(84, 230, 255, 0.12), transparent 45%);
  content: "";
  pointer-events: none;
  transition: border-color 200ms ease;
}

.game-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
  filter: sepia(0.9) saturate(0.55) contrast(1.05) brightness(0.78);
  transition: opacity 250ms ease, filter 250ms ease, transform 350ms ease;
}

.game-shot:hover::after {
  border-color: rgba(84, 230, 255, 0.5);
}

.game-shot:hover img,
.game-shot:focus-within img {
  opacity: 1;
  filter: none;
  transform: scale(1.035);
}

@keyframes game-scroll {
  to {
    transform: translateX(calc(-50% - 7px));
  }
}

.twitch-link {
  color: #b88cff;
  font-weight: 700;
  border-bottom: 1px solid rgba(184, 140, 255, 0.5);
}

.tools {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.tools-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10vw;
  align-items: start;
}

.tools-heading > p {
  max-width: none;
  margin-bottom: 0;
  padding-top: 42px;
  color: var(--muted);
  font-size: 16px;
  line-height: 2.2;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 90px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.tool-card {
  position: relative;
  min-height: 350px;
  padding: 38px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 220ms ease, transform 220ms ease;
}

.tool-card:hover {
  z-index: 2;
  background: rgba(84, 230, 255, 0.06);
  transform: translateY(-8px);
}

.tool-number {
  color: #65707e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.tool-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 70px 0 32px;
  place-items: center;
  border: 1px solid rgba(84, 230, 255, 0.35);
  color: var(--accent);
  font-size: 22px;
  font-weight: 800;
}

.tool-card h3 {
  margin-bottom: 14px;
  font-size: 15px;
  letter-spacing: 0.1em;
  overflow-wrap: anywhere;
}

.tool-card p {
  max-width: 250px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.tool-link {
  position: absolute;
  right: 38px;
  bottom: 32px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.github-more {
  display: table;
  margin: 38px 0 0 auto;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  transition: transform 180ms ease;
}

.github-more:hover {
  transform: translateX(5px);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 38px 5vw;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
  color: #697382;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 28px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c7d0dc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: color 180ms ease, transform 180ms ease;
}

.social-link span {
  color: var(--text);
  font-size: 16px;
}

.social-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

@media (max-width: 800px) {
  .site-header {
    padding: 20px;
  }

  .logo img {
    width: 50px;
  }

  nav {
    display: none;
  }

  .hero {
    padding: 120px 24px 80px;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(2, 5, 10, 0.88), rgba(2, 5, 10, 0.48)),
      linear-gradient(0deg, var(--bg), transparent 45%);
  }

  h1 {
    font-size: clamp(54px, 18vw, 78px);
  }

  .about h2 {
    font-size: clamp(39px, 12.5vw, 62px);
  }

  .desktop-only {
    display: none;
  }

  .scroll-hint {
    display: none;
  }

  .section {
    padding: 90px 24px;
  }

  .section-label {
    margin-bottom: 48px;
  }

  .about-layout,
  .tools-heading,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .about-copy {
    padding-top: 0;
  }

  .tools-heading > p {
    padding-top: 0;
  }

  .game-archive {
    margin-top: 75px;
  }

  .game-archive-heading {
    display: block;
  }

  .game-archive-heading p:last-child {
    margin-top: 10px;
  }

  .game-gallery {
    width: calc(100% + 48px);
    margin-left: -24px;
    mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
  }

  .tool-grid {
    margin-top: 55px;
  }

  .tool-card {
    min-height: 290px;
  }

  .tool-icon {
    margin-top: 45px;
  }

  footer {
    padding: 28px 24px;
  }

  .footer-info p {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
