/* TuTea 랜딩: 흰색에 초록을 아주 살짝 물탄 바탕 + 검은 글자. 초록은 애벌레와 펜(형광펜)에만 쓴다. */
:root {
  color-scheme: light;
  --ground: #fcfdfc;
  --paper: #ffffff;
  --ink: #0d0d0d;
  --muted: #5d625f;
  --line: #e6e8e6;
  --soft: #f1f3f1;
  --pen: #bbf7d0;
  --pen-strong: #16a34a;
  --on-ink: #ffffff;
  --on-ink-soft: #c9cecb;
  --body: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
/* 모든 구역이 같은 왼쪽 선에서 시작한다. 글이 긴 구역은 폭만 줄이고 가운데로 옮기지 않는다 */
.narrow > * { max-width: 760px; }
section { padding-block: 76px; }
h2 { font-size: clamp(26px, 4.2vw, 38px); line-height: 1.32; font-weight: 750; letter-spacing: -.025em; text-wrap: balance; }
h3 { font-size: 21px; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
.lead { color: var(--muted); max-width: 36em; margin-top: 14px; }
.note { font-size: 13.5px; color: var(--muted); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.top-link { font-size: 15px; font-weight: 600; }

.hero { padding-block: 4px 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 56px; align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.kicker { color: var(--muted); font-weight: 600; font-size: 16px; }
h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.2; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
.swipe { background: linear-gradient(transparent 64%, var(--pen) 64%, var(--pen) 94%, transparent 94%); padding-inline: 2px; white-space: nowrap; }
.hero-sub { color: var(--muted); max-width: 30em; font-size: 18px; }
.cta { display: inline-flex; justify-content: center; align-items: center; min-height: 54px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer; }
.cta:hover { background: #2a2d2b; }
.cta[disabled] { opacity: .55; cursor: default; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.cta-note { color: var(--muted); font-size: 15px; }
.hero-media { display: grid; gap: 10px; justify-items: center; min-width: 0; }
/* 릴스와 같은 세로 영상을 휴대폰 화면처럼 세운다 */
.hero-video { display: block; height: clamp(560px, calc(100vh - 128px), 840px); width: auto; aspect-ratio: 720 / 966; border-radius: 28px; background: var(--soft); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 40px 80px -36px rgba(0, 0, 0, .45); object-fit: cover; }
.hero-media figcaption { font-size: 13px; color: var(--muted); text-align: center; }
/* 두 시연 영상 고르기. 지금 도는 쪽에 진행 막대 */
.reels { display: flex; gap: 8px; justify-content: center; }
.reel { position: relative; overflow: hidden; min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 14px; font-weight: 650; cursor: pointer; }
.reel span { position: relative; }
.reel[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.reel[aria-pressed="true"]::before { content: ""; position: absolute; inset: 0; background: var(--pen); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* 네 가지 카드가 아래 시연 장면을 고른다. 고른 카드에 진행 막대(--p) */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.card { position: relative; overflow: hidden; display: grid; gap: 8px; align-content: start; min-width: 0; padding: 20px 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.card b { font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.card span { color: var(--muted); font-size: 15px; line-height: 1.6; }
.card:hover { border-color: #c9cdca; }
.card[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 14px 30px -18px rgba(0, 0, 0, .3); }
.card[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--pen-strong); transform-origin: left; transform: scaleX(var(--p, 0)); }
.clip { display: grid; gap: 10px; margin-top: 20px; }
.clip-video { display: block; width: min(100%, calc((100vh - 250px) * 16 / 9)); margin-inline: auto; height: auto; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--soft); box-shadow: 0 0 0 1px var(--line), 0 24px 60px -30px rgba(0, 0, 0, .3); }
.clip figcaption { font-size: 13px; color: var(--muted); text-align: center; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 36px; counter-reset: s; }
.steps li { display: grid; gap: 8px; align-content: start; counter-increment: s; min-width: 0; border-top: 2px solid var(--ink); padding-top: 14px; }
.steps li::before { content: counter(s); font-size: 15px; font-weight: 700; color: var(--muted); }
.steps p { color: var(--muted); }

.diff { background: var(--paper); }
.asked { font-size: 15px; color: var(--muted); margin-top: 28px; }
.asked b { color: var(--ink); font-size: 18px; margin-left: 6px; }
.asked span { margin-left: 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.pen { background: linear-gradient(transparent 62%, var(--pen) 62%, var(--pen) 96%, transparent 96%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* 같은 질문에 대한 두 화면. 왼쪽은 이름 없는 일반 챗봇, 오른쪽은 TuTea 수업 화면을 본뜬 예시 */
.screens { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; max-width: 980px; margin-top: 16px; }
.screen { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; border-radius: 16px; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 20px 50px -30px rgba(0, 0, 0, .3); }
.screen.ours { box-shadow: 0 0 0 1.5px var(--ink), 0 24px 56px -28px rgba(0, 0, 0, .35); }
.scr-top { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.scr-top i { width: 9px; height: 9px; border-radius: 50%; background: #d9dcda; }
.scr-top i + span, .scr-top i:last-of-type + span { margin-left: 6px; }
.scr-top b { color: var(--ink); font-size: 13.5px; }
.scr-top em { margin-left: auto; font-style: normal; }
.scr-body { display: flex; flex-direction: column; gap: 10px; padding: 14px; min-width: 0; font-size: 14px; line-height: 1.6; }
.bot { background: #f6f7f6; }
.bot .scr-body { background: #f6f7f6; }
.bot-me { align-self: flex-end; max-width: 80%; background: #e4e6e4; border-radius: 16px 16px 4px 16px; padding: 8px 13px; }
.bot-ans { display: grid; gap: 8px; color: #2b2f2d; }
.scr-input { margin-top: auto; border: 1px solid #d9dcda; border-radius: 999px; padding: 9px 16px; color: #9ca29f; background: var(--paper); font-size: 13.5px; }
/* 오른쪽: TuTea 시연 영상 (세로판). 왼쪽 챗봇 칸도 같은 높이로 늘어난다 */
.screen.ours { background: var(--paper); }
.vs-video { display: block; width: 100%; height: auto; aspect-ratio: 720 / 966; background: var(--soft); }
/* 왼쪽 챗봇: 질문이 뜨고 답이 낱말째 흘러나온다 (자바스크립트가 없으면 처음부터 다 보임) */
.bot-me.on, .bot-ans .w.on { visibility: visible; }
.js-ready .bot-me, .js-ready .bot-ans .w { visibility: hidden; }
.vs-again { max-width: 980px; margin-top: 14px; text-align: center; }
.vs-again button { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 650; cursor: pointer; }
.vs-again button:hover { background: var(--soft); }
.screen figcaption { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; background: var(--paper); }
.bot figcaption { color: var(--muted); }

/* 전체 차이 표 */
.vs { width: 100%; border-collapse: collapse; margin-top: 36px; font-size: 15.5px; }
.vs caption { text-align: left; font-size: 19px; font-weight: 750; padding-bottom: 10px; }
.vs th, .vs td { text-align: left; vertical-align: top; padding: 13px 14px; border-top: 1px solid var(--line); }
.vs thead th { border-top: 0; font-size: 14px; color: var(--muted); font-weight: 650; }
.vs thead th:last-child { color: var(--ink); }
.vs tbody th { width: 9.5em; font-weight: 700; }
.vs td { color: var(--muted); width: 36%; }
.vs td:last-child { color: var(--ink); font-weight: 600; background: color-mix(in srgb, var(--pen) 22%, transparent); }
.diff .note { margin-top: 12px; }

/* 검은 띠는 한 덩어리의 이야기라 가운데로 모은다 (다른 구역은 왼쪽 선) */
.maker { background: var(--ink); color: var(--on-ink); text-align: center; }
.maker h2 { max-width: 760px; margin-inline: auto; }
.maker p { color: var(--on-ink-soft); max-width: 36em; margin: 14px auto 0; }
.maker-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 640px; margin: 32px auto 0; border-top: 1px solid #333836; padding-top: 24px; }
.maker-facts li { display: grid; gap: 2px; min-width: 0; }
.maker-facts b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.maker-facts span { color: var(--on-ink-soft); font-size: 14.5px; }
/* 실제 신청 수: 정한 수를 넘었을 때만 보인다 (/api/count) */
.count { color: var(--ink); font-weight: 700; margin-right: 6px; }
.count::after { content: " ·"; color: var(--muted); font-weight: 400; }
.count-line { margin-top: 8px; font-weight: 700; }

.facts { display: grid; margin-top: 28px; }
.facts li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 16px; padding-block: 14px; border-top: 1px solid var(--line); }
.facts b { font-weight: 700; }
.facts span { color: var(--muted); }

.faq { background: var(--paper); }
.faq-list { margin-top: 24px; }
details { border-top: 1px solid var(--line); padding-block: 14px; }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 16px; font-weight: 700; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; color: var(--muted); font-weight: 500; }
details[open] > summary::after { content: "−"; }
.terms summary { justify-content: flex-start; }
.terms summary::after { content: none; }
details p { color: var(--muted); margin-top: 8px; }

.join { scroll-margin-top: 16px; }
.join-head { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; align-items: center; }
.join-head img { display: block; width: 150px; height: auto; }
.form, .done { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 16px; margin-top: 24px; }

.done p { color: var(--muted); }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-weight: 600; font-size: 16px; }
.field small { color: var(--muted); font-weight: 500; }
.field input { width: 100%; padding: 12px 13px; border: 1px solid #c9cdca; border-radius: 10px; background: var(--paper); color: var(--ink); min-height: 48px; }
.field input[aria-invalid="true"] { border-color: #b42318; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.agree { display: grid; gap: 8px; }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: 15px; color: var(--ink); align-items: start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--ink); }
.terms { border: 0; padding: 0 0 0 30px; font-size: 14px; }
.terms summary { font-weight: 600; color: var(--muted); font-size: 14px; }
.terms ul { display: grid; gap: 4px; margin-top: 6px; color: var(--muted); background: var(--ground); border-radius: 10px; padding: 12px 14px; }
.terms b { color: var(--ink); margin-right: 6px; }
.form .cta { width: 100%; }
.status { font-size: 15px; font-weight: 600; min-height: 1.5em; }
.status.err { color: #b42318; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.share-note { color: var(--muted); font-size: 15px; }
footer { padding-block: 28px 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

.dock { display: none; }
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 8px 48px; }
  .hero-video { height: auto; width: min(100%, 480px); border-radius: 22px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .screens { grid-template-columns: minmax(0, 1fr); }
  section { padding-block: 56px; }
  .facts li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .top-link { display: none; }
  .cta-row .cta { display: none; }
  .dock { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--paper); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .dock .cta { display: flex; }
  .dock[hidden] { display: none !important; }
  footer { padding-bottom: 100px; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .two { grid-template-columns: minmax(0, 1fr); }
  .join-head { grid-template-columns: minmax(0, 1fr) 96px; }
  .join-head img { width: 96px; }
}
/* 마우스가 없는 기기(휴대폰·태블릿)는 '누르면'으로 안내 */
.hint-touch { display: none; }
@media (hover: none) {
  .hint-hover { display: none; }
  .hint-touch { display: inline; }
}
/* 휴대폰: 네 카드를 옆으로 넘기는 한 줄로 두어 바로 아래 영상과 한 화면에 보이게, 영상은 세로판. 차이표는 항목마다 두 칸 */
@media (max-width: 700px) {
  .cards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -20px; padding: 2px 20px 8px; scrollbar-width: none; }
  .cards::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 80%; scroll-snap-align: center; padding: 16px 16px 18px; }
  .clip-video { width: min(100%, 420px); aspect-ratio: 720 / 966; border-radius: 22px; }
  .vs { margin-top: 28px; }
  .vs thead { display: none; }
  .vs tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--line); }
  .vs tbody th { grid-column: 1 / -1; width: auto; border-top: 0; padding: 12px 10px 4px; }
  .vs td { width: auto; border-top: 0; padding: 6px 10px 12px; }
  .vs td::before { content: attr(data-l); display: block; margin-bottom: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
  .maker-facts b { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
