/* ponytail: 폰트 CDN 미검증으로 폴백 사용, 실제 폰트 라이선스 확보 후 교체 */

:root {
  --color-base: #3B342B;
  --color-bg: #EDE8DF;
  --color-accent: #A8603A;
  --color-surface: #FFFFFF;
  --color-border: #d8d0c2;

  --font-heading: 'Pretendard', 'Noto Sans KR', sans-serif;
  --font-body: 'Pretendard', 'Noto Sans KR', sans-serif;

  --scale-ratio: 1.25;
  --fs-base: 1rem;
  --fs-sm: 0.85rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.5625rem;
  --fs-xl: 1.953rem;
  --fs-xxl: 2.441rem;

  --section-pad: 96px;
  --radius: 12px;

  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-base: #EDE8DF;
    --color-bg: #241f19;
    --color-surface: #2f2820;
    --color-border: #4a4133;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-display: swap;
  background: var(--color-bg);
  color: var(--color-base);
  line-height: 1.7;
  font-size: var(--fs-base);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-display: swap;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 0.6em;
  color: var(--color-base);
}

h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }

p { margin: 0 0 1em; }

a { color: var(--color-accent); }

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

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.section-inner,
.header-inner,
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: 68px;
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

.btn-call {
  background: var(--color-accent);
  color: #fff;
  padding: 10px 18px;
  font-size: var(--fs-sm);
}

.btn-call:hover { background: #904f30; }
.btn-call:active { transform: scale(0.98); }

.header-call { white-space: nowrap; }

/* hero */
.hero {
  padding: 56px 0 var(--section-pad);
  background: var(--color-surface);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  gap: 32px;
}

.hero-summary {
  font-size: var(--fs-md);
  max-width: 46ch;
}

.btn-hero {
  padding: 14px 28px;
  font-size: var(--fs-base);
  margin-top: 8px;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
}

.split-panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.split-before {
  background: linear-gradient(160deg, #6b5c47, #3B342B);
}

.split-after {
  background: linear-gradient(160deg, var(--color-accent), #c07d55);
}

.split-label {
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-sm);
  background: rgba(0, 0, 0, 0.28);
  padding: 4px 10px;
  border-radius: 999px;
}

/* sections */
.section { padding: var(--section-pad) 0; }
.section-problem { background: var(--color-bg); }
.section-core { background: var(--color-surface); }
.section-diagram { background: var(--color-bg); }
.section-table { background: var(--color-surface); }
.section-photos { background: var(--color-bg); }
.section-faq { background: var(--color-surface); }

.section-core h3 { margin-top: 1.6em; }

/* diagram */
.diagram-figure {
  margin: 24px 0 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}

/* table */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

caption {
  text-align: left;
  font-weight: 700;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

thead th {
  background: var(--color-bg);
  font-weight: 700;
}

tbody tr:last-child td,
tbody tr:last-child th { border-bottom: none; }

/* photos */
.photo-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.photo-card {
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.photo-card picture,
.photo-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 12px 14px;
  font-size: var(--fs-sm);
  color: var(--color-base);
}

/* faq */
.faq-list { margin-top: 24px; }

.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child { padding-top: 0; }

.faq-item dt {
  font-weight: 700;
  margin-bottom: 8px;
}

.faq-item dd { margin: 0; }

/* cta */
.section-cta {
  background: var(--color-base);
  color: var(--color-bg);
}

.section-cta h2,
.section-cta p { color: var(--color-bg); }

.cta-inner { text-align: center; }

.btn-cta {
  padding: 14px 32px;
  font-size: var(--fs-md);
  margin-top: 8px;
}

/* footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.related-links a {
  font-size: var(--fs-sm);
  text-decoration: underline;
}

.biz-info {
  font-size: var(--fs-sm);
  color: var(--color-base);
  opacity: 0.8;
  margin: 0;
}

/* breakpoints */
@media (min-width: 640px) {
  .photo-grid { flex-direction: row; }
  .photo-card { flex: 1 1 0; }
}

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
  :root { --section-pad: 120px; }
  .hero { padding: 72px 0 var(--section-pad); }
}

@media (min-width: 1280px) {
  .section-inner,
  .header-inner,
  .footer-inner { padding-left: 0; padding-right: 0; }
}
