/* ==========================================================================
   Pearlospace — Coming Soon
   ========================================================================== */

@property --ang {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg: #05040d;
  --ink: #eeebf8;
  --muted: #9b98b8;
  --line: rgba(255, 255, 255, .12);
  --glass: rgba(255, 255, 255, .035);
  --lilac: #cfc4ff;
  --ice: #a9e6ff;
  --blush: #ffd0ea;
  --ok: #a7f3d0;
  --err: #fca5a5;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 88px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(ellipse 80% 70% at 72% 45%, #140e30 0%, rgba(5, 4, 13, 0) 65%),
    var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body:not(.is-ready) { overflow: hidden; }

a { color: inherit; text-decoration: none; }

.sr-only,
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Background layers ---------- */

#space,
#ringsFront {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#space { z-index: 0; }
#ringsFront { z-index: 3; }

.nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0;
  transition: opacity 3s ease .4s;
}
.is-ready .nebula { opacity: .65; }

.nebula span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.n1 {
  width: 60vmax; height: 60vmax;
  left: -18vmax; top: -24vmax;
  background: radial-gradient(circle, #4a2a8c 0%, transparent 62%);
  animation: drift1 30s ease-in-out infinite alternate;
}
.n2 {
  width: 55vmax; height: 55vmax;
  right: -20vmax; bottom: -26vmax;
  background: radial-gradient(circle, #1a5a8e 0%, transparent 62%);
  animation: drift2 36s ease-in-out infinite alternate;
}
.n3 {
  width: 34vmax; height: 34vmax;
  right: 12vmax; top: 6vmax;
  background: radial-gradient(circle, #7a2a68 0%, transparent 62%);
  opacity: .7;
  animation: drift3 24s ease-in-out infinite alternate;
}

@keyframes drift1 { to { transform: translate(10vmax, 8vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vmax, -6vmax) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-8vmax, 10vmax) scale(.85); } }

.cursor-glow {
  position: fixed;
  left: 0; top: 0;
  z-index: 1;
  width: 520px; height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 170, 255, .11) 0%, rgba(140, 180, 255, .04) 35%, transparent 65%);
  pointer-events: none;
  will-change: transform;
}
@media (hover: none) { .cursor-glow { display: none; } }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 20;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -4%); }
  60%  { transform: translate(-4%, -2%); }
  80%  { transform: translate(3%, 4%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 1s var(--ease), visibility 1s;
}
.is-ready .loader { opacity: 0; visibility: hidden; }

.loader-pearl {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #d8d0ee 50%, #6b6799);
  box-shadow: 0 0 24px rgba(205, 190, 255, .9), 0 0 60px rgba(150, 170, 255, .5);
  animation: pulse 1.2s ease-in-out infinite;
}
.is-ready .loader-pearl { animation: none; transform: scale(14); opacity: 0; transition: transform 1s var(--ease), opacity .8s ease; }

.loader-bar {
  position: absolute;
  left: 50%; top: calc(50% + 34px);
  width: 120px; height: 1px;
  translate: -50% 0;
  background: var(--line);
  overflow: hidden;
}
.loader-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--lilac), var(--ice));
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}

.loader-count {
  position: absolute;
  bottom: 36px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .35em;
  color: var(--muted);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .85; }
  50%      { transform: scale(1.35); opacity: 1; }
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(8px);
  transition:
    opacity 1.1s var(--ease) var(--d, 0s),
    transform 1.1s var(--ease) var(--d, 0s),
    filter 1.1s var(--ease) var(--d, 0s);
}
.is-ready .reveal { opacity: 1; transform: none; filter: none; }

/* ---------- Top bar ---------- */

.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #e3dcf3 35%, #9c97c4 70%, #2a2750);
  box-shadow: 0 0 14px rgba(205, 190, 255, .55);
}
.brand-name {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .32em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.status-dot {
  position: relative;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 10px var(--ice);
}
.status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--ice);
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping {
  from { transform: scale(1); opacity: .9; }
  to   { transform: scale(3.2); opacity: 0; }
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding: 120px var(--gutter) 96px;
}

.content {
  position: relative;
  z-index: 4;
  max-width: 660px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: '';
  width: 40px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--lilac));
}

.title {
  position: relative;
  margin: 20px 0 24px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 5.3vw, 86px);
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
  font-kerning: none;
  font-variant-ligatures: none;
  perspective: 600px;
}

.title .char {
  display: inline-block;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 15%, #d9d1f5 60%, #a99fd8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
  transform: translateY(.55em) rotateX(-80deg);
  transform-origin: 50% 100%;
  filter: blur(14px);
}
.is-ready .title .char {
  animation: charIn 1.2s var(--ease) forwards;
  animation-delay: calc(var(--i) * 55ms + .35s);
}
@keyframes charIn {
  to { opacity: 1; transform: none; filter: blur(0); }
}

.title-shine {
  position: absolute;
  left: 0; top: 0;
  color: transparent;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .95) 47%, #d2c6ff 50%, #bfeaff 53%, transparent 62%);
  background-size: 260% 100%;
  background-position: 150% 0;
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
}
.is-ready .title-shine { animation: shine 6s ease-in-out 2.2s infinite; }
@keyframes shine {
  0%       { background-position: 150% 0; }
  45%, 100% { background-position: -50% 0; }
}

.lead {
  max-width: 470px;
  font-size: clamp(15px, 1.15vw, 17px);
  font-weight: 300;
  color: #c3c0da;
}

/* ---------- Countdown ---------- */

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 470px;
  margin: 36px 0 28px;
}

.unit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}
.unit::before {
  content: '';
  position: absolute;
  left: 18%; right: 18%; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
}

.num {
  display: block;
  font-family: var(--display);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 300;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.num.tick { animation: tick .6s var(--ease); }
@keyframes tick {
  from { transform: translateY(-45%); opacity: 0; filter: blur(6px); }
  to   { transform: none; opacity: 1; filter: blur(0); }
}

.label {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Notify form ---------- */

.notify {
  position: relative;
  display: flex;
  gap: 6px;
  max-width: 470px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.notify::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--ang), transparent 0 58%, var(--lilac) 72%, var(--ice) 82%, var(--blush) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: orbit 5s linear infinite;
  pointer-events: none;
}
.notify:focus-within::before { animation-duration: 2s; }
@keyframes orbit { to { --ang: 360deg; } }

.notify input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 13px 20px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}
.notify input::placeholder { color: #7f7c9c; }

.notify button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff 0%, #e6dfff 45%, #c6ecff 100%);
  color: #140e2e;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 0 0 rgba(200, 185, 255, 0);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), opacity .3s;
}
.notify button svg { transition: transform .3s var(--ease); }
.notify button:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(200, 185, 255, .35); }
.notify button:hover svg { transform: translateX(3px); }
.notify button:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.notify button:disabled { opacity: .7; cursor: progress; }
.notify.is-loading button svg { animation: nudge .7s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }

.form-msg {
  min-height: 22px;
  margin-top: 12px;
  padding-left: 22px;
  font-size: 13px;
  color: var(--muted);
}
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--err); }

/* ---------- Socials ---------- */

.socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  list-style: none;
}
.socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #c3c0da;
  transition: color .3s, border-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.socials a:hover,
.socials a:focus-visible {
  color: #fff;
  border-color: rgba(207, 196, 255, .5);
  box-shadow: 0 0 22px rgba(207, 196, 255, .25);
  transform: translateY(-2px);
  outline: none;
}
.socials svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Pearl ---------- */

.stage {
  position: relative;
  height: min(72vh, 660px);
  display: grid;
  place-items: center;
}

.pearl-wrap {
  position: relative;
  z-index: 2;
  width: clamp(170px, 28vmin, 330px);
  aspect-ratio: 1;
  will-change: transform;
}
.pearl-wrap::before {
  content: '';
  position: absolute;
  inset: -60%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(175, 155, 255, .28) 0%, rgba(120, 160, 255, .1) 35%, transparent 62%);
  opacity: 0;
  animation: breathe 7s ease-in-out infinite;
  transition: opacity 2s ease 1s;
}
.is-ready .pearl-wrap::before { opacity: 1; }
@keyframes breathe { 50% { transform: scale(1.12); } }

.pearl {
  --sx: 0%;
  --sy: 0%;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 34% 30%, #ffffff 0%, #f8f5ff 7%, #e4ddf3 20%, #c4bce0 40%, #8f89bb 62%, #4f4b80 82%, #201d45 100%);
  box-shadow:
    inset -22px -30px 60px rgba(18, 10, 52, .7),
    inset 10px 14px 30px rgba(255, 255, 255, .5),
    0 0 50px rgba(205, 190, 255, .35),
    0 0 140px rgba(120, 150, 255, .22);
  opacity: 0;
  transform: scale(.2);
  filter: blur(10px) brightness(2);
}
.is-ready .pearl { animation: pearlIn 1.8s var(--ease) .15s forwards; }
@keyframes pearlIn {
  to { opacity: 1; transform: scale(1); filter: blur(0) brightness(1); }
}

.iris {
  position: absolute;
  inset: -25%;
  background: conic-gradient(from 0deg, #ffc9e2, #c9ecff, #d4ffe6, #fff0bf, #e6ccff, #ffc9e2);
  mix-blend-mode: soft-light;
  filter: blur(16px);
  opacity: .95;
  animation: spin 14s linear infinite;
}
.iris-2 {
  inset: -10%;
  background: conic-gradient(from 90deg, transparent, #b9e4ff 20%, transparent 40%, #ffc6e6 60%, transparent 80%);
  mix-blend-mode: overlay;
  opacity: .45;
  animation-duration: 22s;
  animation-direction: reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 74% 82%, rgba(185, 225, 255, .55) 0%, transparent 38%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(255, 255, 255, .18) 70%, transparent 72%);
  mix-blend-mode: screen;
}

.spec {
  position: absolute;
  left: calc(22% + var(--sx));
  top: calc(16% + var(--sy));
  width: 28%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .4) 40%, transparent 72%);
  filter: blur(2px);
  transform: rotate(-32deg);
}

/* ---------- Footer ---------- */

.footer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--gutter);
  font-size: 12px;
  letter-spacing: .08em;
  color: #6f6c8c;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 96px;
    text-align: center;
  }
  .stage {
    order: -1;
    height: clamp(260px, 44vh, 420px);
  }
  .content { margin: 0 auto; }
  .eyebrow { justify-content: center; }
  .eyebrow::after {
    content: '';
    width: 40px; height: 1px;
    background: linear-gradient(90deg, var(--lilac), transparent);
  }
  .title { font-size: clamp(28px, 8.4vw, 72px); }
  .lead,
  .countdown,
  .notify { margin-left: auto; margin-right: auto; }
  .form-msg { padding-left: 0; }
  .socials { justify-content: center; }
  .footer { position: static; justify-content: center; flex-wrap: wrap; padding-top: 0; }
}

@media (max-width: 480px) {
  .topbar { padding-top: 20px; padding-bottom: 20px; }
  .brand-name { display: none; }
  .countdown { gap: 8px; }
  .unit { padding: 12px 4px 10px; border-radius: 12px; }
  .label { font-size: 9px; letter-spacing: .16em; }
  .notify { flex-direction: column; border-radius: 22px; }
  .notify input[type="email"] { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .is-ready .title .char { animation-delay: 0s; }
}
