/* =====================================================================
   0. 디자인 토큰 (Design Tokens) - 🌙 다크 모드 강제 고정
   ===================================================================== */
:root {
  /* Base Colors (Dark Mode Fixed) */
  --ink: #F4F1FB;
  --head: #FFFFFF;
  --accent: #FF4623;
  --accent-rgb: 255, 70, 35;
  --accent-2: #0057FF;
  --accent-2-rgb: 0, 87, 255;
  --violet: #8B5CF6;
  
  --soft: #0F0C16;
  --soft-2: #1A1525;
  --paper: #15111E;
  --rule: #2A243A;
  --muted: #A098B5;

  /* Glassmorphism System (Dark Mode) */
  --glass-bg: rgba(20, 15, 30, 0.65);
  --glass-bg-strong: rgba(25, 20, 35, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);

  /* Geometry & Spacing */
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  /* Typography */
  --font-kr: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Fraunces', 'Pretendard Variable', serif;

  /* Premium Animation Curves */
  --ease-snappy: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F4F1FB;
    --head: #FFFFFF;
    --soft: #0F0C16;
    --soft-2: #1A1525;
    --paper: #15111E;
    --rule: #2A243A;
    --muted: #A098B5;

    --glass-bg: rgba(20, 15, 30, 0.65);
    --glass-bg-strong: rgba(25, 20, 35, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  }
}

/* =====================================================================
   1. 리셋 / 베이스
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; 
  font-family: var(--font-kr); 
  color: var(--ink); 
  background: var(--soft);
  -webkit-font-smoothing: antialiased; 
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; outline: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible { 
  outline: 3px solid var(--accent-2); 
  outline-offset: 4px; 
  border-radius: 8px; 
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--head); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.grain-overlay {
  position: fixed; inset: 0; z-index: 400; pointer-events: none;
  opacity: 0.045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.blob { 
  position: fixed; border-radius: 50%; filter: blur(90px); z-index: -1; 
  opacity: 0.28; transform: translateZ(0);
}
.blob-a { width: 520px; height: 520px; background: var(--accent); top: -160px; left: -140px; animation: drift-a 24s ease-in-out infinite; }
.blob-b { width: 460px; height: 460px; background: var(--accent-2); bottom: -180px; right: -120px; animation: drift-b 26s ease-in-out infinite; }
.blob-c { width: 380px; height: 380px; background: var(--violet); top: 38%; right: 8%; animation: drift-c 20s ease-in-out infinite; }

@keyframes drift-a { 0%,100% { transform: translate(0,0) scale(1) translateZ(0); } 50% { transform: translate(60px,40px) scale(1.12) translateZ(0); } }
@keyframes drift-b { 0%,100% { transform: translate(0,0) scale(1) translateZ(0); } 50% { transform: translate(-50px,-30px) scale(1.08) translateZ(0); } }
@keyframes drift-c { 0%,100% { transform: translate(0,0) scale(1) translateZ(0); } 50% { transform: translate(-40px,50px) scale(0.94) translateZ(0); } }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* =====================================================================
   2. 헤더
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 200; background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transform: translateZ(0);
}
.header-row { display: flex; align-items: center; gap: 20px; padding: 16px 24px; max-width: 1240px; margin: 0 auto; }
.logo { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--head); flex-shrink: 0; letter-spacing: -0.02em; }
.logo .dot { color: var(--accent); }

.search-form {
  flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border); border-radius: var(--radius-pill);
  padding: 10px 20px; transition: box-shadow var(--ease-snappy), border-color var(--ease-snappy);
}
.search-form:focus-within { box-shadow: 0 0 0 4px rgba(var(--accent-2-rgb), 0.16); border-color: var(--accent-2); }
.search-form .ai-mark { font-size: 16px; flex-shrink: 0; }
.search-form input { flex: 1; border: 0; background: transparent; outline: 0; font-size: 15px; color: var(--ink); font-family: inherit; font-weight: 500; }
.search-form input::placeholder { color: var(--muted); font-weight: 400; }
.search-form button { border: 0; background: transparent; color: var(--muted); font-size: 15px; flex-shrink: 0; transition: color 0.2s; }
.search-form button:hover { color: var(--accent-2); }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 14.5px; line-height: 1; padding: 12px 22px; border: 1px solid transparent;
  transition: transform var(--ease-snappy), box-shadow var(--ease-snappy), background var(--ease-snappy), filter var(--ease-snappy); 
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(var(--accent-rgb), 0.65); }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 14px 28px -8px rgba(var(--accent-rgb), 0.8); transform: translateY(-1px); }
.btn-ghost { background: var(--glass-bg-strong); color: var(--head); border-color: var(--glass-border); }
.btn-ghost:hover { background: var(--paper); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* =====================================================================
   3. 탭 내비게이션
   ===================================================================== */
.tab-nav {
  position: sticky; top: 71px; z-index: 190; background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--glass-border);
  transform: translateZ(0);
}
.tab-list { 
  max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; gap: 8px; 
  overflow-x: auto; scrollbar-width: none; position: relative; 
}
.tab-list::-webkit-scrollbar { display: none; }
.tab-btn {
  position: relative; display: flex; align-items: center; gap: 8px; border: 0; background: transparent;
  padding: 16px 20px; font-size: 15.5px; font-weight: 600; color: var(--muted); 
  white-space: nowrap; transition: color 0.3s ease;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn[aria-selected="true"] { color: var(--head); }
.tab-indicator {
  position: absolute; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent);
  transition: transform 0.4s var(--ease-smooth), width 0.4s var(--ease-smooth);
}

/* =====================================================================
   4. 공통 레이아웃
   ===================================================================== */
main { display: block; min-height: 75vh; }
.panel { display: none; padding: 40px 0 72px; }
.panel.active { display: block; animation: panel-in 0.5s var(--ease-smooth); }
@keyframes panel-in { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head.is-stacked { margin-top: 56px; }
.section-eyebrow { font-family: var(--font-display); font-style: italic; color: var(--accent); font-size: 14.5px; font-weight: 600; letter-spacing: 0.03em; margin-bottom: 6px; display: block; }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3vw, 32px); color: var(--head); letter-spacing: -0.01em; }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--radius-pill); 
  transition: background var(--ease-snappy), color var(--ease-snappy), border-color var(--ease-snappy), transform var(--ease-snappy), box-shadow var(--ease-snappy);
}
.chip:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.chip.is-active { background: var(--head); border-color: var(--head); color: #fff; box-shadow: 0 6px 16px rgba(36,27,58,0.2); }
.chip.is-active[data-role="interest"] { background: var(--accent); border-color: var(--accent); box-shadow: 0 6px 16px rgba(255,70,35,0.25); }

/* =====================================================================
   5. 히어로 (Hero Banner)
   ===================================================================== */
.hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 400px;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); margin-bottom: 36px;
  transform: translateZ(0);
}
.hero-slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1.1fr 0.9fr; opacity: 0; visibility: hidden; transition: opacity 1s var(--ease-smooth); }
.hero-slide.is-current { opacity: 1; visibility: visible; position: relative; }
.hero-copy { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.hero-eyebrow { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; background: rgba(var(--accent-rgb), 0.12); color: var(--accent); font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 0.02em; }
.hero-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4vw, 48px); color: var(--head); line-height: 1.15; letter-spacing: -0.02em; }
.hero-person { font-size: 15px; color: var(--muted); font-weight: 600; }
.hero-desc { font-size: 16px; color: var(--ink); line-height: 1.6; max-width: 48ch; opacity: 0.9; }
.hero-cta { margin-top: 12px; align-self: flex-start; padding: 14px 28px; font-size: 15px; }
.hero-visual { position: relative; overflow: hidden; }

/* 💡 히어로 썸네일은 고정 비율(커버) 유지 */
.hero-visual .thumb { position: absolute; inset: 0; border-radius: 0; transition: transform 6s linear; width: 100%; height: 100%; }
.hero-slide.is-current .hero-visual .thumb { transform: scale(1.05); } 
.hero-visual .thumb-emoji { font-size: 140px; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.25)); }

.hero-dots { position: absolute; left: 48px; bottom: 32px; display: flex; gap: 10px; z-index: 5; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(107,99,127,0.3); transition: background 0.3s ease, width 0.3s var(--ease-smooth); }
.hero-dot.is-current { background: var(--accent); width: 28px; border-radius: 5px; }

.hero-pause {
  position: absolute; right: 48px; bottom: 28px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong); color: var(--head); font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--ease-snappy); backdrop-filter: blur(8px);
}
.hero-pause:hover { background: var(--paper); transform: scale(1.08); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }


/* =====================================================================
   6. 벤토 그리드 카드 (💡 핀터레스트/Masonry 레이아웃 적용)
   ===================================================================== */
.bento { 
  column-count: 3; /* PC 3열 */
  column-gap: 24px; 
  width: 100%;
}

.card {
  break-inside: avoid; /* 단이 끊기지 않게 함 */
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 24px;
  position: relative; 
  background: var(--glass-bg-strong); 
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); 
  box-shadow: 0 12px 32px -16px rgba(36, 27, 58, 0.2); 
  overflow: hidden; 
  
  display: inline-block; /* 핀터레스트 레이아웃을 위한 블록 속성 */
  width: 100%;
  vertical-align: top;
  
  transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

.card:hover { 
  transform: translateY(-6px); 
  box-shadow: 0 24px 48px -12px rgba(36, 27, 58, 0.3); 
  z-index: 2;
}

/* 💡 이미지가 잘리지 않도록 자유로운 높이를 가지는 썸네일 컨테이너 */
.card .thumb { 
  position: relative; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  overflow: hidden; 
  background-color: #f8fafc; /* 여백 부분 채울 색상 */
  width: 100%;
}

/* 이미지가 없을 때 이모지를 보여주기 위한 최소 높이 */
.card .thumb:not(:has(.masonry-img)) {
  min-height: 200px;
}

/* 💡 원본 비율을 유지하며 폭 100%를 차지하는 반응형 이미지 */
.masonry-img {
  width: 100%;
  height: auto;
  display: block;
}

.thumb-emoji { font-size: 52px; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2)); transition: transform 0.4s var(--ease-smooth); }
.card:hover .thumb-emoji { transform: scale(1.1) rotate(2deg); }

.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--head); line-height: 1.35; letter-spacing: -0.01em; }
.card-meta { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.card-desc { font-size: 14px; color: var(--ink); line-height: 1.6; opacity: 0.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,0.04); }
.card-price { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--head); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; padding: 5px 10px; border-radius: var(--radius-pill); line-height: 1.2; text-transform: uppercase; }
.badge--accent { background: var(--accent); color: #fff; }
.badge--ai { background: rgba(var(--accent-2-rgb), 0.12); color: var(--accent-2); border: 1px solid rgba(var(--accent-2-rgb), 0.2); }
.badge--human { background: var(--soft-2); color: var(--head); border: 1px solid var(--rule); }
.badge--dday { background: var(--head); color: #fff; }
.badge--free { background: #12B76A; color: #fff; }
.badge--ghost { background: var(--soft-2); color: var(--muted); }

.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--soft-2); border: 1px solid var(--rule); font-size: 17px; transition: all var(--ease-snappy); color: var(--head); }
.icon-btn:hover { transform: scale(1.08); background: var(--paper); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }


/* =====================================================================
   7. 브리핑(리스트) 레이아웃
   ===================================================================== */
.briefing-headline { display: flex; flex-direction: column; min-height: 440px; }
.briefing-headline .thumb { flex: 1; aspect-ratio: auto; }
.briefing-headline .card-title { font-size: 26px; }

.briefing-list { display: flex; flex-direction: column; gap: 4px; }
.briefing-list-heading { font-style: normal; color: var(--head); margin-bottom: 16px; }
.briefing-item { display: flex; align-items: center; gap: 18px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 14px; transition: all var(--ease-snappy); box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
.briefing-item:hover { border-color: var(--accent); transform: translateX(4px); box-shadow: 0 8px 24px rgba(255,70,35,0.1); }
.briefing-main { flex: 1; min-width: 0; }
.briefing-title { font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.briefing-time { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* =====================================================================
   8. 반응형 레이아웃 (💡 모바일 2열 핀터레스트 대응)
   ===================================================================== */
@media (max-width: 900px) {
  .header-row { flex-wrap: wrap; }
  .search-form { order: 3; max-width: none; width: 100%; }
  
  /* 태블릿 2열 */
  .bento { column-count: 2; column-gap: 16px; }
  .card { margin-bottom: 16px; }

  .hero-slide { grid-template-columns: 1fr; }
  .hero-visual { min-height: 240px; order: -1; }
  .hero-dots { top: 190px; bottom: auto; left: 24px; }
  .hero-pause { top: 185px; bottom: auto; right: 24px; left: auto; }
}

@media (max-width: 560px) {
  /* 💡 모바일 환경에서 2열 핀터레스트 스크롤 지원 */
  .bento { 
    column-count: 2; 
    column-gap: 12px; 
  }
  .card { margin-bottom: 12px; }
  
  /* 모바일에서 카드 안의 요소들을 컴팩트하게 조절 */
  .card-body { padding: 12px; gap: 6px; }
  .card-title { font-size: 14px; line-height: 1.3; }
  .card-meta { font-size: 11px; }
  .card-desc { display: none; } /* 좁은 공간에 텍스트가 많으면 지저분해지므로 숨김 */
  .card-foot { padding-top: 10px; margin-top: 8px; }
  .card-price { font-size: 13px; }
  .icon-btn { width: 28px; height: 28px; font-size: 13px; }
  .badge { padding: 3px 6px; font-size: 9.5px; }

  .header-actions .btn span.btn-label-full { display: none; }
}

/* =====================================================================
   9. 푸터 · B2B CTA · 모달
   ===================================================================== */
.b2b-cta { margin-top: 24px; border-radius: var(--radius-lg); padding: 40px 48px; background: linear-gradient(135deg, #241B3A, #403060); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; position: relative; overflow: hidden; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4); }
.b2b-cta::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; background: radial-gradient(circle, rgba(255,70,35,0.6), transparent 70%); }
.b2b-cta h3 { font-family: var(--font-display); font-weight: 700; font-size: 26px; margin-bottom: 8px; position: relative; z-index: 1; color: #fff; }
.b2b-cta p { font-size: 15px; opacity: 0.85; max-width: 56ch; line-height: 1.5; position: relative; z-index: 1; color: #fff; }
.b2b-cta .btn-primary { background: #fff; color: #241B3A !important; box-shadow: 0 8px 24px rgba(0,0,0,0.2); flex-shrink: 0; position: relative; z-index: 1; transition: all 0.3s ease; border: none; }
.b2b-cta .btn-primary:hover { background: #F4F1FB; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.3); }

.site-footer { border-top: 1px solid var(--rule); padding: 40px 0 64px; color: var(--muted); font-size: 14px; }
.site-footer .foot-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer .foot-links { display: flex; gap: 20px; flex-wrap: wrap; font-weight: 500; }
.site-footer .foot-links a:hover { color: var(--head); }

@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; } .blob { animation: none; } }