/* Page-local additions for index */
.hdr-mobile-cta {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  white-space: nowrap;
}
.hero-art-stage {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 6%;
}
.hero-mascot-video {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: var(--r);
  background: transparent;
  animation: mascotBob 4.8s ease-in-out infinite;
  will-change: transform;
}
/* Live typing micro-demo */
.hero-typing {
  position: absolute;
  right: 18px;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  max-width: 78%;
  z-index: 2;
  pointer-events: none;
}
.hero-typing-bubble {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px -12px rgba(60,40,20,0.25);
}
.bubble-me {
  background: rgba(42, 37, 34, 0.92);
  color: var(--paper);
  border-bottom-right-radius: 4px;
  animation: typingMeIn 600ms ease-out 1.6s forwards;
}
.bubble-bot {
  background: rgba(246, 241, 232, 0.96);
  color: var(--ink);
  border: 1px solid var(--line-soft);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  max-width: 92%;
  display: flex; flex-direction: column; gap: 4px;
  animation: typingBotIn 500ms ease-out 2.6s forwards;
}
.bot-line {
  opacity: 0;
  display: block;
  animation: lineReveal 360ms ease-out forwards;
}
.bot-line-1 { animation-delay: 3.0s; font-weight: 600; }
.bot-line-2 { animation-delay: 3.45s; }
.bot-line-3 { animation-delay: 3.90s; color: var(--accent-2); font-family: var(--mono); font-size: 11px; }
.bot-line-4 { animation-delay: 4.35s; color: var(--accent-2); font-family: var(--mono); font-size: 11px; }
.bot-line-5 { animation-delay: 4.85s; color: var(--ink-2); font-style: italic; }
@keyframes typingMeIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes typingBotIn {
  0%   { opacity: 0; transform: translateY(6px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes lineReveal {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-typing-bubble, .bot-line, .hero-typing-attach { animation: none; opacity: 1; transform: none; }
}
/* Attach bubbles (PDF icon + filename + optional note) — appear before/after main bubbles */
.hero-typing-attach {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
  max-width: 92%;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  box-shadow: 0 8px 24px -12px rgba(60,40,20,0.25);
  backdrop-filter: blur(6px);
}
.hero-typing-attach.is-shown { display: inline-flex; }
.hero-typing-attach .file-icon::before { content: "📎"; }
.hero-typing-attach-in {
  background: rgba(42, 37, 34, 0.92);
  color: var(--paper);
  border-radius: 12px;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.hero-typing-attach-in.is-shown {
  animation: typingMeIn 520ms ease-out 1.0s forwards;
}
.hero-typing-attach-out {
  background: rgba(246, 241, 232, 0.96);
  color: var(--ink);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.hero-typing-attach-out.is-shown {
  animation: typingBotIn 520ms ease-out 5.6s forwards;
}
.hero-typing-attach .file-name { font-weight: 600; }
.hero-typing-attach .file-note { color: var(--accent-2); font-style: italic; font-weight: 400; }
.hero-typing-attach-in .file-note { color: var(--accent-soft); }

/* Rotator state: fading-out (between scenarios) */
.hero-typing.is-fading > * {
  transition: opacity 380ms ease-out, transform 380ms ease-out;
  opacity: 0;
  transform: translateY(-4px);
}

/* Mobile-specific typing demo placement —
   마스코트 얼굴 가리지 않도록 우측 가장자리에 작게 */
@media (max-width: 768px) {
  .hero-typing {
    right: 8px;
    left: 8px;
    bottom: 10px;
    max-width: none;
    gap: 4px;
  }
  .hero-typing-bubble { font-size: 10px; padding: 5px 9px; line-height: 1.35; }
  .bubble-me { max-width: 80%; }
  .bubble-bot { max-width: 96%; }
  .bot-line { font-size: 9.5px; }
  .bot-line-1 { font-size: 10px; }
  .bot-line-3, .bot-line-4 { font-size: 9px; }
  .hero-typing-attach { font-size: 9px; padding: 4px 8px; max-width: 88%; }
  /* attach-out도 노출 — 사용자 요청: 첨삭 완료 파일 메시지 항상 보이게 */
  .hero-typing-attach-out.is-shown { display: inline-flex; }
}
@keyframes mascotBob {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50%      { transform: translateY(-6px) rotate(0.4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-mascot-video { animation: none; }
}
/* Card hover lift — 살아있는 인터랙션 */
.card, .skill-card, .ds-box, .tg, .ba, .rv {
  transition: transform 280ms ease-out, box-shadow 280ms ease-out, border-color 280ms ease-out;
}
@media (hover: hover) {
  .card:hover, .skill-card:hover, .ds-box:hover, .tg:hover, .ba:hover, .rv:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
    border-color: var(--line);
  }
}
.ba-sect-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; max-width: none;
}
.ba-mascot {
  align-self: flex-end; flex-shrink: 0; margin-bottom: -8px;
}
.final-cta {
  margin-top: 96px;
  padding: 48px 56px;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: 48px;
}
.final-cta-mascot { flex-shrink: 0; width: 240px; height: 240px; }
.final-cta-h2 { font-size: 40px; margin: 12px 0 16px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; }
.final-cta-h2 .em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent-2); letter-spacing: -0.02em; }
.final-cta-p { color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 460px; margin: 0 0 24px; }

@media (max-width: 767px) {
  .hdr-nav { display: none; }
  .hdr-mobile-cta { display: flex; }
  .ba-mascot { display: none; }
  .ba-sect-head { display: block; }
  .final-cta { flex-direction: column; gap: 24px; padding: 32px 24px; text-align: center; }
  .final-cta-mascot { width: 180px; height: 180px; }
  .final-cta-h2 { font-size: 28px; }
  .hero { padding: 24px 20px 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-grid > div:first-child { order: 2; }
  .hero-grid .hero-art { order: 1; aspect-ratio: 16/10; max-height: 260px; }
  .sect { padding: 44px 20px; }
  .sect-head { margin-bottom: 24px; }
  .divider { margin-bottom: 56px !important; }
  .grid-4, .grid-3, .grid-2,
  .ds-grid, .rv-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 28px 24px; }
  .step:last-child { border-bottom: 0; }
  .ba-cmp { grid-template-columns: 1fr; }
  .ba-side.before { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .ftr { padding: 48px 20px 24px; }
  .ftr-grid { grid-template-columns: 1fr; gap: 32px; }
  .ftr-meta { flex-direction: column; gap: 8px; }
  .testbar { font-size: 11px; padding: 8px 16px; text-align: center; }
  .hdr { padding: 14px 16px; }
  .hdr-brand .tag { display: none; }
  .hdr-brand .name { font-size: 20px; }
  .hero .chips .chip-extra { display: none; }
  .hero-meta { gap: 12px 16px; }
  .hero-meta .hero-meta-extra { display: none; }
  .skill-reveal-summary { display: inline-block; }
  .skill-reveal:not([open]) .skill-extra { display: none; }
}
