/* ==========================================================
   LIST UP 리스트업 — 공통 스타일 (index.html / portfolio.html)
   톤: 화이트 미니멀 에디토리얼
   ========================================================== */

:root {
  /* DESIGN_GUIDE.md 컬러 시스템 */
  --bg: #f4f0e7;
  --bg-soft: #fbf8f1;
  --ink: #171615;
  --ink-2: #4b4844;
  --muted: #7a746b;
  --line: #ddd3c4;
  --accent: #264b39;
  --accent-2: #456d55;
  --accent-soft: #e7eee9;
  --sea: #2f7d8b;
  --clay: #a65f3a;
  --gold: #d7c596;
  --dark: #171d19;
  --white: #fffdf8;
  --max: 1220px;
  --pad: clamp(16px, 4.5vw, 56px);
  --radius: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.66;
  word-break: keep-all;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

.serif {
  /* 이전 버전 글씨체 느낌: 세리프 대신 굵은 고딕(Pretendard) 유지, 색상 포인트만 */
  font-family: inherit;
  font-style: normal;
  font-weight: 900;
  letter-spacing: -0.015em;
}

svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

:focus-visible { outline: 3px solid rgba(46, 92, 69, 0.35); outline-offset: 3px; }

/* ---------- 상단 바 ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--pad);
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.topbar.scrolled { border-bottom-color: var(--line); }

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand strong { font-size: 17px; font-weight: 900; }
.brand span { color: var(--muted); font-size: 12.5px; font-weight: 700; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}

.nav-links a { transition: color 0.2s; }
.nav-links a:hover, .nav-links a.current { color: var(--ink); }
.nav-links a.current { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  color: var(--white);
  background: var(--ink);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent); }

.menu-button {
  display: none;
  width: 42px; height: 42px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
}
.menu-button span {
  display: block;
  width: 22px; height: 2px;
  margin-left: auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.22s var(--ease), width 0.22s var(--ease);
}
.menu-button span + span { width: 15px; margin-top: 6px; }
.menu-button.open span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-button.open span:last-child { width: 22px; transform: translateY(-4px) rotate(-45deg); }

/* ---------- 공통 섹션 ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(72px, 9vw, 130px) 0; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; }

.h2 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.h2 .serif { font-size: 1.04em; color: var(--accent); }

.section-desc {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
}

.section-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 800;
  white-space: nowrap;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-dark { color: var(--white); background: var(--ink); }
.btn-dark:hover { background: var(--accent); }
.btn-line { color: var(--ink); border: 1.5px solid var(--line); background: var(--white); }
.btn-line:hover { border-color: var(--ink); }

/* ---------- 히어로 ---------- */
.hero { padding: clamp(140px, 18vh, 200px) 0 0; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 99px; background: var(--accent); }

.hero h1 {
  margin: 0;
  font-size: clamp(44px, 8.4vw, 110px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.hero h1 .serif { color: var(--accent); }

.hero-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
}
.hero-sub p {
  max-width: 540px;
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(15.5px, 1.6vw, 18px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-visual {
  position: relative;
  height: clamp(340px, 56vw, 640px);
  margin-top: clamp(40px, 6vw, 72px);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-visual img { transition: transform 1.4s var(--ease); }
.hero-visual:hover img { transform: scale(1.025); }
.hero-tag {
  position: absolute;
  left: 18px; bottom: 18px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
}

/* ---------- 마키 ---------- */
.marquee {
  overflow: hidden;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: clamp(64px, 8vw, 110px);
}
.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  color: var(--muted);
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.marquee-track span::after { content: "✳"; color: var(--accent); font-size: 0.8em; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 제주 특수성 ---------- */
.jeju { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.jeju-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}
.jeju-grid article {
  padding: clamp(24px, 2.6vw, 38px) clamp(20px, 2.2vw, 32px);
  border-right: 1px solid var(--line);
}
.jeju-grid i {
  display: block;
  color: var(--accent);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.jeju-grid h3 {
  margin: 14px 0 10px;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.3;
  font-weight: 800;
}
.jeju-grid p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- 빠른 수리 (행 리스트) ---------- */
.repair-rows { border-top: 1px solid var(--line); }

.repair-row {
  display: grid;
  grid-template-columns: 64px 96px 1fr auto;
  align-items: center;
  gap: clamp(16px, 2.6vw, 34px);
  width: 100%;
  padding: 18px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: background 0.2s;
}
.repair-row:hover { background: var(--bg-soft); }

.repair-row .num { color: var(--muted); font-size: 13px; font-weight: 800; }
.repair-row .thumb {
  width: 96px; height: 68px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-soft);
}
.repair-row .thumb img { transition: transform 0.6s var(--ease); }
.repair-row:hover .thumb img { transform: scale(1.06); }

.repair-row .rtitle { display: block; margin: 0; font-size: clamp(17px, 2vw, 22px); font-weight: 800; line-height: 1.3; }
.repair-row .desc { display: block; margin: 4px 0 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.repair-row .badge {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  vertical-align: 2px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.repair-row .badge.hot { color: #8a3c20; background: #f6e7dc; }

.repair-row .go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
}
.repair-row:hover .go { color: var(--accent); }

/* ---------- 서비스 ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.service-card {
  min-width: 0;
  padding: clamp(24px, 2.4vw, 34px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.service-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.service-card i { color: var(--accent); font-style: normal; font-size: 13px; font-weight: 800; }
.service-card h3 { margin: 16px 0 10px; font-size: 20px; font-weight: 800; line-height: 1.3; }
.service-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.service-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.service-card .tags span {
  padding: 4px 10px;
  color: var(--ink-2);
  background: var(--bg-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- 포트폴리오 (맛보기 가로 스크롤 + 그리드 공용 카드) ---------- */
.work-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(260px, 30vw, 420px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.work-scroller::-webkit-scrollbar { height: 6px; }
.work-scroller::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.work-card {
  position: relative;
  scroll-snap-align: start;
  margin: 0;
  min-width: 0;
}
.work-card .frame {
  display: block;
  height: clamp(300px, 34vw, 480px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}
.work-card .frame img { transition: transform 0.8s var(--ease); }
.work-card:hover .frame img { transform: scale(1.045); }

.work-card figcaption,
.work-card .caption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 13px; }
.work-card strong { font-size: 16px; font-weight: 800; line-height: 1.35; }
.work-card em { color: var(--muted); font-style: normal; font-size: 12.5px; font-weight: 700; white-space: nowrap; }

/* ---------- 프로세스 ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.process-grid li {
  list-style: none;
  padding: clamp(22px, 2.4vw, 34px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.process-grid ol, ol.process-grid { margin: 0; padding: 0; }
.process-grid span { color: var(--accent); font-size: 13px; font-weight: 800; }
.process-grid strong { display: block; margin-top: 14px; font-size: 18px; font-weight: 800; }
.process-grid p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- 문의 ---------- */
.contact { background: var(--white); border-top: 1px solid var(--line); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}
.contact-info div { padding-top: 14px; border-top: 1px solid var(--line); }
.contact-info span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }
.contact-info strong { display: block; margin-top: 5px; font-size: 16px; font-weight: 800; }
.contact-info a:hover { color: var(--accent); }

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: clamp(22px, 2.6vw, 34px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-form label { display: grid; gap: 7px; min-width: 0; }
.contact-form label span { font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.contact-form .full { grid-column: 1 / -1; }

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea,
.contact-form input[type="file"] {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  transition: border-color 0.2s;
}
.contact-form textarea { min-height: 130px; padding: 12px 14px; resize: vertical; }
.contact-form input[type="file"] { padding: 11px 14px; }
.contact-form :is(input, select, textarea):focus { border-color: var(--accent); }
.contact-form small { color: var(--muted); font-size: 12px; font-weight: 600; }

.submit-button {
  grid-column: 1 / -1;
  min-height: 54px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background 0.2s;
}
.submit-button:hover { background: var(--accent); }
.submit-button:disabled { cursor: wait; opacity: 0.7; }

.toast {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 99;
  max-width: 330px;
  padding: 14px 18px;
  color: var(--white);
  background: var(--ink);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 36px rgba(20, 19, 15, 0.22);
}

/* ---------- 푸터 ---------- */
.footer {
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer-inner { display: grid; gap: 8px; }
.footer-inner strong { color: var(--ink); font-size: 15px; }
.footer-inner .biz { line-height: 1.8; }

/* ---------- 포트폴리오 페이지 ---------- */
.page-head { padding: clamp(140px, 18vh, 190px) 0 clamp(36px, 4vw, 56px); }
.page-head h1 {
  margin: 0;
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-head h1 .serif { color: var(--accent); }
.page-head p { max-width: 600px; margin: 20px 0 0; color: var(--muted); font-size: clamp(15px, 1.5vw, 17px); }

.cat-switch {
  display: inline-flex;
  gap: 4px;
  margin-top: 34px;
  padding: 4px;
  background: var(--bg-soft);
  border-radius: 999px;
}
.cat-switch button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 800;
  transition: background 0.2s, color 0.2s;
}
.cat-switch button.active { background: var(--ink); color: var(--white); }

.sub-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sub-filters button {
  min-height: 38px;
  padding: 0 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.2s, color 0.2s;
}
.sub-filters button.active { border-color: var(--ink); color: var(--ink); font-weight: 800; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 14px;
  padding-bottom: clamp(72px, 9vw, 120px);
}
.work-grid .work-card .frame { height: clamp(260px, 26vw, 380px); }
.work-grid .work-card.is-hidden { display: none; }
.work-card .cat-label {
  position: absolute;
  top: 12px; left: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}
.work-empty {
  grid-column: 1 / -1;
  padding: 60px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.cta-band { background: var(--ink); color: var(--white); }
.cta-band .h2 { color: var(--white); }
.cta-band .h2 .serif { color: #b6d3c2; }
.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.cta-band .btn-dark { background: var(--white); color: var(--ink); }
.cta-band .btn-dark:hover { background: #e7efe9; }

/* ---------- 스크롤 등장 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- 반응형 ---------- */
@media (max-width: 1080px) {
  .jeju-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid, .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .nav-links, .topbar .nav-cta { display: none; }
  .menu-button { display: block; }

  .nav-links.open {
    position: fixed;
    top: 64px; left: 14px; right: 14px;
    display: grid;
    gap: 2px;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(20, 19, 15, 0.12);
  }
  .nav-links.open a { padding: 13px 14px; border-radius: 10px; }
  .nav-links.open a:hover { background: var(--bg-soft); }

  .section-top { flex-direction: column; align-items: flex-start; gap: 18px; }
  .contact-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .jeju-grid, .service-grid, .process-grid, .work-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-info { grid-template-columns: 1fr 1fr; }
  .repair-row { grid-template-columns: 84px 1fr; grid-template-rows: auto auto; gap: 10px 16px; }
  .repair-row .num { display: none; }
  .repair-row .thumb { width: 84px; height: 60px; grid-row: 1; }
  .repair-row .go { grid-column: 1 / -1; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
}

/* ===== DESIGN_GUIDE.md 브랜드 가이드 적용 (이전 디자인 톤) ===== */
.topbar { background: rgba(244, 240, 231, 0.9); }

.nav-cta, .btn, .submit-button { border-radius: 8px; }
.nav-cta, .btn-dark, .submit-button { background: var(--accent); color: var(--white); }
.nav-cta:hover, .btn-dark:hover, .submit-button:hover { background: var(--accent-2); }
.btn-line { background: var(--white); }

.jeju { background: var(--bg-soft); }
.service-card { background: var(--white); }
.repair-row:hover { background: var(--bg-soft); }
.process-grid li { background: var(--bg-soft); }
.contact { background: var(--bg-soft); }
.contact-form { background: var(--white); }

.service-card i, .repair-row .num { color: var(--clay); }
.process-grid span { color: var(--sea); }
.marquee-track span::after { color: var(--gold); }

.footer { background: #0d1110; border-top: 0; color: rgba(255, 253, 248, 0.72); }
.footer-inner strong { color: var(--white); }

/* 포트폴리오: 다크 배경 (가이드 - 사진이 주인공) */
.work-area { background: var(--dark); padding: clamp(40px, 5vw, 64px) 0 clamp(72px, 9vw, 110px); }
.work-area .work-grid { padding-bottom: 0; }
.work-area .work-card strong { color: var(--white); }
.work-area .work-card em { color: rgba(255, 253, 248, 0.62); }
.work-area .work-empty { color: rgba(255, 253, 248, 0.62); }

.cta-band { background: var(--accent); }
.cta-band .h2 .serif { color: var(--gold); }
.cta-band .btn-dark { background: var(--white); color: var(--accent); }
.cta-band .btn-dark:hover { background: #efe9da; }
