:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --ink: #17171a;
  --muted: #5f5f66;
  --line: #e2e0da;
  --accent: #2f5bd3;
  --accent-ink: #ffffff;
  --accent-soft: #e7ecfb;
  --night: #0e1016;
  --night-ink: #f3f2ee;
  --night-muted: #b9bac2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.06), 0 12px 32px rgba(20, 20, 30, 0.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121317; --surface: #1b1d23; --ink: #ecebe6; --muted: #a6a7af; --line: #2c2e36;
    --accent: #7c9bf2; --accent-ink: #0e1016; --accent-soft: #232b45;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
/* 페이지 머리의 인라인 스타일이 이 파일이 올 때까지 화면을 숨긴다(SB-CLS-005). 스타일 없이 먼저 그려졌다가
   다시 배치되면 화면 전체가 밀렸다(실사이트 맥 크롬, 본문 8→0, 1.08~1.79). 이 파일이 입혀지면 보인다 */
html { scroll-behavior: smooth; visibility: visible; animation: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 650; font-size: 16px; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn.google { background: #ffffff; color: #1f1f1f; border-color: #dadce0; }
.btn.google svg { width: 20px; height: 20px; flex: none; }
.btn[hidden], .who[hidden] { display: none; }

/* ---------- 머리글 ---------- */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: center; gap: 24px;
  padding: 18px clamp(16px, 4vw, 48px);
  color: var(--night-ink);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.mark { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(47, 91, 211, 0.25); }
.nav-links { display: flex; gap: 20px; font-size: 15px; }
.nav-links a { text-decoration: none; opacity: 0.85; }
.nav-links a:hover { opacity: 1; }
.nav-account { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-account .btn:not(.ghost) { background: rgba(255, 255, 255, 0.14); color: var(--night-ink); border-color: rgba(255, 255, 255, 0.28); }
.who { font-size: 14px; color: var(--night-muted); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 첫 화면 ---------- */
/* 왼쪽 소개 문구, 오른쪽 「3D 구도 ↔ AI 콘티」 나란히 보기(SB-DEMO-001). 좁은 화면에서는 위아래로 */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: 110px clamp(16px, 5vw, 64px) clamp(48px, 8vh, 88px);
  background: radial-gradient(120% 90% at 80% 10%, #1c2236 0%, var(--night) 60%); color: var(--night-ink);
}
.hero-copy { position: relative; z-index: 2; max-width: 640px; min-width: 0; }

.demo { min-width: 0; }
.demo-title { margin: 0 0 12px; font-size: 14px; color: var(--night-muted); }
.demo-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.demo-tabs[hidden] { display: none; }
.demo-tabs button {
  min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.28); background: transparent; color: var(--night-ink);
  font: inherit; font-size: 14px; font-weight: 600;
}
.demo-tabs button[aria-selected="true"] { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.demo-tabs button:focus-visible { outline: 3px solid #a9bdf7; outline-offset: 2px; }
.demo-pair { margin: 0; }
.demo-pair[hidden] { display: none; }
.demo-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-side { position: relative; border-radius: 10px; overflow: hidden; background: #2a2d36; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.demo-side img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.demo-tag {
  position: absolute; left: 8px; top: 8px; padding: 3px 10px; border-radius: 999px;
  background: rgba(14, 16, 22, 0.78); color: #fff; font-size: 12.5px; font-weight: 650;
}
.demo-tag.ai { background: rgba(47, 91, 211, 0.92); }
.demo-pair figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 12px; font-size: 14px; color: var(--night-muted); }
.demo-try { color: #c7d4fb; font-weight: 650; text-decoration: none; }
.demo-try:hover { text-decoration: underline; }
.eyebrow { margin: 0 0 14px; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: #a9bdf7; }
.hero h1 { margin: 0; font-size: clamp(34px, 5.2vw, 60px); line-height: 1.15; letter-spacing: -0.035em; font-weight: 780; }
.lead { margin: 20px 0 0; font-size: clamp(16px, 1.5vw, 19px); color: var(--night-muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .btn.ghost { color: var(--night-ink); border-color: rgba(255, 255, 255, 0.45); }
.fine { margin: 16px 0 0; font-size: 13.5px; color: var(--night-muted); }

/* ---------- 기능 ---------- */
section { padding: clamp(64px, 10vw, 112px) clamp(16px, 5vw, 64px); }
section h2 { margin: 0; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.25; letter-spacing: -0.03em; text-align: center; }
.section-lead { margin: 12px auto 0; text-align: center; color: var(--muted); font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 1180px; margin: 48px auto 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.card-body { padding: 22px 22px 26px; }
.step { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; }
.card h3 { margin: 6px 0 8px; font-size: 20px; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- 작업 순서 ---------- */
.flow { background: var(--surface); border-block: 1px solid var(--line); }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1180px; margin: 40px auto 0; padding: 0; }
.steps li { counter-increment: s; padding: 22px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; margin-bottom: 8px; }
.steps strong { display: block; font-size: 18px; letter-spacing: -0.02em; }
.steps span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }

/* ---------- 마무리·바닥 ---------- */
.closing { text-align: center; }
.closing .cta { justify-content: center; }
.closing .btn.ghost { color: var(--ink); }
.foot {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: center;
  padding: 28px 16px 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line);
}
.foot.biz { flex-direction: column; gap: 4px; font-size: 13px; text-align: center; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.badge { padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); } /* 1fr만 쓰면 그림 원래 폭(768px)만큼 칸이 늘어 휴대폰에서 잘린다 */
  .cards { grid-template-columns: 1fr; max-width: 560px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .nav { gap: 12px; }
  .nav-links a:not([lang]) { display: none; }
  .who { display: none !important; }
  .hero { padding-top: 96px; }
  .demo-imgs { gap: 6px; }
  .demo-tag { left: 6px; top: 6px; padding: 2px 8px; font-size: 11.5px; }
  .cta .btn { flex: 1 1 100%; }
  .steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
