/* css/service.css — StudyCrack 서비스 소개 페이지
   디자인 시스템: 메인 사이트(style.css) 토큰 기준 통일
   ======================================================== */

/* =========================================
   0. Design Tokens (main site 일치)
   ========================================= */
:root {
  --primary: #4c79ee;
  --primary-dark: #344e8f;
  --purple: #7141d9;
  --text: #2c2c2c;
  --muted: #64748b;
  --card: #f1f4fb;
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --shadow: 10px 20px 35px rgba(0,0,0,.12);
  --shadow-card: 0 4px 20px rgba(76,121,238,.08);
  --container: 1040px;
  --navy: #1e293b;
}

/* =========================================
   1. 기본 설정
   ========================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 83px; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; font-family: "Paperlogy", system-ui, -apple-system, BlinkMacSystemFont, sans-serif; color: var(--text); background: #fff; line-height: 1.5; letter-spacing: -0.02em; word-break: keep-all; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

/* =========================================
   3. 공통 레이아웃
   ========================================= */
.service-page { width: min(100%, var(--container)); margin: 0 auto; padding-top: 83px; }
.section-label { margin: 0 0 14px; font-size: 14px; font-weight: 800; color: var(--primary); letter-spacing: .06em; text-transform: uppercase; }
.btn { min-height: 52px; padding: 0 28px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 800; font-family: inherit; cursor: pointer; border: 0; transition: background .18s, transform .18s, box-shadow .18s; letter-spacing: -0.01em; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 22px rgba(76,121,238,.28); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(76,121,238,.36); }
.btn-secondary { background: #fff; color: var(--navy); border: 1.5px solid #d4dff5; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-lg { min-height: 58px; padding: 0 36px; font-size: 17px; }
.btn-arrow { font-size: 1.1em; line-height: 1; }

/* =========================================
   4. Hero Section
   ========================================= */
.hero-section { padding: 64px 44px 52px; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: 18px; align-items: start; background: radial-gradient(circle at 10% 30%, rgba(76,121,238,.07) 0%, transparent 44%); overflow: visible; }
.eyebrow { margin: 0 0 16px; font-size: 16px; font-weight: 800; color: var(--primary); }
.hero-copy h1 { margin: 0; font-size: clamp(36px, 4.5vw, 52px); line-height: 1.18; letter-spacing: -0.04em; color: var(--navy); }
.hero-copy h1 strong { color: var(--primary); }
.hero-desc { margin: 28px 0 0; font-size: 17px; line-height: 1.75; font-weight: 500; color: #3d526e; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.safe-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; display: flex; gap: 7px; align-items: center; }
.safe-note i { color: var(--primary); font-size: 13px; }

/* Hero Visual — 실제 서비스 이미지 */
.hero-copy { position: relative; z-index: 2; padding-top: 32px; width: 100%; margin-right: 0; }
.hero-visual { display: flex; align-items: flex-start; justify-content: flex-start; position: relative; z-index: 1; padding-top: 50px; transform: translateX(-24px); }
.hero-device-img { width: 100%; max-width: 600px; height: auto; object-fit: contain; filter: drop-shadow(0 16px 36px rgba(16,33,63,.1)); }

/* =========================================
   5. Message Band
   ========================================= */
.message-band { margin: 28px 44px; padding: 30px 36px; display: grid; grid-template-columns: 80px 1fr; gap: 24px; align-items: center; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(135deg, #1e3a8a, #1e293b); box-shadow: 0 14px 34px rgba(30,58,138,.22); }
.band-icon { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #6d96ff); box-shadow: inset 0 0 0 5px rgba(255,255,255,.12); font-size: 28px; }
.message-band p { margin: 0; font-size: 19px; line-height: 1.5; }
.message-band strong { font-size: 22px; line-height: 1.45; }
.message-band em { color: #fbbf24; font-style: normal; }

/* =========================================
   6. Process Section
   ========================================= */
.formula-section h2, .plan-section h2 { margin: 0; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.25; letter-spacing: -0.035em; color: var(--navy); }
/* (2026-05-23) process/sim-preview/star-badge 등 process-card 섹션 관련
   중복 정의를 모두 제거 → /css/style.css의 단일 정의를 따르도록 정리.
   서비스 페이지의 3단계 카드 디자인이 index 페이지와 100% 일치하게 됨. */

.circle-arrow { position: absolute; right: 16px; top: 16px; transform: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: #fff; box-shadow: 0 8px 24px rgba(76,121,238,.16); font-size: 16px; transition: background .18s, color .18s; }
.circle-arrow:hover { background: var(--primary); color: #fff; }

/* =========================================
   7. Formula Section
   ========================================= */
.formula-section { margin: 16px 44px 52px; padding: 36px 44px; border: 1px solid #e2eaf8; border-radius: var(--radius-lg); background: linear-gradient(135deg, #f8fbff, #f1f6ff); text-align: center; }
.formula-section h2 { text-align: center; }
.formula-row { margin: 36px auto 24px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 120px; gap: 14px; align-items: center; }
.op { color: var(--navy); font-size: 26px; font-weight: 800; }
.formula-item { min-height: 128px; padding: 20px 14px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-card); }
.formula-item span { font-size: 28px; }
.formula-item strong { display: block; margin: 10px 0 8px; color: var(--navy); font-size: 15px; font-weight: 800; }
.formula-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.formula-result { width: 116px; height: 116px; padding-top: 16px; border-radius: 50%; background: linear-gradient(135deg, var(--purple), #5b2bd3); color: #fff; font-size: 15px; line-height: 1.4; font-weight: 800; box-shadow: 0 12px 24px rgba(113,65,217,.28); }
.formula-result i { font-size: 18px; margin-bottom: 4px; }
.route-emerge-icon {
  opacity: 0;
  transform: scale(.4) translateY(-30px);
}
.route-emerge-icon.visible {
  animation: routeEmerge .6s cubic-bezier(.34, 1.56, .64, 1) forwards;
}
@keyframes routeEmerge {
  0% { opacity: 0; transform: scale(.4) translateY(-30px); }
  60% { opacity: 1; transform: scale(1.1) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.formula-desc { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* =========================================
   8. Plan Section
   ========================================= */
.plan-section { padding: 20px 44px 56px; }
.plan-section h2 em { color: var(--primary); font-style: normal; }
.plan-section > .section-label,
.plan-section > h2 { text-align: center; }
.plan-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }

.plan-card { position: relative; padding: 28px; border: 1px solid #e2eaf8; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.plan-card--popular { border: 2px solid var(--primary); box-shadow: 0 12px 32px rgba(76,121,238,.18); }
.popular-ribbon { position: absolute; left: 50%; top: -16px; transform: translateX(-50%); width: 230px; height: 32px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--primary); color: #fff; font-size: 13px; font-weight: 800; }

.plan-card h3 { margin: 0 0 6px; color: var(--navy); font-size: 19px; font-weight: 900; letter-spacing: -0.02em; }
.plan-sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.price { display: block; padding-bottom: 20px; border-bottom: 1px solid #e8eef8; font-size: 16px; color: var(--muted); font-weight: 600; }
.price em { color: var(--primary); font-style: normal; font-size: 26px; font-weight: 900; letter-spacing: -0.03em; }
.price-origin { display: block; margin-bottom: 4px; color: #94a3b8; font-size: .9em; text-decoration: line-through; }
.price-sale-line { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.price-sale-line span { white-space: nowrap; }

.plan-card ul { margin: 20px 0 28px; padding: 0; flex: 1; }
.plan-card li { margin: 12px 0; color: var(--text); font-size: 14px; line-height: 1.5; display: flex; align-items: flex-start; gap: 8px; }
.plan-card li::before { content: '✓'; color: var(--primary); font-weight: 900; font-size: 14px; flex-shrink: 0; margin-top: 1px; }

.plan-btn { min-height: 48px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--primary); border-radius: var(--radius-sm); color: var(--primary); font-weight: 800; font-size: 14px; font-family: inherit; transition: background .18s, color .18s; }
.plan-btn:hover { background: var(--primary); color: #fff; }
.plan-btn--filled { background: var(--primary); color: #fff; }
.plan-btn--filled:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.plan-btn--pro { border: 0; background: linear-gradient(135deg, var(--purple), #5b2bd3); color: #fff; }
.plan-btn--pro:hover { background: linear-gradient(135deg, #6235c7, #4a22b0); }

.plan-note { margin: 28px 0 0; color: var(--muted); text-align: center; font-size: 14px; }

/* =========================================
   9. Final CTA
   ========================================= */
.final-cta { margin: 0 0 80px; padding: 64px 44px; text-align: center; background: radial-gradient(circle at 50% 60%, rgba(76,121,238,.07) 0%, transparent 60%); border-top: 1px solid #e8eef8; }
.final-cta h2 { margin: 0 0 16px; font-size: clamp(24px, 3vw, 32px); color: var(--navy); letter-spacing: -0.03em; }
.final-cta p { margin: 0 0 32px; color: var(--muted); font-size: 16px; line-height: 1.6; }

/* =========================================
   10-a. Responsive — Small Desktop (1200px)
   ========================================= */
@media (max-width: 1200px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* =========================================
   10. Responsive — Tablet (900px)
   ========================================= */
@media (max-width: 900px) {
  .service-page { width: 100%; padding-top: 72px; }
  .hero-section { grid-template-columns: 1fr; padding: 48px 28px 36px; }
  .hero-copy { padding-top: 0; width: 100%; margin-right: 0; }
  .hero-visual { padding-top: 24px; justify-content: center; transform: none; }
  .hero-device-img { max-width: 480px; margin: 0 auto; }

  .message-band { margin: 24px 28px; }
  .plan-section { padding-left: 28px; padding-right: 28px; }
  .process-list { grid-template-columns: 1fr; }

  .formula-section { margin: 16px 28px 44px; padding: 28px; }
  .formula-row { grid-template-columns: 1fr; gap: 12px; }
  .formula-row .op { transform: rotate(90deg); justify-self: center; }
  .formula-result { justify-self: center; }

  .plan-grid { grid-template-columns: 1fr; gap: 16px; }
  .plan-card--popular { margin-top: 20px; }
  .final-cta { padding: 48px 28px; }
}

/* =========================================
   11. Responsive — Mobile (640px)
   ========================================= */
@media (max-width: 640px) {
  .service-page { padding-top: 61px; }

  /* Hero — 이미지를 제목 오른쪽에 겹쳐 배치 */
  .hero-section { display: block; position: relative; padding: 36px 20px 24px; min-height: 260px; }
  .hero-copy { width: 62%; position: relative; z-index: 1; }
  .hero-copy h1 { font-size: 22px; line-height: 1.25; }
  .hero-desc { font-size: 13px; margin-top: 14px; }
  .hero-visual { position: absolute; right: 8px; top: 52px; width: 58%; padding: 0; pointer-events: none; z-index: 0; transform: none; }
  .hero-device-img { max-width: 100%; }
  /* 버튼 가로 배치 + 텍스트 길이만큼 너비 */
  .hero-actions { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hero-actions::-webkit-scrollbar { display: none; }
  .hero-actions .btn { width: auto; flex: 0 0 auto; font-size: 11px; min-height: 40px; padding: 0 10px; white-space: nowrap; text-align: center; }
  .safe-note { font-size: 12px; margin-top: 14px; }

  /* Message band */
  .message-band { margin: 20px 16px; padding: 20px; grid-template-columns: 1fr; gap: 14px; }
  .band-icon { width: 48px; height: 48px; font-size: 20px; }
  .message-band p { font-size: 15px; }
  .message-band strong { font-size: 17px; }

  /* Process — 좌우 스크롤 슬라이더 */
  .process-section { padding: 48px 0 32px; }
  .process-section .section-heading { padding: 0 20px; }
  .process-section h2 { font-size: 22px; }
  .process-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding-bottom: 16px; padding-inline: 20px; scroll-padding-inline: 20px; margin-inline: 0; }
  .process-list::-webkit-scrollbar { display: none; }
  .process-card { flex: 0 0 82%; scroll-snap-align: center; padding: 20px; min-height: auto; }
  .process-preview { flex: none; padding: 12px; }
  .radar-preview { display: flex; flex-direction: column; gap: 8px; }
  .radar-preview svg { width: 100%; max-height: 170px; height: auto; }
  .sim-preview-graph { min-height: 60px; padding: 0 26px 0 4px; gap: 8px; }
  .sim-preview-graph-wrap { margin-top: 16px; }
  .sim-preview-bar { width: 16px; }
  .sim-preview-score { font-size: 9px; top: -14px; }
  .sim-preview-labels { padding: 5px 26px 0 4px; gap: 8px; }
  .sim-preview-label { font-size: 8px; }
  .sim-preview-label strong { font-size: 8px; }
  .sim-preview-label small { font-size: 7.5px; }

  /* Formula — 2×2 격자 타일 */
  .formula-section { margin: 12px 20px 32px; padding: 22px 20px; }
  .formula-section h2 { font-size: 20px; text-align: left; }
  .formula-desc { font-size: 13px; }
  .formula-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px 0 12px; overflow: visible; }
  .formula-row .op { display: none; }
  .formula-item { min-height: auto; padding: 14px 10px; }
  .formula-result { grid-column: 1 / -1; justify-self: center; width: 96px; height: 96px; font-size: 12px; line-height: 1.35; padding-top: 14px; }

  /* Plan — 좌우 스크롤 슬라이더 */
  .plan-section { padding: 20px 0 48px; }
  .plan-section .section-label { padding: 0 20px; }
  .plan-section h2 { font-size: 22px; padding: 0 20px; }
  .plan-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding: 28px 20px 16px; margin-top: 0; }
  .plan-grid::-webkit-scrollbar { display: none; }
  .plan-card { flex: 0 0 82%; scroll-snap-align: center; }
  .plan-card--popular { margin-top: 0; }
  .popular-ribbon { width: 200px; font-size: 12px; }

  .final-cta { padding: 40px 20px; margin-bottom: 56px; }
}
