/* SayCode 소개서 위에 얹는 PoC 신청 UI. 색/폰트는 소개서의 Paper × Terminal 토큰을 그대로 쓴다. */

:root {
  --ds: 1; /* 슬라이드 축소 배율. poc.js 가 뷰포트 폭에 맞춰 갱신한다. */
  --poc-shadow: 0 18px 48px -20px rgba(22, 20, 15, 0.45);
}

/* ── 슬라이드 반응형 축소 ─────────────────────────────── */
.deck { gap: 0 !important; }

.slide-fit {
  width: calc(1280px * var(--ds));
  height: calc(720px * var(--ds));
  margin: 0 auto 20px;
}

.slide-fit > .slide {
  transform: scale(var(--ds));
  transform-origin: top left;
  flex: none;
}

body { padding-bottom: 96px; }

/* ── 플로팅 CTA ───────────────────────────────────────── */
/* 고정 위치는 그룹이 갖고, 버튼 두 개가 그 안에 나란히 선다. */
.poc-fab-group {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}

.poc-fab-ghost,
.poc-fab-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 20px;
  border: 1px solid var(--line-2, #d3cdbe);
  border-radius: 999px;
  background: var(--card, #fbfaf7);
  color: var(--ink, #16140f);
  font-family: var(--sans, sans-serif);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 30px -16px rgba(22, 20, 15, 0.5);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

/* ── 다운로드 메뉴 (details/summary — 기본 동작에 기댄다) ── */
.poc-fab-dl { position: relative; }
.poc-fab-dl > summary { cursor: pointer; list-style: none; }
.poc-fab-dl > summary::-webkit-details-marker { display: none; }
.poc-fab-dl > summary:hover { transform: translateY(-2px); border-color: var(--blue, #1a47e6); }
.poc-fab-dl > summary:focus-visible { outline: 3px solid #16140f; outline-offset: 3px; }
.poc-fab-dl[open] > summary { border-color: var(--blue, #1a47e6); }
.poc-fab-caret { font-size: 11px; color: var(--ink-3, #8a8478); }
.poc-fab-dl[open] .poc-fab-caret { transform: rotate(180deg); }

.poc-fab-dl-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 160px;
  padding: 6px;
  border: 1px solid var(--line-2, #d3cdbe);
  border-radius: 12px;
  background: var(--card, #fbfaf7);
  box-shadow: var(--poc-shadow);
}

.poc-fab-dl-menu a {
  display: block;
  padding: 11px 13px;
  border-radius: 8px;
  color: var(--ink, #16140f);
  text-decoration: none;
  font-family: var(--sans, sans-serif);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.poc-fab-dl-menu a:hover { background: var(--fill, #f3f1ea); }
.poc-fab-dl-menu a:focus-visible { outline: 3px solid #16140f; outline-offset: -3px; }

.poc-fab-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 20px;
  border: 1px solid var(--line-2, #d3cdbe);
  border-radius: 999px;
  background: var(--card, #fbfaf7);
  color: var(--ink, #16140f);
  font-family: var(--sans, sans-serif);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 30px -16px rgba(22, 20, 15, 0.5);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.poc-fab-home:hover { transform: translateY(-2px); border-color: var(--blue, #1a47e6); }
.poc-fab-home:focus-visible { outline: 3px solid #16140f; outline-offset: 3px; }
.poc-fab-home-arrow { font-size: 13px; color: var(--ink-3, #8a8478); }

.poc-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border: none;
  border-radius: 999px;
  background: var(--blue, #1a47e6);
  color: #fff;
  font-family: var(--sans, sans-serif);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--poc-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.poc-fab:hover { transform: translateY(-2px); box-shadow: 0 22px 54px -18px rgba(26, 71, 230, 0.6); }
.poc-fab:focus-visible { outline: 3px solid #16140f; outline-offset: 3px; }

.poc-fab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: poc-pulse 1.8s ease-in-out infinite;
}

@keyframes poc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* ── 모달 ─────────────────────────────────────────────── */
.poc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  background: rgba(22, 20, 15, 0.55);
  backdrop-filter: blur(3px);
}

/* display 를 지정한 요소는 UA 의 [hidden] 규칙을 덮어쓰므로 명시적으로 다시 숨긴다. */
.poc-backdrop[hidden],
.poc-modal-head[hidden],
.poc-modal-body[hidden],
.poc-modal-foot[hidden] { display: none !important; }

.poc-modal {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: auto;
  border-radius: 14px;
  background: var(--bg, #fbfaf7);
  font-family: var(--sans, sans-serif);
  color: var(--ink, #16140f);
  box-shadow: var(--poc-shadow);
}

.poc-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--line, #e4e0d5);
}

.poc-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--blue, #1a47e6);
}

.poc-modal-head h2 { margin-top: 8px; font-size: 24px; font-weight: 700; line-height: 1.3; }
.poc-lead { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--ink-2, #4f4a40); }

.poc-close {
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line, #e4e0d5);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3, #8a8478);
  font-size: 15px;
  cursor: pointer;
}

.poc-close:hover { background: var(--fill, #f3f1ea); color: var(--ink, #16140f); }

.poc-modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px;
}

.poc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.poc-field { display: flex; flex-direction: column; gap: 8px; }

.poc-field label,
.poc-label { font-size: 14px; font-weight: 700; color: var(--ink, #16140f); }
.poc-field label em { font-style: normal; color: var(--blue, #1a47e6); }
.poc-optional { font-size: 12px; font-weight: 400; color: var(--ink-3, #8a8478); }

.poc-field input[type="text"],
.poc-field input[type="tel"],
.poc-field input[type="email"],
.poc-field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-2, #d3cdbe);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink, #16140f);
}

.poc-field textarea { resize: vertical; line-height: 1.65; }

.poc-field input::placeholder,
.poc-field textarea::placeholder { color: var(--ink-4, #b3ac9d); }

.poc-field input:focus,
.poc-field textarea:focus {
  outline: none;
  border-color: var(--blue, #1a47e6);
  box-shadow: 0 0 0 3px rgba(26, 71, 230, 0.14);
}

.poc-field.is-invalid input,
.poc-field.is-invalid textarea { border-color: #c0392b; }

.poc-error { display: none; font-size: 13px; color: #c0392b; }
.poc-error.is-shown { display: block; }

/* ── 관심 영역 칩 ─────────────────────────────────────── */
.poc-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.poc-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid var(--line-2, #d3cdbe);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2, #4f4a40);
  cursor: pointer;
}

.poc-chip input { position: absolute; opacity: 0; pointer-events: none; }
.poc-chip:has(input:checked) {
  border-color: var(--blue, #1a47e6);
  background: var(--blue-050, #edeff6);
  color: var(--blue, #1a47e6);
  font-weight: 700;
}
.poc-chip:has(input:focus-visible) { outline: 2px solid var(--blue, #1a47e6); outline-offset: 2px; }

/* ── 동의 ─────────────────────────────────────────────── */
.poc-consents {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 12px;
  background: var(--fill, #f3f1ea);
}

.poc-consent-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2, #4f4a40); }

.poc-badge {
  flex: none;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--blue-050, #edeff6);
  color: var(--blue, #1a47e6);
  font-size: 12px;
  font-weight: 700;
}

.poc-consent { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.poc-consent input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue, #1a47e6); }
.poc-consent b { display: block; font-size: 14px; font-weight: 700; }
.poc-consent em { display: block; margin-top: 4px; font-style: normal; font-size: 13px; line-height: 1.55; color: var(--ink-2, #4f4a40); }

.poc-status { display: none; font-size: 14px; line-height: 1.6; }
.poc-status.is-shown { display: block; }
.poc-status.is-error { color: #c0392b; }

/* ── 액션 ─────────────────────────────────────────────── */
.poc-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 28px 24px;
  border-top: 1px solid var(--line, #e4e0d5);
}

.poc-btn-primary,
.poc-btn-ghost {
  padding: 13px 26px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.poc-btn-primary { border: none; background: var(--blue, #1a47e6); color: #fff; }
.poc-btn-primary:hover:not(:disabled) { background: #1539b8; }
.poc-btn-primary:disabled { opacity: 0.55; cursor: progress; }

.poc-btn-ghost { border: 1px solid var(--line-2, #d3cdbe); background: transparent; color: var(--ink-2, #4f4a40); }
.poc-btn-ghost:hover { background: var(--fill, #f3f1ea); }

/* ── 완료 화면 ────────────────────────────────────────── */
.poc-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 56px 28px;
  text-align: center;
}

.poc-done[hidden] { display: none !important; }

.poc-done-mark {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--blue-050, #edeff6);
  color: var(--blue, #1a47e6);
  font-size: 28px;
  font-weight: 700;
}

.poc-done h3 { font-size: 22px; font-weight: 700; }
.poc-done p { font-size: 15px; color: var(--ink-2, #4f4a40); }
.poc-done b { font-family: var(--mono, monospace); color: var(--blue, #1a47e6); }
.poc-done-sub { font-size: 14px !important; }
.poc-done .poc-btn-primary { margin-top: 12px; }

@media (max-width: 560px) {
  .poc-grid { grid-template-columns: 1fr; }
  .poc-backdrop { padding: 16px 12px; }
  .poc-modal-head,
  .poc-modal-body,
  .poc-modal-foot { padding-left: 20px; padding-right: 20px; }
  .poc-fab-group { right: 16px; bottom: 16px; gap: 8px; }
  .poc-fab { padding: 13px 18px; font-size: 15px; }
  .poc-fab-home,
  .poc-fab-ghost { padding: 12px 15px; font-size: 14px; }
  .poc-fab-dl-menu { min-width: 150px; }
  .poc-fab-home-arrow { display: none; }
}
