/* ==========================================================================
   HEXA OS 2.1 — cosmo.css  (COSMO reveal overlay and information page)
   Entrance animations are finite (they run once). Nothing loops.
   html[data-motion="reduced"] and .cz-still show the finished artwork at once.
   ========================================================================== */

/* ---------- reveal overlay ---------- */
.cz-reveal {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 100; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 2.4vh, 22px);
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); text-align: center;
  background: radial-gradient(ellipse at 50% 38%, #190d3a 0%, #0a0818 55%, #03030a 100%);
  animation: czFadeIn .45s ease-out both;
}
.cz-reveal:focus { outline: none; }
.cz-reveal.cz-out { animation: czFadeOut .26s ease-in both; pointer-events: none; }
.cz-stars { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: .85; pointer-events: none; animation: czFadeIn 1.4s ease-out both; }

.cz-art { position: relative; width: min(78vw, 44vh, 420px); aspect-ratio: 1 / 1; flex: none; filter: drop-shadow(0 0 40px rgba(var(--accent-rgb), .35)); }
.cz-art svg { display: block; width: 100%; height: 100%; }

.cz-copy { position: relative; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cz-corp { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .5em; color: var(--accent); animation: czRise .7s .5s ease-out both; }
.cz-mini { width: 18px; height: 18px; }
.cz-title {
  margin: 4px 0 0; font-size: clamp(2.6rem, 14vw, 5.2rem); font-weight: 800; letter-spacing: .22em; padding-left: .22em; line-height: 1;
  background: linear-gradient(135deg, #ffffff 10%, #bfe9ff 45%, #b9a4ff 90%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(var(--accent-2-rgb), .45));
  animation: czTitle .9s .7s cubic-bezier(.2, .8, .2, 1) both;
}
.cz-sub { margin: 0; font-size: clamp(1rem, 3.8vw, 1.3rem); color: #e6e3ff; animation: czRise .7s 1.1s ease-out both; }
.cz-tag { margin: 0; font-size: clamp(.85rem, 3.2vw, 1rem); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); animation: czRise .7s 1.35s ease-out both; }
.cz-note { margin: 8px 0 0; max-width: 420px; font-size: .78rem; color: #9d9abd; animation: czRise .7s 1.6s ease-out both; }
.cz-actions { margin-top: 10px; display: flex; gap: 10px; animation: czRise .7s 1.75s ease-out both; }
.cz-actions .btn { min-height: 48px; padding: 0 22px; }
.cz-skip { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 2; background: rgba(255, 255, 255, .08); }

/* artwork pieces */
.cz-a-nebula { animation: czFadeIn 1.2s ease-out both; }
.cz-a-stars { animation: czFadeIn 1.4s .2s ease-out both; }
.cz-a-grid { animation: czFadeIn 1.2s .5s ease-out both; }
.cz-a-ring { transform-box: fill-box; transform-origin: center; animation: czRing 1s var(--d, .9s) cubic-bezier(.2, .8, .2, 1) both; }
.cz-a-spokes { animation: czFadeIn .8s 1s ease-out both; }
.cz-a-hex { stroke-dasharray: 100; stroke-dashoffset: 100; animation: czDraw .9s var(--d, .5s) ease-out forwards; }
.cz-a-core { transform-box: fill-box; transform-origin: center; animation: czCore 1.2s .3s cubic-bezier(.2, .8, .2, 1) both; }
.cz-a-nodes { animation: czFadeIn .7s 1.5s ease-out both; }
.cz-a-flare { transform-box: fill-box; transform-origin: center; animation: czFlare 1.2s 1.2s ease-out both; }

/* a finished frame for reduced motion */
.cz-still, .cz-still * { animation: none !important; }
.cz-still .cz-a-hex { stroke-dashoffset: 0; }

@keyframes czFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes czFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes czRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes czTitle { from { opacity: 0; transform: scale(.82); letter-spacing: .5em; } to { opacity: 1; transform: none; letter-spacing: .22em; } }
@keyframes czRing { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes czDraw { to { stroke-dashoffset: 0; } }
@keyframes czCore { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes czFlare { 0% { opacity: 0; transform: scaleX(0); } 50% { opacity: 1; } 100% { opacity: .85; transform: scaleX(1); } }

@media (max-height: 560px) and (orientation: landscape) {
  .cz-reveal { flex-direction: row; gap: 24px; }
  .cz-art { width: min(40vw, 78vh); }
  .cz-copy { align-items: flex-start; text-align: left; }
}

/* ---------- information page (COSMO app) ---------- */
.cz-app { background: #07070f; }
.cz-scroll { padding: 0 0 18px; }
.cz-banner { position: relative; height: 150px; overflow: hidden; border-bottom: 1px solid var(--line); background: #070714; }
.cz-banner svg { display: block; width: 100%; height: 100%; }
.cz-banner .cz-a-nebula, .cz-banner .cz-a-stars, .cz-banner .cz-a-grid, .cz-banner .cz-a-ring, .cz-banner .cz-a-spokes,
.cz-banner .cz-a-hex, .cz-banner .cz-a-core, .cz-banner .cz-a-nodes, .cz-banner .cz-a-flare { animation: none; }
.cz-banner .cz-a-hex { stroke-dashoffset: 0; }
.cz-head { padding: 14px 16px 4px; }
.cz-kicker { margin: 0; font-size: .7rem; letter-spacing: .3em; color: var(--accent-2); font-weight: 700; }
.cz-h-name { margin: 2px 0 0; font-size: 2rem; letter-spacing: .2em; font-weight: 800; }
.cz-h-sub { margin: 2px 0 0; color: #e6e3ff; }
.cz-h-tag { margin: 4px 0 0; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.cz-card { margin: 12px 16px 0; padding: 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.cz-status { border-color: rgba(251, 191, 36, .5); background: rgba(251, 191, 36, .06); }
.cz-card-h { margin: 0 0 8px; font-size: .95rem; }
.cz-p { margin: 0 0 8px; color: #cfcbea; font-size: .9rem; }
.cz-p:last-child { margin-bottom: 0; }
.cz-caps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cz-cap { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.cz-cap-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cz-cap-name { font-weight: 600; }
.cz-cap-note { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.cz-badge { flex: none; padding: 2px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; border: 1px solid var(--line-strong); color: #d8d5f2; }
.cz-badge[data-status="available"] { color: #8ff0c4; border-color: rgba(61, 220, 151, .5); background: rgba(61, 220, 151, .1); }
.cz-badge[data-status="planned"] { color: #ffd98f; border-color: rgba(251, 191, 36, .5); background: rgba(251, 191, 36, .1); }
.cz-badge[data-status="not-available"] { color: #ffb3bf; border-color: rgba(255, 107, 129, .5); background: rgba(255, 107, 129, .1); }
.cz-list { margin: 0; padding-left: 20px; color: #cfcbea; font-size: .9rem; }
.cz-list li { margin: 3px 0; }
.cz-field { margin-bottom: 10px; }
.cz-fine { margin: 6px 0 0; font-size: .78rem; color: var(--muted); }
.cz-foot { padding: 0 16px; }

/* let the soft nebula glow fade out naturally instead of being cut into a square */
.cz-art svg { overflow: visible; }
