/* ============================================
   강태곰 Homepage - Design System
   Warm & Cozy Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  /* Warm Color Palette */
  --bg-primary: #FFF8F0;
  --bg-secondary: #FFFDF7;
  --bg-card: #FFFFFF;
  --bg-footer: #4E342E;

  --accent-coral: #FF8A65;
  --accent-coral-light: #FFAB91;
  --accent-coral-dark: #E64A19;
  --accent-warm-yellow: #FFD54F;
  --accent-warm-pink: #F48FB1;
  --accent-soft-green: #A5D6A7;

  --text-primary: #4E342E;
  --text-secondary: #6D4C41;
  --text-muted: #8D6E63;
  --text-light: #BCAAA4;
  --text-on-dark: #FFF8F0;

  --border-light: #F5E6D8;
  --border-medium: #E8D5C4;

  --shadow-soft: 0 2px 16px rgba(78, 52, 46, 0.06);
  --shadow-medium: 0 4px 24px rgba(78, 52, 46, 0.1);
  --shadow-hover: 0 8px 32px rgba(78, 52, 46, 0.14);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  --font-kr: 'Noto Sans KR', sans-serif;
  --font-en: 'Outfit', sans-serif;

  --header-height: 72px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-kr);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.lang-en {
  font-family: var(--font-en);
}

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

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

ul,
ol {
  list-style: none;
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: box-shadow var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-soft);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.logo-link:hover {
  opacity: 0.8;
}

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--accent-coral);
  background: rgba(255, 138, 101, 0.08);
}

.nav-link.active {
  color: var(--accent-coral);
  background: rgba(255, 138, 101, 0.12);
}

/* Language Selector */
.lang-selector {
  position: relative;
  margin-left: 12px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.lang-btn:hover {
  border-color: var(--accent-coral);
  color: var(--accent-coral);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  min-width: 150px;
  z-index: 100;
}

.lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
}

.lang-option:hover {
  background: rgba(255, 138, 101, 0.08);
  color: var(--accent-coral);
}

.lang-option.selected {
  color: var(--accent-coral);
  background: rgba(255, 138, 101, 0.06);
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ============================================
   HERO SECTION (HOME)
   ============================================ */
.hero-section {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 138, 101, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -15%;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 213, 79, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  margin: 0 auto 28px;
  box-shadow: var(--shadow-medium);
  transition: transform var(--transition-normal);
}

.hero-logo:hover {
  transform: scale(1.05) rotate(-2deg);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -1px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-normal);
}

.hero-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-coral-light);
}

.hero-badge .badge-icon {
  font-size: 1.2rem;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.content-section {
  padding: 80px 0;
}

.content-section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-warm-yellow));
  border-radius: 3px;
  margin: 0 auto;
}

/* ============================================
   GAME MEDIA SLIDER
   ============================================ */
.game-slider-container {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
}

.game-slider-viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-medium);
  background: #1a1a1a;
}

.game-slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.game-slide {
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
}

.game-slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.game-slide--video .game-slide-video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 */
  height: 0;
  overflow: hidden;
}

.game-slide--video .game-slide-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.game-slide-caption {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.game-slide-caption p {
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
  margin: 0;
}

/* Slider Navigation Buttons */
.game-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-fast);
  z-index: 10;
}

.game-slider-btn:hover {
  background: var(--accent-coral);
  color: #fff;
  border-color: var(--accent-coral);
  box-shadow: var(--shadow-hover);
  transform: translateY(-50%) scale(1.08);
}

.game-slider-prev {
  left: -24px;
}

.game-slider-next {
  right: -24px;
}

/* Slider Dot Indicators */
.game-slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.game-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.game-slider-dot:hover {
  background: var(--accent-coral-light);
  transform: scale(1.2);
}

.game-slider-dot.active {
  background: var(--accent-coral);
  width: 28px;
  border-radius: 5px;
}

/* Game Intro Text */
.game-intro-text {
  text-align: center;
  max-width: 720px;
  margin: 36px auto 0;
}

.game-intro-text p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

/* Team Slider */
.team-slider-wrapper {
  position: relative;
  margin-top: 32px;
}

.team-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 20px;
  -ms-overflow-style: none;
}

.team-slider::-webkit-scrollbar {
  height: 6px;
}

.team-slider::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 3px;
}

.team-slider::-webkit-scrollbar-thumb {
  background: var(--accent-coral-light);
  border-radius: 3px;
}

.team-slider::-webkit-scrollbar-thumb:hover {
  background: var(--accent-coral);
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-normal);
  flex: 0 0 260px;
  scroll-snap-align: start;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.team-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-fast);
  z-index: 10;
}

.team-slider-btn:hover {
  background: var(--accent-coral);
  color: white;
  border-color: var(--accent-coral);
  box-shadow: var(--shadow-hover);
}

.team-slider-prev {
  left: -22px;
}

.team-slider-next {
  right: -22px;
}

/* --- 팀원 아바타 영역 수정 --- */
.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  /* 배경 그라데이션은 이미지가 없을 때를 대비해 유지하거나 삭제 가능 */
  background: linear-gradient(135deg, var(--accent-coral-light), var(--accent-warm-yellow));
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* ★ 중요: 이미지가 원 밖으로 나가지 않게 함 */
  border: 2px solid var(--border-light);
  /* 선택사항: 테두리 추가 */
}

/* --- 추가: 아바타 안에 들어갈 이미지 스타일 --- */
.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* ★ 중요: 이미지 비율을 유지하며 꽉 채움 */
  display: block;
}

.team-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.team-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Policy / Terms Content */
.policy-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-soft);
  max-width: 860px;
  margin: 0 auto;
}

.policy-block {
  margin-bottom: 32px;
}

.policy-block:last-child {
  margin-bottom: 0;
}

.policy-block h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.policy-block p,
.policy-block li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.policy-block ul {
  padding-left: 20px;
  margin-top: 8px;
}

.policy-block li {
  position: relative;
  padding-left: 8px;
  margin-bottom: 6px;
}

.policy-block li::before {
  content: '•';
  color: var(--accent-coral);
  font-weight: 700;
  position: absolute;
  left: -12px;
}

.policy-note {
  background: rgba(255, 138, 101, 0.06);
  border-left: 3px solid var(--accent-coral);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 12px;
}

.policy-note p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-footer);
  color: var(--text-on-dark);
  padding: 48px 0 32px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.footer-desc {
  font-size: 0.88rem;
  color: var(--text-light);
  max-width: 300px;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  color: var(--text-light);
}

.footer-links a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-on-dark);
  opacity: 0.8;
  padding: 4px 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent-coral-light);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 0;
  margin-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(255, 248, 240, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-medium);
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition-normal);
    pointer-events: none;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
  }

  .lang-selector {
    margin-left: 0;
    width: 100%;
  }

  .lang-btn {
    width: 100%;
    justify-content: center;
  }

  .lang-dropdown {
    right: auto;
    left: 0;
    right: 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .content-section {
    padding: 56px 0;
  }

  .policy-content {
    padding: 24px;
  }

  .game-slider-container {
    margin: 0 -8px;
  }

  .game-slider-prev {
    left: 8px;
  }

  .game-slider-next {
    right: 8px;
  }

  .game-slider-btn {
    width: 40px;
    height: 40px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-logo {
    width: 90px;
    height: 90px;
  }

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

  .team-slider-btn {
    display: none;
  }

  .game-slider-btn {
    width: 34px;
    height: 34px;
  }

  .game-slider-prev {
    left: 4px;
  }

  .game-slider-next {
    right: 4px;
  }

  .team-card {
    flex: 0 0 220px;
  }

  .section-title {
    font-size: 1.6rem;
  }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* ============================================
   GAME START BUTTON (게임 시작 버튼)
   ============================================ */
.game-action-area {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
}

.game-page-btn {
  display: inline-block;
  padding: 16px 48px;
  background-color: var(--bg-footer);
  /* 곰돌이 테마의 갈색 */
  color: var(--text-on-dark);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
}

.game-page-btn:hover {
  background-color: var(--accent-coral);
  /* 마우스 올리면 코랄색으로 변경 */
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: #fff;
}

/* 모바일 화면 대응 */
@media (max-width: 768px) {
  .game-page-btn {
    width: 100%;
    max-width: 280px;
    padding: 14px 30px;
    font-size: 1.1rem;
  }
}