/* ==========================================================================
   DroFi 랜딩 인트로 — 처음 방문한 사람에게만 한 번, 히어로 위를 덮었다가 위로 걷힘(intro.js).
   장면: 팀원마다 다른 AI 사이를 결론이 DroFi로 오가고, 겹칠 때만 사람이 고르고, 반출 금지 자료는 멈춤.
   왜 이 모양인지(시안 A · B · C 중 B, 움직임 양, 칸 표기)는 intro.js 머리 주석.
   - 랜딩 전역 클래스(.on · .lit 등)와 부딪히지 않게 모든 클래스는 dfi- 로 시작하고, 토큰도 .dfi 안에서만 정의
   - 상태 클래스(intro.js가 붙임): is-playing → is-draw · is-burst → 글자마다 is-on → is-copy → is-cta → is-lifted
   ========================================================================== */

.dfi {
  --i-night: #060A22;
  --i-surface: #161C42;
  --i-surface-2: #1B2356;
  --i-line: #28306A;
  --i-ink: #E9ECFB;
  --i-body: #B8C4E8;
  --i-hint: #8590C0;
  --i-sky: #8FB4FF;
  --i-primary: #2C4BC4;
  --i-paper: #EAEDF7;
  --i-gate-bg: #2C2410;
  --i-gate-fg: #F2D6A0;
  --i-gate-ln: #8A6E2E;
  --i-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --i-ease-out: cubic-bezier(.16, 1, .3, 1);
  --i-ease-lift: cubic-bezier(.76, 0, .24, 1);

  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  color: #fff;
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(80% 80% at 50% 48%, #1A2470 0%, #0D1342 52%, var(--i-night) 100%);
}
.dfi:focus { outline: none; }
.dfi *, .dfi *::before, .dfi *::after { box-sizing: border-box; }
html.dfi-open { overflow: hidden; }
.dfi { transition: transform .9s var(--i-ease-lift); }
.dfi.is-lifted { transform: translateY(-101%); }   /* 등록 속성이 없는 브라우저(구형 사파리)는 예전처럼 위로 걷힘 */

/* 걷히기: 커튼처럼 위로가 아니라 가운데부터 둥글게 열리며 그 구멍으로 들어감(2026-11-09 사용자).
   구멍 반지름(--dfi-hole)을 등록 속성으로 애니메이션하고, 덮개는 살짝 커져 앞으로 나아가는 느낌.
   마스크는 걷힐 때만 켬 — 재생 내내 전체 화면 마스크를 그리지 않게. 길이는 intro.js 의 LIFT 와 같게 */
@property --dfi-hole { syntax: '<length>'; inherits: false; initial-value: 0px; }
/* dfi--iris 는 intro.js 가 등록 속성(CSS.registerProperty)을 지원하는 브라우저에서만 붙임 */
.dfi.dfi--iris { transition: --dfi-hole .95s cubic-bezier(.7, 0, .2, 1), transform .95s cubic-bezier(.7, 0, .2, 1); }
.dfi.dfi--iris.is-lifted {
  --dfi-hole: 150vmax;
  transform: scale(1.25);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent var(--dfi-hole), #000 calc(var(--dfi-hole) + 48px));
  mask-image: radial-gradient(circle at 50% 50%, transparent var(--dfi-hole), #000 calc(var(--dfi-hole) + 48px));
}
.dfi.dfi--iris.is-lifted .dfi__brand { opacity: 0; transform: scale(1.12); transition: opacity .3s, transform .95s cubic-bezier(.7, 0, .2, 1); }

.dfi__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(143,180,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(143,180,255,.07) 1px, transparent 1px);
  background-size: 40px 40px; background-position: center;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%);
}
.dfi__glow {
  position: absolute; left: 50%; top: 50%; width: min(70vw, 900px); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(44,75,196,.5), rgba(44,75,196,0));
  animation: dfi-breathe 4.5s ease-in-out infinite alternate;
}
@keyframes dfi-breathe { from { scale: 1; opacity: .55; } to { scale: 1.14; opacity: .9; } }
.dfi__dots { position: absolute; inset: 0; pointer-events: none; }
.dfi__dots span { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--i-sky); opacity: .28; animation: dfi-drift 7s ease-in-out infinite alternate; }
@keyframes dfi-drift { to { transform: translate(14px, -18px); opacity: .6; } }
.dfi__flash {
  position: absolute; left: 50%; top: 50%; width: min(36vw, 440px); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(234,237,247,.6), rgba(143,180,255,.25) 55%, rgba(143,180,255,0));
}
.dfi.is-burst .dfi__flash { animation: dfi-flash 1s ease-out forwards; }
@keyframes dfi-flash { 0% { opacity: 0; scale: .3; } 30% { opacity: 1; } 100% { opacity: 0; scale: 1.8; } }
.dfi__stage { position: absolute; inset: 0; pointer-events: none; }
.dfi__skip {
  position: absolute; z-index: 3; padding: 6px 8px; border: 0; background: none; cursor: pointer;
  top: max(16px, calc(env(safe-area-inset-top) + 8px)); right: max(18px, calc(env(safe-area-inset-right) + 8px));
  color: var(--i-hint); font: 700 12px/1 var(--i-mono); letter-spacing: .1em;
}
.dfi__skip:hover { color: #fff; }
.dfi :focus-visible { outline: 2px solid var(--i-sky); outline-offset: 3px; }

/* ── 끝 화면: 로고가 주인공(2026-11-09 사용자 "A처럼 로고가 더 부각") ── */
.dfi__brand {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center;
  gap: clamp(12px, 1.8vh, 18px); padding: 24px; text-align: center; pointer-events: none;
}
.dfi__wm { width: clamp(210px, 30vw, 380px); height: auto; display: block; overflow: visible; }
.dfi__wm path { stroke-dasharray: 1 1.05; stroke-dashoffset: 0; }
.dfi__wm .dfi-wm__dot { transform-box: fill-box; transform-origin: center; }
.dfi__tag { margin: -2px 0 0; display: flex; font: 800 clamp(11px, 1.15vw, 14px)/1 var(--i-mono); letter-spacing: .34em; text-indent: .34em; color: var(--i-sky); }
.dfi__head { margin: 10px 0 0; font-size: clamp(18px, 2.1vw, 25px); font-weight: 700; line-height: 1.4; letter-spacing: -.03em; color: var(--i-ink); }
.dfi__head em { font-style: normal; color: var(--i-sky); }
.dfi__head .dfi-nw { display: inline-block; white-space: nowrap; }  /* 좁은 화면에서 끝말만 따로 떨어지지 않게 */
.dfi__copy { margin: 0; max-width: 30em; font-size: clamp(14px, 1.5vw, 18px); line-height: 1.55; color: var(--i-body); text-wrap: balance; }
.dfi__cta {
  pointer-events: auto; margin-top: 8px; height: 48px; padding: 0 22px; border-radius: 4px;
  border: 1px solid rgba(143,180,255,.42); background: rgba(143,180,255,.06); color: #fff;
  font: inherit; font-size: 16px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; cursor: pointer;
  transition: background .25s, border-color .25s;
}
.dfi__cta:hover { background: var(--i-primary); border-color: var(--i-primary); }
.dfi__cta span { display: inline-block; transition: transform .25s; }
.dfi__cta:hover span { transform: translateX(3px); }

/* 재생 중 시작 상태 → 단계 클래스가 붙으면 드러남. Web Animations 가 없으면 is-playing 이 안 붙어 끝 화면만 보임 */
.dfi.is-playing .dfi__wm path { stroke-dashoffset: 1.02; }   /* 1.02 · 간격 1.05: 둥근 끝이 점으로 남지 않게 */
.dfi.is-playing .dfi__wm .dfi-wm__dot { opacity: 0; transform: scale(.2); }
.dfi.is-playing .dfi__tag span { opacity: 0; }
.dfi.is-playing :is(.dfi__head, .dfi__copy, .dfi__cta) { opacity: 0; transform: translateY(10px); }
.dfi.is-draw .dfi__wm path { stroke-dashoffset: 0; transition: stroke-dashoffset var(--dur, .34s) cubic-bezier(.65, 0, .35, 1) calc(var(--i) * 95ms); }
.dfi.is-draw .dfi__wm .dfi-wm__dot { opacity: 1; transform: none; transition: opacity .2s calc(var(--i) * 95ms), transform .5s cubic-bezier(.34, 1.56, .64, 1) calc(var(--i) * 95ms); }
.dfi .dfi__tag span.is-on { opacity: 1; transition: opacity .08s; }
.dfi.is-copy :is(.dfi__head, .dfi__copy) { opacity: 1; transform: none; transition: opacity .5s, transform .6s var(--i-ease-out); }
.dfi.is-cta .dfi__cta { opacity: 1; transform: none; transition: opacity .5s, transform .6s var(--i-ease-out), background .25s, border-color .25s; }

/* ── 장면: 팀원 칸 · 허브 · 오가는 꼬리표 ── */
.dfi-net { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dfi-spoke { fill: none; stroke: var(--i-sky); stroke-opacity: .4; stroke-width: 1.3; stroke-dasharray: 1 1.05; stroke-dashoffset: 1.02; }
.dfi-card { transform-box: fill-box; transform-origin: center; }
.dfi-card__box { fill: var(--i-surface); stroke: var(--i-line); stroke-width: 1.2; transition: stroke .3s, fill .3s; }
.dfi-card.is-got .dfi-card__box { stroke: var(--i-sky); fill: var(--i-surface-2); }
.dfi-card__av { fill: rgba(143,180,255,.14); }
.dfi-card__ini { font-size: 12px; font-weight: 800; fill: var(--i-sky); }
.dfi-card__who { fill: none; stroke: var(--i-sky); stroke-width: 1.4; stroke-linecap: round; }
.dfi-card__nm { font-size: 14px; font-weight: 700; fill: var(--i-ink); }
.dfi-net.is-narrow .dfi-card__nm { font-size: 12.5px; }
.dfi-card__rl { font: 700 9.5px var(--i-mono); letter-spacing: .1em; fill: var(--i-hint); }
.dfi-card__ai { fill: var(--i-sky); font-weight: 800; }
.dfi-hub { transform-box: fill-box; transform-origin: center; }
.dfi-hub__tile { fill: #0E1440; stroke: var(--i-sky); stroke-width: 4; transition: fill .35s, stroke .35s; }
.dfi-hub path { fill: none; stroke: var(--i-sky); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s; }
.dfi-hub path.dfi-hub__thin { stroke-width: 4; }
.dfi-hub__blk { fill: var(--i-sky); transition: fill .35s; }
.dfi-hub.is-lit .dfi-hub__tile { fill: var(--i-primary); stroke: var(--i-primary); }
.dfi-hub.is-lit path { stroke: var(--i-paper); }
.dfi-hub.is-lit .dfi-hub__blk { fill: var(--i-paper); }
.dfi-pk rect { fill: var(--i-surface-2); stroke: rgba(143,180,255,.6); stroke-width: 1; transition: fill .2s, stroke .2s; }
.dfi-pk text { font-size: 12.5px; font-weight: 600; fill: var(--i-ink); transition: fill .2s; }
.dfi-pk circle { fill: var(--i-sky); transition: fill .2s; }
.dfi-pk--dot { filter: drop-shadow(0 0 6px rgba(143,180,255,.85)); }
.dfi-pk--blocked rect { fill: var(--i-gate-bg); stroke: var(--i-gate-ln); }
.dfi-pk--blocked text, .dfi-pk--blocked circle { fill: var(--i-gate-fg); }
.dfi-ask__bg { fill: var(--i-surface-2); stroke: var(--i-sky); stroke-width: 1.2; }
.dfi-ask__q { font-size: 12.5px; font-weight: 600; fill: var(--i-ink); }
.dfi-ask__chip rect { fill: none; stroke: rgba(143,180,255,.5); stroke-width: 1; transition: fill .2s, stroke .2s; }
.dfi-ask__chip text { font-size: 11.5px; font-weight: 700; fill: var(--i-body); transition: fill .2s; }
.dfi-ask__chip.is-on rect { fill: var(--i-primary); stroke: var(--i-primary); }
.dfi-ask__chip.is-on text { fill: #fff; }

@media (prefers-reduced-motion: reduce) {
  .dfi__glow, .dfi__dots span { animation: none; }
}
