/* ============================================================
   Illustration components (non-vending):
   galton board · usb-c hub · accordion manual ·
   agent loop · monday flow · elevator button
   ============================================================ */

/* ---------- GALTON BOARD (SVG, 확률로 다음 단어) ---------- */
.galton { filter: drop-shadow(0 16px 30px rgba(31,36,51,.12)); }

/* bins grow to their bell-curve height once .go lands on the svg */
.galton .gbin {
  transform-box: fill-box; transform-origin: center bottom;
  transform: scaleY(.05);
}
.galton.go .gbin { animation: gbinGrow .9s var(--ease-spring) forwards; }
.galton.go .gbin:nth-child(1){ animation-delay:.05s }
.galton.go .gbin:nth-child(2){ animation-delay:.15s }
.galton.go .gbin:nth-child(3){ animation-delay:.25s }
.galton.go .gbin:nth-child(4){ animation-delay:.20s }
.galton.go .gbin:nth-child(5){ animation-delay:.30s }
.galton.go .gbin:nth-child(6){ animation-delay:.40s }
.galton.go .gbin:nth-child(7){ animation-delay:.35s }
@keyframes gbinGrow { to { transform: scaleY(var(--h,.5)); } }

/* balls zigzag through the pegs and vanish behind the bars (endless drizzle) */
.galton .gball { opacity: 0; }
.galton.go .gb1 { animation: gfall1 2.6s cubic-bezier(.5,.05,.7,.5) .2s infinite; }
.galton.go .gb2 { animation: gfall2 2.6s cubic-bezier(.5,.05,.7,.5) 1.1s infinite; }
.galton.go .gb3 { animation: gfall3 2.6s cubic-bezier(.5,.05,.7,.5) 1.9s infinite; }
@keyframes gfall1 {
  0%   { opacity:0; transform: translate(180px, 30px); }
  6%   { opacity:1; }
  20%  { transform: translate(180px, 78px); }
  35%  { transform: translate(162px, 110px); }
  50%  { transform: translate(180px, 142px); }
  65%  { transform: translate(162px, 174px); }
  92%  { opacity:1; }
  100% { opacity:0; transform: translate(182px, 300px); }
}
@keyframes gfall2 {
  0%   { opacity:0; transform: translate(180px, 30px); }
  6%   { opacity:1; }
  20%  { transform: translate(180px, 78px); }
  35%  { transform: translate(198px, 110px); }
  50%  { transform: translate(216px, 142px); }
  65%  { transform: translate(234px, 174px); }
  92%  { opacity:1; }
  100% { opacity:0; transform: translate(228px, 300px); }
}
@keyframes gfall3 {
  0%   { opacity:0; transform: translate(180px, 30px); }
  6%   { opacity:1; }
  20%  { transform: translate(180px, 78px); }
  35%  { transform: translate(162px, 110px); }
  50%  { transform: translate(144px, 142px); }
  65%  { transform: translate(126px, 174px); }
  92%  { opacity:1; }
  100% { opacity:0; transform: translate(136px, 300px); }
}

/* word-prediction chips */
.predict { display:flex; flex-direction:column; gap:10px; }
.pchip {
  display:flex; align-items:center; gap:16px;
  background:#fff; border:2px solid var(--line); border-radius: var(--r-pill);
  padding:13px 24px; font-weight:700; font-size:26px;
}
.pchip .bar { height:14px; border-radius:7px; background:var(--teal); }
.pchip.top { border-color: var(--teal); background: color-mix(in srgb,var(--teal) 8%,#fff); }
.pchip .pct { margin-left:auto; font-variant-numeric:tabular-nums; color:var(--ink-soft); font-size:22px; }

/* ---------- USB-C HUB (MCP 한 표준) ---------- */
.hub { position:relative; width:100%; height:380px; }
.hub .port {
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:158px; height:158px; border-radius:36px;
  background: linear-gradient(145deg, var(--grape), var(--indigo));
  display:grid; place-items:center; color:#fff; box-shadow: var(--shadow-pop);
  z-index:3; text-align:center;
}
.hub .port b { font-size:32px; font-weight:900; }
.hub .port small{ font-size:16px; opacity:.85; }
.hub .app {
  position:absolute; width:116px; height:116px; border-radius:26px;
  background:#fff; border:2px solid var(--line); box-shadow:var(--shadow-sm);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  z-index:4; color: var(--grape);
}
.hub .app .ic { width:44px; height:44px; }
.hub .app span{ font-size:17px; font-weight:700; color:var(--ink-soft); }
/* base track: always-on soft lavender rail */
.hub-track {
  fill:none; stroke:#ebe2fb; stroke-width:6; stroke-linecap:round;
}
/* lit overlay: purple flow with moving dashes */
.hub-line {
  fill:none; stroke: var(--purple); stroke-width:3.5; stroke-linecap:round;
  stroke-dasharray: 4 12; opacity:0;
  transition: opacity .5s var(--ease-out);
  animation: dash 1.1s linear infinite;
}
.hub-line.lit { opacity:1; }
@keyframes dash { to { stroke-dashoffset:-32; } }
/* traveling data dot */
.hub-dot {
  fill:#fff; stroke: var(--purple); stroke-width:3.5; opacity:0;
  transition: opacity .5s var(--ease-out);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--purple) 70%, transparent));
}
.hub-dot.lit { opacity:1; }
/* USB-C slot on the port */
.hub .port .usb {
  width:58px; height:15px; border-radius:9px;
  border:3px solid rgba(255,255,255,.9);
  background: rgba(255,255,255,.15);
  margin:6px 0 2px;
}

/* ---------- ACCORDION MANUAL (점진적 공개) ---------- */
.manual { display:flex; flex-direction:column; gap:14px; max-width:560px; }
.layer {
  border-radius: var(--r-md); border:2px solid var(--line); overflow:hidden;
  box-shadow: var(--shadow-sm); background:#fff;
}
.layer .lhead {
  display:flex; align-items:center; gap:16px; padding:20px 26px; font-weight:800; font-size:26px;
}
.layer .lbadge { font-size:17px; font-weight:900; color:#fff; padding:5px 14px; border-radius:var(--r-pill); }
.layer .lbody {
  max-height:0; opacity:0; padding:0 26px;
  transition: max-height .5s var(--ease-out), opacity .4s, padding .4s;
  font-size:21px; color:var(--ink-soft); line-height:1.55;
}
.layer.open .lbody { max-height:200px; opacity:1; padding:0 26px 22px; }
.layer.l1 { border-color: color-mix(in srgb,var(--sky) 40%,#fff); }
.layer.l1 .lbadge{ background:var(--sky); }
.layer.l2 .lbadge{ background:var(--teal); }
.layer.l3 .lbadge{ background:var(--purple); }
.layer.dim { opacity:.5; }

/* ---------- AGENT LOOP (수집→행동→관찰) ---------- */
.loop { position:relative; width:360px; height:360px; }
.loop .ring {
  position:absolute; inset:0; border-radius:50%;
  border:5px dashed var(--line);
}
.loop .ring.spin { animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loop .arrow-head { fill: var(--pink); }
.loop .node {
  position:absolute; width:130px; height:130px; border-radius:28px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  background:#fff; border:3px solid var(--line); box-shadow: var(--shadow-md);
  font-weight:800; text-align:center; font-size:20px;
}
.loop .node .ico{ font-size:34px; }
.loop .node .ico .ic { width:38px; height:38px; }
.loop .node small{ font-size:15px; color:var(--ink-soft); font-weight:600; }
.loop .n1 { top:-8px; left:115px; border-color:var(--sky); color:#0284c7; }
.loop .n2 { bottom:14px; left:-8px; border-color:var(--teal); color:#0f9b73; }
.loop .n3 { bottom:14px; right:-8px; border-color:var(--pink); color:#db2777; }
.loop .node small { color:var(--ink-soft); }
.loop .center-chip {
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  background:var(--ink); color:#fff; font-weight:800; font-size:17px;
  padding:9px 16px; border-radius:var(--r-pill);
}

/* ---------- FLOW STEPS (월요일 아침 / 핸즈온) ---------- */
.flow { display:flex; align-items:stretch; gap:0; width:100%; }
.flow .fstep {
  flex:1; position:relative; background:#fff; border:2px solid var(--line);
  border-radius: var(--r-lg); padding:28px 22px; text-align:center;
}
.flow .fstep .fico { margin-bottom:12px; color: var(--ink); }
.flow .fstep .fico .ic { width:48px; height:48px; }
.flow .fstep h4 { font-size:25px; font-weight:800; margin-bottom:8px; }
.flow .fstep p { font-size:19px; color:var(--ink-soft); line-height:1.45; }
.flow .ftag { font-size:17px; font-weight:800; padding:5px 16px; border-radius:var(--r-pill); color:#fff; display:inline-block; margin-bottom:12px; }
.flow .fconn { display:grid; place-items:center; padding:0 10px; font-size:36px; color:var(--ink-faint); }
.tag-rag{ background:var(--teal);} .tag-think{ background:var(--purple);} .tag-fc{ background:var(--coral);}

/* ---------- ELEVATOR / generic press button ---------- */
.bigbtn {
  cursor:pointer; border:0; font-family:var(--font);
  display:inline-flex; align-items:center; gap:14px;
  font-size:30px; font-weight:800; color:#fff; padding:24px 48px; border-radius:var(--r-pill);
  background: linear-gradient(100deg,var(--coral),var(--tangerine));
  box-shadow: var(--shadow-pop); transition: transform .12s var(--ease-spring), filter .12s;
}
.bigbtn .ic { width:32px; height:32px; }
.bigbtn:active, .bigbtn.pressed { transform: scale(.92); filter:brightness(1.2); }
.api-stage { position:relative; min-height:150px; display:flex; align-items:center; gap:48px; }
.api-out {
  font-size:80px; opacity:0; transform: translateY(-30px) scale(.5);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-spring);
}
.api-out.pop { opacity:1; transform:none; animation: outBob 1s var(--ease-out) .5s; }
@keyframes outBob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

/* ---------- PATH COMPARE (땜질 vs 동기화 경로) ---------- */
.pathcmp .draw{ stroke-dasharray:1800; stroke-dashoffset:1800; }
.pathcmp .draw.lit{ animation:drawP 1.8s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes drawP{ to{ stroke-dashoffset:0; } }
.pathcmp .pop{ opacity:0; transform-box:fill-box; transform-origin:center; }
.pathcmp .pop.lit{ animation:popIn .5s cubic-bezier(.22,1.3,.36,1) 1.5s forwards; }
@keyframes popIn{ from{opacity:0;transform:scale(.4)} to{opacity:1;transform:scale(1)} }
