/* ============================================================
   멍코치 — Component Library (PiCKCARE-style)
   ============================================================ */

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--pad-x); }
.container-wide { max-width: var(--max-wide); }
.section { padding-block: var(--s-15); }
.bg-pale { background: var(--pale-blue); }
.bg-white { background: var(--white); }
.eyebrow-row { display: flex; align-items: center; gap: var(--s-2); }
.divider-primary { width: 60px; height: 3px; background: var(--primary); border-radius: 2px; }
.divider-sm { width: 40px; height: 3px; background: var(--primary); border-radius: 2px; }
.hr-line { height: 1px; background: var(--border); border: none; margin: 0; }
.stack-1 { display: flex; flex-direction: column; gap: var(--s-1); }
.stack-2 { display: flex; flex-direction: column; gap: var(--s-2); }
.stack-3 { display: flex; flex-direction: column; gap: var(--s-3); }
.stack-4 { display: flex; flex-direction: column; gap: var(--s-4); }

/* ============================================================
   Buttons  (height 52, radius 14, padding-x 28)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding-inline: 28px; border-radius: 14px;
  font-family: var(--font-ko); font-size: 16px; font-weight: 600;
  white-space: nowrap; transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn-paw { width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.btn-primary .btn-paw { filter: brightness(0) invert(1); }
.btn-lg { height: 56px; padding-inline: 32px; font-size: 17px; }
.btn-lg .btn-paw { width: 22px; height: 22px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 8px 20px rgba(61,90,251,0.22); }

.btn-secondary { background: #fff; color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.btn-secondary:hover { background: var(--pale-blue); }
.btn-danger-line { background: #fff; color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.btn-danger-line:hover { background: var(--red-bg); }

.btn-yellow { background: var(--yellow); color: var(--ink); font-weight: 700; }
.btn-yellow:hover { background: var(--yellow-hover); }

.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--heading); }

.btn-ghost { height: auto; padding: 0; color: var(--primary); font-weight: 600; background: none; }
.btn-ghost:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.btn-ghost:active { transform: none; }

.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* round action button (search bar) */
.btn-round {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; transition: background var(--t-fast), transform var(--t-fast);
}
.btn-round:hover { background: var(--primary-hover); }
.btn-round:active { transform: scale(.92); }

/* ============================================================
   Card  (radius 20, 1px border, white)
   ============================================================ */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}
.card-pad { padding: var(--s-4); }
.card-pad-lg { padding: var(--s-6); }
.card-hover { transition: box-shadow var(--t-fast), transform var(--t-fast); }
.card-hover:hover { box-shadow: var(--sh-hover); transform: translateY(-2px); }

.card-light { background: var(--light-blue); border: none; border-radius: var(--r-card); color: var(--ink); }
.card-navy  { background: var(--navy); border: none; border-radius: var(--r-card); color: #fff; }

/* left accent bar */
.card-bar { position: relative; overflow: hidden; }
.card-bar::before { content:""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.card-bar-primary::before { background: var(--primary); }
.card-bar-yellow::before  { background: var(--yellow); }

/* ============================================================
   Chip  (pill, height 28, padding 6 14, 13/500)
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding-inline: 14px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.chip-default { border: 1px solid var(--border); color: var(--stone); background: #fff; }
.chip-primary { background: var(--light-blue); color: var(--primary-hover); }
.chip-primary-fill { background: var(--primary); color: #fff; }
.chip-yellow  { background: var(--yellow); color: var(--ink); }
.chip-emerald { border: 1px solid var(--emerald); color: var(--emerald); background: var(--emerald-bg); }
.chip-red     { border: 1px solid var(--red); color: var(--red); background: var(--red-bg); }
.chip-white   { background: #fff; color: var(--navy); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-lg { height: 34px; padding-inline: 18px; font-size: 14px; }

/* ============================================================
   Inline keyword emphasis  (Light Blue pill)
   ============================================================ */
.kw {
  display: inline; padding: 2px 12px; border-radius: var(--r-pill);
  background: var(--light-blue); color: var(--primary-hover); font-weight: 600;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.brand-font {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: 0;
}
.text-font {
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}
.kw.text-font {
  background: var(--primary);
  color: #fff;
}
.kw-text { color: var(--primary); font-weight: 600; }

/* ============================================================
   Search Bar  (signature component · height 64, full pill)
   ============================================================ */
.searchbar {
  display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 8px 8px 8px 24px; border-radius: var(--r-pill);
  background: #fff; border: 1px solid var(--primary);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%; position: relative;
}
.searchbar:hover, .searchbar:focus-within { border-width: 2px; box-shadow: var(--sh-search); padding-left: 23px; }
.sb-suggest {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 6px; margin: 0;
  box-shadow: 0 14px 34px rgba(15,30,51,0.14); max-height: 320px; overflow-y: auto; list-style: none;
}
.sb-suggest-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; cursor: pointer; }
.sb-suggest-item:hover { background: var(--pale-blue); }
.sb-sug-brand { font-size: 14px; font-weight: 700; color: var(--heading); }
.sb-sug-name { font-size: 12.5px; color: var(--stone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.searchbar .sb-spark { color: var(--primary); font-size: 18px; flex: 0 0 auto; }
.searchbar input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-family: var(--font-ko); font-size: 16px; color: var(--ink);
}
.searchbar input::placeholder { color: var(--stone); }

/* ============================================================
   Navigation Bar  (dark pill)
   ============================================================ */
.navpill {
  display: flex; align-items: center; gap: 4px;
  background: var(--navy); border-radius: var(--r-pill);
  padding: 6px 8px; height: 56px;
}
.navpill a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--r-pill);
  color: rgba(255,255,255,0.82); font-size: 15px; font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
}
.navpill a:hover { background: rgba(255,255,255,0.10); color: #fff; }
.navpill a.active { background: var(--primary); color: #fff; }
.nav-dd-trigger { font-weight: 700; background: var(--primary); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.25); }
.nav-dd-trigger span { display: inline-block; transform: translateY(-6px); }
.nav-dd-trigger:hover { background: var(--primary-hover); color: #fff; }
.navpill a.cta { background: var(--primary); color: #fff; }
.navpill a.cta:hover { background: var(--primary-hover); }

/* nav dropdown */
.nav-dd { position: relative; }
.nav-dd-menu { position: absolute; top: calc(100% + 10px); left: 0; min-width: 180px; z-index: 70;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 6px;
  box-shadow: 0 12px 32px rgba(15,30,51,0.16); display: flex; flex-direction: column; gap: 2px; }
.nav-dd-menu[hidden] { display: none; }
.nav-dd-menu button { display: block; width: 100%; text-align: left; height: 42px; padding: 0 14px;
  border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink); background: transparent; transition: background var(--t-fast), color var(--t-fast); }
.nav-dd-menu button:hover { background: var(--pale-blue); color: var(--primary-hover); }

/* ============================================================
   Wordmark  (giant brand footer)
   ============================================================ */
.wordmark {
  font-family: var(--font-num); font-weight: 900; letter-spacing: -0.03em;
  line-height: 0.8; color: var(--primary); white-space: nowrap;
}

/* ============================================================
   Stat row  (Light Blue cards)
   ============================================================ */
.stat-row { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 140px;
  background: var(--light-blue); border-radius: var(--r-stat); padding: 20px;
}
.stat-card .stat-num { display: block; color: var(--heading); }
.stat-card .stat-label { font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--stone); margin-top: 6px; }

/* ============================================================
   Range bar  (nutrient cards)
   ============================================================ */
.range {
  position: relative; height: 6px; border-radius: 3px; background: var(--border); overflow: visible;
}
.range .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; width: 0; transition: width 900ms var(--ease); }
.range .fill.emerald { background: var(--emerald); }
.range .fill.red { background: var(--red); }
.range .fill.primary { background: var(--primary); }
.range .marker {
  position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; transform: translate(-50%,-50%); box-shadow: 0 0 0 3px currentColor;
}

/* progress bar */
.progress { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.progress .bar { height: 100%; background: var(--primary); border-radius: 3px; transition: width var(--t-med); }

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- continuous ambient motion (랜딩 부유 모션) ---- */
@keyframes mog-float       { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes mog-float-soft  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes mog-float-wm    { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-12px); } }
@keyframes mog-twinkle     { 0%, 100% { opacity: .35; transform: scale(.82) rotate(-8deg); } 50% { opacity: 1; transform: scale(1.18) rotate(18deg); } }

.hero-visual            { animation: mog-float 6s ease-in-out infinite; will-change: transform; }
.intro-char             { animation: mog-float 5.4s ease-in-out infinite .3s; will-change: transform; }
.feat-char              { animation: mog-float-soft 5s ease-in-out infinite .15s; will-change: transform; }
.preview-score .pc-char { animation: mog-float 5.8s ease-in-out infinite .5s; will-change: transform; }
.cta-char               { animation: mog-float 6.4s ease-in-out infinite .2s; will-change: transform; }
.hero-wm                { animation: mog-float-wm 9s ease-in-out infinite; }
.cta-wm                 { animation: mog-float-soft 8s ease-in-out infinite; }
.feat-center .spark.s1  { animation: mog-twinkle 3.2s ease-in-out infinite; }
.feat-center .spark.s2  { animation: mog-twinkle 2.6s ease-in-out infinite .8s; }

@media (prefers-reduced-motion: reduce) {
  .hero-visual, .intro-char, .feat-char, .preview-score .pc-char, .cta-char,
  .hero-wm, .cta-wm, .feat-center .spark.s1, .feat-center .spark.s2 { animation: none; }
}
