/* 탭풀 홈페이지. 색은 앱 디자인 토큰(docs/PLANNING.md)과 같다. */
:root {
  --bg: #FFFFFF;
  --soft: #F5F6F8;
  --card: #FFFFFF;
  --border: #E3E6EB;
  --text: #14171C;
  --sub: #5B6270;
  --primary: #2F5BEA;
  --primary-dark: #2447BD;
  --primary-soft: #EAF0FF;
  --star: #B45309;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(20, 23, 28, .04), 0 8px 24px rgba(20, 23, 28, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1115;
    --soft: #15181E;
    --card: #1A1D24;
    --border: #2A2F38;
    --text: #EEF0F3;
    --sub: #A3AAB6;
    --primary: #6E8BFF;
    --primary-dark: #8CA3FF;
    --primary-soft: #1E2645;
    --star: #F0A44B;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.center { text-align: center; justify-content: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--card); padding: 8px 12px; border-radius: 8px; }

/* 머리 */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.top-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; }
.brand.small { font-size: 15px; font-weight: 700; gap: 8px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--sub); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--text); }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 24px; border-radius: 14px;
  background: var(--primary); color: #fff; font-weight: 700; text-decoration: none;
  border: 1px solid var(--primary);
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--soft); border-color: var(--border); }
.btn-small { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* 첫 화면 */
.hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--primary-soft), var(--bg) 70%); }
.hero-row { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.kicker { color: var(--primary); font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; }
.lead { margin-top: 20px; font-size: 19px; color: var(--sub); max-width: 34em; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--sub); font-size: 15px; }
.hero-points li::before { content: "✓ "; color: var(--primary); font-weight: 700; }
.hero-shot { display: flex; justify-content: center; }

/* 휴대폰·브라우저 틀 */
.phone {
  margin: 0; width: min(320px, 80vw); padding: 10px;
  background: #14171C; border-radius: 40px; box-shadow: 0 30px 60px rgba(20, 23, 28, .18);
}
.phone img { border-radius: 30px; }
.phone.small { width: min(280px, 72vw); }
.theme-item { margin: 0; }
.phone.mini { width: 100%; padding: 6px; border-radius: 28px; box-shadow: 0 16px 32px rgba(20, 23, 28, .16); }
.phone.mini img { border-radius: 22px; }
.theme-item figcaption { text-align: center; margin-top: 12px; font-size: 15px; color: var(--sub); font-weight: 600; }
.themes { margin-top: 80px; text-align: center; }
.themes h3 { font-size: 26px; margin-bottom: 8px; }
.themes > p { color: var(--sub); font-size: 17px; }
.theme-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 32px auto 0; max-width: 900px; }
@media (max-width: 640px) { .theme-row { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
.browser { margin: 40px 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); }
.browser-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--soft); }
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }

/* 구역 */
.section { padding: 88px 0; }
.section-soft { background: var(--soft); }
.section h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.section-lead { margin-top: 14px; color: var(--sub); font-size: 18px; max-width: 40em; }
.center .section-lead { margin-inline: auto; }
.sub { margin: 40px 0 16px; font-size: 20px; }

.cards { display: grid; gap: 16px; margin-top: 40px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--sub); }
.icon { width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 앱 기능 */
.feature { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; margin-top: 64px; }
.feature.reverse { grid-template-columns: 1fr auto; }
.feature.reverse .phone { order: 2; }
.feature-text h3 { font-size: 26px; margin-bottom: 12px; }
.feature-text > p { color: var(--sub); font-size: 17px; }
.step { color: var(--primary); font-weight: 700; margin-bottom: 8px; }
.checks { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F5BEA' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.download {
  margin-top: 72px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow);
}
.download h3 { font-size: 22px; margin-bottom: 6px; }
.download p { color: var(--sub); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  min-width: 170px; height: 56px; padding: 0 20px; border-radius: 14px; background: var(--text); color: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; font-weight: 700;
}
.store.is-soon { background: transparent; color: var(--sub); border: 1px dashed var(--border); cursor: default; }
.store-soon { font-size: 12px; font-weight: 600; }

/* 학원 흐름 */
.flow { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: none; }
.flow li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.flow h3 { font-size: 18px; margin: 14px 0 6px; }
.flow p { color: var(--sub); font-size: 15px; }
.flow-no { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; }
.fine { margin-top: 14px; color: var(--sub); font-size: 14px; }

/* 요금제 */
.personal {
  margin-top: 32px; display: flex; gap: 24px; align-items: center; justify-content: space-between;
  background: var(--primary-soft); border-radius: var(--radius); padding: 24px 28px;
}
.personal h3 { font-size: 20px; margin-bottom: 4px; }
.personal p { color: var(--sub); }
.personal .plan-price { color: var(--primary); }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.plan h4 { font-size: 18px; }
.plan-price { font-size: 30px; font-weight: 800; margin-top: 10px; white-space: nowrap; letter-spacing: -0.02em; }
.plan-price span { font-size: 15px; font-weight: 600; color: var(--sub); }
.plan-note { color: var(--sub); font-size: 14px; margin-top: 4px; min-height: 2.8em; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-size: 15px; border-top: 1px solid var(--border); padding-top: 16px; }
.table-scroll { overflow-x: auto; margin-top: 24px; }
.plan-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; min-width: 560px; }
.plan-table th, .plan-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: center; font-variant-numeric: tabular-nums; }
.plan-table thead th { background: var(--soft); font-size: 15px; }
.plan-table tbody th { text-align: left; color: var(--sub); font-weight: 600; }
.plan-table tr:last-child th, .plan-table tr:last-child td { border-bottom: 0; }

/* 연간·기관 */
.yearly { margin-top: 16px; font-weight: 700; color: var(--primary); }
.yearly[hidden] { display: none; }
.enterprise {
  margin-top: 16px; display: flex; gap: 16px; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px;
}
.enterprise h4 { font-size: 17px; margin-bottom: 4px; }
.enterprise p { color: var(--sub); font-size: 15px; }
@media (max-width: 640px) { .enterprise { flex-direction: column; align-items: flex-start; } }

/* 질문 */
details { border-bottom: 1px solid var(--border); padding: 18px 0; }
details:first-of-type { margin-top: 24px; border-top: 1px solid var(--border); }
summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--sub); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin-top: 10px; color: var(--sub); }

/* 문의 */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.contact-item { display: grid; gap: 4px; text-decoration: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; color: var(--text); }
.contact-item:hover { border-color: var(--primary); }
.contact-label { color: var(--sub); font-size: 14px; }
.contact-value { font-weight: 700; font-size: 18px; }

.foot { border-top: 1px solid var(--border); padding: 28px 0; color: var(--sub); font-size: 14px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* 좁은 화면 */
@media (max-width: 960px) {
  .hero-row { grid-template-columns: 1fr; text-align: left; }
  .cards.three, .flow { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
  .feature, .feature.reverse { grid-template-columns: 1fr; gap: 28px; justify-items: center; }
  .feature.reverse .phone { order: 0; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .top-row .btn-small { margin-left: auto; }
  .hero { padding: 40px 0 32px; }
  .section { padding: 64px 0; }
  .cards.three, .flow, .plans, .contact { grid-template-columns: 1fr; }
  .personal { flex-direction: column; align-items: flex-start; }
  .download { padding: 24px; }
  .btn { flex: 1 1 auto; }
}
