@font-face {
  font-family: Geologica;
  src: url('./Geologica-launch.ttf') format('truetype');
  font-weight: 390 650;
  font-display: swap;
}

:root {
  --page-background: #050505;
  color-scheme: dark;
  color: #f4f3f2;
  background: var(--page-background);
  font: 450 100%/1.4 Geologica, system-ui, sans-serif;
  font-synthesis: none;
  --appear: cubic-bezier(.16,1,.3,1);
  --settle: cubic-bezier(.23,.78,.24,1);
  --muted: #a5a4aa;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden], .opening-app body { display: none !important; }
body, h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid #9caac3; outline-offset: 4px; border-radius: 6px; }

body {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto auto 1fr;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(clamp(26px, 6svh, 62px), env(safe-area-inset-top)) clamp(20px, 5vw, 80px)
    max(24px, env(safe-area-inset-bottom));
}

.cover-orbits {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  overflow: clip;
  pointer-events: none;
  contain: strict;
  animation: orbits-in 1600ms var(--appear) both;
  mask-image:
    linear-gradient(90deg, #0008, #000 8%, #000 90%, #0006),
    linear-gradient(transparent 17%, #000 33%, #000 92%, #0009 100%);
  mask-composite: intersect;
}

.orbit-space, .cover-arc { position: absolute; inset: 0; }

.orbit-record {
  --cover-opacity: .8;
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--cover-size);
  height: var(--cover-size);
  margin: calc(var(--cover-size) / -2) 0 0 calc(var(--cover-size) / -2);
  object-fit: cover;
  border-radius: 7%;
  filter: grayscale(1) brightness(.31) blur(2.5px);
  opacity: var(--cover-opacity);
  transition: opacity 220ms var(--appear);
}

.cover-arc:first-child .orbit-record { --cover-opacity: .54; }
.cover-arc:nth-child(2) .orbit-record { --cover-opacity: .68; }
.orbit-record[data-loading] { opacity: 0; }

.orbit-color {
  --spotlight-radius: clamp(135px, 12vw, 220px);
  opacity: 0;
  transition: opacity 360ms cubic-bezier(.22, 1, .36, 1);
  mask-image: radial-gradient(
    circle var(--spotlight-radius) at var(--pointer-x, -200px) var(--pointer-y, -200px),
    #000 8%, #000c 35%, #0004 70%, transparent 100%
  );
}

.orbit-color.is-visible { opacity: 1; }
.orbit-color .orbit-record { filter: saturate(1) brightness(.46) blur(2.5px); }

@keyframes orbits-in { from { opacity: 0; } to { opacity: 1; } }

.topbar {
  grid-row: 2;
  display: grid;
  justify-items: center;
}

.brand { display: inline-grid; align-content: center; min-height: 44px; }
.brand img { display: block; width: clamp(78px, 7vw, 105px); height: auto; animation: rise 750ms var(--appear) both; }
.brand:focus-visible img { animation: none; }

.launch {
  grid-row: 3;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: clamp(20px, 4.8svh, 48px);
  width: min(100%, 1100px);
  padding-block: clamp(18px, 3svh, 37px) 4px;
}

.headline {
  position: relative;
  isolation: isolate;
  text-align: center;
  font-size: clamp(2rem, 7.65vw, 6.75rem);
  font-weight: 570;
  line-height: 1;
  letter-spacing: -.059em;
  white-space: nowrap;
}

.headline-words {
  display: flex;
  justify-content: center;
  gap: .14em;
}

.headline-words > span {
  display: block;
  padding: .06em .036em .13em;
}

.headline > .headline-words:not(.headline-soft-text) > span {
  animation: reveal-line 870ms var(--appear) 108ms backwards;
}
.headline > .headline-words:not(.headline-soft-text) > span:nth-child(2) { animation-delay: 192ms; }

@property --focus-a { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --focus-b { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --focus-c { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --focus-d { syntax: '<number>'; inherits: true; initial-value: 0; }

.headline-soft-text {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  filter: blur(.052em);
  mix-blend-mode: plus-lighter;
}

@media (prefers-reduced-motion: no-preference) {
  .headline.has-soft-text { animation: headline-focus 10.4s cubic-bezier(.4, 0, .6, 1) 1s infinite; }
  .headline.has-soft-text.is-paused { animation-play-state: paused; }
  .headline.has-soft-text > .headline-words:not(.headline-soft-text) {
    mask-image: linear-gradient(#000 0 0), var(--focus-zones);
    mask-composite: subtract, add, add, add;
  }
  .headline.has-soft-text > .headline-soft-text {
    display: flex;
    mask-image: var(--focus-zones);
  }
}

@keyframes headline-focus {
  0%, 100% { --focus-a: 1; --focus-b: 0; --focus-c: 0; --focus-d: 0; }
  25% { --focus-a: 0; --focus-b: 1; --focus-c: 0; --focus-d: 0; }
  50% { --focus-a: 0; --focus-b: 0; --focus-c: 1; --focus-d: 0; }
  75% { --focus-a: 0; --focus-b: 0; --focus-c: 0; --focus-d: 1; }
}

.release {
  --digit-size: clamp(2.5rem, 11.75vw, 10rem);
  --clock-gap: clamp(15px, 3.1vw, 44px);
  width: min(100%, 954px);
  text-align: center;
}

.release h2 { font-size: clamp(1.15rem, 2vw, 1.65rem); font-weight: 570; }

.clock {
  display: flex;
  justify-content: center;
  gap: var(--clock-gap);
}

.clock-unit {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(6px, .85vw, 11px);
  animation: arrive-clock 875ms var(--appear) calc(290ms + var(--unit-index, 0) * 66ms) backwards;
}
.clock-unit:nth-child(2) { --unit-index: 1; }
.clock-unit:nth-child(3) { --unit-index: 2; }
.clock-unit:nth-child(4) { --unit-index: 3; }
.clock-unit + .clock-unit::before,
.clock-unit + .clock-unit::after {
  position: absolute;
  top: .365em;
  left: calc(var(--clock-gap) / -2);
  width: clamp(3px, .046em, 7px);
  height: clamp(3px, .046em, 7px);
  border-radius: 50%;
  background: #606066;
  font-size: var(--digit-size);
  transform: translateX(-50%);
  content: '';
}
.clock-unit + .clock-unit::after { top: .535em; }
.clock-unit dt { grid-row: 2; color: #aaa9af; font-size: clamp(.69rem, 1.1vw, .9rem); }
.clock-unit dd { grid-row: 1; }

.digits {
  display: flex;
  font-size: var(--digit-size);
  font-weight: 475;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.053em;
  line-height: 1;
}
.digits > span { position: relative; display: block; width: .68em; overflow: clip; overflow-clip-margin: .11em; text-align: center; }
.digits > span + span { margin-inline-start: -.024em; }
.digits--days > span { width: auto; min-width: .68em; }
.digits > span > span { display: block; }
.digits .digit-outgoing {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.download-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; margin-top: 16px; }
.download {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 11px;
  background: #29292b;
  font-weight: 620;
  transition: background-color 220ms var(--settle), transform 260ms var(--settle);
}
.download span:first-child { overflow-wrap: anywhere; }
.download span:last-child { color: #c2c1c5; font-size: .875rem; }

.glass-filter { position: absolute; pointer-events: none; }

.waitlist { width: min(100%, 440px); margin: clamp(20px, 3.3svh, 34px) auto 0; }
.waitlist-row {
  --wait-button-width: clamp(90px, calc((100vw - 32px) / 3), 147px);
  --wait-gap: 10px;
  display: flex;
  align-items: center;
  gap: var(--wait-gap);
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  /* Before joining, center the button itself. Afterwards, center the whole pair. */
  transform: translateX(calc((var(--wait-button-width) - 100%) / 2));
}
.waitlist-track { flex: 0 0 var(--wait-button-width); }
.waitlist-count {
  min-width: 0;
  max-width: calc(var(--wait-button-width) - var(--wait-gap));
  overflow-wrap: anywhere;
  text-align: end;
  font-size: clamp(.75rem, 2.8vw, .9rem);
  font-variant-numeric: tabular-nums;
}
.waitlist-count strong { color: #fff; font-weight: 650; }
.waitlist-error { margin-top: 8px; font-size: .78rem; color: #dedde0; }
.waitlist-error:empty { display: none; }

.waitlist-button {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(46px, 5.6svh, 55px);
  padding: 8px;
  border: 0;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 38% 34%, rgb(255 255 255 / .17), transparent 82%),
    rgb(242 242 245 / .72);
  -webkit-backdrop-filter: blur(4px) brightness(1.35);
  backdrop-filter: blur(4px) brightness(1.35);
  color: #111116;
  font: 650 .9rem/1.2 Geologica, system-ui, sans-serif;
  cursor: pointer;
  transition: background-color 180ms var(--settle);
}

@supports (backdrop-filter: url("#telegram-glass")) {
  .waitlist-button { backdrop-filter: url("#telegram-glass") brightness(1.35); }
}

.waitlist-button:focus-visible { outline: 2px solid #9caac3; outline-offset: 4px; }
.waitlist-button:disabled { cursor: default; }
.waitlist-button:active:enabled { background-color: rgb(255 255 255 / .91); }
.waitlist.is-joined .waitlist-row { transform: none; }
.waitlist.is-joining .waitlist-row { transition: transform 700ms cubic-bezier(.23,.91,.2,1); }
.waitlist.is-joining:not(.is-joined) .waitlist-label { opacity: .64; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes reveal-line {
  from { opacity: 0; transform: translateY(.34em) scaleY(1.12); filter: blur(.1em); }
  62% { opacity: 1; transform: translateY(-.012em) scaleY(.993); filter: blur(0); animation-timing-function: var(--settle); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes arrive-clock {
  from { opacity: 0; transform: translateY(16px); filter: blur(9px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@media (hover: hover) and (pointer: fine) {
  .download:hover { background: #353537; }
  .waitlist-button:hover:enabled { background-color: rgb(255 255 255 / .84); }
}
.download:active { transform: scale(.96); }

@media (min-width: 621px) and (max-height: 820px) {
  .launch { padding-block: 16px 34px; }
  .headline { font-size: clamp(3rem, min(7.65vw, 14svh), 6.75rem); }
  .release { --digit-size: clamp(2.5rem, min(11.75vw, 21svh), 10rem); }
}

@media (max-width: 620px) {
  body { padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); }
  .launch { gap: clamp(19px, 4.6svh, 36px); padding-block: 18px clamp(35px, 12svh, 94px); }
  .headline { font-size: clamp(1.7rem, 9.9vw, 3.8rem); }
  .release { --digit-size: clamp(2.45rem, 13vw, 5.1rem); --clock-gap: clamp(11px, 3.4vw, 21px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .download:active { transform: none; }
}
