/* HEXORA — launch screen (countdown → intro motion → "We are live").  Drawn by assets/js/launch.js.
   Loaded on every public page before launch.js, so the countdown never flashes the site underneath. */

/* while the countdown is on, the page itself is not shown at all */
html.hx-soon, html.hx-soon body { overflow: hidden !important; height: 100%; }
html.hx-soon body > *:not(.hxl) { display: none !important; }
/* during the intro the page is built underneath (so it is ready when the intro lifts) but cannot be scrolled */
html.hx-intro, html.hx-intro body { overflow: hidden !important; }

.hxl {
  --l-bg: #070B17; --l-blue: #2563EB; --l-cyan: #00D4FF; --l-violet: #7C3AED;
  --l-fg: #EEF2FF; --l-mute: #A5B0CC; --l-faint: #7E89A8;
  --l-glass: rgba(255, 255, 255, .045); --l-rim: rgba(255, 255, 255, .11);
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; flex-direction: column; align-items: center;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  background: var(--l-bg); color: var(--l-fg);
  font-family: Manrope, "Manrope Fallback", "Noto Sans Sinhala", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
.hxl *, .hxl *::before, .hxl *::after { box-sizing: border-box; }
.hxl.is-leaving { opacity: 0; transform: scale(1.02); transition: opacity .7s ease, transform .7s ease; pointer-events: none; }

/* ---------- background: soft moving glows, a faint grid, a few floating lights ---------- */
.hxl-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.hxl-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; will-change: transform; }
.hxl-glow.g1 { width: 62vmax; height: 62vmax; left: -18vmax; top: -30vmax; background: radial-gradient(circle, rgba(37, 99, 235, .55), transparent 65%); animation: hxl-drift1 22s ease-in-out infinite alternate; }
.hxl-glow.g2 { width: 52vmax; height: 52vmax; right: -20vmax; bottom: -26vmax; background: radial-gradient(circle, rgba(124, 58, 237, .45), transparent 65%); animation: hxl-drift2 26s ease-in-out infinite alternate; }
.hxl-glow.g3 { width: 34vmax; height: 34vmax; left: 50%; top: 38%; margin-left: -17vmax; background: radial-gradient(circle, rgba(0, 212, 255, .22), transparent 65%); animation: hxl-pulse 9s ease-in-out infinite; }
.hxl-grid { position: absolute; inset: -1px; opacity: .5;
  background-image: linear-gradient(rgba(148, 163, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%); }
.hxl-dot { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--c); box-shadow: 0 0 calc(var(--s) * 4) var(--c); opacity: 0;
  animation: hxl-float var(--d) ease-in-out var(--w) infinite; }
@keyframes hxl-drift1 { to { transform: translate(8vmax, 6vmax) scale(1.08); } }
@keyframes hxl-drift2 { to { transform: translate(-7vmax, -5vmax) scale(1.1); } }
@keyframes hxl-pulse { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: .6; transform: scale(1.12); } }
@keyframes hxl-float { 0% { opacity: 0; transform: translate3d(0, 0, 0); } 20% { opacity: .9; } 80% { opacity: .6; } 100% { opacity: 0; transform: translate3d(var(--dx), -90px, 0); } }

/* ---------- content column ---------- */
.hxl-in { position: relative; width: 100%; max-width: 920px; margin: auto; padding: max(40px, env(safe-area-inset-top)) 20px max(40px, calc(24px + env(safe-area-inset-bottom)));
  display: flex; flex-direction: column; align-items: center; text-align: center; }
.hxl-in > * { animation: hxl-rise .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
@keyframes hxl-rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.hxl-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; }
.hxl-logo .logo-part { filter: drop-shadow(0 0 28px rgba(37, 99, 235, .55)) drop-shadow(0 0 60px rgba(124, 58, 237, .25)); }
.hxl-mark { --s: .19; animation: hxl-breathe 5s ease-in-out infinite; }
.hxl-word { --s: .27; }
@keyframes hxl-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.hxl-kick { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--l-rim); background: var(--l-glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 12px; font-weight: 700; letter-spacing: .2em; color: #BFD3FF; }
.hxl-kick::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--l-cyan); box-shadow: 0 0 10px var(--l-cyan); animation: hxl-blink 2.4s ease-in-out infinite; }
@keyframes hxl-blink { 50% { opacity: .35; } }

.hxl h1 { margin: 0; font-size: clamp(34px, 7.2vw, 72px); line-height: 1.06; font-weight: 800; letter-spacing: -.035em; max-width: 14ch; text-wrap: balance; }
.hxl-grad { background: linear-gradient(100deg, #3B82F6 0%, var(--l-cyan) 55%, #7DD3FC 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: hxl-sheen 6s ease-in-out infinite; }
@keyframes hxl-sheen { 50% { background-position: 100% 0; } }
.hxl-si { margin: 20px 0 0; font-family: "Noto Sans Sinhala", Manrope, sans-serif; font-size: clamp(17px, 2.6vw, 21px); line-height: 1.6; font-weight: 600; color: #DCE4FF; }
.hxl-sub { margin: 8px 0 0; font-size: clamp(15px, 2vw, 17px); line-height: 1.6; color: var(--l-mute); max-width: 46ch; }
.hxl-svc { margin: 18px 0 0; font-size: 13px; line-height: 1.9; letter-spacing: .04em; color: var(--l-faint); max-width: 60ch; }
.hxl-svc span { white-space: nowrap; }
.hxl-svc b { color: var(--l-cyan); font-weight: 700; margin: 0 .45em; }

/* ---------- countdown ---------- */
.hxl-cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 2vw, 18px); width: 100%; max-width: 640px; margin: 38px 0 0; }
.hxl-u { position: relative; padding: clamp(14px, 3vw, 24px) 6px clamp(12px, 2.4vw, 18px); border-radius: clamp(14px, 2.4vw, 20px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02));
  border: 1px solid var(--l-rim); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 20px 50px -24px rgba(0, 0, 0, .8); overflow: hidden; }
.hxl-u::after { content: ""; position: absolute; left: 14%; right: 14%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(0, 212, 255, .7), transparent); }
.hxl-n { display: block; height: 1em; overflow: hidden; font-size: clamp(32px, 8vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hxl-n span { display: block; }
.hxl-n.tick span { animation: hxl-tick .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes hxl-tick { from { opacity: 0; transform: translateY(-55%); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.hxl-l { display: block; margin-top: 10px; font-size: clamp(10px, 1.6vw, 12px); font-weight: 700; letter-spacing: .22em; color: var(--l-faint); }
.hxl-when { display: flex; flex-direction: column; gap: 6px; margin: 26px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .16em; color: #C7D2FE; }
.hxl-when span + span { color: var(--l-faint); font-weight: 600; }

/* ---------- buttons ---------- */
.hxl-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 34px 0 0; }
.hxl-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 14px;
  font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; color: var(--l-fg);
  border: 1px solid var(--l-rim); background: var(--l-glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease; overflow: hidden; }
.hxl-btn svg { width: 20px; height: 20px; flex: none; }
.hxl-btn.pri { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--l-blue), #0EA5E9 60%, var(--l-cyan)); box-shadow: 0 10px 30px -10px rgba(37, 99, 235, .8); }
.hxl-btn.pri::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s ease; }
.hxl-btn:active { transform: scale(.97); }
.hxl-btn:focus-visible { outline: 2px solid var(--l-cyan); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .hxl-btn:hover { transform: translateY(-2px); border-color: rgba(0, 212, 255, .45); background: rgba(255, 255, 255, .08); }
  .hxl-btn.pri:hover { box-shadow: 0 16px 40px -12px rgba(0, 212, 255, .7); background: linear-gradient(135deg, var(--l-blue), #0EA5E9 60%, var(--l-cyan)); }
  .hxl-btn.pri:hover::before { transform: translateX(120%); }
}

/* ---------- intro motion: hexagon draws, the mark lands, the name is revealed, then "We are live" ---------- */
.hxl-stage { position: relative; margin: auto; padding: 40px 20px calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; max-width: 760px; }
.hxl-emblem { position: relative; width: clamp(170px, 34vw, 230px); aspect-ratio: 1; display: grid; place-items: center; }
.hxl-hex { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hxl-hex path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.hxl-hex .h1 { stroke: url(#hxl-gr); stroke-width: 1.6; animation: hxl-draw 1.1s cubic-bezier(.65, 0, .35, 1) .1s forwards, hxl-spin 14s linear 1.3s infinite; transform-origin: 50% 50%; }
.hxl-hex .h2 { stroke: rgba(0, 212, 255, .35); stroke-width: .8; animation: hxl-draw 1.2s cubic-bezier(.65, 0, .35, 1) .35s forwards, hxl-spin 20s linear 1.6s infinite reverse; transform-origin: 50% 50%; }
@keyframes hxl-draw { to { stroke-dashoffset: 0; } }
@keyframes hxl-spin { to { transform: rotate(360deg); } }
.hxl-flash { position: absolute; inset: 15%; border-radius: 50%; background: radial-gradient(circle, rgba(0, 212, 255, .9), rgba(37, 99, 235, .4) 40%, transparent 70%); opacity: 0; transform: scale(.4);
  animation: hxl-flash 1.1s ease-out .9s forwards; }
@keyframes hxl-flash { 30% { opacity: 1; } 100% { opacity: 0; transform: scale(2.4); } }
.hxl-emblem .hxl-mark { --s: .25; opacity: 0; transform: scale(.4) rotate(-12deg); filter: blur(10px) drop-shadow(0 0 30px rgba(37, 99, 235, .7));
  animation: hxl-land .9s cubic-bezier(.2, 1.3, .3, 1) .8s forwards, hxl-breathe 5s ease-in-out 2.2s infinite; }
@keyframes hxl-land { to { opacity: 1; transform: none; filter: drop-shadow(0 0 30px rgba(37, 99, 235, .6)) drop-shadow(0 0 70px rgba(124, 58, 237, .3)); } }
.hxl-name { position: relative; margin-top: 26px; }
.hxl-name .hxl-word { --s: .3; clip-path: inset(0 100% 0 0); animation: hxl-wipe .9s cubic-bezier(.65, 0, .35, 1) 1.45s forwards; filter: drop-shadow(0 0 24px rgba(37, 99, 235, .45)); }
.hxl-name::after { content: ""; position: absolute; top: -10%; bottom: -10%; width: 3px; left: 0; background: var(--l-cyan); box-shadow: 0 0 18px var(--l-cyan), 0 0 40px var(--l-blue); opacity: 0;
  animation: hxl-scan .9s cubic-bezier(.65, 0, .35, 1) 1.45s forwards; }
@keyframes hxl-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes hxl-scan { 0% { opacity: 1; left: 0; } 90% { opacity: 1; } 100% { opacity: 0; left: 100%; } }
.hxl-tag { margin: 16px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .5em; color: #9FB4FF; opacity: 0; animation: hxl-tagin 1s ease 2.2s forwards; }
@keyframes hxl-tagin { from { opacity: 0; letter-spacing: 1.1em; } to { opacity: 1; letter-spacing: .5em; } }
.hxl-live { display: flex; flex-direction: column; align-items: center; margin-top: 34px; opacity: 0; transform: translateY(16px); animation: hxl-up .8s cubic-bezier(.2, .8, .2, 1) 2.8s forwards; }
@keyframes hxl-up { to { opacity: 1; transform: none; } }
.hxl-badge { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 800; letter-spacing: .24em; color: #A7F3D0;
  background: rgba(16, 185, 129, .12); border: 1px solid rgba(52, 211, 153, .35); }
.hxl-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: hxl-ping 1.6s ease-out infinite; }
@keyframes hxl-ping { to { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); } }
.hxl-live h1 { margin-top: 16px; font-size: clamp(30px, 6vw, 56px); max-width: none; }
.hxl-live .hxl-cta { margin-top: 26px; }
.hxl-skip { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 2; min-height: 40px; padding: 0 16px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--l-mute); background: var(--l-glass); border: 1px solid var(--l-rim); cursor: pointer; }
.hxl-skip:focus-visible { outline: 2px solid var(--l-cyan); outline-offset: 3px; }

/* ---------- phones and short screens ---------- */
@media (max-width: 560px) {
  .hxl-in { padding-top: max(28px, env(safe-area-inset-top)); }
  .hxl-logo { margin-bottom: 20px; gap: 8px; }
  .hxl-mark { --s: .15; } .hxl-word { --s: .21; }
  .hxl-kick { font-size: 10.5px; letter-spacing: .16em; padding: 7px 13px; margin-bottom: 18px; }
  .hxl-svc { font-size: 12px; }
  .hxl-cd { margin-top: 30px; }
  .hxl-l { letter-spacing: .14em; }
  .hxl-when { font-size: 11.5px; letter-spacing: .12em; }
  .hxl-cta { flex-direction: column; width: 100%; max-width: 360px; }
  .hxl-btn { width: 100%; }
  .hxl-emblem .hxl-mark { --s: .2; } .hxl-name .hxl-word { --s: .23; }
  .hxl-tag { letter-spacing: .36em; font-size: 11px; }
}
@media (max-width: 360px) { .hxl-l { letter-spacing: .06em; font-size: 9.5px; } .hxl-cd { gap: 6px; } }
/* wide but not tall (laptops): everything fits on one screen */
@media (max-height: 980px) and (min-width: 561px) {
  .hxl-logo { margin-bottom: 18px; gap: 8px; } .hxl-mark { --s: .15; } .hxl-word { --s: .22; }
  .hxl-kick { margin-bottom: 18px; }
  .hxl h1 { font-size: clamp(34px, min(7.2vw, 7.4vh), 72px); }
  .hxl-si { margin-top: 14px; } .hxl-svc { margin-top: 12px; }
  .hxl-cd { margin-top: 26px; } .hxl-n { font-size: clamp(32px, min(8vw, 6.4vh), 64px); }
  .hxl-when { margin-top: 18px; } .hxl-cta { margin-top: 22px; }
}
@media (max-height: 800px) and (min-width: 561px) { .hxl-mark { --s: .12; } .hxl-word { --s: .18; } .hxl-sub { display: none; } }

/* ---------- reduced motion: everything is shown in its final place, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .hxl *, .hxl *::before, .hxl *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .hxl-dot, .hxl-flash, .hxl-name::after { display: none; }
}
