/* ============================================================
   따사룸 — Home page sections
   ============================================================ */

/* ---------------- Hero ---------------- */
.hero { padding-block: clamp(40px, 6vw, 80px); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero__title {
  font-size: clamp(27px, 4.6vw, 46px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
  max-width: 15em;
}
.hero__title .accent { color: var(--clay); }
.hero__sub {
  font-size: clamp(15.5px, 1.9vw, 18px);
  color: var(--ink-muted);
  line-height: 1.72;
  max-width: 26em;
  margin-bottom: 30px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero__media { position: relative; }
.hero__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: block;
}
.hero__media .media-slot { min-height: clamp(280px, 42vw, 480px); }
.hero__media-badge {
  position: absolute;
  left: 18px; bottom: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 60%;
}
.hero__media-badge b { color: var(--ink); }

/* ---------------- Concern cards ---------------- */
.concern-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.concern-card { padding: 28px; }
.concern-card .concern-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-weight: var(--fw-x);
  margin-bottom: 16px;
}
.concern-card h3 { font-size: 19px; margin-bottom: 10px; }
.concern-card p { font-size: 15px; color: var(--ink-muted); line-height: 1.7; }

/* ---------------- Product finder (wizard) ---------------- */
.finder { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.finder__bar { height: 5px; background: var(--paper-sunken); }
.finder__bar-fill { height: 100%; width: 25%; background: var(--sage); transition: width var(--dur) var(--ease); }
.finder__body { padding: clamp(28px, 4vw, 48px); }
.finder__step-meta { font-size: 13px; font-weight: var(--fw-bold); color: var(--sage-dark); letter-spacing: 0.04em; margin-bottom: 12px; }
.finder__q { font-size: clamp(22px, 3vw, 30px); margin-bottom: 28px; }
.finder__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.finder__option {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-2);
  background: var(--paper);
  font-size: 16px;
  font-weight: var(--fw-bold);
  color: var(--ink-soft);
  text-align: left;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.finder__option:hover { border-color: var(--sage); background: var(--sage-soft); }
.finder__option .dot {
  width: 20px; height: 20px; border-radius: var(--r-pill);
  border: 2px solid var(--line-2); flex: 0 0 auto;
}
.finder__nav { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; }
.finder__nav .spacer { flex: 1; }

/* finder result */
.finder__result-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.finder__result h3 { font-size: clamp(20px, 2.6vw, 26px); margin-bottom: 6px; }
.finder__result > p { color: var(--ink-muted); margin-bottom: 24px; }
.finder__rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.rec-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.rec-card .media-slot, .rec-card .media-img { border: none; border-radius: 0; border-bottom: 1px solid var(--line); }
.rec-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rec-card__body h4 { font-size: 17px; }
.rec-card__body .short { font-size: 13.5px; color: var(--ink-muted); }
.rec-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.rec-card__actions { display: grid; gap: 8px; margin-top: auto; padding-top: 8px; }
.finder__result-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------------- Categories ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cat-card { display: flex; flex-direction: column; overflow: hidden; }
.cat-card .media-slot, .cat-card .media-img { border: none; border-radius: 0; border-bottom: 1px solid var(--line); min-height: 200px; }
.cat-card .media-img { aspect-ratio: 4 / 3; min-height: 0; }
.cat-card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cat-card__body h3 { font-size: 21px; }
.cat-card__desc { font-size: 15px; color: var(--ink-muted); line-height: 1.65; }
.cat-card__meta { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; font-size: 13.5px; }
.cat-card__meta div { display: flex; gap: 8px; }
.cat-card__meta dt { color: var(--ink-faint); font-weight: var(--fw-bold); flex: 0 0 64px; }
.cat-card__meta dd { color: var(--ink-soft); margin: 0; }
.cat-card__actions { display: grid; gap: 8px; margin-top: auto; padding-top: 12px; }
.cat-card__actions .row { display: flex; gap: 8px; }
.cat-card__actions .row .btn { flex: 1; }

/* ---------------- Comparison ---------------- */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.compare-table th, .compare-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.compare-table thead th {
  position: sticky; top: 0;
  background: var(--paper-sunken);
  font-weight: var(--fw-x);
  color: var(--ink);
  font-size: 14.5px;
  z-index: 1;
}
.compare-table tbody th {
  font-weight: var(--fw-bold);
  color: var(--ink-muted);
  background: var(--card);
  position: sticky; left: 0;
  white-space: nowrap;
}
.compare-table .col-rowhead { background: var(--paper-sunken); }
.compare-table td { color: var(--ink-soft); }
.compare-yes { color: var(--sage-dark); font-weight: var(--fw-bold); }
.compare-no { color: var(--ink-faint); }
.compare-hint { display: none; }

.compare-cards { display: none; }

/* ---------------- Brand story ---------------- */
.brand__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.brand__media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }
.brand__media .media-img { border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; background: var(--paper-warm); }
.brand__media .b-banner { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.brand__media .b-kid { aspect-ratio: 1 / 1; }
.brand__media .media-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand__points { display: grid; gap: 4px; margin-top: 22px; }
.brand__point { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.brand__point:last-child { border-bottom: none; }
.brand__point .n { font-weight: var(--fw-x); color: var(--sage); font-size: 18px; flex: 0 0 28px; }
.brand__point h4 { font-size: 16.5px; margin-bottom: 4px; }
.brand__point p { font-size: 14.5px; color: var(--ink-muted); line-height: 1.6; }

/* ---------------- Safety / certificates ---------------- */
.cert-grid { display: block; }
.cert-summary {
  margin: 0 0 22px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.cert-summary img { width: 100%; height: auto; border-radius: var(--r-sm); display: block; }
.cert-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cert-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.cert-card .media-slot, .cert-card .media-img { border: none; border-radius: 0; border-bottom: 1px solid var(--line); aspect-ratio: auto; background: var(--card); }
.cert-card .media-img img { object-fit: contain; padding: 12px 12px 0; }
.cert-card__body { padding: 16px 18px; }
.cert-card__body h4 { font-size: 16px; margin-bottom: 6px; }
.cert-card__meta { font-size: 13.5px; color: var(--ink-muted); line-height: 1.8; }
.cert-card__meta b { color: var(--ink-soft); font-weight: var(--fw-bold); }

/* ---------------- Reviews ---------------- */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.review-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.review-card__body { padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.review-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-stars { color: #e0a93b; font-size: 16px; letter-spacing: 1px; }
.review-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.review-card__text { font-size: 14.5px; color: var(--ink-soft); line-height: 1.78; flex: 1; }
.review-card__foot {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.review-card__author { font-weight: var(--fw-bold); color: var(--ink); font-size: 14px; }
.review-card__meta { color: var(--ink-faint); font-size: 12.5px; }

/* ---------------- Support (customer center) ---------------- */
.support__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.support-card { padding: clamp(28px, 4vw, 40px); }
.support-card h3 { font-size: 20px; margin-bottom: 6px; }
.support-card .phone { font-size: clamp(30px, 4vw, 42px); font-weight: var(--fw-x); color: var(--ink); margin: 10px 0; letter-spacing: -0.01em; }
.support-card .phone a { color: var(--ink); }
.support-card .hours { font-size: 14.5px; color: var(--ink-muted); line-height: 1.8; margin-bottom: 20px; }
.support-card.support-card--talk { background: var(--sage-soft); border-color: #d6dcc7; display: flex; flex-direction: column; justify-content: center; }
.support-card--talk p { color: var(--ink-muted); margin-bottom: 20px; }

/* ---------------- Final CTA ---------------- */
.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(26px, 3.6vw, 42px); margin-bottom: 14px; color: #fff; }
.final-cta p { color: #c8c3b8; font-size: clamp(15px, 1.8vw, 18px); max-width: 620px; margin: 0 auto 30px; }
.final-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ============================================================
   Home responsive
   ============================================================ */
/* 히어로는 태블릿 구간에서 텍스트 폭이 좁아 제목이 과도하게 줄바뀜 →
   1024px 이하에서 1열로 전환해 텍스트가 충분한 폭을 갖도록 함 */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: clamp(24px, 4vw, 36px); }
  .hero__text { order: -1; }
  .hero__media .media-slot { min-height: clamp(240px, 38vw, 360px); }
}

@media (max-width: 920px) {
  .concern-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .brand__grid { grid-template-columns: 1fr; }
  .support__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* comparison → swipe cards */
  .compare-wrap { display: none; }
  .compare-cards {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
  }
  .compare-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
    padding: 20px;
  }
  .compare-card h3 { font-size: 18px; margin-bottom: 12px; }
  .compare-card dl { display: grid; gap: 0; }
  .compare-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .compare-card dt { color: var(--ink-faint); font-size: 13px; font-weight: var(--fw-bold); }
  .compare-card dd { margin: 0; color: var(--ink-soft); font-size: 13.5px; text-align: right; }
  .compare-hint { display: block; font-size: 13px; color: var(--ink-faint); margin-bottom: 12px; }
}

/* ============================================================
   반응형 타이포그래피 마감 (오버플로·줄바꿈·줄길이·소형 모바일)
   ============================================================ */

/* 본문 적정 줄 길이 유지 (em ≈ 한글 한 글자 폭) */
.section-head p { max-width: 36em; }
.concern-card p,
.cat-card__desc { max-width: 24em; }
.finder__result > p,
.summary__lead { max-width: 38em; }

/* 전화번호·숫자 줄바꿈/잘림 방지 */
.support-card .phone { white-space: nowrap; font-variant-numeric: tabular-nums; }
.support-card .phone a { white-space: nowrap; }

/* 카드 제목이 길어도 줄 수 균형 (행 높이는 grid가 정렬) */
.cat-card__body h3,
.concern-card h3,
.rec-card__body h4 { text-wrap: balance; }

/* 칩/배지가 좁은 화면에서 넘치지 않도록 */
.hero__trust .chip { font-size: clamp(12.5px, 1.4vw, 13.5px); }

/* 모바일: 히어로 텍스트 폭을 넓혀 어색한 조기 줄바꿈 방지 */
@media (max-width: 920px) {
  .hero__sub { max-width: 36em; }
  .hero__media-badge { max-width: 72%; }
}

/* 소형 모바일 360px 전후 */
@media (max-width: 400px) {
  .section { padding-block: clamp(44px, 12vw, 64px); }
  .finder__body { padding: 22px 18px; }
  .finder__q { font-size: clamp(19px, 5.4vw, 24px); }
  .finder__option { padding: 15px 16px; font-size: 15px; }
  .support-card .phone { font-size: clamp(26px, 8vw, 34px); }
  .concern-card, .cat-card__body { padding: 20px; }
}
