/* home.css — 메인 페이지 전용. 시안 Main.html(PC), MainMobile.html(휴대폰). 값은 tokens.css 변수만 쓴다. */

/* ── 1. 첫 화면 ── */
.home-hero .wrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 56px 72px; align-items: center;
}
.home-hero { padding-top: 88px; padding-bottom: 104px; }
.hero-text { display: flex; flex-direction: column; gap: 28px; }
.hero-text h1 { font-size: clamp(36px, 4.4vw, 62px); line-height: 1.22; font-weight: 700; letter-spacing: -0.02em; }

/* 계측 패널 틀(.meter-panel, .panel-top)은 site.css */
.meter { padding: 24px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line-on-dark); }
.meter:last-child { border-bottom: 0; }
.meter-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.meter-label { display: flex; flex-direction: column; gap: 2px; }
.meter-label .mono { font-size: 13px; color: var(--on-dark-4); }
.meter-label > span:last-child { font-size: 15px; color: var(--on-dark-2); }
.meter-value { font-size: var(--fs-number); font-weight: 500; line-height: 1; white-space: nowrap; }
.meter-value small { font-size: 18px; color: var(--on-dark-4); margin-left: 8px; }
.is-flow .meter-value { color: var(--accent); }
.is-weight .meter-value { color: var(--on-dark-1); }
.is-temp .meter-value { color: var(--ice); }
.meter-gauge { display: flex; flex-direction: column; gap: 4px; }
.meter-gauge i { display: block; height: 3px; }
/* 눈금자 무늬: 그라데이션 예외 허용(CLAUDE.md) */
.meter-gauge b { display: block; height: 9px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0 1px, transparent 1px 10px); }
.is-flow .meter-gauge i { width: 61%; background: var(--accent); }
.is-weight .meter-gauge i { width: 34%; background: var(--on-dark-1); }
.is-temp .meter-gauge i { width: 22%; background: var(--ice); }

/* ── 2. 네 가지 문제 (.problem 은 site.css) ── */

/* ── 3. 핵심 기술 ── */
.tech-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.tech-step { background: var(--ink-900); color: var(--on-dark-1); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.tech-num { font-size: 15px; color: var(--accent); }
.tech-body { display: flex; flex-direction: column; gap: 14px; }
.tech-body h3 { font-size: 26px; font-weight: 700; }
.tech-body p { color: var(--on-dark-3); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { border: 1px solid rgba(255, 255, 255, 0.35); padding: 4px 10px; font-size: 13px; color: var(--on-dark-2); }

.tech-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.tech-table th, .tech-table td { text-align: left; padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tech-table thead th { padding-top: 14px; padding-bottom: 14px; border-bottom: 2px solid var(--text); font-weight: 600; }
.tech-table thead th:nth-child(1) { width: 22%; }
.tech-table thead th:nth-child(2) { width: 28%; }
.tech-table tr > :first-child { padding-left: 0; }
.tech-table tr > :last-child { padding-right: 0; }
.tech-table tbody th { font-weight: 600; }
.tech-table .what { color: var(--text-muted); }

/* ── 4. 매장 솔루션 ── */
.selftap-card { background: var(--white); border: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.selftap-card .ph { min-height: 380px; margin: 24px; }
/* 사진은 카드 높이를 늘리지 않고 오른쪽 글 높이에 맞춰 채운다(높이 0 + 칸 높이만큼 최소 높이) */
.selftap-card .photo { margin: 24px; width: calc(100% - 48px); height: 0; min-height: max(380px, calc(100% - 48px)); object-position: center 25%; }
.selftap-body { padding: 48px clamp(24px, 4vw, 56px); display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.selftap-body h3 { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.selftap-desc { font-size: var(--fs-lead); }
.num-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.num-list li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.num-list .mono { font-size: 14px; color: var(--text-muted); min-width: 20px; }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px; }
.prod-card { background: var(--white); border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.prod-card.is-soon { border-style: dashed; border-color: var(--line-dashed); }
.prod-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prod-card h3 { font-size: 22px; font-weight: 700; }
.prod-card .tag-soon { padding: 4px 10px; }
.prod-card p { font-size: 16px; color: var(--text-muted); flex-grow: 1; }
.prod-more { font-weight: 600; font-size: 15px; text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
@media (min-width: 768px) and (max-width: 1279px) {
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 4개가 3+1로 놓이지 않게 2×2 */
}

/* ── 5. 브랜드사 솔루션 ── */
#brand .brand-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 72px; align-items: center;
  grid-template-areas: "head panel" "features panel" "actions panel";
}
.brand-head { grid-area: head; gap: 24px; max-width: none; }
.brand-head .lead { max-width: 32em; }
.brand-features { grid-area: features; list-style: none; padding: 0; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.brand-features li { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); display: flex; gap: 16px; flex-wrap: wrap; }
.brand-features b { font-weight: 600; min-width: 132px; }
.brand-features span { color: var(--on-dark-3); }
.brand-actions { grid-area: actions; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
#brand .brand-more { color: var(--ice); }
.brand-panel { grid-area: panel; }
.cooler-row { display: flex; flex-direction: column; gap: 10px; padding: 18px 24px; border-bottom: 1px solid var(--line-on-dark); }
.cooler-row:last-child { border-bottom: 0; }
.cooler-row.is-alarm { background: var(--ink-700); }
.cooler-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cooler-name { font-size: 16px; }
.is-alarm .cooler-name { font-weight: 600; }
.cooler-state { display: flex; align-items: center; gap: 16px; }
.cooler-temp { font-size: 20px; color: var(--ice); }
.is-alarm .cooler-temp { color: var(--alarm); font-weight: 500; }
.cooler-note { font-size: 14px; color: var(--on-dark-2); }
/* 상태 표시(.status)는 site.css */

@media (max-width: 1023px) {
  #brand .brand-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "features" "actions" "panel"; }
}

/* ── 6. 숫자 ── */
#numbers { padding-top: 88px; padding-bottom: 88px; }
#numbers .wrap { gap: 40px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 24px; }
@media (min-width: 768px) and (max-width: 1179px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 4개가 3+1로 놓이지 않게 2×2 */
}
.stat { border-top: 2px solid var(--text); padding-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.stat-value { font-size: var(--fs-number); font-weight: 500; line-height: 1.15; }
.stat-value small { font-size: 18px; margin-left: 6px; }
.stat-value.is-placeholder { font-size: 30px; border: 1px dashed var(--line-dashed); padding: 6px 12px; align-self: flex-start; }
.stat-desc { color: var(--text-muted); font-size: 16px; }

/* ── 7. 기술·개발 사례 ── */
.case-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 24px; }
.case-card { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; }
.case-card .ph { border-width: 0 0 1px; }
.case-card .photo { height: 240px; border-bottom: 1px solid var(--line); } /* 자리표시(.ph 최소 240px)와 같은 높이 */
.case-body { padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.case-meta { font-size: 13px; color: var(--text-muted); }
.case-body h3 { font-size: 24px; font-weight: 700; }
.case-body p { font-size: 16px; color: var(--text-muted); }

/* ── 휴대폰 (MainMobile.html) ── */
@media (max-width: 767px) {
  .home-hero { padding-top: 48px; padding-bottom: 56px; }
  .home-hero .wrap { gap: 40px; }
  .hero-text { gap: 22px; }
  .hero-text h1 { font-size: 34px; line-height: 1.28; }
  .home-hero .btn-row { gap: 10px; }

  .meter { padding: 18px; }
  .meter-row { align-items: center; flex-wrap: nowrap; gap: 12px; }
  .meter-label .mono { font-size: 12px; }
  .meter-label > span:last-child { font-size: 14px; }
  .meter-value small { font-size: 14px; margin-left: 6px; }

  #problems .wrap, #tech .wrap, #store .wrap, #cases .wrap { gap: 28px; }
  .sec-head { gap: 10px; }

  .tech-steps { gap: 12px; }
  .tech-step { padding: 20px; flex-direction: row; gap: 16px; align-items: flex-start; }
  .tech-num { font-size: 26px; font-weight: 500; line-height: 1.1; min-width: 20px; }
  .tech-body { gap: 4px; }
  .tech-body h3 { font-size: 19px; }
  .tech-body p { font-size: 15px; }

  /* 표 → 세로 목록 */
  .tech-table, .tech-table tbody, .tech-table tr, .tech-table th, .tech-table td { display: block; }
  .tech-table thead { display: none; }
  .tech-table { border-top: 2px solid var(--text); }
  .tech-table tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .tech-table th, .tech-table td { padding: 0; border: 0; }
  .tech-table tbody th { display: inline; font-size: 16px; }
  .tech-table .what { display: inline; font-size: 16px; }
  .tech-table .what::before { content: " · "; }
  .tech-table td:last-child { font-size: 15px; color: var(--text-muted); margin-top: 2px; }

  .selftap-card { display: flex; flex-direction: column; }
  .selftap-card .ph { margin: 0; min-height: 200px; border-width: 0 0 1px; font-size: 13px; }
  .selftap-card .photo { margin: 0; width: 100%; height: auto; min-height: 0; aspect-ratio: 3 / 2; border-bottom: 1px solid var(--line); }
  .selftap-body { padding: 24px 20px; gap: 12px; }
  .selftap-body h3 { font-size: 26px; }
  .selftap-desc { font-size: 16px; }

  .prod-list { list-style: none; padding: 0; background: var(--white); border: 1px solid var(--line); }
  .prod-list li + li { border-top: 1px solid var(--line); }
  .prod-list a { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: var(--text); }
  .prod-list svg { flex-shrink: 0; }
  .prod-text { display: flex; flex-direction: column; gap: 2px; }
  .prod-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
  .prod-title .tag-soon { font-size: 11px; padding: 2px 8px; }
  .prod-short { font-size: 14px; color: var(--text-muted); }

  #brand .brand-grid { gap: 32px; grid-template-areas: "head" "panel" "actions"; }
  .brand-head { gap: 16px; }
  .brand-head .lead { font-size: 16px; }
  .brand-actions { gap: 10px; align-items: stretch; flex-direction: column-reverse; }
  .brand-actions .btn { width: 100%; }
  #brand .brand-more { justify-content: center; align-self: stretch; }
  .brand-panel .cooler-row { padding: 14px 18px; gap: 6px; }
  .brand-panel .cooler-row.is-alarm { order: -1; }   /* 휴대폰 시안: 이상 매장이 맨 위 */
  .brand-panel .panel-top { order: -2; }
  .cooler-state { gap: 12px; }
  .cooler-temp { font-size: 18px; }
  .status { font-size: 12px; padding: 2px 10px; min-width: 0; }
  .status--alarm { padding: 3px 10px; gap: 5px; }
  .cooler-note { font-size: 13px; }

  #numbers { padding-top: 56px; padding-bottom: 56px; }
  #numbers .wrap { gap: 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .stat { padding-top: 12px; gap: 4px; }
  .stat-value { font-size: 28px; }
  .stat-value small { font-size: 14px; margin-left: 4px; }
  .stat-value.is-text { font-size: 24px; line-height: 1.35; }
  .stat-value.is-placeholder { font-size: 22px; line-height: 1.3; padding: 2px 8px; }
  .stat-desc { font-size: 14px; }

  .case-grid { gap: 0; border-top: 2px solid var(--text); }
  .case-card { background: none; border: 0; border-bottom: 1px solid var(--line); }
  .case-body { padding: 16px 0; gap: 2px; }
  .case-meta { font-size: 12px; }
  .case-body h3 { font-size: 18px; font-weight: 600; }
}
