@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&family=Noto+Sans+JP:wght@400;700&display=swap');

:root {
  /* Colors */
  --bg-color-start: #0a0a0f;
  --bg-color-end: #12121a;
  --surface-color: rgba(26, 26, 46, 0.6);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text-main: #e8e8f0;
  --text-sub: #8888a8;
  --accent-start: #6366f1;
  --accent-end: #a855f7;
  --accent-hover: #818cf8;

  /* Typography */
  --font-family: 'Inter', 'Noto Sans JP', sans-serif;
  
  /* Layout */
  --max-width: 1200px;
  --spacing-base: 1rem;
  --section-padding: clamp(4rem, 10vw, 8rem);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(135deg, var(--bg-color-start), var(--bg-color-end));
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-attachment: fixed;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography Utilities */
.gradient-text {
  background: linear-gradient(to right, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 2rem;
  text-align: center;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-padding) 0;
}

/* Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--surface-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.logo-img {
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

/* Hero Section */
.hero {
  min-height: auto; /* 100vhを撤廃し、高さを35〜40%削減 */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding-top: 90px; /* ナビを避ける最小限の余白 */
  padding-bottom: 4rem; /* 下部の余白も最小限に */
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  background-position: center;
  z-index: -1;
  pointer-events: none;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-avatar {
  width: 440px;
  max-width: 90vw;
  height: auto;
  object-fit: contain;
  margin-top: -4rem; /* 画像自体が持つ上部の巨大な透明余白を相殺 */
  margin-bottom: calc(-8rem - 40px); /* さらに20px間隔を縮める（計40px） */
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -3px; /* より詰めてSaaSのようなソリッドな印象に */
  margin-bottom: 0;
  line-height: 1; /* 究極に詰める */
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-main);
  font-weight: 700;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero-desc {
  color: var(--text-sub);
  max-width: 550px; /* SaaSらしくテキストブロックを少しタイトに */
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
  line-height: 1.5; /* 行間を少し詰める */
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: var(--surface-color);
  color: var(--text-main);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Cards (Glassmorphism) */
.glass-card {
  background: var(--surface-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.4);
}

/* Games Section */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.game-card .game-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #2a2a40; /* placeholder bg */
}

.game-info {
  padding: 1.5rem;
}

.game-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.game-desc {
  color: var(--text-sub);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.game-card .btn {
  width: 100%;
}

/* Newsletter Section */
.newsletter-card {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.newsletter-card h2 {
  margin-bottom: 1rem;
}

.newsletter-card p {
  color: var(--text-sub);
  margin-bottom: 2rem;
}

/* About Section */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 2rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.skill-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-sub);
}

/* Links Section */
.links-grid {
  display: grid;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.link-card {
  display: flex;
  align-items: center;
  padding: 1.2rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
}

.link-card i {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: var(--text-sub);
  transition: color 0.3s ease;
}

.link-card:hover i {
  color: var(--accent-start);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--surface-border);
  color: var(--text-sub);
  font-size: 0.9rem;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding-top: 70px; /* スマホでは極限まで上へ */
    padding-bottom: 2rem;
  }

  .hero-avatar {
    width: 260px; /* モバイルでもブランドシンボルとして十分に大きく */
    margin-top: -3rem; /* 画像上部の透明余白を相殺 */
    margin-bottom: calc(-5.5rem - 40px); /* さらに20px間隔を縮める（計40px） */
  }

  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--surface-border);
  }

  .nav-links.active {
    display: flex;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .hero-buttons .btn {
    width: 100%;
  }
}
