/* ============================================================
   조한서 국어과외 — 공통 스타일
   컨셉: 원고지·교정부호·먹빛. 국어(언어) 선생의 브랜드.
   ============================================================ */

:root {
  --ink:       #1a1714;   /* 먹 */
  --ink-soft:  #4a423b;
  --paper:     #f6f1e7;   /* 한지 크림 */
  --paper-2:   #efe7d6;
  --line:      #d8cdb8;
  --jumук:     #b23a2e;   /* 주묵(붉은 교정) */
  --jumuk:     #b23a2e;
  --jumuk-2:   #8f2b21;
  --gold:      #9a7b3f;
  --ok:        #2f6b46;
  --radius:    2px;
  --maxw:      880px;
  --serif:     'Nanum Myeongjo', 'Batang', serif;
  --sans:      'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 상단 바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,241,231,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  font-family: var(--serif);
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
}
.brand .seal-img {
  width: 34px; height: 34px; object-fit: contain;
  mix-blend-mode: multiply;   /* 흰 배경을 크림색 바탕에 자연스럽게 녹임 */
}
.brand .seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--jumuk); color: var(--paper);
  font-family: var(--serif); font-size: 16px; font-weight: 800;
  border-radius: var(--radius);
}
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { color: var(--ink-soft); transition: color .15s; }
.nav a:hover { color: var(--jumuk); }
@media (max-width: 640px) { .nav { display: none; } }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: var(--radius);
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer; transition: transform .12s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.jumuk { background: var(--jumuk); border-color: var(--jumuk); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 히어로 ---------- */
.hero { padding: 90px 0 70px; position: relative; overflow: hidden; }
.hero .eyebrow {
  font-family: var(--serif); font-size: 14px; color: var(--jumuk);
  letter-spacing: .12em; margin-bottom: 20px; font-weight: 700;
}
.hero h1 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.25; letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero h1 .mark {
  background: linear-gradient(transparent 60%, rgba(178,58,46,0.22) 60%);
  padding: 0 2px;
}
.hero .lead {
  font-size: 18px; color: var(--ink-soft); max-width: 560px;
  margin-bottom: 34px;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* 원고지 격자 배경 (히어로 우측) */
.wongoji {
  position: absolute; right: -40px; top: 40px; opacity: .5;
  width: 320px; height: 320px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 70% 30%, #000 30%, transparent 72%);
  pointer-events: none;
}
@media (max-width: 720px) { .wongoji { display: none; } }

/* ---------- 섹션 공통 ---------- */
section { padding: 64px 0; }
.section-label {
  font-family: var(--serif); font-size: 13px; letter-spacing: .04em;
  color: var(--jumuk); font-weight: 700; margin-bottom: 12px;
}
.section-title {
  font-family: var(--serif); font-size: clamp(26px, 4vw, 36px);
  font-weight: 800; letter-spacing: -0.02em; margin-bottom: 28px;
}
.divider { height: 1px; background: var(--line); margin: 0; }

/* ---------- 신조(brand statement) ---------- */
.creed {
  font-family: var(--serif); font-size: clamp(20px, 3vw, 26px);
  line-height: 1.6; color: var(--ink); max-width: 640px;
}
.creed .quiet { color: var(--ink-soft); }
.creed .em {
  display: block; margin-top: 14px; color: var(--jumuk); font-weight: 800;
}

/* ---------- 후기 카드 ---------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.review {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  position: relative;
}
.review .grade {
  font-family: var(--serif); font-weight: 800; font-size: 15px;
  color: var(--jumuk); margin-bottom: 10px;
  display: inline-block;
  border-bottom: 2px solid var(--jumuk);
  padding-bottom: 2px;
}
.review p { font-size: 15px; color: var(--ink-soft); margin-bottom: 14px; }
.review .who { font-size: 13px; color: var(--ink); font-weight: 600; }

/* ---------- 문의(카톡) ---------- */
.contact {
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius); padding: 44px; text-align: center;
}
.contact h3 { font-family: var(--serif); font-size: 28px; margin-bottom: 12px; }
.contact p { color: #d9cfbf; margin-bottom: 26px; }
.btn.kakao { background: #FEE500; color: #191600; border-color: #FEE500; font-weight: 700; }

/* ---------- 채점 위젯 공통 ---------- */
.panel {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input, .field select {
  width: 100%; font-family: var(--sans); font-size: 15px;
  padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius); background: var(--paper); color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--jumuk); }

/* OMR 답안 격자 */
.omr { display: grid; gap: 10px; }
.omr-row {
  display: grid; grid-template-columns: 44px 1fr; align-items: center;
  gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line);
}
.omr-row .qno {
  font-family: var(--serif); font-weight: 800; font-size: 15px;
  color: var(--ink); text-align: center;
}
.bubbles { display: flex; gap: 8px; }
.bubble {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--paper);
  font-family: var(--serif); font-size: 15px; font-weight: 700;
  color: var(--ink-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.bubble:hover { border-color: var(--ink-soft); }
.bubble.on {
  background: var(--jumuk); border-color: var(--jumuk); color: var(--paper);
  transform: scale(1.05);
}

/* 결과 */
.result { margin-top: 24px; padding: 24px; border-radius: var(--radius);
  border: 1.5px solid var(--ink); background: var(--paper);
  display: none;
}
.result.show { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to {opacity:1; transform:none;} }
.result .score-big {
  font-family: var(--serif); font-size: 46px; font-weight: 800; color: var(--jumuk);
  line-height: 1;
}
.result .score-big span { font-size: 22px; color: var(--ink-soft); }
.result .wrong-list { margin-top: 14px; font-size: 15px; }
.result .wrong-list b { color: var(--jumuk); }
.msg { font-size: 14px; margin-top: 12px; }
.msg.err { color: var(--jumuk-2); }

/* ---------- 관리자 ---------- */
.admin-grid { display: grid; gap: 24px; }
.set-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper);
}
.set-item .meta { font-size: 14px; color: var(--ink-soft); }
.set-item .code { font-family: var(--serif); font-weight: 800; color: var(--ink); }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }

/* ---------- 푸터 ---------- */
footer { padding: 40px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* 접근성 */
:focus-visible { outline: 2px solid var(--jumuk); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- 선생님 소개 ---------- */
.teacher {
  display:grid; grid-template-columns: 280px 1fr; gap:40px; align-items:center;
}
@media (max-width: 680px) { .teacher { grid-template-columns: 1fr; gap:24px; } .teacher-photo { max-width:280px; } }
.teacher-photo {
  width:100%; display:block; border:1px solid var(--line); border-radius:var(--radius);
}
.teacher-name {
  font-family:var(--serif); font-size:30px; font-weight:800; letter-spacing:-0.02em; margin-bottom:14px;
}
.creds { list-style:none; margin-bottom:18px; }
.creds li {
  font-size:15.5px; color:var(--ink); padding:7px 0; border-bottom:1px dashed var(--line);
}
.creds li::before { content:"—"; color:var(--jumuk); font-weight:700; margin-right:10px; }
.teacher-catch {
  font-family:var(--serif); font-size:clamp(21px, 3vw, 27px); font-weight:800;
  line-height:1.5; letter-spacing:-0.02em; color:var(--ink); margin:6px 0 16px;
}
.teacher-why p { font-size:14px; color:var(--ink-soft); line-height:1.7; margin-bottom:7px; }
.teacher-why b { color:var(--jumuk); font-family:var(--serif); margin-right:2px; }

.teacher-strength {
  margin-top:18px; font-size:15px; line-height:1.75; color:var(--ink);
  background:var(--paper); border:1px solid var(--line); border-left:3px solid var(--gold);
  padding:12px 16px; border-radius:var(--radius);
}
