/*
 * [랜딩페이지 스타일 2026-07-14 / A1]
 * #landing-container 전용. 앱 본체 스타일과 충돌하지 않도록 .lp- 접두사 사용.
 */

/* 랜딩 컨테이너는 화면 전체를 덮는 오버레이.
 * 아래에는 app.js 가 그린 로그인 폼(#auth-container)이 그대로 살아있으며(E2E 계약 유지),
 * 오버레이를 걷어내면(hidden) 곧바로 드러난다. */
#landing-container {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* .hidden(=Tailwind display:none) 이 position:fixed 를 확실히 이기도록 명시 */
#landing-container.hidden { display: none !important; }
/* 비어 있을 때(토큰 보유로 미렌더) 오버레이가 클릭을 가로채지 않도록 */
#landing-container:empty { display: none !important; }

.lp-root {
  --lp-bg: #0b1020;
  --lp-bg-alt: #111832;
  --lp-fg: #e6e9f2;
  --lp-muted: #9aa3b8;
  --lp-accent: #7b68ee;
  --lp-accent-2: #5b8def;
  --lp-critical: #ef4444;
  --lp-card: #161f3d;
  --lp-border: #24304f;
  background: var(--lp-bg);
  color: var(--lp-fg);
  font-family: 'Pretendard', 'Inter', sans-serif;
  min-height: 100vh;
}

.lp-root a { color: inherit; text-decoration: none; }

/* ── Nav ── */
.lp-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--lp-border);
}
.lp-nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.lp-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.lp-brand i { color: var(--lp-accent); }
.lp-nav-links { display: flex; gap: 22px; margin-left: 8px; flex: 1; }
.lp-nav-links a { color: var(--lp-muted); font-size: 14px; }
.lp-nav-links a:hover { color: var(--lp-fg); }
.lp-nav-cta { margin-left: auto; }

/* ── Buttons ── */
.lp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  cursor: pointer; border: 1px solid transparent; transition: all .15s ease;
}
.lp-btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.lp-btn-primary { background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-2)); color: #fff; }
.lp-btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.lp-btn-ghost { background: transparent; color: var(--lp-fg); border-color: var(--lp-border); }
.lp-btn-ghost:hover { border-color: var(--lp-accent); color: #fff; }

/* ── Hero ── */
.lp-hero { padding: 72px 24px 56px; }
.lp-hero-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.lp-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  color: var(--lp-accent); background: rgba(123,104,238,.12);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.lp-h1 { font-size: 44px; line-height: 1.18; font-weight: 800; margin: 0 0 18px; letter-spacing: -0.02em; }
.lp-sub { font-size: 17px; line-height: 1.6; color: var(--lp-muted); margin: 0 0 28px; max-width: 540px; }
.lp-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-center { justify-content: center; }
.lp-microcopy { margin-top: 16px; font-size: 13px; color: var(--lp-muted); }
.lp-microcopy i { color: #34d399; margin-right: 4px; }

/* ── Hero/Demo mockups ── */
.lp-hero-visual, .lp-demo-visual { display: flex; justify-content: center; }
.lp-mock {
  width: 100%; max-width: 460px; background: var(--lp-card);
  border: 1px solid var(--lp-border); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.lp-mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--lp-border); background: #0f1732; }
.lp-mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: #33406a; }
.lp-mock-body { padding: 20px 18px; }
.lp-gantt-row { position: relative; height: 26px; margin-bottom: 12px; display: flex; align-items: center; }
.lp-gantt-label { position: absolute; left: 0; width: 64px; font-size: 12px; color: var(--lp-muted); }
.lp-gantt-bar { position: absolute; left: 70px; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--lp-accent-2), var(--lp-accent)); }
.lp-gantt-bar.lp-critical { background: linear-gradient(90deg, #f87171, var(--lp-critical)); }
.lp-mock-legend { margin-top: 6px; font-size: 12px; color: var(--lp-muted); display: flex; align-items: center; gap: 6px; }
.lp-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lp-dot.lp-critical { background: var(--lp-critical); }
.lp-mock-net { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.lp-node { width: 42px; height: 42px; border-radius: 10px; background: #1e2a4d; border: 1px solid var(--lp-border); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.lp-node.lp-critical { border-color: var(--lp-critical); color: #fca5a5; }
.lp-arrow { color: var(--lp-muted); }

/* ── Proof ── */
.lp-proof { border-top: 1px solid var(--lp-border); border-bottom: 1px solid var(--lp-border); background: var(--lp-bg-alt); }
.lp-proof-inner {
  max-width: 1160px; margin: 0 auto; padding: 20px 24px;
  display: flex; gap: 28px; flex-wrap: wrap; justify-content: center;
}
.lp-proof-item { font-size: 14px; color: var(--lp-muted); display: inline-flex; align-items: center; gap: 8px; }
.lp-proof-item i { color: var(--lp-accent); }

/* ── Sections ── */
.lp-section { padding: 72px 24px; }
.lp-section-alt { background: var(--lp-bg-alt); }
.lp-section-inner { max-width: 1160px; margin: 0 auto; }
.lp-h2 { font-size: 30px; font-weight: 800; margin: 0 0 12px; letter-spacing: -0.01em; text-align: center; }
.lp-section-sub { font-size: 16px; color: var(--lp-muted); text-align: center; margin: 0 0 40px; }

.lp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.lp-grid-4 { grid-template-columns: repeat(4, 1fr); }
.lp-card {
  background: var(--lp-card); border: 1px solid var(--lp-border);
  border-radius: 14px; padding: 24px; transition: border-color .15s ease, transform .15s ease;
}
.lp-card:hover { border-color: var(--lp-accent); transform: translateY(-2px); }
.lp-card-sm { padding: 20px; text-align: center; }
.lp-card-icon { width: 44px; height: 44px; border-radius: 11px; background: rgba(123,104,238,.14); color: var(--lp-accent); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 14px; }
.lp-card-icon-sm { margin: 0 auto 12px; }
.lp-card-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.lp-card-desc { font-size: 14px; line-height: 1.55; color: var(--lp-muted); margin: 0; }

/* ── Demo ── */
.lp-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.lp-demo .lp-h2 { text-align: left; }
.lp-checklist { list-style: none; padding: 0; margin: 22px 0 0; }
.lp-checklist li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: 15px; color: var(--lp-fg); line-height: 1.5; }
.lp-checklist i { color: #34d399; margin-top: 3px; }

/* ── FAQ ── */
.lp-faq { max-width: 780px; }
.lp-faq-item { border-bottom: 1px solid var(--lp-border); padding: 20px 0; }
.lp-faq-q { font-size: 16px; font-weight: 700; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.lp-faq-q i { color: var(--lp-accent); }
.lp-faq-a { font-size: 14px; line-height: 1.6; color: var(--lp-muted); margin: 0; padding-left: 26px; }

/* ── Closing CTA ── */
.lp-cta { padding: 80px 24px; background: linear-gradient(135deg, rgba(123,104,238,.18), rgba(91,141,239,.12)); border-top: 1px solid var(--lp-border); }
.lp-cta-inner { max-width: 720px; margin: 0 auto; text-align: center; }

/* ── Footer ── */
.lp-footer { border-top: 1px solid var(--lp-border); background: var(--lp-bg); }
.lp-footer-inner { max-width: 1160px; margin: 0 auto; padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lp-brand-sm { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.lp-brand-sm i { color: var(--lp-accent); }
.lp-footer-copy { font-size: 13px; color: var(--lp-muted); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .lp-h1 { font-size: 34px; }
  .lp-grid, .lp-grid-4 { grid-template-columns: 1fr; }
  .lp-demo { grid-template-columns: 1fr; gap: 28px; }
  .lp-nav-links { display: none; }
  .lp-section { padding: 52px 20px; }
}

/* ===========================================================================
 * 공개 템플릿 갤러리 + read-only 뷰어 [공개 템플릿 갤러리 2026-07-19 · A1]
 * =========================================================================== */

/* 3열 그리드(템플릿 카드) */
.lp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* 카테고리 필터 칩 */
.lp-tpl-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 22px; justify-content: center; }
.lp-tpl-chip {
  border: 1px solid var(--lp-border); background: var(--lp-card); color: var(--lp-fg);
  padding: 8px 14px; border-radius: 999px; font-size: 13.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: all .15s ease;
}
.lp-tpl-chip:hover { border-color: var(--lp-accent); }
.lp-tpl-chip.is-active { background: var(--lp-accent); border-color: var(--lp-accent); color: #fff; }

.lp-tpl-loading { grid-column: 1 / -1; text-align: center; color: var(--lp-muted); padding: 40px 0; }

/* 템플릿 카드 */
.lp-tpl-card {
  text-align: left; border: 1px solid var(--lp-border); background: var(--lp-card);
  border-radius: 16px; padding: 22px; cursor: pointer; color: inherit;
  display: flex; flex-direction: column; gap: 10px; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.lp-tpl-card:hover { transform: translateY(-3px); border-color: var(--lp-accent); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.lp-tpl-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lp-tpl-cat { font-size: 12.5px; color: var(--lp-accent-2); display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.lp-tpl-scale { font-size: 12px; color: var(--lp-muted); }
.lp-tpl-name { font-size: 18px; font-weight: 700; margin: 2px 0; line-height: 1.35; }
.lp-tpl-desc { font-size: 14px; color: var(--lp-muted); line-height: 1.55; flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lp-tpl-open { font-size: 13.5px; font-weight: 600; color: var(--lp-accent); display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }

/* ── read-only 뷰어 오버레이 ── */
.lp-viewer[hidden] { display: none; }
.lp-viewer { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; }
.lp-viewer-backdrop { position: absolute; inset: 0; background: rgba(4,7,18,.72); backdrop-filter: blur(2px); }
.lp-viewer-panel {
  position: relative; width: min(1180px, 96vw); height: min(88vh, 900px);
  background: var(--lp-bg-alt); border: 1px solid var(--lp-border); border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.lp-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--lp-border); }
.lp-viewer-title { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; min-width: 0; }
.lp-viewer-title i { color: var(--lp-accent); }
.lp-viewer-title span:not(.lp-viewer-badge) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-viewer-badge { font-size: 12px; font-weight: 600; color: var(--lp-muted); background: var(--lp-card); border: 1px solid var(--lp-border); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.lp-viewer-actions { display: inline-flex; align-items: center; gap: 12px; }
.lp-viewer-tabs { display: inline-flex; background: var(--lp-card); border: 1px solid var(--lp-border); border-radius: 10px; padding: 3px; }
.lp-vtab { border: 0; background: transparent; color: var(--lp-muted); font-size: 13.5px; padding: 7px 14px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.lp-vtab.is-active { background: var(--lp-accent); color: #fff; }
.lp-viewer-close { border: 1px solid var(--lp-border); background: var(--lp-card); color: var(--lp-fg); width: 36px; height: 36px; border-radius: 9px; cursor: pointer; font-size: 16px; }
.lp-viewer-close:hover { border-color: var(--lp-critical); color: var(--lp-critical); }

.lp-viewer-body { flex: 1; overflow: auto; position: relative; }
.lp-viewer-pane { display: none; padding: 8px 0; }
.lp-viewer-pane.is-active { display: block; }

/* 뷰어 - 트리(목록) */
.lp-tr { display: grid; grid-template-columns: 74px minmax(220px, 1.6fr) 76px 130px 150px 110px; align-items: center; gap: 8px; padding: 8px 20px; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,.04); }
.lp-tr-head { position: sticky; top: 0; z-index: 1; background: var(--lp-bg-alt); font-weight: 700; color: var(--lp-muted); font-size: 12.5px; border-bottom: 1px solid var(--lp-border); }
.lp-tr-no { color: var(--lp-muted); font-variant-numeric: tabular-nums; }
.lp-tr-title { padding-left: calc(var(--d, 0) * 18px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-tr-title.is-branch { font-weight: 700; }
.lp-tr-ico { margin-right: 7px; color: var(--lp-muted); font-size: 12px; }
.lp-tr-title.is-branch .lp-tr-ico { color: var(--lp-accent-2); }
.lp-tr-badge { font-size: 11.5px; text-align: center; padding: 3px 0; border-radius: 6px; font-weight: 600; }
.lp-tr-head .lp-tr-badge, .lp-tr-head .lp-tr-prog, .lp-tr-head .lp-tr-dates, .lp-tr-head .lp-tr-owner { background: transparent; color: var(--lp-muted); font-weight: 700; }
.lp-tr-prog { display: flex; align-items: center; gap: 6px; }
.lp-tr-prog-bar { flex: 1; height: 6px; background: var(--lp-accent); border-radius: 999px; max-width: 70px; }
.lp-tr-head .lp-tr-prog-bar { display: none; }
.lp-tr-prog em { font-style: normal; color: var(--lp-muted); font-size: 12px; min-width: 32px; }
.lp-tr-dates, .lp-tr-owner { color: var(--lp-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 상태 색상 (트리 뱃지 + 간트 막대 공용) */
.lp-st-done   { background: rgba(34,197,94,.18);  color: #4ade80; }
.lp-st-doing  { background: rgba(91,141,239,.20); color: #93b4ff; }
.lp-st-blocked{ background: rgba(239,68,68,.18);  color: #f87171; }
.lp-st-todo   { background: rgba(154,163,184,.16); color: #c4cbdb; }

/* 뷰어 - 간트 */
.lp-viewer-gantt { padding: 8px 0 24px; }
.lp-g-head, .lp-g-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 12px; padding: 4px 20px; }
.lp-g-head { position: sticky; top: 0; z-index: 1; background: var(--lp-bg-alt); border-bottom: 1px solid var(--lp-border); padding-bottom: 8px; padding-top: 8px; }
.lp-g-label { font-size: 13px; color: var(--lp-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-g-track { position: relative; height: 22px; }
.lp-g-months { height: 20px; }
.lp-g-month { position: absolute; top: 0; font-size: 11.5px; color: var(--lp-muted); transform: translateX(2px); border-left: 1px solid var(--lp-border); padding-left: 4px; height: 100%; }
.lp-g-row { padding-top: 5px; padding-bottom: 5px; }
.lp-g-row:hover { background: rgba(255,255,255,.03); }
.lp-g-bar { position: absolute; top: 3px; height: 16px; border-radius: 5px; min-width: 4px; overflow: hidden; }
.lp-g-bar.lp-st-done   { background: rgba(34,197,94,.35); }
.lp-g-bar.lp-st-doing  { background: rgba(91,141,239,.38); }
.lp-g-bar.lp-st-blocked{ background: rgba(239,68,68,.36); }
.lp-g-bar.lp-st-todo   { background: rgba(154,163,184,.30); }
.lp-g-fill { display: block; height: 100%; background: rgba(255,255,255,.28); }

.lp-viewer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--lp-border); flex-wrap: wrap; }
.lp-viewer-note { font-size: 13px; color: var(--lp-muted); display: inline-flex; align-items: center; gap: 8px; }

body.lp-viewer-open { overflow: hidden; }

/* ── Responsive (템플릿/뷰어) ── */
@media (max-width: 860px) {
  .lp-grid-3 { grid-template-columns: 1fr; }
  .lp-viewer { padding: 0; }
  .lp-viewer-panel { width: 100vw; height: 100vh; border-radius: 0; border: 0; }
  .lp-viewer-title { font-size: 15px; }
  .lp-tr { grid-template-columns: 54px 1fr 64px; }
  .lp-tr-prog, .lp-tr-dates, .lp-tr-owner { display: none; }
  .lp-g-head, .lp-g-row { grid-template-columns: 120px 1fr; }
}
