/* 설명하며 배우는 AI 생활수학 — 소개 페이지. 색은 학습 화면(style.css)과 같은 계열 */
:root {
  --ink: #20253b;
  --ink-2: #4b546b;
  --muted: #5f6880;
  --blue: #4250d8;
  --blue-deep: #2f3ab4;
  --blue-soft: #eef0ff;
  --blue-line: #dadffc;
  --green: #286b59;
  --green-soft: #e4efe9;
  --yellow: #ffe7a4;
  --yellow-deep: #f4d88d;
  --coral: #e0614f;
  --line: #e3e5ed;
  --paper: #ffffff;
  --bg: #f6f5f1;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans CJK KR", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  letter-spacing: -0.01em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; text-decoration: none; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  font-weight: 750; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn-lg { min-height: 58px; padding: 0 28px; font-size: 16px; border-radius: 16px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px -12px rgb(66 80 216 / .7); }
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-2px); }
.btn-line { border: 1.5px solid #cfd3e2; color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: rgb(32 37 59 / .05); }
.arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
[hidden] { display: none !important; }

/* 상단 바 */
.bar { position: sticky; top: 0; z-index: 20; background: rgb(246 245 241 / .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.bar.scrolled { border-bottom-color: var(--line); }
.bar-in { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; letter-spacing: -0.03em; }
.brandmark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--blue); color: #fff; font-size: 17px; }
.brand.small { font-size: 14px; font-weight: 700; }
.brand.small .brandmark { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }
.bar-nav { display: flex; gap: 4px; margin-left: auto; }
.bar-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.bar-nav a:hover { color: var(--ink); background: rgb(32 37 59 / .05); }
.bar-act { display: flex; align-items: center; gap: 6px; }

/* 첫 화면 */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgb(66 80 216 / .15); }
h1 { isolation: isolate; margin-top: 24px; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.12; letter-spacing: -0.05em; font-weight: 850; }
h1 em, .h2 em { font-style: normal; color: var(--blue); position: relative; }
h1 em::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: 0.08em; height: 0.28em; background: var(--yellow); z-index: -1; border-radius: 4px; transform-origin: left; animation: mark 1s .6s var(--ease) both; }
@keyframes mark { from { transform: scaleX(0); } }
.lead { margin-top: 24px; max-width: 34em; font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--ink-2); }
.lead b { color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.cta-row.center { justify-content: center; }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 28px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.facts li { display: grid; gap: 2px; }
.facts b { font-size: 20px; letter-spacing: -0.03em; }
.facts span { font-size: 13px; color: var(--muted); }

/* 기준 실험실 */
.lab { position: relative; padding: clamp(22px, 3vw, 32px); border-radius: 26px; background: var(--paper); border: 1px solid var(--line); box-shadow: 14px 14px 0 -1px var(--blue-soft), 0 40px 80px -48px rgb(32 37 59 / .45); }
.lab-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lab-title { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.lab-sub { font-size: 13px; color: var(--muted); }
.moa-line { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; }
.bubble { position: relative; flex: 1; padding: 12px 16px; border-radius: 4px 16px 16px 16px; background: var(--blue-soft); border: 1px solid var(--blue-line); font-weight: 650; font-size: 15px; line-height: 1.55; }
.who { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 750; color: var(--blue); }

/* 모아 얼굴(학습 화면과 같은 캐릭터) */
.avatar { flex: none; position: relative; width: 92px; height: 100px; border-radius: 31px 31px 26px 26px; background: var(--yellow); box-shadow: inset 0 -7px var(--yellow-deep); }
.avatar::before { content: ""; position: absolute; top: 32%; left: 28%; width: 8.5%; height: 12%; background: #30364f; border-radius: 5px; box-shadow: calc(var(--eye, 32px)) 0 #30364f; animation: blink 5s infinite; }
.avatar::after { content: ""; position: absolute; top: 60%; left: 42%; width: 15%; height: 7%; border-bottom: 3px solid #30364f; border-radius: 50%; }
.avatar.sm { --eye: 15px; width: 44px; height: 48px; border-radius: 15px 15px 13px 13px; box-shadow: inset 0 -4px var(--yellow-deep); }
.avatar.sm::after { border-bottom-width: 2px; }
.avatar.lg { --eye: 40px; width: 112px; height: 122px; border-radius: 38px 38px 32px 32px; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.ctrl label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ctrl output { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--blue) var(--p, 33%), #e2e5f1 var(--p, 33%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: #e2e5f1; }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--blue); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); box-shadow: 0 4px 10px -2px rgb(66 80 216 / .5); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); }
input[type="range"].up { --c: var(--green); }
input[type="range"].up::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--green) var(--p, 33%), #e2e5f1 var(--p, 33%)); }
input[type="range"].up::-webkit-slider-thumb { border-color: var(--green); box-shadow: 0 4px 10px -2px rgb(40 107 89 / .5); }
input[type="range"].up::-moz-range-progress { background: var(--green); }
input[type="range"].up::-moz-range-thumb { border-color: var(--green); }

.bars { display: grid; gap: 12px; margin-top: 18px; }
.bar-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 82px; align-items: center; gap: 12px; }
.bar-label { font-size: 13px; font-weight: 650; color: var(--muted); }
.track { position: relative; height: 34px; border-radius: 10px; background: #f1f2f7; overflow: hidden; }
.fill { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: 10px; transition: width .6s var(--ease); }
.f0 { background: #c9cee3; }
.f1 { background: var(--blue); }
.f2 { background: var(--green); }
.cut { position: absolute; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(-45deg, rgb(224 97 79 / .22) 0 6px, rgb(224 97 79 / .08) 6px 12px); transition: width .6s var(--ease); }
.ghostline { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .55; transition: left .6s var(--ease); }
.ghostline::after { content: "처음"; position: absolute; top: 8px; left: 6px; font-size: 11px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.bar-val { font-weight: 800; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.verdict { margin-top: 20px; padding: 16px 18px; border-radius: 16px; background: var(--bg); }
.v-key { font-size: 14px; color: var(--ink-2); }
.v-key b { color: var(--blue); }
.v-res { margin-top: 2px; font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.v-res b { color: var(--coral); }
.v-res b.even { color: var(--green); }

/* 공통 섹션 */
.sec { padding: clamp(80px, 11vw, 140px) 0; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--blue); }
.eyebrow.on-blue { color: #c9cdff; }
.h2 { margin-top: 14px; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.22; letter-spacing: -0.045em; font-weight: 850; }

/* 진행 방식 */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; counter-reset: s; }
.step { position: relative; padding: 26px 24px 28px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.step:not(:last-child)::after { content: ""; position: absolute; top: 42px; right: -13px; width: 10px; height: 10px; border-top: 2px solid #c9cee3; border-right: 2px solid #c9cee3; transform: rotate(45deg); }
.step-no { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: 14px; }
.step:nth-child(2) .step-no { background: var(--yellow); color: #6b4d00; }
.step:nth-child(4) .step-no { background: var(--green-soft); color: var(--green); }
.step h3 { margin-top: 18px; font-size: 19px; letter-spacing: -0.03em; }
.step p { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.mode { padding: 28px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.mode-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 750; }
.mode-tag.tag-green { background: var(--green-soft); color: var(--green); }
.mode h3 { margin-top: 14px; font-size: 21px; letter-spacing: -0.03em; }
.mode p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }

/* 모아 소개 */
.sec-blue { background: var(--blue); color: #fff; position: relative; overflow: hidden; }
.sec-blue::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%; background: rgb(255 255 255 / .06); }
.moa-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.sec-blue .h2 em { color: var(--yellow); }
.lead.on-blue { color: #dfe2ff; }
.chat { display: grid; gap: 14px; padding: clamp(20px, 3vw, 30px); border-radius: 26px; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .18); }
.msg { display: flex; gap: 12px; align-items: flex-end; }
.msg p { max-width: 84%; padding: 13px 16px; font-size: 15px; line-height: 1.6; }
.msg.moa p { border-radius: 16px 16px 16px 4px; background: #fff; color: var(--ink); font-weight: 600; }
.msg.me { justify-content: flex-end; }
.msg.me p { border-radius: 16px 16px 4px 16px; background: var(--ink); color: #fff; }
.chat-note { font-size: 12px; color: #c9cdff; text-align: center; }

/* 기록과 보관 */
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.trust li { padding: 26px 24px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.t-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--green-soft); }
.t-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trust h3 { margin-top: 18px; font-size: 18px; letter-spacing: -0.03em; }
.trust p { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); }
.note { margin-top: 22px; font-size: 14px; color: var(--muted); }

/* 마지막 */
.end { padding: 0 0 clamp(80px, 11vw, 140px); }
.end-in { display: grid; justify-items: center; text-align: center; padding: clamp(48px, 7vw, 88px) 24px; border-radius: 32px; background: var(--paper); border: 1px solid var(--line); }
.end-in .h2 { margin-top: 24px; }
.end-in .lead { margin-top: 10px; }

.foot { border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 28px 0; font-size: 13px; color: var(--muted); }

/* 스크롤하면 떠오르기(스크립트가 .in을 붙인다) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.hero-copy > *, .lab { animation: rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-copy > :nth-child(3) { animation-delay: .12s; }
.hero-copy > :nth-child(4) { animation-delay: .18s; }
.hero-copy > :nth-child(5) { animation-delay: .24s; }
.lab { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* 좁은 화면 */
@media (max-width: 960px) {
  .hero-grid, .moa-grid { grid-template-columns: 1fr; }
  .steps, .trust { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2)::after { display: none; }
  .bar-nav { display: none; }
  .bar-act { margin-left: auto; }
}
@media (max-width: 600px) {
  .bar-in { height: 64px; gap: 12px; }
  .brand { font-size: 17px; }
  .bar-act .resume { display: none !important; }
  .steps, .trust, .modes { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .controls { grid-template-columns: 1fr; gap: 4px; }
  .bar-row { grid-template-columns: 62px minmax(0, 1fr) 74px; gap: 8px; }
  .facts { grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
  .facts b { font-size: 17px; }
  .cta-row .btn { flex: 1 1 100%; }
  .msg p { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
