/* ==========================================================================
   Maintenance / Coming Soon page
   Change the colours below to match your brand.
   ========================================================================== */

:root {
  --bg: #07080d;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef0f6;
  --muted: #8d93a6;
  --accent: #7c6cff;      /* primary brand colour */
  --accent-2: #22d3ee;    /* secondary glow colour */
  --accent-3: #f472b6;    /* tertiary glow colour */
  --success: #34d399;
  --danger: #f87171;
  --warn: #fbbf24;

  --radius: 14px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  will-change: transform;
}
.blob--1 {
  width: 520px; height: 520px;
  background: var(--accent);
  top: -160px; left: -120px;
  animation: float1 22s ease-in-out infinite;
}
.blob--2 {
  width: 440px; height: 440px;
  background: var(--accent-2);
  bottom: -180px; right: -100px;
  opacity: 0.3;
  animation: float2 26s ease-in-out infinite;
}
.blob--3 {
  width: 320px; height: 320px;
  background: var(--accent-3);
  top: 40%; left: 55%;
  opacity: 0.18;
  animation: float3 30s ease-in-out infinite;
}

@keyframes float1 { 50% { transform: translate(140px, 110px) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(-160px, -90px) scale(1.15); } }
@keyframes float3 { 50% { transform: translate(-200px, 60px) scale(0.9); } }

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%);
  opacity: 0.5;
}

.grain {
  position: absolute;
  inset: -50%;
  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='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.06;
}

/* ---------- Layout ---------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 6px 20px -6px var(--accent);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}
.status__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.6);
  animation: pulse 2s infinite;
}
.status.is-live .status__dot { background: var(--success); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }

@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

/* ---------- Hero ---------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 0 40px;
}

.gear {
  position: relative;
  width: 72px; height: 60px;
  margin-bottom: 28px;
}
.gear svg { position: absolute; fill: var(--accent); filter: drop-shadow(0 0 12px rgba(124, 108, 255, 0.55)); }
.gear__big { width: 48px; height: 48px; left: 0; top: 0; animation: spin 10s linear infinite; }
.gear__small { width: 30px; height: 30px; right: 0; bottom: 0; fill: var(--accent-2); filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.5)); animation: spin 6.5s linear infinite reverse; }

@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.title em {
  font-style: italic;
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

.lead {
  max-width: 540px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  margin-top: 44px;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 88px;
  padding: 16px 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}
.unit__num {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.unit__num.tick { animation: tick 0.35s ease; }
@keyframes tick {
  0% { transform: translateY(-4px); opacity: 0.4; }
  100% { transform: none; opacity: 1; }
}
.unit__label {
  margin-top: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sep {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--muted);
  opacity: 0.5;
  padding-top: 18px;
}

.back-msg {
  margin: 36px 0 0;
  padding: 14px 20px;
  color: var(--success);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius);
}

/* ---------- Progress ---------- */
.progress {
  width: 100%;
  max-width: 440px;
  margin-top: 36px;
}
.progress__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.progress__pct { font-family: var(--font-mono); color: var(--text); }
.progress__track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}
.progress__fill {
  position: relative;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.progress__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- Notify form ---------- */
.notify {
  width: 100%;
  max-width: 460px;
  margin-top: 36px;
}
.notify__field {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.notify__field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 108, 255, 0.18);
}
.notify.has-error .notify__field { border-color: var(--danger); }

.notify__icon { margin-left: 14px; color: var(--muted); flex-shrink: 0; }

.notify input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
}
.notify input::placeholder { color: #5d6275; }

.btn {
  position: relative;
  flex-shrink: 0;
  padding: 11px 22px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #5b4bff);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 8px 24px -10px var(--accent);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -10px var(--accent); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn[disabled] { opacity: 0.7; cursor: progress; }

.btn__spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
}
.btn.is-loading .btn__text { opacity: 0; }
.btn.is-loading .btn__spinner { opacity: 1; animation: spin 0.7s linear infinite; }

.notify__msg {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.notify__msg.is-error { color: var(--danger); }
.notify__msg.is-success { color: var(--success); }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}
.social { display: flex; gap: 10px; }
.social a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.social a:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.social a[hidden] { display: none; }

.footer__text, .footer__copy { margin: 0; }
.footer__text a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.footer__copy { font-size: 0.78rem; opacity: 0.7; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  padding: 12px 18px;
  font-size: 0.88rem;
  color: var(--text);
  background: #151824;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Entrance animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .page { padding: 20px 16px; }
  .brand__name { display: none; }
  .hero { padding: 40px 0 28px; }
  .countdown { gap: 6px; width: 100%; }
  .unit { min-width: 0; flex: 1; padding: 12px 4px 10px; }
  .sep { display: none; }
  .unit__label { font-size: 0.62rem; }
  .notify__field { flex-wrap: wrap; border-radius: 18px; }
  .notify input { flex-basis: calc(100% - 40px); }
  .btn { width: 100%; margin-top: 6px; border-radius: 12px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
