:root {
  color-scheme: dark;
  --bg: #09090b;
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --curve: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.22, 1, .36, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); -webkit-tap-highlight-color: transparent; }
body {
  min-height: 100vh; min-height: 100svh; margin: 0; overflow-x: hidden;
  background: radial-gradient(ellipse at 50% 42%, #17171c 0%, #0d0d10 43%, #09090b 78%);
  color: var(--text);
}
button, a { font: inherit; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.backdrop-glow {
  position: fixed; z-index: 0; width: 28rem; height: 28rem; border-radius: 42% 58% 62% 38% / 46% 42% 58% 54%;
  pointer-events: none; filter: blur(95px); opacity: .09; transform: translate3d(0,0,0);
  animation: glow-morph 13s ease-in-out infinite alternate;
}
.glow-one { top: -15rem; left: -14rem; background: #6098ff; }
.glow-two { right: -16rem; bottom: -18rem; background: #8b7cff; animation-delay: -6.5s; }
.screen {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}
.hub {
  width: min(100%, 360px); display: flex; flex-direction: column; align-items: center;
  animation: rise-in 720ms var(--spring) both;
}
.logo-slot {
  position: relative; display: grid; place-items: center; width: 92px; height: 92px; margin-bottom: 25px;
  overflow: hidden; border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 18px 45px rgba(0,0,0,.22);
  animation: logo-morph 8s ease-in-out infinite;
  transition: transform 650ms var(--spring), border-radius 650ms var(--spring), border-color 450ms ease;
}
.logo-slot::after {
  content: ""; position: absolute; inset: -60%; pointer-events: none;
  background: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.1) 49%, transparent 60%);
  transform: translateX(-75%) rotate(8deg); animation: logo-sheen 7s ease-in-out infinite;
}
.logo { position: relative; z-index: 1; display: block; width: 100%; height: 100%; padding: 8px; object-fit: contain; border-radius: inherit; }
.logo-placeholder { width: 100%; height: 100%; display: block; }
h1 { margin: 0 0 32px; font-size: 44px; line-height: 1; letter-spacing: -.065em; font-weight: 600; color: #f5f5f7; }
.links { display: grid; width: 100%; gap: 11px; }
.link {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 68px; padding: 11px 15px;
  border: 1px solid rgba(255,255,255,.09); border-radius: 19px;
  color: var(--text); text-decoration: none; text-align: left; cursor: pointer; overflow: hidden;
  background: rgba(255,255,255,.045);
  box-shadow: 0 1px 0 rgba(255,255,255,.045) inset;
  -webkit-backdrop-filter: blur(24px) saturate(145%); backdrop-filter: blur(24px) saturate(145%);
  transition: transform 480ms var(--spring), border-color 380ms ease, background-color 380ms ease, box-shadow 480ms var(--spring);
  animation: link-in 620ms var(--spring) both;
}
.link:nth-child(1) { animation-delay: 100ms; }
.link:nth-child(2) { animation-delay: 170ms; }
.link:nth-child(3) { animation-delay: 240ms; }
.link::before {
  content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; opacity: 0;
  background: linear-gradient(115deg, rgba(255,255,255,.08), transparent 55%);
  transition: opacity 350ms ease;
}
.icon {
  display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 14px;
  color: white; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 12px rgba(0,0,0,.16);
  transition: transform 500ms var(--spring), border-radius 500ms var(--spring);
}
.icon svg { width: 21px; height: 21px; }
.icon-telegram { background: #229ed9; }
.icon-discord { background: #5865f2; }
.label { flex: 1; min-width: 0; font-size: 14px; line-height: 1.25; font-weight: 550; letter-spacing: -.02em; }
.arrow { width: 18px; height: 18px; color: #8e8e93; transition: transform 500ms var(--spring), color 300ms ease; }
.link:focus-visible { outline: 2px solid #9fcaff; outline-offset: 4px; }
.link:active { transform: scale(.965); transition-duration: 120ms; }
.link:active .icon { transform: scale(.9); border-radius: 12px; }
.toast {
  position: fixed; z-index: 5; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); width: max-content;
  max-width: calc(100vw - 32px); padding: 11px 15px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(35,35,39,.9); color: #f5f5f7;
  font-size: 12px; line-height: 1.4; text-align: center; box-shadow: 0 12px 30px rgba(0,0,0,.25);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  opacity: 0; pointer-events: none; transform: translate(-50%, 10px) scale(.97);
  transition: opacity 260ms ease, transform 420ms var(--spring);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (hover: hover) and (pointer: fine) {
  .hub:hover .logo-slot { transform: translateY(-2px) rotate(-2deg); border-radius: 26px 32px 28px 34px; border-color: rgba(255,255,255,.2); }
  .link:hover { transform: translateY(-2px) scale(1.008); border-color: rgba(255,255,255,.17); background-color: rgba(255,255,255,.075); box-shadow: 0 9px 28px rgba(0,0,0,.16), 0 1px 0 rgba(255,255,255,.08) inset; }
  .link:hover::before { opacity: 1; }
  .link:hover .icon { transform: scale(1.045); border-radius: 16px; }
  .link:hover .arrow { transform: translateX(2px); color: #e5e5ea; }
}
@keyframes rise-in { from { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(7px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes link-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes logo-morph {
  0%, 100% { border-radius: 30px; transform: rotate(0deg); }
  35% { border-radius: 34px 26px 32px 28px; transform: rotate(1.5deg); }
  70% { border-radius: 26px 34px 28px 32px; transform: rotate(-1deg); }
}
@keyframes logo-sheen {
  0%, 18% { transform: translateX(-75%) rotate(8deg); opacity: 0; }
  28% { opacity: 1; }
  48%, 100% { transform: translateX(75%) rotate(8deg); opacity: 0; }
}
@keyframes glow-morph {
  0% { border-radius: 42% 58% 62% 38% / 46% 42% 58% 54%; transform: translate3d(0,0,0) scale(1); }
  50% { border-radius: 63% 37% 41% 59% / 56% 62% 38% 44%; transform: translate3d(20px,18px,0) scale(1.08); }
  100% { border-radius: 35% 65% 54% 46% / 38% 48% 52% 62%; transform: translate3d(-12px,8px,0) scale(.96); }
}
@media (max-width: 420px) {
  .screen { padding-left: 22px; padding-right: 22px; }
  .hub { width: 100%; max-width: 350px; }
  .logo-slot { width: 82px; height: 82px; margin-bottom: 23px; border-radius: 27px; }
  h1 { font-size: 42px; margin-bottom: 29px; }
  .link { min-height: 66px; border-radius: 18px; padding: 10px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .link { background: #18181b; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .toast { background: #242428; -webkit-backdrop-filter: none; backdrop-filter: none; }
}


/* Mizu motion refinement: logo floats free, with a liquid morphing aura. */
.logo-slot {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  animation: logo-float 6.5s ease-in-out infinite;
  isolation: isolate;
}
.logo-slot::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12%;
  border-radius: 38% 62% 58% 42% / 42% 40% 60% 58%;
  background: linear-gradient(140deg, rgba(130, 68, 255, .25), rgba(38, 124, 255, .22));
  filter: blur(24px);
  opacity: .62;
  transform: scale(.92);
  animation: aura-morph 8s ease-in-out infinite alternate;
}
.logo-slot::after { display: none; }
.logo {
  padding: 0;
  overflow: visible;
  filter: drop-shadow(0 8px 24px rgba(70, 95, 255, .13));
  animation: droplet-morph 8s ease-in-out infinite;
  will-change: transform, filter;
}
h1 {
  animation: text-focus-in 1100ms var(--spring) both;
  animation-delay: 120ms;
}
.links .link {
  animation: text-focus-in 900ms var(--spring) both;
}
.links .link:nth-child(1) { animation-delay: 260ms; }
.links .link:nth-child(2) { animation-delay: 360ms; }
.links .link:nth-child(3) { animation-delay: 460ms; }
@keyframes text-focus-in {
  0% { opacity: 0; filter: blur(12px); transform: translateY(8px) scale(.985); }
  65% { opacity: 1; filter: blur(1px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}
@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes droplet-morph {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-2deg) scale(1.025, .985); }
  50% { transform: rotate(1.5deg) scale(.985, 1.025); }
  75% { transform: rotate(-.8deg) scale(1.015, .99); }
}
@keyframes aura-morph {
  0% { border-radius: 38% 62% 58% 42% / 42% 40% 60% 58%; transform: rotate(0deg) scale(.92); }
  35% { border-radius: 58% 42% 40% 60% / 56% 36% 64% 44%; transform: rotate(16deg) scale(1.08); }
  70% { border-radius: 44% 56% 62% 38% / 38% 60% 40% 62%; transform: rotate(-12deg) scale(.98); }
  100% { border-radius: 64% 36% 45% 55% / 58% 44% 56% 42%; transform: rotate(8deg) scale(1.04); }
}
@media (hover: hover) and (pointer: fine) {
  .hub:hover .logo { transform: scale(1.055) rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .logo-slot, .logo-slot::before, .logo, h1, .links .link { animation: none !important; }
}

/* Give the transparent droplet mark more visual presence without a tile. */
.logo-slot { width: 124px; height: 124px; margin-bottom: 18px; }
@media (max-width: 420px) { .logo-slot { width: 112px; height: 112px; margin-bottom: 18px; } }


/* Final motion pass: restrained, spring-based, and text-first. */
.hub {
  transform-origin: 50% 55%;
  animation: hub-enter 980ms cubic-bezier(.16, 1, .3, 1) both;
}
.logo-slot {
  animation: logo-float 7.2s cubic-bezier(.45, 0, .55, 1) infinite;
}
.logo {
  animation: droplet-breathe 7.8s cubic-bezier(.45, 0, .55, 1) infinite;
  transform-origin: 50% 54%;
  will-change: transform;
}
h1 {
  animation: focus-settle 1050ms cubic-bezier(.16, 1, .3, 1) 100ms both;
  will-change: filter, opacity, transform;
}
.links .link {
  animation: button-arrive 820ms cubic-bezier(.16, 1, .3, 1) both;
  will-change: transform, opacity;
}
.links .link:nth-child(1) { animation-delay: 220ms; }
.links .link:nth-child(2) { animation-delay: 310ms; }
.links .link:nth-child(3) { animation-delay: 400ms; }
.label {
  animation: focus-settle 950ms cubic-bezier(.16, 1, .3, 1) both;
}
.links .link:nth-child(1) .label { animation-delay: 270ms; }
.links .link:nth-child(2) .label { animation-delay: 360ms; }
.links .link:nth-child(3) .label { animation-delay: 450ms; }

.link {
  border-radius: 19px;
  transition:
    transform 520ms cubic-bezier(.2, .9, .25, 1),
    border-radius 650ms cubic-bezier(.2, .9, .25, 1),
    border-color 380ms ease,
    background-color 380ms ease,
    box-shadow 520ms cubic-bezier(.2, .9, .25, 1);
}
.link::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(130px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(255,255,255,.10), transparent 70%);
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
}
.icon {
  transition: transform 520ms cubic-bezier(.2, .9, .25, 1), border-radius 520ms cubic-bezier(.2, .9, .25, 1);
}
.arrow {
  transition: transform 520ms cubic-bezier(.2, .9, .25, 1), color 300ms ease, opacity 300ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .link:hover {
    transform: translateY(-2px) scale(1.012);
    border-radius: 23px;
  }
  .link:hover::after { opacity: 1; }
  .link:hover .icon { transform: scale(1.06) rotate(-2deg); border-radius: 16px; }
  .link:hover .arrow { transform: translateX(3px); }
  .hub:hover .logo-slot::before { opacity: .9; }
}
.link:active {
  transform: scale(.965);
  border-radius: 16px;
  transition-duration: 120ms;
}
.link:active .icon { transform: scale(.9); border-radius: 12px; }

@keyframes hub-enter {
  0% { opacity: 0; transform: translateY(12px) scale(.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes button-arrive {
  0% { opacity: 0; transform: translateY(11px) scale(.985); }
  70% { opacity: 1; transform: translateY(-1px) scale(1.003); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes focus-settle {
  0% { opacity: 0; filter: blur(14px); transform: translateY(7px); }
  55% { opacity: 1; filter: blur(2px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@keyframes droplet-breathe {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1, 1); }
  24% { transform: translateY(-1px) rotate(-1deg) scale(1.018, .99); }
  50% { transform: translateY(-2px) rotate(1deg) scale(.99, 1.018); }
  76% { transform: translateY(0) rotate(-.5deg) scale(1.008, .996); }
}
@media (prefers-reduced-motion: reduce) {
  .hub, .logo-slot, .logo-slot::before, .logo, h1, .links .link, .label {
    animation: none !important;
    filter: none !important;
    transform: none !important;
  }
  .link, .icon, .arrow { transition: none !important; }
}


/* Logo alignment correction: preserve the supplied mark, no logo motion. */
.logo-slot {
  width: 112px !important;
  height: 154px !important;
  margin: 0 auto 18px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  transform: none !important;
}
.logo-slot::before,
.logo-slot::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}
.logo {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 0 !important;
  filter: none !important;
  animation: none !important;
  transform: none !important;
  will-change: auto !important;
}
@media (max-width: 420px) {
  .logo-slot {
    width: 104px !important;
    height: 144px !important;
    margin-bottom: 17px !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  /* Motion stays on text and controls; the brand mark remains stationary. */
  .logo, .logo-slot, .logo-slot::before { animation: none !important; transform: none !important; }
}
