/*
 * Lernes 랜딩 공통 스타일.
 * 색 토큰은 lerni-scheduler/lib/ui.ts 의 COLORS 와 1:1 미러다 — 값을 바꾸면 앱 쪽도 함께 본다.
 * 앱이 라이트 전용 디자인이라 사이트도 color-scheme: light 로 고정한다.
 */

:root {
  color-scheme: light;

  /* Figma primary/* */
  --blue-50: #dff0ff;
  --blue-100: #c3e4ff;
  --blue-500: #2a91e7;
  --blue-600: #007adf;
  --blue-900: #004ccf;

  /* Figma secondary/* */
  --navy-500: #003756;
  --navy-600: #092738;
  --navy-700: #081720;

  /* Figma gray/* */
  --grey-50: #f9fafb;
  --grey-100: #f3f4f6;
  --grey-200: #e5e7eb;
  --grey-300: #c1c5cc;
  --grey-400: #9ca3af;
  --grey-500: #6b7280;
  --grey-600: #4b5563;
  --grey-900: #111827;

  /* 시맨틱 */
  --brand: var(--blue-500);
  --brand-strong: var(--blue-600);
  --brand-weak: var(--blue-50);
  --ink: var(--grey-900);
  --ink-sub: var(--grey-600);
  --ink-weak: var(--grey-400);
  --line: var(--grey-200);
  --hairline: #edeff2;
  --surface: #ffffff;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-card: 0 2px 15px rgba(0, 0, 0, 0.05);
  --max: 1120px;
  --nav-h: 68px;

  /* 자연스러운 감속 — 기본 ease 보다 끝맺음이 부드럽다 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* 앵커로 이동할 때 고정 헤더 아래로 파묻히지 않게 */
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui,
    'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 한글은 어절 단위로 끊는다 — 없으면 "바로 공/부해요" 처럼 낱말 중간에서 줄이 바뀐다. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
}

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

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0;
}

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

/* ------------------------------------------------------- 스크롤 인 연출 */

/*
 * 기본값은 "보이는 상태" — JS 가 꺼져 있거나 모션을 끈 사용자에게도 내용이 그대로 보인다.
 * JS 가 .reveal--armed 를 붙인 뒤에만 숨겼다가 뷰포트에 들어올 때 올려 보여준다.
 */
.reveal--armed {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal--armed.reveal--slow {
  transform: translateY(22px);
  transition-duration: 0.9s;
}

.reveal--armed.is-in {
  opacity: 1;
  transform: none;
}

/* 목록은 한 줄씩 살짝 밀려서 들어온다 */
.list__row.reveal--armed:nth-child(2) {
  transition-delay: 60ms;
}
.list__row.reveal--armed:nth-child(3) {
  transition-delay: 120ms;
}
.list__row.reveal--armed:nth-child(4) {
  transition-delay: 180ms;
}
.list__row.reveal--armed:nth-child(5) {
  transition-delay: 240ms;
}
.list__row.reveal--armed:nth-child(6) {
  transition-delay: 300ms;
}

.step.reveal--armed:nth-child(2) {
  transition-delay: 90ms;
}
.step.reveal--armed:nth-child(3) {
  transition-delay: 180ms;
}

/* ---------------------------------------------------------------- 헤더 */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0);
  transition: box-shadow 0.25s var(--ease);
}

.nav.is-stuck {
  box-shadow: 0 1px 0 var(--hairline);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
}

/* 터치 영역 확보 — 로고·메뉴 링크 모두 세로 패딩으로 45px 안팎을 만든다 */
.nav__logo {
  display: inline-flex;
  align-items: center;
  padding-block: 12px;
}

.nav__logo svg {
  display: block;
  height: 21px;
  width: auto;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-sub);
}

.nav__menu a {
  padding-block: 12px;
  transition: color 0.15s var(--ease);
}

.nav__menu a:hover {
  color: var(--ink);
}

/*
 * 헤더 CTA 는 알약 버튼 대신 밑줄 링크 — 페이지 전체 톤을 조용하게 유지한다.
 * 밑줄은 border 가 아니라 text-decoration 이어야 한다. border 로 하면 위의
 * padding-block(터치 영역)만큼 밑줄이 글자에서 떨어져 내려간다.
 */
.nav__cta {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.nav__cta:hover {
  color: var(--brand-strong);
}

/* ---------------------------------------------------------------- 버튼 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.12s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}

.btn--primary:hover {
  background: #000;
}

.btn--quiet {
  background: transparent;
  color: var(--ink-sub);
  border-color: var(--line);
}

.btn--quiet:hover {
  color: var(--ink);
  border-color: var(--grey-300);
}

.btn--onbrand {
  background: #fff;
  color: var(--navy-700);
}

.btn--onbrand:hover {
  background: var(--brand-weak);
}

.btn--outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn--outline:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

/* ---------------------------------------------------------------- 히어로 */

/*
 * 히어로 배경은 **순백**이어야 한다. 옅게라도 톤을 깔면 그 위에 놓인 앱 스크린샷
 * (흰 배경의 불투명 이미지)이 흰 사각형으로 도드라진다. 화면의 리듬은 아래
 * .screens 의 회색 면과 섹션 사이 헤어라인이 만든다.
 */
.hero {
  padding: 72px 0 92px;
  background: var(--surface);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}

h1 {
  font-size: clamp(34px, 4.8vw, 54px);
  line-height: 1.2;
}

.hero__lead {
  margin: 22px 0 0;
  max-width: 27em;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-sub);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.hero__note {
  margin: 20px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-weak);
}

.hero__shot {
  display: flex;
  justify-content: center;
}

/*
 * 원본이 흰 배경 위의 기기 사진이라 아래쪽을 그라데이션 마스크로 흐려 잘린 티를 없앤다.
 * (배경이 불투명해서 drop-shadow 는 사각형 그림자가 되므로 쓰지 않는다)
 */
.hero__shot img {
  width: 100%;
  max-width: 352px;
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
}

/* ------------------------------------------------------------ 기능 목록 */

.feature-sec {
  padding: 104px 0;
  border-top: 1px solid var(--hairline);
}

/* 왼쪽 제목은 스크롤을 따라 붙어 있고 오른쪽 목록만 흐른다 */
.split {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 64px;
  align-items: start;
}

.split__aside {
  position: sticky;
  top: calc(var(--nav-h) + 48px);
}

.split__aside h2 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.35;
}

.split__lead {
  margin: 16px 0 0;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink-sub);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list__row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0 12px;
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
}

.list__row:first-child {
  border-top: 0;
  padding-top: 0;
}

.list__row:last-child {
  padding-bottom: 0;
}

.list__num {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--grey-300);
  padding-top: 3px;
}

.list__row h3 {
  font-size: 18px;
  line-height: 1.5;
}

.list__row p {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-sub);
}

/* ------------------------------------------------------------ 앱 화면 */

.screens {
  padding: 96px 0 104px;
  background: var(--grey-50);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}

.screens__head h2 {
  font-size: clamp(24px, 2.8vw, 32px);
}

/*
 * 스트립은 화면 폭을 다 쓰되 왼쪽 정렬은 본문 컬럼에 맞춘다(풀블리드 + 컬럼 정렬).
 * 데스크톱에서도 넘치면 그대로 가로 스크롤된다.
 */
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 200px;
  gap: 18px;
  margin-top: 40px;
  /* 100vw 가 아니라 100% — vw 는 스크롤바 폭을 포함해서 본문 컬럼과 몇 px 어긋난다 */
  padding: 0 max(24px, calc((100% - var(--max)) / 2 + 24px)) 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.shots::-webkit-scrollbar {
  display: none;
}

.shot {
  margin: 0;
  scroll-snap-align: start;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06), 0 12px 28px -18px rgba(17, 24, 39, 0.35);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ------------------------------------------------------------ 이용 방법 */

.how {
  padding: 104px 0;
}

.how h2 {
  font-size: clamp(24px, 2.8vw, 32px);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 48px;
}

.step {
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.step:nth-child(2),
.step:nth-child(3) {
  border-top-color: var(--line);
}

.step__num {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-weak);
  margin-bottom: 10px;
}

.step h3 {
  font-size: 18px;
}

.step p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-sub);
}

/* ---------------------------------------------------------------- CTA */

.cta-sec {
  padding: 0 0 104px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 56px 48px;
  border-radius: var(--radius-lg);
  background: var(--navy-700);
  color: #fff;
}

.cta__copy h2 {
  font-size: clamp(23px, 2.4vw, 29px);
  line-height: 1.4;
}

.cta__copy p {
  margin: 12px 0 0;
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.62);
}

.cta__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------------------------------------------------------- 푸터 */

.footer {
  border-top: 1px solid var(--hairline);
  padding: 48px 0 64px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__logo svg {
  height: 18px;
  width: auto;
  display: block;
}

.footer__corp {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-weak);
}

.footer__corp a:hover {
  color: var(--ink-sub);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-top: -11px; /* 링크 세로 패딩만큼 되돌려 시각적 위치는 그대로 */
  font-size: 14px;
  color: var(--ink-sub);
}

/* 줄바꿈되면 링크가 세로로 붙는다 — 패딩으로 44px 터치 영역을 만들어 오터치를 막는다 */
.footer__links a {
  padding-block: 11px;
  transition: color 0.15s var(--ease);
}

.footer__links a:hover {
  color: var(--ink);
}

/* ---------------------------------------------------------------- 문서 */

.doc {
  padding: 56px 0 104px;
}

.doc__wrap {
  max-width: 760px;
}

.doc__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 11px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-sub);
  margin: -11px 0 20px;
}

.doc__back:hover {
  color: var(--brand-strong);
}

.doc h1 {
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.35;
}

.doc__meta {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-weak);
}

.doc__hr {
  height: 1px;
  background: var(--hairline);
  border: 0;
  margin: 32px 0;
}

/* 본문은 tools/gen-legal.mjs 가 Notion 블록에서 뽑아낸 마크업이다 — 태그 선택자로 잡는다. */

.doc__body {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-sub);
}

.doc__body h2 {
  margin: 40px 0 12px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
}

.doc__body h3 {
  margin: 32px 0 10px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
}

.doc__body h4 {
  margin: 24px 0 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}

.doc__body > *:first-child {
  margin-top: 0;
}

.doc__body p {
  margin: 0 0 12px;
}

.doc__body strong {
  color: var(--ink);
  font-weight: 700;
}

.doc__body a {
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

.doc__body ol,
.doc__body ul {
  margin: 0 0 14px;
  padding-inline-start: 1.5em;
}

.doc__body li {
  margin: 0 0 6px;
}

.doc__body li > ol,
.doc__body li > ul {
  margin: 6px 0 2px;
}

/* 중첩 번호 목록은 1. → 가. → ① 순으로 눈에 띄게 구분한다. */
.doc__body ol {
  list-style: decimal;
}

.doc__body ol ol {
  list-style: hangul;
}

.doc__body ol ol ol {
  list-style: cjk-decimal;
}

.doc__body blockquote {
  margin: 0 0 14px;
  padding-inline-start: 14px;
  border-inline-start: 3px solid var(--line);
}

.doc__callout {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--grey-50);
  border: 1px solid var(--hairline);
}

/* 표는 좁은 화면에서 자기 컨테이너 안에서만 가로 스크롤한다(페이지 본문은 안 밀리게). */
.doc__tablewrap {
  margin: 0 0 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.doc__tablewrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.65;
}

.doc__tablewrap th,
.doc__tablewrap td {
  padding: 10px 14px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  border-inline-end: 1px solid var(--line);
}

.doc__tablewrap th:last-child,
.doc__tablewrap td:last-child {
  border-inline-end: 0;
}

.doc__tablewrap tbody tr:last-child th,
.doc__tablewrap tbody tr:last-child td {
  border-bottom: 0;
}

.doc__tablewrap thead th {
  background: var(--grey-50);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.doc__tablewrap tbody th {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.doc__body code {
  font-size: 0.9em;
  background: var(--grey-100);
  border-radius: 4px;
  padding: 1px 5px;
}

.doc__contact {
  margin-top: 44px;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--grey-50);
  border: 1px solid var(--hairline);
  font-size: 14.5px;
  color: var(--ink-sub);
}

.doc__contact a {
  font-weight: 700;
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------------- 반응형 */

@media (max-width: 1000px) {
  .split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .split__aside {
    position: static;
  }
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .br-lg {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .step:nth-child(2),
  .step:nth-child(3) {
    border-top-color: var(--ink);
  }

  .cta {
    padding: 44px 32px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 48px 0 64px;
  }

  .feature-sec,
  .how {
    padding: 72px 0;
  }

  .screens {
    padding: 72px 0 80px;
  }

  .cta-sec {
    padding-bottom: 72px;
  }

  /*
   * 모바일에서도 섹션 링크를 남긴다. 4,000px 넘는 페이지에서 헤더 링크를 숨기면
   * 이동 수단이 사라진다. 13px / gap 16px 면 375px 폭에 로고까지 다 들어간다(실측 360px).
   */
  .nav__menu {
    gap: 16px;
    font-size: 13px;
  }

  /* 좁은 화면에서는 버튼을 폭 전체로 — 들쭉날쭉한 너비보다 누르기 쉽다 */
  .hero__cta,
  .cta__row {
    display: grid;
    gap: 10px;
  }

  .shots {
    grid-auto-columns: 232px;
  }

  .cta {
    padding: 36px 24px;
    border-radius: var(--radius);
  }

  .footer__inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
