:root {
  --bg: #04050b;
  --surface: rgba(8, 11, 22, 0.94);
  --surface-2: rgba(10, 13, 25, 0.97);
  --text: #f5f7ff;
  --text-soft: rgba(228, 234, 255, 0.82);
  --text-dim: rgba(192, 201, 233, 0.58);
  --border: rgba(144, 161, 255, 0.12);
  --accent: #6437ff;
  --accent-2: #5f97ff;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --shadow-xl: 0 26px 70px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(100, 55, 255, 0.12), transparent 24%),
    radial-gradient(circle at 86% 10%, rgba(95, 151, 255, 0.08), transparent 18%),
    linear-gradient(180deg, #04050b 0%, #060916 56%, #04050b 100%);
}

body.is-redirecting { overflow: hidden; }

.site-bg,
.site-bg span {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.site-bg {
  z-index: 0;
  overflow: hidden;
}

.beam {
  inset: auto;
  left: -56vw;
  width: 72vw;
  height: 2px;
  opacity: 0.44;
  transform-origin: left center;
  transform: rotate(13deg) translate3d(0, 0, 0);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(230, 238, 255, 0.08) 22%,
    rgba(240, 245, 255, 0.92) 48%,
    rgba(129, 171, 255, 0.7) 64%,
    rgba(100, 55, 255, 0.24) 78%,
    rgba(255, 255, 255, 0) 100%
  );
  box-shadow: 0 0 12px rgba(188, 206, 255, 0.14), 0 0 24px rgba(100, 55, 255, 0.08);
}

.beam::after {
  content: "";
  position: absolute;
  inset: -5px 0;
  background: inherit;
  opacity: 0.13;
  filter: blur(2px);
}

.beam-a { top: 18%; animation: beamMove 18s linear infinite; }
.beam-b { top: 48%; opacity: 0.3; animation: beamMove 22s linear infinite -6s; }
.beam-c { top: 79%; opacity: 0.25; animation: beamMove 20s linear infinite -10s; }

@keyframes beamMove {
  from { transform: rotate(13deg) translate3d(0, 0, 0); }
  to { transform: rotate(13deg) translate3d(194vw, 0, 0); }
}

.orb-a { background: radial-gradient(circle at 14% 18%, rgba(100, 55, 255, 0.14), transparent 22%); }
.orb-b { background: radial-gradient(circle at 86% 10%, rgba(95, 151, 255, 0.1), transparent 18%); }
.vignette {
  background:
    radial-gradient(circle at 50% 115%, rgba(0, 0, 0, 0.44), transparent 36%),
    linear-gradient(180deg, rgba(3, 4, 10, 0), rgba(3, 4, 10, 0.2));
}

.hub-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  padding: 10px;
  display: grid;
  place-items: center;
}

.hub-frame {
  position: relative;
  width: min(1420px, calc(100vw - 20px));
  height: calc(100svh - 20px);
  padding: 12px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(130, 144, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(5, 7, 14, 0.955), rgba(6, 8, 16, 0.94)),
    linear-gradient(135deg, rgba(100, 55, 255, 0.03), rgba(95, 151, 255, 0.016));
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.hub-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 20%, rgba(100, 55, 255, 0.12), transparent 22%),
    radial-gradient(circle at 86% 12%, rgba(95, 151, 255, 0.09), transparent 18%),
    radial-gradient(circle at 52% 100%, rgba(100, 55, 255, 0.05), transparent 28%);
}

.hub-frame > * { position: relative; z-index: 1; }

.surface,
.meta-chip,
.link-card,
.redirect-dialog,
.topbar {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(8, 11, 22, 0.93), rgba(10, 13, 25, 0.95)),
    linear-gradient(135deg, rgba(100, 55, 255, 0.03), rgba(95, 151, 255, 0.015));
  box-shadow: var(--shadow-md);
}

.surface::before,
.meta-chip::before,
.link-card::before,
.redirect-dialog::before,
.topbar::before,
.topbar-cta::before,
.hub-btn::before,
.card-action::before,
.link-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.surface::before,
.meta-chip::before,
.redirect-dialog::before,
.topbar::before {
  background: linear-gradient(118deg, rgba(255,255,255,0.032), transparent 26%, transparent 74%, rgba(255,255,255,0.01));
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #8ea9ff 0%, #6437ff 68%, rgba(100, 55, 255, 0) 100%);
  box-shadow: 0 0 14px rgba(100, 55, 255, 0.45);
}

.brand-copy { display: grid; gap: 3px; line-height: 1; }
.brand-copy strong { font-size: 1rem; letter-spacing: -0.03em; }
.brand-copy small {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(178, 190, 255, 0.13);
  background: rgba(11, 14, 27, 0.9);
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.topbar-cta,
.hub-btn,
.card-action {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.topbar-cta::before,
.hub-btn::before,
.card-action::before {
  inset: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.015) 36%, rgba(255, 255, 255, 0) 100%);
  opacity: 0.9;
}

.topbar-cta::after,
.hub-btn::after,
.card-action::after,
.card-sheen {
  content: "";
  position: absolute;
  inset: -18% -30%;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    112deg,
    rgba(255, 255, 255, 0) 26%,
    rgba(255, 255, 255, 0.05) 39%,
    rgba(255, 255, 255, 0.34) 48%,
    rgba(171, 197, 255, 0.14) 53%,
    rgba(255, 255, 255, 0) 64%
  );
  opacity: 0;
  transform: translate3d(-135%, 0, 0) skewX(-18deg);
  transition: transform 800ms ease, opacity 180ms ease;
}

.topbar-cta {
  color: #fff;
  border: 1px solid rgba(148, 132, 255, 0.34);
  background: linear-gradient(135deg, rgba(110, 67, 255, 0.96), rgba(95, 151, 255, 0.84));
  box-shadow: 0 14px 26px rgba(54, 42, 140, 0.24);
}

.hub-btn-primary {
  color: #fff;
  border: 1px solid rgba(152, 136, 255, 0.36);
  background: linear-gradient(135deg, rgba(104, 60, 255, 0.98), rgba(95, 151, 255, 0.82));
  box-shadow: 0 14px 28px rgba(57, 43, 150, 0.24);
}

.hub-btn-secondary,
.card-action {
  color: var(--text);
  border: 1px solid rgba(178, 190, 255, 0.18);
  background: linear-gradient(180deg, rgba(18, 22, 38, 0.96), rgba(10, 13, 24, 0.94));
}

.topbar-cta:hover,
.topbar-cta:focus-visible,
.hub-btn:hover,
.hub-btn:focus-visible,
.link-card:hover .card-action,
.link-card:focus-visible .card-action {
  transform: translateY(-2px);
  color: #fff;
}

.topbar-cta:hover::after,
.topbar-cta:focus-visible::after,
.hub-btn:hover::after,
.hub-btn:focus-visible::after,
.link-card:hover .card-action::after,
.link-card:focus-visible .card-action::after,
.link-card:hover .card-sheen,
.link-card:focus-visible .card-sheen {
  opacity: 1;
  transform: translate3d(120%, 0, 0) skewX(-18deg);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
  min-height: 0;
}

.hero-panel,
.links-panel {
  padding: 16px;
  min-height: 0;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.section-kicker {
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.links-head h2,
.redirect-copy h3 {
  margin: 0;
  letter-spacing: -0.055em;
}

.hero-copy h1 {
  max-width: 9.6ch;
  font-size: clamp(2.25rem, 3.2vw, 4rem);
  line-height: 0.9;
}

.hero-copy p,
.links-head p,
.card-copy,
.redirect-copy p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.48;
}

.hero-copy p {
  max-width: 32ch;
  font-size: 0.93rem;
  margin-top: 10px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta { margin-top: auto; }
.meta-chip-full { width: 100%; }

.meta-chip {
  min-height: 70px;
  padding: 11px 13px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.meta-chip span {
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.meta-chip strong { font-size: 0.84rem; letter-spacing: -0.03em; }

.links-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.links-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.links-head h2 {
  margin-top: 6px;
  font-size: clamp(1.4rem, 1.8vw, 1.95rem);
}

.links-head p {
  font-size: 0.84rem;
  color: var(--text-dim);
}

.links-grid { align-content: stretch; }
.link-card-wrap { display: flex; }

.link-card {
  position: relative;
  flex: 1 1 auto;
  min-height: 146px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: rgba(204, 214, 255, 0.22);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.card-logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  flex: 0 0 auto;
  border: 1px solid rgba(198, 208, 255, 0.14);
  background: rgba(11, 14, 27, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  object-fit: contain;
  padding: 4px;
}

.card-title { min-width: 0; }
.card-title h3 {
  margin: 0 0 2px;
  font-size: 0.96rem;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.card-title small {
  display: block;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.card-copy {
  font-size: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-action {
  margin-top: auto;
  width: fit-content;
  gap: 8px;
  font-size: 0.88rem;
}

.card-action svg { transition: transform 160ms ease; }
.link-card:hover .card-action svg,
.link-card:focus-visible .card-action svg { transform: translate(2px, -2px); }

.redirect-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 6, 13, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.redirect-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.redirect-dialog {
  width: min(100%, 430px);
  padding: 24px 22px;
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.redirect-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(188, 200, 255, 0.16);
  background: rgba(10, 13, 24, 0.92);
  color: var(--text-soft);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.redirect-close:hover,
.redirect-close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(208, 216, 255, 0.28);
}

.redirect-ring {
  position: relative;
  width: 122px;
  height: 122px;
}

.redirect-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track,
.ring-progress { fill: none; stroke-width: 8; }
.ring-track { stroke: rgba(194, 206, 255, 0.08); }
.ring-progress {
  stroke: url(#ringGradient);
  stroke-linecap: round;
  stroke-dasharray: 301.59;
  stroke-dashoffset: 301.59;
  filter: drop-shadow(0 0 10px rgba(141, 176, 255, 0.3));
}

.redirect-core {
  position: absolute;
  inset: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(188, 200, 255, 0.1);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08), rgba(12,14,24,0.96));
}

#redirectPercent {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.redirect-copy h3 {
  margin-top: 8px;
  font-size: 1.45rem;
}

@media (max-width: 1199.98px) {
  body { overflow-x: hidden; overflow-y: auto; }
  .hub-shell { display: block; }
  .hub-frame {
    width: min(100%, calc(100vw - 20px));
    height: auto;
    min-height: calc(100svh - 20px);
  }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 991.98px) {
  .hero-copy h1 {
    max-width: none;
    font-size: clamp(2.2rem, 9vw, 3.6rem);
  }
  .link-card { min-height: 148px; }
}

@media (max-width: 767.98px) {
  .hub-shell { padding: 8px; }
  .hub-frame {
    width: calc(100vw - 16px);
    min-height: calc(100svh - 16px);
    padding: 10px;
  }
  .topbar { padding: 10px 12px; }
  .topbar-cta { min-height: 40px; padding: 0 14px; }
  .links-head { flex-direction: column; align-items: flex-start; }
  .card-copy, .hero-copy p, .links-head p { font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
