/* ===========================
   리셋 & 변수
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 포실이 팔레트 — 감자 황토색 */
  --posil:      #c8933b;   /* 포실이 본체색 */
  --posil-dk:   #8b6914;   /* 어두운 포실이 */
  --posil-lt:   #f0c97a;   /* 밝은 포실이 */
  --cream:      #fdf8f0;   /* 배경 크림 */
  --cream-alt:  #f7f0e6;   /* 섹션 교대 배경 */
  --card-bg:    #ffffff;
  --text:       #2a1f0e;
  --text-sub:   #7a6040;
  --border:     #e8d8c0;
  --radius:     20px;
  --shadow:     0 4px 20px rgba(139,105,20,0.10);
  --shadow-lg:  0 14px 48px rgba(139,105,20,0.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ===========================
   HEADER
=========================== */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(253, 248, 240, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--posil-dk);
}

.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 10px;
}

.nav { display: flex; gap: 36px; }

.nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-sub);
  transition: color 0.2s;
}

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

/* 햄버거 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--cream);
  border-top: 1px solid var(--border);
  padding: 8px 0 16px;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 13px 28px;
  font-weight: 600;
  color: var(--text-sub);
  transition: all 0.2s;
}

.mobile-nav a:hover {
  background: var(--cream-alt);
  color: var(--posil);
  padding-left: 36px;
}

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  background: linear-gradient(160deg, #f5e6c8 0%, #fdf8f0 55%, #e8f4e8 100%);
  padding: 72px 28px 100px;
  overflow: hidden;
}

/* 배경 점 장식 */
.hero-deco { position: absolute; inset: 0; pointer-events: none; }

.deco-dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.22;
}

.d1 { width: 280px; height: 280px; background: var(--posil-lt); top: -80px; right: -60px; }
.d2 { width: 160px; height: 160px; background: var(--posil); bottom: 80px; left: -50px; }
.d3 { width: 80px; height: 80px; background: #a8c8a0; top: 30%; left: 20%; }
.d4 { width: 50px; height: 50px; background: var(--posil-lt); top: 15%; left: 40%; }
.d5 { width: 120px; height: 120px; background: #c8e0c0; bottom: 20%; right: 20%; }

.hero-content {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

/* --- 텍스트 --- */
.hero-text { flex: 1; max-width: 520px; }

.hero-eyebrow {
  display: inline-block;
  background: rgba(200, 147, 59, 0.15);
  color: var(--posil-dk);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 20px;
  color: var(--text);
}

.highlight {
  background: linear-gradient(135deg, var(--posil), var(--posil-dk));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 36px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--posil), var(--posil-dk));
  color: #fff;
  padding: 15px 36px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 8px 28px rgba(200,147,59,0.45);
  transition: transform 0.22s, box-shadow 0.22s;
}

.btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(200,147,59,0.55);
}

/* --- 캐릭터 --- */
.hero-char {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.char-shadow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 24px;
  background: radial-gradient(ellipse, rgba(139,105,20,0.25) 0%, transparent 75%);
  border-radius: 50%;
}

.char-img {
  width: min(340px, 80vw);
  object-fit: contain;
  filter: drop-shadow(0 16px 36px rgba(139,105,20,0.2));
  animation: bob 3.6s ease-in-out infinite;
}

@keyframes bob {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* 웨이브 */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 72px;
}

/* ===========================
   STATS
=========================== */
.stats { padding: 56px 28px; }

.stats-inner {
  max-width: 700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 16px;
  text-align: center;
  transition: transform 0.25s;
}

.stat-card:hover { transform: translateY(-4px); }

.stat-num {
  display: block;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--posil);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-sub);
  font-weight: 500;
}

/* ===========================
   SECTIONS
=========================== */
.section { padding: 88px 28px; }
.section-alt { background: var(--cream-alt); }

.section-inner { max-width: 1100px; margin: 0 auto; }

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

.section-tag {
  display: inline-block;
  background: rgba(200,147,59,0.14);
  color: var(--posil-dk);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 900;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-sub);
  font-size: 1rem;
}

/* ===========================
   CARDS
=========================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}

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

/* 카드 썸네일 */
.card-thumb {
  background: var(--grad);
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.18));
}

.card-thumb-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
}

.card-thumb-clear {
  background: var(--cream-alt);
}

.card-thumb-clear::after { display: none; }

.card-thumb-img--lg {
  width: 110px;
  height: 110px;
  border-radius: 0;
  box-shadow: none;
}

.card-thumb-emoji {
  font-size: 3.2rem;
  position: relative;
  z-index: 1;
}

/* 카드 본문 */
.card-body { padding: 20px 20px 12px; flex: 1; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.card-name { font-size: 1.05rem; font-weight: 800; }

.chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.chip-new  { background: #e6f4ea; color: #2e7d32; }
.chip-web  { background: #e3eeff; color: #1a56db; }
.chip-soon { background: #fef3e2; color: #b45309; }

.card-desc {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 8px;
}

.card-version { font-size: 0.78rem; color: #bba080; }

/* 카드 하단 버튼 */
.card-footer {
  padding: 12px 20px 20px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-dl {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--posil), var(--posil-dk));
  color: #fff;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 4px 14px rgba(200,147,59,0.38);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-dl:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(200,147,59,0.48);
}

.btn-visit {
  background: linear-gradient(135deg, #388e3c, #2e7d32);
  box-shadow: 0 4px 14px rgba(56,142,60,0.38);
}

.btn-visit:hover {
  box-shadow: 0 8px 22px rgba(56,142,60,0.48);
}

.btn-disabled {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f0ece6;
  color: #b0997a;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: default;
  user-select: none;
}

.btn-ghost {
  padding: 11px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  color: var(--text-sub);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-ghost:hover {
  background: var(--cream-alt);
  border-color: var(--posil-lt);
  color: var(--posil-dk);
}

/* 빈 카드 */
.card-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 220px;
  border: 2px dashed var(--border);
  background: transparent;
  box-shadow: none;
  cursor: default;
  padding: 24px;
}

.card-empty:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--posil-lt);
  background: rgba(200,147,59,0.04);
}

.empty-posil {
  width: 80px;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.card-empty:hover .empty-posil { opacity: 1; }

.empty-msg {
  font-size: 0.88rem;
  color: var(--text-sub);
  text-align: center;
}

/* ===========================
   WALLPAPERS
=========================== */
.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.wp-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.wp-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.wp-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cream-alt);
}

.wp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.wp-card:hover .wp-img {
  transform: scale(1.04);
}

.wp-info {
  padding: 16px 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wp-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.wp-info .btn-dl {
  flex: 0 0 auto;
}

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

/* ===========================
   CONTACT
=========================== */
.contact-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 60px 52px;
  display: flex;
  align-items: center;
  gap: 52px;
}

.contact-posil img {
  width: 130px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(139,105,20,0.18));
  animation: bob 3s ease-in-out infinite;
}

.contact-title {
  font-size: 1.9rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.contact-desc {
  color: var(--text-sub);
  margin-bottom: 28px;
  font-size: 1rem;
  line-height: 1.75;
}

.contact-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.22s;
}

.btn-contact:hover {
  background: linear-gradient(135deg, var(--posil), var(--posil-dk));
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,147,59,0.4);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.65);
  padding: 48px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-posil {
  width: 52px;
  opacity: 0.9;
  border-radius: 14px;
  margin-bottom: 4px;
}

.footer-name {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--posil-lt);
}

.footer-copy { font-size: 0.85rem; }
.footer-love { font-size: 0.8rem; opacity: 0.55; }

/* ===========================
   반응형
=========================== */
@media (max-width: 768px) {
  .nav { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 48px 20px 88px; }

  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 28px;
  }

  .hero-text { max-width: 100%; }
  .btn-hero { width: 100%; justify-content: center; }
  .char-img { width: min(260px, 70vw); }
  .hero-title { font-size: 2.2rem; }

  .stats { padding: 40px 20px; }
  .stats-inner { gap: 12px; }

  .section { padding: 60px 20px; }
  .section-header { margin-bottom: 36px; }

  .cards-grid { grid-template-columns: 1fr; }

  .contact-wrap {
    flex-direction: column;
    padding: 36px 24px;
    gap: 24px;
    text-align: center;
  }

  .contact-btns { justify-content: center; }
  .btn-contact { flex: 1; justify-content: center; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .hero { padding: 32px 16px 80px; }
  .section { padding: 48px 16px; }

  .stats-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stat-card { padding: 20px 8px; }
  .stat-num { font-size: 1.6rem; }
  .stat-label { font-size: 0.72rem; }
}

/* ===========================
   진입 애니메이션
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.br-mobile { display: none; }

@media (max-width: 480px) {
  .br-mobile { display: block; }
}
