:root {
  --bg-1: #ffe4f1;
  --bg-2: #ece6ff;
  --bg-3: #ddf4ff;
  --blob-opacity: 0.55;
  --card: rgba(255, 255, 255, 0.7);
  --card-border: rgba(255, 255, 255, 0.95);
  --icon-bg: linear-gradient(135deg, rgba(255, 111, 174, 0.18), rgba(155, 123, 255, 0.2));
  --text: #4a3651;
  --muted: #8b7694;
  --accent: #ff5fa8;
  --accent-2: #9474ff;
  --shadow: 0 12px 30px -14px rgba(150, 80, 160, 0.4);
  --shadow-hover: 0 18px 38px -14px rgba(255, 95, 168, 0.55);
  --up: #2fc487;
  --down: #ff4f73;
  --pending: #ffaa3b;
  --maint: #6e9cff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-1: #2b1a35;
    --bg-2: #1e1a3b;
    --bg-3: #12263a;
    --blob-opacity: 0.22;
    --card: rgba(46, 34, 62, 0.72);
    --card-border: rgba(255, 255, 255, 0.08);
    --icon-bg: linear-gradient(135deg, rgba(255, 111, 174, 0.22), rgba(155, 123, 255, 0.26));
    --text: #f7ebff;
    --muted: #bea9cf;
    --accent: #ff8cc2;
    --accent-2: #b39cff;
    --shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.7);
    --shadow-hover: 0 18px 38px -14px rgba(255, 140, 194, 0.35);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", "Varela Round",
    system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2) 50%, var(--bg-3));
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Soft colour blobs drifting behind everything. */
.blobs span {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(60px);
  opacity: var(--blob-opacity);
  animation: drift 18s ease-in-out infinite alternate;
}
.blobs span:nth-child(1) {
  width: 340px;
  height: 340px;
  top: -90px;
  left: -70px;
  background: #ffadd6;
}
.blobs span:nth-child(2) {
  width: 280px;
  height: 280px;
  right: -50px;
  bottom: -70px;
  background: #c6b3ff;
  animation-delay: -6s;
}
.blobs span:nth-child(3) {
  width: 220px;
  height: 220px;
  top: 38%;
  left: 62%;
  background: #a6e6ff;
  animation-delay: -12s;
}

main {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 20px 40px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

/* The pixel princess (see princess.txt). Each frame is a layer that the
   animations below switch on and off; with animations disabled she just
   holds out her croquette. One sprite pixel is 1px in these transforms. */
.mascot {
  display: inline-block;
}
.princess {
  display: block;
  width: 160px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 10px 12px rgba(255, 95, 168, 0.35));
}
.px-blink,
.px-happy,
.px-nibble,
.px-chew,
.px-crumbs,
.px-heart {
  opacity: 0;
}
.px-bob {
  animation: px-bob 1s steps(1, end) infinite;
}
.px-offer {
  animation: px-offer 6s step-end infinite;
}
.px-nibble {
  animation: px-nibble 6s step-end infinite;
}
.px-happy {
  animation: px-happy 6s step-end infinite;
}
.px-blink {
  animation: px-blink 6s step-end infinite;
}
.px-chew {
  animation: px-chew 6s step-end infinite;
}
.px-crumbs {
  animation: px-crumbs 6s step-end infinite;
}
.px-heart {
  animation: px-heart 6s step-end infinite;
}
.px-sparkle-1,
.px-sparkle-2,
.px-sparkle-3 {
  animation: px-twinkle 1.8s step-end infinite;
}
.px-sparkle-2 {
  animation-delay: -0.6s;
}
.px-sparkle-3 {
  animation-delay: -1.2s;
}

h1 {
  margin: 12px 0 6px;
  font-size: clamp(30px, 6vw, 46px);
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.greeting {
  margin: 0;
  font-weight: 700;
  min-height: 1.2em;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.summary {
  display: inline-block;
  margin: 16px 0 0;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
}
.summary[hidden] {
  display: none;
}

section {
  margin-top: 30px;
}

h2 {
  margin: 0 0 4px 6px;
  font-size: 18px;
}

.section-desc {
  margin: 0 0 12px 6px;
  color: var(--muted);
  font-size: 14px;
}

h2 + .grid {
  margin-top: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition:
    transform 0.2s cubic-bezier(0.3, 1.6, 0.6, 1),
    box-shadow 0.2s ease;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-hover);
}
.card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.card:active {
  transform: translateY(-1px) scale(0.99);
}

.icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 17px;
  background: var(--icon-bg);
  font-size: 26px;
}
.card:hover .icon {
  animation: wiggle 0.5s ease;
}

.text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.desc {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13.5px;
}

.status {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}
.status[hidden] {
  display: none;
}
.status.up {
  background: var(--up);
  animation: pulse 2.6s ease-out infinite;
}
.status.down {
  background: var(--down);
  box-shadow: 0 0 0 4px rgba(255, 79, 115, 0.22);
}
.status.pending {
  background: var(--pending);
}
.status.maint {
  background: var(--maint);
}

footer {
  margin-top: 46px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

@keyframes drift {
  to {
    transform: translate(40px, 30px) scale(1.12);
  }
}
@keyframes px-bob {
  50% {
    transform: translateY(-1px);
  }
}
@keyframes px-offer {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  88% {
    opacity: 1;
  }
}
@keyframes px-nibble {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  88% {
    opacity: 0;
  }
}
@keyframes px-happy {
  0% {
    opacity: 0;
  }
  52% {
    opacity: 1;
  }
  88% {
    opacity: 0;
  }
}
@keyframes px-blink {
  0%,
  22%,
  44%,
  100% {
    opacity: 0;
  }
  20%,
  42% {
    opacity: 1;
  }
}
@keyframes px-chew {
  0%,
  60%,
  68%,
  76%,
  84% {
    opacity: 0;
  }
  56%,
  64%,
  72%,
  80% {
    opacity: 1;
  }
}
@keyframes px-crumbs {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  60% {
    opacity: 1;
    transform: translateY(0);
  }
  64% {
    transform: translateY(1px);
  }
  68% {
    transform: translateY(2px);
  }
  72% {
    transform: translateY(3px);
  }
  76% {
    opacity: 0;
    transform: translateY(0);
  }
}
@keyframes px-heart {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  68% {
    opacity: 1;
  }
  72% {
    transform: translateY(-1px);
  }
  76% {
    transform: translateY(-2px);
  }
  80% {
    transform: translateY(-3px);
  }
  84% {
    transform: translateY(-4px);
  }
  92% {
    opacity: 0;
    transform: translateY(0);
  }
}
@keyframes px-twinkle {
  0% {
    opacity: 1;
  }
  33% {
    opacity: 0;
  }
  66% {
    opacity: 1;
  }
}
@keyframes wiggle {
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 196, 135, 0.45);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(47, 196, 135, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
