/* cosmya.app — download gate */
@font-face {
  font-family: "Google Sans Flex";
  src: url("../fonts/GoogleSansFlex_24pt-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans Flex";
  src: url("../fonts/GoogleSansFlex_24pt-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans Flex";
  src: url("../fonts/GoogleSansFlex_24pt-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans Flex";
  src: url("../fonts/GoogleSansFlex_24pt-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07070a;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.62);
  --gold: #e6c77d;
  --font: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --horizon: linear-gradient(
    105deg,
    #c08cdc 0%,
    #dc98bc 22%,
    #e8b8a8 40%,
    #e8d0a0 55%,
    #78f8c8 72%,
    #20e0f8 88%,
    #88a0f0 100%
  );
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(192, 140, 220, 0.28); color: var(--text); }

/* ── Scene ─────────────────────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.08);
  filter: saturate(1.12) contrast(1.04);
  animation: drift 48s ease-in-out alternate infinite;
}
@keyframes drift {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(0, -1.4%, 0); }
}
.bg-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 42% 36% at 50% 46%, rgba(8, 8, 12, 0.18), transparent 72%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(7, 7, 10, 0.88), transparent 55%),
    linear-gradient(180deg, rgba(7, 7, 10, 0.42) 0%, rgba(7, 7, 10, 0.22) 38%, rgba(7, 7, 10, 0.55) 100%);
}
.bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.11;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.15rem 1.15rem;
}

/* Bloom behind the card */
.page::before {
  content: "";
  position: absolute;
  width: min(34rem, 90vw);
  height: 28rem;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -52%);
  background:
    radial-gradient(circle at 35% 40%, rgba(192, 140, 220, 0.28), transparent 58%),
    radial-gradient(circle at 70% 60%, rgba(32, 224, 248, 0.18), transparent 55%);
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}

/* ── Glass card ────────────────────────────────────────── */
.gate {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.85rem 1.6rem 1.7rem;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.035) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 0 0 1px rgba(0, 0, 0, 0.18) inset,
    0 28px 80px -24px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(28px) saturate(1.45);
  -webkit-backdrop-filter: blur(28px) saturate(1.45);
  animation: rise 0.7s var(--ease) both;
}
.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 38%);
  pointer-events: none;
  mix-blend-mode: overlay;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ── Orb ───────────────────────────────────────────────── */
.icon-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0.35rem 0 1.75rem;
}
.icon-glow {
  position: absolute;
  inset: -36%;
  background:
    radial-gradient(circle at 38% 32%, rgba(192, 140, 220, 0.7), transparent 52%),
    radial-gradient(circle at 68% 72%, rgba(32, 224, 248, 0.5), transparent 55%);
  filter: blur(16px);
  z-index: 0;
  animation: breathe 4.8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
.orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.orbit--field {
  inset: -22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.orbit--halo {
  inset: -8px;
  background: conic-gradient(
    from 0deg,
    #c08cdc,
    #e8b8a8,
    #e8d0a0,
    #78f8c8,
    #20e0f8,
    #88a0f0,
    #c08cdc
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
}
.app-icon {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

h1 {
  margin: 0;
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.rule {
  display: block;
  width: 52px;
  height: 2px;
  margin: 1rem 0 0.85rem;
  border-radius: 2px;
  background: var(--horizon);
}

.tagline {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

/* ── Store buttons ─────────────────────────────────────── */
.stores {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  margin-top: 1.7rem;
}

.store-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  height: 58px;
  padding: 0 1.1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f2f4 100%);
  color: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px -12px rgba(0, 0, 0, 0.55);
  transition: transform 0.18s var(--ease), box-shadow 0.18s, opacity 0.18s, background 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.store-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 16px 36px -12px rgba(0, 0, 0, 0.6);
}
.store-btn:active { transform: scale(0.985); }
.store-btn svg { flex-shrink: 0; }
.store-btn .store-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.12;
}
.store-btn .store-copy small {
  font-size: 0.58rem;
  font-weight: 500;
  opacity: 0.55;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.store-btn .store-copy strong {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

[data-store="ios"] { order: 1; }
[data-store="android"] { order: 2; }
html[data-platform="android"] [data-store="android"] { order: 0; }

html[data-platform="ios"] [data-store="android"],
html[data-platform="android"] [data-store="ios"] {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
html[data-platform="ios"] [data-store="android"] .store-copy small,
html[data-platform="android"] [data-store="ios"] .store-copy small {
  opacity: 0.7;
}
html[data-platform="ios"] [data-store="android"]:hover,
html[data-platform="android"] [data-store="ios"]:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.legal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.15rem 0.55rem;
  padding: 1.15rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.legal a { transition: color 0.15s; }
.legal a:hover { color: #fff; }

@media (max-height: 720px) {
  .icon-wrap,
  .app-icon { width: 92px; height: 92px; }
  .gate { padding: 2rem 1.35rem 1.4rem; }
  .icon-wrap { margin-bottom: 1.25rem; }
  .orbit--field { inset: -18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .bg img { transform: scale(1.08); }
}
