/* WingLog — track converter page (/convert/). Builds on style.css: same palette, fonts, glass. */

@property --cv-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

.cv { padding-top: 112px; padding-bottom: 40px; position: relative; }
.cv-sky { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: .9; }

/* ---------- hero ---------- */
.cv-hero { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 30px 50px; }
.cv-hero h1 { font-size: clamp(34px, 5.6vw, 66px); line-height: 1.04; }
.cv-hero h1 .grad-text { display: inline-block; background-size: 220% 100%; animation: cvShine 7s ease-in-out infinite; }
.cv-lead { margin-top: 22px; max-width: 560px; font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); }
.cv-lead b { color: var(--text); font-weight: 600; }
.cv-safe { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding: 10px 16px 10px 12px; border-radius: 999px; border: 1px solid #7cf7c455; background: rgba(20, 70, 60, .22); color: #bff8e2; font-size: 15px; }
.cv-safe svg { width: 22px; height: 22px; fill: none; stroke: var(--mint); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px #7cf7c4aa); }
.cv-safe span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); vertical-align: 1px; animation: cvBlink 2.4s ease-in-out infinite; }

/* Orbit of the three formats */
.cv-orbit { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin-inline: auto; }
.cv-orbit svg.cv-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cv-orbit .ring__spin { transform-origin: 200px 200px; animation: cvSpin 60s linear infinite; }
.cv-orbit .ring__spin2 { transform-origin: 200px 200px; animation: cvSpin 90s linear infinite reverse; }
.cv-orbit .cv-flow { fill: none; stroke: url(#cvFlow); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 2 14; animation: cvDash 1.6s linear infinite; filter: drop-shadow(0 0 6px #3fd0ffaa); }
.cv-orbit .cv-flow.f2 { animation-duration: 1.9s; }
.cv-orbit .cv-flow.f3 { animation-duration: 2.2s; }
.cv-orbit .core { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; translate: -50% -50%; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #1e4a8c, #071634 70%); border: 1px solid var(--line-2); box-shadow: 0 0 60px -10px #3fd0ff99, inset 0 0 30px #3fd0ff33; }
.cv-orbit .core::before, .cv-orbit .core::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid #3fd0ff55; animation: cvPulse 3s ease-out infinite; }
.cv-orbit .core::after { animation-delay: 1.5s; }
.cv-orbit .core svg { width: 40px; height: 40px; fill: none; stroke: var(--sky); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: cvSpin 12s linear infinite; }
.cv-node { position: absolute; width: 104px; height: 104px; translate: -50% -50%; display: grid; place-items: center; border-radius: 30px; font: 700 21px/1 var(--f-head); letter-spacing: .02em; border: 1px solid var(--line-2); background: linear-gradient(160deg, rgba(50, 100, 180, .45), rgba(8, 20, 46, .8)); backdrop-filter: blur(10px); box-shadow: 0 18px 50px -18px #000, 0 0 40px -14px var(--c); animation: cvFloat 6s ease-in-out infinite; }
.cv-node small { display: block; margin-top: 6px; font: 500 10px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; }
.cv-node b { display: block; text-align: center; color: var(--c); text-shadow: 0 0 18px var(--c); }
.cv-node.n1 { --c: #3fd0ff; left: 50%; top: 9%; }
.cv-node.n2 { --c: #7cf7c4; left: 87%; top: 72%; animation-delay: -2s; }
.cv-node.n3 { --c: #ffb35c; left: 13%; top: 72%; animation-delay: -4s; }

/* ---------- the converter itself ---------- */
.cv-app { position: relative; margin-top: 56px; }
.cv-drop { position: relative; border-radius: 30px; padding: 1.5px; background: conic-gradient(from var(--cv-a), #3fd0ff00 0deg, #3fd0ff 60deg, #7cf7c4 120deg, #3f7dff00 180deg, #3f7dff00 220deg, #ffb35c 300deg, #3fd0ff00 360deg); animation: cvRotate 5s linear infinite; transition: transform .45s var(--ease), box-shadow .45s var(--ease), opacity .45s; box-shadow: 0 30px 80px -40px #3fd0ff88; }
.cv-drop__in { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 14px; padding: clamp(36px, 6vw, 64px) 24px; border-radius: 29px; text-align: center; cursor: pointer; background: linear-gradient(170deg, #0d2350f2, #060f26f7 70%); }
.cv-drop__in::before { content: ""; position: absolute; inset: 14px; border-radius: 20px; border: 1.5px dashed #9be6ff33; transition: border-color .3s, inset .3s; pointer-events: none; }
.cv-drop__in::after { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 220px at var(--mx, 50%) var(--my, 0%), #3fd0ff22, transparent 70%); pointer-events: none; transition: opacity .3s; }
.cv-drop:hover, .cv-drop.is-over { transform: translateY(-4px); box-shadow: 0 40px 100px -40px #3fd0ffcc; }
.cv-drop.is-over .cv-drop__in::before { inset: 8px; border-color: var(--cyan); }
.cv-drop.is-over .cv-file { transform: translateY(-8px) scale(1.08); }
.cv-drop:focus-within { outline: none; }
.cv-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cv-file { position: relative; width: 86px; height: 104px; transition: transform .45s var(--ease); }
.cv-file svg { width: 100%; height: 100%; overflow: visible; }
.cv-file .sheet { fill: #0f2b5e; stroke: #9be6ff; stroke-width: 2; stroke-linejoin: round; }
.cv-file .fold { fill: #1f4a8f; stroke: #9be6ff; stroke-width: 2; stroke-linejoin: round; }
.cv-file .wave { fill: none; stroke: url(#cvFileGrad); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 120; stroke-dashoffset: 120; animation: cvDraw 3.2s ease-in-out infinite; }
.cv-file .arrow { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; animation: cvBob 1.8s ease-in-out infinite; filter: drop-shadow(0 0 8px #3fd0ff); }
.cv-drop h2 { font-size: clamp(22px, 3vw, 30px); margin-top: 6px; }
.cv-drop p { color: var(--muted); }
.cv-drop .btn { margin-top: 8px; }
.cv-types { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.cv-types span { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); font: 600 12px/1 var(--f-mono); letter-spacing: .12em; color: var(--sky); background: rgba(10, 30, 70, .5); }
.cv-scan { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--cyan), var(--mint), transparent); box-shadow: 0 0 20px var(--cyan); opacity: 0; pointer-events: none; }
.cv-drop.is-busy .cv-scan { opacity: 1; animation: cvScan 1s ease-in-out infinite alternate; }
.cv-drop.is-out { opacity: 0; transform: scale(.94) translateY(-12px); pointer-events: none; }
.cv-err { display: flex; gap: 12px; align-items: flex-start; max-width: 640px; margin: 18px auto 0; padding: 14px 18px; border-radius: 16px; border: 1px solid #ff8a7a66; background: rgba(90, 24, 30, .4); color: #ffd6cf; font-size: 15px; }
.cv-err svg { flex: none; width: 22px; height: 22px; fill: none; stroke: #ff9a8a; stroke-width: 1.8; stroke-linecap: round; }
.cv-err.shake { animation: cvShake .5s var(--ease); }

/* Result */
.cv-res { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; }
.cv-res > * { opacity: 0; transform: translateY(26px); }
.cv-res.is-in > * { animation: cvRise .8s var(--ease) forwards; }
.cv-res.is-in > *:nth-child(2) { animation-delay: .12s; }
.cv-res.is-in > *:nth-child(3) { animation-delay: .24s; }
.cv-panel { position: relative; overflow: hidden; padding: 22px; display: flex; flex-direction: column; }
.cv-panel__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-width: 0; }
.cv-panel__head h3 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cv-badge { flex: none; padding: 6px 10px; border-radius: 9px; font: 700 12px/1 var(--f-mono); letter-spacing: .1em; color: #04101f; background: var(--c, var(--cyan)); box-shadow: 0 0 18px -2px var(--c, var(--cyan)); }
.cv-again { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(10, 30, 70, .5); color: var(--muted); font: 600 14px var(--f-body); cursor: pointer; transition: color .2s, border-color .2s; }
.cv-again:hover { color: var(--text); border-color: var(--cyan); }
.cv-again svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cv-map { position: relative; width: 100%; flex: 1 1 auto; min-height: 320px; border-radius: 18px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #0f2a5c, #050d22 75%); border: 1px solid var(--line); }
.cv-map canvas, .cv-prof canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cv-prof { position: relative; height: 120px; margin-top: 14px; border-radius: 14px; overflow: hidden; background: rgba(4, 12, 30, .6); border: 1px solid var(--line); }
.cv-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; color: var(--dim); font: 500 12px/1.3 var(--f-mono); }
.cv-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.cv-legend .alt { flex: 1 1 160px; display: flex; align-items: center; gap: 8px; }
.cv-legend .alt em { flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #3f7dff, #3fd0ff, #7cf7c4, #ffb35c); font-style: normal; }

.cv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cv-stat { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(8, 22, 52, .5); transition: border-color .3s, transform .3s; }
.cv-stat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cv-stat b { display: block; font: 600 clamp(20px, 2.4vw, 26px)/1.1 var(--f-head); font-variant-numeric: tabular-nums; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cv-stat span { display: block; margin-top: 8px; font: 500 11px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.cv-stat.wide { grid-column: 1 / -1; }
.cv-stat.wide b { font-size: 17px; font-family: var(--f-body); }

.cv-to { margin-top: 18px; }
.cv-to__lbl { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.cv-to__lbl::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.cv-pipe { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.cv-pipe .cv-badge { font-size: 14px; padding: 10px 12px; }
.cv-pipe .dots { flex: 1; height: 2px; min-width: 30px; background: repeating-linear-gradient(90deg, var(--cyan) 0 4px, transparent 4px 12px); background-size: 24px 2px; animation: cvMarch .8s linear infinite; opacity: .8; }
.cv-outs { display: grid; gap: 10px; margin-top: 16px; }
.cv-out { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(120deg, rgba(30, 70, 140, .45), rgba(8, 20, 46, .7)); color: var(--text); text-align: left; cursor: pointer; overflow: hidden; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; font: inherit; }
.cv-out::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, #ffffff22, transparent); transform: skewX(-20deg); animation: cvSweep 4.5s ease-in-out infinite; }
.cv-out:nth-child(2)::before { animation-delay: 1.2s; }
.cv-out:hover { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 16px 40px -18px var(--c); }
.cv-out .cv-badge { font-size: 14px; padding: 10px 12px; }
.cv-out strong { display: block; font: 600 16px/1.25 var(--f-body); }
.cv-out small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.cv-out .go { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(4, 14, 34, .6); transition: background .3s, border-color .3s; }
.cv-out .go svg { width: 20px; height: 20px; fill: none; stroke: var(--sky); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.cv-out:hover .go svg { transform: translateY(2px); }
.cv-out.is-done .go { background: var(--mint); border-color: var(--mint); }
.cv-out.is-done .go svg { stroke: #04101f; animation: cvPop .5s var(--ease); }
.cv-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; background: var(--c, var(--cyan)); box-shadow: 0 0 10px var(--c, var(--cyan)); animation: cvSpark .9s ease-out forwards; }
.cv-hint { margin-top: 14px; color: var(--dim); font-size: 13px; line-height: 1.5; }

/* ---------- below ---------- */
.cv-sec { margin-top: 100px; }
.cv-sec > h2 { font-size: clamp(26px, 3.4vw, 40px); }
.cv-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; counter-reset: st; }
.cv-step { position: relative; padding: 26px 24px; overflow: hidden; }
.cv-step::before { counter-increment: st; content: "0" counter(st); display: block; font: 600 44px/1 var(--f-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .9; }
.cv-step h3 { margin-top: 18px; font-size: 19px; }
.cv-step p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.cv-step::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, #3fd0ff33, transparent 70%); animation: cvFloat 7s ease-in-out infinite; }
.cv-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 34px; }
.cv-note { padding: 22px 24px; }
.cv-note h3 { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.cv-note h3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--cyan)); box-shadow: 0 0 12px var(--c, var(--cyan)); flex: none; }
.cv-note p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.cv-cta { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 26px; margin-top: 100px; padding: 30px 34px; overflow: hidden; }
.cv-cta::before { content: ""; position: absolute; inset: -2px; background: radial-gradient(600px 200px at 0% 50%, #3fd0ff22, transparent 70%), radial-gradient(500px 200px at 100% 50%, #7cf7c41a, transparent 70%); pointer-events: none; }
.cv-cta img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 20px 50px -14px #3fd0ffaa; animation: cvFloat 5s ease-in-out infinite; }
.cv-cta h2 { font-size: clamp(22px, 2.8vw, 30px); }
.cv-cta p { margin-top: 8px; color: var(--muted); }

/* reveal on scroll */
.cv-rv { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.cv-rv.in { opacity: 1; transform: none; }
.cv-rv.d1 { transition-delay: .1s; } .cv-rv.d2 { transition-delay: .2s; } .cv-rv.d3 { transition-delay: .3s; }

@keyframes cvSpin { to { transform: rotate(360deg); } }
@keyframes cvRotate { to { --cv-a: 360deg; } }
@keyframes cvDash { to { stroke-dashoffset: -32; } }
@keyframes cvFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes cvPulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes cvBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes cvShine { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes cvDraw { 0% { stroke-dashoffset: 120; } 55%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -120; } }
@keyframes cvBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes cvScan { from { top: 0; } to { top: calc(100% - 3px); } }
@keyframes cvShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes cvRise { to { opacity: 1; transform: none; } }
@keyframes cvMarch { to { background-position: 24px 0; } }
@keyframes cvSweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@keyframes cvPop { 0% { transform: scale(.3); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes cvSpark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

@media (max-width: 900px) {
  .cv-hero { grid-template-columns: 1fr; }
  .cv-orbit { width: min(80vw, 320px); order: -1; }
  .cv-res { grid-template-columns: 1fr; }
  .cv-map { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
  .cv-steps, .cv-notes { grid-template-columns: 1fr; }
  .cv-cta { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 520px) {
  .cv-node { width: 84px; height: 84px; border-radius: 24px; font-size: 18px; }
  .cv-stats { grid-template-columns: 1fr 1fr; }
  .cv-stat b { font-size: 18px; }
  .cv-panel { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .cv-res > *, .cv-rv { opacity: 1; transform: none; }
}
