/* 바닥코팅종류 — 인덱스/백과사전 컨셉: 비교표 + 소재 카드 그리드, 슬레이트 틸 x 옐로우 */

:root {
  --primary: #264653;
  --accent: #E9C46A;
  --ink: #1c2e33;
  --paper: #FBF8F1;
  --border: #d8d2c2;
  --card-bg: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

h1, h2 {
  font-family: "Song Myung", serif;
  color: var(--primary);
  letter-spacing: -0.01em;
}

a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

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

.table-scroll { overflow-x: auto; }

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 헤더 ---------- */
.site-header {
  background: var(--primary);
  border-bottom: 3px solid var(--accent);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.menu-toggle {
  width: 44px; height: 44px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span {
  width: 20px; height: 2px;
  background: var(--accent);
}

#primary-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
#primary-nav.is-open { display: flex; }
#primary-nav a {
  color: #f2ede0;
  text-decoration: none;
  padding: 12px 4px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.15);
}
#primary-nav a:hover,
#primary-nav a:focus-visible { color: var(--accent); }

/* ---------- 브레드크럼 ---------- */
.crumb {
  font-size: 0.875rem;
  color: #5c6f75;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 24px 0 12px;
}
.crumb a { color: #5c6f75; text-decoration: none; }
.crumb a:hover, .crumb a:focus-visible { color: var(--primary); text-decoration: underline; }
.crumb [aria-current] { color: var(--primary); font-weight: 600; }

/* ---------- 히어로 ---------- */
.hero { padding: 8px 0 32px; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #b98c2c;
  margin: 0 0 8px;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 16px;
  line-height: 1.3;
}

.hero-sub {
  max-width: 62ch;
  font-size: 1.0625rem;
  color: var(--ink);
  margin: 0;
}

/* ---------- 본문 섹션 ---------- */
.content-section { padding: 32px 0; }
.content-section.alt { background: #f1ece0; }

.content-section h2 {
  font-size: 1.5rem;
  margin: 0 0 12px;
}

.content-section h3 {
  font-size: 1.125rem;
  color: var(--primary);
  margin: 24px 0 8px;
}

.content-section p { margin: 0 0 14px; }

/* ---------- 비교표 ---------- */
table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--card-bg);
  font-size: 0.9375rem;
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

tbody tr:nth-child(even) { background: #f6f2e7; }

td a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 소재 카드 그리드 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}

.mat-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  padding: 20px 18px 18px;
}

.mat-index {
  position: absolute;
  top: -14px;
  right: 14px;
  font-family: "Song Myung", serif;
  font-size: 1.75rem;
  color: var(--accent);
  background: var(--primary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
}

.mat-card h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  color: var(--primary);
}

.mat-card p {
  margin: 0 0 14px;
  font-size: 0.9375rem;
}

/* ---------- 텍스트 링크 버튼 (화살표 아이콘) ---------- */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.text-link:hover,
.text-link:focus-visible {
  border-bottom-color: var(--accent);
}
.icon-arrow {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.text-link:hover .icon-arrow { transform: translateX(3px); }

.text-link-lg { font-size: 1.0625rem; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 16px;
}

/* ---------- CTA ---------- */
.cta-section {
  padding: 40px 0 56px;
  background: var(--primary);
  color: #fff;
}
.cta-section h2 { color: #fff; }
.cta-section .text-link { color: #fff; }
.cta-section .text-link:hover,
.cta-section .text-link:focus-visible { border-bottom-color: var(--accent); }

/* ---------- 푸터 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  font-size: 0.875rem;
  color: #5c6f75;
  background: var(--paper);
}

.footer-nav a:hover,
.footer-nav a:focus-visible { color: var(--primary); }

address {
  max-width: 1080px;
  margin: 0 auto 12px;
  font-style: normal;
  line-height: 1.8;
}
address a { color: #5c6f75; text-decoration: underline; }

/* ---------- 반응형 ---------- */
@media (min-width: 480px) {
  .hero h1 { font-size: 2.25rem; }
}

@media (min-width: 768px) {
  .header-inner { padding: 18px 32px; }
  .menu-toggle { display: none; }
  #primary-nav {
    display: flex;
    flex-direction: row;
    gap: 24px;
    width: auto;
  }
  #primary-nav a { border-top: 0; padding: 8px 0; min-height: auto; }

  .section-inner { padding: 0 32px; }
  .hero { padding: 20px 0 48px; }
  .hero h1 { font-size: 2.75rem; }
  .content-section { padding: 48px 0; }
  .content-section h2 { font-size: 1.75rem; }

  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 3rem; }
}

@media (min-width: 1280px) {
  .section-inner { padding: 0; }
}

/* 현장 사진 */
.site-photo-section { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }
.site-photo-section h2 { color: var(--primary); margin: 0 0 18px; }
.site-photo-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.site-photo-grid picture { display: block; aspect-ratio: 4/3; overflow: hidden; }
.site-photo-grid img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 640px) { .site-photo-grid { grid-template-columns: repeat(2, 1fr); } }

/* 모바일: 비교표 가로 스크롤 대신 행을 쌓아 화면에 한번에 표시 */
@media (max-width: 639px) {
  .table-scroll { overflow-x: visible; }
  table { min-width: 0; border: 1px solid var(--border); }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table, tbody, tr, th, td { display: block; width: 100%; }
  tr { border-bottom: 2px solid var(--border); }
  tr:last-child { border-bottom: none; }
  td { border: none; border-bottom: 1px solid var(--border); padding-left: 46%; position: relative; min-height: 44px; display: flex; align-items: center; }
  tr td:last-child { border-bottom: none; }
  td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    width: 40%;
    font-weight: 800;
    color: var(--primary);
  }
}
