/* ============================================
   生成AIハッカソン in 大阪 — Game Gallery
   ============================================ */

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

:root {
  --color-bg: #141018;
  --color-bg-elevated: #1a1620;
  --color-bg-card: #221e28;
  --color-surface: #2e2834;
  --color-border: rgba(255, 240, 245, 0.08);
  --color-border-hover: rgba(255, 200, 220, 0.18);
  --color-text: #f8f4f6;
  --color-text-secondary: #baaebe;
  --color-text-muted: #7e6e7c;
  --color-accent: #e8648c;
  --color-accent-glow: rgba(232, 100, 140, 0.20);
  --color-gold: #f0c850;
  --color-gold-glow: rgba(240, 200, 80, 0.12);
  --color-expo: #e06090;
  --color-judge: #50c8a0;
  --color-audience: #c080ff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  /* Gallery cream theme */
  --cream: #faf3e8;
  --cream-mid: #f5eadb;
  --white-card: #fffbf5;
  --text-dark: #2c1810;
  --text-mid: #5a4030;
  --text-light: #8a7060;
  --rose-pale: #f5d0d8;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.7;
  overflow-x: hidden;
}

/* --- Noise Texture Overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Layout --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

/* --- Typography --- */
.heading-xl {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.heading-lg {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.heading-md {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 600;
  line-height: 1.3;
}

.text-mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-muted {
  color: var(--color-text-muted);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.3rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-title {
  margin-bottom: 2rem;
}

.hero-title .line {
  display: block;
}

.hero-title .accent {
  background: linear-gradient(135deg, #f0708c, #e8648c, #d45080);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto 3.5rem;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.hero-meta-item {
  text-align: center;
}

.hero-meta-item .value {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}

.hero-meta-item .label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.6rem;
  letter-spacing: 0.06em;
}

.hero-meta-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--color-accent), transparent);
  opacity: 0.4;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 3s ease-in-out infinite;
}

.hero-scroll-indicator .arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-text-muted), transparent);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   EVENT INFO BAR
   ============================================ */
.event-bar {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 2rem 0;
  background: var(--color-bg-elevated);
}

.event-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 3rem;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.event-bar-inner .item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-bar-inner .item-icon {
  font-size: 1rem;
  opacity: 0.7;
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
  padding: clamp(5rem, 10vw, 10rem) 0;
}

.section-header {
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-description {
  color: var(--color-text-secondary);
  max-width: 600px;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ============================================
   STORY SECTION
   ============================================ */
#story {
  background: var(--color-bg);
  position: relative;
}

#story::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(232, 100, 140, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

#story .section-description {
  font-size: 1.1rem;
  line-height: 2;
  color: var(--color-text-secondary);
}

#winners {
  background: var(--color-bg-elevated);
}

#gallery {
  background: var(--cream);
  position: relative;
}

#gallery .section-label {
  color: var(--color-accent);
}

#gallery .section-title {
  color: var(--text-dark);
}

#gallery .section-description {
  color: var(--text-mid);
}

#voices {
  background: var(--color-bg-elevated);
  position: relative;
}

#voices::before {
  content: '';
  position: absolute;
  top: 0;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(232, 120, 160, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

#about {
  background: var(--color-bg-elevated);
}

/* --- Story Photos --- */
.story-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3.5rem;
}

@media (max-width: 680px) {
  .story-photos {
    grid-template-columns: 1fr;
  }
}

.story-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   AWARD WINNERS — FEATURED
   ============================================ */
.winners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .winners-grid {
    grid-template-columns: 1fr;
  }
}

.winner-card {
  position: relative;
  background: linear-gradient(165deg, var(--color-bg-card) 0%, #1c1824 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.4s var(--ease-out-expo),
              transform 0.4s var(--ease-out-expo),
              box-shadow 0.4s var(--ease-out-expo);
  cursor: pointer;
}

.winner-card:hover {
  border-color: color-mix(in srgb, var(--award-color) 30%, transparent);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2), 0 0 40px color-mix(in srgb, var(--award-color) 12%, transparent);
}

.winner-card[data-award="grand-prix"] { --award-color: var(--color-gold); }
.winner-card[data-award="expo"] { --award-color: var(--color-expo); }
.winner-card[data-award="judge"] { --award-color: var(--color-judge); }
.winner-card[data-award="audience"] { --award-color: var(--color-audience); }

/* award color top bar - thicker with glow */
.winner-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--award-color);
  box-shadow: 0 0 20px color-mix(in srgb, var(--award-color) 40%, transparent);
  z-index: 3;
}

/* subtle top-edge highlight */
.winner-card::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.06) 70%, transparent);
  z-index: 3;
}

.winner-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

/* gradient fade at bottom of image */
.winner-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to top, #1c1824, transparent);
  pointer-events: none;
  z-index: 1;
}

.winner-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s var(--ease-out-expo);
}

.winner-card:hover .winner-card-image img {
  transform: scale(1.06);
}

.winner-card-image .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 14, 24, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.winner-card:hover .play-overlay {
  opacity: 1;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  background: white;
  color: #0a0a0c;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.play-btn:hover {
  transform: scale(1.05);
}

.winner-card-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--award-color);
  background: color-mix(in srgb, var(--award-color) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--award-color) 20%, transparent);
  margin-bottom: 0.85rem;
}

.award-badge .icon {
  font-size: 0.9rem;
}

.winner-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.winner-card-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.winner-card-author {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.winner-card-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
  padding: 0.25rem 0.7rem;
  background: var(--color-surface);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ============================================
   GALLERY — ALL WORKS
   ============================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.55rem 1.25rem;
  background: transparent;
  border: 1px solid rgba(44, 24, 16, 0.15);
  border-radius: 100px;
  color: var(--text-mid);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--text-dark);
}

.filter-btn.active {
  background: var(--text-dark);
  border-color: var(--text-dark);
  color: var(--cream);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

@media (max-width: 680px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Gallery Card --- */
.game-card {
  position: relative;
  background: var(--white-card);
  border: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(44, 24, 16, 0.08);
  transition: transform 0.4s var(--ease-out-expo),
              box-shadow 0.4s var(--ease-out-expo);
  cursor: pointer;
  opacity: 0;
  animation: card-enter 0.6s var(--ease-out-expo) forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(44, 24, 16, 0.15), 0 0 0 2px var(--rose-pale);
}

.game-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--cream-mid);
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s var(--ease-out-expo), filter 0.6s var(--ease-out-expo);
}

.game-card:hover .game-card-image img {
  transform: scale(1.06);
}

.game-card-image .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44, 24, 16, 0.25);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.game-card:hover .play-overlay {
  opacity: 1;
}

.game-card-body {
  position: relative;
  padding: 1.25rem 1.5rem 1.5rem;
}

.game-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

.game-card-author {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.game-card-tool {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.25rem 0.65rem;
  background: var(--cream-mid);
  border: none;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

.game-card-tool[class*="Gemini"] {
  color: #3b7dd8;
}

/* award badge in gallery cards */
.game-card .award-badge {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* card hidden by filter */
.game-card.hidden {
  display: none;
}

/* ============================================
   VOICES SECTION
   ============================================ */
.voices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

@media (max-width: 768px) {
  .voices-grid {
    grid-template-columns: 1fr;
  }
}

.voice-card {
  position: relative;
  padding: 2rem 2.25rem;
  background: linear-gradient(165deg, var(--color-bg-card) 0%, #1c1824 100%);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-lg);
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.voice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 20px rgba(232, 100, 140, 0.06);
}

.voice-text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}

.voice-text::before {
  content: '\201C';
  font-size: 2rem;
  color: var(--color-accent);
  line-height: 0;
  vertical-align: -0.3em;
  margin-right: 0.15em;
}

.voice-cite {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.about-card {
  padding: 2.25rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.about-card .icon {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

.about-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.about-card p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 4rem 0;
  text-align: center;
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem 3rem;
  margin-bottom: 2.5rem;
}

.footer-logos span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.footer-text a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-text a:hover {
  color: var(--color-text);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out-expo),
              transform 0.5s var(--ease-out-expo);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 240ms; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  .hero-meta {
    gap: 1.5rem;
  }

  .hero-meta-item .value {
    font-size: 1.8rem;
  }

  .winners-grid {
    gap: 1rem;
  }

  .gallery-grid {
    gap: 1rem;
  }

  .filter-bar {
    gap: 0.4rem;
  }

  .filter-btn {
    font-size: 0.65rem;
    padding: 0.35rem 0.75rem;
  }
}
