/* 린나이 충북대리점 홈페이지 — 메인 페이지 첫 시안 */

:root {
  --red: #d6001c;          /* 흰 바탕 대비 5.4:1 */
  --red-dark: #b00017;
  --red-tint: #fff5f6;
  --red-line: #f5d3d8;
  --ink: #1a1a1a;
  --ink-2: #4a4a4a;
  --line: #e4e4e6;
  --bg: #ffffff;
  --bg-muted: #f6f6f7;

  --radius: 14px;
  --radius-lg: 20px;
  --container: 1120px;
  --gutter: 16px;
  --cta-space: 80px;       /* 휴대폰 하단 버튼 영역 높이 (10 + 58 + 10 + 테두리) */

  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
          "Malgun Gothic", "맑은 고딕", "Noto Sans KR", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-bottom: calc(var(--cta-space) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  /* 하단 고정 버튼이 본문과 푸터를 가리지 않도록 같은 높이만큼 비워 둠 */
  padding-bottom: calc(var(--cta-space) + env(safe-area-inset-bottom));
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: var(--red); }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- 버튼 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
}

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

.btn-secondary { background: #fff; color: var(--ink); border-color: #c9c9cc; }
.btn-secondary:hover { border-color: var(--ink); }

/* 대리점 카카오톡 A/S 버튼: 노란 배경 + 어두운 글씨 (카카오 로고는 넣지 않음) */
.btn-kakao { background: #fee500; color: #191919; }
.btn-kakao:hover { background: #f2d900; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #3a3a3a; }

/* 좁은 폭에서 '라벨 / 번호'가 두 줄로 나뉘어도 단어가 깨지지 않도록 */
.btn-wrap { flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
.btn-wrap > span { white-space: nowrap; }

.btn-lg { min-height: 60px; padding: 14px 28px; font-size: 1.125rem; }

.btn-num {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .45);
  font-weight: 800;
  letter-spacing: .01em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }
.text-link .icon { width: 18px; height: 18px; }

/* ---------- 상단 ---------- */

.site-header {
  background: #fff;
  border-top: 4px solid var(--red);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 32px;
  padding-top: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 12px;
  color: var(--ink);
  text-decoration: none;
}
/* 공식 로고: 색·형태 그대로, 너비만 지정하고 높이는 원본 비율(586x148)을 따름 */
.brand-logo { display: block; flex: none; width: 88px; height: auto; }
.brand-text {
  display: flex;
  flex-direction: column;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  line-height: 1.3;
}
.brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.brand-sub { font-size: .9375rem; font-weight: 600; color: var(--ink-2); }

.site-nav {
  width: 100%;
  border-top: 1px solid var(--line);
}
.site-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav li { flex: 1; }
.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 6px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:hover { color: var(--red); }

/* 메뉴 4개: 좁은 휴대폰에서는 글자를 줄이지 않고 2x2로 배치 */
@media (max-width: 419px) {
  .site-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .site-nav a { min-height: 44px; }
}

.header-call { display: none; }

@media (min-width: 768px) {
  :root { --gutter: 32px; }

  /* 데스크톱·태블릿에서만 상단 고정 (휴대폰은 하단 버튼이 있으므로 고정하지 않음).
     768~1023px은 업체명 줄 + 메뉴 줄의 두 줄 헤더라 이동 위치를 더 내림 */
  html { scroll-padding-top: 152px; scroll-padding-bottom: 0; }
  .site-header { position: sticky; top: 0; z-index: 50; }

  .brand-logo { width: 110px; }
  .brand { gap: 14px; }
  .brand-text { padding-left: 14px; }
  .brand-name { font-size: 1.375rem; }
  .site-nav a { font-size: 1.0625rem; }
}

@media (min-width: 1024px) {
  html { scroll-padding-top: 96px; }

  .header-inner { flex-wrap: nowrap; padding-top: 0; min-height: 76px; }
  .brand { padding: 0; }
  .site-nav { width: auto; margin-left: auto; border-top: 0; }
  .site-nav ul { gap: 4px; }
  .site-nav li { flex: none; }
  .site-nav a { padding: 8px 14px; }
}

/* 상단 전화번호는 메뉴 4개와 겹치지 않는 1200px 이상에서만 표시 */
@media (min-width: 1200px) {
  .header-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 4px;
    color: var(--red);
    font-size: 1.1875rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
  }
  .header-call:hover { text-decoration: underline; }
  .header-call-label { color: var(--ink-2); font-size: .9375rem; font-weight: 700; }
}

/* ---------- 첫 화면 ---------- */

.hero { padding: 52px 0 64px; }

.hero-inner { display: grid; gap: 40px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--red);
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--red);
}

.hero h1 {
  margin-bottom: 22px;
  font-size: clamp(1.875rem, 8vw, 3.5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin-bottom: 22px;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 2.6vw, 1.3125rem);
  line-height: 1.75;
}

.hero-actions-label {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 700;
}

.hero-actions { display: grid; gap: 12px; }

.hero-as-link { min-height: 44px; margin-top: 12px; }

.hero-note {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: .9375rem;
}

/* 매장 사진 카드: 사진은 원본 비율(4:3) 그대로 전체를 보여주고, 업체명·주소는 사진 아래 텍스트로 */
.hero-photo {
  max-width: 560px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}
.hero-photo picture,
.hero-photo img { display: block; }
.hero-photo img { width: 100%; height: auto; }
.hero-photo figcaption {
  display: grid;
  gap: 2px;
  padding: 18px 20px 14px;
  border-top: 3px solid var(--red);
}
.hero-photo-name { font-size: 1.125rem; font-weight: 800; line-height: 1.5; }
.hero-photo-address { color: var(--ink-2); font-size: 1rem; }
.hero-photo .text-link { justify-self: start; min-height: 44px; margin-top: 2px; }

/* 첫 화면 구매 상담 버튼: 1줄 전화(묶음 전체 폭), 2줄 카카오톡 / 네이버 톡톡. 600px 미만은 세로 3줄 */
@media (min-width: 600px) {
  .hero-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; }
  .hero-actions .hero-call { grid-column: 1 / -1; }
  .hero-actions .btn { padding-left: 16px; padding-right: 16px; }
}

@media (min-width: 960px) {
  .hero { padding: 104px 0 112px; }
  .hero-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 64px;
  }

  /* 사진 칸이 넓어진 만큼, 960~1076px 폭에서도 제목이 두 줄을 유지하도록 */
  .hero h1 { font-size: clamp(2.75rem, 5.2vw, 3.5rem); }

  .hero-photo { max-width: none; box-shadow: 0 12px 32px rgba(0, 0, 0, .06); }
  .hero-photo figcaption { padding: 20px 24px 16px; }
}

/* ---------- 공통 섹션 ---------- */

.section { padding: 72px 0; }
.section-muted { background: var(--bg-muted); }

.section-head { max-width: 720px; margin-bottom: 36px; }

.section h2 {
  font-size: clamp(1.625rem, 5.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.section-lead { margin-top: 12px; color: var(--ink-2); font-size: 1.125rem; }

@media (min-width: 960px) {
  body { font-size: 1.125rem; }
  .section { padding: 112px 0; }
  .section-head { margin-bottom: 48px; }
}

/* ---------- 서비스 안내 ---------- */

.service-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-card {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.service-num {
  display: inline-block;
  margin-bottom: 16px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--red-tint);
  color: var(--red);
  font-size: .9375rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.service-card h3 {
  margin-bottom: 10px;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.service-card p { color: var(--ink-2); }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 28px;
  color: var(--ink-2);
  font-size: 1rem;
}
.notice .icon { width: 20px; height: 20px; margin-top: 4px; color: var(--red); }

/* 서비스 카드 4개: 넓은 화면 2x2, 좁은 화면 세로 */
@media (min-width: 768px) {
  .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

@media (min-width: 860px) {
  .service-card { padding: 36px 32px; }
}

/* ---------- 상담 안내 ---------- */

.consult-grid { display: grid; gap: 20px; }

.panel {
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}
.panel > h3 { margin-bottom: 20px; font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1.4; }
.panel-tint { border-color: var(--red-line); background: var(--red-tint); }
.panel-lead { margin: -8px 0 22px; color: var(--ink-2); }

.method-list { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }

.method {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.method:last-child { padding-bottom: 0; border-bottom: 0; }

.method-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red-tint);
  color: var(--red);
}

.method h4 { margin: 8px 0 4px; font-size: 1.1875rem; }
.method p { color: var(--ink-2); }
.method .method-phone { margin-top: 2px; color: var(--ink); font-size: 1.5rem; font-weight: 800; letter-spacing: .01em; }
.method .btn { width: 100%; margin-top: 14px; }

/* 좁은 화면에서는 아이콘 칸을 빼서 버튼 글자가 한 줄에 들어가도록 함 */
@media (max-width: 599px) {
  .method { grid-template-columns: minmax(0, 1fr); }
  .method-icon { display: none; }
  .method h4 { margin-top: 0; }
}

@media (min-width: 600px) {
  .method .btn { width: auto; }
}

.prep-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: prep;
}
.prep-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  counter-increment: prep;
}
.prep-list li::before {
  content: counter(prep);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}
.prep-list strong { display: block; font-size: 1.125rem; line-height: 1.5; margin-top: 4px; }
.prep-list span { display: block; color: var(--ink-2); }

.photo-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--red-line);
  color: var(--ink-2);
  font-size: 1rem;
}
.photo-note .icon { width: 20px; height: 20px; margin-top: 4px; color: var(--red); }

@media (min-width: 960px) {
  .consult-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }
  .panel { padding: 40px; }
}

/* ---------- A/S 안내 ---------- */

.section-divided { border-top: 1px solid var(--line); }

.as-grid { display: grid; gap: 20px; }

.as-card {
  display: flex;
  flex-direction: column;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}
.as-card h3 { margin-bottom: 12px; font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1.4; }
.as-card > p { color: var(--ink-2); }

.as-actions { display: grid; gap: 12px; margin-top: 24px; }
.as-actions .btn { width: 100%; padding-left: 16px; padding-right: 16px; }
.as-actions .icon { width: 20px; height: 20px; }

.as-note { margin-top: 14px; color: var(--ink-2); font-size: .9375rem; }

@media (min-width: 960px) {
  .as-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .as-card { padding: 40px; }
}

/* ---------- 매장 안내 ---------- */

.store-card {
  display: grid;
  gap: 32px;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.store-info { margin: 0; }
.store-info > div {
  display: grid;
  gap: 2px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.store-info > div:first-child { padding-top: 0; }
.store-info > div:last-child { padding-bottom: 0; border-bottom: 0; }
.store-info dt { color: var(--ink-2); font-size: .9375rem; font-weight: 600; }
.store-info dd { margin: 0; font-size: 1.125rem; font-weight: 700; }

@media (min-width: 600px) {
  .store-info > div { grid-template-columns: 7em minmax(0, 1fr); gap: 12px; }
  .store-info dt { font-size: inherit; }
}
.store-info dd a { text-decoration: none; }
.store-info dd a:hover { text-decoration: underline; }

.store-links { display: grid; gap: 12px; align-content: start; }
.store-links p { margin-bottom: 4px; color: var(--ink-2); }
.store-links .icon { width: 20px; height: 20px; }
.store-links .btn { padding-left: 16px; padding-right: 16px; }

/* 360px 미만: '네이버 지도에서 매장 보기' 버튼이 한 줄에 들어가도록 카드·버튼 좌우 여백만 줄임 */
@media (max-width: 359px) {
  .store-card { padding-left: 16px; padding-right: 16px; }
  .store-links .btn { padding-left: 12px; padding-right: 12px; }
}

@media (min-width: 960px) {
  /* 버튼 칸을 조금 넓혀 960~1279px에서도 지도 버튼이 한 줄에 들어가도록 */
  .store-card {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 40px;
    padding: 44px;
  }
  .store-links { padding-left: 32px; border-left: 1px solid var(--line); }
}

/* ---------- 하단 ---------- */

.site-footer {
  padding: 48px 0;
  background: #1f1f1f;
  color: #cfcfcf;
  font-size: .9375rem;
}
.site-footer a { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }

.footer-brand { margin-bottom: 14px; color: #fff; font-size: 1.125rem; font-weight: 800; }
.footer-brand span { margin-left: 6px; color: #cfcfcf; font-weight: 600; }

.footer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.footer-note { margin-bottom: 8px; color: #b8b8b8; }
.copyright { color: #9a9a9a; font-size: .875rem; }

/* ---------- 휴대폰 하단 상담 버튼 ---------- */

.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
}
/* 버튼 3개: 아이콘 위, 짧은 문구 아래 (320px에서도 글자 크기 유지) */
.mobile-cta .btn {
  flex-direction: column;
  gap: 2px;
  width: 100%;
  height: 58px;
  min-height: 0;
  padding: 6px 4px;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
}
.mobile-cta .icon { width: 20px; height: 20px; }

/* 폭이 좁은 휴대폰(360px 미만)에서 버튼 글자가 줄바꿈되지 않도록 */
@media (max-width: 374px) {
  .btn { gap: 8px; padding-left: 12px; padding-right: 12px; font-size: 1rem; }
  .btn-lg { padding-left: 14px; padding-right: 14px; font-size: 1rem; }
  .btn .icon { width: 20px; height: 20px; }
  .btn-num { padding-left: 8px; }
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .mobile-cta { display: none; }
}
