/* 클래스체크 소개페이지 — 앱과 같은 잉크·종이·확인 초록. 움직임은 첫 화면 출석부 한 번뿐. */
@font-face {
  font-family: "Pretendard";
  src: url("/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-display: swap;
}

:root {
  --ink: #223b60;
  --ink-deep: #182c4a;
  --paper: #ffffff;
  --desk: #f3f5f8;
  --rule: #dde3ec;
  --text: #1c2636;
  --muted: #5d6a7d;
  --check: #23745d;
  --check-soft: #92cbb3;
  --check-bg: #e6f2ec;
  --amber: #94601f;
  --amber-bg: #f7eddf;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--check-soft); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--ink); color: #fff; border: 0; border-radius: 10px;
  font: inherit; font-size: 16px; font-weight: 650; text-decoration: none; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn-wide { width: 100%; }
@media (hover: hover) {
  .btn:hover { background: var(--ink-deep); }
  .btn-quiet:hover { background: var(--paper); }
}

/* 머리 */
.top { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); }
.brand svg { width: 32px; height: 32px; }
.top-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.top-nav a:not(.btn) { text-decoration: none; color: var(--muted); }
@media (hover: hover) { .top-nav a:not(.btn):hover { color: var(--ink); } }

/* 첫 화면 */
.hero { background: var(--desk); padding: 88px 0 96px; border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.22; letter-spacing: -0.035em; font-weight: 780; color: var(--ink); }
.lead { margin-top: 24px; font-size: 18px; color: var(--muted); max-width: 30em; }
.hero-act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* 출석부 — 이 페이지에서 유일하게 움직이는 곳 */
.sheet { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 26px 26px 22px; box-shadow: 0 1px 0 var(--rule), 0 24px 48px -28px rgba(24, 44, 74, 0.35); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.sheet-class { font-weight: 750; font-size: 19px; color: var(--ink); letter-spacing: -0.02em; }
.sheet-week { font-size: 14px; color: var(--muted); }
.sheet-rate { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sheet-rate b { font-size: 24px; color: var(--ink); font-weight: 750; }
.roll { width: 100%; border-collapse: collapse; margin-top: 6px; font-variant-numeric: tabular-nums; }
.roll th, .roll td { border-bottom: 1px solid var(--rule); }
.roll thead th { font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 0 8px; text-align: center; }
.roll tbody th { text-align: left; font-weight: 600; font-size: 15px; padding: 9px 0; white-space: nowrap; }
.roll td { text-align: center; padding: 7px 0; width: 15%; }
.roll tbody tr:last-child th, .roll tbody tr:last-child td { border-bottom: 0; }

.roll td::before, .legend i {
  content: ""; display: inline-block; width: 30px; height: 30px; border-radius: 8px; vertical-align: middle;
  background-position: center; background-repeat: no-repeat; background-size: 18px;
}
.legend i { width: 18px; height: 18px; border-radius: 5px; background-size: 12px; margin-right: 6px; }
[data-s="ok"]::before, .legend i[data-s="ok"] {
  background-color: var(--check-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%2323745d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-s="re"]::before, .legend i[data-s="re"] {
  background-color: var(--amber-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12a5 5 0 1 0 1.6-3.7M7 5v4h4' fill='none' stroke='%2394601f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-s="no"]::before, .legend i[data-s="no"] { box-shadow: inset 0 0 0 1.5px #c3ccd8; }
[data-s="ex"]::before, .legend i[data-s="ex"] {
  background-color: var(--desk);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12h10' fill='none' stroke='%238a96a8' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; }
.sheet-note { margin-top: 12px; font-size: 14px; color: var(--amber); }

/* 칸이 한 칸씩 채워진다 (요일 순서, 30ms 간격) */
.js .roll td::before { opacity: 0; transform: scale(0.6); }
.js .ready .roll td::before {
  opacity: 1; transform: none;
  transition: opacity 260ms var(--ease-out), transform 320ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 30ms + 200ms);
}
.js .sheet-note, .js .sheet-rate { opacity: 0; transition: opacity 400ms var(--ease-out) 1300ms; }
.js .ready .sheet-note, .js .ready .sheet-rate { opacity: 1; }

/* 공통 구역 */
section { scroll-margin-top: 72px; }
h2 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.3; letter-spacing: -0.03em; font-weight: 760; color: var(--ink); }
.section-lead { margin-top: 14px; color: var(--muted); max-width: 34em; font-size: 18px; }
h3 { font-size: 20px; line-height: 1.4; letter-spacing: -0.02em; font-weight: 700; color: var(--text); }

/* 하루 흐름 — 실제 순서라 선으로 잇는다 */
.flow { padding: 112px 0; }
.day { list-style: none; padding: 0; margin-top: 56px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.day::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--rule); }
.day li { position: relative; padding: 36px 24px 0 0; }
.day li::before { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
.day li:last-child::before { background: var(--ink); }
.when { font-size: 14px; font-weight: 650; color: var(--check); margin-bottom: 6px; }
.day h3 { font-size: 18px; margin-bottom: 8px; }
.day p:not(.when) { font-size: 15.5px; color: var(--muted); line-height: 1.65; }

/* 역할 */
.roles { padding: 112px 0; background: var(--desk); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.role { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: center; margin-top: 88px; }
.role:first-of-type { margin-top: 64px; }
.role h3 { font-size: 26px; color: var(--ink); margin-bottom: 14px; }
.role-text > p { color: var(--muted); max-width: 28em; }
.points { list-style: none; padding: 0; margin-top: 20px; }
.points li { position: relative; padding-left: 22px; margin-top: 6px; font-size: 16px; }
.points li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 8px; border-radius: 2px; background: var(--check-soft); }
.role-visual { display: flex; justify-content: center; }

.phone { width: 300px; background: var(--paper); border: 1px solid var(--rule); border-radius: 30px; padding: 22px 20px 24px; box-shadow: 0 30px 60px -36px rgba(24, 44, 74, 0.45); }
.phone-bar { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); }
.mini-logo { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); }
.phone-meta { margin-top: 18px; font-size: 12px; color: var(--muted); font-weight: 600; }
.phone-meta span { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--rule); }
.phone-hello { margin-top: 10px; font-size: 25px; line-height: 1.3; font-weight: 750; letter-spacing: -0.03em; color: var(--ink); }
.hw { margin-top: 16px; border: 1px solid var(--rule); border-radius: 14px; padding: 14px; }
.hw-due { font-size: 12px; font-weight: 650; color: var(--amber); }
.hw-title { font-weight: 700; font-size: 15px; margin-top: 2px; line-height: 1.4; }
.hw-pages { font-size: 12.5px; color: var(--muted); }
.pages { display: flex; gap: 6px; margin-top: 10px; }
.pg { flex: none; white-space: nowrap; line-height: 1.5; font-size: 12px; font-weight: 650; padding: 3px 0; width: 38px; text-align: center; border-radius: 5px 9px 5px 5px; box-shadow: inset 0 0 0 1.5px #c3ccd8; color: var(--muted); font-variant-numeric: tabular-nums; }
.pg-ok { background: var(--check-bg); box-shadow: none; color: var(--check); }
.hw-btn { display: block; margin-top: 12px; background: var(--ink); color: #fff; text-align: center; border-radius: 10px; padding: 9px 0; font-size: 14px; font-weight: 650; }
.hw-dim { opacity: 0.55; }
.hw-dim .hw-due { color: var(--muted); }

.desk { width: 100%; max-width: 480px; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 22px; box-shadow: 0 30px 60px -40px rgba(24, 44, 74, 0.4); }
.desk-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.desk-head b { font-size: 16px; color: var(--ink); }
.desk-head span { font-size: 13px; color: var(--muted); }
.review { display: grid; grid-template-columns: 140px 1fr; gap: 18px; margin-top: 18px; }
.photo { background: #f6f3ec; border-radius: 8px; padding: 16px 14px; display: flex; flex-direction: column; gap: 11px; aspect-ratio: 3 / 4; }
.photo i { display: block; height: 2px; background: #b8b1a3; border-radius: 1px; }
.photo i:nth-child(2) { width: 80%; }
.photo i:nth-child(4) { width: 64%; }
.photo i.short { width: 30%; }
.rv-name { font-weight: 700; font-size: 16px; }
.rv-name span { font-weight: 500; color: var(--muted); font-size: 14px; margin-left: 4px; }
.rv-why { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--muted); padding: 10px 12px; background: var(--desk); border-radius: 8px; }
.rv-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rv-act span { font-size: 13px; font-weight: 650; padding: 7px 12px; border-radius: 8px; }
.rv-ok { background: var(--ink); color: #fff; }
.rv-re { box-shadow: inset 0 0 0 1.5px var(--amber); color: var(--amber); }

.mini { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 14.5px; }
.mini th { text-align: left; font-weight: 600; padding: 12px 12px 12px 0; white-space: nowrap; width: 34%; }
.mini td { padding: 12px 0; border-top: 1px solid var(--rule); }
.mini th { border-top: 1px solid var(--rule); }
.mini tr:first-child th, .mini tr:first-child td { border-top: 0; }
.bar { display: block; height: 6px; background: var(--desk); border-radius: 3px; overflow: hidden; }
.bar s { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.bar.low s { background: var(--amber); }
.num { text-align: right; width: 56px; font-variant-numeric: tabular-nums; font-weight: 650; }
.num.warn { color: var(--amber); }

/* 원칙 — 앱 사이드바와 같은 남색 위 */
.trust { background: var(--ink); color: #fff; padding: 112px 0; }
.trust h2 { color: #fff; }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 72px; margin-top: 56px; }
.rules div { border-top: 1px solid rgba(255, 255, 255, 0.22); padding-top: 22px; }
.rules dt { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.rules dt::before { content: ""; display: inline-block; width: 14px; height: 9px; margin-right: 12px; border-left: 3px solid var(--check-soft); border-bottom: 3px solid var(--check-soft); transform: translateY(-5px) rotate(-45deg); }
.rules dd { margin-top: 10px; color: rgba(255, 255, 255, 0.76); font-size: 16px; max-width: 30em; }

/* 문의 */
.contact { padding: 112px 0 120px; }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: start; }
.next { list-style: none; padding: 0; margin-top: 40px; counter-reset: n; }
.next li { counter-increment: n; position: relative; padding: 0 0 22px 44px; color: var(--muted); font-size: 16px; }
.next li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--desk); color: var(--ink); font-weight: 700; font-size: 14px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--rule); }
.next b { display: block; color: var(--text); font-size: 17px; }

.form { background: var(--desk); border: 1px solid var(--rule); border-radius: 16px; padding: 32px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 15px; font-weight: 600; }
label em, .check em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--check); margin-left: 4px; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--text); width: 100%;
  background: var(--paper); border: 1px solid #cbd3de; border-radius: 10px; padding: 11px 13px; min-height: 48px;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(34, 59, 96, 0.14); }
[aria-invalid="true"] { border-color: #b3261e; }
::placeholder { color: #9aa5b4; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.agree { margin: 6px 0 22px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--ink); margin: 0; flex: none; }
details { margin-top: 8px; font-size: 14px; color: var(--muted); padding-left: 32px; }
summary { cursor: pointer; width: fit-content; text-decoration: underline; text-underline-offset: 3px; }
details p { margin-top: 8px; line-height: 1.75; }
.form-error { color: #b3261e; font-size: 15px; margin-bottom: 14px; font-weight: 600; }
.btn[disabled] { opacity: 0.6; cursor: default; }

.done { background: var(--desk); border: 1px solid var(--rule); border-radius: 16px; padding: 48px 32px; text-align: center; }
.done:focus { outline: none; }
.done svg { width: 56px; height: 56px; padding: 12px; border-radius: 50%; background: var(--check-bg); fill: none; stroke: var(--check); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done h3 { margin-top: 18px; font-size: 22px; color: var(--ink); }
.done p { margin-top: 8px; color: var(--muted); }

/* 바닥 */
.foot { border-top: 1px solid var(--rule); padding: 36px 0 48px; font-size: 14px; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: baseline; }
.foot-brand { font-weight: 750; color: var(--ink); font-size: 16px; }
.foot-copy { margin-left: auto; }

/* 좁은 화면 */
@media (max-width: 980px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .role { grid-template-columns: 1fr; gap: 36px; margin-top: 72px; }
  .day { grid-template-columns: 1fr; margin-top: 40px; }
  .day::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; }
  .day li { padding: 0 0 32px 40px; }
  .day li:last-child { padding-bottom: 0; }
  .rules { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top-nav a:not(.btn) { display: none; }
  .hero { padding: 48px 0 56px; }
  .lead, .section-lead { font-size: 16.5px; }
  .hero-act .btn { flex: 1 1 100%; }
  .sheet { padding: 18px 14px 16px; }
  .roll td::before { width: 26px; height: 26px; background-size: 16px; }
  .roll tbody th { font-size: 14px; }
  .flow, .roles, .trust, .contact { padding: 72px 0; }
  .role h3 { font-size: 23px; }
  .review { grid-template-columns: 96px 1fr; gap: 14px; }
  .form { padding: 22px 18px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .foot-copy { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .roll td::before, .js .sheet-note, .js .sheet-rate { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
