/* ============ MAINTENANCE ============
   Pairs with maintenance.js (html.is-maint). Everything but the screen is hidden. */
html.is-maint,
html.is-maint body {
  height: 100%;
  overflow: hidden;
  background: #1E0D15;
}
html.is-maint body > *:not(.maint) { display: none !important; }

.maint {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 2rem) 1.4rem calc(env(safe-area-inset-bottom, 0px) + 1.4rem);
  overflow: hidden;
  color: #FFF6F1;
  text-align: center;
  background:
    radial-gradient(90% 60% at 50% 30%, rgba(217, 108, 138, 0.22) 0%, rgba(217, 108, 138, 0) 70%),
    radial-gradient(120% 90% at 50% 0%, #5A1F31 0%, #2E1019 58%, #1E0D15 100%);
  -webkit-tap-highlight-color: transparent;
}
/* vignette */
.maint::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(8, 2, 5, 0.55) 100%);
}
.maint-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.maint-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  margin: auto 0;
}

/* ∞ drawn by a travelling pen */
.maint-inf {
  display: block;
  width: min(62vw, 250px);
  height: auto;
  margin: 0 auto 2rem;
  overflow: visible;
}
.maint-track {
  fill: none;
  stroke: rgba(255, 246, 241, 0.1);
  stroke-width: 2.2;
  stroke-linecap: round;
}
.maint-ink {
  fill: none;
  stroke: #E8A0B0;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 0.3 0.7;
  stroke-dashoffset: 0;
  animation: maint-run 5.6s linear infinite;
}
@keyframes maint-run { to { stroke-dashoffset: -1; } }
.maint-tip { fill: #FFF6F1; }
.maint-halo { fill: rgba(232, 160, 176, 0.35); }

.maint-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 160, 176, 0.32);
  background: rgba(232, 160, 176, 0.08);
  color: #E8A0B0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.maint-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #E8A0B0;
  box-shadow: 0 0 0 0 rgba(232, 160, 176, 0.6);
  animation: maint-pulse 2.2s ease-out infinite;
}
@keyframes maint-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 160, 176, 0.55); }
  70%, 100% { box-shadow: 0 0 0 0.6rem rgba(232, 160, 176, 0); }
}

.maint-title {
  margin-top: 1.2rem;
  font-size: clamp(1.75rem, 7.6vw, 2.7rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.maint-title .ar { color: #F2B8C6; }
.maint-sub {
  margin: 1rem auto 0;
  max-width: 24rem;
  color: rgba(255, 246, 241, 0.72);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  text-wrap: pretty;
}
.maint-ar {
  margin-top: 1.4rem;
  color: #E8A0B0;
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.8;
}
.maint-soon {
  margin-top: 1.7rem;
  color: rgba(255, 246, 241, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.maint-credit {
  position: relative;
  z-index: 1;
  margin-top: 1.6rem;
  display: flex;
  justify-content: center;
}
/* badge variants (the site's footers only carry the default one) */
.maint .dc-credit--dark { background: rgba(13, 207, 159, 0.08); border-color: rgba(13, 207, 159, 0.25); color: rgba(234, 247, 242, 0.72); box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.5); }
.maint .dc-credit--dark:hover { background: rgba(13, 207, 159, 0.14); border-color: rgba(13, 207, 159, 0.5); }
.maint .dc-credit--dark .dc-credit__word { color: #fbfdfc; }
.maint .dc-credit--dark .dc-credit__word b { color: #0dcf9f; }
.maint .dc-credit--dark .dc-credit__mark > span { filter: drop-shadow(0 8px 18px rgba(13, 207, 159, 0.45)); }
.maint .dc-credit--dark .dc-credit__mark rect.b { fill: #06231b; }
.maint .dc-credit--dark .dc-credit__sheen { background: linear-gradient(100deg, rgba(13, 207, 159, 0), rgba(13, 207, 159, 0.28) 45%, rgba(13, 207, 159, 0)); }
.maint .dc-credit--sm { gap: 0.5rem; padding: 0.34rem 0.7rem 0.34rem 0.4rem; font-size: 0.72rem; }
.maint .dc-credit--sm .dc-credit__mark { width: 1.15rem; height: 1.15rem; perspective: 300px; }
.maint .dc-credit--sm .dc-credit__word { font-size: 0.78rem; }
.maint .dc-credit--sm .dc-credit__caret { display: none; }

/* entrance */
.maint-inf,
.maint-kicker,
.maint-title,
.maint-sub,
.maint-ar,
.maint-soon,
.maint-credit {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  animation: maint-in 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.maint-inf { animation-delay: 0.1s; }
.maint-kicker { animation-delay: 0.3s; }
.maint-title { animation-delay: 0.42s; }
.maint-sub { animation-delay: 0.56s; }
.maint-ar { animation-delay: 0.7s; }
.maint-soon { animation-delay: 0.84s; }
.maint-credit { animation-delay: 1s; }
@keyframes maint-in { to { opacity: 1; transform: none; } }
/* the ∞ keeps its own looping ink animation after the entrance */
.maint-inf .maint-ink { animation: maint-run 5.6s linear infinite; }

@media (max-height: 640px) {
  .maint-inf { width: min(48vw, 190px); margin-bottom: 1.3rem; }
  .maint-title { font-size: clamp(1.5rem, 6.6vw, 2.2rem); }
  .maint-sub { font-size: 0.94rem; }
}

@media (prefers-reduced-motion: reduce) {
  .maint-inf, .maint-kicker, .maint-title, .maint-sub, .maint-ar, .maint-soon, .maint-credit {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .maint-ink { animation: none; stroke-dasharray: none; }
  .maint-dot { animation: none; }
}
.maint.is-still .maint-tip,
.maint.is-still .maint-halo { display: none; }
