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

:root {
  --bg: #FAFAF9;
  --ink: #1C1917;
  --accent: #22C55E;
  --accent-dark: #166534;
  --line: #D6D3D1;
  --muted: #57534E;
  --surface: #E7E5E4;

  /* type scale: 1.250 */
  --fs-body: 1rem;
  --fs-lead: 1.25rem;
  --fs-h3: 1.5625rem;
  --fs-h2: 1.953rem;
  --fs-h1: 2.441rem;

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

  --font-heading: 'Nanum Square Neo', 'Pretendard', 'Noto Sans KR', sans-serif;
  --font-body: 'Pretendard', 'Noto Sans KR', sans-serif;
}

* {
  box-sizing: border-box;
}

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

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

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

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

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

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

h2 {
  font-size: var(--fs-h2);
}

p {
  margin: 0 0 1em;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.btn {
  display: inline-block;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-call {
  background: var(--accent);
  color: #08260F;
  padding: 10px 18px;
  font-size: 0.95rem;
}

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

/* hero: dark chalkboard motif */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--bg);
  padding: calc(var(--pad-section) * 0.75) 20px;
  overflow: hidden;
}

.hero-board {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
}

.chalk-line {
  position: absolute;
  background: repeating-linear-gradient(
    90deg,
    rgba(250, 250, 249, 0.35) 0 24px,
    transparent 24px 32px
  );
  height: 2px;
  border-radius: 2px;
}

.line-1 { top: 22%; left: 6%; width: 32%; }
.line-2 { top: 48%; right: 8%; width: 24%; }
.line-3 { bottom: 20%; left: 12%; width: 40%; }

.hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: var(--fs-h1);
  color: var(--bg);
  animation: hero-rise 0.6s ease both;
}

.hero-lead {
  font-size: var(--fs-lead);
  color: #E7E5E4;
  max-width: 560px;
  margin: 0 auto 1.75em;
  animation: hero-rise 0.6s ease 0.1s both;
}

.btn-hero {
  padding: 14px 28px;
  font-size: 1.05rem;
  animation: hero-rise 0.6s ease 0.2s both;
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero-lead, .btn-hero {
    animation: none;
  }
}

/* sections */
.section {
  padding: var(--pad-section) 0;
}

.section-problem { background: var(--bg); }
.section-core { background: var(--surface); }
.section-diagram { background: var(--bg); }
.section-table { background: var(--surface); }
.section-photos { background: var(--bg); }
.section-faq { background: var(--surface); }

.section-core h2 {
  margin-top: 2em;
}
.section-core h2:first-child {
  margin-top: 0;
}

/* diagram */
.diagram-caption {
  max-width: 640px;
  color: var(--muted);
}

.anchor-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 640px;
  margin: 24px auto 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  background: var(--bg);
}

caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  padding: 12px 14px;
  background: var(--bg);
}

th, td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  text-align: left;
  white-space: nowrap;
}

thead th {
  background: var(--ink);
  color: var(--bg);
}

.table-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 12px;
}

/* photos */
.photo-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.photo-item {
  margin: 0;
  flex: 1 1 340px;
  max-width: 420px;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.photo-item figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .photo-row {
    flex-direction: column;
    align-items: center;
  }
}

/* faq */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

details {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

summary {
  font-weight: 700;
  cursor: pointer;
}

details p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* cta */
.section-cta {
  background: var(--ink);
  color: var(--bg);
  text-align: center;
}

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

.cta-inner p {
  color: #E7E5E4;
  max-width: 520px;
  margin: 0 auto 1.5em;
}

.btn-cta {
  padding: 14px 30px;
  font-size: 1.05rem;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.footer-corp {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

/* breakpoints */
@media (min-width: 640px) {
  :root {
    --pad-section: 96px;
  }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 2.9rem; }
}

@media (min-width: 1280px) {
  .container { max-width: 1080px; }
}

@media (max-width: 639px) {
  :root {
    --pad-section: 64px;
  }
  .hero h1 { font-size: 2rem; }
}
